From 78253368aee0621cb49a042ef619e4d0b570a7c9 Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Sun, 28 Jan 2024 01:37:04 +0100
Subject: [PATCH] stop talismans interfering with spell bonus

---
 magic.sty | 1 +
 stats.sty | 1 +
 2 files changed, 2 insertions(+)

diff --git a/magic.sty b/magic.sty
index 5d2bc813..1885aaf1 100644
--- a/magic.sty
+++ b/magic.sty
@@ -244,6 +244,7 @@
   \setcounter{Charisma}{0}%
   \calcSpell{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
   \setcounter{castingBonus}{\value{spellCost}}%
+  \setcounter{Charisma}{\value{attackXPtotal}}% Return Charisma to old value
 }
 
 \newcommand\explainTalisman{%
diff --git a/stats.sty b/stats.sty
index 819af6e3..d0666426 100644
--- a/stats.sty
+++ b/stats.sty
@@ -666,6 +666,7 @@
     {%
     \ifdefempty{\equipment}{}
     {
+      \setcounter{attackXPtotal}{\value{Charisma}}% Must store Charisma while talisman shows spells
       \ent{Equipment} & \equipment \\
     }
     }%
-- 
GitLab