From f26d5b2d85c0f3e5f83ea88a7b673f4de264c03c Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Fri, 13 Jan 2023 17:00:06 +0100
Subject: [PATCH] create universal weapons command

---
 charts.tex | 144 +++++++++++++++--------------------------------------
 combat.tex |   4 +-
 config     |   2 +-
 3 files changed, 44 insertions(+), 106 deletions(-)

diff --git a/charts.tex b/charts.tex
index b807ddbf..d4aa362c 100644
--- a/charts.tex
+++ b/charts.tex
@@ -1,3 +1,5 @@
+\settoggle{chart}{true}
+
 \newcommand{\initiativechart}{
 
   \begin{nametable}[XX]{Initiative Costs}
@@ -50,145 +52,76 @@
 
 }
 
-% Use this 'weapon entry' command to place items in the weapons table, like this:
-%\weaponEntry{Name}%
-%{Bonus}
-%{Dam}
-%{Wt.} + Init
-%{Cost}
-%{Knacks}
-
-\newcounter{initiative}
-\newcounter{damage}
-\newcounter{cost}
-
-\newcommand\weaponEntry[5]{
-  \setcounter{initiative}{#4}
-  \addtocounter{initiative}{3}
-  % If the weight is better than the Damage, use the Weight *as* the Damage, then add 1.
-  \ifnum#3>#4
-    \setcounter{damage}{#3}
-  \else
-    \setcounter{damage}{#4}
-    \addtocounter{damage}{1}
-  \fi
-  \setcounter{cost}{#5}
-
-  #1 &
-  \ifnum#2>0 +\fi
-  #2 &
-  \ifnum#3>0 +\fi\arabic{damage}
-  & \arabic{initiative} &
-  Str. #4 &
-  \ifnum#5<1\else
-    \ifnum#5>200
-      \divide\value{cost} by 100
-      \arabic{cost} sp
-    \else
-      \arabic{cost} sp
-    \fi
-  \fi
-  \\
-}
-
 \newcommand{\weaponschart}{
-  \begin{boxtable}[Xccccc]
-
-  \textbf{Improvised Weapons} & \textbf{Bonus} & \textbf{Dam.} & \textbf{Initiative} & \textbf{Min. Str.} & Cost \\\hline
-
-  \weaponEntry{Boulder}{-2}{0}{6}{0}
-
-  \weaponEntry{Cast Iron Skillet}{1}{0}{1}{80}
-
-  \weaponEntry{Chair}{0}{0}{1}{0}
-
-  \weaponEntry{Club}{1}{0}{2}{0}
-
-  \weaponEntry{Cudgel}{0}{0}{1}{0}
-
-  \weaponEntry{Dagger}{1}{1}{0}{0}
-
-  \weaponEntry{Firepoker}{1}{2}{1}{0}
-
-  \weaponEntry{Javelin}{2}{2}{1}{880}
-
-  \weaponEntry{Knife}{0}{2}{-2}{50}
-
-  \weaponEntry{Log}{-1}{0}{0}{0}
+  \begin{nametable}[XXXXXX]{Improvised Weapons}
 
-  \weaponEntry{Rock}{-1}{0}{1}{0}
+  \textbf{Name} & \textbf{Bonus} & \textbf{Dam.} & \textbf{Initiative} & \textbf{Min. Str.} & Cost \\\hline
 
-  \weaponEntry{Stick}{1}{0}{-1}{0}
+  \boulder
 
-  \end{boxtable}
-
-  \begin{boxtable}[XXXXXX]
+  \skillet
 
-  \textbf{Standard Weapons} & \textbf{Bonus} & \textbf{Dam.} & \textbf{Initiative} & \textbf{Min. Str.} & Cost \\\hline
+  \chair
 
-  \weaponEntry{Great Axe}{2}{1}{3}{1600}
+  \club
 
-  \weaponEntry{Great Sword}{1}{1}{3}{2200}
+  \cudgel
 
-  \weaponEntry{Long Sword}{3}{0}{4}{2200}
+  \firepoker
 
-  \weaponEntry{Maul}{1}{0}{4}{2200}
+  \knife
 
-  \weaponEntry{Rapier}{2}{2}{0}{1500}
+  \Log
 
-  \weaponEntry{Short Sword}{2}{2}{0}{1500}
+  \rock
 
-  \end{boxtable}
+  \stick
 
-  \begin{boxtable}[p{.20\textwidth}p{0.07\textwidth}rrrrX]
+  \woodaxe
 
-  \textbf{Medium Weapons} & \textbf{Dam.} & \textbf{Init.} & \textbf{Ev.} & \textbf{Wt.R} & Cost & \textbf{Knacks} \\\hline
-
-  Boulder & +4 & -1 & \ 0 & 6/8 & & Finishing Blow (page~\pageref{finishingblow}) \\
-
-  Cast Iron Skillet & +2 & \ -1 & \ +1 & -1/1 & & Adrenaline Surge (page~\pageref{adrenalinesurge}) \\
+  \end{nametable}
 
-  Chair & +1 & +1 & +1 & 1/ 3 & & \\
+  \begin{nametable}[XXXXXX]{M\^{e}l\'{e}e Weapons}
 
-  Club & +2 & +1 & +1 & 2/4 &  \\
+  \textbf{Name} & \textbf{Bonus} & \textbf{Dam.} & \textbf{Initiative} & \textbf{Min. Str.} & Cost \\\hline
 
-  Great Axe & +3 & +1 & +1 & 3/5 & 8 sp & \\
+  \Dagger
 
-  Great Sword & +2 & +1 & +2 & 3/5 & 8 sp & \\
+  \greataxe
 
-  Maul & +3 & \ 0 & \ 0 & 4/6 & 1 sp & \\
+  \greatsword
 
-  Large Rock & +2 & \ 0 & \ 0 & 4/6 & & \\
+  \javelin
 
-  Longsword & +1 & +1 & +3 & 1/3 & 9 sp & \\
+  \longsword
 
-  Shortsword & +1 & +1 & +2 & -1/1 & 6 sp & Furious Blows (page~\pageref{furiousblows}) \\
+  \maul
 
-  Spear & +1 & +1 & +2 & 0/2 & 3 sp & First Strike (page~\pageref{firststrike}) \\
+  \poleaxe
 
-  Quarterstaff & \ 0 & +1 & +2 & 0/2 & 2 sp & First Strike (page~\pageref{firststrike}) \\
+  \shortsword
 
-  Warhammer & +3 & 0 & +1 & 3/5 & 7 sp & Finishing Blow (page~\pageref{finishingblow}) \\
+  \spear
 
-  Whip & \ 0 & +2 & \ 0 & -1/ 1 & 1 cp & First Strike (page~\pageref{firststrike}) \\
+  \quarterstaff
 
-  Wood Axe & +2 & \ 0 & +1 & -1/1 & 1 sp & \\
+  \end{nametable}
 
-  \end{boxtable}
+  \begin{nametable}[XXXXXX]{Esoteric Weapons}
 
-  \begin{boxtable}[p{.20\textwidth}p{0.07\textwidth}rrrrX]
+  \textbf{Name} & \textbf{Bonus} & \textbf{Dam.} & \textbf{Initiative} & \textbf{Min. Str.} & Cost \\\hline
 
-  \textbf{Heavy Weapons} & \textbf{Dam.} & \textbf{Init.} & \textbf{Ev.} & \textbf{Wt.R} & Cost & \textbf{Knacks} \\\hline
+  \greatclub
 
-  Great Club & +4 & +1 & +1 & 5 & & \\
+  \giantsword
 
-  Giant Boulder & +5 & 0 & \ -2 & 8 & & Finishing Blow (page~\pageref{finishingblow}) \\
+  \rapier
 
-  Giant Sword & +3 & +1 & +2 & 5 & 15 sp &  \\
+  \warhammer
 
-  Poleax & +3 & +1 & +1 & 5 & 6 sp & First Strike (page~\pageref{firststrike}) \\
+  \whip
 
-  \end{boxtable}
+  \end{nametable}
 
   \begin{boxtable}[p{.20\textwidth}p{0.07\textwidth}rrrrX]
 
@@ -332,3 +265,6 @@
   \end{boxtable}
 
 }
+
+\settoggle{chart}{false}
+
diff --git a/combat.tex b/combat.tex
index 25022efb..00a834fd 100644
--- a/combat.tex
+++ b/combat.tex
@@ -287,6 +287,7 @@ See Chapter \ref{knacks} for a full list of knacks.
 
 \end{multicols}
 
+\settoggle{chart}{true}
 
 \iftoggle{verbose}{%
   \weaponschart
@@ -296,6 +297,8 @@ See Chapter \ref{knacks} for a full list of knacks.
   \end{footnotesize}
 }
 
+\settoggle{chart}{false}
+
 \label{weaponschart}
 \index{Weapons}
 
@@ -309,7 +312,6 @@ Light Weapons are those with a \gls{weightrating} of -2 or less. People wield th
 \subsubsection{Medium Weapons}
 \index{Combat!Medium Weapons}
 
-Swords, axes and all the regular weapons of warfare require a full 6 Initiative points to be swung.
 They grant excellent Combat Bonuses, often increasing the effects of all three Attributes.
 These weapons are the standard weapons which most people will be using throughout the campaign -- they cover the \gls{weightrating} from -1 to 4.
 
diff --git a/config b/config
index f8743953..44f0f7bc 160000
--- a/config
+++ b/config
@@ -1 +1 @@
-Subproject commit f8743953ae72fc077953469a68f6446dbd88e99f
+Subproject commit 44f0f7bc429bacbdc1c183183e166bd0d2f6ac61
-- 
GitLab