mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6739] [MERGED] feat(game): a dice-pool combat kind, soak by kind, initiative every round and spend limits #7308
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#7308
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/6739
Author: @kolacheee
Created: 9/26/2026
Status: ✅ Merged
Merged: 9/27/2026
Merged by: @kolacheee
Base:
staging← Head:feat/ruleset-combat-storyteller📝 Commits (2)
490f49ffeat(game): a dice-pool combat kind, soak by kind, initiative every round and spend limits67e3fd1fix(game): a window before a rethrown round names nobody, rider dice are the pool's die, and soak off the dice leaves automatic successes📊 Changes
27 files changed (+3082 additions, -167 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+42 -0)📝
docs/examples/rulesets/gravewatch.json(+190 -3)📝
docs/extending/ruleset.schema.json(+454 -3)📝
docs/extending/writing-rulesets.md(+98 -6)📝
docs/game/combat.md(+2 -0)📝
packages/client/src/lib/ruleset-combat-log.ts(+107 -14)📝
packages/client/src/localization/locales/en.json(+21 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+25 -0)📝
packages/shared/src/features/ruleset-combat/creatures.ts(+15 -0)📝
packages/shared/src/features/ruleset-combat/encounter.ts(+113 -25)📝
packages/shared/src/features/ruleset-combat/index.ts(+18 -0)📝
packages/shared/src/features/ruleset-combat/options.ts(+95 -13)➕
packages/shared/src/features/ruleset-combat/pool.ts(+241 -0)📝
packages/shared/src/features/ruleset-combat/resolve.ts(+365 -85)📝
packages/shared/src/features/ruleset-combat/types.ts(+41 -0)📝
packages/shared/src/schemas/capability-package.schema.ts(+8 -1)📝
packages/shared/src/schemas/ruleset.schema.ts(+194 -7)📝
scripts/generate-ruleset-schema.mjs(+33 -0)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+4 -4)...and 7 more files
📄 Description
Linked issue
Closes #6736
Why this change
A ruleset can already describe pool checks (
resolution.kind: "dice-pool": the sheet's number is how many dice are thrown, and each die that reaches a target is a success), but a fight had one kind,attack-vs-defense, which adds dice up and compares them with a number. So the pool systems the ruleset gap report names (W10, and W9's per-turn spending) could not fight by their own rules at all, and Gravewatch, the Engine's own pool example, had no fight. This is the Storyteller kind the maintainer ordered last, after the other combat slices and the 5e package release.What changed
Capability API 1.47 (file keys:
combat.kind: "dice-pool",combat.pool,combat.spendLimits,initiative.each, an attack row'stoHit.skill, and a creature'ssoak). None of it names one game's words.dice-poolfight every number a roll adds is dice, and every number it meets is successes, exactly as the ruleset's own pool checks read the sheet.toHitis the pool an attack throws, anddefenseis the successes it needs, never fewer than one.flatmodifier is dice added or taken away; a rolleddicemodifier is refused.rollDicePoolCheck), so the die, target, doubling, exploding, cancelling and botch are the ruleset's. The wound penalty (resolution.penaltyFrom) takes dice off, as on a check.diceare dice of the ruleset's own die (refused otherwise, on entries and creatures), and itsflatpart is automatic successes.pool.damageTarget(the resolution's default target when absent), with nothing doubling, exploding, cancelling or botching.pool.soakis value references by kind of the health track, either thrown against the damage target (each success takes one off) or taken off the damage dice first.soak, a sheet creature reads it off its sheet, and an opponent the Game Master invents has none (the clamp drops it, since no tier bounds it).initiative.each: "round"throws initiative again as each round begins, with the modifier read off the sheet as it stands then, and re-sorts the order.combat.spendLimitscaps what one combatant spends of a live pool per turn or round: a cost past what is left is priced as unaffordable, and every payment counts, answers in a window included.toHit.skilllets an attack row throw a skill, with the row's ability swapped in as a check'swith=does.en.jsononly.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run by the agent on
490f49f71(this branch's one commit on staging399dea52b), all exit 0:pnpm check(localization included),pnpm regression:node(407/407, the published schema's staleness check included),pnpm smoke:ui(7/7) andpnpm regression:ui e2e/game-combat-director.e2e.ts e2e/ruleset-wound-sheet.e2e.ts e2e/ruleset-live-states.e2e.ts --project=desktop-chromium --workers=1(9/9).scripts/regressions/game-ruleset-combat-pool.regression.ts, on Gravewatch with scripted dice, covers:scripts/regressions/ruleset-combat-director.regression.tsgains twenty seeded Gravewatch fights played by the Engine on both sides. Every one ends, pools are thrown and soaked, initiative is thrown again, and nobody spends past the limit.Local CodeRabbit (
coderabbit review --agent --committed), five passes: 2, 1, 1, 4 and 0 findings.Fixed seven:
soakon a ruleset whosepoolsays nothing about soak was ignored in the fight but counted in the forecast; it is now refused at import, and the forecast counts no soak without the rule;kind;Declined one: grouping three refusal checks on one edited document into one assertion. Each separate check gives its own failure message.
Still to verify by hand (not done by the agent):
docs/examples/rulesets/gravewatch.jsonas a community ruleset, start a Game Mode game on it with a warden who has an Arm (for example Spade: Sinew, Dig, 2d10, tearing) and the Lantern Flare and Stern Word charms, and have the Game Master start a fight against a Grave-rat swarm or a Hollow warden.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs touched:
docs/extending/writing-rulesets.md(not carried bydocs-i18n)docs/game/combat.md(carried bydocs-i18n)docs/extending/ruleset.schema.json, regenerateddocs/examples/rulesets/gravewatch.jsondocs/development/game-rulesets-and-sheets-implementation.md(internal)CHANGELOG.mdTranslations are batched into one
[docs-i18n]issue after the last ruleset slice, by the maintainer's standing decision, so no per-PR issue is opened here.UI evidence (if applicable)
None attached. The screen is the existing ruleset battle screen; what is new on it is the log lines, pinned in the lane, and the manual steps above.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.