mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6362] [MERGED] feat(game): ruleset catalogs keep scaled values, offer newer text, and the Game Master can use an ability by name #7148
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#7148
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/6362
Author: @kolacheee
Created: 9/19/2026
Status: ✅ Merged
Merged: 9/19/2026
Merged by: @kolacheee
Base:
staging← Head:feat/rulesets-8c📝 Commits (10+)
27ea2c9feat(game): catalog entry rows can scale a number column from the sheetf72f51ffeat(game): the sheet command can use a catalog entry and pay what it costs44e7cd5test(game): pin scaled rows, the use command and the 1.23 install gate016b439docs(game): scaled catalog values, the use command and Capability API 1.23c7b4307feat(game): the sheet editor keeps the ruleset's own cells and offers newer catalog text9ebeefbtest(game): pin what a catalog refresh offers and what applying it writes5749f7edocs(game): refresh from ruleset and the cells a ruleset keeps807c421refactor(game): name the patched build in the sheet editor's commit7bc5f06fix(game): refuse using a catalog entry whose own counter has no usesf11fd04fix(game): address the first local review of slice 8c📊 Changes
37 files changed (+2517 additions, -133 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/characters/colors-and-stats.md(+5 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+22 -5)📝
docs/development/optional-agent-packages.md(+29 -0)📝
docs/examples/rulesets/ember-roads.json(+8 -3)📝
docs/extending/ruleset.schema.json(+92 -0)📝
docs/extending/writing-rulesets.md(+89 -1)📝
docs/game/party-and-npcs.md(+5 -1)📝
packages/client/src/components/game/GameRulesetSheet.tsx(+3 -0)➕
packages/client/src/components/rulesets/RulesetCatalogRefreshModal.tsx(+116 -0)📝
packages/client/src/components/rulesets/RulesetSheetEditor.tsx(+187 -17)📝
packages/client/src/components/ui/DraftNumberInput.tsx(+3 -0)📝
packages/client/src/lib/ruleset-catalog.ts(+165 -4)📝
packages/client/src/localization/locales/en.json(+16 -0)📝
packages/server/src/routes/capability-packages.routes.ts(+10 -32)📝
packages/server/src/routes/generate.routes.ts(+2 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+42 -5)📝
packages/server/src/services/game/gm-prompts.ts(+7 -0)➕
packages/server/src/services/game/ruleset-catalog.service.ts(+85 -0)📝
packages/server/src/services/game/ruleset-sheet-turn.service.ts(+55 -1)...and 17 more files
📄 Description
Linked issue
Part of #6314 (slice 8c of the ruleset plan; it does not close the issue). Builds on #6345 (catalogs) and #6348 (the combat bridge), both merged.
Why this change
What changed
scaled: { "<number column>": { from: <value reference>, table?: <step table> } }. Without a table the column takes the referenced value, with one the value is looked up, and anything fancier is aderivedvalue the ruleset already knows how to declare, so no new math vocabulary is added. It is checked like every other reference (a number column of the row's list, a valid reference, and the row must be the entry's only row for its list so a picked row maps to it without guessing).text,longtext,dice,enum): booleans and numbers are where a player's own state lives (prepared, proficient, a magic weapon's bonus), and there is no stored base to merge against. Nothing is shown when nothing differs.usecommand (the plan's cast helper, kept system-neutral):[sheet: who="Name" op="use" name="Fireball"], withop="cast"andspell=accepted as aliases. It finds the picked row by the name the Game Master was shown, pays everymechanics.costterm (a term naming a pool group pays from the first pool of the group that can afford it), plus one from each counter row the same entry wrote (Rage, a trick's uses).pool=is the upcast: the same single price from another pool of the same group. There is no automatic climb to a higher pool, because a group is not always a ladder. All or nothing; an entry with no cost is accepted and changes nothing; a counter scaled down to 0 uses is refused rather than used for free. New refusal reasonsunknown-entry,ambiguous-entry,bad-pool, with their phrases.usecommand, and only the catalogs the party's rows point at. The "read and check one catalog" part of the catalog route moved into a small service both callers share; the route's status codes, ETag and 304 behaviour are unchanged and still pinned. The Game Master prompt listsuseonly when the ruleset declares catalogs.scaledfor packages, for inline catalogs and for catalog files (the install path already holds the verified bytes of every declared asset, so it looks inside them).usecommand),docs/game/party-and-npcs.md,docs/characters/colors-and-stats.md,docs/development/optional-agent-packages.md, the plan (what slice 8c settled), the generated schema, and Ember Roads gains a scaled trick (uses follow Heart).game-ruleset-scaled-rows(new),usecases ingame-ruleset-live, the 1.23 install gate, the catalogs regression for the moved service, and the client laneruleset-catalog-refresh(new).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, 319 of 319), and the new regressions. Six complete local CodeRabbit sweeps were run before opening (4, 2, 2, 2, 2 and 0 findings). Every finding was fixed except one, declined: an in-process cache of parsed catalogs in the new catalog service. A catalog file is read only on a turn whose reply carries ausecommand, and the route already answers 304 before it parses anything, so a cache would add invalidation rules for very little. The e2e suite was checked by reading it: no spec mentions a ruleset, mocks the ruleset routes or drives the sheet editor, and the new button texts match no existing locator. Playwright was not run locally.The agent drove a scratch server on port 7820 with a fresh data folder: imported the Ember Roads example, and opened a character whose sheet held a picked Last Ember with old text and an out-of-date uses value. Opening the sheet changed nothing (uses stayed as stored). The Uses cell was disabled with the hint. Changing Heart from 2 to 3 set the trick's uses to 3. The Knacks list showed "1 row has newer text in the ruleset.", the review listed the old and the new text with its checkbox ticked, Update selected restored the ruleset's text and the notice went away, and saving the character kept both catalog marks.
Still to verify by hand:
usecommand (a slot spell, an upcast withpool=, and a feature with its own counter), and confirm the sheet and the refusal phrases.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/party-and-npcs.md,docs/characters/colors-and-stats.md,docs/development/optional-agent-packages.md, the plan, the Ember Roads 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: the locked cell with its hint, the refresh notice, and the review window.
Summary by CodeRabbit
New Features
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.