mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6689] [MERGED] feat(game): wound tracks of boxes, filled by box, refusing when full, healed by kind, lengthened by a list #7288
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#7288
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/6689
Author: @kolacheee
Created: 9/25/2026
Status: ✅ Merged
Merged: 9/25/2026
Merged by: @kolacheee
Base:
staging← Head:feat/ruleset-wound-boxes📝 Commits (3)
d997659feat(game): wound tracks of boxes, filled by box, refusing when full, healed by kind, lengthened by a listcae8394fix(game): a heal may leave its kind out; the schema says an indexed track refuses when fullaaeab89Merge remote-tracking branch 'origin/staging' into feat/ruleset-wound-boxes📊 Changes
34 files changed (+1668 additions, -207 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+38 -0)📝
docs/examples/rulesets/ember-roads.json(+26 -0)📝
docs/examples/rulesets/gravewatch.json(+21 -1)📝
docs/extending/ruleset.schema.json(+159 -3)📝
docs/extending/writing-rulesets.md(+50 -8)📝
docs/game/party-and-npcs.md(+1 -1)📝
e2e/ruleset-wound-sheet.e2e.ts(+108 -0)📝
packages/client/src/components/game/GameRulesetSheet.tsx(+55 -21)📝
packages/client/src/localization/locales/en.json(+4 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+26 -0)📝
packages/server/src/services/game/gm-prompts.ts(+10 -4)📝
packages/server/src/services/game/skill-check-resolution.service.ts(+1 -1)📝
packages/shared/src/features/ruleset-combat/encounter.ts(+1 -1)📝
packages/shared/src/features/ruleset-combat/resolve.ts(+55 -25)📝
packages/shared/src/features/rulesets/combat-bridge.ts(+6 -3)📝
packages/shared/src/features/rulesets/live-state.ts(+252 -82)📝
packages/shared/src/features/rulesets/sheet-prompt.ts(+2 -1)📝
packages/shared/src/schemas/capability-package.schema.ts(+7 -1)📝
packages/shared/src/schemas/ruleset.schema.ts(+103 -22)...and 14 more files
📄 Description
Linked issue
Closes #6654
Why this change
The author of Marinara-RPG-Extension wrote two of their shipped tabletop systems as
ruleset.jsonfiles. A wound track could only be a fixed list of named levels that fills from the top, upgrades its lightest mark when full and heals lightest first, which left four common rules unsayable:This is slice 4 of the series in the plan doc (§ Gaps a ruleset author found). Slices 1 to 3 were #6663, #6669 and #6682.
What changed
Capability API 1.40 (file keys:
boxes,fill,onFullandextraon a live track, andkindon a rest's restore step). None of it names one game's words.kindsplus exactly one oflevelsorboxes. A box track has as many boxes as its ownmax, which may be a value the sheet works out for each character (never a live one), up to 64. Its penalty isboxes.penalty.tableread at boxes filled or remaining, always, so a table can cost something with nothing marked. Differs from the issue on purpose: the issue put the count inboxes.count, but a track already says how long it is inmax, which has read the sheet per character since 1.37; a second count would have had to agree with it.fill: "indexed"puts a mark on the box the command names or the next free one above, and never moves a mark once it is down; marks are stored by position.onFull: "refuse"refuses a mark with no box free instead of upgrading the lightest one, and refuses the whole command, so three marks with two boxes free land none. An indexed track always refuses. The new refusal reason isno-box. The damage command gained an optionalboxrather than givingamounta second meaning, so every existing caller still means "this many marks".kind. This changes one existing behaviour on purpose: until now a heal's kind was ignored, and every heal carried one (a fight's mending carried the default kind, the combat bridge the lightest). Fights and the bridge now heal with no kind, so their healing still clears any harm; a Game Master's heal that names a kind now clears that kind, which is what it said.extra: { list, countColumn, penaltyColumn }on a track with named levels: each row (at most 16 levels) goes after the last level at least as good, named after it when the penalties match. A hidden list adds nothing. Marks past a track that shrank (a row deleted) are kept as overflow, so harm is not undone by editing the sheet.readRulesetWoundPenaltynow takes the build).per-pointdamage names the box it lands on andper-blowaims at the first. A blow that no box can take puts a standing combatant down, which is what being taken out means in the systems that keep such a track; without it such a fight could never end. Such a combatant is down with boxes still clear, so being down is now read off the combatant rather than off their health: a later blow does not put them down twice, and a heal that clears a mark brings them back.en.json.box="N"is taught only where a track fills by box, and the damage line says a heal clears marks of the kind it names.docs/extending/writing-rulesets.md, including the healing rule, which said a heal always clears the lightest), player page (docs/game/party-and-npcs.md), the regenerated JSON Schema (kindsbesidelevelsorboxes, never both), the plan doc's slice 4 notes, CHANGELOG. Gravewatch gains a Scars list that adds levels to Harm and a "Catch your breath" rest that clears only knocks; Ember Roads gains a Strain track of boxes that fills by box and refuses when full.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run by the agent on
d997659b9(this branch's one commit on staging1cacd68ed), all exit 0:pnpm check,pnpm localization:check,pnpm regression:node(380/380),pnpm ruleset:schema(no diff after regeneration),pnpm smoke:ui(7/7), andpnpm regression:ui e2e/ruleset-wound-sheet.e2e.ts e2e/game-combat-director.e2e.ts --project=desktop-chromium --workers=1(7/7: the wound sheet in light and dark, the new box-track case, and the ruleset fights). Mobile projects were not run locally; the sheet screen's layout did not change beyond the box labels. Local CodeRabbit, six completed passes (three more lost their connection and were re-run): eleven findings, all fixed, the last pass clean. The substantive ones: a box penalty table now runs strictly up like every step table; a combatant taken out with boxes still clear is not put down twice and is revived by a heal; no box is offered for clearing while marks have spilled over; a two-part blow names its box by its whole damage (2 + 2 marks box 4, not boxes 2 and 3); a box track's status always says its count; extra levels stop at the cap.scripts/regressions/game-ruleset-wound-boxes.regression.tscovers every import refusal, box tracks and their table, filling by box (whole or not at all), refusing when full, healing by kind (and overflow first), rests that name a kind, extra levels (position, name, cap, hidden list, a shrunk track's overflow), the penalty reader, the sheet line, the reminder, thebox=attribute, a fight (a box per point, and a hit no box can take) and the 1.40 gate. Thirty-four deliberate breaks were each caught, and each fix CodeRabbit prompted adds a case that fails without it (a blow while down and a mending, a two-part blow, the ascending table).e2e/ruleset-wound-sheet.e2e.tsgains a case for Ember Roads' Strain on the sheet screen: the box clicked is the box marked, Clear one takes the highest, and a full track turns Mark off.Still to verify by hand (not done by the agent):
[sheet: op="damage" track="Strain" kind="strain" amount="1" box="4"]twice: confirm the second is refused and the notice says every box that could take it is marked.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/party-and-npcs.md(carried bydocs-i18n),docs/extending/ruleset.schema.json,docs/examples/rulesets/gravewatch.json,docs/examples/rulesets/ember-roads.json,docs/development/game-rulesets-and-sheets-implementation.md(internal plan),CHANGELOG.md. Translations are batched into one later pass by the maintainer's standing decision, so no per-PR[docs-i18n]issue is opened here.UI evidence (if applicable)
None attached. The new browser case saves a screenshot of the full box track (four marked boxes, Mark turned off, the penalty said in boxes); the manual steps above cover it in both themes and at mobile width.
Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.