From fd882806912664e05ce46d45cd956b272ad8c220 Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Wed, 10 Jan 2024 09:12:49 +0100
Subject: [PATCH] allow wounds on statblocks

---
 stats.sty | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/stats.sty b/stats.sty
index 0393028e..1dd6b318 100644
--- a/stats.sty
+++ b/stats.sty
@@ -103,10 +103,13 @@
   \fi%
 }
 
-\newcommand\boxStat[2][0]{%
-  \addtocounter{#2}{-#1}%
-  \Repeat{#1}{\CheckedBox}%
-  \Repeat{\value{#2}}{\Square}%
+\newcounter{wounds}
+\setcounter{wounds}{0}
+
+\newcommand\boxStat[1]{%
+  \addtocounter{#1}{-\value{wounds}}%
+  \Repeat{\value{wounds}}{\CheckedBox}%
+  \Repeat{\value{#1}}{\Square}%
 }
 
 \newcommand\HPboxes{
@@ -494,6 +497,7 @@
 	{}
   \settoggle{creatureBox}{false}
   \setcounter{noAppearing}{1}
+  \setcounter{wounds}{0}
   \renewcommand\abilities{}
   \afterparnoindent
 }
@@ -569,6 +573,7 @@
 
   \settoggle{creatureBox}{false}
   \renewcommand\abilities{}
+  \setcounter{wounds}{0}
   \afterparnoindent
 }
 
-- 
GitLab