[PR #1733] fix(gacha-forge): Formation combat review fixes (1.24.1) #1715

Open
opened 2026-10-27 06:06:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1733
Author: @SpicyMarinara
Created: 10/26/2026
Status: 🔄 Open

Base: staging ← Head: feat/gacha-forge-formation-rework


📝 Commits (10+)

  • e656f98 fix(gacha-forge): close Formation engine and generation review gaps
  • 3863fd9 fix(gacha-forge): make the Formation kit remake respect cancels and pending fights
  • 6edb966 fix(gacha-forge): Formation battle UI review fixes
  • 14288a8 build(gacha-forge): release the Formation review fixes as 1.24.1
  • 1be68b8 fix(gacha-forge): address Dottore review of the 1.24.1 Formation fixes
  • 23ea18e build(gacha-forge): rebuild 1.24.1 with the review fixes
  • f3e1ef2 fix(gacha-forge): keep declined kits on Retry and check stale tabs before the remake gate
  • ce4d09e Merge branch 'staging' into feat/gacha-forge-formation-rework
  • e29a793 test(gacha-forge): stamp the Formation e2e battle preview with engine and rules
  • 20f989b Merge remote-tracking branch 'origin/feat/gacha-forge-formation-rework' into feat/gacha-forge-formation-rework

📊 Changes

30 files changed (+2029 additions, -435 deletions)

View changed files

➕ artifacts/gacha-forge-1.24.1.zip (+0 -0)
📝 catalog/catalog.json (+20 -20)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+20 -20)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+20 -20)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/gacha-forge/CHANGELOG.md (+7 -0)
📝 packages/gacha-forge/README.md (+2 -2)
📝 packages/gacha-forge/bundle-patches.json (+32 -0)
📝 packages/gacha-forge/client.js (+289 -81)
📝 packages/gacha-forge/docs/formation-combat.md (+2 -2)
📝 packages/gacha-forge/manifest.json (+17 -17)
📝 packages/gacha-forge/server.mjs (+297 -95)
📝 packages/gacha-forge/src/formation-combat-client.mjs (+121 -24)
📝 packages/gacha-forge/src/formation-combat-en.mjs (+12 -1)
📝 packages/gacha-forge/src/formation-combat-server.mjs (+75 -23)
📝 packages/gacha-forge/src/formation-combat-shared.mjs (+152 -52)
📝 packages/gacha-forge/src/formation-migration-server.mjs (+62 -16)
📝 packages/gacha-forge/src/formation-settings-en.mjs (+2 -2)

...and 10 more files

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #1732

Why this change

  • #1729 rebuilt Formation combat to the maintainer's design and shipped as 1.24.0 on staging. A review of it, with each finding checked independently, confirmed 32 defects. Some make fights unwinnable or lock a world's battles:
    • a boss could recast immunity forever;
    • retreat_echo gave free Ultimates;
    • the automatic kit remake could lock battles;
    • the client's battle log chose how a fight claim was scored.
  • 1.24.0 was merged before the fixes were ready. To leave its zip unchanged for anyone who installed it from staging, the fixes ship as 1.24.1. Classic combat stays the default and is unchanged.

What changed

Fights

  • Immunity: an immune unit can be hit again two turns after its ward. An immune taunter no longer forces every attack onto itself. The AI stops making immune casts that cannot land.
  • retreat_echo: it repeats one cast that was paid for on the previous turn, once. Echoes never refresh it.
  • Summon, revive, swap and immune: when they cannot land, they Hold without spending energy. The summon cap no longer counts dead Echo tokens.
  • Enemies without a kit: their placeholder passive never fires.
  • Planning: an energy skill early in a plan now pays for the actions after it, as it does in the engine.

Claim scoring

  • The server's saved snapshot decides which engine scores a fight, not the client's log. Only an unstamped fight from before 1.24 can use the old engine.
  • A 1.24 fight that is sent old-engine records is scored as a loss.

Automatic kit remake

  • Battles wait only while a remake is actually running, and a cancel is remembered.
  • A remake within Formation no longer cancels chapter work.
  • A remake no longer waits behind an unfinished fight.

Generation prompts and the kit normalizer

  • Worked examples: they now sit inside the engine's ranges, and the 300 power ceiling is stated in the prompt.
  • Tanks: a tank's taunt Normal is no longer rewritten into something else.
  • Unknown effects: one unknown effect name or a stray normal field no longer rejects a whole kit.
  • Bosses: a defeat order can no longer push the boss out of the fight.
  • Formation appendix: it no longer says its rules replace the Classic ones.
  • Seasonal and story enemies without a kit: they get a fallback kit, and an element barrier the player cannot meet is dropped.

Battle screen (Formation only)

  • Locks and labels: "Need N" says whether energy or an element is missing. Support skills on front_row read as your own Front Row.
  • Taunt: foes dimmed by a taunt show a "taunt" reason.
  • Boss HP bar: on a phone in landscape (874×402) it no longer covers the enemy cards' FRONT/BACK tags or defeat-order badges.
  • Keyboard: target cards are focusable, so a whole turn can be planned with the keyboard.
  • Rail: it highlights the fighter being planned.
  • Tray: its Fight button opens the plan summary while fighters are still unplanned.
  • Echo cards: they no longer copy their owner's badges, and they get a "Reinforcements" banner.
  • Team editor: unit names on the seat cards are readable in both themes.

Release: gacha-forge 1.24.1, with rebuilt bundles, manifest, artifact, catalog lanes, CHANGELOG, README and Formation docs, and an in-game What's new entry. The 1.24.0 ledger entries and zip are byte-identical to staging.

Package and security impact

  • Affected package IDs: gacha-forge
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact:
    • Fights saved from 1.24.1 onward carry an engine stamp.
    • A fight that a 1.24.0 tester on staging left unfinished has no stamp. It still replays on the current engine.
    • Classic data is untouched.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Run by the agents:

  • Regressions: all 432 tests/gacha-forge-*.regression.mjs pass. Each behaviour fix has its own regression, including a seeded fight that is won after the boss's first immune cast. That fight was won 0 times in 20 before the fix and 20 times in 20 after.
  • Other checks: npm run check passes with 0 errors, and so do validate-catalog and the catalog release-notes regression.
  • Browser suites:
    • Formation: 28/28, including the Classic battle path in both themes on phone and desktop.
    • Units, boss-dialogue and seasonal-events: 28/28.
  • Phone-landscape and desktop screenshots in both themes were reviewed for the boss bar, the tray, Echo cards and the editor names.

Please verify manually:

  • On an iPhone in landscape, open a Formation boss battle. Check that the boss HP bar sits clear of the enemy FRONT/BACK tags and the defeat-order badges.
  • Start a Formation fight against a boss with an immunity skill, and confirm it can be won.
  • In a Formation world with old kits, cancel the automatic remake, then start a battle. Confirm it starts and the remake doesn't restart.
  • In the team editor, check that the seat names are readable in dark and light themes.
  • Play one Classic battle and confirm nothing changed.

Not verified: real model generation for new kits, WebKit or a physical phone, and the chapter-regeneration browser suite.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1733 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/26/2026 **Status:** 🔄 Open **Base:** `staging` ← **Head:** `feat/gacha-forge-formation-rework` --- ### 📝 Commits (10+) - [`e656f98`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e656f9851d57d72906a22c0beaf25721cd58bef6) fix(gacha-forge): close Formation engine and generation review gaps - [`3863fd9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3863fd9a4111939c8b2aafbe8b1b937377dd1eb8) fix(gacha-forge): make the Formation kit remake respect cancels and pending fights - [`6edb966`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6edb96647c6767781b843ac4ed58d69c73085f89) fix(gacha-forge): Formation battle UI review fixes - [`14288a8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/14288a891481aa8313ae29ff5a6a94f0a37459c3) build(gacha-forge): release the Formation review fixes as 1.24.1 - [`1be68b8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/1be68b864a1ed1caf57c94b1420e85a02e4d4a1c) fix(gacha-forge): address Dottore review of the 1.24.1 Formation fixes - [`23ea18e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/23ea18efd53c8f74d09ea026cc778dadc195584f) build(gacha-forge): rebuild 1.24.1 with the review fixes - [`f3e1ef2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f3e1ef2f503c0866954385d81ddc9c5b6856cfa1) fix(gacha-forge): keep declined kits on Retry and check stale tabs before the remake gate - [`ce4d09e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ce4d09e9b4f69bd728f16b67ca04f460e919a6ba) Merge branch 'staging' into feat/gacha-forge-formation-rework - [`e29a793`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e29a79311855e01ee923206b4b9b19f9d610a01e) test(gacha-forge): stamp the Formation e2e battle preview with engine and rules - [`20f989b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/20f989bc0252d1aec76253312937cd79565473c8) Merge remote-tracking branch 'origin/feat/gacha-forge-formation-rework' into feat/gacha-forge-formation-rework ### 📊 Changes **30 files changed** (+2029 additions, -435 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/gacha-forge-1.24.1.zip` (+0 -0) 📝 `catalog/catalog.json` (+20 -20) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+20 -20) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+20 -20) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/gacha-forge/CHANGELOG.md` (+7 -0) 📝 `packages/gacha-forge/README.md` (+2 -2) 📝 `packages/gacha-forge/bundle-patches.json` (+32 -0) 📝 `packages/gacha-forge/client.js` (+289 -81) 📝 `packages/gacha-forge/docs/formation-combat.md` (+2 -2) 📝 `packages/gacha-forge/manifest.json` (+17 -17) 📝 `packages/gacha-forge/server.mjs` (+297 -95) 📝 `packages/gacha-forge/src/formation-combat-client.mjs` (+121 -24) 📝 `packages/gacha-forge/src/formation-combat-en.mjs` (+12 -1) 📝 `packages/gacha-forge/src/formation-combat-server.mjs` (+75 -23) 📝 `packages/gacha-forge/src/formation-combat-shared.mjs` (+152 -52) 📝 `packages/gacha-forge/src/formation-migration-server.mjs` (+62 -16) 📝 `packages/gacha-forge/src/formation-settings-en.mjs` (+2 -2) _...and 10 more files_ </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #1732 ## Why this change - #1729 rebuilt Formation combat to the maintainer's design and shipped as 1.24.0 on staging. A review of it, with each finding checked independently, confirmed 32 defects. Some make fights unwinnable or lock a world's battles: - a boss could recast immunity forever; - `retreat_echo` gave free Ultimates; - the automatic kit remake could lock battles; - the client's battle log chose how a fight claim was scored. - 1.24.0 was merged before the fixes were ready. To leave its zip unchanged for anyone who installed it from staging, the fixes ship as **1.24.1**. Classic combat stays the default and is unchanged. ## What changed **Fights** - **Immunity:** an immune unit can be hit again two turns after its ward. An immune taunter no longer forces every attack onto itself. The AI stops making immune casts that cannot land. - **`retreat_echo`:** it repeats one cast that was paid for on the previous turn, once. Echoes never refresh it. - **Summon, revive, swap and immune:** when they cannot land, they Hold without spending energy. The summon cap no longer counts dead Echo tokens. - **Enemies without a kit:** their placeholder passive never fires. - **Planning:** an energy skill early in a plan now pays for the actions after it, as it does in the engine. **Claim scoring** - The server's saved snapshot decides which engine scores a fight, not the client's log. Only an unstamped fight from before 1.24 can use the old engine. - A 1.24 fight that is sent old-engine records is scored as a loss. **Automatic kit remake** - Battles wait only while a remake is actually running, and a cancel is remembered. - A remake within Formation no longer cancels chapter work. - A remake no longer waits behind an unfinished fight. **Generation prompts and the kit normalizer** - **Worked examples:** they now sit inside the engine's ranges, and the 300 power ceiling is stated in the prompt. - **Tanks:** a tank's taunt Normal is no longer rewritten into something else. - **Unknown effects:** one unknown effect name or a stray `normal` field no longer rejects a whole kit. - **Bosses:** a defeat order can no longer push the boss out of the fight. - **Formation appendix:** it no longer says its rules replace the Classic ones. - **Seasonal and story enemies without a kit:** they get a fallback kit, and an element barrier the player cannot meet is dropped. **Battle screen (Formation only)** - **Locks and labels:** "Need N" says whether energy or an element is missing. Support skills on `front_row` read as your own Front Row. - **Taunt:** foes dimmed by a taunt show a "taunt" reason. - **Boss HP bar:** on a phone in landscape (874×402) it no longer covers the enemy cards' FRONT/BACK tags or defeat-order badges. - **Keyboard:** target cards are focusable, so a whole turn can be planned with the keyboard. - **Rail:** it highlights the fighter being planned. - **Tray:** its Fight button opens the plan summary while fighters are still unplanned. - **Echo cards:** they no longer copy their owner's badges, and they get a "Reinforcements" banner. - **Team editor:** unit names on the seat cards are readable in both themes. **Release:** `gacha-forge` 1.24.1, with rebuilt bundles, manifest, artifact, catalog lanes, CHANGELOG, README and Formation docs, and an in-game What's new entry. The 1.24.0 ledger entries and zip are byte-identical to staging. ## Package and security impact - Affected package IDs: `gacha-forge` - Engine compatibility impact: none - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: - Fights saved from 1.24.1 onward carry an engine stamp. - A fight that a 1.24.0 tester on staging left unfinished has no stamp. It still replays on the current engine. - Classic data is untouched. ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Run by the agents: - **Regressions:** all 432 `tests/gacha-forge-*.regression.mjs` pass. Each behaviour fix has its own regression, including a seeded fight that is won after the boss's first immune cast. That fight was won 0 times in 20 before the fix and 20 times in 20 after. - **Other checks:** `npm run check` passes with 0 errors, and so do `validate-catalog` and the catalog release-notes regression. - **Browser suites:** - Formation: 28/28, including the Classic battle path in both themes on phone and desktop. - Units, boss-dialogue and seasonal-events: 28/28. - Phone-landscape and desktop screenshots in both themes were reviewed for the boss bar, the tray, Echo cards and the editor names. Please verify manually: - [ ] On an iPhone in landscape, open a Formation boss battle. Check that the boss HP bar sits clear of the enemy FRONT/BACK tags and the defeat-order badges. - [ ] Start a Formation fight against a boss with an immunity skill, and confirm it can be won. - [ ] In a Formation world with old kits, cancel the automatic remake, then start a battle. Confirm it starts and the remake doesn't restart. - [ ] In the team editor, check that the seat names are readable in dark and light themes. - [ ] Play one Classic battle and confirm nothing changed. Not verified: real model generation for new kits, WebKit or a physical phone, and the chapter-regeneration browser suite. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1715
No description provided.