Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Malin Freeborn
config
Commits
c09778ef
Unverified
Commit
c09778ef
authored
2 years ago
by
Malin Freeborn
Browse files
Options
Downloads
Patches
Plain Diff
show AP in derived stats
parent
c45fa0cb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arms.sty
+9
-21
9 additions, 21 deletions
arms.sty
layout.sty
+7
-0
7 additions, 0 deletions
layout.sty
stats.sty
+25
-5
25 additions, 5 deletions
stats.sty
with
41 additions
and
26 deletions
arms.sty
+
9
−
21
View file @
c09778ef
\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
{
hef
t
}{
4
}
\ifnum
#5>
#3
\
addto
counter
{
heft
}{
#5
}
\setcounter
{
weigh
t
}{
#5
}
\ifnum
#5>
0
\
set
counter
{
heft
}{
#5
}
\else
\
addto
counter
{
heft
}{
#3
}
\
set
counter
{
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
}}
...
...
This diff is collapsed.
Click to expand it.
layout.sty
+
7
−
0
View file @
c09778ef
...
...
@@ -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
}
%
...
...
This diff is collapsed.
Click to expand it.
stats.sty
+
25
−
5
View file @
c09778ef
...
...
@@ -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
,
}{}
%
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment