Convergence.Game/BIBLE/part 4
- Music (
App/Services/Audio.Music, per screen viaGameScreen.Music): Title and Story crawl "TellerOfTheTales", Camp "MinstrelGuild" (sub-pages keep it), Battle "Crusade", Victory "Triumph", Defeat/Escape "MelancholyLull". - SFX (
Audio.Sfx(key)): game code speaks semantic cues (ui.click,ui.select,ui.buy,ui.error,move,slide,pickup,pincer,hit,crit,miss,death,heal,orb,turn,fire,ice,lightning,poison,magic,cast,explosion,shatter,debuff,dash,trap,victory,defeat) mapped to files inAudio.Cue; rapid repeats within 40 ms are thinned; 10 pooled sources. - Attribution lives in
Resources/Credits.txt(Credits screen): Kevin MacLeod CC BY 4.0 tracks, Pixabay "Triumph"; "Melancholy Lull" and the SFX packs are flagged origin unverified — confirm or replace before commercial release. GridGame.Studio/tools/import_art.pyreproducibly imports audio (and art) from the GridGame2026 reference project.- Amended 2026-11-05 (GG-T254, POLISH.md §F):
- Cue taxonomy: every cue is
ui.* / battle.* / element.* / status.* / story.*(e.g.battle.hit,element.arcanefor the oldmagic,element.waterforsplash,status.debuff,story.quest_complete). A key's file is the key with dots as underscores (battle.dash→battle_dash.ogg);battle.move/battle.hitpick one of 6/7 variants,ui.backsharesui_click.Audio.Canonicalkeeps one alias table from the old flat names, so a stray old name still plays, and the cue log records the taxonomy key. - Loudness:
tools/loudness.pymeasures BS.1770 integrated loudness (clips under 400 ms ungated) and 4×-oversampled true peak. Every SFX is normalized asGridGame.Studio/tools/make_sfx.pysynthesizes it to −16 LUFS ± 2, ≤ −1 dBTP, through a look-ahead limiter for percussive cues and one corrective re-encode for what Vorbis trims. Music is re-encoded once (--music-apply, two-pass loudnorm, 320 kbps) to −18 LUFS. Before: SFX −24.1 … −11.3 (16/57 on target), music −32.0 … −11.4 (0/5). After: SFX −16.5 … −14.7 (57/57), music −18.5 … −18.0 (5/5). - Ducking:
Audio.DuckFor(seconds)dips the music −8 dB (in overTiming.Standard, out overTiming.Dramatic, eased in dB) under every cut-in card (TwistCard), each hero's level-up fanfare, and dialogue while a line types. It is time-boxed, not push/pop, so a stopped coroutine can never leave the music stuck quiet.
- Cue taxonomy: every cue is
- Amended 2026-11-20 (Audio epic GG-T457: GG-T456, GG-T458–T461, GG-T465): the music line above is superseded. Every battle stage plays one track drawn from its region's shuffle bag (
campaign.jsonMusic/MusicBorrow), the Camp draws fromHubMusic, and the moments (title, story, victory, defeat, level-up, character select, credits, Crucible, boss, final boss) draw fromMomentMusic, seeded with the stock tracks. A finale's rule-breaking boss wave (§14.9) switches to a boss / final-boss track when one exists. Track changes crossfade over 1.2 s (two music sources, unscaled time, under the volume setting and the duck). New tracks come in throughGridGame.Studio/tools/import_music.py. Detail: MUSIC.md. The event → cue audit, with the cues GG-T465 added (ui.equip,camp.repair,camp.caravan,camp.summon,ui.diamond,battle.fizzle,element.steam,battle.wave,status.sleep; new groupcamp.*), is SFX.md. - Amended 2026-11-21 (GG-T556): attack-type hit sounds. A landed physical hit sounds like what dealt it: one of ten attack types (slash, pierce, blunt, slam, claw, bite, sting, lash, projectile, magic) chosen by
Content/attacktypes.json— a collision note ("Slam!", "Crash!", "Fell!"), else the resolving skill's own type, else the attacker's weapon'sWeaponType, else the monster's natural attack (by class id or family), elseblunt. It plays cuebattle.hit.<type>= a random existingbattle_hit_<type>_<n>.ogg; a type with no files yet plays the genericbattle_hit_0..6, so nothing goes silent. Elemental hits keep their element's cue, crits keepbattle.crit, damage-over-time keepsstatus.debuff.ContentLoader.Validaterequires every weapon type and every enemy class to have a type. The sound brief and the file list are AUDIO_ATTACK_TYPES.md. - Amended 2026-11-21 (GG-T562, the asset naming rule GG-T561): audio file names. Every music and SFX file is
word-word-00.ext(Core/Content/AssetNames,tools/asset_names.py):battle.dash→battle-dash-00.ogg,battle.crucible_wave→battle-crucible-wave-00.ogg,MoorlandCharge→moorland-charge-00.ogg. The random-pick pools number their picks from 00:battle-move-00..05,battle-hit-00..06,battle-hit-<type>-00..15. Cue keys are unchanged;campaign.jsonnames tracks by file (moorland-charge-00). The file names quoted in the lines above are the old ones.
12.0.1 Announcements — cadenced callouts
Announcements (AnnounceEvent) are played by the event player as an awaited 0.25 s banner beat, one at a time, never an instant swap. Wired for refusals, charges ("X is charging Y!"), boss phases, "Clutch!", "Interrupted!", "Steam!", "Steal!", "Banked N mana", "Escaped!", enemy pincers.
12.0.2 Pacing
Amended 2026-10-09: every beat duration lives in BattleScreen.Playback.cs (no PacingConfig): step 0.16 s, displacement 0.14 s, pincer 0.32 s, orb flight 0.22 s, timeline glide 0.18–0.45 s, turn pop 0.2 s, projectile 0.22 s, victory/defeat banner 1.0 s + 0.6 s before results. All durations divide by Tween.Speed = Settings → Battle speed (×1 / ×1.5 / ×2 / ×3). Nothing the player must read resolves in a single frame.
12.1 Art
Amended 2026-10-09: textures load with Resources.Load through App/Services/Art.cs (no Addressables, no SpriteLibrary):
| Key | Path | Source |
|---|---|---|
| Portrait | Resources/Portraits/<stem>-<NN>.png (§12.1.3)
|
full body on a 1024×1024 transparent canvas, never trimmed or shrunk (§12.1.2); the unit's only image |
| Backdrop | Resources/Backgrounds/<set>-<NN>.jpg — owner rules 2026-11-07 (GG-T344, GG-T353): a set is named after its story region and numbered with zero padding (from 00 since GG-T561, §12.1.3: tithe-moors-00..04, anchor-wastes-00..03, free-holds-00..06; the older names below are the pre-GG-T561 ones), at the art's original resolution (JPEG q95; PNG only for art with transparency). Owner: "make sure the source files for the Backgrounds all get proper naming to identify them to their world lore counterparts". The sets: tithemoors_01..05, shardfall_01..05, arkgrave_01..05, anchorwastes_01..04, halcyon_01..14 (the GridGame2026 Moors, RedThorns, ElectricWasteland, UnderTheBridge and CyberNecropolis originals at 1536×3072, every one of them; CyberNecropolis's two byte-identical duplicates are skipped) and still_01..06 (native 768×1536). Each main campaign theme names its set with ThemeDef.Backgrounds ("tithemoors"), so theme ids (greenvalley …) never change; a theme without one uses its id as the set. Art.Background wraps an index over the set's own count (Backdrops.Resolve); a postgame theme borrows its base theme's set (cave2 → anchorwastes), then the default theme's, then tithemoors_01, unless the owner made it landscapes of its own and it names them (greenvalley2 → freeholds_01..07, GG-T346; cityruins2 → underspire_01..09, GG-T349; §22.3.4; its stages then carry the postgame theme id as their Theme, since the battle backdrop reads the stage's theme). Import: GridGame.Studio/tools/import_art.py import_backgrounds (no resize); Unity caps Backgrounds at 4096 (GridGameImport), CompressedHQ, no mips, so a 1536×3072 backdrop is about 4.5 MB of texture memory (the old 720×1440 was about 1 MB) and only the one or two on screen are loaded
|
biome art |
| Ability icon | Resources/Icons/<key>-00.png (64², §12.1.3: MassHeal → mass-heal-00)
|
AbilityDef.Icon / ItemDef.Icon
|
Every class has a portrait and a Thumbnail (Every_class_can_be_instantiated_and_has_art_reference). Amended 2026-11-23 (GG-T713, superseding GG-T221's "no thumbnail images"): every small actor image (board token, timeline turn icon, menu/party/bestiary card, list row, talk-menu face) is the actor's baked 256 px thumbnail (Resources/Thumbs/); the full portrait is drawn only where the whole figure is meant to be seen (§12.1.1).
Added 2026-11-27 (GG-T1425), retired 2026-11-29 (GG-T2189): the Commander's portraits. The Commander was given two Portraits/ files of its own (commander/commander_male, byte copies of mannequin-00.png pending owner art, GG-T1427). Owner 2026-11-29 overrides this: the Commander has no portrait, XCOM-style — not an in-world person, never drawn on screen. Both files, their Thumbs/ bakes and Art.CommanderPortrait/Art.CommanderMalePortrait are removed; GG-T1427 is wont-do (docs/ART_GAPS.md §1.5).
Added 2026-11-28 (GG-T2127), look retired 2026-11-29 (GG-T2189): the Commander's pronouns. The Founding no longer asks "Who are you?" (CommanderLookScreen is removed with the portrait, above) — the look pick is gone outright. The pronoun pick (they/them, she/her or he/him, they/them by default) is retired with it; SaveData.CommanderPronouns (save v30) stays as a field, always they/them unless hand-edited, in case story text wants it again. Story text names the Commander in the third person with pronoun tokens, filled by Commander.Fill alongside {commander}: {they} {them} {their} {theirs} {themself}, each also capitalized ({They}); the text check accepts them. Dialogue never draws the Commander's portrait (DialogueRunner.Resolve returns none for the $commander speaker); it is addressed and speaks as direct, unperformed text.
Added 2026-11-27 (GG-T1774, docs/research/sprite-recolor.md): creature breeds. A foe may spawn as a breed, the same drawing coloured another way (Content/breeds.json: normal 800, red 120, shadow 20, gilded 8, spectral 2, relative weights). Looks only: Core rolls the breed in SpawnEnemy from a hash of the battle seed, unit id and class (off the battle Rng, so replays are unchanged), stores the id on Unit.Breed (snake segments and a corpse keep it) and never reads a colour; bosses and remains never roll one, and only a class whose art has a region mask can. The mask is <file>-mask.png beside the art (Portraits/ and/or Thumbs/; R body, G secondary, B keep-as-is for eyes, claws and teeth, B wins overlaps; linear, no mipmaps). App/Services/BreedArt.cs bakes the recolour once per (art, breed) through Resources/Shaders/BreedRecolor.shader (each region's 2-4 stop ramp looked up by the pixel's own OKLab lightness, so the painted shading survives) into a plain texture the board token draws like any art; a thumb with no mask of its own falls back to the recoloured portrait on the live framing. Art with no mask draws as it is. The mask generator is tools/breed_masks.py (GG-T1798); a name prefix and the Aura second cue are later work. Albino was dropped 2026-11-27 (GG-T1799, owner: it always read badly).
12.1.1 Thumbnails and portraits (added 2026-11-03, GG-T220; reworked 2026-11-23, GG-T713)
Current standard (owner 2026-11-23, GG-T713/GG-T719/GG-T720; supersedes GG-T220's "no duplicating assets" and GG-T221's live-only framing below). Owner: "need to use thumbnails for every usage of an actor except where their full portrait is explicitly used like in discussions; seeing a tiny version of a 1024x1024 character looks bad, need to standardize all thumbnail and portrait usages."
- The images.
Resources/Thumbs/<portrait file>.png: one per portrait, same name (acolyte-female-00,acolyte-male-00, the mannequin, NPC art likeaetherist-00), 320×320, with the class'sThumbnailcrop baked in plus 10% of its side spare on every side (GG-T1210, room for the handheld wobble) (male art usesMaleThumbnail, elseThumbnail; a file no class draws gets a default head crop from its alpha bounds). Made bytools/make_thumbs.py(premultiplied Lanczos downscale), which also writes their.meta;Editor/ThumbImport.cskeeps their import settings: mipmaps and trilinear filtering on. Mipmaps are on only forThumbs/; portraits stay without them (§12.1.2). - Keeping them current. After any portrait or
Thumbnail/MaleThumbnailedit (a re-import, a GridGame.Studio reframe), rerunpython tools/make_thumbs.py, thenpython tools/make_thumbs.py --check, which exits 1 naming every thumb that is missing, stale (its portrait or framing changed, pertools/thumbs_manifest.json) or orphaned. Commit the regenerated thumbs with the change. - One helper decides.
Art.Thumb(classId)resolves the file exactly asArt.Portraitdoes (the hero's picked variant, or an NPC's own Portraits/ file) and loadsThumbs/<file>, or returns null when there is none.Ui.PortraitThumb(host, id)draws that thumb at 120% of the host offset −10% (Ui.ThumbMargin), so at rest exactly the owner's framing shows, andThumbWobble(one shared ticker; off under Reduce Motion) drifts every framed thumb by at most 3.5% of its side inside that margin; with no thumb it falls back to the full portrait framed live by itsThumbnailas described below (this also covers the mannequin).Ui.Thumb(id, parent, size)uses the thumb up toUi.ThumbMaxSize(200 design px) and the framed portrait above it, so a big draw never upscales the thumb; the hub and bestiary grids passthumbOnlyand never load a full portrait (GG-T1210). - Thumbnail (every small use): board tokens and corpses (
BoardView), timeline turn icons (BattleScreen.Timeline), the battle unit card (BattleScreen), hero list cards (HeroScreen), hub grids and target faces (App/Screens/Camp,App/Screens/Summon), party/stage/recruit cards and locked slots (MenuScreens), post-battle rows (PostBattleScreen), the shared card (Ui.Card), row kind icons for heroes/NPCs (RowIcon.ActorThumb, §26.7), the talk menu's hero and NPC faces and the dialogue stage's portrait tiles (DialogueScreen, 200 pxthumbOnly, §27.1; amended 2026-11-29, GG-T2230). - Full portrait (the whole figure is the point): cut-ins and pincer shots, the death dissolve, the boss intro, the recruit reveal, the hero sheet, level-up, the Mercenary renewal, the variant (gender) picker and the summon reveal (420 px, over
ThumbMaxSize). These drawArt.PortraitFigure.
Original rule (GG-T220/GG-T221), now only the fallback and the framing source. Owner 2026-11-03: "these new coordinates and zoom are kept in memory in the character's Thumbnail properties; it always uses the real existing portrait and simply zooms in and offsets; that way the portrait is always in memory and when the enemy dies you can just spawn a portrait of the actual full portrait to shake and die; no duplicating assets."
- Every class carries
"Thumbnail": { "Zoom", "X", "Y" }(ClassDef.Thumbnail). (X,Y) is the portrait point — fractions of the portrait's width and height from its top-left — that sits at the thumbnail's centre;Zoomis portrait width ÷ thumbnail side (1 = the whole portrait width fills the square). Aspect is always kept, and the numbers are resolution-independent, so one framing serves the board token, the timeline icon and every card. - A square of side S shows the portrait at width W = Zoom × S and height H = W × (portrait h ÷ w), placed at left = S/2 − X·W, top = S/2 − Y·H, clipped to the square.
ContentLoader.Validaterequires one on every class, with Zoom in [0.25, 20] and X/Y in [−0.5, 1.5].- The owner frames each unit in GridGame.Studio's Thumbnails tab (the sibling GridGame.Studio repo: it began here as
tools/ThumbnailStudio, GG-T222, and moved there, GGS-T2, GG-T579), a separate desktop app that edits these numbers inclasses.json; nothing is exported. It is set-and-forget (GG-T223). It opens from the "GridGame Studio" desktop shortcut (GridGame.Studio'srun.ps1) with no console. Every framing change autosaves that unit's block. The studio commits only those blocks, built fromHEADin a temporary index so nobody else's staged or unstaged work rides along, asGridGame Studio: reframe <names> (GG-T223), and pushes them, never forced. On close, if it committed anything, it startstools/run.ps1in the background so the installed game shows the new thumbnails. It skips that when the game or the Unity Editor is running, because the next Deploy & Run rebuilds anyway. - The first values (GG-T220) were recovered from the pre-cut
Resources/Thumbsimages by locating each one inside its portrait (multiscale template match, every result checked by re-rendering it), so every unit first looks exactly as before.import_art.pyno longer cuts thumbs; a new class needs a Thumbnail before it validates. - Drawn live (GG-T221):
Ui.PortraitThumb(host, classId)puts the portrait in a clipped (overflow: hidden) square host as a child sized and placed in percent of it (width = Zoom×100%, height = Zoom×aspect×100%, left = 50% − X·width, top = 50% − Y·height), so it is right at any size with no layout pass.Ui.Thumb(cards), the board token (UnitView.Art; corpses frame theirCorpseOfclass), the timeline turn icon (tl-art, inside its circle mask) and dialogue faces all use it. A class with no Thumbnail shows its whole portrait contained; a dialogue speaker that isn't a class shows no face. Tints (bestiary silhouette, corpse grey, frost, hit flash) go on the portrait child (thumb-art). (GG-T221 deleted the oldResources/Thumbs/andArt.Thumb; GG-T713 brought both back as baked images, above.) The death dissolve shows the sameArt.Portraittexture whole. - Separate from
Crop(the cut-in bust's eye framing,BattleScreen.CutIns.cs), which is unchanged. - Amended 2026-11-07 (GG-T352): the numbers now frame the whole 1024×1024 canvas (§12.1.2). Every class's old framing, made on the trimmed image, was converted so it shows exactly what it showed before.
12.1.2 Portraits are 1024 canvases (added 2026-11-07, owner rule, GG-T352)
Amended 2026-11-16: the import cap is 2048 (ConvergenceImport and every portrait .meta, GG-T387) so a 1024 canvas imports pixel for pixel on every platform and higher-resolution art would never be halved; dialogue figures sit flush with the screen edge. Portrait edges carry no staircase (GG-T389): portrait_cut.py --dejag measures each portrait's staircase (share of off-axis silhouette contour that is a hard 0/255 step) and replaces un-antialiased edges with the coverage of the 1 px-smoothed contour (thin strands exempt, interior and placement untouched); a portrait whose alpha bounds move gets its class's Figure box re-set, and Thumbnail boxes are never changed by tools (the owner frames thumbnails). Portrait edges carry no white fringe or specks (GG-T399): portrait_cut.py --fringe measures each portrait's fringe (share of edge pixels, visible within 2 px of transparency, that are near-white while the solid figure 3+ px behind them is at least 45 levels darker, plus a fog's leftover panel-border rim) and its specks (detached alpha islands under 64 px, or faint ones under 1000 px, that are not fog wisps); --defringe un-premultiplies those edge pixels against the white they were cut from and pulls their colour to the figure's, shrinks their alpha by a sub-pixel at most (never below 60% of what it was), flattens a fog rim to the fog behind it and drops the specks. Fog, wisps, thin strands and white figures (the mannequin, white cloaks) are not judged or touched.
Owner: "all characters are 1024x1024 with transparent backgrounds; that's the rule, that's what the assets are."
- The file. Every portrait file (
Portraits/<stem>-<NN>.png, named by §12.1.3) is a 1024×1024 RGBA canvas with a transparent background, exactly as the art comes.GridGame.Studio/tools/import_art.pysave_portrait_assetswrites it (andGridGame.Studio/tools/portrait_cut.py --importandGridGame.Studio/tools/remove_bg.py --importgo through it). A 1024² image is kept pixel for pixel. Any other size is cut to its figure (the alpha bounds, so nothing of the figure is lost), scaled down only if that is still larger than 1024, and centred. Nothing is alpha-trimmed or capped at 640 any more. The existing.meta(GUID) is kept. - Figure. Each class carries
"Figure": { "X", "Y", "W", "H" }(ClassDef.Figure): the figure's box on its portrait (the alpha bounds), as fractions of the portrait's width and height from its top-left. The import writes it intoclasses.jsonwith a targeted edit, like GridGame.Studio's Thumbnails tab.ContentLoader.Validaterequires one on every class, with some area and inside the portrait. - Whole-figure views draw the figure, not the canvas.
Art.PortraitFigure(classId)is the portrait cut to its Figure box as a sprite (cached per texture). Dialogue speakers and NPC icons, the cut-in bust, the pincer cut-in shots, the boss intro, level-up, the hero sheet, the Mercenary renewal and the death dissolve draw it instead of the raw texture, so each figure reads at the size it had before the canvases grew margins.Cropstill positions within that box.Art.FigureSizeis the figure's layout size: its box (in 1024-canvas px) fitted inside a 640 square, never enlarged, the size portraits were imported at before. Dialogue draws 640 atFigureHeight, so a creature smaller than a person still stands smaller. The mannequin fallback (GG-T351) uses the mannequin's own box. - Thumbnails (
Ui.PortraitThumb, §12.1.1) frame the whole canvas; since GG-T713 that frame is baked intoResources/Thumbs/, the only mipmapped actor art. - Male art (GG-T532, §25.11.2.3). The class's
MalePortraitfile (acolyte-male-00.png) follows the same rule; its box is the class'sMaleFigure(import_art writes it for a<classId>_maleimport) and its framing the optionalMaleThumbnail;Art.Portraitpicks the hero's version. - Re-import (2026-11-07). Every portrait was re-imported at 1024. The GridGame2026 originals (
Assets/Sprites/Actor/Portraits, by the class'sArtSource(itsPortraitbefore GG-T557) else itsName) came in as they are; the 19 RGB originals with solid backgrounds went throughportrait_cut.py's smoke cut; the 6 off-size ones were fitted. The owner's pasted art (GG-T328 to GG-T340, in the tickets' attachments) was cut again with the smoke method at full canvas. The 7 portraits with no original anywhere (gravestone, bone pile, corpse, naga egg, hex sniper / warden / stalker) are their old image, unscaled, centred on a 1024 canvas. Each class's Thumbnail was converted from trimmed-image to canvas fractions: with the old image = the canvas cropped to the box (bx0, by0, bw, bh) and scaled uniformly,X' = (bx0 + X·bw)/1024,Y' = (by0 + Y·bh)/1024,Zoom' = Zoom·1024/bw. The box was found per class as whichever of the new alpha bounds or the whole canvas reproduces the old image (refined edge by edge where neither did). Every class was then checked by rendering old and new thumbnails with the game's maths. - (Tests:
PortraitCanvasTests. Every portrait file is 1024×1024 8-bit RGBA with transparent top corners; every class has a Thumbnail in range whose centre lands on its figure; every Figure equals its PNG's alpha bounds.tools/check_assets.pyfails a portrait that isn't a 1024² RGBA canvas (POL-H1).)
12.1.3 Asset file names (added 2026-11-21, owner rule, GG-T557/GG-T561)
Owner 2026-11-21: "all assets (png, ogg, w/e) should follow this naming standard 'word-word-00.{ext}' so lowercase, hyphen delimited, and numbered even if there is only 1 they should all start with a -00; you never know if you want to start selling Christmas costume variants".
- The rule. A file name is a stem (lowercase words joined by
-) and a two-digit variant from-00:acolyte-female-00.png.-00is the default art;-01,-02... are alternates of the same thing (a costume). One helper builds every name:Convergence.Core.Content.AssetNames(Stem(words),File(stem, variant)), andtools/asset_names.pyis the same rule for the tools. Ids never change; only files are named this way. - Heroes.
<name>-female-NN.pngand<name>-male-NN.png, the name being the class'sName(Acolyte →acolyte-female-00, Panda Keeper →panda-keeper-male-00), not its id (sister). - Enemies.
<name>-NN.png. Classes that share oneNameare looks of the same enemy and number that name's files in id order (the fourHags arehag-00..hag-03,cyclops06iscyclops-05); a variant with aNameof its own is its own name at-00(harpy-raider-00,bulwark-siege-gunner-00). A new look of an existing enemy is the next free number. - The data. Each class names its files:
"Portrait"is the default art's stem (acolyte-female,hag),"MalePortrait"the male art's (acolyte-male; absent = none yet),"PortraitVariant"the number both use (default 0).ClassDef.PortraitFile(male, variant)is the one lookup (Art.Portrait,HeroVariants.PortraitFile, the tools, GridGame.Studio). A class that draws another's art names that stem: the Monster Tamerwild-child-female, the Naga Eggnaga(byte-identical copies were dropped), placeholdersmannequin(mannequin-00)."ArtSource"keeps the GridGame2026 art keyimport_art.pyreads. - Every other image (GG-T561). Files keyed by an id are the id's words plus
-00, the id itself unchanged:AbilityIcons/aegisguard-hands-of-mercy-00.png(abilityaegisguard_hands_of_mercy),ItemIcons/eq-sword-shadow-plus3-00.png,StatusIcons/shield-bash-00.png,Icons/mass-heal-00.png,Tiles/greenvalley-00.pngand the plaintile-00.png,Tutorial/hub-shop-00.png,UI/cursor-00.png,UI/pk-haste-00.png. Backdrops:Backgrounds/<region-words>-NN.jpgfrom 00 (tithe-moors-00);campaign.jsonnames each theme's set by its stem ("Backgrounds": "tithe-moors");Backdrops.Key(set, n)builds the key and the legacy_0/_01numbering is gone.Art(Pixelled,StatusIcon,BoardTile,Icon,Cursor) andCoach.ImageKeybuild every key throughAssetNames; the tools (make_icons.py,make_tiles.py,lesson_images.py,import_art.py) write the same names. - Dialogue. A speaker's
Portraitnames the class whose art it shows (the Lantern Merchant borrowscourier); the file comes from that class. - Saves. Saves keep class ids and the hero's
Variant, never file names, so renaming art needs no save migration. - (Checks:
ContentLoader.Validatefails a portrait name off the rule or a missing file;tools/check_assets.pyfails a portrait file named off the rule and a class whose files don't resolve;PortraitCanvasTestschecks every file's name.)
12.2 Procedural pieces and placeholders
Art generates the window gradients, cursor, glow and orb textures at runtime. Board tiles (amended 2026-10-10, owner): GridGame2026's own tile art (Resources/Tiles/tile-00.png, its tile3; each theme's is Tiles/<theme>-00.png, §12.1.3; imported by GridGame.Studio/tools/import_art.py), recoloured per campaign biome by GridGame.Studio/tools/make_tiles.py (moss, sandstone, murky teal, rust-rose; the caverns keep the original slate) and tinted light/dark per square to keep the checkerboard (Art.BoardTile(theme)). A missing texture falls back to a purple placeholder and logs once — a gap is visible, never fatal.
12.3 VFX
✅ GG-T253: one element/status table (Resources/Content/vfxstyle.json) drives every effect, with intensity tiers and timing/easing tokens; code-drawn UI Toolkit, with premade effect prefabs layered on top where mapped (GG-T269, §6.2; the one exception to "no prefabs"). Details and the contact-sheet tool in §6.2; rules in POLISH.md §E (POL-E1–E8).
13. Combat Resolution
13.1 Damage formulas
All in Core/Rules/Formulas.cs (ported from the old Formulas with engine types removed).
13.1.0 Evasion (defender, GG-T297)
Added 2026-11-06 (owner: "characters can be built to benefit from dodging hits"). Every unit, hero or enemy, has Evasion in percentage points:
evasion = clamp( min(25, 0.2·AGI + 0.1·LCK) + Σ buff EvasionBonus + Σ gear EvasionBonus , 0, 40 )
A level-1 hero sits near 3.6 (AGI 12, LCK 12), a ninja near 5, a level-30 skirmisher near 9–12; buffs and gear lift it, never past 40. It takes the top evasion points off the attacker's hit band on the same single Rng draw (roll ≤ crit% → Critical; ≤ hit% → Normal; else Miss, then a would-be hit with roll > hit% − evasion is dodged), so a seed replays identically wherever Evasion doesn't bite. A dodge deals nothing, emits DodgedEvent (a "Dodge!" float, a sidestep and a whoosh) instead of the 0-damage Miss, and fires OnDodge for the defender.
- Dodgeable: enemy melee swings and shots, counterstrikes (Counter Attack, Evasive Riposte) and charged enemy spells (
Formulas.Magic, §13.1.5). - Never dodged: pincer blows, supporter blows and the follow-ups riding them (the pincer is the game's core payoff), and hero spells/skills, which already never miss (§13.1.2).
- Sources:
BuffDef.EvasionBonus(validated −40..40;blurred+15 for 2 turns) andItemDef.EvasionBonus(validated 0..20, lost when an armor piece breaks). - Dodge synergies (Reactive rows in
abilities.json, onOnDodge): Evasive Riposte (a [Counterstrike] at 0.5×; on the Duelist's kit), Catch Breath (heal 6% MaxHP, once per action), Blur (gain [Blurred], once per action). Amended 2026-11-06 (GG-T302): carried by the duelist, swordmaster, dervish, martial artist and lurkers (Evasive Riposte), fencer, chroma ninja, speedster, courier, hexstalker and flying monkey (Blur), and thief and white ninja (Catch Breath); see §4.1.2. - Shown: the InspectCard and battle unit panel stat line (
EVA n%) at the Bestiary Stats tier, and the Bestiary's Stats fact (from base stats); buff and item text name their bonus; the glossary has [Evasion] and [Blurred].
13.1.1 Physical (pincer, supporter, enemy melee)
off = attacker STR + weapon BaseDamage def = defender VIT (+ armor rating, unused = 0)
raw = max(1, max(off − max(0, def − 0.25·off)·0.35, 0.20·off))
raw ×= defender physical resistance
var = raw × U(0.9, 1.1) × LCK tilt (0.99..1.01)
hit% = clamp(80 + 0.5·SPD + 0.2·LCK + 3·(attacker lv − defender lv), 5, 95) × Blind accuracy (×0.5)
crit% = clamp(8 + 0.4·LCK, 0, 50) × Blind accuracy (×0.5)
roll > hit% → Miss; else roll ≤ crit% → Critical; else Normal
(hit before crit, GG-T566: a crit only lands on a hit, so crit% above hit%
never bypasses Blind or the level shift — effective crit = min(crit%, hit%))
clutch = a hero's Critical landed while Blind is a Clutch! (§13.4.1): flash, "Clutch!", +ClutchCharge
dodge = a non-pincer, non-supporter would-be hit with roll > hit% − defender Evasion (§13.1.0)
dmg = max(1, floor(var × (crit ? 1.6 : 1) × 1.07^(Δlevel) × multiplier))
dmg = max(1, floor(dmg × incoming multiplier)) (immune if physical resistance ≤ 0)
multiplier = 0.5 for supporters, 1.5 for a shattering weapon. A Miss deals 0 and never pushes, staggers or wakes.
13.1.2 Spell damage (dispatcher)
Formulas.SpellDamage: round(base × resistance × (Lightning on Wet ? 1.5 : 1) × incoming), min 1 unless immune; then × BonusMultiplier vs BonusVsTag (items). No crit, no miss, no Blind. ⬜ Not yet built: unifying spells with the physical roll (old backlog).
13.1.3 Healing
Heal: HP = min(MaxHP, HP + BaseHeal); the event reports the amount actually restored. No resistance, no crit, no overheal.
13.1.4 Cast time
Formulas.CastTime(base, stats) = max(0.25·base, base × 50 / (50 + 0.5·(WIS + INT))), converted to ticks (round(s × 10), min 1). Hero casts only; enemy charges use their authored 2.5 s.
13.1.5 Enemy magic (charge resolution)
Formulas.Magic: same mitigation shape with INT vs WIS, element resistance, variance, the shared hit/crit roll and level scaling; plus the charge's flat SpellDamage (0 in content). Can miss.
13.1.5 Caster power (role identity)
Added 2026-10-11. A hero's spell damage scales with INT (physical skills with STR), heals with WIS: 1 + (stat − 12) × 0.035, clamped 0.7–1.6 (Formulas.CasterPower / HealPower). A Red Mage (INT 20) hits ×1.28, a Fighter's Fireball ×0.9. Items and enemy abilities keep their tuned numbers. Empowered (War Cry, Might Rune) multiplies all damage the bearer deals by 1.3. (Test: Caster_power_makes_a_mage_out_hit_a_fighter_and_a_sage_out_heal.)
13.2 HP delta
BattleRunner.Damage clamps HP at 0, emits DamagedEvent (amount, hit kind, type, HP after, note), credits hero threat (Unit.DamageDealt), kills at 0, then applies pushback and cast stagger.
13.3 Death and loot
At 0 HP (Kill): off board, buffs cleared, every timeline entry it owns removed (pending casts vanish), DiedEvent; enemies award loot (AwardLoot):
- XP
Formulas.XpReward = round(XpReward + 2·level + 0.10·(STR+VIT) + 0.08·(INT+WIS)), min 1. Catch-up XP (added 2026-11-26, GG-T474, owner pick 5b): when a battle's strongest foe is above level 24 (BattleConfig.CatchUpFromFoeLevel, the last main-campaign level), each hero below that foe is awarded the battle XP ×min(4, 1 + 0.5 × levels behind)(CatchUpPerLevelBehind,CatchUpMaxMultiplier;Formulas.CatchUpXp), applied per hero on a victory and on hard-won XP, after the foe's own XP and the difficulty dial and before the domesticated-monster factor. A hero at or above the foe, or any foe at 24 or below, earns exactly the old XP, so a hunter is never worse off and the two pinned curves (XpReward,XpToNext) are untouched. Not yet measured by a soak (GG-T919 measures stages 29-40);tools/xp_wall.pyoption 5b predicts the gap held at 10-13 instead of growing to 20. Pinned byFormulasTests.CatchUpXp_*. - Coins: the drop table's
CoinsMin..CoinsMaxif authored; Amended 2026-10-09: otherwise ≈ half the XP, ×U(0.8, 1.2), min 1 (no table in content authors coins). Snake segments drop no coins. - Items: each drop-table entry rolls its
ChanceforMin..Max. - Kills count by class (bounties, bestiary); snake segments don't count.
The view floats "+N G" and item names from the corpse. Totals accumulate in BattleResults and are committed by BattleFactory.Commit (§22.1).
13.3.1 Pickups
Added 2026-10-11 (owner: "powerups should sometimes drop"). A fallen enemy leaves a pickup with chance 0.20 + 0.004 × killer LCK (max 0.40), on its tile or a free one beside it, never more than 3 on the board (pickups.json, weighted):
| Pickup | Effect |
|---|---|
| Heart Tonic | heals the collector 25 % of max HP |
| Mana Shard | 1 orb |
| Quicksilver | hastens the collector 0.3 |
| Might Rune | Empowered (×1.3 damage) for 2 turns |
The first hero to enter the tile collects it (walking, being displaced, or teleporting). Enemies don't collect; one may stand on a pickup. Amended 2026-11-03 (owner direction, GG-T228): a pickup moves like an actor — any non-hero entering its tile (step, 2×2 lane step, snake, leap, blink, teleport, knockback/pull/displacement) shoves it like a movable tile onto the tile it just left, else the nearest open item-free tile (PickupMovedEvent, a slide with a cue; fades only on a full board), so no unit ever shares a tile with a pickup; nothing spawns on one (GG-T227, §1.1.3). One item per tile, ever (GG-T129, §1.1.3): a pickup only drops on a tile that holds no other pickup and no movable (FreeForItem), the Power Amplifier never spawns or is shoved onto a pickup, and the view never draws two item tokens on one tile or keeps the token of a collected or faded pickup. A pickup fades after 4 player actions (a ring on the token counts down). It pops out of the fallen enemy with a bounce; collecting flies it to the hero. (Tests: An_enemy_stepping_onto_a_pickup_shoves_it_into_the_tile_it_just_left, A_two_by_two_shoves_a_pickup_to_the_tile_vacated_on_its_lane, A_snake_head_stepping_onto_a_pickup_shoves_it_behind_its_tail, A_foe_knocked_onto_a_pickup_shoves_it_back_and_a_hero_still_collects, A_pickup_with_nowhere_to_go_fades_rather_than_stay_under_a_unit, strict/release unit-on-pickup; Stepping_on_a_pickup_collects_it_and_heals, A_round_trip_drag_that_only_grabs_a_pickup_still_counts_as_a_move, Pickups_fade_after_their_lifetime, Fallen_enemies_sometimes_leave_pickups; items apart: The_amplifier_never_spawns_on_a_pickup, Strict_soak_with_drops_and_amplifier_shoves_never_stacks_items and the rest of §1.1.3's GG-T129 tests.)
13.5 Armor plates (added 2026-10-11, owner: "some enemies are armored and need to take damage from that side to break it off")
ClassDef.ArmorPlate gives a family a plate on the side it faces (Unit.Facing, turned toward the hero it wants at spawn and at the end of each of its turns — FacingChangedEvent). Plate HP = ArmorPlate × (1 + 0.15 × (level − 1)) × EnemyHpScale (the scale added 2026-11-05, GG-T262). A physical blow (pincer strike, supporter, Cleave, Shield Bash) from the plated side (SideOf, dominant axis) dents the plate instead of the body (PlateHitEvent, "CLANG! −n"); at 0 the plate breaks off for good (PlateBrokenEvent, shards, "ARMOR BROKEN!"). Blows from the flanks or behind land normally; spells go around the plate. Shredded (§8.1, GG-T857) is the exception to "from the front": each application chips a fixed PlateChip off the plate from any side. Families: ceramic knights 30, templars 30, mecha armour 40, soldiers 18, the captain 24, the Ironbark Golem 30 (Heavy too, §14.25). Tactics: pincer it across its line of sight, break the plate head-on, or let the mage burn it. The plate is a riveted steel bar on the tile's rim; the enemy card says where it faces and how much is left. The bot avoids lining an attacker up on the plated side. (Tests: A_plate_takes_the_blow_from_its_facing_side_and_the_flank_hits_flesh, A_pincer_across_its_line_of_sight_skips_the_plate_and_a_broken_plate_stops_blocking, Spells_go_around_the_plate.)
- Amended 2026-11-28 (GG-T2069, the prologue's Tithe Collector, GG-T2065): unyielding plates and ShattersPlate.
ClassDef.PlateUnyieldingmakes a plate that no ordinary blow dents: a physical blow (pincer, supporter, physical skill) from the plated side clangs for 0 (PlateHitEventwithAmount0, "CLANG!") and the body takes nothing, and Shredded's chip clangs for 0 too; flanks, back and spells land as usual. Only an ability withAbilityDef.ShattersPlate(the Barbarian's Sunder, GG-T2072) takes it off: hitting a plated foe, it breaks any plate outright from any side, unyielding or not (PlateShatteredEventwith what was left, thenPlateBrokenEvent; "SHATTERED" floats as a CombatText Callout at the plate), before its damage, so the hit lands on the body. Validation:PlateUnyieldingneeds anArmorPlate;ShattersPlateis a Skill, Spell or Item that can pick a foe. The recorder's unit snapshot carriesplateUnyieldingon such a foe. HeroBot values a shatter byShatterValue(far more on an unyielding plate than on an ordinary one) and prices a physical skill into an unyielding front at 0. (Tests:UnyieldingPlateTests.) - Amended 2026-11-28 (GG-T2070, the prologue's first Tithe Collector fight, GG-T2065): scripted withdrawal. A stage's
Withdraw(WithdrawDef:AfterPlateClangs,AfterTurns,Line) ends the battle asBattlePhase.Withdrawnonce either count is reached: front blows clanged off an unyielding plate (BattleResults.PlateClangs, bumped with each 0PlateHitEventfrom a blow) or party turns ended. The engine announces theLineand emitsBattleEndedEventwithWithdrawnandLine(left out of every other battle's record); the banner reads FALL BACK. It is neither a win nor a defeat: Commit spends no items, wears no gear, puts everyone back at full HP, pays nothing, does not make camp on the road, and counts the stage as played (cleared, the next stage unlocked) so the story goes on. The results are one short Fall back card (the line, "Nothing is lost", Continue intoStoryBeats.AfterResults; no Retry). The recorder's outcome carriesplateClangswhen there were any. Validation: aWithdrawneeds a trigger and a CommanderLine. (Tests:ScriptedWithdrawalTests.)
13.4 The interrupt path
Any landing hit (source not null, not a miss) on a unit with a cast in flight runs BattleRunner.StaggerCasts(caster, attacker) — hero casts hit by enemies, enemy charges hit by heroes.
Order per hit:
- Clutch (hero casts only): chance
min(20%, LCK / 200)→ a Clutch! (§13.4.1, kindCastThroughInterrupt), then the cast resolves immediately (ResolveCast). - WIS shrug: chance
min(60%, 1.5% × WIS)→CastStaggeredEvent(Resisted)"Steady!", no delay. - Stagger:
delay = 0.6 s × (1 + attacker STR / 20) / (1 + caster WIS / 15)→ ticks, added to bothRemainingTicksandAccumulatedDelayTicks("Stagger!"). - Cancel: once accumulated delay ≥ the cast's original ticks, the cast is removed (
CastCancelledEvent"interrupted", "Interrupted!"); orbs stay spent. Cancelling an enemy charge mints one orb (§3.1.2).
13.4.1 Clutch! (added 2026-11-21, GG-T566)
Owner: "if a character is blind their chance to crit is lower, but if they do crit when blind it's considered 'Clutch!' which is a bonus for doing really cool things"; then "there are other combinations of things that should be considered 'Clutch!'".
A Clutch! is the game's reward for a really cool moment. Every kind goes through one path, BattleRunner.Clutch(unit, ClutchKind): it emits ClutchEvent { CasterId, Kind, EntryId } (the view's white flash + "CLUTCH!" float), announces "Clutch!", and grants the one shared, tunable bonus, BattleConfig.ClutchCharge (20) mana charge (ManaGainedEvent reason clutch, Kind Earned, shown as "Clutch!" on the charge tally). It draws nothing from the Rng itself: whatever earns it has already rolled, so seeded replays keep their draw count. Heroes only. Kinds today:
CastThroughInterrupt: a hero's cast forced through an interrupt by the LCK roll above (step 1); the cast then resolves.BlindCrit: a hero lands a Critical while Blind. Blind (Unit.IsBlinded, any accuracy-lowering debuff; todayblinded, ×0.5) lowers the crit chance by the same factor as the hit chance, on weapon blows (Formulas.RollHit, §13.1.1) and on hero spell crits (SpellCritFraction× accuracy), so a Blind crit is rare. Hit-before-crit alone would not have lowered it (it only caps crit at the halved hit chance, which a typical 10-30 % crit sits under). The crit still earns its usualCritChargetoo.
Added 2026-11-21 (GG-T571, owner: "do", on the recommendation): five more kinds, heroes only, deterministic (no Rng draw of their own), each a new ClutchKind on the same path:
LastStand: a hero at or belowBattleConfig.ClutchLastStandHpFraction(15 %) of max HP lands a killing blow.Finisher: a hero's blow fells the last foe, clearing the wave or winning the battle (WaveClearedEvent, then the Clutch). The last foe has to be a real one: when only remains or an egg were left to clear, or the wave ended to a tick, a hazard or a foe's own doing, there is none.DoublePincer: one hero move (a drop, or a teleport) closesBattleConfig.ClutchPincersInOneMove(2) or more pincers that strike; awarded to the mover as the pincer that reaches the count forms.HazardKill: a hero's knockback or pull carries a foe into an open hole (the fall) or onto a region danger (a rule'sDamageeffect or drag collision), and that hazard kills it in the same command. Its own Slam/Crash damage is the hero's blow, not a hazard.LastTickInterrupt: a hero's hit cancels a foe's charge ("Interrupted!") when the charge had at mostBattleConfig.ClutchLastTickSeconds(0.5 s) of timeline left before landing (measured before this hit's stagger).
Added 2026-11-27 (GG-T1581, GG-T1582; §25.20):
Resolve(resolve, glossaryclutch_resolve): a hero at Trust tierBattleConfig.ResolveTier(5) takes a blow that would fell it and holds atBattleConfig.ResolveHp(1) HP instead, once per battle (Unit.ResolveUsed). The blow emitsDamagedEventfor the reduced amount, thenResolveEvent { UnitId, SourceId, HpAfter }, then the Clutch. The view playsResolveEventlike a dodge: a clang, the hero braces and "Resolve!" floats up (CombatTextKind.Callout), then the usual "CLUTCH!" float with the headword "Resolve". The Resolve itself always holds; only the Clutch float and charge follow the one-per-action rule below.
Kill-based kinds (LastStand, Finisher, HazardKill) never count a revived foe's second death (Unit.AlreadyLooted), remains, eggs, corpses or snake segments.
One Clutch per action; the first to qualify wins. An action is the hero's command itself (BattleRunner.Apply), then each arrival on the timeline that command runs into (a cast resolving, a turn, a rule event: BeginClutchAction). A Clutch that would follow another in the same action is dropped whole (no float, no bonus); a dropped CastThroughInterrupt still forces its cast through. The kinds come up in the order the action happens:
DoublePincer, as the move's second pincer forms (after the first pincer's blows);- at each kill inside a blow:
LastStand(a hero dealt it) orHazardKill(a hole or region danger did); - after the blow lands:
BlindCrit; on a hit on a caster:CastThroughInterrupt(a hero's cast) orLastTickInterrupt(a foe's charge); Finisher, when the wave end is checked after the action's blows.
So a Blind crit that kills at 10 % HP reads as LastStand, and a double pincer whose first pincer lands a Blind crit reads as BlindCrit.
Tuning: the three numbers above live in BattleConfig; BattleConfig.ClutchDisabled switches any kind off (0 / below 2 also switch the numeric ones off). The bonus stays the one shared ClutchCharge. The view shows the kind's glossary headword small under "CLUTCH!" (glossary:clutch_<id>, the "Clutch: " prefix dropped). Stable ids (ClutchKinds.Id, glossary clutch_<id>): cast_through, blind_crit, last_stand, finisher, double_pincer, hazard_kill, last_tick. Replays carry the kind by name on ClutchEvent; nothing new lives in BattleState (the bookkeeping is the one-command runner's).
Not adopted (future candidates, GG-T571): a mana rollover that lands exactly on an orb; a kill with the blow that shatters the weapon; a Taunting tank surviving a hit at 1 HP; a kill while the hero is debuffed.
Enemy charges (§14.2): EnemyPlanner.PlanCast lets a unit with a ChargeAbility, not immobile and not adjacent to any hero (unless its boss phase PrefersCharge), queue a charge on the nearest hero instead of moving. Amended 2026-10-09:
- Single-target charges lock onto the hero, wherever it moves — dodge only by interrupting (or killing).
- Line charges (
ChargeShape.Line) lock the cardinal line from beside the caster to the edge on the dominant axis toward the target (X on ties); at resolution every hero still on those tiles is hit ("Dodged!" if none). Edge-pinned lines fall back to single-target. 🟡 Built in Core, but no enemy inclasses.jsonusesChargeShape: Lineyet (only hero-class rows carry it). - A charging enemy that gets another turn before its charge lands moves/attacks normally (no second charge).
(Tests: Enemy_charge_is_telegraphed_and_can_be_interrupted, Every_enemy_charge_telegraphs_and_resolves.)
14. AI
14.1 Enemy planning
BattleRunner.RunEnemyTurn(enemy), when its icon arrives:
- Mint the pending time bank (first enemy turn of the action) and emit
TurnStartedEvent. - Boss phases advance (§14.3).
- Immobile → skip the turn (end-of-turn ticks still run).
- Charge: if not already casting,
PlanCast→ queue a charge and end the turn. - Trap: a trap-layer with no hero adjacent rolls
LayChance(0.45) to arm a free, trap-free cardinal tile, ending the turn. - Pincer plan (GG-T306, §14.1.3): a pincer-capable 1×1 foe first asks
EnemyPlanner.PlanPincer. A walk that completes a pincer is taken at once, before step 4's charge; a walk that sets up an end or joins an ally pincer as a supporter is taken here, after the charge and trap checks. Either way it then goes straight to step 8's attack. - Move up to
MoveRangesteps (all content: 1 or 2), re-planning each step withPlanStep; a multi-tile step shoves heroes (§1.5); a snake head drags its chain. - Attack: a Sentient 1×1 enemy (
Unit.CanPincer, §1.3; was Humanoid before GG-T289) that is now an end of an enemy pincer resolves those pincers ("X pincers!"); otherwise it melees the adjacent hero its targeting personality picks (below). No adjacent hero → no attack. - End of turn: its non-halting turn buffs tick; battle-end check.
Targeting personalities (amended 2026-10-10, owner direction: "smarter enemies attack the weakest, dumb enemies the closest"). ClassDef.Targeting drives movement (PlanStep), melee choice, ranged choice and charge targets (EnemyPlanner.PickFrom); ties fall back to distance, then HP, then id:
| Personality | Picks | Families |
|---|---|---|
| Closest | nearest hero | slimes, undead, cyber-zombies, skelepedes, tree golems, mannequin, frogs, toad, sandmaw, cyclopes, troll, yeti, shamblers, ceramic knights, templars, naga |
| Weakest | lowest current HP, even across the board | wolves, werewolf, vulture, hags, swamp mistress, reaper, phantom, lurkers, tech gremlins, purple prototypes |
| Threat | hero who has dealt the most damage (Closest until someone has) | captain, soldiers, demon lord, oni, mecha armor, ice mauler |
| Squishy | lowest VIT (then MaxHP) | gangers, steppin' razors, scorpion, goblin thug |
| Erratic | a different hero each turn (hash of clock + id; no RNG draw) | bats, flying monkey, ghost |
Auto (unset) derives Weakest for INT ≥ 14, Threat for Sentient enemies (Humanoids before GG-T289), else Closest. The enemy card shows it ("Hunts the weakest hero").
Speed tiers (amended 2026-10-10): enemy Speed is 18 (swift: bats, wolves, flyers, werewolf, steppin' razors, phantom), 15 (quick), 11 (steady) or 8 (slow: slimes, undead, zombies, golems, mannequin, ghost). Open-track rate scales with Speed and the Zone is a shared crawl. Amended 2026-11-06 (GG-T286): the rate scales with Speed the whole way, so a fast enemy can overtake a slow one anywhere on the bar.
EnemyPlanner is pure: it reads state (temporarily moving the enemy's Pos to score a candidate, then restoring it) and never commits.
14.1.1 Decision tree
PlanStep(state, enemy)
immobile or snake segment? ─ yes ─▶ stay
target = PickTarget: argmin( distance + 8·HPfrac − threat·INT·0.8 )
candidates = {stay} ∪ {4 cardinals that are in bounds & free (1×1) | FootprintStepLegal (2×2)}
for each c: wounded (HP < 30%) ? score = +dist : score = −dist
not wounded & adjacent to target here +2
1×1 & would be sandwiched by two heroes −100
c == stay −0.5
not wounded & Sentient 1×1 & forms pincer +50
not wounded & becomes ally-pincer supporter +25
return argmax(score)
The −100 sandwich avoidance (two heroes directly on opposite sides) outweighs the +50 pincer-seek: enemies pick safe pincers, not suicide pincers.
14.1.2 Score weight cheat sheet
| Factor | Weight | Notes |
|---|---|---|
| Distance to target | −1 per tile (+1 when wounded) | footprint-aware Manhattan |
| Adjacent to target | +2 | dropped when wounded |
| Sandwiched by heroes | −100 | immediate neighbors on one axis; 1×1 only |
| Stay put | −0.5 | mild advance bias |
| Forms own pincer | +50 | Sentient 1×1 (CanPincer, GG-T289), not wounded
|
| Supports an ally's pincer | +25 | any enemy, not wounded |
| Threat (target choice) | −(DamageDealt / max) × INT × 0.8 | smart enemies hunt the top damage-dealer |
| Wounded retreat | below RetreatHpThreshold 0.30
|
flees; flank-avoid still applies; never against a lone hero (GG-T123, §22.10) |
Constants live in EnemyPlanner and BattleConfig.RetreatHpThreshold.
14.1.3 Pincer planning (GG-T306)
Added 2026-11-06 (owner): "The heroes and enemies with 'Pincer' keyword not only line themselves and complete pincers, they actively try to make pincers by swapping with monsters or heroes to set up a beneficial situation with enemies, themselves, and their supporters — so every monster needs support abilities."
PincerPlanner (Core/Rules) is one shared, pure planner for any unit that can pincer (Unit.CanPincer: heroes, Sentient foes, tamed or domesticated monsters).
- Search. It tries every walk of up to
min(steps, MaxSearchSteps = 3)cardinal steps, never revisiting a tile. Each step either enters an empty walkable tile or swaps with the one-tile unit standing there, friend or foe. The occupant takes the tile just left, exactly like a hero drag (§1.1). Units that can't be swapped: multi-tile actors, snake members, remains, corpses and neutrals. A hero-team walk never steps on a trap. That is at most 52 walks per unit, each scored on the board it leaves. The planner movesPosto look and restores it, never draws from the Rng, and tries walks inCoord.Cardinalsorder; the first of equal scores wins, so it is deterministic. - Score (
Evaluate, the board after the walk):
| Outcome | Kind | Worth |
|---|---|---|
| The mover is an end of a pincer with live opponents (a commanded hero: any hero pincer, since its drop resolves them all) | Complete | OpponentValue 10 per live, unarmored opponent, +3 for one below 40% HP, plus each supporter's SupportWorth (so an ally swapped into the chain counts)
|
No pincer, but it stands at one end of an unbroken opponent line whose far tile is open (empty, or a non-pincer ally that can be swapped out) and a pincer-capable ally can reach that tile on its next action (a foe or tamed beast: its MoveRange; a commanded hero: the drag that fits the window)
|
Setup | SetupBase 6 + 1 per opponent in the line; a foe's set-up +PinnedOpponentBonus 2.5 per Rooted, unarmored hero in it (§14.24)
|
| It joins the chain of an ally pincer already on the board | Support | 0.6 × its SupportWorth (added to the other kinds too)
|
| Each ally newly trapped in an opponent pincer | — | −12; the mover itself trapped −40 (a Berserker or Bomber foe ignores the −40) |
| Each step / each swap | — | −0.25 / −0.25 |
SupportWorthprices a supporter by its class'sSupportDef(§1.2.3): Strike 2 + 4×magnitude, Heal 2 + 10×, Buff 3, Haste 2 + seconds, Mana 2 + charge/25, Cleanse 2, Crit 2 + 6×, Cast 2 + 4×, Status 2 + 3×chance, Pushback 2 + 2×seconds. This is why a healer behind an attacker can beat a second striker. Every enemy class must carry its ownSupport:ContentLoader.Validaterejects one that doesn't ("an enemy needs its own Support"), and all 115 do since GG-T307.- Foes (
EnemyPlanner.PlanPincer): a Sentient 1×1 foe that isn't immobile and isn't wounded enough to retreat plans with itsMoveRange. A Sentinel, an Ambusher still lying in wait, or a Sluggish foe on its rest turn plans with 0 steps (it only pincers in place). An evasive brain (Kiter, Commander, Trapper, Medic) takes only a Complete walk. A walk is taken only when its score is positive.BattleRunner.FollowPincerPlanwalks it withSwapStepEnemy(an empty tile is an ordinary step; an occupied one swaps,DisplacedEventby the foe, and a hero shoved onto a trap springs it). With a swap it announces "X maneuvers!". Then it attacks, closing the pincer if it now stands at an end. Mindless foes (beasts, slimes, yetis…) keep the plainPlanStep: they never swap. - Tamed monsters (
RunAllyTurn, §25.11.3) plan with the same planner on the hero side and walk the plan with the hero drag'sWalkPath. They complete a hero pincer, stand at an end a hero can close, or slot into a chain. They still act on their own and shove heroes aside to do it, which can wreck a setup the player had in mind. With nothing to engineer, a tamed monster falls back to charging the nearest foe. A ranged one that already has a shot takes only a Complete walk. - The smart bot (
HeroBot, timeline-aware) adds the planner's walk to its drag candidates whenever it is not one of the straight L-drags it already previews. The walk is capped at the drag that fits the gap (MaxDragStepswith think time, GG-T311), and is previewed and scored like any other drag. The bot also weighs each supporter of a previewed pincer by 0.6 ×SupportWorthinstead of a flat 2. - (Tests:
PincerPlannerTests—A_sentient_enemy_swaps_with_an_ally_to_complete_a_pincer,A_sentient_enemy_swaps_to_set_up_an_end_an_ally_can_close,A_mindless_enemy_never_swaps_to_pincer,A_tamed_monster_moves_to_close_a_hero_pincer,The_hero_planner_finds_the_walk_that_closes_a_pincer,Planning_and_the_turns_it_drives_replay_identically,Every_real_enemy_class_brings_its_own_support.) - Balance (GG-T306). Per-stage 8 soak (
AbilityUsageSoak, 15 campaign stages, same seeds), smart / casual bot wins, before → after:
| Difficulty | Before (GG-T311) | Planner only (pincer push 1 s) | Shipped (pincer push 1.5 s) |
|---|---|---|---|
| 10 | 79% / 33% | 72% / 22% | 76% / 31% |
| 5 | 99% / 85% | — | 99% / 78% |
| 1 | 100% / 98% | — | 100% / 98% |
Engineered enemy pincers alone cost the casual bot 11 points at difficulty 10, which put it below the 30–45% band. PincerPushbackSeconds 1 → 1.5 s brings it back: every hero pincer buys the party half a second more against foes that now set up their own pincers. Difficulty 10 by theme, smart bot: greenvalley 83 → 71, desert 92 → 92, swamp 67 → 62, cave 88 → 79, cityruins 67 → 75. The smart bot wins at least one battle on every stage. Casual, by theme: greenvalley 25, desert 42, swamp 25, cave 58 → 46, cityruins 17. The soak also exposed two stalls, fixed here. A wounded foe fleeing into a corner can't be pincered on either axis, so a buff-only pair could never finish it; a fleeing step now scores −FleeCornerPenalty (3) for a corner tile. And a smart bot whose bar held only buffs never counted as locked out, so with 1 s gaps it never dragged; it now also hurries (no think time) after StallHurry (4) windows without drawing blood. BattleConfig.EnemyPincerSetups and EnemyPincerSwapsHeroes (both on) are soak knobs (CONVERGENCE_TUNE). Turning both off measured casual 31% at difficulty 10 with a 1 s push.
14.1.1 Taunt
Added 2026-10-11 (owner: "a tank should be able to taunt enemies"). While any hero carries a buff with Taunts (Taunting, 2 turns, −25 % damage taken), EnemyPlanner.PickFrom only considers taunting heroes among those in reach — so walking, charging and ranged foes all go for the tank, and a taunter out of reach doesn't save an adjacent ally. Synergy: a hit staggers a hero's cast, so a taunting tank keeps the mages' spells charging. (Tests: A_taunting_hero_draws_every_enemy_that_can_choose, Taunt_only_overrides_among_heroes_in_reach.)
14.2 Enemy archetypes (design palette)
| Archetype | Lean | Tags | Behavior today |
|---|---|---|---|
| Rusher | high SPD, low VIT | Beast | loads fast; closes and melees |
| Bruiser | STR + VIT | Sentient | slow, tough; best pincer target |
| Flanker | mid STR, AGI | Sentient | seeks own pincers (+50), supports (+25) |
| Ranged | AGI, INT | Sentient | ⬜ Not yet built: keep-distance behavior and ranged attacks |
| Caster | INT, low VIT | Magic (+ affinity) | charges when no hero is adjacent; icemauler (charge_ice) is the live caster (cave-02, cave-03)
|
| Beast | varies | Beast | never pincers; rushes |
| Mechanical | VIT, immunities | — | 🟡 resistances supported; no class authors them yet |
| Boss | everything | 2×2 + BossPhases
|
cyclops00: phases + enrage (§14.3)
|
| Line caster | as Caster | ChargeShape: Line
|
🟡 built in Core, no enemy authored (§13.4) |
| Trap-layer | varies | Trap
|
scorpion lays venom_snare (6 Poison + Poisoned)
|
| Segmented snake | boss | SnakeSegments
|
naga00 (3 segments) — see below
|
| Heavy | VIT | ClassDef.Heavy
|
GG-T891 / GG-T914: never displaced by anyone else: a hero drag step into it is refused (StepBlockedEvent "heavy"); knockback, pull and swap fizzle ("Too heavy!"); a rule MoveUnits and a hole swap skip it; PincerPlanner.Swappable and the hero bot's shove/pull/swap scoring respect it. A unit carrying the buff id floating (GG-T859) is movable again (Unit.IsHeavy, Unit.WontBudge). All one tile: heavytrooper02 (Bulwark Shieldbearer), mechaarmor00, mechaarmor01, mechaarmor02, mountaintroll, crystalbrute, anchorhulk, ironbarkgolem (§14.25), minotaur02 (Herd Bouncer), treegolem00-treegolem04, treegolem06. (Tests: HeavyTests.)
|
Traps (BattleState.Traps, traps.json) — Amended 2026-10-09: visible tiles armed by a trap-layer; triggered by a hero entering the tile in any way — stepping, being displaced by a slide, being shoved by a boss, or teleporting — once, then removed (damage is environmental; buff applied). Enemies never trigger traps. Trap tiles are excluded from Teleport, Revive and spawn.
Segmented snake — a class with SnakeSegments n grows n body segments on free adjacent tiles at spawn (GrowSnake, preferring up/left/right/down); each segment has half the head's MaxHP, no timeline icon and no plan, and follows the head's vacated trail front-to-back (FollowSnake). Tail-first: any member is armored (damage set to 0, "Armored!") while a later chain member lives. Chain members are immovable to drags. Segments award XP but no coins or kills.
14.3 AI hooks
- Casting enemies — §13.4.
- Supporter positioning —
WouldSupportAllyPincer(+25), reusingPincerDetectorsupporters; since GG-T306 the pincer planner also swaps allies into a chain (§14.1.3). - Boss scripted phases — Amended 2026-10-09:
ClassDef.BossPhasesis data (HpThreshold,PrefersCharge,OnEnterAbility,Announce). At the start of the boss's own turn, every phase whose threshold the HP fraction has dropped to is entered in order:BossPhaseEvent, its announcement, and its on-enter ability resolved on itself.cyclops00: phase 0 at ≤ 100% ("Cyclops", on its first turn), phase 1 at ≤ 50% ("ENRAGED!" +enrage, self-Hasten 0.35).PrefersChargelets a phase charge even in melee range (no content uses it yet). - Orders — the bot may issue the Commander's orders when
HeroBot.UseOrdersis set (default off): §9.2.2. - Threat tracking —
Unit.DamageDealt(hero damage dealt this battle) feedsPickTarget. - Retreat — below 30% HP.
14.4 Enemy kits (added 2026-10-10, owner direction: "every enemy with its own unique behaviours and spells and whether they lay traps")
Generic, data-driven mechanics (ClassDef), so each family's kit is content, not code:
| Mechanic | Field | Effect |
|---|---|---|
| Trail | Trail (trap id)
|
the tile it steps off becomes that trap (max 3 per enemy, oldest removed) |
| On-hit | OnHitBuff, OnHitChance, OnHitTurns
|
a landed attack (melee, ranged, pincer) may inflict the buff, for OnHitTurns turns when set (0 = the buff's own Duration, GG-T904)
|
| Death burst | DeathBurst
|
on death, damages every adjacent hero ("self-destructs!") |
| Passives | Abilities
|
lifesteal (heals a quarter of the damage dealt, the row's Lifesteal Amount 0.25; it was half before GG-T282), tough_hide (physical blows land at 70%), berserk (+35% damage below half HP), regenerate (6% MaxHP at the end of its turn), double_attack, counter_attack; GG-T302 adds signature rows per family (§4.1.2)
|
| Support charges | ChargeAbility with Filter: AllyOnly
|
Howl (allies in 2 tiles hasten 0.25u — only when another ally in range is already at a hero, GG-T123), Rally (allies gain Protection), Mend (heal the most wounded ally 30 — only when one is below 70%) |
| Area charge | ChargeAbility with an area Shape
|
Poison Cloud: 3×3, 6 poison + Poisoned |
| Traps | Trap
|
Poison Cloud (miasma), Shock Mine (10 lightning + Slowed), Caltrops (8), plus the trail traps Slime Trail / Mire (Slowed) and Quicksand (4 + Slowed) |
Family kits: slimes leave a Slime Trail · bats move 2, lifesteal · wolves Howl · werewolf moves 2, berserk, lifesteal · vulture & lurkers move 2 (lurkers' bites poison) · flying monkey moves 2, blinds · frogs/toad/skelepedes/scorpion/naga poison on hit · hags cast Poison Cloud and lay it as a trap · swamp mistress Mends · marsh shamblers leave Mire, tough hide · undead & reaper lifesteal · cyber-zombies self-destruct (14) · ceramic knights, templars (Smite), mecha armor (Thunder) and cyclopes have tough hide · tree golems regenerate and root what they hit (Root Grasp, §14.24) · purple prototypes & oni go berserk · tech gremlins lay Shock Mines · gangers blind · steppin' razors move 2 and strike twice · goblin thug lays Caltrops · soldiers & mannequin counter · the captain Rallies · demon lord casts Fireball, lifesteals · phantom moves 2, silences · ghost slows · ice mauler & yeti may freeze · mountain troll regenerates and goes berserk · sandmaw leaves Quicksand, berserk. The enemy card and the bestiary list each kit (Ui.KitTraits).
14.5 Remains — gravestones and bone piles (added 2026-10-10, owner direction)
Owner: "some undead enemies should spawn a solid grave stone like in Darkest Dungeon where you have to delete the gravestone / pile of bones to be able to finally defeat the enemy, or after a while they will resurrect."
ClassDef.Remainsnames the marker an enemy leaves: hooded undead → Gravestone, skelepedes → Bone Pile. On death (after its loot), the remains spawn on the same tile as an enemy unit taggedRemains(RemainsLeftEvent).- Remains are solid (can't be dragged through or knocked back), never move or attack, are immune to status effects, give no loot or XP and never appear in the bestiary. They have their own slow timeline icon (Speed 5) — the countdown to resurrection.
- Destroy them (pincer or spell) and the undead is laid to rest for good. A wave is not cleared while remains stand.
- Leave them and when their icon reaches the left edge the undead rises again on that tile at half HP and drops nothing a second time (
RoseAgainEvent); kill it again and it leaves fresh remains. - Amended 2026-11-05 (GG-T261): remains rise on their third turn (
BattleConfig.RemainsTurnsToRise3; the first two only announce "stirs… N"), with 25 % of the slain owner's MaxHP (RemainsHpFraction), and a snake's body segments leave none (one marker per creature). Found in the battle records: since GG-T188 every action runs the clock to the next enemy turn (§2.0), so a marker left by the last foe standing rose inside the killing action (median 0 player actions between remains and rising), and at the owner's own level a gravestone had ~110 HP — the casual bot won 0 of 6 on every Anchor Wastes and Halcyon stage and on Tithe Moors III. See AMENDMENTS 2026-11-05. - Amended 2026-11-21 (GG-T566): a revived enemy pays out once. Enemies may revive (an echoed revive raises the caster's own fallen ally on the same unit).
Unit.AlreadyLootedis set on an enemy's first death and survives the revive, so its second death awards no loot/coins/XP, no pickup roll, no kill tally (Results.Kills), no bounty credit and leaves no remains (nothing that could rise again). On-kill/on-ally-KO triggers and region death rules still fire. (A remains rising is unchanged: that is a new unit, alreadyNoLoot.) - Art: procedurally drawn gravestone and bone pile (ImageMagick).
- (Tests:
A_slain_undead_leaves_solid_remains_that_block_the_wave_from_clearing,Remains_left_alone_raise_their_owner_at_half_hp_without_loot,Remains_are_solid_and_real_undead_leave_them.)
14.6 Brains — every family thinks differently (added 2026-10-11, owner: "come up with ai for every single enemy unit, they are all different in their own unique ways")
ClassDef.Brain sets how a family moves and decides, on top of its targeting personality (§14.1) and kit (§14.4). EnemyPlanner.PlanStep scores tiles with the brain's taste (BrainScore); BattleRunner.BrainTurn handles brains that change the shape of a turn. The enemy card and bestiary describe it.
| Brain | Behaviour | Families |
|---|---|---|
| Hunter | closes on its prey (the classic) | purple prototype, yeti |
| Pack | +1.5 per kin beside it — moves as a group | wolves, gangers, skelepedes |
| Ambusher | holds still until a hero is within 2 tiles, for at most 3 of its own turns (AmbushPatienceTurns, GG-T262)
|
lurkers, naga, scorpion |
| Skirmisher | adjacent at turn start → strikes first, then darts away | bats, flying monkey, steppin' razors |
| Kiter | holds ~3 tiles from heroes (melee kiters keep charging spells) | hags, mecha armour |
| Guardian | stays beside its most valuable ally (boss, caster, commander, medic) | ceramic knights, templars, ice mauler |
| Berserker | charges, ignores flanking danger, never retreats | cyclops, oni, werewolf |
| Scavenger | hunts the wounded, retreats at 50 % HP | vulture, reaper |
| Trapper | keeps ~3 tiles off to lay traps on the approach | goblin thug, tech gremlins |
| Sluggish | moves every other turn | slimes, marsh shamblers, tree golems |
| Hopper | can leap two tiles, over units or blocks | frogs, toad (toad's tongue slows) |
| Blinker | every 2nd turn appears beside its prey and strikes | ghost |
| Burrower | every 3rd turn tunnels under and bursts up beside its target | sandmaw |
| Bomber | dives where it touches the most heroes (it explodes) | cyber zombies |
| Medic | stays one tile from its most wounded ally, away from heroes | swamp mistress |
| Commander | stays ~3 tiles back with an ally between it and the heroes | captain, demon lord |
| Duelist | wants exactly one hero adjacent; avoids being outnumbered | soldiers |
| Stalker | targets casters (new Caster targeting), avoids crowds
|
phantom |
| Sentinel | never moves | mannequin, remains |
| Relentless | never retreats | undead, mountain troll |
No two families share brain + targeting + kit (Every_enemy_family_plays_differently). Enemy physical strikes carry EnemyStrikeMultiplier 0.9 (retuned after the brains with BalanceReport). Amended 2026-11-05 (GG-T262): enemies spawn with EnemyHpScale 0.45 of the MaxHP formula (and plate, §13.5) and strike at 1.2 — faster fights, same threat (AMENDMENTS 2026-11-05). (Tests: An_ambusher_waits_until_a_hero_comes_close, A_sentinel_never_moves_and_a_sluggish_foe_moves_every_other_turn, A_hopper_leaps_two_tiles_over_a_unit, A_bomber_dives_where_it_touches_the_most_heroes, A_skirmisher_strikes_then_darts_away, A_burrower_surfaces_beside_its_target, A_guardian_stays_by_its_ward.)
14.7 Corpses (added 2026-10-11, owner: "add in the corpses for some things so they get in the way like Darkest Dungeon")
Beasts and humanoids of several families (wolves, gangers, soldiers, oni, werewolf, mountain troll, yeti, goblin thug, toad, captain, lurkers, scorpion) leave a corpse (Remains: "corpse", tags Remains + Corpse) on their tile: it blocks movement like any remains, sits in pincer lines (a pincer through it clears it — "Cleared away"), takes area spells, has no turn and never rises, does not hold up a wave clear, earns no mana or loot, and rots away after 6 player actions. It's drawn as the fallen unit's own art, upright and greyed (amended 2026-10-19, owner: "don't turn monsters sideways" — it was rotated 90°); its card says whose body it is and when it rots. (Tests: A_fallen_foe_leaves_a_corpse_that_blocks_the_way_but_not_the_win, A_corpse_blocks_movement_and_rots_away.)
14.8 Reinforcements and eggs (added 2026-10-12, owner direction)
Owner: "sometimes enemies can lay eggs that hatch, sometimes new enemies don't spawn on the first turn... every wave can offer a surprise like fighting monsters then suddenly soldiers show up."
Delayed mid-wave spawns. SpawnDef.DelayTicks (default 0 = today's immediate spawn, unchanged for every untouched wave) queues an entry into BattleState.PendingSpawns instead of spawning it at wave start; BattleRunner.Tick resolves any entry whose TriggerClock has arrived via ResolvePendingSpawns, spawning it exactly like a normal wave arrival. A wave with an unresolved pending entry holds the wave open even once the board is clear (CheckEnd checks PendingSpawns alongside living units), so the wave never advances out from under a reinforcement still inbound.
Never an empty board (GG-T512, owner 2026-11-21). A wave is never held open on an empty board: whenever no living foe is on the board (bodies and neutrals don't count) and the wave still has a queued spawn, BattleRunner.BringReinforcementsForward moves the earliest-queued group (every pending entry sharing that TriggerClock) up to the current clock and lands it at once through the normal placement rules (its own tile, else a free one; a footprint with no room anywhere is dropped so the wave can end). Later groups keep their own trigger tick and are pulled forward the same way if the board empties again. It runs when the last foe falls (CheckEnd), at the end of SpawnWave (a wave of only delayed spawns opens with its first group on the board) and at the top of every Tick. The arrivals enter the timeline as any mid-battle arrival does (their Speed's entry from now, spaced) and play the usual ReinforcementsArrivedEvent beat. The owner chose this over a "Reinforcements incoming" status line: the fresh-player run (GG-T494) had sat through a Taunt and seven GUARDs on a clear board in Tithe Moors I's wave 4, with nothing saying why.
The surprise beat. WaveDef.SurpriseSpeaker/SurpriseLine (optional, wave-scoped) fire once — on the first delayed entry a wave triggers, not per enemy — as a ReinforcementsArrivedEvent. The App layer plays a quick, per-class entrance (burst-up for Brain.Burrower, drop-from-above for Flying-tagged classes, fade-in for Undead-tagged classes, the ordinary wave fade+drop otherwise — derived entirely from existing Tags/Brain, no new content fields needed), then, if a line is set, a held narrative card: the speaker's portrait and name beside the line (reusing the same 360×400 bordered-frame convention as the character-select reveal and the level-up fanfare), dismissed by a tap or ~2.6s, same dual-exit idiom as the story crawl. Tithe Moors I's wave 4 is the flagship example: a goblin/bandit skirmish that a captain's soldier squad reinforces mid-fight. Automation: /demosurprise?speaker=&line= plays the beat on demand for testing.
Eggs. An egg-laying class sets ClassDef.LaysEgg (the egg's class id) and EggInterval (lay every Nth own turn, default 4); BattleRunner.Enemy.LayEgg drops the egg on a free adjacent tile, mirroring how LeaveRemains drops a grave marker. The egg class is tagged Egg (Unit.IsEgg, the IsRemains pattern's sibling) and is otherwise built exactly like a gravestone/bone pile (Brain.Sentinel, immobile, no turn except its own). When the egg's timeline turn arrives, Hatch spawns its RisesAs/RisesLevel class on the same tile at full HP (a fresh enemy, unlike a risen undead's half-HP second life) and leaves normal loot. naga00 (Arkgrave II's solo finale) is the one showcase of this so far. (Tests: A_delayed_spawn_arrives_partway_through_its_wave_not_at_wave_start, A_waves_reinforcement_dialogue_fires_once_even_with_multiple_delayed_entries, An_egg_hatches_into_its_real_enemy_at_full_hp_on_schedule, With_no_foe_on_the_board_the_earliest_queued_reinforcement_group_lands_now.)
14.9 Rule-breaking bosses (added 2026-11-05, owner direction, GG-T234)
Owner: "a boss who 'breaks the rules' as far as standard gameplay goes." Each main-biome finale (the third stage of Tithe Moors, The Lantern Road, Shardfall, Arkgrave, Anchor Wastes, The Still, Halcyon and The Choir's Cathedral) has one boss that breaks one standard rule, each a different one (but see the GG-T344 amendment below), each with a counter the player can read.
- Data:
SpawnDef.RuleBreak(RuleBreakenum:None,TwinTurn,AxisWard,MireSwap,GravityStamp,Undying) on that one spawn in the finale wave, so the same class plays by the normal rules everywhere else (the Captain fights in many stages).ContentLoader.Validate(RuleBreaks.Validate) refuses a rule-break on a guest and aMireSwapon a multi-tile or snake body. Copied ontoUnit.RuleBreakat spawn (immediate or delayed);Unit.RuleBreakCountkeeps its bookkeeping. - Telegraph: on arrival, a
RuleBrokenEvent(Arrived) bannering the broken rule and the counter ("The Mecha Armor ignores the pincer rule: side-to-side pincers glance off. Pincer it top to bottom!"), with a war cry, a screen shake and a RULE BREAKER float. Every bite after that is anotherRuleBrokenEventwith its own cue and float (DOUBLE TIME! / WARDED! / SWAP! / STAMP! / UNDYING!). All of it runs throughBattleEngine.Apply→ events (BattleRunner.RuleBreak.cs).
| Finale | Boss | Rule it breaks | What happens | Counter |
|---|---|---|---|---|
| Tithe Moors III | Captain | the turn order (§2) | TwinTurn: after its own turn, if no hero stands beside it, it marches and strikes again at once (no second cast, trap or buff tick) | engage it: a hero beside it at the end of its turn holds it to one |
| The Lantern Road III | Oni (oni02)
|
a fallen foe stays down (§13.3) | Undying (added 2026-11-07, GG-T345), the Hierarch's rule on an oni chief whose mask gets back up: the first time it falls while another foe still stands, it rises at half HP | cut down its raiders first; it rises only once |
| Shardfall III | Mecha Armor | the pincer rule (§1.2) | AxisWard: a hero pincer along its row (both attackers on its row) glances off, with no attacker or supporter strike ("Warded!", no mana), and cracks the ward | pincer it top to bottom; the third glancing pincer (RuleBreakRules.AxisWardCracks) shatters the ward and every pincer lands after, so a foe hugging an edge can't stall the fight
|
| Arkgrave III | Swamp Mistress | one tile at a time (§1.1) | MireSwap: at the start of its turn, with a hero beside it, it trades tiles with the ally standing farthest from any hero (one-tile allies only), then takes its turn | cut down its coven first; with no ally left it has nowhere to go |
| Anchor Wastes III | Cyclops | only you move your heroes | GravityStamp: every 2nd own turn it stamps and drags every hero within 3 tiles (not already beside it) 2 tiles toward itself, nearest first (Pull); the turn before, it warns "raises a foot: it stamps next turn!"
|
keep out of reach on the warning, or stand ready: the pull drops heroes beside it, which is where a pincer starts |
| The Still III | Chronomancer | the turn order (§2) | TwinTurn (added 2026-11-07, GG-T344), the Captain's rule on a time-mage: the keeper of the Still's clocks takes a second turn whenever no hero stands beside her | close in on her: a hero beside her at the end of her turn holds her to one |
| Halcyon III | Kiln Guard captain (ceramicknight06)
|
the pincer rule (§1.2) | AxisWard (since 2026-11-07, GG-T350; the Hierarch moved up to the cathedral), the Mecha Armor's rule on the porcelain knight holding the spire stair: row pincers glance off its glaze and crack it; the third shatters it | pincer it top to bottom, or crack the glaze three times |
| The Choir's Cathedral III | Hierarch (hierarch)
|
a fallen foe stays down (§13.3) | Undying: the first time it falls while any other foe still stands (graves, eggs and bodies don't count), it rises at half HP, shedding its debuffs. Its Choir (a Cantor and a Confessor) stands beside it | silence its Choir first; it rises only once |
Amended 2026-11-07 (GG-T344): The Still (§22.3) is a sixth main biome, so six finales now carry a rule-breaker and two of them break the same rule. The Still III reuses TwinTurn on the Chronomancer rather than adding a sixth engine rule: she is the Still's timekeeper and already fights the party's tempo, and the owner made no new art for a boss. Amended 2026-11-07 (GG-T345): The Lantern Road (§22.3.2) is a seventh main biome. Its finale reuses Undying on an oni (oni02) rather than adding an engine rule: existing units only, and the oni's lore is a mask that grew on. So two pairs of finales now share a rule (TwinTurn, Undying). Amended 2026-11-07 (GG-T350): The Choir's Cathedral (§22.3.3) is an eighth main biome and the new finale. The Hierarch keeps Undying and moves to the Cathedral III; Halcyon III gets a Kiln Guard captain with AxisWard, so each of TwinTurn, AxisWard and Undying is shared by two finales and MireSwap and GravityStamp stay unique.
A frozen or sleeping rule-breaker skips its rule along with its turn. The bot handles them without special-casing beyond pincer scoring: a warded row pincer is worth +3 (it cracks the ward) instead of +10 (HeroBot.ScoreMove), so it prefers a column pincer. (Tests: RuleBreakTests — the arrival banner on the flagged spawn only; TwinTurn's second turn and its engaged counter; AxisWard's glancing row pincer, landing column pincer and shatter; MireSwap's swap and its no-ally counter; GravityStamp's warning then pull, out-of-reach heroes untouched; Undying's single rise with a thrall standing, and staying down with none or once risen; the eight main finales carry exactly these rule-breaks and no other stage does; validation of a guest rule-break and a big-body swap.)
Amended 2026-11-08 (GG-T371): elements.json's RuleBreaks lists how each rule is answered. All five are Positional (any party can do it), and ContentLoader.Validate refuses a campaign rule-break with no row, or with an Element or Item counter the Merchant doesn't sell (§3.3.1).
14.10 The Chronomancer (added 2026-11-05, owner direction, GG-T275)
Owner: "Stack haste, while a Chronomancer casts slow on you would be an interesting battle mechanic." A caster that fights the party's tempo (§2.11) instead of its health.
- Class.
chronomancer, an enemy caster (Kiter brain, shoots 3 tiles, moves 1). Its portrait is the owner's own art (GG-T328, cut withGridGame.Studio/tools/portrait_cut.py, a 1024 canvas since GG-T352);"Portrait": "chronomancer"keepsGridGame.Studio/tools/import_art.pyfrom overwriting it with the oldHag03stand-in. It is not a Crucible family: it has a boss phase, which the Crucible excludes. - Temporal Drag (
charge_temporal_drag). A telegraphed charge (2.5 s on the cast lane),AllEnemies: 4 Arcane to every hero plus Slowed (2 turns). That is one −1 tempo effect for the whole party, not one per hero, so every foe's icon runs ×1.25. - Rewind (
chrono_rewind). Once, at 40% HP (its boss phase), it heals 20 and hastens its own icon 0.5 u. That never touches party tempo (§2.7.1). - Brain. It holds Drag while the party's net tempo is already negative (
EnemyPlanner.PlanCast). It moves or shoots instead, and drags when the party is level or hasted, which is the tug-of-war. As a Kiter it keeps out of pincers. - Counterplay (named on its kit line and in Drag's InspectCard text):
- interrupt: hit it while it charges (§13.4 stagger and cancel)
- cleanse Slowed off every hero (§2.11, the tempo lifts)
- out-haste it: stacked haste outweighs one Drag
- Bot.
HeroBotvalues pincering or damaging a foe that is charging a tempo drain (+6 / +5) and cleansing a negative-tempo debuff while net tempo is below zero (+4 per point). - Placement. Anchor Wastes II, wave 2 (behind two ceramic knights). On the same 12 casual-bot seeds and parties it wins 9 of 12 (75%) with the Chronomancer and 8 of 12 without, inside the POL-G1 55–85% band. The wave was already long (36 actions without it, about 43 with it): the knights' tough hide is the slog, and that's left to the balance loop (GG-T276).
- (Tests:
ChronomancerTests. Content validates and is placed; one Drag on two heroes is −1 tempo with both Slowed; cleansing the last Slowed hero restores tempo; Drag is held while tempo is negative and cast when level or hasted; Rewind is self-only.)
14.11 The Murder — harpies (added 2026-11-07, owner art, GG-T329)
The Murder (docs/STORY.md §3.2): Street kids spliced with black wings, rooftop smugglers. Three swift (Speed 18, re-entering ≈3 s out), frail, Sentient flyers (Flying), one family (harpy drop table), three roles:
| Class | Role | Brain / targeting | Kit | Support |
|---|---|---|---|---|
harpy01 Harpy Raider
|
striker | Skirmisher (strike, dart a tile away) / Weakest, moves 2 | Talon Rake (talon_rake): a landed blow, 25%: [Slowed] on the target, so the party loses a point of tempo (§2.11)
|
Crit +25% (Diving Strike) |
harpy02 Harpy Shrieker
|
disruptor | Kiter / Weakest, moves 2 | Gale Shriek (charge_gale_shriek): 2 s charge, a 3×3 around one hero, 4 Arcane and Pull 2 — each hero caught is dragged toward the harpy, out of the formation the party built; rests a turn, recovers 0.5 s. Blur
|
Haste its attacker 1 s (Tailwind) |
harpy03 Harpy Spotter
|
ranged | Kiter / Caster, shoots 3, moves 2 | Jammer Darts (jammer_darts): a landed blow, 25%: [Silenced]
|
Silence 30%, reach 2 (Jammer Drone) |
- Counterplay (on their cards): they are frail, so [pincer] them when they land; cleanse the Slow; interrupt the shriek or keep heroes spread; close in on the spotter. Weak to Lightning (×1.5).
- Design note. The gale first knocked heroes away (Knockback 1). A hero blown into the board's edge takes the 18-damage wall slam, and the casual bot fell from 8/12 to 1/12 on the trial stage, so the gale pulls instead: same "breaks your lines" identity, no slam.
- Placement. Tithe Moors II (
greenvalley-02), wave 4: the three harpies replace two goblin thugs and a Redline ganger. Casual bot, 24 seeds, campaign parties: 11/24 with them and 11/24 without; smart bot 23/24 vs 24/24. - (Tests:
HarpyTests.) - Fixed 2026-11-17 (GG-T276): Tithe Moors II's own wave 1 (unrelated to the harpies) placed two slimes at
Y: 5and Tithe Moors III's wave 1 placed one atY: 5— the only hand-placed enemies in the entire campaign inside the hero deployment band (BattleRunner.Setup's default hero spawn is rows 4–7; every other authored enemy position instages.jsonsits atY0–4). That put a slime on top of the party before it could set up on the very first wave of the stage, which thepolish.py --balancerecords showed as abnormally short, losing wave 1s (3–5 player actions against POL-G6's 6–20 band). Moved toY: 1, alongside the other wave-1 slime'sY: 2.CONVERGENCE_ABILITY_STAGE-scoped soak, 8 casual battles/stage before → after: greenvalley-03 2/8 (25%) → 6/8 (75%, now inside the POL-G1 55–85% band); greenvalley-02 stayed low (2/8 → 1/8, inside this pass's noise) — its wave 4 harpies above and its slime-trail hazard (§14.22) are the likelier remaining cause there, left to the next pass.
14.12 The Void Sentinel (added 2026-11-07, owner art, GG-T330)
What forms where an Anchor leaks (docs/STORY.md §3.5): smoke given a body around a cyan heart of stolen mana. An elite guardian, and the first enemy to use the Line charge built in §13.4.
- Class.
voidsentinel:Construct,Magic, notSentient(it never makes a pincer, but supports one). Speed 8 (re-enters ≈4.8 s out), VIT 18, a 20-point front armor plate (§13.5), Guardian brain (stays beside its most valuable ally) with Threat targeting. Resists Dark (×0.5), weak to Holy (×1.5). - Void Beam (
charge_void_beam,ChargeShape: Line). A 2.5 s charge whose line, from beside it to the board's edge toward its target, is marked when it starts. On landing, every hero still on the line takes a Dark spell (INT vs WIS) and is [Silenced]. It rests a turn between beams and recovers 1.5 s. - Void Core (
void_core): the first hit that drops it below half HP flares a [Ward] on it. - Support: Void Aegis, [Ward] on its attacker, reach 2.
- Counterplay (its card): step off the marked line or interrupt the charge; pincer it from the flanks, not the plate.
- Placement. Anchor Wastes I (
cave-01) wave 5, added beside the two oni and the ice mauler it guards. Casual bot, 24 seeds, campaign parties: 15/24 with it, 18/24 without; smart bot 24/24 both. Of 178 beams the casual bot let charge, 175 landed and caught 71 heroes: most beams hit an empty line because a hero had moved off it. - (Tests:
VoidSentinelTests.)
14.13 The Lich (added 2026-11-07, owner art, GG-T331)
The last captain of the Ark Long Patience, who refused to let his ship die and kept himself instead (docs/STORY.md §3.5). A boss caster for the Arkgrave.
- Class.
lich:Undead,Sentient,Caster,Boss. Speed 11, INT 18, WIS 16, frail body (VIT 14). Commander brain (keeps ~3 tiles back with an ally between it and the party), Weakest targeting, shoots 3. Resists Dark (×0.5), weak to Holy (×1.75); Poison Ward and Steadfast. Not tameable and not a Crucible family (it has boss phases). - Soulfire (
charge_soulfire): a 2.5 s charge on a 3×3 around its target: 6 Dark to every hero inside and a 50% [Burning]; recovers 1.5 s. Spread out, or interrupt it. - Soul Harvest (
lich_soul_harvest, boss phase at 50%): once, 5 Dark to every hero, and it heals 6 per hero touched. Enemy-only (MetaServicesEnemyOnly), like Enrage and Rewind. - The grave.
Remains: gravestone(§14.5): when it falls it leaves a grave, and left standing the grave raises it on its third turn. That is the phylactery, with no new code. A risen Lich enters its harvest phase again. - Support: Soul Echo, Cast its Soulfire at 50% power, reach 2.
- Placement. Arkgrave I (
swamp-01) finale, wave 5: the Lich behind a marsh shambler, in place of a lurker. Casual bot, 24 seeds, campaign parties: 10/24 with it, 13/24 without. The waves before it are unchanged: 14 runs reached wave 5 both times, and the casual bot beat the Lich in 10 of its 14 tries (13 of 14 against the old wave). Smart bot 24/24 both. The first cut (8 Dark, Burning every hit) took the stage to 8/24; Burning alone was more damage than the Lich's own spells. The casual bot let it rise from the grave 3 times in 24 battles. - (Tests:
LichTests.)
14.14 The Infernalists (added 2026-11-07, owner art, GG-T338)
The Ember's zealots (docs/STORY.md §3.6): black armour, long red capes, and the belief that the Nearing is a homecoming. Four Sentient variants, one infernalist family. They resist Fire (×0.5), are weak to Ice (×1.5), and three of them carry Infernal Hide (they can't be [Burned]). The family plays one combo: burn, then execute.
| Class | Role | Speed / brain / targeting | Kit | Support |
|---|---|---|---|---|
infernalist01 Zealot
|
brander | 15 / Hunter / Threat | Cinder Claws (cinder_claws): a landed blow, 35%: [Burning] on the target
|
Status burning 50% (Cinder Brand) |
infernalist02 Pyromancer
|
caster | 11 / Kiter / Squishy | Hellfire (charge_hellfire): 2.5 s charge, a Cross (radius 1) on a hero, 6 Fire and [Burning] on each hero caught; recovers 1.5 s
|
Cast at 50% (Ember Echo), reach 2 |
infernalist03 Bloodbinder
|
healer | 11 / Medic / Threat | Blood Rite (charge_blood_rite): 2 s charge on its most wounded ally (below 70%): heals 25 and [Empowers] it; rests a turn. Lifesteal
|
Heal the chain 10%, reach 2 (Blood Pact) |
infernalist04 Executioner
|
finisher | 11 / Duelist / Weakest | Executioner's Verdict (executioners_verdict): its blows land ×1.5 on a [Burning] foe
|
Crit +30% (Mark for Death) |
- Engine (small). The Verdict needed a trigger condition on the other unit's status, so
TriggerConditiongainsOtherHasStatus(§4.1): checked against the context's other unit (the attacker, else the target) inTriggers.ConditionHolds, written "the foe has [Burning]" byTriggerText, and validated as a known buff id. - Counterplay (their cards): cleanse the burn before the Executioner reaches the hero, or keep burning heroes away from it; spread out against Hellfire; kill the Bloodbinder first or interrupt the rite; Ice spells.
- Placement. The Shardfall, where the Ember wakes. Shardfall I (
desert-01) wave 3: Pyromancer and Bloodbinder in place of two sand maws. Shardfall II (desert-02) wave 2: Zealot and Executioner beside a sand maw, in place of a militia soldier, so the burn-then-execute combo plays out. Casual bot, 24 seeds, campaign parties: desert-01 18/24 with them vs 19/24 without, desert-02 14/24 vs 15/24; smart bot 24/24 on both, with and without. The first Executioner (STR 17, VIT 15, healed by the Bloodbinder beside it) dealt twice a soldier's damage, so it was cut to STR 14 and VIT 13 and paired with the Zealot instead. - (Tests:
InfernalistTests.)
14.15 The Bulwark (added 2026-11-07, owner art, GG-T332)
The Hierarch's soldiers (docs/STORY.md §3.1): white power armour, siege rifles, and an mana pack on every back, each pack a portable Still. Four Sentient variants, one bulwark family, all slow or steady (Speed 8 or 11, re-entering ≈4.8 s or 4 s out). Sealed suits resist Poison (×0.5); the armour shorts out under Lightning (×1.5). The squad plays hold the line and tithe the party: a shield-Still wards the soldiers, the rifles and the siege gun shoot from range, and the Siphoner drinks the party's orbs.
| Class | Role | Speed / brain / targeting | Kit | Support |
|---|---|---|---|---|
heavytrooper01 Rifleman
|
ranged | 11 / Kiter / Squishy, shoots 3 | Suppressing Fire (suppressing_fire): a landed shot, 30%: [Blinded]
|
Blind 30%, reach 2 (Covering Fire) |
heavytrooper02 Shieldbearer
|
wall | 8 / Guardian / Threat, plate 30 | Aegis Field (charge_aegis_field): 2 s charge, [Ward] on every ally within 2 tiles; rests a turn, recovers 0.5 s
|
Protection on the chain (Pack Shield) |
heavytrooper03 Siphoner
|
tithe | 11 / Kiter / Caster | Mana Siphon (charge_aether_siphon): 2 s charge on a hero, 4 Arcane, and an orb leaves the party's bank; rests a turn, recovers 0.5 s
|
Haste its attacker 1 s, reach 2 (Vent Mana) |
heavytrooper04 Siege Gunner
|
artillery | 8 / Commander / Threat, plate 24 | Siege Shot (charge_siege_shot, ChargeShape: Line): 3 s charge down a marked line to the board's edge, a Lightning spell on every hero still on it; rests a turn, recovers 2 s
|
Pushback 0.75 s (Rail Recoil) |
- Engine (small): the siphon.
AbilityDef.DrainsOrbs(0–3, validated, only on acharge_ability, so a hero can never learn it): when the charge lands on at least one hero (a single target that isn't dodged, or any hero inside an area),BattleRunner.DrainOrbstakes that many orbs' points (N x 100) from the party pool, never below 0 (GG-T1915; was from every spell meter), emitting aManaGainedEventwithKindSiphon,OrbsN and the caster asSourceId(GG-T1844; the bars drop and the cast cue plays; telemetry doesn't count it as mana spent) and "Siphoned an orb!". An empty bank announces "No mana to take". The smart bot treats a siphon charging while the bank holds orbs like a tempo drain (HeroBot.ChargesTempoDrain): worth staggering. - Counterplay (their cards): spend orbs before a siphon lands, or interrupt it; flank the Shieldbearer and the Siege Gunner off their plates; step off the siege gun's marked line; close on the Rifleman and pincer it; Lightning.
- Placement. Halcyon, where the Hierarch holds the spire. Halcyon II (
cityruins-02) wave 3: Shieldbearer, Rifleman and Siphoner in place of two Chromed Hollow. Halcyon III (cityruins-03) wave 2: the Siege Gunner beside the lone bat. Casual bot, 24 seeds, campaign parties: cityruins-02 15/24 with them vs 20/24 without (inside the 55–85% band; the losses still come at the reaper's wave 5, with the wounds the squad leaves), cityruins-03 17/24 vs 18/24; smart bot 24/24 everywhere. Over the cityruins-02 casual runs the siphon landed 139 times but found orbs in the bank only 37 times: the casual bot spends what it earns, which is exactly the counter. The first Shieldbearer also had Tough Hide; plate, Ward and Protection were already a slog, so it was dropped. A two-soldier wave (Shieldbearer and Siphoner, with the Rifleman moved beside the gun) measured 14/24 and cost cityruins-03 three wins. - (Tests:
BulwarkTests.)
14.16 The Anchor Watch — wraith knights (added 2026-11-07, owner art, GG-T334)
Knights sworn to guard the Anchors forever, kept going by the arches' own leaking mana long after they should have died (docs/STORY.md §3.5): grey plate, cloaks the colour of old fire. Three Undead, Sentient variants, one anchorwatch family. They resist Ice (×0.5) and Fire undoes them (×1.5). The family plays undying: every knight leaves a gravestone that raises it again unless smashed (§14.5), and each role adds a different way of refusing to fall.
| Class | Role | Speed / brain / targeting | Kit | Support |
|---|---|---|---|---|
wraithknight01 Watch Sentry
|
the post | 8 / Sentinel (never moves) / Threat, plate 30 | Rime Riposte (rime_riposte, Reactive): attacked directly, 50%: a [Counterstrike] at 60% that also [Slows] the attacker. Steadfast
|
Ward on its attacker (Oath Shield) |
wraithknight02 Watch Reaver
|
the hunter | 15 / Hunter / Weakest | Oathbound (oathbound, Reactive): the first time a hit drops it below 35% HP it heals 25% and gains [Ward] (trigger Cooldown 99: once a battle)
|
Slow 35% (Rime Edge) |
wraithknight03 Watch Vigilant
|
the keeper | 11 / Commander / Weakest | Ember Vigil (charge_ember_vigil): 2 s charge, [Regen] on every ally within 2 tiles; rests a turn, recovers 0.5 s
|
Heal the chain 10%, reach 2 (Old Fire) |
- No engine code. Sentinel brain, Reactive triggers, a trigger cooldown, an AllyOnly area charge and gravestone remains are all existing data.
- Counterplay (their cards): strike the Sentry from range or accept the riposte, and flank its plate; finish the Reaver in one push once its oath has held; interrupt the Vigil or kill the Vigilant first; smash the graves; Fire.
- Placement. The Anchor Wastes. Anchor Wastes I (
cave-01) wave 2: a Reaver beside a skelepede, in place of the second skelepede. Anchor Wastes II (cave-02) wave 3: Sentry and Vigilant beside the goblin thug, in place of an oni and a skelepede. Casual bot, 24 seeds, campaign parties: cave-01 14/24 with them vs 15/24 without; cave-02 6/24 vs 7/24 (already below the band before them: most losses are still at the Chronomancer's wave 2); smart bot 24/24 on both. In the casual runs the Reaver's oath held 29 times and the graves stirred 134 times. - (Tests:
AnchorWatchTests.) - Amended 2026-11-17 (GG-T276): the balance loop's
polish.py --no-player --balancepass found Anchor Wastes II (cave-02) wave 3 and Anchor Wastes III (cave-03) wave 3 were the only early-mid-campaign waves stacking two Anchor Watch units together (Sentry + Vigilant oncave-02, Reaver + Vigilant oncave-03) — a sustain-on-sustain combo (Vigilant's party-wide Regen keeping the Sentry's counterstrike or the Reaver's self-heal topped up) that the GG-T334 placement note above already flagged as the cause of cave-02's 18/24 → 6/24 drop. Each wave's Vigilant (wraithknight03) swapped back for a plainskelepede(matching what it originally stood in for), leaving one Anchor Watch elite per wave instead of two.CONVERGENCE_ABILITY_STAGE-scoped soak, 8 casual battles/stage before → after: cave-02 4/8 (50%) → 6/8 (75%, now inside the POL-G1 55–85% band); cave-03 2/8 (25%) → 3/8 (38%, still below band — wave 4's cyclops pair + mountain troll is the harder remaining slog there, left to the next pass). cave-01's single-elite wave 2 was already in band and is untouched.
14.17 The Choir — cultists (added 2026-11-07, owner art, GG-T335)
The Choir's engineer-priests (docs/STORY.md §3.1): faceless hoods, white ponchos printed with violet circuit-glyphs. They run the Stills and sing the mana out of people; the glyphs are the hymn. Three Sentient variants, one choir family, every one of them a singer: each role is a telegraphed charge the party can read on the bar and interrupt. Their own song is mana, so they resist Arcane (×0.5); they are weak to Dark (×1.5).
| Class | Role | Speed / brain / targeting | Kit | Support |
|---|---|---|---|---|
cultist01 Choir Cantor
|
the hymn | 11 / Commander / Weakest | Tithe Hymn (charge_tithe_hymn): 2.5 s charge on the whole party, 3 Arcane to every hero and a 50% [Silenced] on each; rests a turn, recovers 1.5 s
|
Silence 30%, reach 2 (Hush) |
cultist02 Choir Psalmist
|
the buffer | 15 / Kiter / Squishy | Psalm of Certainty (charge_psalm_of_certainty): 2 s charge, [Empowered] on every ally within 2 tiles; rests a turn, recovers 0.5 s
|
Empower its attacker, reach 2 (Certainty) |
cultist03 Choir Confessor
|
the absolver | 11 / Medic / Threat | Absolution (charge_absolution): 2 s charge on its most wounded ally (below 70%): heals 15, [Cleanses] every debuff, gives [Ward]; rests a turn, recovers 0.5 s
|
Cleanse the chain (Absolve) |
- No engine code for the songs. An AllEnemies charge with a buff chance, an AllyOnly area buff and a single-ally heal that also cleanses and wards are all existing dispatcher data.
- Counterplay (their cards): cast your spells before the hymn lands, interrupt it, or cleanse the Silence after; pull the Choir away from the Psalmist or interrupt the psalm; kill the Confessor first, or interrupt the absolution.
- Placement. Halcyon III (
cityruins-03) wave 3: a whole Choir (Cantor, Psalmist, Confessor) in place of two Chromed Hollow and the Choir's training mannequin. Casual bot, 24 seeds, campaign parties: 19/24 with them vs 17/24 with the stage as it stood (the Bulwark's Siege Gunner already in wave 2; 18/24 before either); smart bot 24/24 both. The stage got no harder: the three frail singers stand in for a cyber-zombie pair whose death bursts (14 to every adjacent hero) hurt more than a hymn, and the casual bot reached wave 5 in 23 of 24 runs. - The rune circle (amended 2026-11-24, GG-T902). Every Choir role also carries Choir Rune (
choir_rune, Skill, cooldown 2 turns): when it has no song to sing it paints a violet rune (regionruleschoirrunes, statechoir_rune: no lifetime, no harm, the Choir's own mark) on a free tile beside it (within 2, the nearest ring first, then the tile farthest from the party), walks onto it, and holds it.EnemyPlanner.PlanRunedeals the free runes to the singers not yet on one, nearest pair first, so no two chase the same rune; a singer with none paints one while the Choir's runes number fewer than three, it isn't Silenced and no hero is at its side. A singer on its rune, or on its way, still strikes a hero beside it. Fewer than three singers never start a circle (they fight instead), and the slimes' lob logic never throws a rune.- The circle closes the moment the third singer steps onto a rune while the other two hold theirs (
TileStateDef.Circle:Size3). While fewer than 5 of the Choir stand (SummonBelow) it sings up a Cyber Zombie (cyberzombie00, at the closing singer's level) beside it; with 5 or more it instead Empowers the three singers on the runes. Then every rune clears (RuneCircleEvent, then a "cleared" tiles event), and they start again. - Counterplay: position. A hero who steps on a rune scuffs it (
SquishedBy: Hero; the HeroBot weighs scuffing a rune like squishing a hatching glob), and a hero standing on a rune's tile, or in a singer's way, stops the circle closing. Kill one singer and the circle can't close at all; Silence a singer and it can't paint.
- The circle closes the moment the third singer steps onto a rune while the other two hold theirs (
- (Tests:
ChoirTests.)
14.18 The Herd — minotaurs (added 2026-11-07, owner art, GG-T339)
The Street's hired muscle (docs/STORY.md §3.2): kids spliced with horns and bull-mass in the underspire's back-room clinics, in hoodies, cargo pants, platform sneakers and chrome. Four Humanoid, Sentient variants, one herd family (Remains: corpse). The splice holds a body's mana in so the Stills can't sing it out, so they resist Arcane (×0.5); the chrome grafts short out under Lightning (×1.5). The family plays loyalty on the timeline: they are loyal to the crew that pays and feeds them, and every bull carries Stampede (herd_stampede, Reactive OnAllyKO): when any ally falls (a bull or the crew that hired it), it casts the free stampede_rush on itself and its icon jumps 0.3 of the bar (1.5 s) sooner (§2.7.1).
| Class | Role | Speed / brain / targeting | Kit | Support |
|---|---|---|---|---|
minotaur01 Herd Boss
|
the paymaster | 11 / Commander / Weakest | Feed the Herd (charge_feed_the_herd): 2 s charge when an ally is below 70%, heals every ally within 2 tiles 12 and rushes each 0.15 of the bar; rests a turn, recovers 0.5 s
|
Haste its attacker 1 s, reach 2 (On the Payroll) |
minotaur02 Herd Bouncer
|
the wall | 8 / Guardian / Threat, plate 24 | Brass Knuckles (brass_knuckles): a landed punch, 30%: [Slowed] (the party loses a point of tempo)
|
Ward on its attacker (Bodyguard) |
minotaur03 Herd Gorer
|
the charge | 11 / Hunter / Threat | Bull Rush (charge_bull_rush, ChargeShape: Line): 2.5 s charge down a marked line to the board's edge, 8 Physical plus its INT hit on every hero still on it; rests a turn, recovers 1.5 s
|
Pushback 0.75 s (Trample) |
minotaur04 Herd Breaker
|
the brawler | 15 / Berserker / Weakest | Berserk: ×1.35 below half HP; charges in, never retreats | Crit +25% (Gore) |
- No engine code. An
OnAllyKOreactive that casts a free self-haste (stampede_rush, enemy-only inMetaServicesEnemyOnlylike Enrage), an AllyOnly heal-and-haste charge and a Line charge are all existing data. - Counterplay (their cards): kill the Herd before the crew that hired it, or watch the bar when a ganger falls and [Pushback] the bull that lurches forward; kill the Boss first or interrupt the feeding; flank the Bouncer off its plate; step off the Gorer's line; finish the Breaker in one push; Lightning.
- Placement. Street territory. Tithe Moors III (
greenvalley-03) wave 3: a Bouncer and a Gorer hired by two Redline gangers, in place of the other two gangers. Halcyon I (cityruins-01) wave 5: the Boss and the Breaker beside a Hollow, in place of the Choir's training mannequin and a bat. Casual bot, 24 seeds, campaign parties, difficulty 10: greenvalley-03 8/24 with them vs 10/24 without, cityruins-01 9/24 vs 9/24 (both stages were already below the 55–85% band); smart bot 24/24 on both, with and without. In the casual runs the herd stampeded 72 times and the Gorer rushed 134 times on greenvalley-03; on cityruins-01 the Boss fed its crew 118 times. - Rage (amended 2026-11-24, owner: "a minotaur goes rage, steam comes out of their 'ears' ... and a steam train sound plays while they charge linearly", GG-T897; the steam and the whistle are the view's, GG-T898). The Gorer (
minotaur03) and the Breaker (minotaur04) carry two Reactives beside the Stampede:herd_rage(OnLowHp, Threshold 0.5) andherd_rage_kin(OnAllyKO, conditionFallenFamily: "herd": one of the Herd fell, not a ganger that hired it). Each applies Raging (buffs.jsonraging, 3 turns, Refresh): outgoing damage ×1.3, andRages: true, which makes the bull Heavy while it lasts (Unit.IsHeavy: no shove, pull, swap or drag moves it, and Heavy already shrugs Frightened; a fear it carries breaks when the rage lands) and immune to Pushback ("Immune!", its icon isn't set back). A Raging Gorer's Bull Rush stops being a telegraphed blast and becomes the run itself (BattleRunner.RagingRush): the bull charges down its marked line from its own tile, to the board's edge or until it pulls up in front of the first barricade (RegionBoard.StopsCharge, which takes its knock as before), stone (a block or unwalkable tile), Heavy or immovable unit, or any non-hero unit. Every hero in its path is trampled (the charge's usual blow) and knocked aside one tile off the line (the run's left first, then its right); a hero who can't be knocked aside (Rooted, Heavy, or boxed in) is trampled and stops the bull in front of it. ARampagedEventnames the path and the trampled heroes ahead of the steps. A Rooted bull can't start the run (it can't even mark a line, GG-T920; rooted after marking, the plain trample resolves and it stays put). Counterplay: kill a bull before it is wounded past half or before its crewmate drops, Root it, put a barricade or a Heavy body on its line, or step off. - (Tests:
HerdTests.)
14.19 The Hellspawn (added 2026-11-07, owner art, GG-T340)
What the Ember makes of a beast or a person who drinks from the Shardfall's red rivers (docs/STORY.md §3.6): red scale, black hooked claws, manes and tails of blood-light. Whatever they were is gone, so they are Beasts, not Sentient (they never plan a pincer). Four variants, one hellspawn family. Born of the Ember, they resist Fire (×0.5), all carry Infernal Hide (they can't be [Burned]) and are weak to Ice (×1.5). The family plays the hunger: every one carries Bloodscent (bloodscent, Passive Always): its blows land ×1.5 on a foe below half HP.
| Class | Role | Speed / brain / targeting | Kit | Support |
|---|---|---|---|---|
hellspawn01 Ravager
|
the hunter | 15 / Hunter / Weakest | Bloodscent | Burning 50% (Cinder Mane) |
hellspawn02 Drinker
|
the runner | 18 / Skirmisher / Weakest | Bloodscent and [Lifesteal]: strikes, drinks and darts away | Haste its attacker 1 s (Blood Rush) |
hellspawn03 Emberheart
|
the tide | 11 / Stalker / Caster | Red Tide (charge_red_tide, Shape Row): 2.5 s charge, the red river floods its target's whole row, 5 Fire and [Burning] on every hero in it; rests a turn, recovers 1.5 s
|
Cast at 50%, reach 2 (Red Spill) |
hellspawn04 Scaleback
|
the wall | 8 / Relentless / Threat, plate 20 | Searing Scales (searing_scales, Reactive OnAttackedDirect, 35%): [Burning] on the attacker
|
Protection on the chain (Scale Wall) |
- Engine (small). Bloodscent needed a trigger condition on the other unit's HP, so
TriggerConditiongainsOtherHpBelow(§4.1, like GG-T338'sOtherHasStatus): checked against the context's other unit inTriggers.ConditionHolds(strictly below the fraction), written "the foe is below 50% HP" byTriggerText, and validated to 0..1 byContentLoader.Validate. - Red Tide is the first enemy charge with the
Rowshape: it follows its target, so the hero it picked is always caught, and the rest of a row the party lined up for a pincer can step out of it. - Counterplay (their cards): keep the party above half HP or keep the wounded out of reach; interrupt the tide or leave the row; [pincer] the Drinker when it lands; strike the Scaleback from range or cleanse the burn; Ice.
- Placement. Shardfall III (
desert-03), the stage the Infernalists left untouched. Wave 2: Ravager and Drinker beside the tech gremlin, in place of two militia soldiers. Wave 4: Scaleback and Emberheart beside the gremlin and the vulture, in place of two more soldiers. Casual bot, 24 seeds, campaign parties, difficulty 10: 13/24 with them vs 8/24 without; smart bot 24/24 both. The stage gets easier: the four soldiers they replace are plated, countering,SentientDuelists that pincer, and the beasts are not; most losses are still at the Captain's wave 5 (7 of 11 with them, 11 of 16 without). In the casual runs the tide landed 103 times and the scales seared 19 attackers. - (Tests:
HellspawnTests.)
14.20 Region rules (added 2026-11-08, owner direction, GG-T359)
Each region of the campaign plays under its own board rules, and every region gets new monsters (Mannequin placeholder art first) built around its rule. GG-T359 is the framework; the regions' own rules are GG-T360 (barricades), GG-T361 (crumbling floor), GG-T362 (rising water), GG-T363 (telegraphed shard strikes), GG-T364 (anchor pull) and GG-T365 (darkness that masks timeline icons).
- Data, not code. A rule is a
regionrules.jsonrecord (RegionRuleDef): the tile states it can paint (TileStates), the events it can put on the timeline (Events) and the hooks that run its effects (Hooks). A campaign theme names the rules every one of its stages plays under (campaign.jsonthemeRules), and a stage can add its own (stages.jsonRules); the theme's come first, each once (RegionRuleCatalog.ActiveFor). Everything is checked byContentLoader.Validate(RegionRuleCatalog.Validate): ids unique across all rules, every state, event, buff, rule and immunity reference known, areas complete, events with a positiveSeconds. - Words live in Prose. A rule's name and description are the Prose text
rule:<id>(kinddescription, payloadnameandshort), joined byProseText.Join;regionrules.jsonmay not carryNameorDescription(ProseText.NarrativeFields,tools/prose_text.py NARRATIVE,tools/prose_keys.py game_keys). Each rule in play is announced with its name and description as the battle opens (RegionRuleEvent). - Hooks (
RuleHookDef.On):BattleStart(before wave 1 spawns),WaveSpawn(every wave, after its foes are on the board),TurnStart/TurnEnd(a unit's own timeline turn: a foe's or an independent ally's icon arrives; a hero's at each party window),EnterTile(any unit stepping, being shoved or pulled into a tile) andUnitDeath. Filters:Team,State(the subject stands on that tile state),Wave,Every(every Nth match) andChance. - Effects (
RuleEffectDef.Kind):MarkTiles,ClearTiles,ModifyTiles(a counter; at the state'sThresholdit becomes itsBecomesstate, or clears),Damage,Heal,ApplyBuff,MoveUnits(toward/away from an anchor or a point, or a direction, a free tile at a time),Schedule(a timeline event),AdjustEvents(later, sooner, orCancel: the rule timers),PlaceAnchor/MoveAnchor(named board points) andSetFlag/ClearFlag(board-wide flags;mask-timelinemakes the view hide whose foe icon is whose) andGrantOrbs(Amount mana orbs into the party's bank per hero reached, GG-T376). An effect's tiles are itsArea(Self,Target,Anchor,EventTiles,Tiles,Row,Column,RandomFree,RandomUnits,WithState,All, grown byRadius); unit effects reach the units on the area, the subject, or everyone, filtered byTeam. - Persistent tile state. A painted tile (
TileMark) keeps its state, the rule that painted it, a counter and an optional lifetime (LifeSecondson the clock). The board draws every one as a wash in its state's colour with its glyph and its counter (BoardView.SyncRegion). ABlocksstate is a block (BattleState.Walkable): nothing enters, lands or spawns there, and it is never painted, nor does a counter turn a tile into one, under a unit or a board item, so the board stays legal (§1.1). AHazardstate is harmful to stand on. - The timeline is the warning. A rule never hurts the party out of nowhere: every hazard a rule makes is first a
Scheduled rule event, its own icon on the timeline (TimelineKind.Hazard, no owner unit), counting down like a cast, its glyph or icon in its own colour, and its telegraphed tiles pulse on the board from the moment it is queued. It lands when it reaches the left edge (ties on one tick: casts, then rule events, then turns), runs its effects on those tiles (EventTiles) and leaves the bar, or re-arms for the same time (Repeat, a rule's heartbeat). A held icon reads the rule's name, description and when it lands. Retiming never brings one in under a tick, so it is always seen first. - Monsters play with the rules. A monster's ability (
AbilityDef.RuleEffects, any skill, spell or enemy charge, run once it resolves with the caster as subject and the anchor asTarget) and its death (ClassDef.OnDeathRule, run where it fell) use the same effects: create, change or clear tile states, queue or retime events, move anchors, raise flags. A board-only ability doesn't announce a miss. These work on any stage, rules in play or not. - Immunity.
ClassDef.RuleImmunelists rule, tile state, rule event or ability ids the class shrugs off: their unit effects skip it, a rule's hooks don't fire for it, and a state's danger doesn't count for it (a flier over a collapsed floor, a water-born foe in the flood). It never makes aBlockstile walkable. - Bots and soaks.
RegionBoard.DangerAtscores a tile's danger for a unit (a hazardous state, and more for a telegraphed rule event, the sooner the more). The hero bot pays for crossing danger and pays a lot to end on it (HeroBot.ScoreMove); the pincer planner never walks through it and foes don't step into it (EnemyPlanner.PlanStep) unless immune, so soaks keep working on ruled stages. Blocking tiles are plain blocks to every planner. - Determinism. Rules in their listed order, hooks in file order, effects in order; only
RandomFree/RandomUnitsareas and a hook'sChancedraw from the battle Rng. Hooks inside hooks stop four deep. Nothing runs in a preview. - (Tests:
RegionRuleTests, written, not run.)
14.20.1 The Free Holds: hold barricades (GG-T360)
The first region rule (holds-barricades, theme greenvalley2, stages 28-29): a siege.
- Barricades. Every wave clears the last wave's barricades and throws up four new ones on free tiles (
barricade, aBlocksstate: a wall to movement, spawns and every planner, so it splits pincer lines). - Breaking one. A hero ending their turn beside a barricade (Manhattan 1) wears it down by one; at 3 it falls to
rubble: the barricade's pickup. The first hero to step onto it isempoweredand clears it (anEnterTilehook); unclaimed rubble lasts 20 clock seconds. - Hold monsters (Mannequin placeholder art, words in Prose
class:<id>):- Holdwright (Guardian brain): its charge
charge_raise_barricaderaises two barricades, shores up every standing one (counter -1, one more hero turn to break) and gives allies within 1 tile Protection. - Hold Ram (Berserker brain): its charge
charge_ram_smashknocks its target back and smashes every barricade within 2 tiles to rubble, which the heroes can then claim: a double-edged foe. - Hold Marksman (Kiter brain, range 3, targets the squishy): leaves a barricade where it falls (
OnDeathRule).
- Holdwright (Guardian brain): its charge
- Waves. Each Free Holds stage keeps its militia (4+ soldiers), Redline (a ganger), Free Holds I's two Hollow and Free Holds II's Captain finale, and fields all three hold monsters, two foes a wave and three in the finale; every wave signature stays unique.
- Balance unmeasured (owner rule: no soak). (Tests:
FreeHoldsTests.The_free_holds_fight_behind_barricades_with_their_own_builders_rams_and_marksmen, written, not run.)
14.20.2 Deep Shardfall: shard strikes (GG-T363)
The region rule shardfall-strikes (theme desert2, stages 34-35): read the timeline, step out from under the sky.
- Shard strikes. A
shard-strikerule event targets a random hero and the four tiles around them: its icon rides the timeline for 4 s and its tiles pulse, then it lands for 40 Arcane damage on every unit there, foe or hero, so a foe lured under a strike takes it too. One is called as each wave spawns (6 s out), and again every third foe turn. - Crystals. Every tile a strike lands on grows a
shard-crystal(25 s). A unit ending its turn on one takes a Ward and uses the crystal up; a hero also mints the party a mana orb (GrantOrbs, GG-T376): go stand where the sky just fell. - Shardfall monsters (Mannequin placeholder art, words in Prose
class:<id>):- Shardcaller (Kiter, range 3, targets the squishy): its charge
charge_call_shardscalls a strike onto a hero and the tiles around them, on top of the region's own. - Crystal Brute (Relentless): immune to
shard-strike, so it walks through the strikes; it seeds crystal on its tile and the four around it where it falls. - Shard Skitter (Skirmisher, fast): its death calls a strike onto its own tile and the four around it, the tiles its pincer stands on, so the heroes who caught it have 4 s to get clear.
- Shardcaller (Kiter, range 3, targets the squishy): its charge
- Waves. Two foes a wave, three in the finale (the Captain, a Crystal Brute and the sandmaw); signatures stay unique.
- Balance unmeasured (owner rule: no soak). (Tests:
DeepShardfallTests, written, not run.)
14.20.3 Under the Anchors: the anchor's heave (GG-T364)
The region rule anchor-pull (theme cave2, stages 36-37): the field itself moves the pieces.
- The anchor. Each wave sinks the named anchor
deepon a random free tile, drawn as ananchor-post(aBlocksstate), and cancels the last wave's heave. - The heave. A repeating
anchor-heaverule event (5 s, not a hazard: it moves, it doesn't hurt) rides the timeline; when it lands every unit within 3 tiles of the anchor, hero or foe, is pulled one tile toward it, a free tile at a time. A heave can close a pincer the party set up, or break one: read the icon and line up for it. - Anchor monsters (Mannequin placeholder art, words in Prose
class:<id>):- Chain Warden (Guardian, targets the squishy): its charge
charge_drag_anchorhauls the anchor two tiles toward a hero (the post moves with it), so the next heave drags the party in. - Anchor Hulk (Sluggish): immune to
anchor-pull, the one piece the heave never moves; a fixed end for a pincer or a wall the party is pulled against. - Hookthrower (Kiter, range 3): its charge
charge_hook_linepulls one hero two tiles out of formation.
- Chain Warden (Guardian, targets the squishy): its charge
- Waves. Two foes a wave, three in the finale (the yeti, the ice mauler and a Chain Warden); signatures stay unique. The heave's tiles are the ones around the anchor when the wave spawned; the pull itself follows the anchor.
- Collisions (GG-T378): a unit the heave drags into another unit stops there, and both take 12 Physical (
RuleEffectDef.CollideDamage). Balance unmeasured (owner rule: no soak). (Tests:UnderTheAnchorsTests, written, not run.)
14.20.4 The Drowned Arks: the rising tide (GG-T362)
The region rule rising-tide (theme swamp2, stages 32-33): race the water, or fight in it.
- The tide. Each wave drains the last wave's water, cancels its pending rises and queues three new ones on the timeline: the bottom row floods at 8 s, the next at 16 s, the third at 24 s (
tide-1..3, rule events whose tiles pulse first). Flooded tiles arefloodwater, aHazardstate (bots keep out of it unless immune). - In the water. A unit that starts its turn in floodwater, hero or foe, is
slowed(its next timeline entry comes later) andwet. Lightning exploitswet(elements.json), which is how shock conducts through the flood. - Drowned monsters (Mannequin placeholder art, words in Prose
class:<id>):- Tidestrider (Skirmisher, fast): immune to
rising-tide, the flood never slows it. - Stormcaller (Kiter, range 3): its charge
charge_conductstrikes a hero with lightning and puts 30 Lightning into every hero standing in floodwater. - Bloated Drowner (Sluggish): where it falls it floods its tile and the four around it, and brings every pending rise 6 s sooner.
- Tidestrider (Skirmisher, fast): immune to
- Waves. Two foes a wave, three in the finale (the Swamp Mistress, a hag and a Bloated Drowner); the lurker and tree-golem Group waves became explicit pairs; signatures stay unique.
- Rows assume the party holds the bottom of the board. Balance unmeasured (owner rule: no soak). (Tests:
DrownedArksTests, written, not run.)
14.20.5 The Underspire: crumbling floor (GG-T361)
The Underspire (theme cityruins2, stages 30-31) plays under GG-T368's crackingfloor rule (§14.21) on every stage: each wave cracks three free tiles; a crack counts steps, turn ends and blows, crumbles at three, and caves in to a hole (a pit: whoever stands there falls) a timeline-telegraphed 3 s later. The board shrinks as the fight goes on.
- Underspire monsters (Mannequin placeholder art, words in Prose
class:<id>), built to make more floor crack:- Spire Burrower (Burrower brain): its trail (
TrailRule, every step) cracks each tile it leaves, never painting over another mark; immune tocrackingfloor, so it never falls. GG-T900: it is also the sapper, burying the Engineer'sburiedmineon the party's approach (sapper_buried_charge, §14.23). - Pit Lurker (Ambusher, targets the squishy): immune to
crackingfloor; where it dies its tile and the four around it start to crumble, so the heroes who pinned it have 3 s to step off. - Floorbreaker (
spireshover, Berserker): its chargecharge_floor_shovecracks the tiles around a hero and knocks them two tiles back across the floor.
- Spire Burrower (Burrower brain): its trail (
- Waves. Two foes a wave, the unchanged finale (the Herd Boss, the Choir and Redline); every foe is an underspire family or one of the three; signatures stay unique.
- Balance unmeasured (owner rule: no soak). (Tests:
UnderspireTests.The_underspire_floor_cracks_under_its_own_monsters, written, not run.)
14.20.6 Morrow's Shadow: darkness (GG-T365)
The region rule morrows-dark (theme morrowsshadow, stages 38-40): the finale chapter is fought half-blind.
- Darkness. The battle opens by raising the
darknessflag (RuleFlags.Darkness). A foe more thanRegionBoard.DarkSight(2) tiles from every living hero, and on no lit tile, is hidden (RegionBoard.Hidden): the board doesn't draw it and its timeline icon is a "?" silhouette (themask-timelineart), so the party knows a foe's turn is coming but not whose. It reappears the beat it comes into sight (BattleScreen.SyncDarkness, after every playback beat). The rules of play don't change: a hidden foe still blocks, acts and can be struck. - Light. Each wave puts out the last wave's braziers and lights two new patches (a free tile and the four around it, never over another mark):
brazier-light, aLightstile state. A foe standing in brazier-light is always seen. - Dark monsters (Mannequin placeholder art, words in Prose
class:<id>):- Lamp Snuffer (Kiter, range 3): its charge
charge_snuff_lightsputs out every brazier and blinds a hero. - Dusk Stalker (Stalker, fast, targets the squishy): where it falls, its tile and the four around it light up.
- Gloom Mender (Medic): heals its allies from out of sight.
- Lamp Snuffer (Kiter, range 3): its charge
- Waves. Every stage keeps the Ember, the Sentinels and the moon-changed Wild, and fields all three; the finale is unchanged (the Demon Lord, a Sentinel and a Bloodbinder); signatures stay unique.
- Holy light (GG-T377): the Aegisguard's Judgment of Warding lights the tiles around its target and the Merchant's Holy Burst flask a wider patch:
holy-light, aLightsstate lasting 12 s. It is its own rule (holy-light), so painting it elsewhere never brings Morrow's dark along; a foe starting its turn in holy light is Blinded. - Flare light (GG-T888): the Hexstalker's Flare Shot lights a radius-2 patch for about two turns (
flare-light, aLightsstate in theholy-lightrule without its Blind) and shows the hidden marks under it; heroes crit foes standing in it more often (§14.23). - The Dusk Mimic (§14.20.7, GG-T379) wears a hero's face on the dark timeline. Balance unmeasured (owner rule: no soak). (Tests:
MorrowsShadowTests.Morrows_shadow_is_fought_in_the_dark_by_its_own_monsters, written, not run.)
14.20.7 The Dusk Mimic (GG-T379)
Morrow's Shadow I and II each field a Dusk Mimic (Ambusher, Mannequin placeholder art, words in Prose class:duskmimic), tagged Mimic (RegionBoard.MimicTag). While it is hidden in the dark its timeline icon shows a living hero's portrait (RegionBoard.MimicFace, one hero per mimic by id) instead of the "?", so the party can misread whose turn is coming; seen, it shows its own. Balance unmeasured (owner rule: no soak). (Tests: MorrowsShadowTests.Morrows_shadow_is_fought_in_the_dark_by_its_own_monsters, written, not run.)
14.21 Cracking floors (added 2026-11-08, owner direction, GG-T368)
Owner: "cracking floors which open up holes to fall into that takes off some life and respawns actor next to hole (what if there are no free spaces? figure it out)".
A region rule on the §14.20 framework (regionrules.json crackingfloor), plus three framework additions any rule can use: holes (TileStateDef.Pit), state entry effects (TileStateDef.OnMark) and the Hit hook.
- Cracks. Each wave paints three
crackedtiles on free floor (WaveSpawn,RandomFree). A cracked tile's counter goes up by one each time a unit steps, is shoved or pulled onto it (EnterTile), ends its turn on it (TurnEnd), or is struck on it by a foe's blow or ability and lives (Hit, new: it runs fromDamagefor every landed foe-on-foe blow). The board draws the crack with its glyph and its count (1/3). - The timeline warns first. At 3 the crack becomes
crumbling, whoseOnMarkqueues a cave-in (cavein, 3 s) on that tile: its own icon on the timeline and a pulsing tile, exactly like any rule hazard (§14.20). Nobody falls the moment a counter ticks over; the floor gives when the icon reaches the left edge. - Holes. The cave-in paints
hole(Blocks,Pit): a block to every walk, shove, spawn and item placement, drawn as a near-black pit with a rim (BoardView.SyncRegion). The hero walk refuses it like a rock (WalkPathnow checksWalkable, so barricades and holes stop a drag too). This rule's holes close after 16 clock seconds (LifeSeconds, about two rounds) and the tile is plain floor again; a rule that wants holes to stay open for the fight (the Underspire, GG-T361) leavesLifeSecondsat 0. - Falling. A one-tile unit on the tile as a hole opens (
MarkTiles, or a counter whoseBecomesis a pit), or shoved or pulled into an open hole (Knockback,Pull, a rule'sMoveUnits: it goes in rather than slamming), falls (FellEvent): it losesFallDamageof its max HP (15%, environmental, at least 1; it can kill) and climbs out. Bosses and other multi-tile units, snakes, remains, corpses and eggs never fall, and neither does a class immune to the rule or the state (RuleImmune); under them the cave-in can't open and the crumbling tile settles back to floor. - Where it climbs out (the owner's question, decided): breadth-first outward from the hole, ring by ring by tile distance. Ring 1 is "next to the hole"; the first ring holding a tile the unit's footprint may land on wins: free for something to appear (no unit, block, item or trap: the GG-T227 spawn rule,
FreeForSpawn; the faller's own old tile counts as free when it was shoved in), preferring a tile no rule makes dangerous, then drawn from the battle Rng. A second pass accepts a trap or pickup tile (a hero springs and collects it on landing). On a board with no such tile anywhere, the faller trades places with the nearest unit that can be moved (ties: lowest id): it climbs out where that unit stood, and that unit is jostled onto the hole, which fills in under it (no fall, no damage). With nobody to trade with, the hole fills in under the faller. A unit is never lost off the board to a hole. - Landing springs what lies there (a trap, a pickup, the new tile's
EnterTilehooks: a faller can land on another crack and count it). - Bots. A crack one count from crumbling reads as half a danger (
RegionBoard.AboutToGive), a crumbling tile under its cave-in as a telegraphed hazard, and an open hole as a block, so the hero bot, the pincer planner and the foes walk around them. The hero bot pays 12 for a shove or pull that drops a foe into an open hole, 6 for one that leaves it on a dangerous tile (RegionBoard.ShoveFloorValue). - View. The fall plays as its own beat (
FellAnim): carried to the hole if shoved, the token shrinks and fades into it with the shatter cue, a swap partner steps onto the filled hole, and it pops back up on its landing tile with the dash cue; the fall's damage follows as its own beat. - Placed in Frostmaw Caverns III (
cave-03) and The Choir's Cathedral II (cathedral-02), stageRules. Its name and description are the Prose textrule:crackingfloor(seeded placeholder). - Heavy units break through (added 2026-11-24, GG-T869). A tile state may name a
HeavyBecomespit state;crackednameshole. A Heavy unit (ClassDef.Heavy, not floating) that can fall, standing on such a mark as it is painted or entering it, breaks it at once: no counter, no crumbling, no cave-in warning. The tile becomes the hole (BrokeThroughEvent, then the "marked" tiles event) and the unit falls as above. A floating Heavy unit, a multi-tile one and one immune to the mark tread it like anyone. A foe whose pincer walk is cut short by a fall stops there. - New area
Line(GG-T869).Counttiles straight from the subject toward the Target, the first next to the subject (the longer axis of the pick;RegionRuleCatalog.LineTiles). The Barbarian's Earthsplitter (§7) paints its three cracks this way. StageOnlyhooks (GG-T869). A hook markedStageOnlyruns only when its rule is the stage's own (theme or stageRules), not one brought into play by painting its state.crackingfloor's WaveSpawn cracks areStageOnly, so a hero's (or a Floor Breaker's) cracks never make every later wave paint three random ones.- (Tests:
CrackingFloorTests, written, not run.)
14.22 Hazard trails (added 2026-11-08, owner direction, GG-T370)
Owner: "some enemies drop slime trails when they move, some fire, some ice, some land mines... always a way to defeat them".
Four region rules on the §14.20 framework, each one tile state laid by a monster as it moves, each with a counter from the GG-T371 elemental table (elements.json, §3.3.1), so no party is ever stuck.
| Rule | Tile state | Laid by | Effect | Counters |
|---|---|---|---|---|
slimetrail
|
slime (14 s)
|
Slimes (slime02, slime03)
|
stepping in it: Slowed | Fire burns it away; Purifying Salts; it dries up |
firetrail
|
fire (Fire, 10 s)
|
Hellspawn Emberheart (hellspawn03, the Ember)
|
stepping in: 6 Fire and Burning; ending a turn on it: 4 Fire | Ice douses it; Salts; it burns out |
icetrail
|
ice (Ice, 12 s)
|
Yeti (yeti, the Wild)
|
stepping on it: Slowed (the slip), and one step in three Frozen | Fire melts it; Salts; it thaws |
landmines
|
mine (40 s)
|
Bulwark Siege Gunner (heavytrooper04), every third step
|
stepping on it arms it (armedmine), whose blast (mineblast, 1.5 s on the timeline) deals 14 Fire to it and the tiles round it
|
a hit of any element sets it off from range; shove a foe onto it; the Disarm Kit pulls it |
- Trails (
ClassDef.TrailRule, new): region rule effects run on the tile a unit steps off (Self; it is their subject), everyTrailEvery-th step (Unit.TrailSteps), on every enemy step, leap and swap. Each trail paints withKeepMarks(new onRuleEffectDef): it never paints over another mark (a crack, a barricade, another trail) unless it reacts with it. Each layer isRuleImmuneto its own state: it walks its own trail, and its planner reads no danger there. The old slime trap trail (slime_trail) stays on the two early slimes;slime02/slime03lay the tile state instead (never both). - A monster brings its rule. A state painted on a stage that doesn't list its rule brings that rule into play (announced with its Prose name and description,
RegionRuleEvent), so its hooks run wherever the monster fights. The four rules are also listed on a fitting stage each, so they are announced as the battle opens: Tithe Moors II (greenvalley-02, slime), Shardfall III (desert-03, fire), Frostmaw Caverns II (cave-02, ice), the Still III (still-03, mines). - Counters are the GG-T371 table, not a second one.
TileStateDef.Element(new) names the element a state carries (fire is Fire, ice is Ice). Painted onto a tile whose mark its element'selements.jsonTilesrow reacts to, the reaction runs (Clear, or Becomes another tile state) and the incoming state is spent: fire meeting ice melts it, ice meeting fire douses it, fire meeting slime burns it away, fire meeting a mine sets it off. A hero's ability runs the same reactions on the painted tiles it covers (its element's row when it deals damage, plus its tool set:ResolveTileReactionsnow covers region tiles as well as traps), and a tile pick that only reaches a reacting tile is a legal pick that never "misses". Every element's row arms a mine (mine→armedmine); Fire's clearsslimeandice, Ice's clearsfire; thedisarmset clearsmine, thecleanseset (Purifying Salts) clearsslime,fireandice. A Becomes into a state with anOnMarkruns it (the armed mine queues its own blast). - Mines are telegraphed. Stepping on one (or being shoved onto it: a shoved or pulled foe runs
EnterTile, §14.21) never hurts at once: it arms, and the blast rides the timeline for 1.5 s over the mine and the four tiles beside it, hitting whoever is still there (foes too). The armed mine itself isn't aHazard; the queued blast is the danger. - Always a way. Every
Hazardstate (slime, fire, ice, mine) has a Merchant clearer (ElementCounters.Validatepasses: the flasks, the Salts, the Disarm Kit), each trail fades on its own, and the camp bot shops for the clearer of a trail any of the next stage's foes lays (ElementCounters.CountersForreadsTrailRule). - Bots. Hazard states read as danger (
RegionBoard.DangerAt), so the hero bot pays to cross them and won't end on them, and foes don't walk into them unless immune; a queued blast reads as a telegraphed hazard. - Rule names and descriptions are the Prose texts
rule:slimetrail,rule:firetrail,rule:icetrail,rule:landmines(seeded placeholders). - (Tests:
HazardTrailTests, written, not run.)
14.23 Tactical tiles (added 2026-11-24, battle-feel epic GG-T823, GG-T842)
Firewalls, landmines and slime globs the party lays need tiles that know which side laid them.
- A mark records its painter.
TileMark.OwnerTeam/OwnerId(new): a hero ability'sRuleEffectspaint as the party (the caster's team and id); a monster's ability,TrailRuleandOnDeathRulepaint as its side; a rule's own hook or event paints for nobody (Team.Neutral, the board). A counter turning a mark into itsBecomesstate keeps the painter; an element reacting with a mark (fire arming a mine) makes the new mark the element's painter's. TileStateDef.Affects(new:Anydefault,FoesOfOwner,AlliesOfOwner) is read against the painter (RegionBoard.Affects): a hook that reads the subject's tile (Statefilter: EnterTile, TurnEnd, TurnStart, Hit, UnitDeath) passes over a subject the mark doesn't work on (it isn't even counted towardEvery), and the unit effects of that hook and of the state'sOnMarkskip unaffected units. A board-painted mark works on everyone, whatever itsAffects, so every existing rule plays exactly as before.- Bots read it.
RegionBoard.DangerAtreads no danger from a mark that doesn't work on the unit: the party walks its own firewall, foes (EnemyPlanner, which now checks any painted tile even on a rule-less stage) steer round it, and the hero bot'sShoveFloorValuescores shoving a foe into it. - No announcement. A hero-laid state brings its rule's hooks into play silently (
EnsureRuleInPlay): the party's own firewall is no region rule. A monster-laid state is announced as ever (§14.22). - Hatch or squish (GG-T844). A slime vomits a glob somewhere free; left alone it grows into a slime, stepped on it's gone.
TileStateDef.OnExpire(new) runs when a mark'sLifeSecondsrun out, before the mark clears (Self is the tile; if those effects already cleared or repainted it, it isn't cleared again).RuleEffectKind.SpawnUnit(new;Class,Level, 0 = the stage's level) puts a foe on each tile of the area, or, that tile taken, on the nearest tile its footprint may appear on (ring by ring, row-major within a ring;FreeForSpawnand no trap, so never on an occupied tile; no room anywhere = it doesn't come). It joins the current wave as a reinforcement does: the wave's level dial, a timeline entry at its Speed's entry (spaced), a snake's segments, aReinforcementsArrivedEvent, and no action spent (TurnRules.ClearActed, the §2.13 seam).TileStateDef.SquishedBy(new, a team; null = nothing squishes it): a unit of that team entering the tile (a step, a shove, a fall's landing: theRegionEnterfunnel, any tile of its footprint) clears the mark with aSquishedEventand a "cleared" tiles event, then the state'sOnSquisheffects run with the squisher as subject, all before the tile's EnterTile hooks. Bodies, eggs, remains and units immune to the state or its rule squish nothing.Validatewants a knownClass,LifeSecondsfor anOnExpire,SquishedByfor anOnSquish, and noSquishedByon a blocking state. - The slime's glob (GG-T894). The content for the owner's line.
slime02andslime03carrycharge_slime_glob("Vomit Glob": a PickTile, EmptyOnly Skill, cooldown 2 turns, whoseRuleEffectspaintslime_globon its Target).EnemyPlanner.PlanLobfinds a lob in a foe's class kit (any PickTile, EmptyOnly ability with a MarkTiles on its Target) and throws it, in place of the step and strike, when no hero is adjacent, it is off cooldown and fewer thanLobKinCap4 of the foe's kin (living foes of its portrait family) plus unhatched marks of that state stand; the tile is a free one (no unit, item, trap, block or mark) withinLobRange3 of the foe, nearest the heroes, then nearest the foe, then row-major. The ability resolves on the spot (TryLob: "Vomit Glob!", its cooldown starts).slime_glob(regionrules.json ruleslimeglobs: not a hazard, not blocking) lastsLifeSeconds8;OnExpirehatches aslime01withSpawnUnitFromOwnerLevel(new: the level is the painter's own, already dialled for the wave, plusLevel, here -1, at least 1; no painter = the stage's level).SquishedByHero;OnSquishrunsRuleEffectKind.GrantCharge(new:Amount15 mana charge into the party's meter once, when a hero is among the units; reason "rule:slime_glob"). Fire burns it away (elements.json FireTiles:slime_globClear), by a hero's fire ability covering it or a fire mark painted onto it. The hero bot'sScoreMoveaddsSquishValue: each squishable mark the walk steps on is worth 4 (+3 as it nears its hatch) when it would hatch a foe, 1 otherwise, about half a pincer, so a squish beats a so-so move but never a real pincer. Placed on The Tithe Moors I (greenvalley-01, wave 1's second slime is now aslime02) and II (greenvalley-02, already led by one). Noslime04exists yet. (Tests:SlimeGlobTests.) - Hidden marks (GG-T843). A buried mine shows for a moment, fades from sight, then pops out and goes off.
TileStateDef.VisibleSeconds(new; 0 = always seen): a fresh mark is seen by everyone that long (TileMark.SightTicks, counted down by the clock before lifetimes), then hides (TileMark.Hidden, a "hidden"RegionTilesEvent). A hidden mark is seen only by its painter's side (RegionBoard.Sees(mark, team); a board-painted one by nobody); the view draws only what the party sees, the party's own hidden marks faint. It shows again, to everyone, for good (TileRevealedEventwithCause) when it triggers ("triggered": one of its state-filtered hooks runs, before its effects), whenRuleEffectKind.RevealTiles(new; the area, onlyStatewhen set) uncovers it ("revealed"), or when an element hits it ("element": a state carrying anElementpainted onto it, or a hero ability's element or tool covering it, the GG-T370 reaction paths). A mark that triggers or is revealed inside its seen window never hides. No cheating:RegionBoard.DangerAttakes an optional viewer team (default the unit's own) and reads no danger from a hidden mark that side can't see, so a foe'sEnemyPlannerwalks onto the party's hidden mine and the party's planners onto a foe's;ShoveFloorValuereads the floor as the party knows it (the hero bot still values shoving a foe onto the party's hidden mine). No Rng: replays hide and reveal the same marks on the same tick.ValidatewantsVisibleSecondsnon-negative. - The Engineer's Buried Charge (GG-T876). The content for the owner's buried landmine.
engineer_buried_charge("Buried Charge", Engineer Skill, cooldown 3 turns, INT 4; a PickTile, EmptyOnly ability whoseRuleEffectspaintburiedmineon its Target) buries a charge as the party.buriedmine(regionrules.json rulelandmines: hazard,LifeSeconds40,VisibleSeconds2,AffectsAny) shows for 2 s, then only the party sees it, faintly. Any actor entering it, a hero too, sets off its EnterTile hook: it pops out (TileRevealedEvent"triggered") and becomes anarmedminewhose OnMark queues the §14.22mineblast(1.5 s, 14 Fire on the tile and its neighbours, then the armed mine clears). Counters: the Disarm Kit clears it (elements.json reactiondisarm:buriedmineClear); any element's hit (a hero ability's element covering it, or an element painted onto it) shows it and sets it off early (every element'sTiles:buriedmineBecomesarmedmine); aRevealTileseffect shows it to the foes. The hero bot'sScoreAbilityaddsBuryValue: a buried hazard (a MarkTiles state that is a hazard withVisibleSeconds) on a free, unmarked tile no hero stands on or beside is worth 6 for the first foe within 4 steps whose shortest walk to its nearest hero crosses the tile (+2 each further foe, +1 per step nearer). The view: the pop-out flashes the tile red with a puff and a "Click!" Timer text over a high click, the blast's Timer countdown ticks from its queued hazard (GG-T830), and the boom plays an explosion with a fire burst. The blast still lands on everyone on its tiles by design (AffectsAny), so the gap below doesn't touch it. (Tests:BuriedChargeTests.) - The Machinist's Barricade (GG-T934).
machinist_barricade("Barricade", Machinist Skill, cooldown 3 turns, INT 4; PickTile, EmptyOnly,RuleEffectspaintmachinist_barricadeon its Target) raises a wall as the party, its rule (regionrules.jsonmachinist-barricade) coming into play silently. The stateBlocks(no unit walks, lands or spawns there:S.Walkable, so the enemy step,FootprintStepLegaland the pincer planner route round it, and a pincer line through its empty tile is broken), lastsLifeSeconds20 and hasThreshold3 with noBecomes, so its third hit clears it. Hits: the rule's TurnEnd hook (Team Enemy) adds 1 to every barricade orthogonally beside a foe that ends its turn (ModifyTiles, Area Self, Radius 1); and a line charge runs into it.RegionBoard.StopsCharge(a blocking mark that isn't aPit; a hold's barricade too) endsEnemyPlanner.LineTowardbefore it, and when one rises on a line already marked,ResolveDirectChargewalks the locked line in order and stops at it: the heroes beyond it are spared, the resolved tiles end there, and the wall announces "Blocked!" and takes one hit (ModifyTiles+1). A hole is no wall: a charge runs over it as before. Not yet: an abilityRange(the skill picks any empty tile) and a Machinist skill-tree node. (Tests:BarricadeTests.) Bot and view (GG-T935).HeroBot.BarricadeValueraises it only where it matters: on a foe's pending line charge (its lockedLineTiles, in run order) short of a hero, worth 4 per hero beyond plus the trample spared (0.6 per HP, +8 for a kill), nothing once the line is already walled earlier; and, for the smart bot only, on the tile a foe'sEnemyPlanner.PlanPincerwalk ends on to close a pincer (6 plus half the plan's score). Anywhere else 0, so it is never raised for its own sake. The view drops a Shapes crate (wood body, ink outline, cross brace, §11.6) onto the tile with a clank (battle.clank, a placeholder in SFX.md over a highbattle.shatter), aDustKickand a short shake; the standing wall is drawn as that crate (TileMarkFx.Crate), its brace splitting at half its hits; a hit shows "Bashed!" (Resist), a charge run into it "Blocked!" (Callout) on the wall instead of a banner, and its fall "Down!" (Expire). (Tests:BarricadeBotTests.) - The Red Mage's Firewall (GG-T931). Owner: "a firewall that causes burning debuff if actors enter the tile".
TargetShape.Wall(new): a line of 2 ×Radius+ 1 tiles through the anchor, square across the line from the caster (TargetResolver.Tiles' new optionalfrom, the caster's tile: |dx| > |dy| a column, else a row; nofroma row). The dispatcher, the tile reactions (TileReactions.Area) andRegionAbilitypass the caster's tile, andRegionAbilitynow sets the rule context'sEventTilesto the ability's own area, so aMarkTilesoverEventTilespaints the shape.firewall("Firewall", Red Mage Spell, 2 orbs, instant, cooldown 2 turns, INT 6; Wall, Radius 1, PickTile, EmptyOnly, Fire, no damage of its own) paintsfirewallthere as the party.firewall(regionrules.json rulefirewalls: hazard,ElementFire,LifeSeconds12,AffectsAny) takesfiretrail's hooks: entering it, 6 Fire and Burning; ending a turn on it, 4 Fire and Burning. It burns the party too (the owner's "actors"), so the hero bot won't walk it and foes (RegionBoard.DangerAt) steer round it. Counters: Ice douses it (elements.json IceTiles:firewallClear), the Salts'cleanseset clears it, it burns out. Painted onto another mark it reacts as any Fire state does through the Fire row (melts ice, burns slime away, sets a mine off). Bot (GG-T932):HeroBot.WallValueprices an ability thatMarkTilesa visible Hazard state (anchored or shaped, oriented from the caster) tile by tile: -8 for a hero on it when it burns everyone (AffectsAny), +3 per foe whose shortest walk to its nearest hero crosses the tile withinMoveRange+ 1, +5 for the tile behind a foe beside a hero while some hero has a ready Knockback or Pull, +3 for a foe standing on it; 0 when nothing qualifies, so it is never cast superfluously (the orb cost still subtracts). Shared by the smart and casual bots throughScoreAbility. (Tests:FirewallTests,FirewallBotTests.) - The Alchemist's Oil Flask (GG-T886).
alchemist_oilflask("Oil Flask", Alchemist Skill, free, cooldown 3 turns, INT 3; Plus, Radius 1, PickTile, EmptyOnly, no damage) paintsoilover its area (MarkTilesEventTiles,KeepMarks: a mark already there stays) as the party.oil(regionrules.json ruleoilslicks: hazard,LifeSeconds15,AffectsFoesOfOwner, no element) slows a foe that enters it (slowed, as slime does); the party treads it freely, foes (RegionBoard.DangerAt) steer round it. Fire turns it into a firewall: elements.json FireTilesgainsoilBecomesfirewall, so a hero's Fire hit over it, or afirewall/firestate painted onto it (the Red Mage's Firewall), relights each covered oil tile as the painter'sfirewallwith its own 12 s, its hooks and its crackle. The Salts'cleanseset clears it; it dries out.OilFlasknames the kindling (a MarkTiles state some element's row turns into a hazard) and prices a throw for the hero bot. (Tests:OilFlaskTests.) - The sapper's Buried Charge (GG-T900). The enemy's side of the Engineer's charge. Decision: the sapper is the existing Spire Burrower (
spireburrower), not a new heavytrooper variant: it already tunnels under the Underspire floor, already fights on both Underspire stages (cityruins-04"The Underspire I",cityruins-05"The Underspire II"), and needs no new class or art. Its kit gainssapper_buried_charge("Buried Charge", Skill, cooldown 3 turns; a PickTile, EmptyOnly ability whoseRuleEffectspaint the sameburiedmineon its Target). Painted by a foe, the mark is the foes' (OwnerTeamEnemy,OwnerIdthe sapper): seen by all for 2 s, then only the foes know it is there and the view stops drawing it (it fades out). It is otherwise the Engineer's mine: whoever enters it, a foe too (its own sapper included), pops it out and it blows 1.5 s later on its tile and neighbours; the Disarm Kit, an element's hit and a reveal counter it the same way.EnemyPlanner.PlanBuryplants it in place of a step and a strike (tried before a lob) when no hero is adjacent, it is off cooldown, and fewer thanBuryCap2 marks of that state painted by the foes' side stand: on a free, unmarked tile (no unit, item, trap or block) withinBuryRange3 of the sapper, no foe on or beside it, on a hero's approach lane (one of that hero's shortest walks to its nearest foe, 1 toBuryLaneReach4 steps from the hero); each hero whose lane crosses the tile is worth 6 for the first and 2 for each further, plus (4 - steps) for the nearer ones; best tile wins, ties nearer the sapper, then row-major.PlanLobskips a buried state (a hazard withVisibleSeconds), so a bury is never lobbed. Foes steer round their own charge (DangerAtreads it for the side that sees it) and the hero bot walks onto it none the wiser. The first foe-laid charge brings thelandminesrule into play announced, like any foe-painted rule. (Tests:TacticalTileTests, the sapper section.) - The Hexstalker's Flare Shot (GG-T888).
hexstalker_flare_shot("Flare Shot", Hexstalker Skill, cooldown 3 turns, AGI 3 / INT 2, on its learnable list; PickTile, EmptyOnly) lobs a flare onto a tile. ItsRuleEffectsfirstRevealTiles(radius 2 around the tile): every hidden mark there shows to everyone for good (a foe's or the party's own buried mine; any future hidden mark, a burrowed foe's included), then paintflare-lightover the same radius withKeepMarks(a tile already holding a mark keeps it and stays unlit).flare-light(in theholy-lightrule, so it brings no Morrow's dark and its holy-light Blind hook never fires on it; a hero-painted mark announces nothing) is aLightsstate lasting 10 s, about two turns (a foe's turn comes round every ~5 s:EntryBaseSeconds4 +RecoverBaseSeconds1), so a foe standing in it is never hidden in the dark, and its newTileStateDef.CritTakenBonus0.15 gives a striker +15 crit points against a foe of its side standing on it when the mark is its own side's (a board-painted one: any hero's);RegionBoard.CritTakenBonustakes the highest under a big foe. A weapon blow lends it through the roll's support crit for that one blow (BattleRunner.Strike, capped like a Crit support at 75); a spell adds it to its crit chance before Blind cuts it. No extra Rng draw.ValidatewantsCritTakenBonusin 0..1. The hero bot'sScoreAbilityaddsFlareValue, read only from what the party knows: each hidden mark in reach the party doesn't see (it glimpsed it before it hid: a suspected mine) is worth 6 (a hazard) or 3, +2 with a hero within 2 of it, and one of the party's own is -2; under darkness, with foes hidden (the timeline's "?" count), each dark tile in reach within 4 of a hero is worth 0.5 per hidden foe (up to 2); each seen foe in reach beside a hero, not lit already, 1.5. The view: the flare arcs from the caster with a sputtering spark trail, fizzes alight (the ability'sbattle.fizzleSfx, pitched up), the lit tiles flash warm, a gold flourish and a swelling glow ring to its radius (Reduce Motion: no swell), then the tiles wash amber. (Tests:FlareShotTests, written, not run.) - The scorpion's burrow ambush (GG-T901). A scorpion with no hero beside it dives into the ground and comes up under the nearest hero a moment later; dig it out first.
RuleEffectKind.Burrow(new;Statethe mark,Eventthe ambush,Seconds0 = the event's own): the subject (the caster) goes under its own tile: it paintsStatethere as its side (never over another mark: no burrow then), leaves the board (Unit.Burrowednew,OnBoardfalse, so it is notAlive: untargetable, on no tile, its turn and any cast off the bar;Posstays the burrow tile) and queuesEventon the tile of the foe nearest it (footprint Manhattan, ties by id) as an ordinary telegraphed hazard whose source it is (BurrowedEvent).RuleEffectKind.Surface(new, the ambush's effect): its burrowed source comes up on the event's tile, or, someone standing there, the nearest free tile (SpawnLanding), its burrow mark clearing; it rejoins the timeline at its Speed's entry (spaced, as a reinforcement), reads its landing tile (RegionEnter), and strikes whoever stands on the ambush tile with the ability that sent it under (Unit.BurrowAbility; damage, crit, plate and itsApplyBuffas any skill).SurfacedEvent(and aTeleportedEvent, so the sprite moves). Forced up:RuleEffectKind.Unburrow(new; the mark's burrowed owner) and any reveal of the mark (RevealMark: a hook it triggers, an element's hit;RevealTilestoo while the mark is still in its seen window) bring it up at once on its burrow tile (the nearest free one), the ambush called off (HazardRetimedEventCancelled), no strike; a burrow's ambush cancelled by anAdjustEventsbrings it up the same way, so none is stranded. A burrowed foe holds its wave open (CheckEnd,AnyFoeOnBoard). Content:scorpion_burrow("Burrow Ambush", Skill, cooldown 3 turns, 10 Physical and Poisoned,RuleEffectsBurrowburrow_mark/burrow_ambush) in thescorpionkit, so every stage scorpions fight in uses it. Ruleburrows:burrow_mark(not a hazard, not blocking,VisibleSeconds0.5: the party sees it go under, then loses it),burrow_ambush(1.5 s, hazard, effect Surface) and an EnterTile hook (Team Hero, stateburrow_mark: Unburrow), so a hero who steps on the burrow digs it out.EnemyPlanner.PlanBurrowfinds a Burrow ability in the kit and uses it (TryBurrow: "Burrow Ambush!", its cooldown starts) before a lob, a trap or a step, when no hero is adjacent, it is off cooldown, free to move (not rooted, immobile, silenced, a snake, remains, an egg or multi-tile), holds no charge and its tile is unmarked. The bots read the ambush tile as any queued hazard's. Not yet: the view's dive and burst (the sprite stays on its tile while under, the ambush shows as a hazard) and Prose text for theburrowsrule. (Tests:BurrowAmbushTests.) - The tech gremlin's Sabotage (GG-T903). Hero gadgets are not free: a tech gremlin beside one turns it to the foes' side.
TileStateDef.Gadget(new) marks a state as a gadget:buriedmine(the Engineer's Buried Charge),firewallandmachinist_barricade(the Machinist's barricade);armedmineis not (it is already going off). A mark is a gadget of a side when its state is one and another side painted it (EnemyPlanner.IsGadgetOf; a board-painted mark is nobody's).RuleEffectKind.Sabotage(new; onlyStatewhen set) turns every such mark on its area the subject's:OwnerTeamandOwnerIdbecome the saboteur's, counter, life and sight unchanged, oneTileSabotagedEventeach (FromTeam,ToTeam,Hidden). Whatever reads the painter now reads the foes: a buried charge stays hidden, now from the party (it loses track of its own mine; the foes know it and the hero bot reads no danger there); a state that works on foes of its owner (Affects) works on the party; a crit bonus or smoke helps the foes. The realfirewall(AffectsAny) and the barricades burn and block everyone as before, so turning them changes only whose they are (and who the view draws them for). Content:gremlin_sabotage("Sabotage", Skill, cooldown 2 turns, PickTile on the gadget,RuleEffectsSabotage on its Target) in thetechgremlin00-02kits, so the Shardfall's gremlins use it, and Halcyon I (cityruins-01), where the Machinist fights beside the party as a guest, has a tech gremlin in wave 4 in place of a second cyber zombie.EnemyPlanner.PlanSabotage(tried after a charge, before a bury,TrySabotage): a foe with Sabotage in its kit, off cooldown, not silenced (the Technician's EMP Pulse silences Tech foes, so a pulsed gremlin can't tamper), immobile, remains, an egg, multi-tile or burrowed, and with no hero adjacent (then it strikes). Beside a gadget (a cardinal neighbour, or under it) it sabotages it: tech senses tech, so a hidden charge beside it counts. Otherwise it walks toward one its side can see withinSabotageReach4, one cardinal step at a time onto a free, safe tile, up to its MoveRange, and turns it if it gets there (else strikes an adjacent hero).SabotageValue: 6 for a hidden one (a buried charge), 4 another hazard (a firewall), 3 a wall, else 2, +1 for each hero within 2 of it; beside it picks the most valuable, from afar best value less distance. The view (GG-T948,BattleScreen.Sabotage): a jagged cyan spark crackles from the gremlin to the gadget's tile (element.lightning), it bites with a clank and a burst of sparks, the mark's team edge turns from its old side's colour to the saboteur's, a hidden charge the party knew of fades from its view instead, and a "Sabotaged!" callout rises over the tile; a mark the party never saw plays nothing. Not yet: the hero bot guarding its gadgets. (Tests:TacticalTileTests, the gremlin section, written, not run.) - Not yet: a rule event queued by a team-owned mark (a hero mine's blast) still lands on everyone on its tiles, and timeline events from team-owned tiles carry no owner; an enemy ability's element doesn't reveal a hidden mark.
- (Tests:
TacticalTileTests, written, not run.)
14.24 Root Grasp — tree golems (GG-T904)
Added 2026-11-24. A tree golem's landed blow roots the hero (Rooted, held to its tile for 1 turn: treegolem00–treegolem04 and treegolem06 carry OnHitBuff rooted, OnHitChance 1, OnHitTurns 1, so the hit's root lasts one turn rather than the buff's own two). Tree golem 06's support Root Snare rolls a 40% Rooted on each trapped hero instead of Slowed (it keeps the buff's 2 turns). Tree golems are mindless and never pincer themselves (§14.1.3); the threat is the Sentient foes beside them: a careless hero left next to a golem is pinned for the next enemy pincer, because a Rooted hero can't be dragged out of a set-up line.
- Planning.
PincerPlanner.SetupValueaddsPinnedOpponentBonus2.5 per Rooted, unarmored hero in the line when the mover is a foe (EnemyPlanner.PlanPincer), so of two set-ups a foe lines up on the pinned hero. 6 + 1 + 2.5 stays below a Complete pincer's 10, so a pincer it can close now still wins. Hero and tamed-monster planning is unchanged. - Content check.
ContentLoader.Validaterejects a negativeOnHitTurns, or one without anOnHitBuff. - (Tests:
RootGraspTests—Every_tree_golem_roots_on_hit_for_one_turn_and_root_snare_rolls_rooted,On_hit_turns_must_name_a_buff_and_never_go_negative,A_landed_blow_roots_the_hero_for_its_on_hit_turns,A_foe_prefers_the_set_up_that_pins_a_rooted_hero,A_pinned_set_up_never_outbids_a_pincer_it_can_close_now,A_hero_planner_gets_no_pin_bonus; written, not run.)
14.25 Ironbark golems — Heavy and plated (GG-T952)
Added 2026-11-24 (owner: late-game Heavy armored golems should need Float to shift them into a pincer, plus an armor breaker, so the fight pushes the player to field different heroes). The Ironbark Golem (ironbarkgolem, tree-golem art for now, the tree golem's drop table) is a tree golem riveted into iron plate: Heavy (§14.2, never moved unless [Floating]) and an armor plate of 30 on the side it faces (§13.5), with STR 20 / VIT 18 (a tree golem has 15 / 12), Counter Attack, the Relentless brain (it walks every turn), poison and sleep immunity, and no society (never pincers). A party that only trades blows with it loses the trade: the plate eats every frontal physical hit, each landed hit is answered, and it can't be dragged off its tile into a pincer line.
- The intended answer: the Drifter's Float (
drifter_float, §7) lifts it for 2 turns so a Knockback, Pull, Swap or Gravity Well can set it into a pincer (across its line of sight, so the plate is skipped); the Ripper's Flay ([Shredded]: +10% Physical taken a stack, up to 3, and a 4-point plate chip from any side) breaks it down; Magnetize turns its plate. Spells still go around the plate. - Reachable first: the Drifter is a guest in The Arkgrave II; since GG-T952 the Ripper is a guest in The Bloom I (level 25, wave 1), the first postgame stage, so it leaves the wanderer pool and every player meets it before any Ironbark wave (Float and Flay are on those classes' lists to learn).
- Placement (as levels rise): The Drowned Arks I (32) wave 4 with a Bloated Drowner (was a tree golem), The Drowned Arks II (33) wave 2 beside a tree golem (was a Bloated Drowner; the Drowner still fields the finale), Under the Anchors II (37) wave 4 beside a Ceramic Knight (was the Mountain Troll). Two foes a wave, as every postgame stage; each wave signature stays unique.
- Bot: no new scoring needed. HeroBot already floats a Heavy foe when a ready mover would raise the next pincer catch (
FloatSpell.FoeValue), reaches for Flay on a plated foe (HeroBot.ShredValue) and avoids lining an attacker up on the plated side. - Balance is unmeasured (no soak), pending the owner's
/test. - (Tests:
IronbarkGolemTests,HeavyTestslist; written, not run.)
15. Save
15.1 Data model
Amended 2026-10-09: three save slots replace profiles and save-state lists. Amended 2026-11-02 (GG-T99): profiles are back — each player profile owns its own three slots and its own settings (§15.4); Settings is no longer part of SaveData.
SaveData (Meta/SaveData.cs; one per slot)
├─ Version (1), Name ("Player"), CreatedUtc, UpdatedUtc, PlaySeconds
├─ CommanderName (GG-T1342/T1618; the name `{commander}` text shows, else the profile name, else "Commander")
├─ Gold (wallet), LifetimeCoins (ticker)
├─ HighestClearedStage (campaign index, −1 = none), ClearedStages{}, SeenCrawls{}, LastStage
├─ Roster[] HeroSave: ClassId, TotalXp, Hp (0 = full), Known[], Bar[5], SkillPoints,
│ WeaponId/Durability/Repairs, ArmorId/Durability/Repairs, Relics[3],
│ Variant (Female/Male) + VariantPending (v14, GG-T532, §25.11.2.3)
├─ Party[] class ids of the active squad (≤ 6, `Progression.MaxPartySize`, GG-T291)
├─ Inventory { itemId → count }, Recruits
├─ Bounty Taken[], Slain[], Claimed{}, Refresh, Battles, Used
├─ Bestiary { classId → Seen, Defeated (+ legacy Scanned) } knowledge tier = BestiaryKnowledge.Tier
└─ (Settings moved to the profile's settings.json, §15.4 — an old slot's Settings block is ignored on load)
Level is derived from TotalXp (Formulas.LevelFromTotalXp, XpToNext(L) = 50 + 10·L²), so the curve can change without migration. SaveMigrations.Migrate upgrades in place (v1 is the first shape; it backfills missing sections and pads Bar/Relics) and rejects saves newer than the build. Dictionaries and sets serialize natively (Newtonsoft) — the old "lists only" limit is gone.
Amended 2026-10-15 (GG-T49): every level gained now also earns skill points — HeroSave.SkillPoints, an unspent balance spent on skill-tree nodes (content and UI land in GG-T50). Formulas.SkillPointsForLevelUp(from, to) awards SkillPointsPerLevel (1) for each level crossed, plus a SkillPointMilestoneBonus (1) on every SkillPointMilestoneIntervalth level (5, 10, 15…) — summed per level so a multi-level jump still hits every milestone in between. It's applied everywhere a hero's level can move: a battle-end level-up, hard-won XP kept on a defeat/retreat, a guest who survives joining the roster, and a Summon Circle recruit arriving above level 1. Save shape bumped to v2: SaveMigrations backfills each existing hero once with the points they'd already have earned up to their current level, so no save is retroactively shorted by the mechanic not existing yet; re-migrating a current-version save does not grant them twice. (Tests: Leveling_up_in_battle_grants_skill_points_including_the_milestone_bonus, Hard_won_xp_on_defeat_still_grants_skill_points_when_it_crosses_a_level, Migrating_a_v1_save_backfills_skill_points_once_for_heroes_already_past_level_1, A_guest_who_survives_a_victory_joins_the_roster, Full_loop_battle_commit_then_every_vendor.)
Amended 2026-11-23 (GG-T591, from GG-T168): level-up stat points, a separate pool. Every level past 1 also earns one stat point (Formulas.StatPointsPerLevel, no milestone bonus) that the player puts into any of the 8 stats, +1 each (StatPointValue). Earned points are derived from the level (Formulas.StatPointsForLevel = level − 1), never stored, so every way a level moves pays them with no grant at each site, and an older save needs no migration: its heroes simply have all their points unspent. Only the picks are saved, HeroSave.StatPicks (stat name → points, null-safe). Meta.StatPoints spends (Spend, Unspent, In) and BattleFactory.SpecFor adds the picks to the hero's level stats in battle (HeroSpec.StatBonus), so the Status sheet's Base column and every preview show them. The spend UI is a row of "+ STR … + LCK" buttons above the skill tree on the Talents sub-tab. Picks are permanent (the Inn's Respec refunds skill points only): a hero's build is the history of which stats they picked. The camp routine (GG-T54) spends them through BotStatSpend (GG-T593, §25.6.5): toward the next Requires-locked ability on its class list, and only once none is left into the class's strongest Growth stat (StatPoints.BotPick).
Decision: two pools, not one. SkillPoints stays its own currency. It is what the skill trees run on, and those shipped as the owner's 2026-11-02 decision (§25.6.2, GG-T51: home-tree thresholds, off-tree premium, Respec all priced in skill points); quests, bounties and dialogue also pay it (§22.4, RewardSkillPoints, GrantSkillPoint). One shared pool would make every level a choice between a stat and a tree node, devalue the trees' tuned 10/20-point thresholds, and turn every quest/bounty skill-point reward into a stat reward too. A separate stat pool adds GG-T168's "free point a level on any of the 8 stats" without touching any of that. If the owner later adopts GG-T168 in full (abilities gated by Requires stat thresholds, GG-T590/592, with the trees retired), the skill-point pool can be folded in then. (Tests: StatPointsTests.)