mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8782] [MERGED] fix(game): whole-party rolls, shade and fight budgets skip removed and dead members #8803
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#8803
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/8782
Author: @SpicyMarinara
Created: 11/3/2026
Status: ✅ Merged
Merged: 11/4/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/game-party-checks📝 Commits (7)
8520bc7fix(game): whole-party rolls and fight budgets skip removed and dead members5d56eaafix(game): a removed or dead member's lit shade no longer spares the partyd200774fix(game): a party with nobody left to roll refuses the check, never "0 of 0 passed"e1504a2fix(game): the fight brief keeps a persona named shorter than its card in the party1154d10fix(game): the checks, sheet commands and fight brief keep one party, a solo player in it030a257docs(game): say exactly why the director keeps the persona seed and when the setup fallback runsb731e1ffix(game): a persona renamed or deleted since setup keeps the player's card in the party📊 Changes
10 files changed (+617 additions, -44 deletions)
View changed files
📝
packages/client/src/hooks/use-directed-combat.ts(+12 -4)📝
packages/server/src/routes/combat-director.routes.ts(+9 -1)📝
packages/server/src/routes/encounter.routes.ts(+26 -7)📝
packages/server/src/routes/generate.routes.ts(+1 -1)📝
packages/server/src/services/game/ruleset-sheet-turn.service.ts(+15 -10)📝
packages/server/src/services/game/skill-check-resolution.service.ts(+98 -15)📝
packages/server/src/services/game/story-exposure-saves.service.ts(+13 -6)➕
scripts/regressions/directed-combat-delayed-reset.regression.ts(+107 -0)➕
scripts/regressions/game-party-checks-away-dead.regression.ts(+318 -0)📝
scripts/regressions/game-ruleset-encounter-budget.regression.ts(+18 -0)📄 Description
Linked issue
Closes #8781
Why this change
When you remove a member from a game's party, their card stays, along with the inventory stacks it holds. A dead hero keeps their card too. Before this change, only whole-party sheet commands left those members out. Group checks (
who="party"), story exposure saves, the shade check for exposures, Held Ground owing rolls and the fight-setup encounter budget all still counted them. That caused four problems. Removed companions could carry a group check that the present party failed. Exposure failures marked exhaustion and conditions on the cards of members who weren't there. A Lantern of Dusk held by someone who had left still kept an exposure off the present party. And the GM was given a budget for four when only two would fight, so the director cut its enemies down and the fight log filled with adjustments that contradicted the narration. Separately, in directed combat, the delayed error reset from a failed command could fire while a newer command was still in flight. That took the screen off the newer command, so autoplay and queued switches went out again at a stale revision. The results were spurious "fight had moved on" toasts, lost switches, and a boss decision replaced by the fallback. There is no linked issue: these came from a release-prep audit, so an issue should be opened before the PR is submitted.What changed
who="party") is no longer rolled. It comes back unrolled, as a check does when it cannot tell which party member should roll it.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
[skill_check: ... who="party"], and check that only present members roll and the removed one is missing from the group line.who="party"check comes back unrolled and no "0 of 0 passed" line appears.who="party"check rolls for it, and the fight-setup GM prompt counts it in "for a party of N".who="party"check still rolls for the player's card, a party long rest rests it, and the fight-setup GM prompt counts it, while a removed companion is still left out.who="party"check rolls for it, and the fight-setup GM prompt reads "for a party of 1". Then recruit a companion and check that the player's card still rolls in group checks.Agent-run checks (for reference; each regression was shown to fail without its fix):
node ./scripts/pnpm-runner.mjs build:shared: succeeded (rerun for the review follow-up)node ./scripts/run-regressions.mjs --filter <each new or extended regression>, with the source files stashed and then restored: All three FAILED on the old source and PASSED with the fix (details per finding). For the review follow-up, game-party-checks-away-dead FAILED at line 154 with only story-exposure-saves.service.ts staReview follow-up: run-regressions --filter for game-party-checks-away-dead, world-story-exposure-saves, world-story-held-ground, game-cheap-gm-check-roller, gm-: All 7 passedpackages/server: node ../../scripts/pnpm-runner.mjs run lint (tsc -b ../shared && tsc --noEmit && tsc -p tsconfig.character-activity.json), rerun after the foll: exit 0packages/client: node ../../scripts/pnpm-runner.mjs run lint (eslint + tsc -p tsconfig.client-lanes.json): exit 0; 0 errors, 12 warnings, all in files this change doesn't touch. Not rerun because the follow-up changed no client code.npx tsc --noEmit -p packages/client/tsconfig.json (with pipefail): exit 0packages/client: npx eslint src/hooks/use-directed-combat.ts: exit 0. Server code and regressions have no ESLint step in this repo; the server lint script is tsc only.prettier --write, then --check, on all changed files (including the two touched in the follow-up): All matched files use Prettier code styleSeparate runs of game-ruleset-check-effects, multiplayer-game-runtime, game-ruleset-item-stats, game-ruleset-returning-names, game-ruleset-named-creatures, mult: All passednode ./scripts/run-regressions.mjs --filter game-ruleset (672 files, first commit): 671/672 passed. game-ruleset-live failed one timing assertion under load, then passed on the runner's retry and passed alone. game-ruleset-combat-minds TIMED OUT at 30 s, but it imports none of the chpnpm localization:check: Not run: no client copy changedIndependent adversarial review: changes, 1 issue(s), all addressed in a fix-up pass.
Follow-up commits
e1504a2051,1154d10c41,030a257e17andb731e1f07f(Dottore's open contract on the fight brief and two review rounds): game-party-checks-away-dead and game-ruleset-encounter-budget pass and fail without each fix; server lint exit 0.Known limits and risks:
who="Dagna") still rolls on their sheet, as on staging.unknown-roller), so the story has no group result to follow.gameInitialSetup, so a later recruit or persona change does not change it. In a game set up with a party and no persona, the first card is a companion's and counts as away once removed. A player card the Game Master made there anyway is left out (first What changed bullet). If the model put a companion's card first despite the persona, and the persona no longer names a card, that companion stays in the party after leaving it. Group checks already kept it on staging; whole-party sheet commands now keep it too.gameInitialSetup(andgameSetupConfigfor the persona) only for metadata the setup did not write, if any, such as a ruleset pinned by a hand-made metadata PATCH. The game data editor keepsgameRulesetread-only. The Engine pins a ruleset only at setup, in the same write that keeps the setup. Setups have been kept since 2026-07-11, before rulesets could be chosen at creation (2026-09-18). In such a game with no persona, recruiting a companion makes the first card a stand-in again, and the player counts as away.ponytail:comment insetupPutsPlayerCardFirst. The fix is to mark the player's own card at setup.sitsOut) that the director leaves out. Second, the director's bestiary stand-in pass weighs only the members the GM's combat:init sent, by exact card name. Third, the director seeds its roster with the persona's exact name (nobody when there is no persona), not the card a check finds. Take the persona "Lethariel", the card "Lethariel Moonwhisper" and a combat:init that lists "Lethariel": the director counts the card as having left, and the GM's sheetless "Lethariel" stays out. The player's character then does not fight, while the brief budgets for them. Seeding the full card would at least put the card in the fight. But the lead is found by the persona's name, so it would fall to the first party member, and with companions on their own (the default) the Engine would play the card unless it is that member. A follow-up should resolve the GM's names to cards before the fight (see the comment in combat-director.routes.ts).Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.