[PR #8268] [MERGED] fix(game): a fight setup leaves out an ability word it cannot read #8256

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

📋 Pull Request Information

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

Base: staging ← Head: fix/combat-setup-unknown-reaction


📝 Commits (1)

  • 84cbbca fix(game): a fight setup leaves out an ability word it cannot read

📊 Changes

2 files changed (+36 additions, -1 deletions)

View changed files

📝 packages/shared/src/features/combat-director.ts (+9 -1)
📝 scripts/regressions/ruleset-combat-director-route.regression.ts (+27 -0)

📄 Description

Linked issue

Closes #8267

Why this change

  • Before: the Game Master's fight setup could give an ability a reaction word the Engine doesn't know, such as "counterattack" for a duelist's Parry. When that happened, the whole fight was refused with "Invalid combat AI data: Invalid enum value".
  • After: the setup drops just that field and keeps the ability, the same way it already pulls an out-of-range number back into bounds.

What changed

  • The lenient fight-setup fields now drop an unknown reaction or targetScope value. They also drop a projectile, requiresSight, spell or friendlyFire that isn't true or false.
  • A turn or a replayed save is still strict, as before.

Validation

  • ruleset-combat-director-route regression passes, with a new case: a duelist with reaction: "counterattack", a bad targetScope and non-boolean flags parses, keeps each ability, and keeps a known "guard". The strict field still refuses "counterattack".
  • tsc --noEmit for shared and server
  • 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)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Found in a laptop playtest: a turn that asked for "a duelist with the Parry reaction" failed at combat setup. A retry worked once the Game Master wrote "guard".

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
  • 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/8268 **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/combat-setup-unknown-reaction` --- ### 📝 Commits (1) - [`84cbbca`](https://github.com/Pasta-Devs/Marinara-Engine/commit/84cbbca1937449d7e26eee8249aabac50bc838fa) fix(game): a fight setup leaves out an ability word it cannot read ### 📊 Changes **2 files changed** (+36 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/shared/src/features/combat-director.ts` (+9 -1) 📝 `scripts/regressions/ruleset-combat-director-route.regression.ts` (+27 -0) </details> ### 📄 Description ## Linked issue Closes #8267 ## Why this change - Before: the Game Master's fight setup could give an ability a `reaction` word the Engine doesn't know, such as `"counterattack"` for a duelist's Parry. When that happened, the whole fight was refused with "Invalid combat AI data: Invalid enum value". - After: the setup drops just that field and keeps the ability, the same way it already pulls an out-of-range number back into bounds. ## What changed - The lenient fight-setup fields now drop an unknown `reaction` or `targetScope` value. They also drop a `projectile`, `requiresSight`, `spell` or `friendlyFire` that isn't true or false. - A turn or a replayed save is still strict, as before. ## Validation - [x] `ruleset-combat-director-route` regression passes, with a new case: a duelist with `reaction: "counterattack"`, a bad `targetScope` and non-boolean flags parses, keeps each ability, and keeps a known `"guard"`. The strict field still refuses `"counterattack"`. - [x] `tsc --noEmit` for shared and server - [ ] 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) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Found in a laptop playtest: a turn that asked for "a duelist with the Parry reaction" failed at combat setup. A retry worked once the Game Master wrote "guard". ## 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 - [ ] 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:09 +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#8256
No description provided.