diff --git a/magic.sty b/magic.sty index b73dfe015cd77116f14dde2e4cf6110401e89380..faf87c3211e1cc3413026052f23adf7b7081e204 100644 --- a/magic.sty +++ b/magic.sty @@ -12,6 +12,8 @@ \setcounter{spellCost}{1} \newcounter{spellPlusTwo} \setcounter{spellPlusTwo}{1} +\newcounter{castingBonus} + \setcounter{castingBonus}{1} \newcommand\spellName{} \newcommand\spellEnhancements{} @@ -40,6 +42,18 @@ \renewcommand\spellEnhancements{#2}% \renewcommand\spellAction{#3}% \renewcommand\spellSphere{#4}% + % What bonus does the caster receive? Some spells will display the caster's current Bonus, so we must calculate it. We start by setting it sky-high, then for each element in {Earth,Fire}, et c. we check if this is lower than the current castingBonus, if (if so), lower the bonus. + \setcounter{castingBonus}{10}% + \foreach \e in {#4}{% + \ifnum\value{\e}<\value{castingBonus}% + \setcounter{castingBonus}{\value{\e}}% + \fi% + }{}% + \iftoggle{snapCaster}{% + \addtocounter{castingBonus}{\value{Wits}}% + }{% + \addtocounter{castingBonus}{\value{Charisma}}% + }% \renewcommand\spellResistance{#5} \renewcommand\spellSum{#6} \renewcommand\spellNotes{#7} @@ -75,13 +89,14 @@ \newcommand\spellIndex{\index[spells]{\textbf{\spellName} Cost: \arabic{spellCost}, \spellEnhancements, \spellAction~\spellSphere, Range: \spellRange, \ifnum\value{spellTargets}>1 Targets: \arabic{spellTargets}, \fi Resisted by: \detokenize{\spellResistance}, \spellSum \spellNotes }} \newcommand\shortSpell{% + \addtocounter{castingBonus}{7}% \item[\spellName] Cost: \arabic{spellCost}, - \spellEnhancements, + \spellEnhancements~ \spellAction~ \spellSphere - Resisted by: \spellResistance + Resisted by: \spellResistance\ (\tn[\arabic{castingBonus}]) \spellSum \ \spellNotes @@ -97,7 +112,6 @@ }% } - \newcommand\spellRange{} \newcommand\setRange{% \iftoggle{distant}% diff --git a/monsters.sty b/monsters.sty index 5d5b95ad2bc77ef43b56335501857dd293886f02..8a43a211c279c341fdbb873638aa387b0b152a81 100644 --- a/monsters.sty +++ b/monsters.sty @@ -1527,6 +1527,7 @@ mana stone holding \arabic{track} MP, \ifodd\thechapter\lootJewellery\fi}% EQUIP \setcounter{Earth}{1}% \fi% \undead + \knacks{\snapcaster} } } @@ -1573,6 +1574,7 @@ mana stone holding \arabic{track} MP, \ifodd\thechapter\lootJewellery\fi}% EQUIP mana stone with \arabic{track} mana, \lootJewellery, \randomtwo\lootJewellery, \lootMagic}% EQUIPMENT { \renewcommand\abilities{\undead} + \knacks{\snapcaster} } } diff --git a/stats.sty b/stats.sty index 35f1f99b2aa4fc34b3c887a45da529b0b2d431f6..42a5ffc0afd68a3a4df22fe9aaaa53030f24fab0 100644 --- a/stats.sty +++ b/stats.sty @@ -369,6 +369,7 @@ \newcommand{\snapcaster}{% \addtocounter{knacks}{1}% + \global\settoggle{snapCaster}{true}% Snap Caster (spells use Wits and cost 1 less \glsentrytext{ap}) } @@ -408,6 +409,9 @@ \newcommand{\mind}[3]{ \setcounter{Intelligence}{#1}\setcounter{Wits}{#2}\setcounter{Charisma}{#3} } + +\newtoggle{snapCaster} +\settoggle{snapCaster}{true} % %%%%%%%%%%% Person @@ -561,6 +565,7 @@ } \newcommand{\clean}{ + \global\toggletrue{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,Tactics,Vigilance,Wyldcrafting}% {\setcounter{\s}{0}}