Skip to content
Snippets Groups Projects
Unverified Commit c09778ef authored by Malin Freeborn's avatar Malin Freeborn
Browse files

show AP in derived stats

parent c45fa0cb
Branches
No related tags found
No related merge requests found
\ProvidesPackage{config/arms}
%%%%% Weapons
\newcounter{initiative}
\newcounter{weight}
\newcounter{damage}
\newcounter{shieldBonus}
\newcounter{shieldWeight}
\newcounter{shieldInit}
\newcounter{cost}
\newcounter{heft}% used to see how many Init points to swing a weapon
% Weapon entries do two things.
% When used in creatures, they raise stats.
% When used in the weapons chart, they display stats.
\newcommand\weapon[6][]{
\ifnum#5>0
\setcounter{initiative}{#5}
\addtocounter{initiative}{1}
\else
\setcounter{initiative}{1}
\fi
% If the weight is better than the Damage, use the Weight *as* the Damage, then add 1.
\setcounter{heft}{4}
\ifnum#5>#3
\addtocounter{heft}{#5}
\setcounter{weight}{#5}
\ifnum#5>0
\setcounter{heft}{#5}
\else
\addtocounter{heft}{#3}
\setcounter{heft}{1}
\fi
\setcounter{cost}{#3}
\divide\value{cost} by 2
\addtocounter{heft}{\value{cost}}
\ifnum#4>#5
\setcounter{damage}{#4}
\else
......@@ -38,7 +26,7 @@
#1
\iftoggle{bling}{
\addtocounter{att}{#3}
#2
#2\ignorespaces%
}{
#2 &
\ifnum#3>0 +\fi
......@@ -116,7 +104,7 @@
\newcommand{\poleaxe}{\weapon{Pole Axe}{4}{1}{4}{2400}}
\newcommand{\quarterstaff}{\weapon[\addtocounter{damage}{-1}]{Quarterstaff}{3}{0}{2}{30}}
\newcommand{\rock}{\weapon{Rock}{-1}{0}{1}{0}}
\newcommand{\shortsword}{\weapon{Short Sword}{1}{2}{1}{1500}}
\newcommand{\shortsword}{\weapon{Short Sword}{1}{2}{0}{1500}}
\newcommand{\skillet}{\weapon{Frying Pan}{1}{0}{1}{80}}
\newcommand{\spear}{\weapon{Spear}{3}{1}{1}{300}}
\newcommand{\stick}{\weapon{Stick}{1}{0}{-1}{1}}
......
......@@ -172,6 +172,13 @@ bookmarks=true]%
\expandafter\@Repeat\expandafter{\the\numexpr #1\relax}%
}
\newcommand\roundUp[1]{
\ifodd\value{#1}
\stepcounter{#1}
\fi
\divide\value{#1} by 2
}
\def\@Repeat#1{%
\ifnum#1>0
\expandafter\@@Repeat\expandafter{\the\numexpr #1-1\expandafter\relax\expandafter}%
......
......@@ -127,6 +127,18 @@
\newcounter{attackXPtotal}
\newcounter{defenceXPtotal} %rem
\newcounter{initiative}
\newcounter{weight}
\newcounter{damage}
\newcounter{shieldBonus}
\newcounter{shieldWeight}
\newcounter{shieldInit}
\newcounter{cost}
\newcounter{heft}% used to see how many AP points to swing a weapon
\newcounter{encumbrance}
\setcounter{encumbrance}{0}
% _
% ___ ___ _ __ ___ _ __ ___ __ _ _ __ __| |___
% / __/ _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` / __|
......@@ -272,6 +284,7 @@
\setcounter{wts}{#4}
\setcounter{dr}{#5}
\setcounter{att}{#6}
\setcounter{encumbrance}{0}
\renewcommand{\skills}{#7}
\renewcommand{\abilities}{#8}
\renewcommand{\mods}{#9}
......@@ -309,7 +322,7 @@
\newcommand{\clean}{
\setcounter{fp}{5}
\setcounter{sp}{0}
\setcounter{heft}{4}
\setcounter{heft}{1}
\setcounter{damage}{0}
\setcounter{knacks}{0}
\renewcommand{\armourtype}{N}
......@@ -388,8 +401,8 @@
\weaponknacktwo
\iftoggle{examplecharacter}{}{
\addtocounter{att}{8}
\addtocounter{attb}{8}
\addtocounter{att}{7}
\addtocounter{attb}{7}
}
\vspace{.1cm}
......@@ -421,9 +434,16 @@
\addtocounter{att}{\value{dex}}
\addtocounter{attb}{\value{dexb}}
\addtocounter{spd}{3}
\addtocounter{spdb}{3}
\ifnum\value{weight}>\value{str}% now to compute encumbrance
\addtocounter{spd}{\value{weight}}
\addtocounter{spdb}{\value{weight}}
\addtocounter{spd}{-\value{str}}
\addtocounter{spdb}{-\value{str}}
\fi
\noindent Attack \arabic{att}\ifnumcomp{\value{att}}{=}{\value{attb}}{}{ (\arabic{attb})},
Initiative \arabic{spd}\ifnumcomp{\value{spd}}{=}{\value{spdb}}{}{ (\arabic{spdb})},
Heft \arabic{heft},
AP \arabic{spd}\ifnumcomp{\value{spd}}{=}{\value{spdb}}{}{ (\arabic{spdb})}\ifnumcomp{\value{heft}}{>}{1}{: \arabic{heft}}{},
\addtocounter{damage}{\value{str}}
\mbox{Damage \calculatedamage{\value{damage}}\ifnumcomp{\value{str}}{=}{\value{strb}}{}{\addtocounter{damage}{\value{strb}}\addtocounter{damage}{-\value{str}} (\calculatedamage{\value{damage}})},}
\ifnumcomp{\value{dr}}{>}{0}{DR \arabic{dr}~\armourtype, }{}%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment