diff --git a/docs.tex b/docs.tex index a3a519446afe2ac9ac4cada1954897bc10142780..dbb2b84715fe8509c0d53a6223eb755102357088 100644 --- a/docs.tex +++ b/docs.tex @@ -173,19 +173,56 @@ After inputting that, you can get the spell, and the `printindex' command will c Alternatively, pull in a bunch of spells from a sphere at a particular level with: -\verb"\showSpells{fate1,air2,mind2}" +\verb"\showSpells{Fate1,Air2,Mind2}" -\showSpells{fire1,fate1,air2,mind2} +%\showSpells{Fire1,Fate1,Air2,Mind2} \ldots which shows Air spells of level 2, and Fate at level 1. -Alternatively, input the spells after a creature, with: +Alternatively, input the spells after a creature, with a `show standard spells' command: -\verb"\creatureSpells{fate1,air2,mind2}" +\begin{verbatim} + + \demilich + \showStdSpells + +\end{verbatim} + +This will take an educated guestimate of a few spells you want to show. \demilich -\creatureSpells{fate1,air2,mind2} +\showStdSpells + +Or you can specify a list of spells, with an optional argument to take any spell you like. + +\begin{verbatim} + + \elf + + \creatureSpells[ + \spell{Quake}% Name + {Earth}% Spheres + {Wane}% Action + {\distant, \duplicated}% Enhancements + {the rock's density}% Skill + {Ground shakes}% Short Description + {Brrrrrr}% Long Description + ]{Fate1,Air2} + +\end{verbatim} + +\elf + +\creatureSpells[ + \spell{Quake}% Name + {Earth}% Spheres + {Wane}% Action + {\distant, \duplicated}% Enhancements + {the rock's density}% Skill + {Ground shakes}% Short Description + {Brrrrrr}% Long Description +]{Fate1,Air2} \subsubsection{Magical Items} diff --git a/magic.sty b/magic.sty index 2f603a43d716b049dce56d2e75019d99c36aacaa..bb469a1be7774132f528f9a51c5a09f9a8268803 100644 --- a/magic.sty +++ b/magic.sty @@ -203,21 +203,41 @@ \vspace{.3em} } -\newcommand\creatureSpells[1]{ +\newcommand\creatureSpells[2][]{ \begin{description} \settoggle{genExamples}{false} - \foreach \s in {#1}{ - \input{config/spells/\s.tex} + #1 + \foreach \s in {#2}{ + \IfFileExists{config/spells/\s.tex}{ + \input{config/spells/\s.tex} + }{} } \end{description} } -\newcommand\showSpells[1]{ - \needspace{3em}\bigLine - \settoggle{genExamples}{true} - \foreach \s in {#1}{ - \input{config/spells/\s.tex} +\newcommand\showStdSpells{ + \setcounter{enc}{0} + \begin{description} + \settoggle{genExamples}{false} + \foreach\n in {3,2,1}{ + \ifnum\value{enc}<3 + \foreach \s in {Earth,Air,Fire,Water,Fate}{ + \ifnumcomp{\value{\s}}{=}{\n}{ + \input{config/spells/\s\n.tex} + \stepcounter{enc} + }{} + } + \fi } - \bigLine + \end{description} +} + +\newcommand\showSpells[1]{ + \needspace{3em}\bigLine + \settoggle{genExamples}{true} + \foreach \s in {#1}{ + \input{config/spells/\s.tex} + } + \bigLine } diff --git a/spells/air1.tex b/spells/Air1.tex similarity index 100% rename from spells/air1.tex rename to spells/Air1.tex diff --git a/spells/air2.tex b/spells/Air2.tex similarity index 100% rename from spells/air2.tex rename to spells/Air2.tex diff --git a/spells/air3.tex b/spells/Air3.tex similarity index 100% rename from spells/air3.tex rename to spells/Air3.tex diff --git a/spells/death1.tex b/spells/Death1.tex similarity index 100% rename from spells/death1.tex rename to spells/Death1.tex diff --git a/spells/death2.tex b/spells/Death2.tex similarity index 100% rename from spells/death2.tex rename to spells/Death2.tex diff --git a/spells/death3.tex b/spells/Death3.tex similarity index 100% rename from spells/death3.tex rename to spells/Death3.tex diff --git a/spells/Earth1.tex b/spells/Earth1.tex new file mode 100644 index 0000000000000000000000000000000000000000..62590cac584043e37c8aaea04388e56d790e13ff --- /dev/null +++ b/spells/Earth1.tex @@ -0,0 +1,11 @@ +\spell{Slide}% Name + {\mAir}% Spheres + {Wax}% Action + {}% Enhancements + {\roll{Dexterity}{Athletics}}% Resist with + {targets standing on snow or mud fall prone}% Description + { + The mage creates subtle vibrations across the ground, forcing it to move. + This does nothing of any consequence on solid ground, but soft ground, such as any area covered in thick mud, or snow, can throw anyone standing on two legs. + } + diff --git a/spells/fate1.tex b/spells/Fate1.tex similarity index 100% rename from spells/fate1.tex rename to spells/Fate1.tex diff --git a/spells/fate2.tex b/spells/Fate2.tex similarity index 100% rename from spells/fate2.tex rename to spells/Fate2.tex diff --git a/spells/fire1.tex b/spells/Fire1.tex similarity index 100% rename from spells/fire1.tex rename to spells/Fire1.tex diff --git a/spells/fire2.tex b/spells/Fire2.tex similarity index 100% rename from spells/fire2.tex rename to spells/Fire2.tex diff --git a/spells/light1.tex b/spells/Light1.tex similarity index 100% rename from spells/light1.tex rename to spells/Light1.tex diff --git a/spells/light2.tex b/spells/Light2.tex similarity index 100% rename from spells/light2.tex rename to spells/Light2.tex diff --git a/spells/light3.tex b/spells/Light3.tex similarity index 100% rename from spells/light3.tex rename to spells/Light3.tex diff --git a/spells/mind1.tex b/spells/Mind1.tex similarity index 100% rename from spells/mind1.tex rename to spells/Mind1.tex diff --git a/spells/mind2.tex b/spells/Mind2.tex similarity index 100% rename from spells/mind2.tex rename to spells/Mind2.tex diff --git a/spells/mind3.tex b/spells/Mind3.tex similarity index 100% rename from spells/mind3.tex rename to spells/Mind3.tex diff --git a/spells/water1.tex b/spells/Water1.tex similarity index 100% rename from spells/water1.tex rename to spells/Water1.tex diff --git a/spells/water2.tex b/spells/Water2.tex similarity index 100% rename from spells/water2.tex rename to spells/Water2.tex diff --git a/test.tex b/test.tex index 0760c854512f6c76bafef0eccaf07d8b09cf0dca..50a6294a712823cb012cc037c31c890c01a56ce3 100644 --- a/test.tex +++ b/test.tex @@ -169,13 +169,13 @@ This section is non-verbose, so only basic stats are shown. \gnollshaman -\creatureSpells{fire1} +\creatureSpells{Fire1} \gnollshaman -\creatureSpells{fate1} +\creatureSpells{Fate1} -\creatureSpells{fate2} +\creatureSpells{Fate2} \end{multicols}