From 282fb80ac4a19f4222efa219a7716e923fcbe35f Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Wed, 8 Nov 2023 21:47:04 +0100
Subject: [PATCH] update documentation and tests

---
 docs.tex | 62 ++++----------------------------------------------------
 test.tex | 21 ++++++++++---------
 2 files changed, 15 insertions(+), 68 deletions(-)

diff --git a/docs.tex b/docs.tex
index d3e83ef7..0487d50f 100644
--- a/docs.tex
+++ b/docs.tex
@@ -155,9 +155,9 @@ They also compile a spell index, if you request a spell index before \verb"\begi
 title={Spell Summaries},columns=2]
 
 \spell{Quake}% Name
-  {Earth}% Spheres
+  {distant,duplicated}% Enhancements
   {Wane}% Action
-  {\distant, \duplicated}% Enhancements
+  {Earth}% Spheres
   {the rock's density}% Skill
   {Ground shakes}% Short Description
   {Brrrrrr}% Long Description
@@ -168,9 +168,9 @@ title={Spell Summaries},columns=2]
 After inputting that, you can get the spell, and the `printindex' command will create a spell-list by using a special index, just for spells.
 
 \spell{Quake}% Name
-  {Earth}% Spheres
+  {distant,duplicated}% Enhancements
   {Wane}% Action
-  {\distant, \duplicated}% Enhancements
+  {Earth}% Spheres
   {the rock's density}% Skill
   {Ground shakes}% Short Description
   {Brrrrrr}% Long Description
@@ -198,60 +198,6 @@ This will take an educated guestimate of a few spells you want to show.
 
 \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{Talismans}
-
-Magical talismans (one-use items) are formatted like this:
-
-\begin{verbatim}
-  \magicItem{Scroll of Distraction}% Name
-    {\duplicated, \divergent}% Enhancements
-    {someone attacks}% Activation
-    {\roll{Strength}{Athletics}}%
-    {illusionary bats appear, causing a massive distraction}%
-    {Fire Shoots}% Effect
-    {A pretty brooch}% Item description
-\end{verbatim}
-
-\subsection{Pictures}
-
-\magicItem{Scroll of Distraction}% Name
-  {\duplicated, \divergent}% Enhancements
-  {someone attacks}% Activation
-  {\roll{Strength}{Athletics}}%
-  {illusionary bats appear, causing a massive distraction}%
-  {Fire Shoots}% Effect
-  {A pretty brooch}% Item description
-
 \subsection{Pictures}
 
 \sidepic{l1}
diff --git a/test.tex b/test.tex
index 04d9d99c..179fc3a3 100644
--- a/test.tex
+++ b/test.tex
@@ -3,6 +3,7 @@
 \usepackage{lipsum}
 
 \date{\today}
+\makeindex[name=spells,title={Spell Summaries},columns=2]
 
 \settoggle{debug}{true}
 
@@ -37,6 +38,8 @@ Current day should equal \arabic{r4b}.
   \setcounter{Fate}{2}
 }
 
+\input{spells/Air1.tex}
+
 \begin{speechtext}
 
   ``Would you tell me, please, which way I ought to go from here?''
@@ -47,13 +50,6 @@ Current day should equal \arabic{r4b}.
 
 \subsection{And now for something completely different}
 
-\magicitem{Noodle of Death}% NAME
-  {Extinguish}% SPELL
-  {Divinity (FSM)}% PATH
-  {Instant}% DURATION
-  {Pocket Spell}% TYPE
-  {2}% Potency
-  {5}% MP
 
 \subsection{Encounters}
 
@@ -169,13 +165,13 @@ This section is non-verbose, so only basic stats are shown.
 
 \gnollshaman
 
-\creatureSpells{Fire1}
+\showStdSpells{Fire1}
 
 \gnollshaman
 
-\creatureSpells{Fate1}
+\showStdSpells{Fate1}
 
-\creatureSpells{Fate2}
+\showStdSpells{Fate2}
 
 \end{multicols}
 
@@ -572,4 +568,9 @@ When using a bestiary chapter, the stats appear as dice rolls, rather than fixed
 
 \Repeat{2}{\tests}
 
+%\foreach \s in {Fire,Air,Water,Fate,Earth}%
+%  {\foreach \n in {1,...4}%
+%    {\input{spells/\s\n.tex}}
+%  }
+
 \end{document}
-- 
GitLab