From 580a73793a5b06c26e5f73e3dd0ca9e6f3c2c167 Mon Sep 17 00:00:00 2001 From: Malin Freeborn <malinfreeborn@posteo.net> Date: Mon, 28 Aug 2023 13:45:07 +0200 Subject: [PATCH] repace bestiarychapter toggle with genExample --- CS.tex | 2 +- docs.tex | 4 ++-- layout.sty | 2 +- loot.sty | 10 +++++----- monsters.sty | 2 +- resources.tex | 2 +- stats.sty | 8 ++++---- test.tex | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CS.tex b/CS.tex index 1afe3258..638bb86d 100644 --- a/CS.tex +++ b/CS.tex @@ -290,7 +290,7 @@ circle label/.style = { \glsentryshortpl{cp} - \iftoggle{bestiarychapter}{\arabic{gold} }{\weeline} + \iftoggle{genExamples}{\arabic{gold} }{\weeline} \glsentryshortpl{sp}\weeline \glsentryshortpl{gp}\weeline } diff --git a/docs.tex b/docs.tex index f2383135..f863be4f 100644 --- a/docs.tex +++ b/docs.tex @@ -82,7 +82,7 @@ Individual characters can be created by using the \verb"\npc" command then the \ \subsubsection{Bestiary with monstrous ghouls, and ghoulish monsters} Statblocks in a bestiary chapter (or any space for examples). -You can set an example chapter by writing \verb"\settoggle{bestiarychapter}{true}" +You can set an example chapter by writing \verb"\settoggle{genExamples}{true}" Then the \verb"\humansoldier" command turns from this: @@ -90,7 +90,7 @@ Then the \verb"\humansoldier" command turns from this: \ldots into this: -%\settoggle{bestiarychapter}{true} +%\settoggle{genExamples}{true} \humansoldier diff --git a/layout.sty b/layout.sty index ee4c5155..cb244513 100644 --- a/layout.sty +++ b/layout.sty @@ -634,7 +634,7 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) \newcounter{track} \setcounter{track}{18} - \newcommand{\tracker}{\center\noindent\iftoggle{examplecharacter}{\iftoggle{bestiarychapter}{}{\ifnum\value{track}=\value{Speed}$\Rightarrow$ \fi}}{}\arabic{track}\addtocounter{track}{-1}\vspace{.54cm} + \newcommand{\tracker}{\center\noindent\iftoggle{examplecharacter}{\iftoggle{genExamples}{}{\ifnum\value{track}=\value{Speed}$\Rightarrow$ \fi}}{}\arabic{track}\addtocounter{track}{-1}\vspace{.54cm} } diff --git a/loot.sty b/loot.sty index b480daa8..8c975779 100644 --- a/loot.sty +++ b/loot.sty @@ -5,7 +5,7 @@ %%%%%%%%%%%%%%%%%%%% LOOT %%%%%%%%%%%%%%%%%%%% \newcommand{\lootSmall}{% - \iftoggle{bestiarychapter}{% + \iftoggle{genExamples}{% \ifodd\value{r2}% $3D6$\else$2D6$% \fi \glspl{cp}}{% @@ -13,7 +13,7 @@ } \newcommand{\lootMedium}{% - \iftoggle{bestiarychapter}{% + \iftoggle{genExamples}{% \ifodd\value{r2}% $3D6$% \else% @@ -28,7 +28,7 @@ } \newcommand{\lootBig}{% -\iftoggle{bestiarychapter}{% +\iftoggle{genExamples}{% \ifodd\thepage $3D6-2$\else$2D6+4$\fi \glspl{gp}}{% \randomdozen\addtocounter{r12}{8}\arabic{r12}\glspl{gp}% }% @@ -38,7 +38,7 @@ \ifnum\value{noAppearing}>1% Mana stone holding 2 MP% \else% - \iftoggle{bestiarychapter}{}% + \iftoggle{genExamples}{}% {% \stepcounter{treasure}% \ifnum\value{treasure}>10\setcounter{treasure}{0}\fi% @@ -73,7 +73,7 @@ \newcommand{\lootJewellery}{% -\iftoggle{bestiarychapter}{jewellery worth \ifodd\value{r2}$3D6$sp\else$1D6+2$\glspl{gp}\fi}% +\iftoggle{genExamples}{jewellery worth \ifodd\value{r2}$3D6$sp\else$1D6+2$\glspl{gp}\fi}% {% \stepcounter{treasure}% \ifnum\value{treasure}>10\setcounter{treasure}{0}\fi% diff --git a/monsters.sty b/monsters.sty index d1af797b..ed16e57b 100644 --- a/monsters.sty +++ b/monsters.sty @@ -1380,7 +1380,7 @@ Academics~1, \ifodd\value{page} Crafts~\arabic{r2}, \else \fi Deceit~1, \ifodd\v \else% \greatsword, dagger% \fi% -\iftoggle{bestiarychapter}{}% +\iftoggle{genExamples}{}% {\ifodd\thepage, \lootJewellery\fi}% }% EQUIPMENT {} diff --git a/resources.tex b/resources.tex index 4cb4a2f0..541cdf32 100644 --- a/resources.tex +++ b/resources.tex @@ -6,7 +6,7 @@ \externalReferent{aif} \settoggle{verbose}{true} -\settoggle{bestiarychapter}{false} +\settoggle{genExamples}{false} \settoggle{examplecharacter}{false} \begin{document} diff --git a/stats.sty b/stats.sty index 7bcc837e..60a6ebfe 100644 --- a/stats.sty +++ b/stats.sty @@ -1,8 +1,8 @@ \ProvidesPackage{config/stats} %%%%%%%%%%%%%%%%%%%% Introduction -\newtoggle{bestiarychapter} -\settoggle{bestiarychapter}{false} +\newtoggle{genExamples} +\settoggle{genExamples}{false} \newtoggle{allyCharacter} \settoggle{allyCharacter}{false} @@ -718,7 +718,7 @@ \setcounter{mpFree}{\value{mp}} \addtocounter{mpFree}{-\value{mpLocked}}% \fi% - \iftoggle{bestiarychapter}{% + \iftoggle{genExamples}{% HP~\arabic{hp}, \ifnum\value{mp}>0% MP @@ -795,7 +795,7 @@ \iftoggle{mind}% {\addtocounter{fp}{\value{Charisma}}% \ifnum\value{fp}>2\ignorespaces, \arabic{fp}~FP % - \iftoggle{bestiarychapter}% + \iftoggle{genExamples}% {}% {\Repeat{\value{fp}}{\sqn}}% \fi diff --git a/test.tex b/test.tex index cc4591c5..32b9a8ff 100644 --- a/test.tex +++ b/test.tex @@ -342,7 +342,7 @@ This section is non-verbose, so only basic stats are shown. \begin{multicols}{2} -\settoggle{bestiarychapter}{true} +\settoggle{genExamples}{true} When using a bestiary chapter, the stats appear as dice rolls, rather than fixed amounts. @@ -478,7 +478,7 @@ When using a bestiary chapter, the stats appear as dice rolls, rather than fixed \end{multicols} -\settoggle{bestiarychapter}{false} +\settoggle{genExamples}{false} \chapter{Lots of Text} -- GitLab