diff --git a/magic.sty b/magic.sty index 41c32b8a960874649cfa2394d9f66e5a96cbb9a0..3235a479a60aff0b766d1203682f8c89587c4dfb 100644 --- a/magic.sty +++ b/magic.sty @@ -7,6 +7,49 @@ % |___/ +\newcounter{spellCost} +\setcounter{spellCost}{1} + +\newcommand\spellName{} +\newcommand\spellEnhancements{} +\newcommand\spellAction{} +\newcommand\spellSphere{} +\newcommand\spellResistance{} +\newcommand\spellSum{} +\newcommand\spellNotes{} + +\newcommand\calcSpell[7]{% + \renewcommand\spellName{#1}% + \setcounter{spellCost}{1}% + \foreach \d in {#2}{% + \stepcounter{spellCost}% + }% + \renewcommand\spellEnhancements{#2}% + \renewcommand\spellAction{#3}% + \renewcommand\spellSphere{#4}% + \renewcommand\spellResistance{#5} + \renewcommand\spellSum{#6} + \renewcommand\spellNotes{#7} +} + + +\newcommand\displaySpell{% + \paragraph{\spellName} + + Cost: \arabic{spellCost}, + \spellEnhancements, + \spellAction~ + \spellSphere + + Resisted by: \spellResistance + + \spellSum \ + \spellNotes +} + + + + % We use spellPotency to track spell effects which are typically larger than the spell's level. \newcounter{spellPotency}