Combat rules (executable + gsdata_<lang>.dat)
Decoded from the executable’s battle code
(addresses only in the branch REPORT) and the
tables it reads in gsdata. Ticks are 1/30 s.
godot/scripts/combat/pd_rules.gd
(PdRules) holds the engine constants;
skilldata.py writes the data part
to rules.json and a
reaction object per attack in
skills.json.
Player status. Each player has an integer health (current, max and start, all set from the mode table), an integer aura level (the HUD’s second number) and a float aura (the first number, floored) that is always ≤ the level.
Mode table (gsdata 0x33040, 12 × 16
bytes, s32 each). Indexed by the match
mode: health,
aura_start (the level a player
starts at; the aura starts full at it, and it is
also the level’s lower bound),
aura_max (the level’s upper bound),
minutes (time limit = minutes ×
1800 ticks). One more entry at 0x33100 overrides
health/aura for the first player in one mode.
Most modes have the playtester-confirmed 20
health; one has double health and a higher start
level (the “heavy” variant); others are
tutorial/special modes. The versus lobby’s
game rule number is the mode
number (docs 11-10, “Versus
options, stage list, teams and start
spots”).
Aura regeneration (every
tick, while the character allows it): aura += f
× max(0.25, 1.25 − aura / 10) / 30 × (100 + s) /
100, then clamped to the level. s is a status
percent (not modelled). f depends on the
arsenal: the game takes the arsenal’s
school capacity (deck record +0x50, 1..3: how
many schools the arsenal may hold, not how many
it uses; corrected docs 11-10, see
“Arsenal rules”) and takes f from three floats
at gsdata 0x33034 (one, two, three schools). The
default f is 1. Per player the factor sits in a
float array at 0x1404bc958 (indexed by the
player number at player+0x4), set
when the battle is set up (0x140128398 for the
first player, 0x1401283fd for the second): f =
gsdata[0x33034 + 4(n − 1)] when the arsenal’s
school count n (a u16 at +0x50 of
its deck record) is 1..3, else 1.0; a reset
fills it with 1.0 (0x14012b73f). The regen tick
is 0x14024de20; its constants 10, 1.25, 0.25, 30
and 100 are floats at 0x1402f7f7c, 0x1402f7ddc,
0x1402f7d0c, 0x1402f7fd8, 0x1402f8060. The rate
falls as the aura rises (1.25 − aura/10 per
second at f = 1, never below 0.25), not with
time.
Cost check and payment. A card can be used when its current cost ≤ aura (as a float); the current cost is 0x28 + 0x2C × times used, halved or doubled by a status. A negative 0x28 means “all aura” (needs ≥ 1, spends everything, the amount becomes the card’s power). Paying also takes the health cost 0x2E (−1 = half the current health, rounded up) and lowers the level by 0x2A (some cards spend levels; the aura is re-clamped). An aura capsule’s card raises the level by 1 (the playtester’s observation; the level change routine is the same).
Damage. A cast computes the
card’s power once, at the release: for skill set
0,
formula[0x56](record) + STR status + 0x5A × times used,
never below 0. Formula 0 is the plain 0x58;
other formulas scale 0x58 by game state (e.g.
the health difference of the two players, or a
random factor); 0x56 = 31 means no damage. The
shot carries this number and a hit subtracts it
from the target’s health as is (no defense or
back-hit multiplier in the hit routine; guards
and statuses can cancel a hit before it lands).
For skill set 2 (defense) the power is 0x5A +
0x5C × times used. Health 0 = out (a respawn
routine exists for some modes, with 3 s of
invulnerability).
Hit reactions. Each landed hit adds its damage to the target’s running sum, which clears 90 ticks (3 s) after the last hit. With the target standing, the sum (this hit included) picks one of the skill’s reaction actions: < 3 → 0x6E (light), < 5 → 0x70 (medium), else 0x72 (heavy); 0x74 is an extra action when the hit’s effect fired. An airborne target uses 0x76, or a fixed default action when 0 (all records have 0). The ids index the action table (see “Player movement”); the reaction types are:
| type | reaction |
|---|---|
| 0 | plays one animation (0x52) for its length |
| 1 | knockdown: fall animation 0x52, then the down pose 0x54 |
| 2 | stagger: one of four animations 0x52..0x58 by the hit direction relative to the facing |
| 5 | thrown: a hop at 0x4E (speed, raw / 10.8 units per tick) and 0x50 (degrees), as the evade hop |
| 11 | flinch: animation 0x52 held for 0x54 ticks |
After a knockdown the character lies for 30 ticks, then plays its get-up animation and is invulnerable for the get-up’s length + 45 ticks. The most common set among attacks is flinch → directional stagger → thrown, so two quick weak hits flinch, a third staggers and 5+ damage within 3 s throws the target. (The evade hop the movement branch uses is the generic “thrown” record.)
Reaction states in detail
(branch hitreact; the dispatch and the per-state
tick handlers of the character code). The
dispatch gets the action id, an optional
follow-up action and an angle: the direction
from the target to the hitting shot,
atan2(dx, dz) in 15-bit units
(0x8000 = 360°; a positive difference is a turn
to the right). d = that angle − the
target’s facing. A record with 0x00 ≠ 2 or type
0 with 0x52 = 0 does nothing. Every reaction
picks one state:
| type | animation (slots of the record, 0x52 = a0 … 0x5C = a5) | state, length |
|---|---|---|
| 0 | a0 | timed, a0’s length |
| 1 | a0, then a1 queued (the lying pose) | fall for a0’s length, then down 30 ticks |
| 2 | a[q], q = ((d + 45°) / 90°) & 3: front, right, back, left | timed, its length |
| 3 | a0 if |d| < 90° (from the front) else a1 | timed, its length |
| 4 | quarter q picks a group of four shorts at 0x52 + 8q, its second the animation | thrown |
| 5 | |d| < 90°: a1, else a5 | thrown |
| 6 | a1 | thrown |
| 7 | a0 then lying slot 60 when the playing animation is a back fall (below), else a2 then 62 | down 30 ticks |
| 8 | a0 from frame a2 to a3 | a2 + 1 + a1 ticks, then the animation’s rest |
| 10 | a0, then a1 queued | timed, both lengths |
| 11 | a0 looped (held), blended over a2 frames | timed, a1 ticks |
- Thrown (types 4–6): the launch as above, with the 0.12 units/tick² gravity. When the fall slot is 45–47 (falls on the back) the character turns to face the hit and flies backwards; for the others it turns away and flies forwards. On touching the floor the drop from the highest point picks the landing as for jumps: < 40 units, 40–80, > 80 → slots 52 / 51 / 50 after a back fall, 55 / 54 / 53 after the others; the lying loop follows (60 or 62, chosen per landing slot by the character table’s lying flags: “Character table”, “Lying pose”). On the floor the horizontal speed is multiplied by 0.85 per tick and set to 0 below 0.02 units/tick. After 60 ticks on the floor (and once the lying loop plays) the down state ends at once. Only a thrown landing costs health (0 / 1 / 2 by drop height, “Stage attack bodies and landings”). A thrown body whose height hasn’t changed by more than 0.5 units for 90 ticks counts as landed (caught on something).
- Down → get-up: when the down timer is out and the playing animation is a lying pose (60 or 62), the get-up plays (61 from 60, 63 from 62), the state lasts its length − 1 ticks and the invulnerability timer is set to its length + 45. With no health left the down state goes to the dead state for 90 ticks instead (no get-up).
- Back falls: slots 45–47, 50–52 and 58–60 count as “on the back” (type 7, landings).
- Death while standing: a character with no health in the normal standing state plays the fixed action 25 (a knockdown into the face-down lying pose), so a flinch that takes the last health ends in a collapse, then the dead state.
- The pit: the pit return (0x140251d80) sets the state through the state setter (0x140259d10: the previous state to + 0x10, the new one to + 4, its timer + 0xc to 0): standing with the idle animation when health is left, so a throw or knockdown stops there; with no health left the down state in lying pose 60, then the dead state.
- Follow-up: the dispatch’s second id (the skill’s “effect fired” action 0x74) runs when a timed reaction ends; otherwise the state returns to standing (idle of the movement mode) once the character is on the floor.
- Wall bounce while thrown: up to 3 bounces, 20 ticks apart: speed × 0.5, turned by the wall, animation 56 (then 57) for a back fall, else 58 (then 59). Not followed.
- Input: the states 0x0e..0x13 and the dead state run their own tick handlers, which read no input: no moves or casts until the state returns to standing.
- Root motion: the reaction animations carry the character’s ground movement in the root joint’s track (e.g. the front stagger moves ~12 units back over 20 frames, the right-hit one ~11 units to the left, the landings slide 1–2 m), while the locomotion loops keep the root in place (the code sets their speed). The exe routine that applies it was not located; the rebuild moves the body by the track during reactions (PLACEHOLDERS, INFERRED).
Capsules and the deck. At the match start the 30-card deck is shuffled (50 passes of 30 random swaps) and drawn in order. Each player has 3 capsule slots; all three hold the first cards at the start. A taken capsule’s slot gets the next card and reappears after 420 ticks (14 s) (+ a status bonus), fading in over 15 ticks; capsules on the field don’t expire. When all 30 cards are drawn no more capsules come. A capsule’s card can be swapped with a random undrawn card (an erase/special effect).
Players, teams and the end of a match. A match has up to 4 player slots. Each slot has a team number; players with the same number are allies (e.g. the “nearest downed ally” search matches it). A slot holds up to three status records; the slot is out when no present record has health > 0. Then its alive flag clears and a per-slot knockout tally goes up (sent to the other side in online play). The match runs as a phase machine. The battle phase counts the time limit down (minutes × 1800 ticks from the mode table; a custom match’s settings give the minutes instead, 0 = no limit). How the battle ends and who wins: “Match flow” below.
Not decoded: the 52 hit effects (0x62) beyond their dispatch; which hits a downed target takes (0x78 flags); where capsules spawn (a per-stage point list chosen at random). The 3-copy arsenal rule is in the arsenal editor (“Arsenal rules”); the heavy mode is game rule 4. The end of a match, the time-out result and the phases: “Match flow” below.