From 3683f22f38a59c51a7a08f613659d09622fe979a Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Mon, 28 Aug 2023 00:54:19 +0200
Subject: [PATCH] full spell display environment

---
 magic.sty    |  3 ---
 monsters.sty | 11 +++++++--
 stats.sty    | 67 +++++++++++++++++++++++++---------------------------
 test.tex     |  6 +++++
 4 files changed, 47 insertions(+), 40 deletions(-)

diff --git a/magic.sty b/magic.sty
index 048d5110..0bd9673f 100644
--- a/magic.sty
+++ b/magic.sty
@@ -56,11 +56,8 @@
     \hphantom{#4}%
     \setArea%
     \setRange%
-    \setcounter{age}{8}% to track TN
-    \addtocounter{age}{\value{#5}}%
     (Cost:~\arabic{spelllevel}, Spheres:~#2, Range: \spellRange\iftoggle{duplicated}{, Targets: \spellArea}{}, \tn{\arabic{age}})
 
-    \item
     \MakeUppercase#6.
   }
 }
diff --git a/monsters.sty b/monsters.sty
index 2dcba2dd..1f9337df 100644
--- a/monsters.sty
+++ b/monsters.sty
@@ -899,11 +899,11 @@ Academics~1, \ifodd\value{page} Crafts~\arabic{r2}, \else \fi Deceit~1, \ifodd\v
 
 \newcommand{\gnollshaman}[1][\npc{\Nl\F}{Gnoll Shaman}]{
 	#1
+	\addtocounter{age}{-2}
 	\randomtwo
 	\randomtwoB
 	\randomtwoD
 	\randomthree
-    \addtocounter{age}{-2}
 	\randomthreeB
 	\randomthreeC
 	\randomfour
@@ -920,6 +920,14 @@ Academics~1, \ifodd\value{page} Crafts~\arabic{r2}, \else \fi Deceit~1, \ifodd\v
 \ifnum\value{r4}>1%
 	{Vigilance~\arabic{enc}}%
 	\fi%
+  \Path{
+    \ifodd\value{r2}%
+      Air\else Fire%
+    \fi~\arabic{r3}, %
+    \ifodd\value{r3b}\else%
+      Fate~\arabic{r2d}, Water 1%
+    \fi%
+  }
 }% SKILLS
 {\Dagger\ifodd\value{r3}\else, \lootMagic\fi}% EQUIPMENT
 {
@@ -1199,7 +1207,6 @@ Academics~1, \ifodd\value{page} Crafts~\arabic{r2}, \else \fi Deceit~1, \ifodd\v
 \fi%
 }% EQUIPMENT
 {
-  \setcounter{mp}{3}
   \setcounter{Earth}{\value{age}}
   \setcounter{Fire}{2}
 }
diff --git a/stats.sty b/stats.sty
index 632b225c..916df327 100644
--- a/stats.sty
+++ b/stats.sty
@@ -576,10 +576,9 @@
   \afterparnoindent
 }
 
-
 \newcommand{\clean}{
   \knacks{}
-  \foreach \s in {Earth,Air,Fate,Fire,Water,Projectiles,Combat,Brawl,Academics,Athletics,Caving,Crafts,Deceit,Empathy,Medicine,Performance,Larceny,Seafaring,Tactics,Vigilance,Wyldcrafting}%
+  \foreach \s in {Projectiles,Combat,Brawl,Academics,Athletics,Caving,Crafts,Deceit,Empathy,Medicine,Performance,Larceny,Seafaring,Tactics,Vigilance,Wyldcrafting}%
     {\setcounter{\s}{0}}
   \setcounter{dr}{0}
 	\setcounter{fp}{0}
@@ -629,45 +628,42 @@
 
 \newcommand\skillsEtc{
 
-  \foreach\s in {Air,Earth,Fate,Fire,Water}%
-    {\ifnum\value{\s}>0\addtocounter{mp}{3}\fi}%
-
-  \begin{tabularx}{\linewidth}{p{.20\textwidth}>{\raggedright\arraybackslash}p{.70\textwidth}}
+\begin{tabularx}{\linewidth}{p{.20\textwidth}>{\raggedright\arraybackslash}p{.70\textwidth}}
 
-    \iftoggle{verbose}{
-      \ent{Skills} &
-      \foreach \s in {Earth,Air,Fire,Water,Fate,Projectiles,Combat,Brawl,Academics,Athletics,Caving,Crafts,Deceit,Empathy,Medicine,Performance,Larceny,Seafaring,Tactics,Vigilance,Wyldcrafting}
-        {\ifnum\value{\s}>0 \s~\arabic{\s}, \fi}
-        \skills \\
-    }{}
+  \iftoggle{verbose}{
+    \ent{Skills} &
+    \foreach \s in {Earth,Air,Fire,Water,Fate,Projectiles,Combat,Brawl,Academics,Athletics,Caving,Crafts,Deceit,Empathy,Medicine,Performance,Larceny,Seafaring,Tactics,Vigilance,Wyldcrafting}
+      {\ifnum\value{\s}>0 \s~\arabic{\s}, \fi}
+      \skills \\
+  }{}
+
+  \ifdefempty{\showKnacks}{}{
+    \ent{Knacks:} & \showKnacks \\
+  }
 
+%  \foreach \s in {Air,Earth,Fate,Fire,Water}%
+%    {\ifnum\value{\s}>0 \addtocounter{mp}{3}\fi}
+  \ifnum\value{mp}>0
+    \ent{Spheres:} &
+    \foreach \s in {Air,Earth,Fate,Fire,Water}%
+      {\ifnum\value{\s}>0 \s~\arabic{\s}, \fi}
+    \\
+  \fi
 
-    \ifdefempty{\showKnacks}{}{
-      \ent{Knacks:} & \showKnacks
-      \\
+	\iftoggle{mind}%
+    {%
+    \ifdefempty{\equipment}{}
+    {
+      \ent{Equipment} & \equipment \\
     }
+    }%
+    {}
 
-    \ifnum\value{mp}>0
-      \ent{Spheres:} &
-      \foreach \s in {Air,Earth,Fate,Fire,Water}%
-        {\ifnum\value{\s}>0 \s~\arabic{\s}, \fi}
-      \\
-    \fi
-
-    \iftoggle{mind}%
-      {%
-      \ifdefempty{\equipment}{}
-      {
-        \ent{Equipment} & \equipment \\
-      }
-      }%
-      {}
-
-    \ifdefempty{\abilities}{}%
-      {\ent{Abilities:} & \abilities}
-    \mods
+  \ifdefempty{\abilities}{}%
+    {\ent{Abilities:} & \abilities}
+	\mods
 
-  \end{tabularx}
+\end{tabularx}
 
 }
 
@@ -723,6 +719,7 @@
     }{}%
   \addtocounter{hp}{6}%
   \ifnum\value{mp}>0%
+    \addtocounter{mp}{\value{int}}%
     \setcounter{mpFree}{\value{mp}}
     \addtocounter{mpFree}{-\value{mpLocked}}%
   \fi%
diff --git a/test.tex b/test.tex
index a6885563..24c1b374 100644
--- a/test.tex
+++ b/test.tex
@@ -164,8 +164,14 @@ This section is non-verbose, so only basic stats are shown.
 
 \gnollshaman
 
+\shortSpells{fire1}
+
 \gnollshaman
 
+\shortSpells{fate1}
+
+\shortSpells{fate2}
+
 \end{multicols}
 
 \section{Forest Critters}
-- 
GitLab