Newer
Older
%%%%%%%%%%%%%%%%%%%% Introduction
\newtoggle{bestiarychapter}
\settoggle{bestiarychapter}{false}
% _ _
% ___| |_ __ _| |_
% / __| __/ _` | __|
% \__ \ || (_| | |_
% |___/\__\__,_|\__|
%
%
% _ _ _
% | |__ | | ___ ___| | _____
% | '_ \| |/ _ \ / __| |/ / __|
% | |_) | | (_) | (__| <\__ \
% |_.__/|_|\___/ \___|_|\_\___/
%
% This file makes stat blocks for monsters.
%
% The writer feeds in something like this:
%
% \npc{\M}{Patrick the Pyromanacer}
%
% \person{0}% STRENGTH
% {0}% DEXTERITY
% {0}% SPEED
% {{0}% INTELLIGENCE
% {0}% WITS
% {0}}% CHARISMA
% {0}% DR
% {0}% COMBAT
% {}% SKILLS
% {Nothing}% EQUIPMENT
% {}
%
% The \person command takes various stats, and
% inside that 'SKILLS' variable (variable no. 8),
% we can add additional things, like
% \Path{Blood}{\invocation{2}}, which gives your
% wizzard 'invocation 2'.
%
% Most of the rest of the commands deal with
% properly calculating derived stats, like the TN
% to hit the creature.
\newtoggle{examplecharacter}
\settoggle{examplecharacter}{false}
\newtoggle{debug}\settoggle{debug}{false}
\newcommand{\ent}[1]{\textbf{#1}}
\newcommand{\test}{}
\newcommand{\skills}{}
\newcommand{\equipment}{}
\newcommand{\mods}{}
\newcommand{\printknacks}{}
\newcommand{\weaponknackone}{}
\newcommand{\weaponknacktwo}{}
% we calculate damage here because we can't display 1d6+6 damage - it has to turn into 2d6+2 damage.
\setcounter{damagebonus}{#1}%
\setcounter{numberofdice}{1}%
\whileboolexpr{test {\ifnumcomp{\value{damagebonus}}{>}{3}}}{%
\addtocounter{damagebonus}%
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
%%%%%%%%%%%%%%%%%%%% Character Generation %%%%%%%%%%%%%%%%%%%%
%
% _
% ___ ___ _ _ _ __ | |_ ___ _ __ ___
% / __/ _ \| | | | '_ \| __/ _ \ '__/ __|
%| (_| (_) | |_| | | | | || __/ | \__ \
% \___\___/ \__,_|_| |_|\__\___|_| |___/
%
%
% Attributes: str, dex, spd, int, wts, cha
% secondary str, dex and spd
\newcounter{str}
\newcounter{dex}
\newcounter{spd}
\newcounter{int}
\newcounter{wts}
\newcounter{cha}
\newcounter{att}
\newcounter{dr}
\newcounter{knacks}
\newcounter{strb}
\newcounter{dexb}
\newcounter{spdb}
\newcounter{attb}
%
% Extras: MP hp fp
% Derived: dicenumber, dicebonus,
\newcounter{mp}
\newcounter{mpb}
\newcounter{sp}
\newcounter{hp}
\newcounter{fp}
\newcounter{numberofdice}
\newcounter{damagebonus}
\newcounter{xp}
\newcounter{xpbonus}
\newcounter{attackXPtotal}
\newcounter{initiative}
\newcounter{weight}
\newcounter{damage}
\newcounter{shieldBonus}
\newcounter{shieldWeight}
\newcounter{shieldInit}
\newcounter{cost}
\newcounter{heft}% used to see how many AP points to swing a weapon
\newcounter{encumbrance}
\setcounter{encumbrance}{0}
% _
% ___ ___ _ __ ___ _ __ ___ __ _ _ __ __| |___
% / __/ _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` / __|
% | (_| (_) | | | | | | | | | | | (_| | | | | (_| \__ \
% \___\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|___/
%
% magic
\newcommand{\aldaron}{\addtocounter{mp}{3}Aldaron}
\newcommand{\conjuration}{\addtocounter{mp}{3}Conjuration}
\newcommand{\enchantment}{\addtocounter{mp}{3}Enchantment}
\newcommand{\fate}{\addtocounter{mp}{3}Fate}
\newcommand{\force}{\addtocounter{mp}{3}Force}
\newcommand{\invocation}{\addtocounter{mp}{3}Invocation}
\newcommand{\illusion}{\addtocounter{mp}{3}Illusion}
\newcommand{\necromancy}{\addtocounter{mp}{3}Necromancy}
\newcommand{\polymorph}{\addtocounter{mp}{3}Polymorph}
\newcommand{\saurecanta}{\addtocounter{mp}{3}Saurecanta}
\newcommand{\lockedmana}[1]{\setcounter{mpb}{-#1}}
\newcommand{\armourtype}{N}
\newcommand{\knacks}[1]{ \\
\ent{Knacks:} & #1
}
%%%%%%%%%%%%%%%%%%%%% Knacks
%
\newcommand{\adrenalinesurge}{Adrenaline Surge\addtocounter{strb}{1}\addtocounter{knacks}{1}}
\newcommand{\brawler}{Brawler\addtocounter{attb}{2}\addtocounter{knacks}{1}}
\newcommand{\berserker}{Berserker\addtocounter{spdb}{1}\addtocounter{strb}{1}\addtocounter{knacks}{1}}
\newcommand{\disarm}{Disarm\addtocounter{knacks}{1}\addtocounter{xpbonus}{1}}
\newcommand{\guardian}{Guardian\addtocounter{knacks}{1}}
\newcommand{\specialist}[1]{Specialist (#1)\addtocounter{knacks}{1}}
\newcommand{\backtothewall}{Back to the Wall\addtocounter{knacks}{1}}
\newcommand{\laststand}{Last Stand\addtocounter{knacks}{1}}
\newcommand{\perfectsneakattack}{Perfect Sneak Attack\addtocounter{knacks}{1}\addtocounter{strb}{\value{knacks}}\addtocounter{strb}{2}}
\newcommand{\precisestrike}{Precise Strike\addtocounter{knacks}{1}}
\newcommand{\stunningstrike}{Stunning Strike\addtocounter{knacks}{1}\addtocounter{xpbonus}{1}}
\newcommand{\charge}{\addtocounter{knacks}{1}\setcounter{track}{\value{knacks}}\addtocounter{track}{1}\divide\value{track} by 2\addtocounter{attb}{\value{track}}\addtocounter{strb}{\value{track}}\addtocounter{spdb}{\value{track}}Extreme Charge}
\newcommand{\snapshot}{Snap Shot\addtocounter{knacks}{1}\addtocounter{strb}{2}}
\newcommand{\dodger}{Dodger\addtocounter{knacks}{1}}
\newcommand{\mightydraw}{Mighty Draw\addtocounter{knacks}{1}}
\newcommand{\finishingblow}{Finishing Blow\addtocounter{knacks}{1}}
\newcommand{\unstoppable}{Unstoppable\addtocounter{hp}{2}\addtocounter{knacks}{1}}
\newcommand{\vengeful}{Vengeful\addtocounter{knacks}{1}}
\newcommand{\weaponmaster}{Weapon Master\addtocounter{att}{1}\addtocounter{knacks}{1}}
\newcommand{\snapcaster}{Snap Caster\addtocounter{knacks}{1}}
\newcommand{\extremefocus}{Extreme Focus\addtocounter{knacks}{1}}
\newcommand{\alchemist}{Alchemist\addtocounter{knacks}{1}\renewcommand{\magicPath}{Alchemist}}
\newcommand{\bloodCaster}{Blood Caster\addtocounter{knacks}{1}\renewcommand{\magicPath}{Blood}}
\newcommand{\divineCaster}{Divine Caster\addtocounter{knacks}{1}\renewcommand{\magicPath}{Divinity}}
\newcommand{\nuraCaster}{Nura Caster\addtocounter{knacks}{1}\renewcommand{\magicPath}{Nura}}
\newcommand{\runeCaster}{Rune Caster\addtocounter{knacks}{1}\renewcommand{\magicPath}{Runes}}
\newcommand{\songCaster}{Song Caster\addtocounter{knacks}{1}\renewcommand{\magicPath}{Song}}
\newcommand{\combatcaster}{Combat Caster\addtocounter{knacks}{1}}
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
%
% _ __ ___ _ __ ___ ___ _ __
%| '_ \ / _ \ '__/ __|/ _ \| '_ \
%| |_) | __/ | \__ \ (_) | | | |
%| .__/ \___|_| |___/\___/|_| |_|
%|_|
%
%
% _ _
%% ___| |__ __ _ _ __ __ _ ___| |_ ___ _ __
%% / __| '_ \ / _` | '__/ _` |/ __| __/ _ \ '__|
%%| (__| | | | (_| | | | (_| | (__| || __/ |
%% \___|_| |_|\__,_|_| \__,_|\___|\__\___|_|
%%
%% optional counters, such as mana, are cleaned
%% clear: weaponsknack1 and 2,
%%
%
\newcommand{\mind}[3]{
\setcounter{int}{#1}\setcounter{wts}{#2}\setcounter{cha}{#3}
}
%
%%%%%%%%%%% Person
%
\settoggle{mind}{true}
\setcounter{str}{#1}
\setcounter{dex}{#2}
\setcounter{spd}{#3}
\mind#4
\setcounter{dr}{#5}
\setcounter{att}{#6}
\renewcommand{\skills}{#7}
\renewcommand{\equipment}{#8}
\renewcommand{\mods}{#9}
before upper={\parindent0pt},
halign=flush left,
left=10pt,
\textbf{Archetype:} \archetype,
\textbf{Personality:} \personality
\settoggle{personality}{false}}%
{}
\settoggle{debug}{false}
\settoggle{examplecharacter}{false}
\settoggle{mind}{false}
\setcounter{str}{#1}
\setcounter{dex}{#2}
\setcounter{spd}{#3}
\setcounter{wts}{#4}
\setcounter{dr}{#5}
\setcounter{att}{#6}
\renewcommand{\skills}{#7}
\renewcommand{\abilities}{#8}
\renewcommand{\mods}{#9}
\begin{tcolorbox}[title={\name},
before upper={\parindent0pt},
halign=flush left,
left=10pt,
right=15pt,
\settoggle{personality}{false}}%
{}
\creaturestats
}
\newcommand{\clean}{
\setcounter{fp}{5}
\setcounter{sp}{0}
\setcounter{knacks}{0}
\renewcommand{\armourtype}{N}
\renewcommand{\weaponknackone}{}
\renewcommand{\weaponknacktwo}{}
\setcounter{mp}{0}
\setcounter{mpb}{0}
\setcounter{xpbonus}{0}
\settoggle{team}{false}
}
%% _ _ _ _ _
%% __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___
%% / _` | __| __| '__| | '_ \| | | | __/ _ \/ __|
%%| (_| | |_| |_| | | | |_) | |_| | || __/\__ \
%% \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/
%%
%% Print the line,
%% print the attributes.
%% print the skills
%% print the knacks
%% print the equipment
%
\newcommand{\creaturestats}{
% Reference versions (which always are non-verbose) don't
% have the space for full-sized stats.
\iftoggle{verbose}{
\begin{small}%
}{%
\setcounter{strb}{0}
\setcounter{spdb}{0}
\setcounter{dexb}{0}
\begin{tabularx}{\textwidth}{lr|lr|lr}
% the tcolorbox has coloured rows (xcolor package)
% but that doesn't work with creature stats, so we suppress it here
\hiderowcolors
\iftoggle{verbose}{Strength}{STR} & \arabic{str} & \iftoggle{verbose}{Dexterity}{DEX} & \arabic{dex} & \iftoggle{verbose}{Speed}{SPD} & \arabic{spd} \\
\iftoggle{mind}{
\iftoggle{verbose}{Intelligence}{INT} & \arabic{int} & \iftoggle{verbose}{Wits}{WTS} & \arabic{wts} & \iftoggle{verbose}{Charisma}{CHA} & \arabic{cha} \\}{%
&& \iftoggle{verbose}{Wits}{WTS} & \arabic{wts} \\
}
\setcounter{hp}{\value{str}}
\end{tabularx}
\ent{Skills} & \ifnumcomp{\value{att}}{=}{0}{}{\iftoggle{mind}{Combat \arabic{att}, }{Aggression \arabic{att}, }} \skills \\
\iftoggle{mind}{\ent{Equipment} & \equipment \\}{\ent{Abilities} & \abilities \\}
\addtocounter{dexb}{\value{dex}}
\addtocounter{spdb}{\value{spd}}
\setcounter{attb}{\value{att}}
\mods
\weaponknackone
\weaponknacktwo
\iftoggle{examplecharacter}{}{
\addtocounter{att}{7}
\addtocounter{attb}{7}
\iftoggle{verbose}{%
\end{small}%
}{%
\end{footnotesize}%
}%
}
%% _ _ _
%% __| | ___ _ __ ___| |_ __ _| |_ ___
%% / _` |/ _ \ '__/ __| __/ _` | __/ __|
%%| (_| | __/ | \__ \ || (_| | |_\__ \
%% \__,_|\___|_| |___/\__\__,_|\__|___/
%%
%%
%% dice instead of Damage
%% print out att, spd, DAM, dex, dr (type), str
%%
%
\newcommand{\derivedstats}{
\setlength\topsep{0pt}
\setlength\parskip{0pt}
\iftoggle{debug}{str is \arabic{str}, strb is \arabic{strb}.}{}
\addtocounter{att}{\value{dex}}
\addtocounter{attb}{\value{dexb}}
\addtocounter{spd}{3}
\addtocounter{spdb}{3}
\ifnum\value{weight}>\value{str}% now to compute encumbrance
\addtocounter{spd}{\value{weight}}
\addtocounter{spdb}{\value{weight}}
\addtocounter{spd}{-\value{str}}
\addtocounter{spdb}{-\value{str}}
\fi
\begin{center}
\scshape Att \arabic{att}\ifnumcomp{\value{att}}{=}{\value{attb}}{}{ (\arabic{attb})},
AP \arabic{spd}\ifnumcomp{\value{spd}}{=}{\value{spdb}}{}{ (\arabic{spdb})}\ifnumcomp{\value{heft}}{>}{1}{: \arabic{heft}}{},
\mbox{Dam \calculatedamage{\value{damage}}%
\ifnumcomp{\value{strb}}{>}{0}%
{
\addtocounter{damage}{\value{strb}} (\calculatedamage{\value{damage}})}{},
}
\ifnumcomp{\value{dr}}{>}{0}{DR \arabic{dr}~\armourtype, }{}
\addtocounter{mp}{\value{wts}}%
\ifnum\value{mpb}=0%
\arabic{mp}~MP%
\else%
\addtocounter{mpb}{\value{mp}}%
\arabic{mpb} / \arabic{mp} MP%
\fi
\iftoggle{bestiarychapter}%
{, }%
{ \Repeat{\value{mp}}{\ding{111}}, }%
}
\fi
\noindent\mbox{\arabic{hp} HP \iftoggle{bestiarychapter}{}{%
\ \Repeat{\value{hp}}{\ding{111}}%
}%
}%
\ifnumcomp{\value{sp}}{>}{0}%
{, \mbox{%
\arabic{sp} SP %
\iftoggle{bestiarychapter}{}{\Repeat{\value{sp}}{\ding{111}}}%
}%
}%
{}%
\iftoggle{examplecharacter}{}{
\calculateXP
}
%
%
%% __ ______
%% \ \/ / _ \
%% \ /| |_) |
%% / \| __/
%% /_/\_\_|
%%
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
\newcommand{\calculateXP}{
%% Sanitize: init+5, dam+5,
\addtocounter{spdb}{5}
\addtocounter{strb}{5}
\addtocounter{dex}{5}
\addtocounter{dr}{2}
% Sanitize: dex+5, dr+1,
% attackXPtotal= strb x spdb x damb
\vspace{.1cm}
\setcounter{attackXPtotal}{\value{attb}}
\multiply\value{attackXPtotal} by \value{spdb}
\multiply\value{attackXPtotal} by \value{strb}
\iftoggle{debug}{Attack total: \arabic{attackXPtotal}}{}
% defenceXPtotal= dex x dr x hp
\setcounter{defenceXPtotal}{\value{dex}}
\multiply\value{defenceXPtotal} by \value{dr}
\multiply\value{defenceXPtotal} by \value{hp}
% XP = attackXPtotal + defenceXPtotal
\setcounter{xp}{\value{attackXPtotal}}
\addtocounter{xp}{\value{defenceXPtotal}}
\addtocounter{xp}{-350}
\multiply\value{mp} by 100
\addtocounter{xp}{\value{mp}}
\ifnumcomp{\value{xp}}{<}{120}%
{\ifnumcomp{\value{xp}}{>}{100}%
{$1/2$ XP}{$1/3$ XP}}%
{
\divide\value{xp} by 120%
\addtocounter{xp}{\value{xpbonus}}%
\arabic{xp} XP
}%
% if {mind} print fate points.
%
\iftoggle{examplecharacter}{}
{\iftoggle{mind}%
{\addtocounter{fp}{\value{cha}}%
\ignorespaces, \arabic{fp}~FP %
\iftoggle{bestiarychapter}%
{}%
{\Repeat{\value{fp}}{\ding{111}}}%
}{}%
%
%%%%%%%%%%%%%%%%%%%% Creature Abilities
\newcommand{\abilities}[1]{ \\
\ent{Abilities:} & #1
}
\newcommand{\amphibious}{
amphibious%
}
claws (grapple inflicts standard damage)%
}
\newcommand{\flight}{%
flight%
\newcommand{\venom}{%
venom (grappling inflicts 1D6 Fatigue)%
}
\newcommand{\web}{%
\setcounter{track}{6}\addtocounter{track}{\value{str}}%
web (Strength + Athletics, TN \arabic{track} to break free as a movement action)%
}
\newcommand{\Path}[1]{ \\
\raggedright \ent{Spheres:} & #1