mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6525] [MERGED] feat(game): hold a ruleset fight open so a strike at somebody walking away is a choice #7212
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7212
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6525
Author: @kolacheee
Created: 9/22/2026
Status: ✅ Merged
Merged: 9/22/2026
Merged by: @kolacheee
Base:
staging← Head:feat/ruleset-combat-windows📝 Commits (1)
42ef613feat(game): a fight can be held open for somebody who is not acting📊 Changes
18 files changed (+1074 additions, -118 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/development/game-combat-rulesets-implementation.md(+6 -2)📝
docs/development/game-rulesets-and-sheets-implementation.md(+51 -10)📝
docs/extending/writing-rulesets.md(+52 -17)📝
packages/client/src/components/game/RulesetCombatMenu.tsx(+37 -6)📝
packages/client/src/lib/ruleset-combat-log.ts(+10 -0)📝
packages/client/src/localization/locales/en.json(+6 -0)📝
packages/server/src/services/game/ruleset-combat-director.service.ts(+233 -17)📝
packages/shared/src/features/combat-director.ts(+17 -1)📝
packages/shared/src/features/ruleset-combat/encounter.ts(+3 -1)📝
packages/shared/src/features/ruleset-combat/index.ts(+13 -6)📝
packages/shared/src/features/ruleset-combat/options.ts(+49 -0)📝
packages/shared/src/features/ruleset-combat/resolve.ts(+212 -32)📝
packages/shared/src/features/ruleset-combat/types.ts(+63 -0)📝
scripts/regressions/game-ruleset-combat-creatures.regression.ts(+75 -19)📝
scripts/regressions/game-ruleset-combat-grid.regression.ts(+203 -7)📝
scripts/regressions/ruleset-combat-director.regression.ts(+34 -0)📝
scripts/regressions/ruleset-combat-screen-client.regression.ts(+8 -0)📄 Description
Linked issue
Closes #6524
Why this change
Two things happened to people in a ruleset fight without asking them.
Walking out of an enemy's reach: the Engine made that enemy's strike for them and moved on. In most tabletop systems taking that strike is a decision, and it spends a resource the holder may want to keep. A player watched their own character spend a reaction they were saving, and an enemy that should have held back swung anyway.
Buying a signature action: a creature holding its own points could buy one at any moment that was not its own turn, but nothing ever offered one, so a creature written with them behaved as though it had none.
Both are the same missing piece. The fight could not be held open, so there was nowhere for somebody who is not the current actor to act.
What changed
signatureactions is asked before the next turn begins. That is now the only moment those are bought in: off its window a signature action is refused.window-open, and an answer naming a window that has closed is refused withstale-windowrather than taken for a turn's choice.RulesetEncounterState.window), with the rest of the interrupted walk inside it, so a game closed mid-walk comes back with the same people still to ask and the same cells still to walk.applyRulesetCombatChoicetakes a window answer exactly as it takes a turn's choice, offrulesetWindowOptionsorRULESET_PASS_OPTION.DirectedRulesetView.windowsays who is being asked and why; the menu becomes theirs, with a Pass beside it, and the log prints the window, the pass and the strike.No new ruleset key and no capability bump.
combat.opportunity.budget,signatureandsignaturePointswere all already declared; what changed is that the Engine asks instead of deciding, so a package built before this plays the same fight one question at a time.Validation
pnpm checkpasses locallyCONTRIBUTING.mdWhat I ran here, for the reviewer's information rather than in place of the boxes above:
pnpm check(exit 0) and the fullpnpm regressionlane (346/346) on this branch rebased ontostagingat0df28742c, plus a local CodeRabbit sweep that came back with no findings after three fixes it caught (a stale window answer falling through to the turn path, a duplicate outcome event, and a round rollover inside a window not handing the Game Master its calls back).Manual verification notes
Needs a real fight in a browser, on a game using a ruleset that declares
combat.opportunity.budget(theruleset-5e-2014package does):Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/extending/writing-rulesets.mdchanged, so this belongs in the next batched[docs-i18n]follow-up issue rather than one of its own.UI evidence (if applicable)
None yet. The window prompt and its Pass button are the only new UI, and both want a real fight rather than a screenshot of a fixture.
Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.