diff --git a/main.tex b/main.tex index b3602cf2bdc929a60fc451f36c44ebef6c3d5a2b..8bfc6718b120bfae75ea8ee4f47a7253b9385f38 100644 --- a/main.tex +++ b/main.tex @@ -21,27 +21,27 @@ \dragon -\newcommand\statblock[7]{ - \par - \clean - \npc#1 - \body#2 - \mind#3 - #4 +\newcommand\traits[7]{% + \clean% + \npc#1% + \body#2% + \mind#3% + #4% \foreach \k in {#5}{% \stepcounter{knacks}% }% \renewcommand\showKnacks{#5}% \foreach \s in {Air,Earth,Fate,Fire,Water}% {\ifnum\value{\s}>0 \addtocounter{mp}{3}\fi}% - % \renewcommand\equipment{#6}% \computeStats% #7% \computeEncumbrance% + \calculateXP% } - %%%%%%%%%% +%%%%%%%%%% + \newcommand\showChar[1]{ \begin{exampletext} #1 @@ -76,14 +76,16 @@ \noindent\textbf{Abilities}: \Abilities } - \noindent\textbf{Equipment}: - \ifdefempty{\weaponName}{}{% - \weaponName, - }% - \ifdefempty{\armourName}{}{% - \armourName, - }% - \equipment % + \ifnum\value{weight}>0 + \noindent\textbf{Equipment}: + \ifdefempty{\weaponName}{}{% + \weaponName, + }% + \ifdefempty{\armourName}{}{% + \armourName, + }% + \equipment % + \fi \hfill \Repeat{\value{encumbrance}}{~\glsentrytext{encumbrance}} {\scshape @@ -115,8 +117,65 @@ %%%%%%%%%%%%%%%%%%%% +\newcommand\statblock[1]{ + \begin{tcolorbox}[ + code={\setlength\parindent{0pt}#1}, + title={\npcsymbol\ \name}, + ornamented, + fontupper=\small, + halign=flush left, + left=5pt, + right=5pt, + top=0pt, + bottom=10pt, + ] + \creaturestats + \showSkills + \par + \ifnum\value{mp}>0% + \noindent\textbf{Spheres}: + \foreach \s in {Air,Earth,Fate,Fire,Water}% + {\ifnum\value{\s}>0 \s~\arabic{\s}, \fi} + \fi + \par + \ifnum\value{knacks}>0 + \textbf{Knacks}: \showKnacks + \fi + \ifdefempty{\Abilities}{}{% + \noindent\textbf{Abilities}: \Abilities + } + \noindent\textbf{Equipment}: + \ifdefempty{\weaponName}{}{% + \weaponName, % + }% + \ifdefempty{\armourName}{}{% + \armourName, % + }% + \equipment% + \tcblower%%%%%%%%%%%%%%%%%%%% + \derivedstats% + \end{tcolorbox} +} + +\statblock{ + \traits{{\F\Hu}{Drake}}% + {{1}{2}{3}}% + {{3}{0}{2}}% + {% + \setcounter{Academics}{1}% + \setcounter{Deceit}{1}% + \setcounter{Wyldcrafting}{1}% + \setcounter{Fire}{1}% + \setcounter{Air}{3}% + \longsword% + }% SKILLS + {\adrenalinesurge, \mightydraw}% KNACKS + {butter}% EQUIPMENT + {}% ABILITIES +} + \newcommand\Animal[6]{ - \statblock{#1}% + \traits{#1}% {#2}% {{-6}{#3}{-6}}% { @@ -127,18 +186,19 @@ {#6}% ABILITIES } -\showChar{ - \Animal{{\A}{Moggie}}% - {{-5}{1}{3}}% BODY +\statblock{ + \Animal{{\T[3]\A}{Moggie}}% + {{2}{1}{3}}% BODY {2}% WITS { \setcounter{Stealth}{3} }% + {}% {\quadraped}% ABILITIES } \showChar{ - \statblock{{\F\Hu}{Alice}}% + \traits{{\F\Hu}{Alice}}% {{1}{2}{3}}% {{3}{0}{2}}% { @@ -156,7 +216,7 @@ \toggletrue{examplecharacter} \showChar{ - \statblock{{\M\Hu}{Bob}}% + \traits{{\M\Hu}{Bob}}% {{1}{2}{3}}% {{-3}{-2}{-1}}% { @@ -171,7 +231,7 @@ \showChar{ - \statblock{{\F\Hu}{Charlie}}% + \traits{{\F\Hu}{Charlie}}% {{3}{2}{-1}}% {{-3}{-2}{-1}}% { @@ -188,7 +248,7 @@ \showChar{ - \statblock{{\T[7]\N}{\arabic{noAppearing} Goblins}}% + \traits{{\T[7]\N}{\arabic{noAppearing} Goblins}}% {{-2}{1}{2}}% {{-3}{2}{-4}}% { diff --git a/stats.sty b/stats.sty index 558658d8a9049880447fb7df83dc2225cc8f60a4..936c7dba87fa30f20de96f6ef8e51073c1afc77d 100644 --- a/stats.sty +++ b/stats.sty @@ -600,14 +600,14 @@ \setcounter{wounds}{0} } -\newcommand{\clean}{ - \global\togglefalse{snapCaster} - \knacks{} +\newcommand{\clean}{% + \global\togglefalse{snapCaster}% + \knacks{}% \foreach \s in {Air,Earth,Fate,Fire,Water,Projectiles,Combat,Brawl,Academics,Alchemy,Athletics,Caving,Crafts,Deceit,Empathy,Flight,Medicine,Performance,Larceny,Seafaring,Stealth,Tactics,Vigilance,Wyldcrafting}% - {\setcounter{\s}{0}} + {\setcounter{\s}{0}}% \foreach \s in {encumbrance,dr,weaponDamage,weaponBonus,weaponWeight,armourWeight,armourDR,armourWeight,fp,sp,heft,weight,damage,knacks,mp,xpbonus}% - {\setcounter{\s}{0}} - \setcounter{noAppearing}{1} + {\setcounter{\s}{0}}% + \setcounter{noAppearing}{1}% } %% _ _ _ _ _ @@ -798,7 +798,6 @@ }% \iftoggle{allyCharacter}{}{% \iftoggle{examplecharacter}{}{% - \calculateXP% \outline{\glsentrytext{cr}: \showCR}% }% }% @@ -839,9 +838,6 @@ % XP = attackXPtotal + defenceXPtotal \setcounter{xp}{\value{attackXPtotal}}% \addtocounter{xp}{\value{defenceXPtotal}}% - - \iftoggle{verbose}{\hrulefill} - \iftoggle{examplecharacter}% {}% {%