mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6368] [MERGED] feat(game): rulesets can resolve checks with a dice pool that counts successes #7152
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#7152
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/6368
Author: @kolacheee
Created: 9/19/2026
Status: ✅ Merged
Merged: 9/19/2026
Merged by: @kolacheee
Base:
staging← Head:feat/rulesets-dice-pool📝 Commits (10+)
0b569f1feat(game): add the dice-pool resolution kind to the shared schema and resolverfb332f1feat(packages): gate a dice-pool ruleset on Capability API 1.24 and ship the Gravewatch examplec5d5b15test(game): pin the dice-pool kind, its tag attributes and the 1.24 install gate0f912a8docs(game): document the dice-pool resolution kind for authors, players and packagers0ef3fadrefactor(game): build the empty check result per call and drop a dead readc5ca04etest(game): pin the pool difficulty ceiling on the sighted-pool path9354a94feat(game): the client spells a pool ruleset's numbers as dice and says how it rolls6db5a84test(game): pin the client's pool wording and its rules summary341abe7docs(game): say what a pool result's dice card shows0f179c3fix(game): the client's fallback check carries the tag's with, threshold and bonus📊 Changes
37 files changed (+2470 additions, -132 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+25 -7)📝
docs/development/optional-agent-packages.md(+22 -0)➕
docs/examples/rulesets/gravewatch.json(+107 -0)📝
docs/extending/ruleset.schema.json(+382 -0)📝
docs/extending/writing-rulesets.md(+89 -8)📝
docs/game/dice-and-skill-checks.md(+15 -1)📝
packages/client/src/components/agents/RulesetImportReviewModal.tsx(+8 -5)📝
packages/client/src/components/dice/AnimatedDiceRoll.tsx(+14 -1)📝
packages/client/src/components/dice/AnimatedSkillCheckResult.tsx(+16 -8)📝
packages/client/src/components/dice/dice.css(+13 -2)📝
packages/client/src/components/game/GameRulesetSheet.tsx(+6 -6)📝
packages/client/src/components/game/GameSetupRulesChooser.tsx(+10 -0)📝
packages/client/src/components/game/GameSurface.tsx(+9 -0)📝
packages/client/src/components/rulesets/RulesetSheetEditor.tsx(+3 -6)📝
packages/client/src/hooks/use-game.ts(+3 -0)➕
packages/client/src/lib/ruleset-resolution.ts(+55 -0)📝
packages/client/src/localization/locales/en.json(+14 -0)📝
packages/server/src/routes/game.routes.ts(+10 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+10 -1)...and 17 more files
📄 Description
Linked issue
Part of #6314 (slice 7b of the ruleset plan; it does not close the issue). Builds on #6362 (slice 8c, merged).
Why this change
What changed
dice-pool. The sheet is unchanged: everything it already computes for a check (ability throughabilityModifier, the training tier's bonus, the free bonus) is, under this kind, the number of dice. A rating-based sheet is abilities read withidentityand training tiers withflatbonuses, so there is no new sheet vocabulary and no new editor UI.dcis the successes required. Optional and bounded by the ruleset:threshold=,bonus=, andwith="Ability"to roll a skill with another ability than its own.with=works for both kinds. Adice=orresolution=the model wrote from habit is ignored in a pool ruleset, and pool numbers are always the Engine's: nothing the model wrote is vouched for. Because of that,resolveSkillCheckTagsInContentis not idempotent for pool checks; generation only ever hands it a freshly written segment, and the doc comment now says so.with=,bonus=andthreshold=. Roll placeholders resolve no sheet name under a pool ruleset, because a dice count is not a modifier.dice="6d10" resolution="successes" threshold="6"tag (games with no ruleset) rolls exactly as before and gets the same card wording. The client's fallback check call now carrieswith,thresholdandbonustoo.threshold=,bonus=andwith=only where the ruleset declares them.bonus=with a sheet command is the documented approximation.docs/game/dice-and-skill-checks.md,docs/development/optional-agent-packages.md, the plan, the generated schema, and a new original example,docs/examples/rulesets/gravewatch.json(d10 pool, adjustable target, ones cancel, tens roll again).game-ruleset-dice-pool(schema refusals, every rule with a scripted die, tag attributes and bounds,with=on both kinds, the prompt line, the sheet block, the 1.24 gate, the legacy successes path unchanged, the sighted pool falling back blind),ruleset-dice-pool-client(the wording and the rules summary on all three examples).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Commands run locally by the agent:
pnpm check(exit 0),pnpm localization:check, the full node regression lane (pnpm regression:node, 324 of 324), and the new regressions. Four complete local CodeRabbit sweeps were run before opening (4, 3, 2 and 0 findings), and every finding was fixed: a blind roll under the sighted pool now applies the ask its record keeps, a saved record is written from what the roll applied (the clamped bonus dice, the ability only when it was swapped in), one ceiling for a check's difficulty is shared by the schema and the resolver, and a number of successes no roll could reach is refused. The e2e suite was checked by reading it: the only specs that mention skill checks assert the server-side tag text or sum results, none produces a successes result, and none mentions a ruleset. Playwright was not run locally.The agent drove a scratch server on port 7820 with a fresh data folder and no model connected: imported the Gravewatch example, created a character on it, and opened the sheet editor, which showed "4 dice" on the ability, "7 dice" and "5 dice" on the trained skills, and all six training tiers. Through the check endpoint the client's fallback uses, a check with
with,threshold8 andbonus+2 rolled 7 dice at target 8 and the saved tag keptthreshold,who,withandbonus; a plain check rolled 7 dice, one ten rolled again, one 1 cancelled, 3 successes.Still to verify by hand:
resolution="successes"tag, and a 5e game is unchanged.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/extending/writing-rulesets.md,docs/game/dice-and-skill-checks.md,docs/development/optional-agent-packages.md, the plan, the new example and the generated schema. The[docs-i18n]follow-up is batched for the ruleset slices.UI evidence (if applicable)
To be added by a human: a pool dice card, the sheet editor on a pool ruleset, and the rules summary in the setup chooser.
Summary by CodeRabbit
New Features
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.