Newer
Older
\ProvidesPackage{config/arms}
%%%%% Weapons
% Weapon entries do two things.
% When used in creatures, they raise stats.
% When used in the weapons chart, they display stats.
\newcommand\weapon[6][]{%
% The weapon's bonus to hit is equal to its length + weight / 2.
\setcounter{weaponBonus}{#3}%
\ifnum#5>0%
\addtocounter{weaponBonus}{#5}%
\fi%
\roundUp{weaponBonus}%
\setcounter{damage}{#4}%
\ifnum#5>0%
\addtocounter{damage}{#5}%
\fi%
\roundUp{damage}%
\setcounter{heft}{#3}%
\addtocounter{heft}{#5}%
\roundUp{heft}%
\ifnum\value{heft}<1%
\setcounter{heft}{1}%
\fi%
\setcounter{weight}{#5}%
\setcounter{cost}{#6}%
#1%
\iftoggle{creatureBox}{%
\addtocounter{att}{\value{weaponBonus}}%
}{%
#1%
#2 &%
\ifnum\value{weaponBonus}>0 +\fi%
\arabic{weaponBonus} &%
\ifnum\value{damage}>0 +\fi\arabic{damage}%
& \arabic{heft} &%
\arabic{weight}%
\iftoggle{examplecharacter}{}{% Example characters have all the weapon stats except cost, so we only need cost for the weapon charts in the core book.
\ifnum\value{cost}>200%
\divide\value{cost} by 50\addtocounter{cost}{0}%
\arabic{cost} sp%
\else%
\arabic{cost} cp%
\fi%
\fi%
}%
\\%
}%
% Shields work much like weapons, except that their Bonus is high, their initiative cost is low, but their attack is poor.
\newcommand\shield[3][]{
\setcounter{shieldBonus}{#3}
\addtocounter{shieldBonus}{2}
\setcounter{shieldWeight}{#3}
\setcounter{shieldInit}{#3}
{#2 shield (+\arabic{shieldBonus}/ \arabic{shieldInit})}{
#2 Shield &
+\arabic{shieldBonus} &
\arabic{shieldInit} &
\arabic{shieldWeight} &
\multiply\value{cost} by 8
\multiply\value{cost} by \value{shieldBonus}
\ifnum\value{cost}>200
\divide\value{cost} by 100
\arabic{cost} sp
\else
\arabic{cost} cp
\fi
\\
}%
% Use this 'weapon entry' command to place items in the weapons table, like this:
%\weapon{Name}%
%{Bonus}
%{Dam}
%{Wt.} + Init
%{Cost}
%{Knacks}
\newcommand{\boulder}{\weapon[\addtocounter{heft}{2}]{Boulder}{0}{0}{6}{0}}
\newcommand{\chair}{\weapon[\addtocounter{weaponBonus}{-1}]{Chair}{1}{0}{2}{250}}
\newcommand{\club}{\weapon[\addtocounter{damage}{-1}]{Club}{1}{0}{2}{8}}
\newcommand{\cudgel}{\weapon[\addtocounter{damage}{-1}]{Cudgel}{0}{0}{1}{6}}
\newcommand{\Dagger}{\weapon{Dagger}{0}{2}{-3}{70}}
\newcommand{\firepoker}{\weapon[\addtocounter{damage}{-1}]{Firepoker}{1}{0}{1}{90}}
\newcommand{\giantsword}{\weapon{Giant Sword}{3}{2}{4}{3200}}
\newcommand{\greataxe}{\weapon{Great Axe}{2}{2}{4}{1600}}
\newcommand{\greatsword}{\weapon{Greatsword}{2}{3}{3}{2200}}
\newcommand{\greatclub}{\weapon[\addtocounter{damage}{-1}]{Great Club}{4}{0}{5}{10}}
\newcommand{\javelin}{\weapon{Javelin}{2}{1}{0}{880}}
\newcommand{\knife}{\weapon{Knife}{0}{1}{-4}{50}}
\newcommand{\Log}{\weapon[\addtocounter{damage}{-3}]{Log}{-1}{0}{0}{2}}
\newcommand{\rapier}{\weapon{Rapier}{2}{3}{-1}{2500}}
\newcommand{\largerock}{\weapon[\addtocounter{weight}{3}]{Rock (large)}{0}{0}{3}{0}}
\newcommand{\longsword}{\weapon{Longsword}{2}{3}{1}{2200}}
\newcommand{\poleaxe}{\weapon{Poleaxe}{4}{1}{4}{2400}}
\newcommand{\quarterstaff}{\weapon{Quarterstaff}{4}{0}{1}{30}}
\newcommand{\rock}{\weapon[\addtocounter{heft}{1}]{Rock}{-1}{0}{1}{0}}
\newcommand{\shortsword}{\weapon{Shortsword}{1}{3}{0}{1500}}
\newcommand{\skillet}{\weapon[\addtocounter{heft}{1}]{Frying Pan}{1}{0}{1}{80}}
\newcommand{\spear}{\weapon{Spear}{4}{1}{1}{300}}
\newcommand{\stick}{\weapon{Stick}{1}{0}{-1}{1}}
\newcommand{\whip}{\weapon[\addtocounter{damage}{-1}]{Whip}{1}{0}{0}{30}}
\newcommand{\warhammer}{\weapon{Warhammer}{2}{0}{3}{30}}
\newcommand{\woodaxe}{\weapon[\addtocounter{heft}{1}]{Wood Axe}{2}{2}{2}{300}}
% SHIELDS
\newcommand{\longbow}{Longbow}
\newcommand{\bucklar}{\shield{Bucklar}{0}}
\newcommand{\roundshield}{\shield{Round}{1}}
\newcommand{\kiteshield}{\shield{Kite}{2}}
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
% ARMOUR
%% For perfect armour, stick \perfect Armour in the additional notes category of a \person (#9).
\newcommand{\perfectArmour}{\gdef\armourtype{(Perfect)}}
\newcommand{\partialelvish}{partial leather armour%
\ifnumcomp{\value{dr}}{>}{2}%
{\addtocounter{dr}{1}}%
{\divide\value{dr} by 2 \addtocounter{dr}{2}}%
}
\newcommand{\partialleather}{partial leather armour%
\ifnumcomp{\value{dr}}{>}{3}%
{\addtocounter{dr}{2}}%
{\divide\value{dr} by 2 \addtocounter{dr}{3}}%
}
\newcommand{\completeleather}{full leather armour\gdef\armourtype{C}%
\ifnumcomp{\value{dr}}{>}{3}%
{\addtocounter{dr}{2}}%
{\divide\value{dr} by 2 \addtocounter{dr}{3}}%
}
\newcommand{\partialchain}{partial chainmail%
\ifnumcomp{\value{dr}}{>}{4}%
{\addtocounter{dr}{2}}%
{\divide\value{dr} by 2 \addtocounter{dr}{4}}%
}
\newcommand{\completechain}{complete chain armour\gdef\armourtype{C}%
\ifnumcomp{\value{dr}}{>}{4}%
{\addtocounter{dr}{2}}%
{\divide\value{dr} by 2 \addtocounter{dr}{4}}%
}
\newcommand{\partialplate}{partial plate armour%
\ifnumcomp{\value{dr}}{>}{5}%
{\addtocounter{dr}{3}}%
{\divide\value{dr} by 2 \addtocounter{dr}{5}}%
}
\newcommand{\completeplate}{complete plate armour\gdef\armourtype{C}%
\ifnumcomp{\value{dr}}{>}{5}%
{\addtocounter{dr}{3}}%
{\divide\value{dr} by 2 \addtocounter{dr}{5}}%
}