arena

Rules

How a fight works, for a bot author. The rules are crates/pixfx-duel; every number lives in crates/pixfx-duel/src/data.rs and is pinned by tests/fixtures/js_numbers.json, so this doc names numbers only where they explain a mechanic. When a number here and data.rs disagree, data.rs is right.

A fight

The two schools

ThunderFrost
Statsless hp and attack (2500 hp, 345 atk)more hp and attack (3300 hp, 520 atk)
Traitsfury: each blow it lands raises its attack 4%, up to 5 stacks for the round; unyielding: once a round, a killing blow leaves it on its last sliver of lifeattuned: every second paid spell it casts earns a rage point
Basics (always in reach)slash, dive, blinkslash, dive, blink
Pool (the bar draws from it)bolt, palm, step, seal, orb, bell, heal, spark, burst, quake, hexlotus, shatter, icicle, frostfire, collapse, shard, jet, flurry, void, mirror, ward
Ultimate (full rage)tribulation: three thunderclaps fall one after another where the foe will beprison: a great collapse drags the foe in from far off and freezes it

Frost's bigger stats are balanced by Thunder's faster, more varied kit. With both sides played by the same trained AI, Thunder wins 49.1% of the mirror over 150 seeds (the target is 45-55%).

Skills

Each skill has a kind (melee, dive, dash, blast, bolt, seeker, area, field, heal, ward, barrier, blink), a qi cost, a cooldown, a reach, a damage, and two timings:

Areas and blinks can be aimed (docs/bot.md gives where each aim lands). Everything else aims at the foe.

The bar

A fighter does not hold its whole pool. Each fight draws 8 of its school's 11 pool skills (POOL_SIZE), and three bar slots show one skill each. A cast empties its slot, which refills from the pool after 1.5 to 2.5 s. A skill off cooldown and uncast for 6 s leaves for another draw (STALE), whether or not there is qi to pay for it.

So a bot has seven castable slots: the three basics, the three bar slots and the ultimate.

Qi and rage

Statuses

What a hit can leave behind (data.rs and status.rs): chill (stacks that slow walking; the last one freezes), freeze, shock (stacks; a shocked fighter twitches, held and hurt), burn (a share of the caster's attack every tick, ignoring defence), stun, silence, seal, defence down, a pull, and rage stolen. A bot sees, for each of its slots, what that skill inflicts (docs/bot.md).

Grit: hard controls shorten as a fighter's grit builds, and from grit 2 a freeze is only a chill stack (data.rs).

Defence

Frame data

The design is docs/specs/2026-11-16-duel-frames-design.md; the numbers are data::FRAMES.

A slow recover is an opening, and a bot sees every phase and its seconds left (docs/bot.md), so it can learn to punish.

Styles

Each fighter is drawn one of three styles, aggressive, balanced or defensive (style.rs), on dice of their own, so the style never moves a fight's rolls. The style is only a tag a bot reads (docs/bot.md): it changes no rule, no reward and not the hand-written brain. A bot may play it or ignore it; the shipped AI was trained in all three.