[PR #8235] [MERGED] feat(rulesets): fight health on a plain track that fills up (Capability API 1.383) #8199

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8235
Author: @kolacheee
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @kolacheee

Base: staging ← Head: claude/project-thread-o9hpq2


📝 Commits (2)

  • ae6f205 feat(rulesets): fight health on a plain track that fills up (Capability API 1.383)
  • 5e553c2 fix(rulesets): a health track starts at its default, never a start read off the sheet

📊 Changes

13 files changed (+545 additions, -50 deletions)

View changed files

📝 docs/extending/writing-rulesets.md (+8 -2)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+18 -0)
📝 packages/shared/src/features/ruleset-combat/encounter.ts (+7 -6)
📝 packages/shared/src/features/ruleset-combat/resolve.ts (+15 -3)
📝 packages/shared/src/features/rulesets/combat-bridge.ts (+10 -11)
📝 packages/shared/src/features/rulesets/item-use.ts (+9 -2)
📝 packages/shared/src/features/rulesets/live-state.ts (+28 -0)
📝 packages/shared/src/schemas/capability-package.schema.ts (+4 -1)
📝 packages/shared/src/schemas/ruleset.schema.ts (+39 -17)
📝 scripts/regressions/capability-package-lifecycle.regression.ts (+6 -5)
➕ scripts/regressions/game-ruleset-combat-health-track.regression.ts (+398 -0)
📝 scripts/regressions/game-ruleset-combat-wounds.regression.ts (+2 -2)
📝 scripts/regressions/game-ruleset-item-use.regression.ts (+1 -1)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #8234

Why this change

  • Some systems keep health as a number that fills UP to a threshold. Genesys Wounds runs from 0 to the Wound Threshold, and a character is out when it is full. Until now combat.health took only a pool that counts down or a wound track with levels, so { "track": "wounds" } on such a track was refused, and a ruleset had to fake a "wounds left" pool.

What changed

  • combat.health and battle.health may name a plain live track (no levels or boxes) that fills from its min to its max (Capability API 1.383).
    • The fight reads it as the room left above its value, the same way a wound track is read as levels left. So "down" is still "at zero", and the dying, recap and screen rules are unchanged.
    • Damage adds its points (after soak), held at the max. A heal takes its points off, in a fight and when an item is used outside one.
    • The battle bridge carries a share of the track and writes points back.
    • The max may be a value the sheet works out, such as the Wound Threshold.
  • Refused at import:
    • A track that starts full.
    • A track with no room above its floor.
    • damageKinds (a plain track keeps no kinds).
    • Temporary points, which were already refused for wound tracks.
  • A packaged ruleset that uses it must declare capabilityApi 1.383 or newer.
  • Docs: writing-rulesets.md covers it under health and item heals.
  • New regression game-ruleset-combat-health-track. Existing wound-track and item-use expectations were updated for the refusal wording ("Health is the track …").

Validation

  • Ruleset lane: node scripts/run-regressions.mjs --filter ruleset 283/283
  • Combat lane: --filter combat 189/189
  • Capability package lane: --filter capability-package 5/5
  • Server and client typecheck, prettier
  • 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

  • Engine and import change only, covered by the regressions above. No UI change.

Docs and release impact

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

UI evidence (if applicable)

  • None (no UI change).

🔄 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/8235 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `claude/project-thread-o9hpq2` --- ### 📝 Commits (2) - [`ae6f205`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ae6f2055c24599292ce59e5df6d1ac2a474a6406) feat(rulesets): fight health on a plain track that fills up (Capability API 1.383) - [`5e553c2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5e553c23a5f739132060017555cdbc670596ddef) fix(rulesets): a health track starts at its default, never a start read off the sheet ### 📊 Changes **13 files changed** (+545 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `docs/extending/writing-rulesets.md` (+8 -2) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+18 -0) 📝 `packages/shared/src/features/ruleset-combat/encounter.ts` (+7 -6) 📝 `packages/shared/src/features/ruleset-combat/resolve.ts` (+15 -3) 📝 `packages/shared/src/features/rulesets/combat-bridge.ts` (+10 -11) 📝 `packages/shared/src/features/rulesets/item-use.ts` (+9 -2) 📝 `packages/shared/src/features/rulesets/live-state.ts` (+28 -0) 📝 `packages/shared/src/schemas/capability-package.schema.ts` (+4 -1) 📝 `packages/shared/src/schemas/ruleset.schema.ts` (+39 -17) 📝 `scripts/regressions/capability-package-lifecycle.regression.ts` (+6 -5) ➕ `scripts/regressions/game-ruleset-combat-health-track.regression.ts` (+398 -0) 📝 `scripts/regressions/game-ruleset-combat-wounds.regression.ts` (+2 -2) 📝 `scripts/regressions/game-ruleset-item-use.regression.ts` (+1 -1) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #8234 ## Why this change - Some systems keep health as a number that fills UP to a threshold. Genesys Wounds runs from 0 to the Wound Threshold, and a character is out when it is full. Until now `combat.health` took only a pool that counts down or a wound track with levels, so `{ "track": "wounds" }` on such a track was refused, and a ruleset had to fake a "wounds left" pool. ## What changed - `combat.health` and `battle.health` may name a plain live track (no `levels` or `boxes`) that fills from its `min` to its `max` (Capability API 1.383). - The fight reads it as the room left above its value, the same way a wound track is read as levels left. So "down" is still "at zero", and the dying, recap and screen rules are unchanged. - Damage adds its points (after soak), held at the `max`. A heal takes its points off, in a fight and when an item is used outside one. - The `battle` bridge carries a share of the track and writes points back. - The `max` may be a value the sheet works out, such as the Wound Threshold. - Refused at import: - A track that starts full. - A track with no room above its floor. - `damageKinds` (a plain track keeps no kinds). - Temporary points, which were already refused for wound tracks. - A packaged ruleset that uses it must declare capabilityApi 1.383 or newer. - Docs: `writing-rulesets.md` covers it under `health` and item heals. - New regression `game-ruleset-combat-health-track`. Existing wound-track and item-use expectations were updated for the refusal wording ("Health is the track …"). ## Validation - [x] Ruleset lane: `node scripts/run-regressions.mjs --filter ruleset` 283/283 - [x] Combat lane: `--filter combat` 189/189 - [x] Capability package lane: `--filter capability-package` 5/5 - [x] Server and client typecheck, prettier - [ ] `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 - Engine and import change only, covered by the regressions above. No UI change. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README) as needed: `docs/extending/writing-rulesets.md` - [x] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened: noted on #7512 - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - None (no UI change). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-25 04:04:39 +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#8199
No description provided.