Skip to content
Snippets Groups Projects
Unverified Commit 51a935a2 authored by Malin Freeborn's avatar Malin Freeborn
Browse files

fit statboxes into two rows

parent 8334c997
No related branches found
No related tags found
No related merge requests found
......@@ -38,11 +38,9 @@ Which then makes a male dragon called ``Bob'':
You can summon dozens of monsters, including \verb"humansoldier", \verb"basilisk", and \verb"\ghoul"
(see \verb"monsters.tex" for all the examples).
Placing a number after it changes the number of boxes.
Placing a number after the \verb"\T" symbol changes the number of rows of boxes to track stats.
\ghoul[\npc{\T[3]\D}{5 Ghouls}]
noApp \arabic{noAppearing}
\ghoul[\npc{\T[5]\D}{5 Ghouls}]
\subsection{Individual NPCs}
......
......@@ -84,6 +84,17 @@
}%
}
\newcommand\manyBoxes[1]{
\setcounter{enc}{\value{noAppearing}}
\whileboolexpr{test {\ifnumcomp{\value{enc}}{>}{0}}}{%
\ifnumodd{\value{enc}}%
{& \Repeat{\value{#1}}{\sqn} \\}%
{\Repeat{\value{#1}}{\sqn} }%
\addtocounter{enc}{-1}
}%
\ifnumodd{\value{noAppearing}}{}{\\}
}
%%%%%%%%%%%%%%%%%%%% Character Generation %%%%%%%%%%%%%%%%%%%%
%
......@@ -487,12 +498,15 @@ You don't need to fall unconscious when making a Vitality check)%
}{%
\noindent\begin{tabular}{ll}
HP \arabic{hp} \Repeat{\value{noAppearing}}{& \Repeat{\value{hp}}{\sqn} \\}
HP \arabic{hp}
\manyBoxes{hp}
\ifnum\value{mp}>0
MP \arabic{mp} \Repeat{\value{noAppearing}}{& \Repeat{\value{mp}}{\sqn} \\}
MP \arabic{mp}
\manyBoxes{mp}
\fi
\ifnum\value{sp}>0
SP \arabic{sp} \Repeat{\value{noAppearing}}{& \Repeat{\value{sp}}{\sqn} \\}
SP \arabic{sp}
\manyBoxes{sp}
\fi
\end{tabular}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment