[GH-ISSUE #6411] [Feature]: a catalog entry still cannot change how a check is rolled (the per-entry half of #6405) #3585

Closed
opened 2026-10-21 06:04:32 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Sep 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6411

Originally assigned to: @kolacheee on GitHub.

What is left of #6405

The standing half of #6405 is built (Capability API 1.30): a ruleset may declare resolution.spend, so "spend a point of will for one automatic success" is a rule of the system the Engine applies, paid for before the dice are thrown and carried by the check tag itself so one resolution does both.

The per-entry half is not built, and this issue is that half.

The gap

A catalog entry cannot say that it changes a check. There is no mechanics.check, so a charm, knack or feat whose printed rule is "re-roll all 1s", "this check gains three automatic successes" or "count 9s as successes this time" is still flavour text with a price. Concretely, mechanics.check would carry:

check: {
  reroll?: { upTo: number, mode: "once" | "until" },
  dice?: number,
  successes?: number,
  threshold?: number
}

with the scaling half reusing what already exists: mechanics.cost plus mechanics.perCostStep is already "one blood buys one step, three buys three", the same machinery that upcasts a spell. The check tag would name the entry, [skill_check: skill="Brawl" dc="3" use="Potence" spend="blood:1"], beside the spend= the standing rule already uses.

Why it was not built with the rest

It is not "the standing rule plus a few fields". It needs the ruleset's CATALOGS inside the check resolver, and the resolver deliberately has none: catalogs are loaded by loadTurnRulesetCatalogs on the other side of the turn, after the dice are thrown. So it needs a catalog source on SkillCheckRulesetContext (loaded in loadSkillCheckModifierContext, or handed in by the generate route, which already loads them once), entry matching by planRulesetUse's rules, the perCostStep scaling, and a reroll arm in rollDicePoolCheck with a hard ceiling on until so a pathological ruleset cannot loop.

The payment seam it needs already exists: the onSpend sink added for the standing rule is where an entry's cost would be paid, and the same all-or-nothing rule applies.

Refusals it still owes

These were listed for #6405 and are not built, because the keys they guard do not exist yet: a mechanics.check on a ruleset whose resolution kind cannot honour it (a dice-sum ruleset has no successes to add), a reroll upTo outside the die's faces, and the Engine ceiling on an until reroll.

The rule that must not be lost

The Engine rolls the dice and isRulesetRollableSkillCheckTag discards any the model writes. That is why this has to be data rather than something the Game Master is trusted to apply: the model names what the player said they were spending, and the Engine decides what it costs and what it does.

Originally created by @kolacheee on GitHub (Sep 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6411 Originally assigned to: @kolacheee on GitHub. ## What is left of #6405 The standing half of #6405 is built (Capability API 1.30): a ruleset may declare `resolution.spend`, so "spend a point of will for one automatic success" is a rule of the system the Engine applies, paid for before the dice are thrown and carried by the check tag itself so one resolution does both. The per-entry half is not built, and this issue is that half. ## The gap A catalog entry cannot say that it changes a check. There is no `mechanics.check`, so a charm, knack or feat whose printed rule is "re-roll all 1s", "this check gains three automatic successes" or "count 9s as successes this time" is still flavour text with a price. Concretely, `mechanics.check` would carry: ``` check: { reroll?: { upTo: number, mode: "once" | "until" }, dice?: number, successes?: number, threshold?: number } ``` with the scaling half reusing what already exists: `mechanics.cost` plus `mechanics.perCostStep` is already "one blood buys one step, three buys three", the same machinery that upcasts a spell. The check tag would name the entry, `[skill_check: skill="Brawl" dc="3" use="Potence" spend="blood:1"]`, beside the `spend=` the standing rule already uses. ## Why it was not built with the rest It is not "the standing rule plus a few fields". It needs the ruleset's CATALOGS inside the check resolver, and the resolver deliberately has none: catalogs are loaded by `loadTurnRulesetCatalogs` on the other side of the turn, after the dice are thrown. So it needs a catalog source on `SkillCheckRulesetContext` (loaded in `loadSkillCheckModifierContext`, or handed in by the generate route, which already loads them once), entry matching by `planRulesetUse`'s rules, the `perCostStep` scaling, and a reroll arm in `rollDicePoolCheck` with a hard ceiling on `until` so a pathological ruleset cannot loop. The payment seam it needs already exists: the `onSpend` sink added for the standing rule is where an entry's cost would be paid, and the same all-or-nothing rule applies. ## Refusals it still owes These were listed for #6405 and are not built, because the keys they guard do not exist yet: a `mechanics.check` on a ruleset whose resolution kind cannot honour it (a `dice-sum` ruleset has no successes to add), a reroll `upTo` outside the die's faces, and the Engine ceiling on an `until` reroll. ## The rule that must not be lost The Engine rolls the dice and `isRulesetRollableSkillCheckTag` discards any the model writes. That is why this has to be data rather than something the Game Master is trusted to apply: the model names what the player said they were spending, and the Engine decides what it costs and what it does.
bsakaguchi 2026-10-21 06:04:32 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 20, 2026):

Implemented and merged into staging in #6416, with integration fixes and regression coverage.

<!-- gh-comment-id:5750153231 --> @SpicyMarinara commented on GitHub (Sep 20, 2026): Implemented and merged into staging in #6416, with integration fixes and regression coverage.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3585
No description provided.