\RequirePackage{hgboxes,hgtech,epsfig,hgbox}

%
% Lines, boxes and tables
%

\def\smallbox{\numbox}
\def\hugebox{\NumBox}
\def\HugeBox{\framebox[4.5pc]{\rule{0pt}{2pc}}}
\newcommand{\square}[1][]{\framebox[24pt]{\rule{0pt}{24pt}#1}}
\DeclareRobustCommand{\Line}[1][100pt]{\rule[-2pt]{#1}{1pt}}

%
% Words and Titles for Ars Magica
%

\def\arm{Ar\s\ Magica}

%
% Ability score definitions
%

\def\abilities#1{\def\list@abilities{#1}}   \abilities{}

%
% Spell list definitions
%

\def\spells#1{\def\list@spells{#1}}         \spells{}

%
% Art score definitions
%

\def\techniques#1,#2,#3,#4,#5.{%
  \def\artcreo{#1}%
  \def\artintellego{#2}%
  \def\artmuto{#3}%
  \def\artperdo{#4}%
  \def\artrego{#5}%
}

\def\forms#1,#2,#3,#4,#5,#6,#7,#8,#9.{%
  \def\artanimalem{#1}%
  \def\artaquam{#2}%
  \def\artauram{#3}%
  \def\artcorpus{#4}%
  \def\artherbam{#5}%
  \def\artignem{#6}%
  \def\artimagonem{#7}%
  \def\artmentem{#8}%
  \Forms#9.%
}
\def\Forms#1,#2.{%
  \def\artterram{#1}%
  \def\artvim{#2}%
}
  \def\artcreo{}%
  \def\artintellego{}%
  \def\artmuto{}%
  \def\artperdo{}%
  \def\artrego{}%
  \def\artanimalem{}%
  \def\artaquam{}%
  \def\artauram{}%
  \def\artcorpus{}%
  \def\artherbam{}%
  \def\artignem{}%
  \def\artimagonem{}%
  \def\artmentem{}%
  \def\artterram{}%
  \def\artvim{}%

%
% Primary data
%

\def\name#1{\def\Thename{\hand{#1}}}\name\Line
\def\age#1{\def\Theage{\hand{#1}}}\age\Line
\def\gender#1{\def\Thegender{\hand{#1}}}\gender\Line
\def\player#1{\def\Theplayer{\hand{#1}}}\player\Line
\def\born#1{\def\Theborn{\hand{#1}}}\born\Line
\def\size#1{\def\Thesize{\hand{#1}}}\size\Line
\def\covenant#1{\def\Thecovenant{\hand{#1}}}\covenant\Line
\def\year#1{\def\Theyear{\hand{#1}}}\year\Line
\def\conf#1{\def\Theconf{\hand{#1}}}\conf\Line
\def\saga#1{\def\Thesaga{\hand{#1}}}\saga\Line
\def\nationality#1{\def\Thenationality{\hand{#1}}}\nationality\Line
\def\decr#1{\def\Thedecr{\hand{#1}}}\decr\Line
\def\cconf#1{\def\Thecconf{\hand{#1}}}\cconf\Line

%
% Characteristics
%

\newcommand\Characteristic[3][\rule{64pt}{1pt}]{%
  \expandafter\def\csname #3spec\endcsname{#1}
  \expandafter\def\csname #3score\endcsname{#2}}

\Characteristic{\rule{30pt}{1pt}}{int}
\Characteristic{\rule{30pt}{1pt}}{per}
\Characteristic{\rule{30pt}{1pt}}{str}
\Characteristic{\rule{30pt}{1pt}}{sta}
\Characteristic{\rule{30pt}{1pt}}{com}
\Characteristic{\rule{30pt}{1pt}}{pre}
\Characteristic{\rule{30pt}{1pt}}{qui}
\Characteristic{\rule{30pt}{1pt}}{dex}

%
% Spells
%

\newcommand{\SpellLine}[6][\hbox{\hspace{28pc}}]%
           {{\handfamily #1} & {\handfamily #2} & {\handfamily #3} &  % 
            {\handfamily #4} & {\handfamily #5} \\\hline              %
            \multicolumn{5}{l}{Foci \a\ Note\s : {\handfamily #6} }\\\hline}

\def\Grimoire#1{\def\Thegrimoire{\input{#1}}}
\Grimoire{null}
\newcounter{spelline}
\setcounter{spelline}{18}
\def\Aspell#1#2#3#4#5#6{%
  \addtocounter{spelline}{-1}
  \SpellLine{#1}{#2}{#3}{#4}{#5}{#6}
}

%
% Abilities
%

\newcommand{\AbilityLine}[4][\hspace{64pt}]%
           {{\handfamily #2} & {\handfamily\lb #1\rb} & {\handfamily #3} &  % 
            {\handfamily #4}  \\\hline}

\def\Abilities#1{\def\Theabilities{\input{#1}}}
\Abilities{null}
\newcounter{abilityline}
\def\Anability{\addtocounter{abilityline}{-1}\AbilityLine}

