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.
%
% Use this 'weapon entry' command to place items in the weapons table, like this:
%\weapon[optional arguments]{Name}%
%{Bonus}
%{Dam}
%
% The AP cost ('heft') = ( Att + Dam ) / 2
% The Weight Rating = ( Att + Dam ) - 3
\newcounter{covering}
\newcounter{armourDR}
\newcommand\weapon[4][0]{%
\renewcommand\weaponName{#2}%
\setcounter{weaponWeight}{#3}%
\ifnum#3<0%
\multiply\value{weaponWeight} by -1%
\ifnum#4>0%
\addtocounter{weaponWeight}{#4}%
\roundUp{weaponWeight}%
\addtocounter{weaponWeight}{#1}%
\setcounter{heft}{\value{weaponWeight}}%
%% Use this to show weapons in tables.
%% Remember to close it with '\\' after.
%% It remains unterminated so you can add Costs.
\newcommand\showWeapon[1]{%
#1 \weaponName & \absNum{weaponBonus} & \absNum{weaponDamage} & \ifnum\value{weaponWeight}<1$\frac{1}{3}$\else\arabic{weaponWeight}\fi
\newcommand\rangedWeapon[5][1]{%
#2 %
\addtocounter{equipmentWeight}{#1}%
\setTN[#3]{Dexterity}{Projectiles}%
(\glsentrytext{tn}~\arabic{tn}, \dmg{#4}, %
\ifnum#5>10% Indicate a crossbow with a VERY high reload time.
\setcounter{encnum}{#5}% Reload time is set to, e.g. '15' (meaning '5').
\addtocounter{encnum}{-10}% Let's make 15 --> 5
\addtocounter{encnum}{#1}% Weight adds to AP.
reload: \arabic{encnum}~\glsfmtplural{round}%
\else%
\glsfmtplural{ap}~Cost:~{#5}%
\fi)%
}
\newcommand{\rock}{%
\rangedWeapon[2]{crossbow}%
{2}% Att
{0}% Dam
{15}% AP Cost
% RANGED WEAPONS
\newcommand{\longbow}{%
\set{encnum}{Strength}%
\addtocounter{encnum}{2}%
\rangedWeapon[1]{longbow}%
{\arabic{Strength}}% Att
{Strength}% Dam
{\arabic{encnum}}% AP Cost
}
\setcounter{armourDR}{#3}%
\setcounter{covering}{#4}%
\setcounter{armourWeight}{#4}%
\addtocounter{armourWeight}{#3}%
\addtocounter{armourWeight}{1}%
\divide\value{armourWeight} by 3%
\addtocounter{armourWeight}{0}%
#1 \expandafter\MakeUppercase\armourName & \arabic{armourDR} & \arabic{covering} & \arabic{armourWeight}
\newcommand{\boulder}{\weapon{Boulder}{-3}{5}}
\newcommand{\chair}{\weapon{Chair}{2}{1}}
\newcommand{\club}{\weapon{Club}{1}{1}}
\newcommand{\cudgel}{\weapon{Cudgel}{0}{0}}
\newcommand{\Dagger}{\weapon[-1]{Dagger}{0}{2}}
\newcommand{\firepoker}{\weapon{Firepoker}{1}{0}}
\newcommand{\giantsword}{\weapon{Giant Sword}{4}{3}}
\newcommand{\greataxe}{\weapon{Great Axe}{2}{3}}
\newcommand{\greatsword}{\weapon{Greatsword}{3}{3}}
\newcommand{\greatclub}{\weapon{Great Club}{3}{4}}
\newcommand{\javelin}{\weapon{Javelin}{2}{1}}
\newcommand{\knife}{\weapon[-1]{Knife}{0}{1}}
\newcommand{\Log}{\weapon{Log}{1}{0}}
\newcommand{\rapier}{\weapon{Rapier}{1}{1}}
\newcommand{\largerock}{\weapon{Rock (large)}{-1}{2}}
\newcommand{\longsword}{\weapon{Longsword}{2}{2}}
\newcommand{\maul}{\weapon{Maul}{1}{3}}
\newcommand{\quarterstaff}{\weapon{Quarterstaff}{3}{0}}
\newcommand{\scythe}{\weapon[1]{Scythe}{-2}{2}}
\newcommand{\shortsword}{\weapon{Shortsword}{1}{1}}
\newcommand{\skillet}{\weapon[1]{Frying Pan}{1}{2}}
\newcommand{\glaive}{\weapon{Glaive}{3}{2}}
\newcommand{\warhammer}{\weapon{Warhammer}{1}{4}}
\newcommand{\woodaxe}{\weapon{Wood Axe}{1}{2}}
\newcommand{\crapLongsword}{\weapon[1]{Inferior longsword}{2}{2}}
\newcommand{\crapRapier}{\weapon[1]{Shoddy rapier}{1}{1}}
\newcommand{\crapGlaive}{\weapon[1]{Unbalanced glaive}{3}{2}}
\newcommand{\crapBuckler}{\weapon[1]{Shoddy buckler}{2}{-4}}
\newcommand{\buckler}{\weapon{Buckler}{2}{-4}}
\newcommand{\roundshield}{\weapon{Round Shield}{3}{-2}}
\newcommand{\kiteshield}{\weapon{Kite Shield}{4}{-4}}
%% For perfect armour, stick \perfect Armour in the additional notes category of a \person (#9).
\newcommand{\perfectArmour}{\setcounter{covering}{8}}
\armour[\addtocounter{armourWeight}{-1}]{Elvish Ceramic armour}{2}{3}%
\newcommand{\partialpadded}{%
\armour[\addtocounter{armourWeight}{1}]{padded armour}{3}{3}%
}