mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6323] [MERGED] feat(game): roll checks through a pinned ruleset (rulesets slice 2) #7138
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#7138
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/6323
Author: @kolacheee
Created: 9/18/2026
Status: ✅ Merged
Merged: 9/18/2026
Merged by: @kolacheee
Base:
staging← Head:feat/rulesets-dice-sum📝 Commits (3)
e431112feat(game): roll checks through a pinned ruleset's dice-sum kindf6abd7afix(game): address ruleset check review findingsb0505c1docs(game): say that the player keeps a name they share with a party member📊 Changes
16 files changed (+1383 additions, -51 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+13 -2)📝
docs/game/dice-and-skill-checks.md(+26 -11)📝
packages/client/src/components/game/GameSurface.tsx(+1 -0)📝
packages/client/src/hooks/use-game.ts(+1 -0)📝
packages/server/src/routes/game.routes.ts(+7 -0)📝
packages/server/src/routes/generate.routes.ts(+19 -1)📝
packages/server/src/services/game/gm-prompts.ts(+48 -5)📝
packages/server/src/services/game/one-request-dice.ts(+36 -0)📝
packages/server/src/services/game/skill-check-resolution.service.ts(+309 -31)➕
packages/shared/src/features/rulesets/sheet-math.ts(+316 -0)📝
packages/shared/src/index.ts(+1 -0)📝
packages/shared/src/types/game.ts(+8 -0)📝
packages/shared/src/utils/skill-check-format.ts(+4 -1)📝
packages/shared/src/utils/skill-check-tag.ts(+8 -0)➕
scripts/regressions/game-ruleset-checks.regression.ts(+585 -0)📄 Description
Linked issue
Part of #6314 (slice 2 of 7; it does not close the issue). Builds on #6315, which is merged.
Why this change
What changed
SkillCheckModifierContextgains an optionalruleset. Every caller already goes throughresolveSkillCheckWithContext, so the endpoint, generation post-processing, one-request dice and the sighted pool all reach it with no new call sites.packages/shared/src/features/rulesets/sheet-math.ts): tolerant sheet evaluation, name matching for skills, saves and abilities ("Dexterity save",dex_save, "DEX saving throw"), and thedice-sumroll with advantage, disadvantage and the ruleset's natural-result policy. Nothing in it throws.who=on[skill_check:]checks a party member. It ridesSkillCheckResult.who, set only by the ruleset resolver, so legacy records keep their bytes. A name with no sheet rolls unmodified dice.rulesetPinnedhint from the generate route means a legacy game still never loads the context for a finished tag.roll_diceis no longer offered as a way to record a check. With no ruleset the reminder is byte-identical.PROF; unknown names stay refused.who=on an overflowed check, and is skipped for other dice so no pool value is recorded against a roll it did not decide.scripts/regressions/game-ruleset-checks.regression.ts.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Commands run locally by the agent:
pnpm check(exit 0) and the regressionsgame-ruleset-checks,gm-skill-check-resolution, the fourone-request-dice-*lanes andprompt(all pass).Local CodeRabbit review ran until it returned no findings. Declined along the way, with reasons: gating
rulesetPinnedon the pin resolving (an unavailable pin must fail closed, not fall back to the built-in arithmetic), and wrappingloadRulesetRegistry()at the call site (it already never throws).Still to verify by hand:
rulesetSheetand agameRulesetpin through Edit Spoilers JSON and watch a real check banner use the sheet modifier.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs touched:
CHANGELOG.md,docs/game/dice-and-skill-checks.md, the plan. The[docs-i18n]follow-up is batched for the ruleset slices.UI evidence (if applicable)
None. No UI in this slice.
Summary by CodeRabbit
New Features
who="Name".Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.