[PR #8317] [MERGED] fix(game): a ruleset fight keeps the battlefield features that fit instead of refusing to start #8270

Closed
opened 2026-10-26 04:04:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8317
Author: @kolacheee
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @kolacheee

Base: staging ← Head: fix/battlefield-feature-overlap


📝 Commits (1)

  • 164e895 fix(game): a ruleset fight keeps the battlefield features that fit instead of refusing to start

📊 Changes

2 files changed (+65 additions, -8 deletions)

View changed files

📝 packages/server/src/services/game/ruleset-combat-director.service.ts (+32 -7)
📝 scripts/regressions/game-ruleset-combat-board-events.regression.ts (+33 -1)

📄 Description

Important

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

Linked issue

Closes #8316

Why this change

  • Before: if the Game Master's terrain brief for a ruleset board fight put two features of different terrain in the same place (a forest patch and a mountain barrier both east), board generation failed with "Battlefield features overlap with different terrain." and the fight never started.
  • After: the fight starts. The features that can stand together are kept, the first one named winning, and the one that clashes is left out.

What changed

  • When generation with a brief fails, the ruleset fight now adds the brief's features one at a time, keeping each one the board can still be built with, and builds the board from those. The features it left out go to the server log. The seed is the same, so a brief that works builds exactly the board it built before.
  • The shared generator still refuses a conflicting brief, so the Tactical screen's own terrain fallback is unchanged.

Validation

  • game-ruleset-combat-board-events regression: a forest patch and a wall barrier both at the centre now give the same board as the forest alone. Before this change it failed with the overlap error. hybrid-terrain (the generator's own refusal) still passes.
  • Shared and server typecheck pass locally; CI runs the full check.
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Found in a playtest where a nine-enemy fight could not start. Covered by the regression above.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

🔄 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-Engine/pull/8317 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/battlefield-feature-overlap` --- ### 📝 Commits (1) - [`164e895`](https://github.com/Pasta-Devs/Marinara-Engine/commit/164e8958d8dce78e376084a2ad209fb9dd430d5d) fix(game): a ruleset fight keeps the battlefield features that fit instead of refusing to start ### 📊 Changes **2 files changed** (+65 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/services/game/ruleset-combat-director.service.ts` (+32 -7) 📝 `scripts/regressions/game-ruleset-combat-board-events.regression.ts` (+33 -1) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #8316 ## Why this change - Before: if the Game Master's terrain brief for a ruleset board fight put two features of different terrain in the same place (a forest patch and a mountain barrier both `east`), board generation failed with "Battlefield features overlap with different terrain." and the fight never started. - After: the fight starts. The features that can stand together are kept, the first one named winning, and the one that clashes is left out. ## What changed - When generation with a brief fails, the ruleset fight now adds the brief's features one at a time, keeping each one the board can still be built with, and builds the board from those. The features it left out go to the server log. The seed is the same, so a brief that works builds exactly the board it built before. - The shared generator still refuses a conflicting brief, so the Tactical screen's own terrain fallback is unchanged. ## Validation - [x] `game-ruleset-combat-board-events` regression: a forest patch and a wall barrier both at the centre now give the same board as the forest alone. Before this change it failed with the overlap error. `hybrid-terrain` (the generator's own refusal) still passes. - [x] Shared and server typecheck pass locally; CI runs the full check. - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Found in a playtest where a nine-enemy fight could not start. Covered by the regression above. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 04:04:15 +07:00
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-Engine#8270
No description provided.