[PR #6416] [MERGED] feat(rulesets): wound tracks, spending on a check, and a fight fought on a track (Capability API 1.30) #7170

Closed
opened 2026-10-23 04:17:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6416
Author: @kolacheee
Created: 9/20/2026
Status: ✅ Merged
Merged: 9/20/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/ruleset-wound-tracks


📝 Commits (10+)

  • 0b24d2f feat(rulesets): wound tracks in the ruleset format and live state
  • 618e944 feat(rulesets): a wound track bites the roll and shows its boxes on the sheet
  • 3d39055 feat(rulesets): wound tracks get their API number, example, docs and proof
  • e1f7bac feat(rulesets): a check can spend a pool to buy successes or dice
  • c52927f fix(rulesets): a catalog refresh offers a column the row never had
  • 0e55aa9 fix(game): a check that bought something keeps the cost paid even when the sheet pass does not run
  • 8841519 test(game): the route may keep what the check resolver handed back, and still may not swallow it
  • 4a6bdfb fix(rulesets): the published schema offers a check purchase only where it works, a wound track's levels run best first, and only the two boxes that do something are offered
  • 9ccf282 fix(rulesets): a full wound track can still take harm, a name the Engine cannot tell apart carries no penalty, and the guide no longer says automatic successes are unmodelled
  • a95abb7 feat(rulesets): a fight can be fought on a wound track

📊 Changes

44 files changed (+4948 additions, -249 deletions)

View changed files

📝 CHANGELOG.md (+15 -2)
📝 docs/development/optional-agent-packages.md (+41 -0)
📝 docs/examples/rulesets/gravewatch.json (+87 -4)
📝 docs/extending/ruleset.schema.json (+362 -65)
📝 docs/extending/writing-rulesets.md (+126 -9)
📝 docs/game/dice-and-skill-checks.md (+3 -0)
📝 docs/game/party-and-npcs.md (+1 -0)
➕ e2e/ruleset-wound-sheet.e2e.ts (+116 -0)
📝 packages/client/src/components/dice/AnimatedSkillCheckResult.tsx (+11 -0)
📝 packages/client/src/components/game/GameRulesetSheet.tsx (+191 -33)
📝 packages/client/src/components/rulesets/RulesetCatalogRefreshModal.tsx (+3 -1)
📝 packages/client/src/lib/ruleset-catalog.ts (+52 -4)
📝 packages/client/src/lib/ruleset-combat-bridge.ts (+10 -3)
📝 packages/client/src/localization/locales/en.json (+24 -0)
📝 packages/server/src/routes/generate.routes.ts (+77 -14)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+41 -1)
📝 packages/server/src/services/game/gm-prompts.ts (+24 -0)
📝 packages/server/src/services/game/ruleset-sheet-turn.service.ts (+7 -2)
📝 packages/server/src/services/game/skill-check-resolution.service.ts (+351 -11)
📝 packages/shared/src/features/ruleset-combat/encounter.ts (+39 -4)

...and 24 more files

📄 Description

Linked issue

Closes #6400, closes #6405, closes #6407, closes #6411. Translation follow-up: #6401 / #6429.

Why this change

Rulesets could not represent health as wound boxes or apply a purchased ability to a dice-pool check. Updating a ruleset also left existing picked rows without newly added columns. These gaps made the sheet, resource spending and actual roll disagree.

What changed

  • Add optional wound tracks with named levels, ordered damage kinds, persistent overflow, healing, rest handling and declared check penalties. The existing sheet renders and edits them; saved dice cards retain the applied penalty.
  • Let ruleset combat use a wound track for health. Compound damage marks once per blow when configured, using the most severe kind that landed; per-point rules continue counting each point.
  • Support resource purchases and picked catalog effects on the check itself: rerolls, dice, automatic successes and threshold changes. Free abilities, counter-only abilities and paid abilities use the same resolver. Costs are applied once, with unaffordable or unknown entries refused.
  • Show picked check effects and costs in the GM's configured sheet summary and the catalog picker. File-backed catalogs receive the same command guidance as inline ones.
  • Offer missing typed columns during Refresh from ruleset while preserving existing player-owned numbers and switches, including 0 and false.
  • Require Capability API 1.30 for the new contracts, retaining the integrated API 1.29 combat behavior. Update schema, examples, guides and Unreleased notes.

Validation

Maintainer integration: pnpm check, localization validation and pnpm regression:prompt passed. All 30 ruleset regression files passed, plus 12 browser cases across desktop Chromium, mobile Chromium and iPhone/WebKit emulation: light/dark wound sheets and Classic/Tactical ruleset fights. Regression proofs reproduce the compound-hit overcount, free-ability refusal, missing prompt/picker descriptions and saved-penalty loss before their fixes.

Local CodeRabbit completed the integrated diff. Its missing saved-penalty finding is fixed and covered for summed, pooled and empty-pool records, including invalid values. Its suggestion to replace structured check metadata with prose is declined: this is model context, the object contains validated numeric/enum fields, and retaining that compact representation avoids duplicating the localized client formatter. Required GitHub checks and hosted review remain merge gates.

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually mark, overflow, heal and reload a wound track; confirm the current penalty and lowest-severity clearing.
  • Manually use free and paid catalog abilities on checks, confirm the applied effect and single resource charge, then reload the dice card.
  • Manually fight with wound-based health and confirm going down and healing.
  • Manually review and decline newly added columns on an existing picked row.

Browser coverage uses synthetic data and emulated devices; no physical-device or live-model behavior is claimed.

Docs and release impact

Updated the authoring guide, package API notes, game check/sheet guides, Gravewatch example, generated schema and changelog. Translation work is tracked by #6401 and #6429. No app version bump.

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Synthetic wound-sheet screenshots and browser log, covering the real sheet and game-state persistence. Download the HTML to view its embedded images.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/6416 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/20/2026 **Status:** ✅ Merged **Merged:** 9/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/ruleset-wound-tracks` --- ### 📝 Commits (10+) - [`0b24d2f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0b24d2ff689ecdca9a268ea345b11685202d41d8) feat(rulesets): wound tracks in the ruleset format and live state - [`618e944`](https://github.com/Pasta-Devs/Marinara-Engine/commit/618e944be298aa64dd18ecb8d7100e147215ee2c) feat(rulesets): a wound track bites the roll and shows its boxes on the sheet - [`3d39055`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3d390551355941c38440afe88aef41ac57369f9e) feat(rulesets): wound tracks get their API number, example, docs and proof - [`e1f7bac`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e1f7bac8e108cc9175bf9a477df43ce7ef6164a8) feat(rulesets): a check can spend a pool to buy successes or dice - [`c52927f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c52927fc6f86276d6c30a6557b58c2560083abc6) fix(rulesets): a catalog refresh offers a column the row never had - [`0e55aa9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0e55aa9a1fccf80776cf040a34d4f090076e6bf4) fix(game): a check that bought something keeps the cost paid even when the sheet pass does not run - [`8841519`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8841519e25001b883c6a3994804029af121d2ff9) test(game): the route may keep what the check resolver handed back, and still may not swallow it - [`4a6bdfb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4a6bdfbdeb95ec272b935cb4d02e94470ab02bf7) fix(rulesets): the published schema offers a check purchase only where it works, a wound track's levels run best first, and only the two boxes that do something are offered - [`9ccf282`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9ccf282729c3b97b9b1ac06faeb53f7e0797a26a) fix(rulesets): a full wound track can still take harm, a name the Engine cannot tell apart carries no penalty, and the guide no longer says automatic successes are unmodelled - [`a95abb7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a95abb79908c6d9bf2aa880d8d941a7b827e4cfb) feat(rulesets): a fight can be fought on a wound track ### 📊 Changes **44 files changed** (+4948 additions, -249 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+15 -2) 📝 `docs/development/optional-agent-packages.md` (+41 -0) 📝 `docs/examples/rulesets/gravewatch.json` (+87 -4) 📝 `docs/extending/ruleset.schema.json` (+362 -65) 📝 `docs/extending/writing-rulesets.md` (+126 -9) 📝 `docs/game/dice-and-skill-checks.md` (+3 -0) 📝 `docs/game/party-and-npcs.md` (+1 -0) ➕ `e2e/ruleset-wound-sheet.e2e.ts` (+116 -0) 📝 `packages/client/src/components/dice/AnimatedSkillCheckResult.tsx` (+11 -0) 📝 `packages/client/src/components/game/GameRulesetSheet.tsx` (+191 -33) 📝 `packages/client/src/components/rulesets/RulesetCatalogRefreshModal.tsx` (+3 -1) 📝 `packages/client/src/lib/ruleset-catalog.ts` (+52 -4) 📝 `packages/client/src/lib/ruleset-combat-bridge.ts` (+10 -3) 📝 `packages/client/src/localization/locales/en.json` (+24 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+77 -14) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+41 -1) 📝 `packages/server/src/services/game/gm-prompts.ts` (+24 -0) 📝 `packages/server/src/services/game/ruleset-sheet-turn.service.ts` (+7 -2) 📝 `packages/server/src/services/game/skill-check-resolution.service.ts` (+351 -11) 📝 `packages/shared/src/features/ruleset-combat/encounter.ts` (+39 -4) _...and 24 more files_ </details> ### 📄 Description ## Linked issue Closes #6400, closes #6405, closes #6407, closes #6411. Translation follow-up: #6401 / #6429. ## Why this change Rulesets could not represent health as wound boxes or apply a purchased ability to a dice-pool check. Updating a ruleset also left existing picked rows without newly added columns. These gaps made the sheet, resource spending and actual roll disagree. ## What changed - Add optional wound tracks with named levels, ordered damage kinds, persistent overflow, healing, rest handling and declared check penalties. The existing sheet renders and edits them; saved dice cards retain the applied penalty. - Let ruleset combat use a wound track for health. Compound damage marks once per blow when configured, using the most severe kind that landed; per-point rules continue counting each point. - Support resource purchases and picked catalog effects on the check itself: rerolls, dice, automatic successes and threshold changes. Free abilities, counter-only abilities and paid abilities use the same resolver. Costs are applied once, with unaffordable or unknown entries refused. - Show picked check effects and costs in the GM's configured sheet summary and the catalog picker. File-backed catalogs receive the same command guidance as inline ones. - Offer missing typed columns during Refresh from ruleset while preserving existing player-owned numbers and switches, including 0 and false. - Require Capability API 1.30 for the new contracts, retaining the integrated API 1.29 combat behavior. Update schema, examples, guides and Unreleased notes. ## Validation Maintainer integration: `pnpm check`, localization validation and `pnpm regression:prompt` passed. All 30 ruleset regression files passed, plus 12 browser cases across desktop Chromium, mobile Chromium and iPhone/WebKit emulation: light/dark wound sheets and Classic/Tactical ruleset fights. Regression proofs reproduce the compound-hit overcount, free-ability refusal, missing prompt/picker descriptions and saved-penalty loss before their fixes. Local CodeRabbit completed the integrated diff. Its missing saved-penalty finding is fixed and covered for summed, pooled and empty-pool records, including invalid values. Its suggestion to replace structured check metadata with prose is declined: this is model context, the object contains validated numeric/enum fields, and retaining that compact representation avoids duplicating the localized client formatter. Required GitHub checks and hosted review remain merge gates. - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - [ ] Manually mark, overflow, heal and reload a wound track; confirm the current penalty and lowest-severity clearing. - [ ] Manually use free and paid catalog abilities on checks, confirm the applied effect and single resource charge, then reload the dice card. - [ ] Manually fight with wound-based health and confirm going down and healing. - [ ] Manually review and decline newly added columns on an existing picked row. Browser coverage uses synthetic data and emulated devices; no physical-device or live-model behavior is claimed. ## Docs and release impact Updated the authoring guide, package API notes, game check/sheet guides, Gravewatch example, generated schema and changelog. Translation work is tracked by #6401 and #6429. No app version bump. - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) [Synthetic wound-sheet screenshots and browser log](https://gist.github.com/SpicyMarinara/49e9a97216b1b854f3d22d2cc4cd0536), covering the real sheet and game-state persistence. Download the HTML to view its embedded images. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:17:10 +07:00
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#7170
No description provided.