Convergence.Game/BIBLE/part 2
- Recovery. When a foe's turn resolves (
BattleRunner.ScheduleReentry), its icon leaves the bar.- It sits in recovery for
RecoverBaseSeconds1 s, plus the largestAbilityDef.RecoverSecondskeyword it used that turn (0–3 s, validated), plus the spacer's delay, ± the difficulty row's jitter. - Then it re-enters at its entry (§2.1).
- Recovery is not scaled by Slow, Haste, Rally or the dial. Frozen holds it. It counts in
TicksUntilAct, so the window, the badge and the bots all see it. - Heavy, telegraphed charges recover longer:
- 1.5 s: fireball, temporal drag.
- 1.0 s: miasma, thunder, ice, enrage.
- 0.5 s: smite, rally, mend.
- A wolf pack's howl recovers 0, so a pack keeps its pressure.
- It sits in recovery for
- The spacer.
TimelineSpacing.Delay(pure) takes the foe's natural next turn and the turns of every other foe and every enemy charge in flight.- It holds the foe up to
MaxSpreadSecondslonger, so its turn lands at leastMinGapSecondsfrom all of them. - When nothing in that range fits, it takes the widest gap on offer. A crowded bar still clusters: big waves, eggs, remains, and a pushback or Slow that reshuffles the order.
- The extra time goes into recovery, never into the entry, so the bar always reads Speed honestly.
- The columns live on the difficulty dial (§22.9): 1.6/2.0 s at level 1 down to 1.0/1.0 s at 10, where a spaced gap always fits one skill. Every row adds ±0.25 s of seeded jitter.
- The neutral row (rules tests) has no spacing and no jitter. Test stages use the neutral row.
- It holds the foe up to
- Spawns. A wave is scheduled one foe at a time in entry order (
OpenPartyWindow), with the 3 s opening floor. Reinforcements, eggs and risen remains are spaced when they arrive. Tamed allies enter at their entry and are never spaced. - Pushback and haste. A push on a recovering foe adds to its recovery (§2.3). A Hasten/Quicken on one eats its recovery first, then moves it along the bar.
- Seen. A recovering foe waits in the recovery tray between the track's right end and the stage edge, dimmed, with a countdown ring, then slides onto the bar at its entry (GG-T319).
- Tuning (GG-T321) —
Tests/Core.Tests/TimelineTuningSoak.cs, all runs indocs/research/TimelineTuning.md.- At difficulty 10 with campaign parties:
Smart Casual Wins 100% 90% Forced Guard share 14% 22%
The median gap is 2.1 s and 22% of gaps are under a minimum drag. - This fixes GG-T316. Tithe Moors I with the real three heroes was 6%/0% with 35–50% forced Guards; it is now 4/4 smart, 0/4 casual, with 18–24% forced Guards.
- At an average 4 s, no timeline setting moves the smart bot below 97%.
- Amended 2026-11-07 (GG-T321, decision delegated by the owner): challenge comes from party size. On this clock the starting three manage about 1.3 actions per enemy turn and six heroes about 2.4. So enemy strike and MaxHP (and plates) grow by
EnemyScalePerExtraHero0.30 for each hero fielded beyondPartyScaleBaseHeroes3 (BattleEngine.PartyScale,BattleState.PartySize). Test stages are unscaled.Difficulty, party Smart Skilled Casual 10, campaign 100% 100% 45% 10, six 100% 98% 38% 5, campaign 100% 100% 97% 1, campaign 100% 100% 100%
Tithe Moors I is unchanged. The skilled column isHeroBot.Skilled: SkillLevel 80, 0.8 s think. A global strength raise was rejected because it walled the first battle; seedocs/research/TimelineTuning.md. - Amended 2026-11-17 (GG-T423): the balance soak itself was fielding the wrong party.
tools/polish.py'srun_soakdroveAbilityUsageSoak's per-stage path (the one POL-G1/G2/G6/G7 measure) with a flat five-hero rotating party on every stage, never settingCONVERGENCE_ABILITY_PARTY=campaign— so every soak battle fought the enemy scaled for 5 heroes (the +2-over-baseline, 1.6× HP/strikePartyScaleabove) even on early stages the campaign only fields 3 heroes at.run_soaknow setsCONVERGENCE_ABILITY_PARTY=campaignfor both the casual and greedy soaks, so these rules measure each stage against the roster sizeAbilityUsageSoak.CampaignPartySizesays it's actually designed for.docs/polish/baseline.json's G-dimension rules (POL-G1..G7) are re-baselined to this corrected measurement (POL-G1 17.4 → 32.5, dimension G 66.3 → 69.1, both still ownerryand's decision on GG-T423, not a design change) — every POL-G number recorded before 2026-11-17 was measured under the flat-5 bug and is not a valid comparison point going forward. The fix didn't move every stage toward the 55–85% band:greenvalley-01/02,cave-01/03,desert-01/02,lanternroad-03andswamp-02still show a 0% casual win rate at the corrected party size (CONVERGENCE_ABILITY_PER_STAGE=4, so n=4/stage). That looks like genuinely under-tuned early-campaign content now that the measurement is accurate, not sampling noise alone — flagged for the next GG-T276 balance-loop cycle rather than fixed here. - Amended 2026-11-17 (GG-T276): the 8 corrected-measurement 0% stages above, triaged. Each was content, not a repeat of the GG-T423 party-scale mismatch (
cave-01/02/03all field the same campaign party size andPartyScale;cave-02is in-band, so the scaling itself isn't the driver). Root cause and fix per stage (commits0202aedb,6583bc8f,fd602646,d1c09b5b):greenvalley-01(highest priority — the game's very first stage): the only one of the 44 campaign stages whose authored enemyLevelexceedsMetaServices.RecommendedLevel(campaignIndex + 1) — every other stage authors flatLevel: 1and letsBattleRunner.Setup'sMath.Max(sp.Level, RecommendedLevel)floor do the leveling. Wave 5'scaptain/soldier02/soldier03were hand-authored atLevel: 4against a level-1, 3-hero starting roster (waves 3–4 were similarly over-authored atLevel: 2). Reset every enemy in the stage toLevel: 1.cave-01,cave-03,desert-01,desert-02,lanternroad-03: the same bug class as this session's earlier Sentry+Vigilant/Reaver+Vigilant fix (two commits up) — a wave stacking two copies of the same self-buffing orBoss-tagged unit where no sibling stage in the theme repeats the pattern.cave-01wave 5 fielded four named elites with no filler (droppedvoidsentinel);cave-03wave 4 was the only wave in the campaign pairing twoBoss-tagged units (cyclops00+cyclops01, swapped the latter forgoblinthug00);desert-01wave 4 anddesert-02wave 3 each doubled uppurpleprototype(abilityberserk), a patterndesert-03/desert-04/desert-05never repeat (swapped the duplicate forscorpion/soldier00);lanternroad-03wave 5 paired itsUndyingrule-break finale boss (oni02, GG-T234) with a second full-strengthoni00instead of filler, unlike every other theme's rule-break finale (swapped forsteppinrazor00).greenvalley-02: no single-bug root cause found; a content-density call instead. Wave 3's four identicaltoxic_skinenemies trimmed to three (droppedfrog03); wave 4'sharpy03(jammer_darts, which targets theCasterrole) removed, since this is the exact stage the campaign's first mage joiner (greenvalley_recruit_mage) is newly in the roster for, at her lowest level.swamp-02:naga00(this stage's solo finale, and the onlyLaysEggenemy in the real campaign — BrainAmbusher, GG-T262'sAmbushPatienceTurns, plus a never-reusednagaeggreinforcement everyEggIntervalturns) is a one-off combo of mechanics with nothing to dilute it; POL-G6's own per-wave action counts for this stage swing from 4 to 67, consistent with runs stalling on an egg-sustain spiral rather than a clean win or loss. DoubledEggInterval4 → 8 (content-only;naga00isn't used in any other real stage).- Build (
tools/build.ps1 -SkipProse) is green after every commit: errors=0, warnings=1 (unchanged baseline warning). Balance-soak re-verification is still outstanding: the harness's background-task memory-pressure safeguard killed the post-fixpython tools/polish.py --no-player --balancerun on this shared machine before it produced results. Before numbers (n=4/stage, all eight at 0/4) are GG-T423's measurement above; after numbers are pending the next run and will be appended here once captured.
- Amended 2026-11-18 (GG-T276): the 6 stages still at 0/4 after the above, triaged deeper — sibling-compared, not just the duplicate/overtuned-element pattern.
MINDATTIC_AGENT.md's GOLDEN RULE ("verification is build-only; tests run last, once, when the user asks... orchestrators and coordinators never instruct subagents to run suites or soaks") means this pass did not re-runpolish.py --balanceitself — the--per-stage 12re-measurement this cycle's brief asked for was not taken, and the after-numbers below are therefore from static/structural analysis (sibling wave-count, enemy-count, Boss/RuleBreak placement, ability-text andHeroBot.cscomparison), not a fresh soak. The next/testor explicitly-requested balance pass should capture real after-numbers against the before column here.- Content fixes applied (4 of 6):
greenvalley-01wave 4 was the single largest wave among all 15 sampled early-campaign stages (5 foes, vs. a sibling max of 4:greenvalley-03wave 3/5,desert-03wave 4) and carried a redundant secondgoblinthug00alongside theganger00/ganger01/delayed-soldier00mix the rest of the wave already covers. Dropped the duplicategoblinthug00: wave 4 is now 4 foes, matching the sibling ceiling.greenvalley-02wave 1 opened with 3 slimes (slime00/01/02) where both its siblings (greenvalley-01,greenvalley-03) open with exactly 2 — and this is the only one of the three greenvalley stages that declares theslimetrailregion rule, whoseslime02/slime03-styleTrailRule(ClassDef.TrailRule,BattleRunner.Region.cs RegionTrail) paints a persistentslowedhazard tile behind every slime step. A third slime is a third hazard-painting source, right at the stage's own opening wave, before the party (fresh off stage 1, one shop visit in) has any means to cleanse or outrun stackingslowed. Droppedslime02: wave 1 is back to 2 slimes (slime00+slime01, the same pairgreenvalley-01wave 1 uses).desert-01wave 3 fieldedinfernalist03(Brain: Medic,charge_blood_rite— heals the most wounded ally 25 HP every other turn, plus its ownlifesteal) alongsideinfernalist02. Checked against every other theme's own opening stage (greenvalley-01,lanternroad-01,swamp-01,cave-01): none of them field a dedicatedMedic-role healer this early — the campaign's otherMedicunits (swampmistress00's 30 HPcharge_mend, stronger and cooldown-free) only appear at a theme's finale (swamp-03), after two stages of leveling.desert-01isdesert's own opening stage, so it was introducing a healer-sustain mechanic a full stage-position earlier than every sibling theme does. Swappedinfernalist03→infernalist01(Hunter,cinder_claws+infernal_hide, no heal) — same family, same wave size, no sustain spike.swamp-02'snaga00: re-readingBattleRunner.Enemy.cs'sLayEgg/Hatchpast the already-appliedEggInterval4→8 fix shows the mechanic is structurally unstable, not just too frequent —Hatchspawns the egg into a full clone of whatever laid it (egg.RisesAs = layer.Def.Id,egg.RisesLevel = layer.Level), and that clone inherits the layer's ownLaysEgg/EggInterval(it's spawned from the sameClassDef). Anagaeggthat survives to its own turn doesn't add a minor add — it can add a second full-strength Boss that can itself lay more eggs: an uncapped self-cloning spiral, consistent with POL-G6's 4-to-67-action swing on this stage.naga00is confirmed the onlyLaysEgguser in the real campaign (grep'd every content file), so this is fully isolated. RemovedLaysEgg/EggIntervalfromnaga00entirely (content-only;nagaeggstays defined but unused) —swamp-02's finale is now a straightforward solo Boss fight (poison DoT,Ambusher/AmbushPatienceTurnsintact) without the recursive-reinforcement risk.
- Flagged as a bot-AI gap, not re-tuned (2 of 6):
lanternroad-03andcave-03are the only two of the five sampled themes' own finale (-03) stages still failing, and both pair their finale with aRuleBreakwhose counterplay needs deliberate avoidance the bot doesn't do:lanternroad-03'sUndying(oni02, GG-T234) only refuses to fall while another foe stands — "slay its thralls first" — butHeroBot.cshas no targeting logic that deprioritizes anUndyingfoe while thralls live;cave-03'sGravityStamp(cyclops02) drags every hero within reach toward the boss every other of its turns — "keep your distance" — butHeroBot.cshas no retreat/spacing logic against it. By contrast, the other three themes' finaleRuleBreaks all succeed without any stage changes this pass:greenvalley-03'sTwinTurn("two turns unless a hero stands beside it") is satisfied by the bot's ordinary melee-approach behavior for free;swamp-03'sMireSwapis a low-cost reposition, not a punishing one;desert-03'sAxisWardalready has bot-side awareness (HeroBot.cs'sRuleBreakRules.WardsPincerscoring, favoring column pincers).UndyingandGravityStampare the only two rule-breaks with neither free coverage nor an explicit bot special case — aHeroBotenhancement (thrall-priority targeting; stamp-range retreat) is the right fix, not a further content nerf on two stages whose finale bosses are each already the theme's one intended rule-break set-piece. No stage content changed for either. - Build check blocked, not yet green, not yet committed:
tools/build.ps1's Unity batchmode run was killed mid-flight by this shared machine's background-task memory-pressure safeguard (the same blocker GG-T423's note above hit forpolish.py --balance), so this pass has not confirmed a clean build for these 4 content edits. Permindattic-agent-standard/AGENTS.mdLaw 7 ("commit at verified milestones only") the edits below are staged on disk but intentionally not committed; per the harness's own guidance the killed build is not retried automatically on this pass. The next session with headroom should re-runtools/build.ps1, confirm errors=0, and commit each fix by its own path before relying on it. Before numbers (n=4/stage, all six at 0/4) are the prior GG-T276 pass's measurement above. After numbers: not measured this pass (GOLDEN RULE — no soak/balance run without an explicit user/testask, and orchestrators/subagents never instruct each other to run one); the 4 content-fixed stages (greenvalley-01,greenvalley-02,desert-01,swamp-02) are expected to move toward the 55–85% band on the next real soak, andlanternroad-03/cave-03are expected to stay near 0% untilHeroBotgetsUndying/GravityStamp-aware targeting — see GG-T276's ticket notes for the full write-up and the follow-up ask.
- Content fixes applied (4 of 6):
- Amended 2026-11-19 (GG-T441): the GG-T276 trims kept, the invariants they broke restored.
greenvalley-02wave 3:6583bc8f's trim (frog00/frog01/frog03/toad00→ droppedfrog03) leftfrog00/frog01/toad00, the exact foes, levels and tiles ofswamp-01wave 1, whichContentLoader.Validaterefuses (no two campaign waves are the same encounter). Kept the 3-foe trim but droppedtoad00instead offrog03: nowfrog00/frog01/frog03. All four are the same 12 VIT / 15 STRtoxic_skinstatline, so the wave's weight is unchanged;toad00still fights ingreenvalley-03wave 5.
- Amended 2026-11-19 (GG-T442): placement and shape invariants the GG-T276 edits broke, restored without re-densifying a wave or re-stacking an elite.
greenvalley-01(§14 "five waves of rising difficulty"): with every foe atLevel: 1(0202aedb) the captain's finale (77) weighed less than wave 4 (101) and the frogs (81) less than wave 2 (91). Movedwolf01from wave 2 to the finale: wave 2 iswolf00+bat00(59), the finalecaptain/soldier02/soldier03/wolf01(109) — weights 54 < 59 < 81 < 101 < 109, no foe added, no level raised, the finale at the 4-foe sibling ceilingcf707043set, and the tutorial's wave-5 "pincer the wolf while it howls" has its wolf back. (wolf00+wolf01would have repeatedlanternroad-01wave 1.)greenvalley-02/greenvalley-03wave 1 (GG-T190 shove lesson): the opening wave must hold one foe at(2,5), above the gap between the lead hero(1,6)and the third(2,7).d83e1d9amoved every slime out of the hero band; this puts back one — the lesson foe, a speed-8 slime the party reaches first — and keeps the rest out (greenvalley-02:slime02@(2,5)+slime01@(3,1), was two slimes on row 5 befored83e1d9a;greenvalley-03:slime02back to(2,5),slime03stays at(4,3)).greenvalley-02keepscf707043's two-slime opener, and its slime is nowslime02, theslimetrailcarrier the stage's region rule is pinned to. Watchgreenvalley-03's win rate on the next real soak: its 25% → 75% came from this move.cave-03wave 3:wraithknight02(Reaver) →wraithknight03(Vigilant), so the Vigilant still guards the Anchor Wastes, as the only Watch elite in a wave of plain filler (skelepede00,goblinthug00) — the un-stackingd83e1d9adid is kept; the Reaver still fights incave-01wave 2.cave-01wave 3:ceramicknight00→voidsentinel: the same plated 18-VIT construct tier, in a 2-foe wave with filler, not back in the four-elite finalefd602646thinned.desert-03wave 2:techgremlin00→infernalist03: the Shardfall's Medic now first appears in the theme's last stage (ascf707043says sibling themes do), not indesert-01, and not besidedesert-03'sAxisWardfinale boss;techgremlin00still fights in wave 4 anddesert-01.cityruins-04wave 2: droppedmockingecho(GG-T417 had added it; the Underspire fields only Street/Hollow/ Choir foes, and a postgame non-finale wave holds at most 2): nowcyberzombie00+pitlurker. The Mocking Echo still haunts Halcyon I and II.- Speed tiers (8/11/15/18): the postgame region monsters were authored off-tier; each snapped to the nearest tier its card reads as — 8:
holdwright,chainwarden(9),holdram(6),spireshover(7),crystalbrute,anchorhulk,bloatdrowner(5); 11:holdmarksman,shardcaller,stormcaller,gloommender(10),pitlurker,mockingecho(12); 15:duskmimic(13, a flanker).
- Amended 2026-11-22 (GG-T276/GG-T215): the frog family poisons less often. A full
polish.py --no-player --balancepass scored G 64.0 (POL-G1 24.4, G6 32.8, G8 50.0): the early campaign sits under the 55–85% casual band again (greenvalley-010/4,swamp-010/4,desert-020/4), while the Still/Cathedral sit at 100%. A kept-records re-run of the four worst stages at 8 battles each (the same seeds both sides) showed real defeats, not stalls: the starting trio (Warden, Barbarian, Cleric) wongreenvalley-011/8, mostly falling to the captain's finale after the frog wave had worn them down. Frogs poison through three channels at once — their own blows (OnHitChance0.4),toxic_skinwhenever struck directly (0.35), and their pincer support — so an all-melee, unarmed early party, whose every pincer on a frog is a direct strike, stacks poison fast. Change:toxic_skin's trigger 0.35 → 0.25 (description[fair]→[small], §9 bands; it also armstoad00andswampmistress00), andfrog00–frog03OnHitChance0.4 → 0.3. Supports, thepoisonedbuff itself and every wave are unchanged; §14's five-rising-waves weights forgreenvalley-01(54 < 59 < 81 < 101 < 109) leave no slack to thin a wave, so the lever is the family's kit. After (same seeds):greenvalley-011/8 → 2/8,greenvalley-023/8 → 5/8,swamp-011/8 → 1/8,desert-024/8 → 4/8.swamp-01's five wave-1 wipes are not poison: the records attribute ~2,400 damage each tofrog00,frog01andtoad00blows at that stage's level (84 HP frogs) against the soak's unarmed heroes — the next pass's target, along with whether the casual soak should field the guided starter gear a real save forges. GG-T215's other remaining items, checked: mercenaries (45–70 G a battle) are ~10% of a mid-campaign stage's pay (≈400–700 G), no change; the shop potions' flat-to-worse value per HP at the top (X-Potion 500 G / 500 HP) comes from the owner's own "buying stays the convenient one" price raise (AMENDMENTS, X-Potion 250 → 500) and stays for the owner's feel (RELEASE_SCOPE); the XP curve is GG-T474's owner decision. - Amended 2026-11-22 (GG-T276): the casual soak fights from the campaign's save. A real new save is unarmed at
greenvalley-01too (two starter abilities, 200 G, no Forge or Merchant yet), but from the next stage on the soak fielded bare heroes no player could still have.AbilityUsageSoak(cc2eb8ea) can copy a camp-managing greedy campaign's save before each stage (heroes keep its gear, abilities, talents and level; joiners come in fresh), andpolish.pynow turns it on by default for the casual per-stage soak (CONVERGENCE_ABILITY_GEAR=barerestores the old way). Measured (8 a stage):greenvalley-012/8 (unchanged, as it should be: bare there too),greenvalley-02in band,swamp-011/8 → 3/8,desert-024/8 → 7/8. Tried and reverted: the captain'sArmorPlate24 → 18 and Rally's radius 2 → 1 (only the captain carries Rally; neither number counts toward §14's wave weights). Kept records showedgreenvalley-01's defeats land in wave 5 with all four of the captain's people at full health and the trio's X-Potions spent, but the change left it at 2/8 and pusheddesert-03to 8/8, so it went back.greenvalley-01is attrition across all five waves against a level-1 trio, not the captain alone. Noise: the snapshot campaign is replayed every run, soswamp-01(no captain) read 3/8 then 8/8 across two runs with no relevant change; 8 battles a stage can't separate a tune from that, so the next pass should use a fixed snapshot seed or more battles before tuninggreenvalley-01. - Amended 2026-11-22 (GG-T276 pass 3): the soak replays exactly, its snapshots are frozen, and Tithe Moors I's reinforcements arrive in turn. Noise, found: the snapshot campaign's forging rolled each Masterwork off the clock (
Crafting.Craftfalls back to aTickCountseed when noRngis passed, andCampRoutinepassed none), so the same content gave different gear every run.CampRoutine.Runnow takes an optionalRngand the soak seeds one per stage and try (23234ca3); two runs of the same content then gave 96/96 identical battles. Cascade, found: even replayed exactly, regenerating the snapshot each run made any upstream tune reshuffle every later stage's loot and forging (Tithe Moors I's change below tookdesert-02from 23/24 to 11/24, its Barbarian arriving with a different weapon). The per-stage saves are now frozen toartifacts/balance-snapshots/(9ae4b102), reused untilCONVERGENCE_ABILITY_SNAPSHOT=regen; regenerate after a tune lands to see its knock-on once. Change: ingreenvalley-01the third frog (frog02) and two of the captain's soldiers (soldier02,soldier03) arrive 240, 240 and 480 ticks into their waves (SpawnDef.DelayTicks, already how wave 4'ssoldier00arrives), so the trio meets each wave in parts. No foe, level or stat changed, so §14's rising weights (54 < 59 < 81 < 101 < 109) stand. Measured (24 a stage, casual, exact replay):greenvalley-016/24 (25%) → 14/24 (58%), with wave-5 defeats 11 → 4. The first stage doesn't depend on the snapshot (a new save is unarmed), so that change is clean. Later stages were measured only with the snapshot regenerated, so their moves are the cascade above, not this tune:greenvalley-0220 → 22/24,swamp-0113 → 17/24,desert-0223 → 11/24. A run against the frozen snapshot, to see them with the party held fixed, was cut short by the machine's low-memory guard. 58% is inside the 55–85% band but at its bottom; a first stage should sit near the top, so the next pass should takegreenvalley-01further and run the regenerated snapshot once to checkdesert-02. - Amended 2026-11-22 (GG-T276 pass 4): the Mecha Armor family's plate 40 → 30. Against the frozen snapshots (24 casual a stage),
desert-02won 11/24 (46%, under the band); kept records put 11 of its 13 defeats in wave 4 withmechaarmor02still standing (wave 4 averaged 81 actions). The Mecha Armors were the most stacked foes in the game: the thickest plate (40, against 30 on the othertough_hidecarriers,templar*/ceramicknight*),tough_hide,mirror_platingand a Kiter brain that keeps their front toward an all-melee party. Change:mechaarmor00–02ArmorPlate40 → 30, in line with those siblings (plate doesn't count toward §14's wave weights). Measured:desert-0211/24 → 14/24 (58%, in band);greenvalley-0114/24,greenvalley-0222/24 andswamp-0117/24 unchanged. Tried and reverted:mirror_plating's chance 0.5 → 0.35 (no change: 14/24) and a fourth foe (wolf01) ingreenvalley-02's finale (still 22/24, party HP left on wins 67% → 64%). Droppingtough_hidefrom the family was built but its run was cut by the low-memory guard, so it isn't in. Whygreenvalley-02stays at 92%: the snapshot party arrives at level 4 against a recommended level of 2 (greenvalley-01's five waves out-level the curve), and the campaign convention (0202aedb) authors every foe atLevel: 1under theRecommendedLevelfloor, so hand-leveling its foes would bring back the very bug that brokegreenvalley-01. The lever is the XP curve, GG-T474 (owner decision). Still to do: aCONVERGENCE_ABILITY_SNAPSHOT=regenrun overgreenvalley-01..desert-02to check knock-on effects (not run: memory), and a second look atdesert-02's wave 4 if it lands under the band once regenerated. - Amended 2026-11-22 (GG-T276 pass 6): first measurement with owned-orb mana; no tune. Mana is now owned Mana Orbs (GG-T673 spells cost 1–4 orbs; GG-T677 a new save owns 1, milestones/finds raise it; GG-T676 leftovers → Mana Dust). The soak already fights with the orbs a player would own: every fight is built by
BattleFactory.Build, whoseOrbCapacityreads the save's owned orbs, the campaign snapshot'sCommitgrants milestone/find/broken orbs, andgreenvalley-01starts from a new save (1 orb). Snapshots regenerated (CONVERGENCE_ABILITY_SNAPSHOT=regen, kept inartifacts/balance-snapshots/d10), 24 casual a stage, run2026-11-22_1658:Stage Wins Orbs minted / battle Wasted (row full) Casts / battle greenvalley-01 13/24 (54%) 5.7 11% 4.2 greenvalley-02 22/24 (92%) 4.7 8% 3.4 swamp-01 23/24 (96%) 11.3 1% 10.7 desert-02 19/24 (79%) 15.6 1% 12.2 cave-02 9/24 (38%) 13.0 1% 12.0 cityruins-02 24/24 17.1 0% 16.9 cathedral-02 24/24 13.8 0% 14.2
Read: with one orb, early casting is scarce but used (4 casts a fight at Tithe Moors I; the 11% waste is earning into a full one-orb row), so the earn rates don't look wrong. Casual campaign Mana Dust: 111, 24 of it from leftover orbs (~22%); the gold split holds (gear 43%, repairs 22%, facilities 9%). Why no tune: nothing clearly traces to the orb economy.cave-02's defeats spread over waves 2–5 (attrition, not a spike) with healthy casting;cityruins-02/cathedral-02at 24/24 andswamp-01/greenvalley-02above the band match the campaign party arriving over-levelled (GG-T474, the owner's XP-curve call), and cheaper big spells (GG-T673: 10 → 4 orbs) may add to it. Next pass: a counterfactual (the same seeds with spell orb costs at their old scale, or orbs off) to split the late 100% between levels and cheap spells before tuning either;cave-02triage; and the casual camp-managing campaigns finished 2/4 this run (earlier runs 4/4), which points atcave-02as a new wall.
- At difficulty 10 with campaign parties:
- (Tests:
TimelineSpacingTests.)
2.10 Countdown badge
Amended 2026-10-09 (new, Terra Battle–style): every enemy shows a number on its tile — BattleEngine.ActionsUntilTurn = (TicksUntilTurn − 1) / 20: the actions you get before it acts (0 = it acts during your next action, drawn red). Amended 2026-10-21 (GG-T188): a turn now ends at each enemy arrival, so the number counts the distinct arrival ticks of the other enemies (each re-loading from IP 0) before this one's — the turns you get before it acts (0 = it acts at the end of your next turn). Since GG-T308 a "turn" is the party's window (every hero acts once in it), so the number counts windows, not hero actions. GG-T318: each other foe's next lap is estimated as base recovery plus the trip from its entry, not a reload from IP 0. TicksUntilTurn simulates its icon with stun at its one linear rate (no Zone crawl since GG-T286) but no future pushback/hasten; Frozen enemies show no number. The actor panel says "Acts in N moves", "Acts after your next move!", "Frozen in time" or "Charging X!".
2.13 Turn modes (GG-T762)
Added 2026-11-23 (owner, GG-T762/GG-T765). All four modes are built and playable (§2.13.0 to §2.13.3); only the equal-terms comparison soak (GG-T821) is still open. Owner: "I want to be able to try the 'any hero every turn', 'any hero who hasn't moved this round', and the 'Heroes on the timeline' modes; I want all of them created and implemented separately and sequentially and tested headlessly and figure out which works better for what and why … I can see all of them being viable game modes so each one needs to be built in carefully and organically to the entire game."
Who on the party may act, and when, is a turn mode. There are four. PartyWindow is today's rule and stays the default; the other three are separate, complete game modes, not debug switches. The enemy side, the bar, pincers, mana and content stay the same in every mode. Each mode changes only what §2.0 decides for the heroes, and then whatever has to follow from that.
- The setting (⬜, GG-T767/GG-T773/GG-T774/GG-T775).
TurnMode(Core/Battle/TurnMode.cs):PartyWindow(default),AnyHeroEveryTurn,UnmovedThisRound,HeroTimeline.BattleSetup.TurnModeis copied toBattleState.TurnMode, kept by the state clone (like Difficulty) and recorded byBattleRecorder/CommandCodec, so a replay reproduces its mode.- The player picks it as a profile setting,
turnModeinsettings.json(GameSettings, defaultPartyWindow), in Settings. New Game can lock it on the save (SaveData; aSaveMigrationsbump loads old saves asPartyWindow). - The pickers (✅ GG-T774). Settings → Turn mode cycles the profile's mode like Battle speed, with a one-line explanation under it (and a note when the open save is locked). New Game's Turn mode row picks Settings (the save follows the profile) or locks the save to one mode (
TurnModeSetting.Lock). Both offer onlyTurnModes.Available(Core/Battle/TurnModes.cs;IsBuiltis the one check): today PartyWindow and Any hero every turn (GG-T787), and each mode's feature appends itself once its rules and battle view land. A mode's name and explanation are its glossary entryglossary:turn_mode_<mode>(glossary.json, words seeded inContent/Textthrough the Prose tools). - Tools pick it on the command line (GG-T775), through the harness, or with
CONVERGENCE_TURN_MODEfor the headless soaks.
- The player picks it as a profile setting,
- The resolver (✅ GG-T773). One function,
TurnModeSetting.Resolve(Meta/SaveData.cs), picks a battle's mode: the save's lock (SaveData.TurnModeLock, set byTurnModeSetting.Lock; save v15) if it has one, else the profile setting (SettingsSave.TurnMode).BattleFactory.Buildtakes the profile's mode and resolves it, so every battle built from a save gets it;EndlessEncounter.Buildtakes the mode its caller resolved. It feedsBattleSetup.TurnModeat every battle start: campaign and stage battles, endless, the Crucible, wanderers, bounties, test mode, the tutorial andBattleScreen. No battle may pick its mode any other way. - The
TurnRulesseam (✅ GG-T768; built for PartyWindow and AnyHeroEveryTurn).Core/Battle/TurnRules.csis the one place a mode answers five questions:BattleEngine(CanMove,HeroesLeftToAct,TooLittleTime,CommandTicks,TurnTicks),BattleRunner(window end,ReturnControl,PlayerControlEvent.NewWindow, Guard), theActedThisWindowreads (Tame, Wanderer, Recruitment),HeroBotand the battle view all ask the seam. None of them switches onTurnModeitself. Every mode is built now;TurnRules.Requirewould throwNotSupportedExceptionfor a mode that isn't. Beside the five questions the seam answers a few more, so no caller readsTurnMode:OneHeroPerTurn(is the turn one action by one hero, for the view, §2.13.1),HeroesLeftAfterandActsLaterThisTurn(bot planning),MaxTimeBankOrbs(the drag-timer time bank's cap),CountdownLeft(the countdown badge, §2.10, the same in every mode) andRecordMode(the mode a battle's records are kept under, §22.10).- who may act now;
- whether an action ends the party's turn;
- what an action spends;
- what Guard gives up and banks;
- what a turn boundary resets.
- Comparison. Every mode is soaked headlessly on equal terms and compared in
TURN_MODES.md. Numbers that only make sense in one mode live in per-modeBattleConfigconstants. Content and general balance stay with the continuous balance loop (GG-T276).
2.13.0 PartyWindow (today, the default)
The party's turn is the window until the next enemy icon reaches the left edge, and every able hero acts once in it. This is exactly the GG-T308/GG-T311 rule of §2.0: ActedThisWindow, the shared window budget, minimum action time, forced Guard, Rally, and turn boundaries counted in windows. Through the seam it must replay identically (Party_window_replays_identically_through_the_seam). It is the comparison baseline.
What each new mode must answer
Each mode below records its final rule in its own subsection when its core-rules feature lands, and answers every one of these. "Same as PartyWindow" is a valid answer, but it has to be written down.
| Topic | The question |
|---|---|
| Who may act | Which heroes can be picked up or use their bar now; what greys out and why (SlotStatus); what ends the party's turn.
|
| Guard | What Guard gives up, what it banks as mana charge (§2.5), and whether forced Guard and Rally still apply (§2.0). |
| Mana income | Whether orbs and charge per enemy turn stay in the band when the party takes fewer or more actions per enemy turn (§3.1). |
| Turns buffs | What "1 Turn" means for hero buffs, Protection, tempo effects, Frozen on foes and Regenerate (§8.3, §2.11). |
| Cooldowns | What a skill cooldown counts: party turns, that hero's own actions, or rounds (§4.1.1). |
| Status ticks | When DOTs, Stun, Asleep and the TurnStart/TurnEnd/ActionEnd triggers fire. |
| Pincers | Whether one action still sets up a pincer that a second hero closes in the same turn; supporters and chains (§1.2). |
| Region rules | Every region rule that counts turns or actions (§14.20). |
| Tutorial | Whether the tutorial's scripted steps and copy still read correctly, or need a per-mode variant. |
| Post-battle stats | What results, records and achievements count (turns, actions, "no hero acted twice"…). |
| Crucible | Leaderboards and seeds: per mode, or the mode locked (§22.10). |
| Automation | What /state reports (who may act, round, hero icons) and what the harness drives.
|
| UI | Banners, the ✓ acted marks, the hold lane, the countdown badge (§2.10), and the settings/New Game copy. |
| Soak | The bots (HeroBot, CampRoutine) play it well. The soak reports it on equal terms with the baseline (TURN_MODES.md).
|
2.13.1 Any hero every turn (AnyHeroEveryTurn) — ✅ Built and playable (GG-T779: GG-T781 to GG-T788, GG-T944, GG-T945); soaked (GG-T790)
Owner (2026-11-26): "Mode A: Any hero moves, cancel remaining time with Guard to gain some mana." Each party turn exactly one hero acts: any able hero, the same one again if you like (Terra Battle style, close to the pre-GG-T308 rule). That action ends the party's turn. Instead of acting, the party may Guard: it gives up the rest of the turn and banks the seconds left as mana charge, the same GuardCharge as PartyWindow (§2.5). The code matches the owner's definition. Everything mode-specific lives in TurnRules (OneActionPerTurn, OneHeroPerTurn); no other code reads TurnMode. Every topic in the table is answered below, the soak included. Modes B and C (UnmovedThisRound, HeroTimeline) were built later (§2.13.2, §2.13.3) and share this mode's one-action turn.
Core rules (✅ GG-T781, TurnRules; offered in the pickers since the battle view landed, GG-T787):
- Who may act. At the start of each party turn every living, commanded hero who isn't Immobile may act, the hero who acted last turn included. The first hero action, or Guard, ends the turn. Until the turn boundary, every hero reads as acted:
HasActedis true for all of them,SlotStatus.Actedgreys them,HeroesLeftToActis empty, and a second command is refused with "Already acted". The mark is PartyWindow's ownUnit.ActedThisWindowon the hero who acted, cleared byResetTurnat the boundary. No new state is added, so the state clone and replays carry it unchanged. - What an action spends. The same as PartyWindow: a drag spends its share of the gap and a skill, item, spell or Talk spends
HeroActionSeconds.EndsPartyTurnis then always true, so the clock runs on to the next enemy arrival (SpendWindow), as it does after PartyWindow's last hero. - Leftover seconds are lost, not banked. Decision: the seconds a hero action leaves in the gap earn no mana charge. That is the same as the last hero's leftover in PartyWindow. Only Guard turns unused time into charge, through the same
GuardCharge/GuardChargeForrule as PartyWindow, so Guard stays a real choice and not a free side effect of acting fast. GG-T782 decided the rest of mana income (below). - Unchanged from PartyWindow. The minimum-action gap (a command too long for the gap is refused with "Too little time"), forced Guard and Rally (
TooLittleTime,IsForcedGuard), each wave's opening window, the turn boundary (an enemy arrival or a cleared wave, where the combo closes) andClearActedfor joining units. Per-turn systems (✅ GG-T782). One action is now a whole party turn, but a party turn still spans one enemy arrival (or a cleared wave), the same stretch of enemy time as a PartyWindow window. So everything that counts turns keeps counting party turns, never hero actions, and no duration is scaled. Mana is earned and spent per action, so only income measured per turn needs a new answer: the time bank. - Guard (§2.5). Unchanged. Protection (1 Turn) covers the enemy turn Guard skips and expires at the next boundary. The bank is the same
GuardChargeon the whole window, capped atGuardMaxCharge. Guard gives up only one hero's action here, but the 40 cap is under half an orb, so it still costs a real action. - Mana income (§3.1). Pincer charge (§3.1.9) is unchanged: charge per pincer and spells are both per action, so the per-action balance is PartyWindow's. Pincer orbs per enemy turn fall, and so does spending, since only one spell fits in a turn. Regen follows the clock and is unchanged. Time bank (§3.1.8): capped at
AnyHeroMaxTimeBankOrbs= 1 throughTurnRules.MaxTimeBankOrbs. Every drop here is the turn's only action and an enemy turn always follows it, so PartyWindow's cap of 3 would pay out on every action, not once per window shared by the party. One orb is about PartyWindow's per-action share. The soak (tools/turn_modes.py) checks the band. - Turns buffs, Protection, tempo (§8.3, §2.11). They keep counting party turns at
ReturnControl. "2 Turns" is the next two party turns, whichever hero acts in them. A bystander's buff ticks too. - Cooldowns (§4.1.1). They keep counting party turns for every hero, whether it acted or not. A hero who acts every turn uses a skill at the same cadence as in PartyWindow.
- Status ticks. DOTs follow the clock. Frozen on foes, Sleep and Stun count party turns. TurnStart/TurnEnd fire at each boundary, and ActionEnd fires after each action. All unchanged.
- Rally. Unchanged: a forced Guard stacks it and any hero action resets it.
- The support extra turn (
supportTurnOwner, GG-T307). Unchanged. It is enemy-side: a buff gained during an enemy's own turn gets one more turn. - Tests:
TurnModeAnyHeroTests. They cover the same hero twice in a row, a second action in one turn being refused, Guard banking, forced Guard and Rally, a wave's fresh turn, and a bot battle that replays identically. GG-T782 adds tests for the time-bank cap, cooldowns, Turns buffs and tempo, Guard's Protection and a Frozen foe.
Turn- and window-counting rules (✅ GG-T783). Every other system that counts turns or windows was checked against one action per turn. Each one counts either a unit's own timeline turns, the battle clock, or the party-turn boundary at ReturnControl. None counts hero actions, so none needed a change, and none reads TurnMode outside TurnRules.
- Region rules (§14.20). Timed rule events (the Drowned Arks' rising water, the anchor heave Under the Anchors, shard strikes, a tile's
LifeSeconds) follow the clock. A party turn still runs to the next enemy arrival, so they land after the same party turns as in PartyWindow. A hero's TurnStart/TurnEnd hooks (standing in floodwater slows and wets) run once per hero at each boundary, the heroes who did not act included. An enemy's run on its own turns, andEverycounts those runs. Darkness and light are read from positions only. - Rule breaks (§14.9). TwinTurn and GravityStamp count the breaker's own turns (
TurnsTaken), which the enemy side takes whatever the party does. - Joining units. A tamed monster, a domesticated one and a wanderer are independent: they act on their own icon, never take or block the party's one action, and their tame countdown, bond and trust count their own turns. A recruit joins through Talk, which is the turn's action, and may act from the next party turn. Every join still clears its acted mark through
ClearActed. - Triggers. TurnStart and TurnEnd fire for every commanded hero once per party turn. ActionEnd fires only for the hero who acted.
- Countdown badges (§2.10).
CountdownLeftcounts the other icons due first, so it reads the same in both modes. - Pickups and corpses (§13.3.1, §14.7). They age one step per party turn at
ReturnControl, soPickupLifetimeActionsandCorpseDecayActionsmean party turns in every mode. - Tests:
TurnModeAnyHeroTestscovers all of these.
Battle view (✅ GG-T787). The view asks the seam one question, TurnRules.OneHeroPerTurn, and never reads TurnMode itself.
- No ✓ acted marks. The turn is one action, not one per hero, so no hero greys or wears the ✓ (
UnitView.SetActedstays off). A hero pressed while the action is spent says "The party has acted this turn". - The banner. Each time control comes back it reads "Move any hero · N.Ns left" with the gap's seconds (just "Move any hero" with no limit). A gap too short for anything reads "Too little time for any hero — Guard (…)".
- The gap lane and Guard call. The lane's label names the one action: "N.Ns · one hero: move or skill" (or "move", "skill"); red "Guard" when nothing fits, when GUARD glows gold as in PartyWindow (
TooLittleTime). - Selection. It stays on the hero who acted last, since the same hero may go again; only if that hero fell or can't act does it move to the first hero who can.
- The pickers.
TurnModes.AvailablelistsAnyHeroEveryTurnafter PartyWindow, so Settings and New Game offer it; its name and explanation areglossary:turn_mode_any_hero_every_turn("Any hero every turn").
Bots (✅ GG-T785). The smart and casual HeroBot play this mode by picking the single best hero action across the whole party each turn. Two seam questions replace what PartyWindow's bots counted: TurnRules.HeroesLeftAfter(actor) is the rest of HeroesLeftToAct in PartyWindow and 0 here, so TimeBalance values a turn as one action and leftover seconds deny no ally anything; TurnRules.ActsLaterThisTurn(ally) is true in PartyWindow for an ally that hasn't acted and never here, so SetupValue gives no ally-still-to-act bonus (a set-up spans turns, and the ally answers it next turn at the earliest). PartyWindow's scoring is unchanged. BotRunner needed no change, since every accepted command returns control, and no enemy charge, retreat or targeting rule assumes how many heroes moved between enemy turns. Tests: The_bot_planning_seam_counts_one_action_per_turn, The_smart_bot_wins_a_stage_and_it_replays_identically, The_casual_bot_finishes_a_stage_and_it_replays_identically and The_smart_bot_takes_one_action_per_turn_and_the_same_seed_decides_the_same (TurnModeAnyHeroTests).
Tutorial and automation (✅ GG-T788). Both ask TurnRules, never TurnMode.
- Tutorial. Every lesson's scripted move is one hero's one drop (the chain lesson's two pincers come from a single drag), so the steps work as they are. The one lesson whose copy assumed every hero acts each turn, The hold timer, has a one-hero variant (
Lesson.TextOneHero, picked byLessonTextwhenTurnRules.OneHeroPerTurn): "Each turn one hero acts — any hero, the same one again if you like — and that action is the party's whole turn". - Automation.
/statereportsone_hero_per_turn(the seam's answer),to_act(HeroesLeftToAct) and per heroactedandmay_act(TurnRules.MayAct, time aside), so the harness sees who may act now in either mode.
Post-battle turns and actions (✅ GG-T944). BattleResults.ActionsTaken counts every accepted command, Guards included, and EncounterRecord.Turns counts commands observed, so neither is a party-turn count in PartyWindow. BattleResults.TurnsEnded and ActionsAtTurnEnd are bumped at the one turn boundary (beside TurnRules.ResetTurn), and PartyTurns = TurnsEnded + 1 when an action was taken after the last boundary (a winning action ends the battle before any boundary fires, so the turn it ended in still counts). They are pure counters that no rule reads, so PartyWindow replays identically. PartyTurns is carried into EncounterRecord.PartyTurns, the recording's outcome (turns), BattleReport.PartyTurns/Actions (both commits, campaign and Crucible) and one results row, Battle length, on victory, defeat and the Crucible: "N turns", or "N turns, M actions" when the two differ (several heroes acted in a turn). The view never reads TurnMode. In this mode the two are equal.
The Crucible (✅ GG-T945). Decision: the Crucible plays the player's resolved mode, like every battle: BattleFactory.Build sets it from TurnModeSetting.Resolve (the save's lock, else the profile). Nothing in the Crucible needs one mode, so none is pinned. The seed stays shared: Crucible.SeedFor is the save plus Runs, and the mode is a separate BattleSetup field, so a save replays the same gauntlet in any mode. Records are split by mode, because a one-action turn clears far fewer waves than a whole party window and the counts aren't comparable. Crucible.Commit keys the record by TurnRules.RecordMode (meta never reads BattleState.TurnMode). PartyWindow's record stays in Best/BestGold, so an older save loads and reads unchanged. Every other mode's goes in CrucibleSave.ByMode (§22.10).
Tests. TurnModeAnyHeroTests: every able hero free at a turn's start, one action ending the turn and running the clock to the next enemy arrival, the same hero twice in a row, a second action refused, Guard banking like PartyWindow, the minimum gap with forced Guard and Rally, heroes first in every wave, the one-orb time-bank cap (PartyWindow's cap unchanged), cooldowns, Turns buffs and tempo, Guard's Protection, a Frozen foe, pickups and corpses, region hooks, timed rule events, turn triggers, a foe's own turns, tames, a recruit's Talk, wanderers, the countdown badge, the bot planning seam, smart and casual bot battles that replay identically, the same seed deciding the same, and the party-turn counters, results row and encounter record. TurnRulesTests pins PartyWindow replaying identically through the seam.
Soak (GG-T790, run 2026-11-26 on 684c461a, casual difficulty 10 re-run on 3e1a3694 after a low-memory kill; research/TurnModes.md). No stalls, soft-locks, invariant breaks or bot refusals, so no Mode A code changed.
| bot | diff | win % | runs | hero acts/run | enemy turns/run | heroes/turn | hero acts/enemy turn | guard forced/chosen |
|---|---|---|---|---|---|---|---|---|
| casual | 5 | 38 | 26 | 493.5 | 496.2 | 1.35 | 0.99 | 103/56 |
| smart | 5 | 88 | 17 | 132.2 | 133.4 | 2.62 | 0.99 | 79/21 |
| casual | 10 | 60 | 20 | 445.6 | 498.1 | 1.57 | 0.89 | 885/230 |
| smart | 10 | 88 | 16 | 172.1 | 183.8 | 2.54 | 0.94 | 201/58 |
Close to UnmovedThisRound: about one hero action per enemy turn, downtime capped at 3–4 enemy turns and no enemy-only stretches. The smart bot has the most choice of any mode so far (about 2.6 heroes and over 100 legal actions a turn) and Guards rarely. It wins 88% at both difficulties, but no seed got past still-02. Open (GG-T1175, GG-T1176): the casual bot's battles run near the soak's 900-command cap, about 786 hero actions a run at swamp-01, where it lost 11 of 12 runs at difficulty 5 (about 620 a run there and 495 at cave-03 at difficulty 10). Those losses are very likely cap timeouts, not defeats. The run predates the soak's capped column (GG-T1175), and the same swamp-01 stall under Mode B (all capped, no defeats) is being diagnosed in GG-T1176. Casual also does better at difficulty 10 (60%) than at 5 (38%), with far more forced Guards there (885 against 103). The numbers above are as measured.
2.13.2 Any hero who hasn't moved this round (UnmovedThisRound) — ✅ Built and playable (GG-T794 to GG-T801, GG-T1087, GG-T1091, GG-T1095); soaked (GG-T803)
Owner (2026-11-26): "Mode B: round robin with guard, all heroes must act before reset." Each party turn exactly one hero acts, as in §2.13.1, but only a hero who hasn't moved this round. When every able hero has moved, a new round frees them all. Guard is always open and uses no hero's place. Everything here lives in TurnRules (KeepsRounds is the one mode check); no other code reads TurnMode.
Core rules (✅ GG-T794, TurnRules).
- Who may act. A hero may act when it is alive, commanded, not Immobile, nobody has taken the party's one action this turn (
ActedThisWindow, as in §2.13.1) and it hasn't used its place this round (Unit.ActedThisRound).MarkActedsets both marks.HeroesLeftToActlists the able heroes with neither mark. A moved hero reads as acted (HasActed) and a command for it is refused. - Able this round (
AbleThisRound) = alive, commanded, on the board and not Immobile. A hero who falls, or is Frozen or Asleep, is skipped and never holds the round up. - The round resets at a party-turn boundary (
ResetTurn) when someone moved this round and no able hero is left unmoved (RoundComplete).BattleState.Roundgoes up by one (from 1), everyActedThisRoundclears, and the runner emitsRoundStartedEvent. A cleared wave also resets the round if anyone had moved in it (each wave opens with every hero free); a wave with nobody moved keeps its round. - Falls, revives and joins. A fallen hero keeps its mark: revived, it waits for the next round if it had moved, and may act this round if it hadn't. A unit joining the hero side mid-round (
ClearActed) may act this round and the round waits for it. An independent ally (tamed, domesticated, wanderer), a foe or a summon is never able this round, so it never takes a place or holds the round up. - What an action spends, and Guard. As in §2.13.1: a drag spends its share of the gap, a skill, item, spell or Talk
HeroActionSeconds, and every action ends the party's turn (EndsPartyTurn); leftover seconds are lost. Guard uses no place: it gives the turn up and the round waits. Its Protection (1 Turn) and bank (GuardCharge, capped atGuardMaxCharge) are unchanged. Forced Guard (TooLittleTime) and Rally are unchanged: a forced Guard stacks Rally, uses no place, and any hero action resets it. - State. The marks live on the units and the counter on the state, so Clone and replay carry them.
Per-turn systems (✅ GG-T795, GG-T796). A round is only who may act, never a unit of time. A party turn still spans one enemy arrival (or a cleared wave), so everything §2.13.1 keeps on party turns stays there and nothing counts rounds.
- Mana. Pincer and Guard charge and regen are unchanged. The time bank keeps §2.13.1's per-action cap:
TurnRules.MaxTimeBankOrbs=AnyHeroMaxTimeBankOrbs(1), every drop being the turn's only action. - Turns buffs, Protection, cooldowns, Frozen/Sleep/Stun, party tempo tick at each party turn's boundary, for a hero waiting out the round too. A cooldown no longer than the party is ready by the hero's next place: the round is the cadence.
- Triggers and region hooks. TurnStart/TurnEnd and a hero's region TurnStart/TurnEnd hooks fire for every commanded hero once per party turn, moved or not; ActionEnd only for the actor. RoundStart is the one per-round trigger: when
ResetTurnstarts a round, it fires for every living commanded hero after its TurnStart (BattleRunner). - Unchanged. Timed rule events follow the clock; rule breaks, tames, bonds and wanderers count their own turns; a recruit joins through Talk, which uses the talker's place; the countdown badge (
CountdownLeft) reads as in PartyWindow; the support extra turn is enemy-side. A regionRuleHookDef.Everycounts hook matches, not rounds. - The enemy AI (GG-T798, decided: no change). Foes don't know who has moved this round:
EnemyPlannertargets by taunt, personality, distance, HP and id.
Battle view (✅ GG-T800, GG-T1091). The view asks TurnRules only.
- ✓ marks. Unlike §2.13.1, a hero that used its place (
TurnRules.MovedThisRound) keeps the dimmed ✓ until the round resets. Picking it up is refused with "<Hero> has moved this round · free again in round N". - Round readout. Above the timeline's left end: "Round 3 · 2 of 4 moved" (
TurnRules.RoundProgress: moved = living commanded heroes that used their place; of = those plus the heroes still able to take one). Hidden when the battle keeps no rounds or is over. - Round start. On
RoundStartedEvent: the banner "Round N · every hero may move again", a "Round N" feed line, a rising sting, and every hero's ✓ cleared with a small pop (none under Reduce Motion). - Banner, gap lane and Guard call. Shared with §2.13.1 through
OneHeroPerTurn: "Move any hero · N.Ns left", the lane's one-action label, and "Too little time for any hero — Guard (…)". - Selection. As in §2.13.1 it stays on the selected hero while that hero is still in
HeroesLeftToAct. The hero who just acted never is here, so the selection moves to the first unmoved hero. - The pickers.
TurnModes.Availablelists the mode, so Settings and New Game offer it as "Unmoved this round" (glossary:turn_mode_unmoved_this_round).
Tutorial, results and Crucible (✅ GG-T1095). Only the "hold" lesson's text assumed the same hero may act again, so under rounds (TurnRules.HasRounds) it reads Lesson.TextRound ("Each turn one hero who hasn't moved this round acts … once every hero has moved, a new round frees them all"). Every other lesson goes through MayAct/GetSlotStatus. The post-battle Battle length row appends ", N rounds" (TurnRules.RoundsPlayed: finished rounds plus the current one if anyone moved in it; 0 outside this mode → BattleResults.Rounds → BattleReport.Rounds, also EncounterRecord.Rounds). The Crucible plays the resolved mode and keys its records by TurnRules.RecordMode (GG-T945), so this mode keeps its own record row.
Automation (✅ GG-T801). /state reports round (BattleState.Round, 1 in other modes), one_hero_per_turn, to_act, and per hero acted_this_round (TurnRules.MovedThisRound, false outside this mode) beside acted and may_act.
Bots (✅ GG-T798, GG-T1087). HeroBot reads the round through Unit.ActedThisRound, which only this mode sets, so the other modes replay unchanged.
- Guard limit. Guard uses no place, so a voluntary mid-round Guard keeps every moved hero locked out. The bot takes at most
RoundGuardLimit(1) voluntary Guard per round, then spends an unmoved hero. - Set-ups. An ally that already moved can't close a set-up until the round ends, unless this action is the round's last.
- Saving for pincers (smart bot, GG-T1087). Mid-round with 2+ heroes unmoved, a hero with pincer prospects (
PincerPlannerfinds a Complete or Setup walk) is saved: its non-pincer candidates costRoundSaveCost(6), so a hero with no prospects spends the turn. A real pincer is never charged, and nothing is charged at round start, with one hero left, or when no unmoved hero lacks prospects.
Tests. TurnModeRoundTests: round one, refusal until reset, reset on the last able hero, fallen/Frozen/Asleep skipped, a revived hero's mark, joiners, Guard using no place, wave resets, Clone, other modes never keeping rounds, bot replays, the same seed deciding the same rotation, enemy targeting, the pincer-saving planner, the time-bank cap, cooldowns, Turns buffs and tempo, Guard's Protection and bank, a Frozen foe, RoundStart and turn triggers, region hooks, timed rule events, tames, wanderers, summons and the countdown badge.
Soak (GG-T803, run 2026-11-26 on 066b4101; research/TurnModes.md). No stalls, soft-locks, invariant breaks or bot refusals.
| bot | diff | win % | runs | hero acts/run | enemy turns/run | heroes/turn | hero acts/enemy turn | guard forced/chosen |
|---|---|---|---|---|---|---|---|---|
| casual | 5 | 43 | 23 | 551.6 | 553.6 | 1.10 | 1.00 | 84/47 |
| smart | 5 | 91 | 23 | 104.1 | 108.0 | 2.36 | 0.96 | 117/79 |
| casual | 10 | 27 | 15 | 362.7 | 376.3 | 1.28 | 0.96 | 175/77 |
| smart | 10 | 62 | 37 | 214.3 | 226.3 | 2.14 | 0.95 | 481/106 |
About one hero action per enemy turn, downtime capped at 3–4 enemy turns, and no enemy-only stretches, so foes and party trade evenly. Both bots win far more than under HeroTimeline. Open (GG-T1175): the casual bot's battles run long (about 550 hero actions a run at difficulty 5, against the soak's 900-command cap), so some casual losses, mostly at swamp-01 (1/12 at difficulty 5, 0/4 at 10), may be cap timeouts or a soft-lock rather than real defeats. The numbers above are as measured.
2.13.3 Heroes on the timeline (HeroTimeline) — ✅ Built and playable (GG-T805: GG-T807 to GG-T815, GG-T1070 to GG-T1111, GG-T1169 to GG-T1173); soaked before the 4 s rule (GG-T817)
Owner (2026-11-26): "Mode C: heroes are part of the timeline and act when it's their turn", and "if the hero is on the timeline, they get 4 seconds to move and then it resolves itself and the timeline begins again." Every commanded hero has its own turn icon on the shared bar with the foes (Grandia style; this lifts "heroes have no icons here", §2, §2.0). When a hero's icon reaches the left edge the clock stops and that hero alone acts, in a frozen 4 s turn. Its one action is its whole turn; then the clock runs on to the next hero's icon, resolving every foe turn on the way. The mode lives in TurnRules (HeroesOnTimeline, IsHeroIcon, NotThisHerosTurn); no other code reads TurnMode.
Who may act (✅ GG-T1074, GG-T1083). BattleState.ActiveHeroId is the hero whose own icon arrived (-1 between turns; set by BattleRunner as the icon arrives, kept by the clone). Every other hero reads as acted (HasActed), is left out of HeroesLeftToAct, and a command for it is refused with "Not this hero's turn" at no cost. OneActionPerTurn holds, so the active hero's action, or its Guard, ends the turn: MarkActed, ActiveHeroId = -1, then AdvanceUntilHeroTurn runs the clock to the next hero icon. Every hero turn is a party-turn boundary (IsTurnBoundary is always true). The battle opens on the first hero's turn (BattleRunner.Setup). Because the turn is a fixed 4 s, "Too little time", forced Guard and Rally never arise here.
Hero icons: entry, recovery and joins (✅ GG-T807, GG-T808, GG-T810, GG-T1075, GG-T1101):
- Entry by Speed. A hero's icon enters at its Speed's entry (
BattleEngine.EntrySeconds), judged againstFormulas.ReferenceHeroSpeed(12 + 0.7 per level above 1) instead of the foes' reference, so a faster hero enters further left. Heroes open each wave ahead of the foes: the wave's foes open behind the latest hero arrival. - Recovery. When a hero's icon reaches the left edge it resets and is off the bar for
BattleConfig.RecoverBaseSeconds, then re-enters at its Speed's entry (HeroIconArrived). Hero and foe icons race on one clock (BattleEngine.RunClock). - No spacing.
TimelineSpacing(§2.12) keeps foes' turns apart for the player's sake; it does not space hero icons, which race the foes unspaced. - Ties. On the same tick a hero's turn resolves before a foe's (§2.4): casts > rule hazards > hero turn > foe turn > lower entry id. A seeded run replays identically.
- The frozen 4 s turn (GG-T1171, replaces GG-T1169's window). Owner: "if the hero is on the timeline, they get 4 seconds to move and then it resolves itself and the timeline begins again." When a hero's icon reaches the left edge that hero gets a fixed
BattleConfig.HeroTimelineTurnSeconds= 4 s (TurnRules.TurnTicks= 40 ticks, whatever icons are near the edge) with the timeline frozen: no icon moves while it holds or acts. The action resolves without running the clock (TurnRules.SpendsClockfalse), so the turn is never cut short and never too short to act in; a hold that reaches 4 s is a forced drop. Then the clock runs on to the next hero's own icon, resolving any foe turns on the way. The time until the next foe acts stays available asTurnRules.NextFoeTicks. (GG-T1169 had made the turn run to the next foe icon with the clock running, and the first cut ended it at the next hero icon too, which with 6–7 heroes left ~0.2 s and forced Guard almost every turn.) - Guard (GG-T1171). Guard's rule is unchanged: it gives up the rest of the turn and banks it as mana charge (
TurnRules.GuardCharge: the turn minus the time held, atGuardChargePerSecond10/s, capped atGuardMaxCharge40). With a fixed 4 s turn, a Guard pressed at once banks the full cap (40); one pressed after 1.5 s banks 25. - Bots (GG-T1173).
HeroBotreads "does this foe act next?" (a threatening foe's next blow postponed inPushValue, Guard's Protection inGuardValue, a Countermarch's weight) fromTurnRules.NextFoeTicks, not the 4 s turn; pushback and Slow buy no turn time here (WindowGainTicksis 0: they can't lengthen a fixed turn), only the hero turns they let arrive first (HeroTurnsValue). - Falls, revives and joins. A hero that falls leaves the timeline; if it was the active hero,
ActiveHeroIdclears andApplyresumes the advance to the next living hero's icon (also when a TurnEnd/TurnStart region hook fells it as its turn opens). Revive mid-wave and a recruit's Talk (DoTalk) put a hero on the timeline at once throughScheduleHeroIcons(onlyMissing), leaving every other icon untouched (this closed GG-T808's wave-only gap). A wave guest gets its icon at its wave's opening. A tamed ally, a domesticated monster and a wanderer keep their own non-hero icons and never becomeActiveHeroId; a rule summon gets a foe icon.
Rates and per-turn systems (✅ GG-T1102). Every hero turn is a party-turn boundary, but each hero counts its own turns, the way a foe does (GG-T809). TurnRules' summary records each answer below.
- Own turns. A hero's Turns buffs, skill cooldowns, regen and TurnStart/TurnEnd run only when its own icon arrives. On another hero's turn, only a halting debuff (Frozen) ticks. A Frozen hero's icon is halted, so its freeze also counts down on each foe turn and it always thaws.
- Sleep (GG-T1100,
804f6d3d). When an Immobile hero's icon arrives and the hero isn't halted, it loses that turn, like a foe's skipped turn. The icon re-enters at its Speed's entry and the hero never becomesActiveHeroId.TurnSkippedis emitted (asleep/immobile), and the hero's own Turns buffs (Sleep included) and cooldowns tick. The clock then runs on to the next hero's icon. - Hasten, Quicken and Slow on a hero. Hasten (
HastenU),HastenSeconds(support haste, haste pickups) and a buff'sTempo(Slowed: −1) move only that hero's own icon: Hasten rushes it, and Slowed'sTimelineSpeedMultiplierslows it. They do not also raise or lower party tempo. Doing both would count the effect twice, once as the hero arriving sooner and again as every foe arriving later. In every other mode heroes have no icons, so party tempo is still how a hero's haste is felt. - Party tempo and Rally still slow foes only (
BattleEngine.EnemyTempoMultiplier). They speed the heroes up relative to the foes and never touch a hero's own icon. A forced Guard stacks Rally and any hero action resets it, as before. - A foe's Pushback lands on a hero's icon like any other icon.
Pushbackhas no hero exception, so the push adds stun at an empty bar, or adds to recovery while the icon is off the bar. Audit ofabilities.jsonwithclasses.json: the only enemy pushback is the Spire Shover's Shove, plus any hero pushback skill an Echo copies. Every enemy Hasten (Enrage, Chrono Rewind and Open Reservoir on Self; Charge Howl and Feed the Herd on AllyOnly) lands on foes, never on a hero. - Mana income per hero turn (§3.1). One hero turn is one action. Pincer charge and spells are both per action, regen follows the clock, and Guard's bank is unchanged. The time bank keeps AnyHeroEveryTurn's per-action cap:
TurnRules.MaxTimeBankOrbs=AnyHeroMaxTimeBankOrbs(1). - The support extra turn (
supportTurnOwner, GG-T307). Unchanged and enemy-side only. A Turns buff a hero gains on its own turn already lasts until that hero's next arrival, so no hero needs an extra turn.
The enemy AI (✅ GG-T1105, decided: no change). Foes don't know whose icon arrives next, just as they don't know who has moved in Mode B (GG-T798). EnemyPlanner picks its target by taunt, then personality, then distance, HP and id. Its step and its ranged pick also read only the board and HP, never ActiveHeroId or the order of the hero icons. So a foe may hit or push back any hero, including the one about to act, but it doesn't seek that hero out. Its Pushback lands on whichever hero icon its pattern catches, with no hero exception. This can't soft-lock the battle: a push only adds time (stun at an empty bar, or more recovery), and the one clock keeps every icon moving, so each hero's icon still arrives. TurnRules' summary records this, and TurnModeHeroTimelineTests pins it.
Battle view (✅ GG-T814, GG-T1109, GG-T1110, GG-T1172). The view asks TurnRules only.
- Hero icons. A hero's turn diamond rings hero blue (
EntryColor/HeroTurnRing); hero recovery shows in the tray like a foe's. The prominence slot holds the active hero's own entry ("NOW", gold). On the board the active hero wears a breathing hero-blue ring just outside its tile (BoardView.SetActiveHero), hidden while dragging and steady under Reduce Motion. - Selection and pickup. Picking up a hero whose icon hasn't arrived is refused with a banner naming whose turn it is (
TurnRules.NotThisHerosTurn). - Hold and gap lanes (GG-T1172). Held, the timeline stays frozen: no icon glides, and the hold lane drains the 4 s across the whole bar, with the drain bar under the hero as in §2.0; at 4 s the drop is forced ("Time's up!"). Not held, the gap lane starts spanning the bar and reads "<hero>'s turn · 4.0s · move or skill", draining with the turn. The 4 s starts when the hero's turn begins (the icon arrives,
ActiveHeroIdset), not at pickup (GG-T1183): the gap lane drains from then, a pickup carries on from the seconds already spent, and an untouched hero at 0 s resolves itself as a Guard ("Time's up!"), after which the timeline runs again. This follows the owner's literal rule; revert to pickup-start if the owner prefers it. - The pickers.
TurnModes.Availablelists the mode, so Settings and New Game offer it as "Heroes on the timeline" (glossary:turn_mode_hero_timeline).
Automation (✅ GG-T815). /state reports heroes_on_timeline, active_hero_id (-1 between turns and in other modes) and hero_icons (id, owner, u, in_recovery, active; empty in other modes), beside to_act, acted and may_act.
Tutorial, results and Crucible (✅ GG-T815, GG-T1111). The tutorial copy landed in bd4f896e: the "hold", timeline and Guard lessons read Lesson.TextHeroTimeline / Lesson.ShortHeroTimeline under TurnRules.HeroesOnTimeline (picked before TextRound and TextOneHero), and the system Guard lesson names the acting hero. The post-battle Battle length row reads "N hero turns" (", M actions" only when the two differ): BattleRunner.Apply bumps BattleResults.HeroTurns when the active hero's action lands (a winning action included; the active hero is read before the action resolves, so a hero that falls in its own action still counts), 0 in every other mode → BattleReport.HeroTurns (from BattleFactory.Commit and Crucible.Commit) → BattleReport.TurnsLabel, also EncounterRecord.HeroTurns. The Crucible needs nothing more: it plays the resolved mode and keys its records by TurnRules.RecordMode (GG-T945), so Heroes on the timeline keeps its own record row.
Bots (✅ GG-T812, GG-T1106, GG-T1173). HeroBot counts a stall per hero turn (freshWindow = the active hero still to act) and plays only the active hero. The smart bot values a Pushback, a pincer's push or a Slow by the hero turns it lets arrive before the delayed foe acts (HeroTurnsValue, HeroTurnWorth 3, half against a non-threat; HeroTurnsBought counts hero icons in the (old, new] act ticks), and since GG-T1173 reads "does this foe act next?" from NextFoeTicks. Both are 0 in other modes, so those replay unchanged.
Tests. TurnModeHeroTimelineTests: entry by Speed, one clock, heroes opening each wave, ties, replay, the frozen 4 s turn, the active-hero refusal and advance, Guard's Protection and bank, a fallen active hero, revive and recruit icons, Sleep skips, own-turn buffs and cooldowns, a Frozen hero thawing, Slow/Haste/Hasten on hero icons, region hooks and triggers per hero turn, tames, wanderers, summons, wave guests, timed rule events, the countdown badge and the enemy AI. BotTests (GG-T1106 region): smart and casual bots finish the first campaign stage without soft-lock and replay identically from one seed.
Soak (GG-T817, run 2026-11-26 on 8dc13462; research/TurnModes.md). These numbers predate the 4 s rule: the run came before both GG-T1169 and GG-T1171, when a hero's turn still ran to the next icon of either side with the clock running, which is why Guard was mostly forced. They do not describe the mode as built. Re-soaking under the 4 s rule is GG-T821's. No stalls, soft-locks, invariant breaks or bot refusals; every casual loss was a real defeat at greenvalley-01, not a cap timeout.
| bot | diff | win % | runs | hero acts/run | enemy turns/run | heroes/turn | hero acts/enemy turn | guard forced/chosen |
|---|---|---|---|---|---|---|---|---|
| casual | 5 | 0 | 12 | 60.7 | 124.7 | 1.00 | 0.49 | 848/95 |
| smart | 5 | 50 | 28 | 108.2 | 127.0 | 1.00 | 0.85 | 3491/209 |
| casual | 10 | 0 | 12 | 48.6 | 132.2 | 1.00 | 0.37 | 612/72 |
| smart | 10 | 20 | 20 | 118.9 | 181.2 | 1.00 | 0.66 | 2766/166 |
Under the old rule the foes out-paced the party (under one hero action per enemy turn, downtime up to 12–20 enemy turns) and the casual bot never cleared the opening stage.
3. Resources
3.1 Mana (the orb economy)
Amended 2026-10-10 (owner decision): mana is generic. Every orb is identical and any spell can be paid from any orbs. Superseded 2026-11-27 (GG-T1807) by §3.1.0: wherever 3.1.1 to 3.1.9 below say bank, orb row, owned orbs or "mint an orb", read the meter rule; the earning formulas (pincer charge, crits, interrupts, supporters, kills, strikes, regen, Guard) stand and now produce points for every meter. Superseded again 2026-11-28 (GG-T1915, GG-T1924) by the party pool of §3.1.0: wherever 3.1.1 to 3.1.9 below say bank, orb row, meter or "every spell", read the pool rule. The earning formulas stand and add their points to the one pool.
ManaBank is a capped count (capacity 12) shared by the party (GG-LAW-6). The HUD draws 12 orb slots; filled slots glow mana-blue, empty slots are dim.
3.1.0 The party mana pool (GG-T1915, owner 2026-11-28)
In plain words. The whole party shares one thin mana bar. Fighting, Guard and mana items fill it, and casting a spell spends that spell's price from it. A spell costs 100 mana for each point of its cost, so a 1-cost Heal costs 100 and a 4-cost Tornado costs 400. The bar holds 1000 and never more. Skills run on cooldowns and consumables on stacks; neither touches the bar. Mana Orbs stay retired: a whole grant is worded in points ("Mana Potion: +200 mana"), and player-facing text never says "orbs" for mana, apart from story lines that are lore.
Added 2026-11-28 (GG-T1924, under GG-T1915). ⬜ Not yet built: GG-T1925 (the Core pool), GG-T1926 (Echo, bot, preview, recorder), GG-T1927 (carried mana, casks, Well Rested, stage-end Dust), GG-T1928 (the thin bar), GG-T1929 (affordability text), GG-T1930 to GG-T1932 (tests), GG-T1933 and GG-T1934 (text), GG-T1935 (automation), GG-T1936 (delete the per-slot shims). Owner (verbatim, 2026-11-28): "button 1 would be Abilities (Skill/Spells/Consumables), Button 2 would be the guard button which would increase defense and send additional mana to your mana bar which is a thin bar that fills and allow you to perform spells and abilities (that aren't on cooldown)". Clarified by the owner: the mana bar is one thin bar for the whole party, not per spell and not per hero. It replaces the per-spell meters of GG-T1807 (history below). The owner then approved the bottom row [Abilities][Info][GUARD] with the bar full width just above it (§9.0). Every tuning value below is the planner's default, pending owner.
- The pool. One integer in
BattleState: the party's mana in points. It belongs to the party, not to a hero or a spell, so a hero going down or coming back changes nothing in it. It starts each battle at 0 plus the whole grants below. - Price. A spell's price is
AbilityDef.Cost x 100points (ManaPointsPerOrb= 100; costs are still 1 toBattleConfig.MaxSpellOrbCost4, so 100 to 400). Skills and items cost nothing from the pool. (Pending owner.) - Capacity.
BattleConfig.PartyManaCapacity= 1000, fixed for the battle. No gear, set bonus or level raises it (ItemDef.BankCapacityBonusstays retired). (Pending owner.) - Earned gains (the formulas stand: pincer charge, critical, interrupt, amplifier, mana supporters, kills
KillCharge, skill strikesStrikeCharge, ClutchClutchCharge, time regenRegenCharge, Guard, the Mana Siphon armor bonus) add to the pool after fullness damping:gain x (1 - ChargeFullnessDamping (0.7) x pool / capacity)(BattleEngine.DampedCharge; a positive gain never rounds below 1), capped at capacity. At full, earning stops: the gain is 0 and no fill event fires. (Damping kept and stop-at-full: pending owner.) - Whole grants are N x 100 points, undamped: battle-start gear (
ItemDef.BattleStartManaOrbs, Mage Robes 2, Wizard Robe 3), caravanmana_casks(+100 / +200 / +300 points, levelValueincaravan.json), mana carried on the road (WorldSave.CarriedMana, below), Well Rested (CampRestConfig.WellRestedMana= 100 points), potions and Ethers (GrantsOrbs: Mana Potion 2, Ether 3, Hi-Ether 6), the pickuppk_mana, Steal/Mug (1 per success), Meditate and Mana Pour (PoursOrbs), the drag-timer time bank (§3.1.8), regionGrantOrbsand armor set bonuses. Points past capacity are lost and reported: the grant's event and its Log line name the points that landed and the points lost. (Pending owner.) - Siphon. A foe's
DrainsOrbsN removes N x 100 points from the pool, never below 0. - Casting. A spell can be cast when the pool holds at least its price (plus the usual checks: not Silenced, the cast cap, a target). The cast spends the price at cast start, and an interrupted cast refunds nothing (§3.1.3).
Unaffordable(§4.5) means the pool is below the price. Silence, Sleep and Frozen block casting, not earning. - Echo. A hero that copies a spell pays the copied spell's price from the pool; with the pool below the price it can't cast the copy ("Not enough mana"). Foes and skills copy free, and so does a copy of a 0-cost spell.
- Guard is unchanged (§2.5): Protection, plus the unused turn time at
GuardChargePerSecond10 a second, capped atGuardMaxCharge40, as one earned gain into the pool, damped. (Pending owner.) - Skills and consumables. Skills keep their cooldowns (§4.1.1) and consumables their stacks (§4.3). Neither reads nor fills the pool.
- Stage end and expeditions. On a won battle,
BattleReport.ManaLeftis the pool's points; a win on the road stores them inWorldSave.CarriedMana(TravelRules.AfterBattle; 0 at camp), and the next battle'sBattleSetup.StartMana=TravelRules.StartMana+CampRestService.WellRestedMana+ themana_caskslevel'sValue, arriving undamped at battle start with the other battle-start grants (pastPartyManaCapacitythey are lost). A won battle that carries nothing on (CarriedMana0) settlesManaLeftinto Mana Dust:DustEconomy.SettleMana= floor(ManaLeft/ 100) xDustPerOrbLeft(1) (§3.1.4.2). Crucible and drill battles start at 0. A loss settles nothing. (Pending owner; the Dust rate is a balance setting.) - Mana Orbs stay retired (GG-T1811, owner answer 2 on GG-T1805; unchanged by GG-T1915).
SaveData.OwnedOrbsno longer caps or gates anything: there is no owned-orb count, no "row you can fill", and no loadout warning "needs 3 orbs, you have 2". The orb sources of §3.1.4.3 pay something else (GG-T1811), all pending owner: each milestone orb (11) becomes 3 Mana Shards (mat_diamond); each Halcyon find (5) becomes 15 Mana Dust plus a Halcyon gear roll (the Dust is built, GG-T1811; the gear roll is built, GG-T1842, its table pending owner); Broken Mana Orbs stop dropping and the Manasmith's "Restore a Mana Orb" action goes, a carried Broken Mana Orb paying 20 Mana Dust once. Migration (pending owner): a save that already holds owned orbs is paid once the replacement reward for each orb beyond the starting one, and each carried Broken Mana Orb as above; the fieldsOwnedOrbs,OrbRollsand the broken-orb count keep their names and are read only by that migration. Built (GG-T1811):ManaOrbs.AfterVictorypays the milestone Shards (MilestoneShards3, into the Shard wallet) and the find's Dust (HalcyonFindDust15, counted in the results' Mana Dust and listed on a "Bonus" row); Built (GG-T1842), the gear roll, table pending owner: the same seeded roll (SaveData.OrbRolls) that makes the find picks one piece of gear (ManaOrbs.HalcyonGear): its rarity is the highest whoseVendorTiers.RarityTieris open one progress tier (HalcyonGearTiersAbove1) above the ruin's own shop shelf (VendorTiers.RegionTier; Halcyon sits at tier 6 and the postgame Underspire at 8, so either find's gear is Legendary), and its pool is every equipment item of that rarity somedroptables.jsonrow already holds that a hero in the party can wear (Equipment.ProficiencyGate), in id order. It goes into the bag like battle loot (stack caps auto-sell), into the results' item list, and onto the Bonus row ("15 Mana Dust and Eclipse Ring: found in the ruins of Halcyon"); no pool, no gear. a new save holdsOwnedOrbs0 andBattleFactory.BuildleavesBattleSetup.OrbCapacityat 0; the Aetherist's Mana Orbs panel and the loadout's "needs N orbs" warning are gone. Save v28 pays an older save once (ManaOrbs.RetirePayout): each owned orb beyond the starting one counts first against the orb milestones cleared (3 Shards each), then the Halcyon finds made (15 Dust each), and any left over were restored from Broken Mana Orbs (BrokenOrbDust20 Dust each); each carried Broken Mana Orb is removed for 20 Dust. A save from before orbs were owned (OwnedOrbs0) is paid only for the Broken Mana Orbs it carries. - Determinism and replay. The pool is one integer in
BattleState, copied byBattleState.Clone; no gain, damping or spend step touches the RNG.OutcomePreviewerreports the points an action would add to the pool.BattleRecorderschema 7 writesrulesVersion3 with the pool's points in every state; records withrulesVersion2 (per-spell meters) or older load as legacy (shown, never re-simulated). - HUD. One thin party bar runs the full width just above [Abilities][Info][GUARD] (§9.0, GG-T1928). Built (GG-T1928):
Ui.PartyManaBarfills overPartyManaCapacitywith a tick every 100 points, and glows while any living hero's spell is affordable (steady under Reduce Motion); a gain's motes fly from their source (Guard's from the GUARD cell) to the bar where the fill will end, and a cast's spend drains it overPartyManaBar.DrainSecondswith a falling hum. The per-slotUi.ManaMeteris retired; a spell's face keeps only its ready glow. The Abilities sheet and the description panel show each spell's price against the bar ("Costs 300 · bar 240", GG-T1929), and the bar and the sheet read affordability from one helper. - Balance is unmeasured. Retune the capacity, the damping and the Dust rate only from owner-run soaks (after midnight, one at a time).
History: per-spell mana meters (GG-T1807, owner 2026-11-27; superseded 2026-11-28 by GG-T1915). Nothing below is live; the pool rule above replaces it. (The Mana Orbs retirement that was part of it stands, above.)
In plain words (GG-T1831). Each spell has its own mana bar. Every mana gain fills every spell's bar by the same amount, so a cheap spell fills faster than a dear one. Casting a spell empties only that spell's bar. Mana Orbs are retired: nothing is collected, carried or restored as an orb. A whole grant (a potion, a pickup, a caravan cask, mana carried on the road) is worded as points to every spell, 100 points for each old orb, so a Mana Potion reads "+200 mana to every spell". Player-facing text never says "orbs" for mana, apart from story lines that are lore.
Added 2026-11-27 (GG-T1807, under GG-T1805). 🟡 Partly built: GG-T1809 (meters), GG-T1810 (sources), GG-T1811 (meta: orbs retired, carried orbs, casks, Well Rested, Dust, the save migration) and GG-T1812 (bot, preview, recorder) and GG-T1814 (the Core mana tests) are in; still to build GG-T1813 (automation), GG-T1815 (tests), GG-T1829 (delete the ManaBank shim). Owner: "I guess mana should be collected as percentage for each of them a small heal and a tornado get equal amounts of mana but obviously the small heal would fill up faster ... spells would each have a loading bar to fill with mana gained through combat or through consumables." Owner answers (2026-11-27): Mana Orbs are retired as a progression item; Guard stays as built and banks into every spell; everything else takes the planner's defaults, marked pending owner below.
- The meter. Every Spell slot of every hero has its own meter
min mana points (integer; 100 points = 1 former orb), full atFull = Cost x 100(AbilityDef.Cost, still 1 toBattleConfig.MaxSpellOrbCost4, so 100..400). Skill and Item slots, Locked and Empty slots have no meter. Two slots holding the same spell (two heroes, or one hero twice) are two meters. Meters start each battle at 0 plus whole grants (below). - A gain G (any source, after damping) adds
Gto every meter of every living hero, each capped at its ownFull; nothing overflows into another meter and nothing is banked past full. Equal points, unequal fill: a 1-cost Heal and a 4-cost Tornado both gain 40 from a Guard, so Heal is 40% full and Tornado 10%. (Which spells receive a gain: every Spell slot of every living hero — pending owner (planner default 1).) - Dead and disabled. A downed hero's meters keep their points and receive nothing until revived. Silence, Sleep and Frozen block casting, not charging. A slot whose spell changes mid-battle (it cannot today) would restart at 0.
- Casting. A spell is castable only when its meter is full (and the usual checks: not Silenced, cast cap, target). Casting sets that meter to 0 at cast start; every other meter is untouched. An interrupted cast refunds nothing (as §3.1.3). The slot status
Unaffordable(§4.5) now means "meter not full". - Fullness damping (replaces the bank-count damping of §3.1.9): every earned gain is multiplied by
1 - ChargeFullnessDamping (0.7) x fullShare, wherefullShare= full meters / all meters of living heroes (BattleEngine.DampedCharge; a positive gain never rounds below 1). When every meter is full, earning stops (the gain is 0 and no event fires a fill). Whole grants skip damping, as before. (Damping base and stop-when-full — pending owner, planner default 4.) - Earned sources (unchanged formulas, now a gain to every meter): pincer charge, critical, interrupt, amplifier, mana supporters, kills (
KillCharge), skill strikes (StrikeCharge), Clutch (ClutchCharge), time regen (RegenCharge10 every 5 s of battle clock), Guard (§2.5), the Mana Siphon armor bonus. - Whole grants are N orbs = N x 100 points to every meter, undamped, capped at each
Full: battle-start gear (ItemDef.BattleStartManaOrbs, Mage Robes 2, Wizard Robe 3), caravanmana_casks(+1..+3), orbs carried on the road (TravelRules.CarriedOrbs), Well Rested (CampRest.WellRestedExtraOrbs), items withGrantsOrbs(Mana Potion 2, Ether 3, Hi-Ether 6), the pickuppk_mana, Steal/Mug (1 per success), Meditate and Mana Pour (PoursOrbs), the drag-timer time bank (§3.1.8), regionGrantOrbsand armor set bonuses. A foe's siphon (DrainsOrbsN) removes N x 100 from every meter (floor 0). (Translation rule — pending owner, planner default 3.)ItemDef.BankCapacityBonushas no meaning under meters and is retired (validation warns; GG-T1810). - Echo (GG-T1810, owner direction relayed 2026-11-27). A hero that copies a spell pays the copy's full price,
Cost x 100points, from whichever of its own spell meters holds the most points, provided that meter holds at least the price; ties go to the lower slot. Only that meter loses the price; no other meter moves, and the copy needs no meter of its own. With no meter of its own holding the price, the hero can't cast the copy ("Not enough mana"). Foes and skills copy free (as do 0-cost spells). (Source:Echo.PayingSlot,Echo.CanPay; the bot uses the same check.) - Stage end, Dust and carried orbs.
BattleReport.OrbsLeftis redefined as the number of full spell meters when a won battle ends (no owned-orb cap, since owned orbs are retired); it settles atDustEconomy.DustPerOrbLeft= 1 Mana Dust each (§3.1.4.2), and an expedition carries that count to its next battle asCarriedOrbs, which arrive there as N x 100 points to every meter. A loss settles nothing. Built (GG-T1811):BattleReport.OrbsLeft = BattleState.ReadySpellCountat commit;BattleSetup.StartOrbs= carried orbs + Well Rested (CampRestService.WellRestedOrbs,CampRestConfig.WellRestedExtraOrbs1 while Well Rested) + the caravan'smana_casks, none of the first two in the Crucible or a drill, and the runner grants it throughBattleRunner.GrantOrbsas whole orbs before wave 1. (Planner default 6, adapted to retired orbs — pending owner; the Dust rate is a balance setting.) - Bots.
HeroBottreats a spell as available exactly when its meter is full;SavingFor/SaveForCostretire (meters are independent, so nothing is saved for). With several ready spells the bot scores them as it scores any spell today; Guard is valued by the points it adds across unfilled meters.CampRoutine.BestLearnable's "above 6 orbs" rule reads cost tiers 1..4. Built (GG-T1812): a ready spell carries no mana price in the bot's score (OrbPenalty,SavingFor,SaveForCostare gone; a charging spell is never offered, asGetSlotStatusalready says); a mana grant (GrantsOrbs) and Guard are scored byHeroBot.MeterFill, the whole meters' worth of fill they add across unfilled meters; Steal scores while any meter is unfilled, and a foe's charging siphon counts while any meter holds points.CampRoutine.BestLearnableno longer exists (GG-T1077: the camp routine buys no abilities), so nothing there reads costs. - Determinism and replay. Meters live in
BattleStatekeyed by (hero id, slot index), integer points, iterated in party then slot order, and copied byBattleState.Clone; no gain or damping step touches the RNG.OutcomePreviewerreports the points an action would add (and the meters it would fill) instead of orbs minted. TheBattleRecorderrules version bumps; records made under the bank rule load as legacy (shown, never re-simulated).ManaChargedEventcarries the gain (after damping) and its reason; the view derives each meter's fill. The automation endpoints and soak JSON report per-meter points (GG-T1813). Built (GG-T1812):OutcomePreview.ManaMin/ManaMax(points to every spell) andFillsMin/FillsMax(meters filled) replaceOrbsMin/OrbsMax, and the confirm card reads "Mana +34 to every spell · fills 2";BattleRecorderschema 5 writesrulesVersion2 (BattleRecorder.IsLegacyis true for a record without it),startManain points, and ameterslist (hero, slot, ability, points, full) in place ofbank,bankCapacityandchargein every state;EncounterTelemetrycountsManaSpentas the points casts emptied (SpellManaSpentEvent) and addsManaGained, every gain in points. (Test:The_same_seed_and_commands_give_the_same_meters_on_replay.) - HUD. The orbs row (§3.1.4.1) and the mana globe are retired; each spell slot carries its own fill bar (§9, GG-T1820, GG-T1821). Built (GG-T1821): the orbs row, its charge ring, the source tags beside it, the orb spend flights and the aimed-spell orb marks are gone; mana motes land on the spell bars; the pincer and Guard billboards read in points to every spell ("Mana +34 to every spell · 3 heroes ÷1.5", "Guard · Mana +31 · 3.1s banked") and the Log keeps a line per Guard and per granted orb ("Mana Potion: +100 mana to every spell"); a slot's hold note reads "120 / 300 mana" and the hero card's MANA line counts full spell meters.
- Balance is unmeasured. Every spell now receives each gain, so a party's effective mana rate rises with how many spells it carries. Retune
KillCharge,RegenCharge,PincerChargePerHpand the damping only from owner-run soaks (after midnight, one at a time).
3.1.1 Costs
A spell's cost is a whole number of orbs (AbilityDef.Cost, an int in abilities.json); the UI renders it as that many orb pips (Ui.CostPips; above 3, one orb and "×N", GG-T372). Skills and items cost 0. Content costs are 1–3 (the former letter counts: Fireball 2, Bolt 3, Heal 1, …).
Amended 2026-11-08 (GG-T373, owner: "with 12 mana slots that means some of these spells need to get much more expensive, need to consider balance"): costs run 1–12 on a curve. ContentLoader.Validate refuses a cost outside 0..ManaBank.DefaultCapacity (12), and any cost on a non-Spell. Bank gear (up to +4, §3.1.4) only adds headroom; no spell needs it. The balance is unmeasured, pending the owner's /test soaks.
- What a party earns. Measured (GG-T265, 206 bot battles, before the BRAVE merge): about 0.09–0.11 orbs per player action for the greedy bot and 0.05 for the casual bot. A battle is 5 waves of about 2.5 foes and about 86 player actions, so that's 8–9 orbs a battle (about 1.7 a wave) greedy, and 4–5 (about 0.9 a wave) casual.
- Analytic cross-check from
BattleConfig: 12–13 foes × 105 charge × the share of their HP that pincers take (about 0.7), ÷ 1.5 for a typical three-hero pincer, × about 1.1 for chains ≈ 6 orbs. Fullness damping at a bank of 2–3 takes that to about 5. Crits, Guard (at most 0.4 a turn) and interrupts add 1–3, so play earns 6–8 orbs a battle. - On top of play come whole orbs: Meditate +1 (cooldown 5), Mana Pour +1 (cooldown 4), Steal/Mug, a Mana Potion 2, an Ether 3, a Hi-Ether 6, battle-start gear 2–3, Mana Casks 1–3, and orbs carried on an expedition. So a well-stocked party can reach 15 or more.
- Analytic cross-check from
- The tiers.
| Orbs | What it buys | Examples |
|---|---|---|
| 1 | single-target utility, spot heals, wards | Heal, Sleep, Silence, Antidote, Regen, Pre-emptive Ward, Hands of Mercy, Overdrive, Swap, Drench |
| 2 | single-target damage with a status rider; small heals with riders; Quicken | Shadowbolt, Omen, Thorned Hex, Drain Life, Den Mother, Slow, Flowing Current |
| 3–4 | strong single target; small-area damage; one long line | Fireball 3, Frost Nova 3, Poison 3, Hinder 3, Shock Wave 3, Bolt 4, Ward Grid 4 |
| 5–7 | strong area or party-wide effects: save for a wave or two | Red Mage Fury 5, Curse of Fate 5, Mass Heal 5, Barrier 5, Stasis 5, Cleansing Vigil 6, Sanctuary Rite 7, Frost 7 |
| 8–12 | ultimates: save most of a battle | Meteor 10 (11–12 left as headroom) |
- The guide (
ManaCostCurveTests.Guide; every hero spell must sit within 2 orbs of it):- Effect points per target: 10 damage = 1 and 20 healing = 1. A status adds its strength × its chance: Frozen 1.5; Sleep 1; Burning 0.8; Poisoned and Ward 0.7; Silenced, Slowed, Regen and Empowered 0.6; Blinded 0.5; Wet and Protection 0.3. A cleanse adds 0.4, Pull 0.25 a tile, a swap 0.5, and Pushback 1.6 a second (the timeline is the game's lifeblood).
- Times the targets the shape expects to catch: 1 for a single target or self, 1.6 for a radius-1 cross or diamond, 1.9 for a radius-1 square, 1.8 for a row or column, 2.4 for a plus or a radius-2 square, 2.6 for a radius-2 diamond, 2.5 for all foes and 4.5 for all allies.
- Flat additions: a drain's heal, and party haste (0.8 a tempo point, capped at the 3 points of the tempo floor).
- Adjustments: × 1.25 for an instant cast, × 0.8 for AdjacentOnly, × 0.85 for a 3+ turn cooldown.
- Priced convexly:
cost = clamp(round(0.9 × raw^1.5), 1, 12). - Why convex: a burst that hits a whole wave ends it before the foes act, and saving orbs risks losing them to overflow and to a siphon (
DrainsOrbs). So power in one cast costs more than its parts: single-target damage runs about 7–13 per orb, Meteor about 11 per orb only when it catches 2–3 foes, and Bolt or Ward Grid about 6 per orb.
- Early kits. The two slots open from the start (§4.7) hold spells of at most 3 orbs. The starting Cleric's and the tutorial's Heal and Pre-emptive Ward cost 1. The Drifter now opens with Frost Nova (3) and keeps Frost (10 since GG-T444: its 16-damage freeze on a 3×3 sits on the §3.1.1 curve at 10, not 7) in slot 4.
- What reads the cost. The spellbook price (
Abilities.Price= 120 + 80 × cost, so Meteor costs 920 g). The VFX tier (VfxStyleSheet.TierOf: 6+ orbs is Ultimate, 3–5 Major). The bots (§4.3):HeroBot.SavingFor, andCampRoutine.BestLearnable, which buys a spell above 6 orbs only after every cheaper affordable choice. - (Tests:
ManaCostCurveTests,Every_hero_spell_costs_between_one_orb_and_a_full_bank.)
3.1.2 Harvesting
Amended 2026-10-11 (owner: "mana needs to be a more rare resource … the number of participants in the attack increases the multiplier needed to earn a mana bubble"): pincers, crits, interrupts and the amplifier no longer mint whole orbs — they fill the mana charge meter (§3.1.9). Orbs still mint whole through BattleRunner.MintOrb (event OrbMintedEvent, reason string) from:
- Mana charge rolling over 100 (reason = what filled it:
pincer,critical,interrupt,amplifier,guard). - Steal / Mug (
steal): per target, chanceclamp01((LCK + 0.5 × AGI) / 50)→ 1 orb. - Battle-start gear (
battle start):ItemDef.BattleStartManaOrbssummed over the party's equipped items before wave 1 (Mage Robes 2, Wizard Robe 3). - Time bank (
time bank): see §3.1.8. - Mana items (
item): Mana Potion 2, Ether 3, Hi-Ether 6.
The view flies each orb from its source to its slot in a 0.22 s arc (overflowing orbs fade in flight).
3.1.3 Spending
Superseded 2026-11-28 (GG-T1915): a cast spends its price (Cost x 100 points) from the party pool at cast start (§3.1.0); the no-refund rule stands. (Was, 2026-11-27, GG-T1807: casting emptied the spell's own meter.) Orbs are spent at cast start; an interrupted cast refunds nothing. (Test: ManaBank.Spend(cost) removes cost orbs or fails without spending.Any_orbs_pay_for_any_spell.)
3.1.4 Bank-full rules (overflow)
Superseded 2026-11-28 (GG-T1915): the party pool is capped at PartyManaCapacity (1000, pending owner); earned gains stop at full, and a whole grant's points past capacity are lost and reported (§3.1.0). (Was, 2026-11-27, GG-T1807: no bank, no overflow; each meter stopped at full.) History:
| State | Mint |
|---|---|
Count + n ≤ cap
|
all land |
Count == cap
|
orb flies and fades; bank unchanged (OrbMintedEvent.Landed = false)
|
Count + n > cap
|
first cap − Count land, rest fade
|
Retired (GG-T1829): ItemDef.BankCapacityBonus gear raises the cap (summed over the party, max +4).BankCapacityBonus is gone; no gear raises a cap.
3.1.4.1 The orbs row, orb costs and regeneration (GG-T673, owner 2026-11-22)
Superseded 2026-11-27 (GG-T1807, GG-T1808): the orbs row, its capacity and "full stops earning" are replaced by per-spell meters and fill bars (§3.1.0, §9). Costs 1–4 and the kill, strike and regen sources stand. Amended 2026-11-28 (GG-T1915): the meters give way to the party pool; its one thin bar (§9.0) is the only mana display, and "full stops earning" holds again, for the pool (§3.1.0).
Owner: "return the mana orbs line, doing things fills mana orbs which glow with bloom once they are active"; "it's easier to interpret orbs than it is to do math … make spells cost mana orbs that you regenerate with time and more so with actions"; "all mana orbs need to always be sized properly and spaced equally, rendered from left to right."
- HUD. GG-T405's single globe is gone. A row of orbs (one per bank slot) sits a target gap under the ability row (under the board when the bar stands beside it). Every orb is the same size and the same gap apart, left to right, shrinking for a larger count so any capacity 1–20 fits. Lit orbs bloom (soft breathing glow, steady under Reduce Motion); the next empty orb shows the forming charge as a ring round its rim. Each orb earned from an action flies in as a mote with a sparkling trail along a quadratic bezier (randomised control point, so several fan out) into its own slot in order; time regen and Reduce Motion fill the orb without a flight. Aiming a spell pulses the orbs it would spend and rims the ones it still lacks in red; slot cost pips the row can't cover dim. Colours come from the blue Somnolith art (GG-T674):
Palette.ManaDeep#20193C,ManaIndigo#4B447D,ManaBloom#7A74AB,ManaGlint#B4516C. - Costs run 1–4 orbs (
BattleConfig.MaxSpellOrbCost, few enough to show as pips on the slot; validation refuses more). The old 1–10 costs folded monotonically, so cheap stays cheap and big stays big: 1→1 (12 spells), 2→2 (17), 3 and 4→3 (15), 5 to 10→4 (10).HeroBot.SaveForCostfollows to the top tier (4). - Capacity is per battle (retired:
BattleSetup.OrbCapacitywent in GG-T1844,BattleConfig.MaxOrbCapacityand bank gear's bonus in GG-T1829;). Owned Mana Orbs become a progression item in GG-T677 (start with 1, about 12–16 found in a straight run, cap 20); that ticket setsBattleSetup.OrbCapacity, 0 = the old 12; bank gear adds its bonus; never aboveBattleConfig.MaxOrbCapacity20OrbCapacityfrom the save. - Full stops earning. While every orb is lit, earned charge doesn't accrue at all (the ring stays empty) until a spell spends an orb. Explicit grants (potions, pickups) still overflow as in 3.1.4.
- New sources, on top of 3.1.9's (conservative first values, 100 charge = 1 orb, all damped by bank fullness): felling a real foe
KillCharge15; a hero's skill striking a foeStrikeCharge5 per foe (spells excluded, so mana never feeds itself); time regenRegenCharge10 everyRegenIntervalSeconds5 of the battle clock (about one orb per 50 clock seconds at an empty bank). Clutch! keepsClutchCharge20. Their reasons ("kill", "strike", "regen") show in the GG-T595 held-turn soak JSON beside "guard" and "pincer". Not yet measured; tune with the soak once the owner has targets. - Battle report.
BattleReport.OrbsLeftis the orbs still lit when the battle ended (GG-T676 converts them at stage end).
3.1.4.2 Unspent orbs settle into Mana Dust (GG-T676, owner 2026-11-22)
Amended 2026-11-28 (GG-T1915): a won battle settles floor(pool / 100) at DustPerOrbLeft Dust each, and an expedition carries the pool's points (capped at capacity) to its next battle, its last battle settling them (§3.1.0, pending owner). Was, 2026-11-27 (GG-T1807): "orbs still lit" meant full spell meters at the end of a won battle, uncapped (§3.1.0); 1 Dust each and the expedition carry stand.
Owner: "any Mana Orbs you have at the end of a stage are converted back to manadust and added to your currencies." The orbs are Halcyon batteries that can't hold mana for long (§27.3.3), so at the end of a won stage every whole 100 points left in the pool (BattleReport.ManaLeft) settle into DustEconomy.DustPerOrbLeft = 1 Mana Dust each (floor(ManaLeft / 100); a remainder pays nothing), added to the bag with the stage's own Dust (BattleReport.OrbDust, counted inside DustEarned). The results screen's Mana Dust row names the share: "+7 (4 from 4 unspent orbs)".
- Why 1 per orb: the same scale as
DustPerVictory(1) andFirstClearDustBonus(4). A late-game row of 12–16 owned orbs ended full pays a little more than a first clear, a real choice against casting, and still well short of a Shard's worth (DustPerShard= 10) per battle, so Shards stay valuable (GG-T625). - On the road: points carried to the next battle (
WorldSave.CarriedMana) are not settled; a won battle that carries nothing on settles itsManaLeft. - A loss (defeat, retreat, escape): the orbs simply discharge, no Dust, like every other reward of a loss.
- The economy ledger (
polish.py --balance) prints each run's Mana Dust and the share from orbs (#dust,#orbdust).
3.1.4.3 Owned Mana Orbs are progression (GG-T677, owner 2026-11-22)
Retired 2026-11-27 (GG-T1807, owner answer on GG-T1805: "RETIRE them as a progression item"). Nothing below caps a battle any more; the sources pay replacement rewards and old saves migrate as §3.1.0 says (pending owner). History:
Owner: "collecting 'Mana Orbs' becomes important because that is literally how much mana orbs you can fill in combat, so once you fill all your mana orbs you have to cast it to gather more mana, so the impact is immediately felt because going from one Mana Orb to two Mana Orbs doubles your magic casting abilities, and some spells require more Mana Orbs than you have so they aren't even worth equipping." Numbers: "with 5 slots and a spell cost max of say 4 mana … that's a total of 20 possible orbs in the game, with possible 12-16 being found in straight play through; this is a suggestion will need to dial this in naturally." Sources the owner picked: boss and milestone rewards, finds in Halcyon ruins, and the Manasmith restoring broken orbs found as loot.
SaveData.OwnedOrbs (Meta/ManaOrbs.cs) is how many orbs the battle's row can fill (BattleSetup.OrbCapacity, from BattleFactory.Build); a full row stops earning until a spell spends one (GG-T673). Every source is finite, and ContentLoader refuses content where they add up past BattleConfig.MaxOrbCapacity (20). Retired: BattleSetup.OrbCapacity (GG-T1844) and BattleConfig.MaxOrbCapacity (GG-T1829) are gone; nothing caps a battle's mana but each meter's own full.
| Source | Orbs | Where it lives |
|---|---|---|
| Starting orb | 1 | BattleConfig.StartOwnedOrbs
|
| Milestone orbs: the first full clear of each main-campaign theme (Tithe Moors through the Cathedral, 8) and of three postgame themes (the Bloom, the Underspire, Morrow's Shadow) | 11 | campaign.json MilestoneOrb
|
| Halcyon finds: each stage of the two Halcyon ruins (Halcyon ×3, the Underspire ×2) holds one orb, found on a victory there with a 25% chance until found | 5 | campaign.json OrbFindChance = 0.25
|
Broken Mana Orbs: a 4% chance per campaign victory (ManaOrbs.BrokenOrbChance) while fewer than 3 have dropped; the Manasmith restores each for 20 Mana Dust + 100 G
|
3 | BattleConfig.MaxBrokenOrbs, ManaOrbs.RestoreDust/RestoreGold
|
| Total possible | 20 |
A straight playthrough (main campaign and postgame, no replays) earns the 12 guaranteed orbs, finds about 1–2 of the 5 Halcyon orbs on single clears, and turns up about 2 Broken Mana Orbs over its ~50 victories: about 14–16, the owner's range. Replaying Halcyon stages and longer play reach 20. Rolls are seeded by SaveData.OrbRolls, so a save replays them identically.
- Migration: a save from before owned orbs (
OwnedOrbs0) getsManaOrbs.Derived: the starting orb plus one per orb milestone it has already been paid (SaveData.Milestones). Nobody is stripped of casting below what progress earned; a pre-GG-T677 save could fill 12, so a veteran early in the campaign now fills fewer, by design. - Loadout: the Abilities screen marks a spell whose orb cost is above the orbs held ("Spell · needs 3 orbs, you have 2", in the warning colour) and dims its extra pips. It can still be equipped.
- Manasmith: the refinery screen shows orbs held of 20, Broken Mana Orbs carried and a "Restore a Mana Orb" action.
- Results: "Mana Orb found · you now hold N" with the reason (a milestone, a Halcyon find), and a Broken Mana Orb row.
- Everywhere you fight (campaign, expeditions, the Crucible) fills your owned orbs. Only battles built outside
BattleFactory.Build(harness skirmishes, tests) keep the old default row of 12. Bounties don't drop orbs, and the Crucible pays no orb Dust (it commits on its own path). - Balance: casting starts at one orb, so every number here and every spell cost needs the next balance pass (GG-T276) to measure with owned orbs.
3.1.5–3.1.6 (struck 2026-10-10)
Spend ordering by color and the Colorless wildcard no longer exist — there are no colors to order or substitute.
3.1.7 At-a-glance mint cadence
| Event | Mana |
|---|---|
| 2-hero pincer that takes half a foe's HP | 52 charge (×1) |
| The same damage with 2 supporters joining | 26 charge (÷2) |
| Third link of a chain, same damage | 79 charge (×1.5) |
| Critical hit (physical or spell) | +10 charge |
| A Mana supporter (Red Mage, Ritualist, …) joining a pincer | its charge × 0.5 (Red Mage 30 → 15) |
| Any of the above with the bank at 6/12 · at 12/12 | × 0.65 · × 0.30 (fullness damping, §3.1.9) |
| Steal/Mug, 3 adjacent enemies, 2 rolls succeed | 2 orbs |
| Cancel an enemy charge | +25 charge |
| Battle start, one Mage Robes equipped | 2 |
| Drop with ≥ 3.75 s left on the drag timer, then an enemy turn | 3 (cap) |
| Guard with 2 s of turn left (GG-T189) | 20 charge (cap 40) |
3.1.8 Time-banked orbs
Amended 2026-10-09 (owner decision): the bank is fed by the optional drag timer, not by real-time seconds before an enemy trigger.
- A committed move stores
PendingTimeBankSeconds = clamp(TimeLeftSeconds, 0, 4)(0 when the timer is off). - At the start of the first enemy turn during that action's clock advance (
MintTimeBankinRunEnemyTurn), it converts to 1 orb perSecondsPerTimeBankOrb= 1.25 s, maxMaxTimeBankOrbs= 3, with a "Banked N mana" announcement. - It is cleared at control return and by Shield. Consequence (current truth, tuning watch): a quick drop that is not followed by an enemy turn within the same action banks nothing.
3.1.9 Mana charge
Amended 2026-11-28 (GG-T1915): each charge below is an earned gain to the party pool, damped by 1 - 0.7 x pool / capacity; there is no forming bubble and no rollover (§3.1.0). The formulas stand. (Was, 2026-11-27, GG-T1807: a gain to every spell meter, damped by the share of full meters.)
Added 2026-10-11 (owner direction). BattleState.ManaCharge (0–99) is the forming bubble; the HUD draws it filling the next empty orb from the centre. AddCharge emitted ManaChargedEvent (retired GG-T1844: an earned gain is a ManaGainedEvent with Kind Earned) and every full ManaChargePerOrb = 100 becomes an orb.
- Pincer:
charge = PincerChargePerHp (105) × share × (1 + 0.25 × chainIndex) ÷ (1 + 0.5 × (participants − 2)), minimum 2 when it lands.share= Σ over the trapped foes ofmin(1, HP removed by this pincer ÷ MaxHP);participants= the two attackers + every supporter. So a lean two-hero pincer earns at full rate, a four-hero dog-pile at half, and chaining is the way to farm. - Critical +10, interrupt +25, amplifier +30. Kills alone earn nothing.
- Mana supporters (
SupportEffect.Mana: Hexer, Harbinger, Machinist, Red Mage, Ritualist, Tinkerer) charge theirMagnitude × SupportManaFactor(0.5). - Fullness damping (Amended 2026-11-05, GG-T247): every earned charge above (pincer, crit, interrupt, amplifier, support, Guard, Mana Siphon armor) is multiplied by
1 − ChargeFullnessDamping (0.7) × Bank.Count ÷ Bank.Capacitybefore it lands (BattleEngine.DampedCharge; a positive charge never rounds below 1). An empty bank fills at the full rate and a full one at 30%, so mana stays easy to start and hard to max out. Explicit grants are whole orbs and skip it: items, pickups, Steal/Mug, battle-start gear, the time bank and carried orbs. - Guard (GG-T189): the unused turn time at 10 charge per second, max 40 (§2.5). This is the "fractional orb": the bubble is progress toward the next orb, and a rollover with the bank at 12 fades (§3.1.4) while the remainder stays in the bubble.
- The billboard shows the arithmetic ("Mana +34 · 3 heroes ÷1.5 · chain ×1.25").
- Where the economy sits (measured 2026-11-05, GG-T265, after GG-T247's tempering and GG-T262's 45% enemy HP; 206 bot battles, 12 per stage): the late-campaign flood is gone (the bank is full on 0% of greedy turns and 1–3% of casual turns, 0–7% of orbs fade, where cityruins-03 had been full on 94%). Bots bank about 0.11 orbs per player action (greedy) and 0.05 (casual), and a casual bot holds 2+ orbs on about 23% of turns. GG-T247's "casual holds 2+ orbs on ≥ 30% of turns" target is retired: it measures hoarding, and a bot that spends the moment it can rarely holds two whatever it earns. Raising
PincerChargePerHpto 200 to buy a spell-per-wave earn rate lifted the casual bot only to 0.08, and flooded the Tithe Moors stages (full on 36–55% of turns) because that bot doesn't spend there, so the charge stays at 105. POLISH G3 stays the gate (no flood, ≤ 20% wasted).
(Tests: More_heroes_in_a_pincer_earn_less_mana_per_hp_taken, Charge_rolls_over_into_orbs_and_keeps_the_remainder, A_killing_pincer_earns_mana_by_hp_taken_not_per_hero, Supporters_join_but_dilute_the_mana_charge, ManaEconomyTests. Instrument: ManaEconomyReport — [Explicit], run with --filter ManaEconomyReport, CONVERGENCE_MANA_SEEDS=N — bots play every campaign stage and report how full the bank runs.)
3.2 HP and stats
Unit.Effective = LevelStats + GearStats, with Speed = level SPD + gear SPD + ½ gear AGI (Amended 2026-10-09); STR, VIT and Speed are floored at 1.
| Stat | Drives | Read in |
|---|---|---|
| HP / MaxHP | life | Formulas.MaxHp = floor(12 + 5·VIT + level); an enemy spawns with × EnemyHpScale (0.45, GG-T262)
|
| STR | physical offense; pushback; stagger push | Formulas.Physical, Pushback, StaggerCasts
|
| VIT | HP + physical defense | MaxHp, Physical
|
| AGI | Evasion; pushback stun recovery; Steal; ½ into Speed from gear | Formulas.Evasion, Pushback, Steal roll
|
| SPD | timeline rate; hit chance | RateFor, Formulas.HitPercent
|
| INT | enemy magic offense; cast time; threat weighting | Formulas.Magic, CastTime, PickTarget
|
| WIS | magic defense; cast time; cast poise | Magic, CastTime, StaggerCasts
|
| LCK | crit; hit; Evasion; Steal; Clutch; damage variance tilt | CritPercent, HitPercent, Evasion, Steal, Clutch
|
Level stats: Formulas.StatsAtLevel = base + growth per level from 2 + milestone bonuses at their level, each stat floored. Spell damage with a non-zero base always does ≥ 1 unless the target is immune (resistance 0).
Amended 2026-11-25 (GG-T1028, owner decision in GG-T1025: "Luck: flat base per level for everyone plus gear Luck"): Luck is no longer a class stat. Every unit, hero or enemy, has the same level Luck, Formulas.LuckAtLevel = floor(12 + 0.6·(level − 1)) (12 at Lv1, 29 at Lv30; LuckBase, LuckPerLevel), which StatsAtLevel sets in place of any class value; gear Luck adds on top in Unit.Effective. So crit, hit, Evasion, Clutch, trigger chances, Steal, Tame, pickup drops and the Power Amplifier all read flat-by-level Luck plus gear. classes.json no longer carries Luck in any BaseStats, Growth or milestone. The Bestiary's stat line shows level-1 stats (StatsAtLevel(def, 1)), so its LCK and EVA include the flat Luck. Still open elsewhere: Luck skill-tree stat nodes and level-up stat picks into Luck retire with the skill hexagon's stats-from-the-board work (GG-T1029).
3.2.1 Stat-to-effect cheat sheet
Tank: VIT, STR (not INT) · glass cannon: INT, WIS, LCK (not VIT) · skirmisher: SPD, AGI, LCK · heavy hitter: STR, VIT (not SPD/AGI) · rogue: LCK, AGI · mystic support: WIS, INT (not STR).
3.3 Elemental resistance
Unit.ResistanceMultiplier(type) = ClassDef.Resistances[type] × each equipped item's Resistances[type] (multiplicative; missing = 1.0; 0 = immune). DamageType: Physical, Fire, Ice, Lightning, Poison, Holy, Dark, Arcane. Spell damage composes (§13.1.2):
final = round(base × resistance × (Lightning on Wet ? 1.5 : 1) × incoming-damage multiplier)
Current content authors no class resistances; the only resistance gear is the Sunfire Amulet (Fire ×0.7).
Amended 2026-11-08 (GG-T371): several enemy families now author resistances (ceramic knights, cyber zombies and tree golems Poison ×0; harpies, heavy troopers and minotaurs weak to Lightning; the Lich and the Void Sentinel resist Dark and fear Holy; Infernalists and Hellspawn resist Fire and fear Ice; wraith knights the reverse; cultists resist Arcane and fear Dark). §3.3.1 guarantees each one a counter for sale.
3.3.1 There is always a way (GG-T371, added 2026-11-08)
Owner: "always a way to defeat them (cast fire against ice, be able to buy a consumable with elemental effects in case your party doesn't have what it needs specced into the build, there is always a way)." No fight may require a build the party lacks: every wall a foe or the board puts up has a counter the Merchant always sells.
- The interaction table (
elements.json,ElementTableDef, one row perDamageType, content-validated):
| Element | Counters (beats foes that resist) | Its flask's status | Breaks / exploits | Tiles it clears |
|---|---|---|---|---|
| Physical | — | — | — | — |
| Fire | Ice | [Burning] | breaks [Frozen] and [Wet] | slime trail, venom snare, poison cloud |
| Ice | Fire | [Frozen] | — | mire, quicksand (frozen solid) |
| Lightning | Poison, Arcane | — | exploits [Wet] (×1.5) | shock mine (set off harmlessly) |
| Poison | — | [Poisoned] | — | — |
| Holy | Dark | — | — | poison cloud |
| Dark | Holy, Arcane | [Blinded] | — | — |
| Arcane | Physical (spells go around plates) | [Silenced] | — | — |
- Breaks / exploits record what the dispatcher already does (§6); a test keeps the two in step.
- Tile reactions (
TileReactionDef:Ona trap or tile-state id,KindClear, or BecomesInto) mirror GG-T359's ClearTiles and MarkTiles. GG-T370's hazard trails (slime, fire, ice, mines) add their tile-state ids to these rows. - Two tool sets sit beside the elements (
Reactions): disarm (venom snare, shock mine, caltrops) and cleanse (slime trail, mire, quicksand, poison cloud). RuleBreaksrecords how each rule-break (§14.9) is answered. All five are Positional today.- In battle (
BattleRunner.Elements.cs): a hero's ability runs its tile reactions on the traps it covers. That is its tool set (AbilityDef.TileReaction), plus its element's row when it deals damage.- A tile pick is legal when it clears a trap, even with nobody in reach (throw the kit at the mine). A tile-only use resolves without a "Missed!".
- Each cleared trap emits
TrapClearedEvent: the board resyncs, the trap cue plays and "Cleared!" floats. - Enemy abilities leave the board alone.
- The Merchant's counters (
GridGame.Studio/tools/counter_items.py). All are Common, stack 5, andSoldByVendor, so they are on the shelf from the first expedition (§25.1). Amended 2026-11-21 (GG-T538): the Disarm Kit and Purifying Salts are on the first shelf and the flasks join at stock tier 2 (after The Tithe Moors III), but a counter any reachable stage needs is stocked whatever its tier (§25.0.10), so the promise holds from the first battle. Names are labels; descriptions are Proseitem:<id>texts.
| Item | Price | Effect (picks a tile; a plus of radius 1 unless noted) |
|---|---|---|
| Fire Flask | 55 | 20 fire + [Burning] |
| Frost Flask | 60 | 16 ice + a [good] chance of [Frozen] |
| Storm Flask | 55 | 20 lightning (×1.5 on [Wet]) |
| Venom Flask | 45 | 12 poison + [Poisoned] |
| Blessed Flask | 55 | 20 holy |
| Shadow Flask | 55 | 20 dark + a [fair] chance of [Blinded] |
| Mana Flask | 55 | 20 arcane + a [fair] chance of [Silenced] |
| Purifying Salts | 30 | a 3×3 area: the cleanse set |
| Disarm Kit | 40 | a 3×3 area: the disarm set |
They are priced between a Healing Potion (25) and a Hand Grenade (90, 28 fire in a 3×3). Flame Oil (70, one foe) and Holy Water stay drops.
- The validator (
ElementCounters.Validate, run byContentLoader.Validate) checks every enemy class a campaign stage fields, rule-break bosses and laid eggs included. A foe's multiplier per type is itsResistances× its unconditionalReductionMultiplierpassives.
It also checks the table's shape: a row per type, known buffs, trap and tile-state ids, reaction sets. Each problem names the stage, the foe and the gap. Current content passes with none.- Some Merchant consumable hurts it at full strength (×1 or better).
- Each weakness (above ×1) is a type the Merchant sells.
- For each element it resists, the table names a counter; the foe doesn't resist that counter too; the Merchant sells it.
- A foe with an armor plate (§13.5) has a non-Physical Merchant consumable it doesn't block (at or below
HeavyResistance, 0.25). - An element-gated ward (a buff it can raise that takes ×0.25 or less) is broken (
Breaks) by an element the Merchant sells. - Every rule-break in a campaign stage has a
RuleBreaksrow: Positional, or an Element or Item the Merchant sells. - Every trap, and every GG-T359 tile state marked Hazard, is cleared by some Merchant consumable.
- The camp bot (
CampRoutine, §25.3.3) buys the next stage's counters (ElementCounters.CountersFor). - (Tests:
AlwaysAWayTests, written and not run.)
Amended 2026-11-28 (GG-T2071, owner-approved prologue, GG-T1941): element-locked foes. A story foe may be element-locked: it resists every damage type but one (the prologue's Halcyon Ward-Engine is immune to all but Lightning). Rule 3 can't hold for it (Fire's counter Ice is walled too), and it doesn't need to: the lock is the lesson, and its one open element is the way.
- The validator spots the lock (
ElementCounters.LockedTo: exactly one type lands at ×1 or better) and, in place of rule 3, requires the Merchant to sell that open element (the Storm Flask for the Ward-Engine). Rules 1, 2, 4, 5 and 6 still apply. - Its resistances are shown up front.
ClassDef.RevealResistancesmakes the inspect card, the description panel and the Bestiary page show its element line whatever the Bestiary tier (§25.11), andBestiaryKnowledge.ElementLinereads the lock as "Immune to all but Lightning". - IMMUNE reads clearly. A blow an immunity stops cold floats one word, IMMUNE (larger and held longer than before), not a "0" with a small tag beside it.
4. The AbilityBar
The battle HUD shows 5 slot buttons for the selected hero (BattleRunner.MaxSlots = 5); campaign progress makes 2 to 5 usable (§4.7). Each slot is an AbilitySlot: an ability id, or an item stack.
4.1 The three kinds
| Kind | Cost | Cast time | Frame |
|---|---|---|---|
| Skill | free; costs the action; per-skill cooldown | instant | green |
| Spell | its own mana meter, full at cost x 100 (GG-T1807) | cast icon on the timeline (all content spells: 1.5 s base) | blue + fill bar (GG-T1808) |
| Item | one charge of the slot's stack | instant | warm leather; "name n/max" |
Amended 2026-11-06 (GG-T296, owner): Active, Passive, Reactive. Skills, spells and items are the Active kind: you take them. Two more kinds never sit on the bar. A Passive just happens (Vampire's Kiss heals when you attack; Tough Hide always softens blows). A Reactive fires after something happens to you, usually on a chance ("when [attacked directly], a [slight] chance to [Counterstrike]"). Heroes and enemies use the same system, so a character can be built to benefit from being hit, dodging or being surrounded.
- Data:
AbilityDef.Trigger(TriggerDef):On(the event),Chance(0..1; 1 never touches the Rng; optionalChancePerLuck), event parametersCount(OnSurrounded),Threshold(OnLowHp) andStatus(OnStatusGained), an optionalCondition(owner HP below/above, has/lacks a status, adjacent foes ≥ n, the other unit's tag, the damage type), a list ofEffects, and the guardsCooldown(own turns) andOncePerAction.Calloutoverrides the float text. Everything is checked byContentLoader.ValidateTrigger. - Events (
TriggerOn):Always(modifiers only),OnAttack(a primary weapon attack, hit or miss),OnLandedHit,OnDamaged,OnAttackedDirect(an adjacent foe's blow lands),OnAttackedAny(any foe's blow or ability lands),OnDodge(a foe's blow or charged spell misses or is slipped by Evasion, §13.1.0),OnSurrounded(at turn start),OnStatusGained,OnLowHp(a hit crosses the threshold),OnAllyKO,OnKill,OnPincerAsAttacker,OnPincerAsSupporter,TurnStart,TurnEnd,ActionEnd. A hero's turn starts and ends each time control returns to the party; an enemy's is its own turn. - Effects (
TriggerEffectKind):Heal(fraction of max HP),LifestealandReflect(fraction of the context's damage),ApplyBuff,Counterstrike(a blow at ×Amount on a foe in reach),FollowUp(strike the target again at ×Amount of the blow),CastAbility(an Active ability resolved instantly and free through the normal dispatcher),Cleanse,ManaCharge(heroes),Pushback(seconds, foes). TheAlwaysmodifiers areDamageMultiplier(the owner's weapon blows),ReductionMultiplier(damage taken) andImmunity(statuses).Who(Self/Target/Attacker) overrides each effect's default target. - Engine (
BattleRunner.Triggers.cs+ pureRules/Triggers.cs):Triggers.Sources(unit)lists a unit's passives in a fixed order: class kit, learned passives (Unit.PassivesfromHeroSpec.PassivesfromHeroSave.Known), enchants on intact armor, then the weapon's named lifesteal. The funnels fire it:Damage(OnDamaged, OnAttackedAny, OnLowHp),Strike(OnDodge, OnLandedHit, OnAttackedDirect, OnAttack),Kill(OnKill, OnAllyKO),ApplyBuff(OnStatusGained), pincer resolve, turn starts and ends, and the end of a command. Owners go in unit-id order, abilities in source order, and only a chance below 1 draws from the battle Rng. A reaction never provokes a reaction: a Reactive can't fire from inside another Reactive's effects, and no ability re-enters itself. A Passive such as Lifesteal still rides a counter blow. - Presentation: every firing emits
TriggeredEventahead of its effects. The view floats the callout over the unit with a sound: a clang for Counterstrike/Reflect, a war cry for a free cast, a power-up otherwise (POL-D4). The InspectCard and the bestiary kit line show Passive or Reactive with a sentence generated from the data (TriggerText.Describe), keywords in [brackets]. - (Tests:
TriggerEngineTests,ArmorEnchantTests,Double_attack_passive_strikes_twice_and_counter_strikes_back.)
4.1.1 Skill cooldowns
A skill locks for AbilityDef.CooldownTurns after use: Steal 3, Mug 2, Teleport 3. Countdowns live per hero in Unit.Cooldowns. Amended 2026-10-09: they tick once per committed action at control return (the old "turn-cycle" = hero window is now one action). A cooling slot shows "CD n" and refuses ("Recharging"). (Test: Teleport_relocates_and_fires_pincer_then_goes_on_cooldown.)
4.1.2 Signature passives (GG-T302, added 2026-11-06)
Amended 2026-11-16 (GG-T388): nine kits made distinct so no two heroes play alike: Myrmidon hooks a foe from anywhere and pulls it 2 tiles; Panda Brawler's slam taunts (feeding its surrounded bonus); Slasher's Flurry hits every adjacent foe; the Ronin steps back 2 tiles after the cut; the Fighter's Combo Strike delays the foe 1 s; Night Hunter's Night Stalk makes her Blurred; the Alchemist's Transmute cleanses and grants Protection (no heal); Knight's Oath swaps places with the ally, then wards them; the Shieldguard's (shieldmaiden) Valkyrie's Call revives a fallen ally at 30 HP (cooldown 6, the game's only revive skill).
Owner: "You could design a character that benefits from being hit, or from dodging hits, or from being surrounded by enemies." Every hero class carries one or two Passive/Reactive rows in its classes.json Abilities (they never reach the bar, MetaServices.IsHeroUsable), and most enemy families carry 0–2 so fights read differently. All are abilities.json rows on the §4.1 engine; numbers stay modest.
| Archetype | Classes | Signature (id) | Rule |
|---|---|---|---|
| Vampire | vampire | Vampire's Kiss (vampires_kiss), Blood Feast (blood_feast)
|
landed blow → [Lifesteal] 15%; a kill heals 10% |
| Guard Stance duelists | duelist, fencer, ronin, sellsword, swordmaster | Guard Counter (guard_counter)
|
while [Warded] (Guard Stance's ward), every direct blow is answered with a [Counterstrike] ×0.6 |
| Dodge fighters | duelist, swordmaster, dervish, martial artist (Evasive Riposte); fencer, chroma ninja, speedster, courier, hexstalker (Blur); thief, white ninja (Catch Breath) | GG-T297 rows | OnDodge synergies |
| Shield tanks | knight, defender, paladin, jade knight | Shield Wall (shield_wall)
|
[surrounded] by 2+ at turn start → [Ward] |
| Brawler tanks | myrmidon, tank, panda brawler | Unbowed (unbowed)
|
[surrounded] by 2+ → [Empowered] |
| Hit-builders | warchief, shieldguard, prizefighter | Grudge (grudge)
|
damaged → 20% [Empowered], rests 2 turns |
| fighter, defender, sellsword | Battle Hardened (battle_hardened)
|
attacked directly → 20% [Protection] | |
| dark templar | Dark Retribution (dark_retribution)
|
attacked directly → 35% [Reflect] 30% | |
| Berserkers | barbarian (Berserk); bruiser, wild child (Blood Rage blood_rage); odachi, ronin (Grim Resolve grim_resolve)
|
below 50% ×1.35; crossing 50% → [Empowered]; crossing 35% → heal 15% | |
| Ninjas / rogues | green ninja, slasher (Venom Edge); red ninja (Ember Edge); yellow ninja (Static Edge); blue ninja (Rime Edge 10%); black ninja (Shadow Edge); street fighter (Dirty Fighting 20%) | *_edge, dirty_fighting
|
landed blow → 15% status on the target |
| Finishers | assassin, night hunter (Vanish → [Blurred]); striker, ripper, harbinger, hexsniper (Bloodlust → [Empowered]); raider (Blood Feast) | on a kill | |
| Counter-punchers | pugilist (Counterpunch 20% ×0.6), lancer (Set Spear 25% ×0.75), basher (Rattle: 15% [Pushback] 0.5 s on a landed blow) | ||
| Healers | cleric, acolyte, doctor, alchemist, white ninja, lightweaver (Mending Touch: after supporting a pincer, heal the backed attacker 5%); cleric, acolyte, sage (Vigil: an ally falls → [Regen]); monk (Inner Calm: 3% each turn start); alchemist (Poison Ward); lightweaver (Pure Spirit: can't be [Silenced]) | ||
| Mages | hexer, red mage (Arcane Harvest: a kill → 10 [mana charge]); ritualist (Blood Price: damaged → 4, once per action); sage, tinkerer (Arcane Insight: supporting → 5); drifter (Chill Aura: 25% [Slow] the direct attacker) | ||
| Engineers / rangers | machinist, operative (Shock Plating: 25% [Pushback] 0.75 s on the direct attacker); engineer, technician (Self-Repair: below half HP, 5% each turn start); hexwarden (Keep Away 35%, 1 s); blue lion (Vengeance) |
Enemies (same rows, readable at the Bestiary's abilities tier): frogs, toad, Swamp Mistress — Toxic Skin (attacked directly → 35% [Poison] the attacker); gangers, wolves, templars, captain — Vengeance (an ally falls → [Empowered]); cyber zombies — Poison Ward + Rotting Bite (20% poison); undead, skelepedes, marsh shamblers — Poison Ward; ghost — Ethereal ([Physical] ×0.8) + Poison Ward; phantom — Ethereal; mecha armor — Mirror Plating (a landed attack → 50% [Reflect] 20%); slimes — Gelatinous (damaged → 25% [Protection]); hags — Spiteful Hex (25% [Blind] the direct attacker); lurkers — Evasive Riposte; tech gremlins — Shock Plating; flying monkey — Blur; goblin thug — Dirty Fighting; Demon Lord, oni — Infernal Hide (can't [Burn]); Ice Mauler, yeti — Frostborn (can't [Freeze]) + Chill Aura; vulture — Carrion Feast (an ally falls → heal 15%); reaper — Blood Feast. Bosses carry two: Cyclops 00–02 Tough Hide + Blood Rage, Naga Serpent's Retort (35% [Counterstrike] ×0.6) + Poison Ward, Chronomancer Time Slip (35% [Pushback] 1 s) + Steadfast, Demon Lord Lifesteal + Infernal Hide. Bats, soldiers, mannequin, ceramic knights, steppin' razors, prototypes, oni, troll, werewolf, tree golems and sand maw keep their GG-T296 rows.
- Text is honest: every chance in a description uses its band word ([slight] ≤15%, [small] ≤27%, [fair] ≤42%, [good] ≤62%);
ContentLoader.Validatealso fails aTriggerTextsentence whose [terms] miss the glossary (new entries [Lifesteal], [Reflect], [mana charge], [Physical]; "attacked directly" is an alias of [directly]). Guard Stance now says what it does (Ward, and Guard Counter while it holds); the Training Rapier +3 lifesteal passive is Bloodied Point, not "Riposte"; Counter Attack's text names [attacked directly]; Mirrorcurse's node says it blinds. - (Tests:
SignaturePassiveTests.)
4.2 Per-hero loadouts
Amended 2026-11-16 (GG-T388, owner: "skills start as few but they are purchased or discovered over time"): a new hero knows only its StarterKit (loadout abilities 1 and 3: its role move and its signature); the rest come from the trainer at 100 G, the skill tree, or Tomes. A hero who joins later arrives knowing kit moves for its level (TrainTo: 3rd at Lv 3, 4th at Lv 6).
The bar follows the selected hero. Its slots come from the hero's saved bar, HeroSave.Bar (5 entries: ability id, "item:<id>", or null), edited on the Abilities screen (§25.6). A new hero's bar is its class DefaultLoadout (Progression.NewHero), whose abilities become Known (§25.6). Amended 2026-10-09: there is no separate HeroLoadouts preset layer or CombatLoadouts cache — the saved bar is the bar.
Seeded loadouts (classes.json):
| Class | DefaultLoadout |
|---|---|
| Cleric | heal, heal, frost, item:healing_potion_basic |
| Paladin | heal, fireball, item:healing_potion_basic |
| Barbarian | fireball, bolt, item:healing_potion_basic |
| Alchemist | frost, item:healing_potion_basic, steal, item:cons_sleep_dart (duplicate potion entry dropped by NewHero)
|
| Assassin | steal, mug, bolt, item:healing_potion_basic |
| GreenNinja | teleport, steal, fireball, item:healing_potion_basic |
| RedNinja | teleport, mug, bolt, item:healing_potion_basic |
| all 55 other hero classes | heal, fireball, frost, bolt, item:healing_potion_basic |
On a fresh save (2 slots) the starting trio's potion sits in locked slot 3 until the first clear.
4.3 Item stacks and effects
"item:<id>"draws its charges from the inventory:min(owned, MaxStack); a second slot of the same item takes from what remains (stacks split, never duplicate). Each use spends a charge and is recorded inBattleResults.ItemsConsumed, deducted from the save at commit — Amended 2026-10-09: on victory, defeat, retreat and escape alike."item:<id>:<n>"is a preset stack of n charges not drawn from inventory (available for test/setup).- A consumable's battle effect (
BattleRunner.ItemAbility) is itsOnUseAbility(Sleep Dart →sleep), else synthesized from item knobs. Amended 2026-10-09:
| Knob | Effect | Items |
|---|---|---|
BaseHealing
|
single-ally heal (PickActor, AllyOnly) | Healing Potion 50, Greater Healing Potion 90, Hi-Potion 150, X-Potion 500 |
BaseDamage (+DamageType, BonusVsTag ×BonusMultiplier)
|
single-enemy hit | Holy Water 40 Holy (×2 vs Undead), Flame Oil 45 Fire (×1.5 vs Beast) |
GrantsOrbs
|
orbs (Auto) | Mana Potion 2, Ether 3, Hi-Ether 6 |
CuresBuff / CuresAll
|
remove one debuff id / all debuffs from an ally | Antidote (poisoned), Greater Antidote (all), Eye Drops (blinded), Remedy (all) |
Revives
|
first fallen hero returns on the free tile nearest the user with BaseHealing HP; refused if nobody has fallen
|
Revival Charm (50) |
Escape
|
battle ends as Escaped (§22.2) | Smoke Bomb |
OutOfBattleOnly
|
no battle effect; Camp only | Tent |
OnUseAbility + TileReaction
|
the ability also clears the traps it covers (§3.3.1) | Purifying Salts, Disarm Kit (the elemental flasks are OnUseAbility hits)
|
4.4 Click flow per kind
All three go through UseSlotCommand → BattleRunner.DoUseSlot, which re-checks GetSlotStatus and the target (§4.5); a refusal costs nothing.
- Item — spend a charge → resolve its ability immediately.
- Skill — start its cooldown → resolve immediately.
- Spell —
Bank.Spend(cost)empty the slot's own meter (GG-T1807)spendCost x 100points from the party pool (needs the pool at or above the price; GG-T1915, §3.1.0) → ifCastTime > 0queue a cast icon (target unit remembered for PickActor, tile for PickTile), else resolve immediately. Every accepted use is an action (it ends the turn at the next enemy arrival, GG-T188).
4.4.1 Select → confirm → act
Amended 2026-11-27 (GG-T1808): the flow stands, but the prompt ("Poison on Wolf? Confirm below", "X: choose a target") and the confirm card (outcome preview, Cast/Use/Go and Cancel side by side) live in the skill description panel under the ability bar, not the banner or the actor panel (§9.0). Aiming tints only the legal anchors and the locked pick's area; nothing stays on the tiles after Confirm (cast time shows on the caster's timeline entry only).
Added 2026-10-11 (owner: "confirmation screens when deciding to cast a spell"). With Settings → Confirm before acting on (default):
- A pick ability: tap the slot → legal anchors glow gold → tap a tile → the pick locks: its area and every unit it would touch glow (red harmful / green helpful / blue teleport), the banner asks "Poison on Wolf? Confirm below", and the actor panel becomes the confirm card (icon, name, cost pips, timing, "On Wolf", Cast/Use/Go and Cancel). Tapping another legal tile re-aims; tapping the same tile again confirms.
- An Auto ability (Taunt, War Cry, Mass Heal …) goes straight to the confirm card.
- Nothing is spent until Confirm (
BattleScreen.ConfirmPending, chimeui.confirm); Cancel / slot re-tap / Back playui.cancel. - Outcome preview (added 2026-11-05, GG-T252, POL-D1): the confirm card lists up to three touched units with their damage (red) or heal (green) range, KO chance, statuses and their chance, and the orbs the action would mint. The numbers come from
OutcomePreviewer.Preview(Core, pure): it runs the command on sixBattleState.Clones, the first with the battle's own dice and the rest re-seeded, and reads only the actor's resolution window (until the next enemy turn starts; reopened when the actor's own charged cast resolves). The real battle and its RNG are never touched (OutcomePreviewTests). The confirm column is 28% of the card (≥ 264 px), not a fixed 330. - Autoplay and the setting turned off commit on the pick, as before.
4.5 Slot visual states
GetSlotStatus (in precedence order) and how BattleScreen.SyncBar draws it:
| Status | When | Visual |
|---|---|---|
| CannotAct | hero dead, or immobile (Frozen/Sleep) | 45% opacity; refused "Can't act" |
| Locked | slot ≥ unlocked count | "Locked", 35% opacity |
| Empty | no entry / unknown ability id | "—", 50% (an item with no battle effect, e.g. a slotted Tent, reports Ready but is refused "Empty" on use) |
| OutOfCharges | item, 0 charges | name + "0/n", 45% |
| Cooldown | skill counting down | "Name\nCD n", 45% |
| Silenced | spell while caster Silenced | red border + "Silenced" |
| Unaffordable | spell whose price is above the party pool (GG-T1915) | 45% |
| CastCapReached | cast-time spell with 4 hero casts in flight | 45%; "Too many spells!" |
| Ready | otherwise | full opacity |
Amended 2026-11-27 (GG-T1808, GG-T1807): slots are icon-only (no name in the bar, never truncated; the full name is in the description panel) and the Visual column above changes as §9.0 says: a Cooldown skill shows a clockwise radial sweep with its turns left (the old ⬜ "radial cooldown sweep" is now spec, GG-T1819), an item a stack-count badge, a spell a fill bar charging from its own meter, and (superseded 2026-11-28, GG-T1915: a spell shows its price against the one party bar, and Unaffordable means the meter is not full (GG-T1820)Unaffordable means the pool is below the price). The ability card below moves to the description panel. The slot being targeted gets a gold border and 1.06× scale, and while targeting, the actor panel shows the ability's card (icon, name, cost pips, "Cast time 1.5s — rides the timeline" / skill recharge, description, "Tap a highlighted tile. Tap the slot again to cancel."). Amended 2026-10-09. ⬜ Not yet built: hover/long-press tooltips on idle slots. ✅ Built 2026-11-27 (GG-T1819): icon-only slots (Ui.AbilitySlot): the icon fills the slot, a Cooldown skill draws CooldownSweep (a dark clockwise wedge from 12 o'clock, Shapes.Pie, easing as it ticks, static under Reduce Motion) with its turns left in the centre, an item a stack-count badge, Silenced the silenced pip plus the red border; Locked and Empty keep their words and opacities. Spells keep their cost pips until GG-T1820's fill bar.
4.6 Cancel paths
Targeting is cancelled by tapping the same slot again, the hardware/Escape Back action (BattleScreen.OnBack), or committing any other command. Cancelling spends nothing.
4.7 Progressive slot unlock
Amended 2026-10-11 (owner: "give each character 2 stacks of full life potions and unlock the slots to put them in … the 2 healing potion is two stacks of 5x"): all five slots are open from the start (Progression.StartingSlots). Every hero's default bar is two abilities, two X-Potion stacks (5 each, full heal, usable on any ally), then more abilities; a new game stocks a full stack per potion slot (5 heroes × 2 × 5). The threshold rule below is kept for reference but no longer gates anything.
Amended 2026-10-11 (later the same day, owner direction) — one X-Potion stack, one new skill per class: the two X-Potion slots collapsed into one (still a full stack of 5; a new game now stocks 5 heroes × 1 × 5), freeing the 5th bar slot for a brand-new, genuinely unique skill per hero class — all 62 classes, even ones that otherwise share an identical kit (e.g. the 19 "war_cry bruiser" strikers), each got their own ability authored to that class's own name/flavor rather than just its Role. All 62 are purely data-driven (abilities.json, Kind: Skill for non-casters / Kind: Spell for the 6 Mage-role classes), reusing the existing generic resolver and the 13 existing buffs — no new engine code. Every one has a real pixel icon (tools/icons.json + GridGame.Studio/tools/make_icons.py, reusing already-cached silhouettes), not the orb fallback. (Tests: New_game_has_starting_trio_gold_and_loadouts, A_recorded_battle_round_trips_as_json_with_every_turn; every new ability is also auto-exercised by CatalogTests.Every_hero_ability_resolves_against_a_live_board.)
Amended 2026-11-05 (GG-T285) — one shared bag: the party's item slots draw their charges from one shared inventory, in party order (BattleFactory.Build). Before, every hero's spec got a full copy of the inventory, so 5 owned X-Potions put a stack of 5 on every bar (25 heals) and the overdraw was clamped away after the battle. A fresh game still stocks and carries 5 × 5.
Progression.UnlockedSlots(save): 2 on a fresh save, +1 when HighestClearedStage reaches 0, 2 and 5 (UnlockThresholds), max 5. The battle reads it via BattleSetup.UnlockedSlots; the Abilities screen renders locked cells and Abilities.Assign refuses them. The post-battle screen announces "Ability slot unlocked!". (Tests: New_game_has_starting_trio_gold_and_loadouts, Full_loop_battle_commit_then_every_vendor.)
5. Targeting
Three orthogonal enums (Core/Content/Models/AbilityDef.cs):
TargetShape : Self / SingleActor / SingleTile / Square / Diamond / Cross / Plus / Row / Column / AllEnemies / AllAllies TargetMode : Auto / PickActor / PickTile TargetFilter : Any / EnemyOnly / AllyOnly / EmptyOnly
plus int Radius.
5.1 Resolver
TargetResolver.Tiles(anchor, shape, radius) → tiles (clipped to the board); Collect(state, ability, caster, anchor) → distinct living units on those tiles that pass the filter (or the whole team for All*, or the caster for Self).
Square(r=1) Diamond(r=2) Cross(r=1) Plus Row Column · · · · · · · █ · · · · · · · · · █ · · · · · · · · · █ · · · █ █ █ · · █ █ █ · · · █ · · · · █ · · █ █ ★ █ █ · · ★ · · · █ ★ █ · █ █ ★ █ █ · █ ★ █ · █ █ ★ █ █ · · · · · · · █ · · · █ █ █ · · █ █ █ · · · █ · · · · █ · · · · · · · · · █ · · · · · · · · · █ · ·
| Shape | Tiles (anchor (ax,ay))
|
|---|---|
| Self, SingleActor, SingleTile | the anchor |
| Square(r) | Chebyshev ≤ r |
| Diamond(r) | Manhattan ≤ r |
| Cross(r) | anchor + r tiles along each cardinal arm |
| Plus | the anchor's whole row ∪ whole column |
| Row / Column | the anchor's whole row / column |
| AllEnemies / AllAllies | no tiles; the caster's opposing / own team |
Filters: EnemyOnly = other team; AllyOnly = caster's team including the caster; Any = everyone; EmptyOnly = no units (used by Teleport). AoE shapes never hit units their filter excludes.
5.2 Picker flow
BattleScreen.OnSlot / BattleScreen.Input:
- Auto (Self, All*, Steal/Mug's Cross around the caster) → commits immediately with the caster's tile as anchor; refused "No target" if nothing would be hit.
- PickActor / PickTile →
BattleEngine.ValidTargetsmarks every legal anchor gold; pressing a tile previews its area (red if harmful, green if helpful, blue for Teleport); releasing on a legal tile commitsUseSlotCommand. Legal anchors (TargetResolver.IsValidPick): PickActor = an occupied tile whose unit passes the filter; PickTile = any tile whose shape catches ≥ 1 valid unit; EmptyOnly = an empty, trap-free tile. - No legal anchor → banner "No valid target", nothing spent.
- Drag preview numbers (added 2026-11-05, GG-T252): while a held hero's path makes a pincer, every foe it would hit wears a small tag with the damage range and KO chance (
OutcomePreviewer, three samples per step), cleared on drop or cancel.
5.3 Special targeting flows
- Teleport (
IsTeleport): EmptyOnly PickTile → the caster moves there (TeleportedEvent), triggers any trap, then a board-wide hero pincer scan resolves. Cooldown 3. - Revive / Escape / orb items resolve on the user without a pick (§4.3).
5.4 Targeting session lifecycle
tap slot ──▶ GetSlotStatus ≠ Ready ─▶ banner reason (no state change)
│ Ready
├─ Auto ──────────────────────────────▶ Commit(UseSlotCommand)
└─ Pick* ─▶ TargetingSlot = i; mark ValidTargets
│ press/drag over tiles ─▶ PreviewTarget(tile)
│ release on legal tile ─▶ Commit(UseSlotCommand) ─▶ CancelTargeting
│ release elsewhere ─────▶ error sfx, keep targeting
└ tap slot again / Back ─▶ CancelTargeting (nothing spent)
Invariant: while the event player is busy (BattleScreen.Busy) no command can be committed (CanCommand), so two uses can never overlap. A 20 s playback watchdog resyncs the view if an animation ever stalls.
6. The Spell Dispatcher
BattleRunner.ResolveAbility(caster, ability, anchor, pickedUnit) — the single resolution path for spells, skills, items and boss phase abilities. Amended 2026-10-09: it is pure simulation; VFX are presentation and run later from events. Order:
- Teleport → relocate + trap + pincer scan, done.
- Escape →
BattlePhase.Escaped, done. Revive → revive first fallen hero, done. GrantsOrbs → mint orbs, done. - Collect targets; emit
AbilityResolvedEvent(anchor, tiles, targets). No targets → "Missed!". - Per living target, in order:
Scan →Retired 2026-11-06 (owner, GG-T290): Bestiary knowledge is earned by defeats (§25.11);ScannedEvent(stats, HP), mark the class Scanned + Seen.IsScanandScannedEventare gone.- Cleanse (
RemovesDebuffs: all debuffs) / cure (RemovesBuff: one id). - Fire × Frozen / Wet: a damaging Fire hit force-expires Frozen (its chain applies Wet), then strips Wet ("Steam!").
- Steal (
StealsMana) roll → random orb or "Missed!"; Mug adds a fixed physical hit (MugDamage10 × physical resistance × incoming multiplier). - Damage (
BaseDamage > 0) →Formulas.SpellDamage(Lightning on Wet ×1.5, note "Shock!"), ×BonusMultipliervsBonusVsTag; then Lightning blind roll 30% → Blinded. - Knockback (
Knockback, §6.6), then Pull (Pull) and Swap (SwapsPlaces) (§6.7). - Heal (
BaseHeal). Amended 2026-10-22 (GG-T183): a heal only ever lands on the caster's side. On a foe it is a drain when the ability's filter isEnemyOnly(the caster is mended instead), and nothing when the filter isAny; and an ability that both harms and heals never harms a friend (before this, Soul Feast, Collect the Debt, Bloodletting and Blood Harvest healed the foe they hit, and Harm into Hope scorched allies and mended enemies). - Hasten (
HastenU), then Pushback (Pushbackseconds, foes only; wasDelayUbefore GG-T286, §2.3). - Buff (
ApplyBuff, chanceApplyBuffChance): Sleep on a Warm target lasts ×1.5 (ceil). Amended 2026-11-05 (GG-T266): a beneficial buff (BuffKind.Buff) never lands on a foe: on a foe-targeting ability it is the caster's own, granted once per cast however many foes are caught (War Stomp and Battle Cry make the caster taunt, Opening Jab empowers the caster's next strike; before this, all three buffed the enemies they hit). (Test:A_beneficial_buff_on_a_foe_targeting_ability_lands_on_the_caster_not_the_foe.)
- Step back (
StepBack): the caster backs away from the nearest foe. - Battle-end check.
Amended 2026-10-22 (GG-T183): a teleport with HastenU (Fade Step) also hastens the caster when it lands.
Damage() is the single damage choke-point: armor (snake), Sleep-break, HP, threat, death + loot, then (non-miss, with a source) cast stagger (§13). Amended 2026-11-06 (GG-T286): Damage() no longer pushes; only the Pushback keyword and a hero pincer do (§2.3).
6.1 Projectile motions
AbilityDef.Motion: None / Straight / Bezier / Homing / Spiral / Twist / Strike. Amended 2026-10-09, corrected 2026-10-13 (was stale): BattleScreen.Playback.ProjectilePoint gives every motion its own curve — Bezier arcs, Homing curls in late from the side, Spiral corkscrews in on a shrinking radius, Twist oscillates side to side, Strike drops from directly overhead — Straight/None is the only flat line, and Reduce Motion flattens everything to it.
6.2 VFX pipeline
Amended 2026-11-05 — effect prefabs (owner, GG-T269: "Prefabs that played either once or in a loop; they all might need to be normalized"): where vfxstyle.json names an effect, a premade particle prefab plays instead of the code-drawn burst. The prefabs are the owned GridGame2026 set (54 prefabs plus their materials, textures and meshes, imported with their GUIDs into Resources/Vfx and Assets/Convergence/Vfx, licence record Assets/Convergence/Vfx/SOURCES.md).
- Catalog:
vfx.json(validated) lists every effect:ModeOnce or Loop,Tiles(on-screen size of its 80th-percentile particle reach),Extent(authored size, measured byConvergenceBuild-style batch toolVfxImport.Prepareintotools/vfx-measure.json),Duration(a Once effect stops emitting then fades),Tint,Cue,Source. - Mapping: an element lists
TierPrefabs(Minor/Major/Ultimate). A tier it leaves out, an unmapped element (Ice and Arcane today) and Reduce Motion all keep the code-drawn effect, which stays the fallback. A status names its ownPrefab; it never inherits its element's impact. A Loop status prefab (burning → flame, wet → bubble) stays on its unit exactly while the unit stands with that status, reconciled every frame, so death, cleanse, expiry and wave end all stop it. - Rendering: an orthographic effects camera renders layer 31 into a RenderTexture, one world unit per board pixel. A composite pass rebuilds alpha from brightness, because additive legacy particles write none. A stage-sized UI Toolkit overlay inside the board's FX layer shows it, following resizes (§26), so harness screenshots and MindAttic.Media.Capture include it.
- Time: pause sets every live system's
simulationSpeedto 0 (frozen mid-burst), and battle speed scales it. Instances are pooled. - Imported materials: URP-only ones moved to the legacy particle shaders, renderers with no material got
ConvergenceDefaultParticle, and the old scripts and audio sources were stripped. - Checked: harness
vfxprefabsfilms every catalog effect into a contact sheet (only effects that read well there are mapped), pause freezes them pixel-for-pixel, 60 fps with a dozen heavy effects live, and they stay aligned at 9:23 and 3:4.
Amended 2026-10-11 — staging (owner: "there is a rhythm and tempo to gameplay that does require pauses and transitions … if I clicked poison and an icon just appeared on an enemy it would feel meaningless"): every action plays as readable beats (BattleScreen.Fx.cs, BattleScreen.CutIns.cs):
- Wind-up: motes spiral into the caster in the spell's element colour (
CastColor: fire orange, poison green, heals green, status spells their status colour). - Charging: a channel halo pulses on the caster and motes orbit it;
a charging bar fills on its tile (plus the existing ring)the cast's diamond glides along the timeline (GG-T1817: nothing on the tile). Hero casts queue and land inside one action, so playback tracks them as cast ghosts fromCastQueuedEventto the resolve. - Cast splash: the caster's action cut-in (§9) — a sequential beat, never covering the flight.
- Projectile: a glowing orb with a white-hot core and a comet tail of embers on a curve.
- Impact: a splash ring at every target (status-only spells included); area spells wash over their tiles as a soft bloom wave from the anchor.
- Status lands, then its icon: each status has its own take-hold effect (bubbling poison, converging frost, falling droplets, rising Z's, slow spiral, blinding smoke, red taunt shockwave with threat lines, rising embers …); only after it does the pip pop in and the status-coloured text float.
- Linger: while a status lasts the unit keeps showing it (poison bubbles, embers, frost glitter and blue tint, drips, snores, buff sparks); damage-over-time ticks play the element (poison bubbles), not generic sparks.
- Items: the user produces the bottle (rises out of the frame); a potion for self is uncorked, tipped and drunk (
glug); for someone else, or a damage item, it spins on an arc and shatters (glass) into a splash. - Skills: melee skills (Cleave, Shield Bash) lunge with a slash arc; self/party skills (Taunt, War Cry) rear up with a shockwave.
- The billboard steps to the foot of the board when the action is in the top two rows.
- Reduce Motion keeps the beats but drops particles, shakes and camera moves.
Earlier note (2026-10-09, superseded): Amended 2026-10-09: there are no particle prefabs, no VisualEffectLibrary and no Addressables. Feedback today is code-drawn in UI Toolkit: tile marks colored by damage type, the projectile dot, floating text, shakes, pops, glows and a full-screen flash for Clutch. The CastVfx / ProjectileVfx / ImpactVfx / LingerVfx keys remain in abilities.json for a future pass.
Amended 2026-10-13: damage and buff-tagged spells still read their look from DamageType/the applied buff id (ElementBurst, StatusBurst) — already rich and per-type (Fire/Ice/Lightning/Poison/Holy/Dark each have a bespoke burst, and poisoned/burning/frozen/sleep/slowed/silenced/blinded/taunting/empowered/protection/regen each have a bespoke take-hold animation). What used to fall through to one generic purple ring — Scan (retired 2026-11-06, GG-T290, with its ScanBurst), pure cleanse/dispel (RemovesDebuffs/RemovesBuff), and hasten-only spells (no damage, no heal, no buff) — now get their own bespoke gold bursts (ScanBurst/CleanseBurst/HastenBurst, BattleScreen.Playback.cs) and read gold during the cast wind-up too (CastColor). The named CastVfx/ProjectileVfx/ImpactVfx/LingerVfx strings on individual abilities (e.g. distinguishing Fireball from Meteor) are still not read by any code — still ⬜ for a future pass, still code-drawn UI Toolkit if it happens, never particle prefabs (law #3).
Amended 2026-10-19 — death-portrait dissolve restored (owner: "the only way to see the complete artwork of these enemies... a quintessential reward for killing an enemy", GG-T96): on DiedEvent the board token vanishes at once and a fresh single image of the unit's full, uncropped portrait (Art.Portrait, the same in-memory texture the token was framing through its Thumbnail (§12.1.1), shown whole, and no frame, HP bar, pips, glow or any other part of the UnitView) appears on the board's fx layer (below floating numbers and the coin burst, above every token, mark and line), centred on the fallen unit's footprint (2×2 bosses on their whole footprint) and nudged back inside the board at its edges so the whole art reads. It is sized to fit a box of (2 + footprint) tiles, starts at 196/255 opacity and, frame-rate independently and scaled by Battle speed, jitters up to ±1/12 tile around its start point, shrinks as ×0.99 per 60 fps frame and fades 0.6/s until gone (≈1.3 s), exactly GridGame2026's PortraitManager.Dissolve + Portrait3DInstance.DissolveRoutine. It is non-blocking: playback waits only a 0.12 s beat, so the loot burst and the next kill in a chain play while it dissolves, and several deaths each get their own. Every dying unit gets one (corpses show the fallen class's art; units with no portrait skip it). The death sfx and the "★ X is defeated" feed line are unchanged. Reduce Motion drops the jitter; the shrink and fade still play. (BattleScreen.Playback.cs DeathAnim/DeathDissolve.)
Amended 2026-11-05 — one visual language (GG-T253, owner: "it doesn't look like a collection of random effects"): the per-type bespoke bursts above are gone. Resources/Content/vfxstyle.json (VfxStyleSheet, validated by ContentLoader.Validate) is the one table every effect reads (§12.3):
- Elements (every
DamageType, plus theHealandWaterfamilies): a palette (Core,Glow,Accent), a particle shape (spark, shard, ember, bubble, mote, smoke, rune, ray, glyph, droplet), a motion (burst, rise, fall, implode, spiral, pulse, contract, bolt, rays, drift, billow), a timing token, count, size, reach, an optional ring and the sound family (Cue).Palette.Elementreads its hue from here. - Statuses (every buff id) name the element they come from and inherit everything they leave empty: Burning reads as Fire, Frozen as Ice (converging, with a held frost tint), Wet as Water, Poisoned as Poison (with a passing green tint), Regen as Heal. The rest have their own look (Sleep's drifting "z" glyph, Slowed's spiral, Silenced's closing rune ring, Blinded's smoke, Protection's and Ward's pulse, Empowered's rising embers and swell). Taunt keeps its shockwave and threat lines (a readout of who is being pulled), drawn in its style's red.
LingerEverysets how often a lasting status sheds a wisp. - Routing:
ElementBurst,StatusBurst,TickLinger,HealBurst, the spell trail and the namedImpactVfxflourishes all draw through one emitter (BattleScreen.VfxStyle.cs,Emit). A named flourish family (Explosion, Cloud, Sparkle, Beam, Aura, Drift, Slash, Strike) is now only a motion played in the ability's own element style, so Fireball and Frost share a gesture but never a look. - Intensity tiers (
Tiers: Minor, Major, Ultimate) scale particle count, size, screen shake and hit-stop (0 / 40 / 90 ms). An ability's tier is its optionalIntensity, else derived from its price (3+ orbs … 2 orbs— GG-T373, on the 1–12 curve: 6+ orbs or a 5+ turn cooldown = Ultimate; 3–5 orbs or 3+ turns = Major;VfxStyleSheet.TierOf). A pincer's hits are Major; a crit, or a hit for a quarter of the target's HP, lands one tier higher. - Every hit is anticipation → impact → follow-through: the target braces (an Instant squash), the element bursts while the frame holds for the tier's hit-stop, then the target recoils past rest and settles (
Ease.Back). Durations come only from the timing tokens and easing only from the easing tokens (Ease.Arcreplaces the hand-writtenSin(k·π)curves); no duration is random. - Reduce Motion halves particle counts and drops the anticipation, follow-through, hit-stop and shakes.
- Prefab-ready (owner direction 2026-11-05): every element style and every tier carries an optional
Prefabid (null today; a status inherits its element's). A follow-up brings back real effect prefabs (GridGame2026's VisualEffects/Particles plus free/CC0 packs) on an effects-camera overlay: when set, the prefab replaces the code-drawn burst (a tier'sPrefaboverrides its element's), and the code-drawn burst stays the fallback. Nothing reads the field yet. - Contact sheets:
python tools/harness.py vfxsheet [RUN] [LIMIT]plays every non-passive ability's look (devdevvfxendpoint: cast, flight, impact at its tier, the status; state untouched) and saves a frame strip per ability (artifacts/<run>/strips/) and a grid per element (artifacts/<run>/<Element>.png). (Tests:VfxStyleTests.)
6.3 Edge cases the dispatcher handles
| Case | Handling |
|---|---|
| Target dies before its turn in the target list | skipped (!t.Alive)
|
| PickActor cast whose target moved | anchor follows the unit's current tile at resolution |
| PickActor cast whose target died | resolves at the original tile (usually "Missed!") |
| Caster dies before its cast resolves | cast removed with its owner (Kill clears the owner's entries)
|
| AoE overlapping the same unit twice | Collect de-duplicates units (a 2×2 boss is hit once)
|
| Fire on Wet | Wet stripped before damage, so no Lightning ×1.5 from that Wet later |
| Lightning on Wet | ×1.5, Wet stays, then the 30% blind roll |
| Steal on any target | success always mints (stolen "from the world") |
| Battle ends mid-list | the loop stops (S.IsOver)
|
6.6 Knockback (added 2026-10-10, owner direction)
Owner: "certain abilities would have pushbacks like a shield bash that pushes an enemy away and it hurts more if it runs into another enemy, and hurts a lot if it runs into a solid tile."
AbilityDef.Knockback = tiles the target is shoved straight away from the caster (dominant axis); AdjacentOnly limits the pick to a cardinally adjacent foe. Per tile: into stone or the board edge → Slam (18 + blow to the target, stop); into another unit → Crash (8 + ½ blow to the target and, if it's a foe, to the unit hit; stop); into a movable tile → it is pushed ahead if there's room, else a crash; otherwise the target slides (DisplacedEvent). 2×2 bosses and snake segments don't budge. Shield Bash (Skill, cooldown 2, 12 physical, knockback 2, adjacent only) is learnable by Paladin, Knight and Defender and sits in the Paladin's third bar slot. (Tests: Shield_bash_shoves_the_target_two_tiles_away, Bashing_into_a_unit_crashes_both_and_into_stone_slams_hard, Shield_bash_needs_an_adjacent_target.)
6.7 Movement, timeline and drain (GG-T183)
Added 2026-10-22 so abilities can differ in more than damage and status (§7.1). Four AbilityDef fields, each resolved per target by the dispatcher above:
| Field | Mechanic | Rule | Event |
|---|---|---|---|
Pull (tiles)
|
movement | The target is dragged toward the caster one tile at a time along the longer axis. It stops beside the caster, or before any unit, block, movable or board edge. A hero dragged onto a trap springs it. | DisplacedEvent per tile
|
SwapsPlaces
|
movement | The caster and the target trade tiles. Both are one-tile units, so the board stays one actor per tile (§1.1.3). A hero moved onto a trap springs it. | two DisplacedEvents
|
StepBack (tiles)
|
movement | After every target resolves, the caster backs straight away from the nearest foe onto free, trap-free tiles. | DisplacedEvent per tile
|
Pushback (seconds)
|
timeline | Amended 2026-11-06 (GG-T286; was DelayU, a bar fraction): the Pushback keyword (§2.3). Each foe it reaches acts that many seconds later, wherever its icon sits; at most PushbackMaxSeconds 2 s (validated at load) and one push per foe per action. A target holding a cast has the cast slip by the same seconds instead; it never cancels the cast. Never lands on a friend.
|
PushedBackEvent / CastStaggeredEvent
|
2×2 bosses, snake segments and remains don't budge ("Won't budge"). None of the moves is a hero step, so none of them forms a pincer: movement never deals damage (GG-LAW-1). (Tests: AbilityAuditTests: Pull_reels_a_foe_in_toward_the_caster, Pull_stops_beside_the_caster, Swap_trades_tiles_with_the_target, Step_back_puts_distance_between_the_caster_and_the_nearest_foe, Pushback_keyword_slides_the_foes_turn_icon_back, A_heal_aimed_at_a_foe_drains_into_the_caster, Harm_and_heal_in_one_burst_hurts_only_foes_and_mends_only_friends.)
7. The Spell Catalog
All entries in abilities.json. Every spell has base cast time 1.5 s (scaled by WIS+INT, §13.1.4). Costs follow the 1–12 orb curve of §3.1.1 (GG-T373).