From 2e03ebfa01d2a503eef4af2eba42e16fa5ea5caf Mon Sep 17 00:00:00 2001 From: Malin Freeborn <malinfreeborn@posteo.net> Date: Thu, 9 Nov 2023 22:00:45 +0100 Subject: [PATCH] do not add talismans to spell index --- magic.sty | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/magic.sty b/magic.sty index 5e2b3b07..9543f0a2 100644 --- a/magic.sty +++ b/magic.sty @@ -60,6 +60,8 @@ \newtoggle{fullSpells} \settoggle{fullSpells}{true} +\newtoggle{talisman} + \settoggle{talisman}{false} \newtoggle{insubstantial} \settoggle{insubstantial}{false} \newtoggle{distant} @@ -108,7 +110,9 @@ \foreach \x in {1,...,\arabic{spellCost}}% {\multiply\value{spellTargets} by 10\addtocounter{spellTargets}{0}}% }{}% - \index[spells]{\textbf{#1} Cost: \arabic{spellCost}, \spellEnhancements\ \spellAction~\spellSphere, Range: \spellRange, Targets: \arabic{spellTargets}, Resisted by: \detokenize{#5}, \spellSum} + \iftoggle{talisman}{}{% + \index[spells]{\textbf{#1} Cost: \arabic{spellCost}, \spellEnhancements\ \spellAction~\spellSphere, Range: \spellRange, Targets: \arabic{spellTargets}, Resisted by: \detokenize{#5}, \spellSum} + } } \newcommand\fullSpell{% @@ -191,8 +195,10 @@ } \newcommand\talisman[7]{% + \toggletrue{talisman} \calcSpell{#1}{#2}{#3}{#4}{#5}{#6}{#7}% \index{Talismans!#1} \showTalisman + \togglefalse{talisman} } -- GitLab