diff --git a/docs.tex b/docs.tex index dbb2b84715fe8509c0d53a6223eb755102357088..aea44b6e4b17cfba454c07da62f1858c5b0327e1 100644 --- a/docs.tex +++ b/docs.tex @@ -102,6 +102,10 @@ Then the \verb"\humansoldier" command turns from this: This second soldier is still random, but note the loot they carry has changed into a roll. +And finally, we have swarms: + +\swarm[\flight]{Stirges}{5}{1}{3}{1} + \subsection{Boxes} You can add things for these people to say with a \verb"\begin{speechtext}" command: diff --git a/stats.sty b/stats.sty index 61a2d89f8ba67294b1fdc35d4cc02d90c0a9721f..b05c7a7503f048f3b1edfbc94624c74f259758a7 100644 --- a/stats.sty +++ b/stats.sty @@ -786,7 +786,52 @@ }{}% } } -% + +\newcommand\swarm[6][]% + { + \begin{tcolorbox}[ + title={\A\ Swarm: #2}, + before upper={\parindent0pt}, + ornamented, + fontupper=\small, + halign=flush left, + left=10pt, + right=15pt, + top=0pt, + bottom=0pt, + ] + \clean + \setcounter{hp}{#3} + \setcounter{Dexterity}{#4} + \setcounter{att}{#4} + \addtocounter{att}{10} + \setcounter{Speed}{#5} + \setcounter{ap}{#5} + \addtocounter{ap}{3} + \setcounter{Wits}{#6} + \renewcommand\abilities{#1} + + \scshape + \begin{tabularx}{\textwidth}{cYcc} + \hiderowcolors + + \Gls{ap}: \arabic{ap} & Att: $\arabic{att} - HP$ + \iftoggle{verbose}{ + & Speed: \arabic{Speed} + & Wits: \arabic{Wits} + }{ + & Dam: 1 + } + \\ + & \showBoxes & \\ + \end{tabularx} + \ifdefempty{\abilities}{}{% + \textbf{Abilities}: \abilities + }% + \end{tcolorbox} + } + + %%%%%%%%%%%%%%%%%%%% Creature Abilities \newcommand{\abilities}{} diff --git a/test.tex b/test.tex index 50a6294a712823cb012cc037c31c890c01a56ce3..04d9d99ccd89abd6ec2441237f8da316ce6f78ff 100644 --- a/test.tex +++ b/test.tex @@ -502,6 +502,11 @@ When using a bestiary chapter, the stats appear as dice rolls, rather than fixed \begin{multicols}{2} +\randomdozen +\setcounter{track}{\value{r12}} + +\swarm[\flight]{Stirges}{\value{r12}}{1}{3}{1} + \lipsum[\arabic{r4}] \humanbard