[PR #7587] [MERGED] Rulesets: Game Master combat rules for 5e fights, part 2a #7814

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

📋 Pull Request Information

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

Base: staging ← Head: feat/ruleset-gm-rules-2


📝 Commits (10+)

  • 43440da Rulesets 1.177: pushes, lines and cones carried and turned, hard going toward the caster, senses that add
  • e488781 Rulesets 1.178: zones that go off later or burn away
  • f66f96c Rulesets 1.179: creature actions that push, a line's width on an item's use
  • 77d6eb2 Rulesets 1.180: what a creature is, read further
  • d33d16d Rulesets 1.179 fix: a bestiary creature keeps its push
  • 348b07f Rulesets 1.181: breaths that recharge together, and charges
  • a0a276e Rulesets 1.181: the combat log writes a charge
  • d64bc77 Rulesets 1.182: weapons that know what they hit
  • 25cc63f Rulesets 1.183: 160 conditions, and changes narrowed to an ability
  • 592928e Rulesets 1.183: the damage-modifier test lets attacks take an ability

📊 Changes

112 files changed (+62524 additions, -12417 deletions)

View changed files

📝 docs/extending/ruleset.schema.json (+28139 -11622)
📝 docs/extending/writing-rulesets.md (+121 -2)
📝 packages/client/src/components/game/DirectedCombatUI.tsx (+9 -0)
📝 packages/client/src/components/game/GameRulesetSheet.tsx (+1 -0)
📝 packages/client/src/components/game/GameSurface.tsx (+3 -0)
📝 packages/client/src/components/game/RulesetCombatBoard.tsx (+55 -9)
📝 packages/client/src/components/game/RulesetCombatMenu.tsx (+362 -10)
📝 packages/client/src/components/game/RulesetCombatStatus.tsx (+15 -10)
📝 packages/client/src/components/game/RulesetItemPicker.tsx (+1 -0)
📝 packages/client/src/lib/ruleset-combat-board.ts (+38 -4)
📝 packages/client/src/lib/ruleset-combat-log.ts (+151 -1)
📝 packages/client/src/lib/ruleset-combat-menu.ts (+119 -5)
📝 packages/client/src/localization/locales/en.json (+87 -0)
📝 packages/server/src/routes/combat-director.routes.ts (+14 -0)
📝 packages/server/src/routes/encounter.routes.ts (+5 -0)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+1268 -0)
📝 packages/server/src/services/game/ruleset-combat-director.service.ts (+176 -20)
📝 packages/server/src/services/game/ruleset-sheet-turn.service.ts (+8 -1)
📝 packages/shared/src/features/combat-director.ts (+23 -0)
📝 packages/shared/src/features/ruleset-combat/ammo.ts (+137 -3)

...and 80 more files

📄 Description

Linked issue

Part of #7469

This follows #7584 (merged), the first part of the Game Master's ruleset combat rules. This branch is up to date with staging and holds the second part, first half: Capability API 1.182-1.204 and 1.235-1.270. 1.205-1.234 stay reserved for later rules work, so the supported version is 1.270. The second half (1.271-1.314), maps and the remaining work follow this one at a time. The second part is split in two to stay under the review tool's file limit.

Why this change

  • 5e monsters and magic items still had no way to say much of what they do: large creatures that fill several cells, auras, gazes, recharging and charged actions, pushes, health pools that pass over some creatures, or walls in sections.
  • Attacks lacked the rules around a blow: what is added once it hits, rerolls and dice taken off, half damage on a miss, more dice on a critical, and the attack action taken with a held weapon.
  • Conditions could not change a creature's size, say what its holder does with its turn, lower a maximum, keep surprise off, or end with another put on in their place.

What changed

  • Creatures: creatures can fill more than one cell (Capability API 1.194), and conditions can make their holder bigger or smaller (1.195). Creature kinds are read further (1.185), and a creature type can be chosen as it is used (1.270). Creature actions can push (1.184), recharge together or charge up (1.186), be used by ability (1.189), and carry qualities (1.262) and endings (1.261). A stat block can hold things (1.267).
  • Areas, zones and walls: senses add to their holder's own range, and lines and cones can be carried and turned (1.182). Zones can go off later or burn away (1.183) and deal their own damage type at their triggers (1.198). Walls can come in sections (1.200), and a broken section moves a step on (1.201). Areas can grow with their cost, and targets can be required near each other (1.267).
  • Weapons and blows: weapons can be matched by what they hit, slay, drain and add thrown extras or once-a-turn wounds (1.187). Weapon modes can have their own reach, clauses, bolt or charges (1.190). Weapons can pass resistance, slays can frighten instead, and an oathbow can name other weapons (1.192). A blow's own dice can be thrown more times (1.197), and blows can lower the health maximum (1.203).
  • Attacks: attack rows, granted strikes and the attack action (1.242), held weapons matched by name or tags and rows every sheet has (1.244), and the attack action taken with a held weapon matched by tags (1.246). Opportunity attacks are held where they hit, like an attack on a turn (1.243). Attacks can be narrowed to a kind of blow, with more dice on a critical (1.247), and answered from one budget, one answer of a group per hit (1.248). A die can be added once a roll falls short, and a failed roll rolled again or turned (1.249). Dice can come off a roll that hit, and a half save can be evaded (1.250). A miss can deal half (1.255), and an item can deal half on a miss (1.257). Metamagic can be picked as it is used (1.254).
  • Conditions: more conditions, attacks and checks can be narrowed by ability (1.188). Wounds can stack and harm, and creatures can have sworn enemies (1.189). Heals and conditions can be kept off by source, with ability floors and saves against actions (1.191). Conditions can end with another put on with them (1.202), give actions, be ended by uses, be cured by who put them on, and send their holder away (1.236). Conditions can keep surprise off (1.237), lower maximums (1.235, 1.260), come in kinds with counted saves (1.258), be kept on through a fight (1.263), and say what their holder does with their turn (1.264). Dropping, keeping out, a turn freed when stuck, saves out of sight and destroying by tier (1.266).
  • Health: health pools, health ceilings and killing outright (1.196), and a pool can pass over some creatures (1.199). Damage can leave some health, and targets can be chosen by what they hold (1.235). A failed save can drop to 0, and harm can come as a condition ends (1.245).
  • Turns and initiative: a second turn in the first round (1.238), a grant held to melee strikes (1.239), initiative thrown twice (1.240), and answers to one's own hit, added to it, with capped higher costs (1.241).
  • Uses, pools and cures: a cure can do one of its cures (1.204). Several uses can be spent at once (1.245), and a heal can spend as many uses as its user chooses (1.251). An entry can give back to a pool or fill a slot past its maximum (1.252), and change how another entry is used (1.253). Rescues of a holder's own, entries never used on their user (1.256), narrowed or budgeted rescues and dice off checks and damage (1.257), and a rescue on an item's use (1.259). Item uses can read off the holder's sheet and spend more charges for more (1.269).
  • Auras, sight and saves: contests against a fixed number, on allies, the wounded or the dying (1.193). Auras (1.263) can be heard, harm or ask saves, with save changes against what a catalog casts (1.265). Senses any one of which serves (1.267). Auras by target kind or on whoever holds their holder, gaze margins and averting, and saves leaning on sight (1.268). Auras by kind or by sight, and saves from far away (1.270).
  • docs/extending/writing-rulesets.md covers all of it, and docs/extending/ruleset.schema.json is regenerated.

Validation

  • 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
  • Regression lanes run locally on this head: capability 19/19, package 7/7, creature 8/8, game-ruleset 161/161, inventory 4/4, avatar 14/14.

Manual verification notes

  • Each feature has its own regression under scripts/regressions/game-ruleset-combat-*.regression.ts that drives a fight through the shared resolver, and checks the install gate at its version.
  • Not checked by a person yet: these rules in a live game with a full 5e ruleset.

Changed test expectations

No maintainer asked for these; each follows a change in this PR, and the check it replaces is kept:

  • Supported Capability API 1.181 to 1.270, and the unsupported fixture 1.182 to 1.271 (capability-package-lifecycle): this PR's versions run to 1.270.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)
  • docs/extending/writing-rulesets.md changed and docs/extending/ruleset.schema.json is regenerated. The translations are tracked on #7512.

UI evidence (if applicable)

No screenshots attached. The combat board, menu, status and log changes are covered by the regressions above.

Summary by CodeRabbit

  • New Features
    • Expanded ruleset combat with selectable use amounts and alterations, charge spending, and options to spare allies or heighten effects on selected targets.
    • Added support for surprised combatants, multi-cell creatures, destructible wall sections, and actions such as turning zones, picking up items, and averting gaze.
    • Expanded combat mechanics for conditions, auras, rescues, diseases, weapon effects, and extra turns.
    • Improved combat status, event messages, and board displays with additional combat details.
    • Expanded ruleset documentation and editor validation for newer combat capabilities.
  • Bug Fixes
    • Improved handling of healing restrictions, health recovery, and combatant positioning and targeting across occupied cells.

🔄 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/7587 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `feat/ruleset-gm-rules-2` --- ### 📝 Commits (10+) - [`43440da`](https://github.com/Pasta-Devs/Marinara-Engine/commit/43440daf0ad27c8f1477ff91bb376107826aa20f) Rulesets 1.177: pushes, lines and cones carried and turned, hard going toward the caster, senses that add - [`e488781`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e488781a84200196e90fcd69aaea15642356485b) Rulesets 1.178: zones that go off later or burn away - [`f66f96c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f66f96c41ea35b448105fa9200b90c7b078340b7) Rulesets 1.179: creature actions that push, a line's width on an item's use - [`77d6eb2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/77d6eb22e7c449a572da386976e8564446701068) Rulesets 1.180: what a creature is, read further - [`d33d16d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d33d16d749b72d7df7136fab9f7be72345693bc2) Rulesets 1.179 fix: a bestiary creature keeps its push - [`348b07f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/348b07f598d2ac9c607a01662063e7a50b2f2a08) Rulesets 1.181: breaths that recharge together, and charges - [`a0a276e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a0a276e5491f8ad62c1e12e21ab5e7eb6b60cd06) Rulesets 1.181: the combat log writes a charge - [`d64bc77`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d64bc77871fb1e8f5c43bf370c8ecb68e0adf2bb) Rulesets 1.182: weapons that know what they hit - [`25cc63f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/25cc63f13cd9e1048a46fa2e32071de2cb11ec9a) Rulesets 1.183: 160 conditions, and changes narrowed to an ability - [`592928e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/592928ea2b53472569a805a4783363726034bcd5) Rulesets 1.183: the damage-modifier test lets attacks take an ability ### 📊 Changes **112 files changed** (+62524 additions, -12417 deletions) <details> <summary>View changed files</summary> 📝 `docs/extending/ruleset.schema.json` (+28139 -11622) 📝 `docs/extending/writing-rulesets.md` (+121 -2) 📝 `packages/client/src/components/game/DirectedCombatUI.tsx` (+9 -0) 📝 `packages/client/src/components/game/GameRulesetSheet.tsx` (+1 -0) 📝 `packages/client/src/components/game/GameSurface.tsx` (+3 -0) 📝 `packages/client/src/components/game/RulesetCombatBoard.tsx` (+55 -9) 📝 `packages/client/src/components/game/RulesetCombatMenu.tsx` (+362 -10) 📝 `packages/client/src/components/game/RulesetCombatStatus.tsx` (+15 -10) 📝 `packages/client/src/components/game/RulesetItemPicker.tsx` (+1 -0) 📝 `packages/client/src/lib/ruleset-combat-board.ts` (+38 -4) 📝 `packages/client/src/lib/ruleset-combat-log.ts` (+151 -1) 📝 `packages/client/src/lib/ruleset-combat-menu.ts` (+119 -5) 📝 `packages/client/src/localization/locales/en.json` (+87 -0) 📝 `packages/server/src/routes/combat-director.routes.ts` (+14 -0) 📝 `packages/server/src/routes/encounter.routes.ts` (+5 -0) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+1268 -0) 📝 `packages/server/src/services/game/ruleset-combat-director.service.ts` (+176 -20) 📝 `packages/server/src/services/game/ruleset-sheet-turn.service.ts` (+8 -1) 📝 `packages/shared/src/features/combat-director.ts` (+23 -0) 📝 `packages/shared/src/features/ruleset-combat/ammo.ts` (+137 -3) _...and 80 more files_ </details> ### 📄 Description ## Linked issue Part of #7469 This follows #7584 (merged), the first part of the Game Master's ruleset combat rules. This branch is up to date with staging and holds the second part, first half: Capability API 1.182-1.204 and 1.235-1.270. 1.205-1.234 stay reserved for later rules work, so the supported version is 1.270. The second half (1.271-1.314), maps and the remaining work follow this one at a time. The second part is split in two to stay under the review tool's file limit. ## Why this change - 5e monsters and magic items still had no way to say much of what they do: large creatures that fill several cells, auras, gazes, recharging and charged actions, pushes, health pools that pass over some creatures, or walls in sections. - Attacks lacked the rules around a blow: what is added once it hits, rerolls and dice taken off, half damage on a miss, more dice on a critical, and the attack action taken with a held weapon. - Conditions could not change a creature's size, say what its holder does with its turn, lower a maximum, keep surprise off, or end with another put on in their place. ## What changed - **Creatures:** creatures can fill more than one cell (Capability API 1.194), and conditions can make their holder bigger or smaller (1.195). Creature kinds are read further (1.185), and a creature type can be chosen as it is used (1.270). Creature actions can push (1.184), recharge together or charge up (1.186), be used by ability (1.189), and carry qualities (1.262) and endings (1.261). A stat block can hold things (1.267). - **Areas, zones and walls:** senses add to their holder's own range, and lines and cones can be carried and turned (1.182). Zones can go off later or burn away (1.183) and deal their own damage type at their triggers (1.198). Walls can come in sections (1.200), and a broken section moves a step on (1.201). Areas can grow with their cost, and targets can be required near each other (1.267). - **Weapons and blows:** weapons can be matched by what they hit, slay, drain and add thrown extras or once-a-turn wounds (1.187). Weapon modes can have their own reach, clauses, bolt or charges (1.190). Weapons can pass resistance, slays can frighten instead, and an oathbow can name other weapons (1.192). A blow's own dice can be thrown more times (1.197), and blows can lower the health maximum (1.203). - **Attacks:** attack rows, granted strikes and the attack action (1.242), held weapons matched by name or tags and rows every sheet has (1.244), and the attack action taken with a held weapon matched by tags (1.246). Opportunity attacks are held where they hit, like an attack on a turn (1.243). Attacks can be narrowed to a kind of blow, with more dice on a critical (1.247), and answered from one budget, one answer of a group per hit (1.248). A die can be added once a roll falls short, and a failed roll rolled again or turned (1.249). Dice can come off a roll that hit, and a half save can be evaded (1.250). A miss can deal half (1.255), and an item can deal half on a miss (1.257). Metamagic can be picked as it is used (1.254). - **Conditions:** more conditions, attacks and checks can be narrowed by ability (1.188). Wounds can stack and harm, and creatures can have sworn enemies (1.189). Heals and conditions can be kept off by source, with ability floors and saves against actions (1.191). Conditions can end with another put on with them (1.202), give actions, be ended by uses, be cured by who put them on, and send their holder away (1.236). Conditions can keep surprise off (1.237), lower maximums (1.235, 1.260), come in kinds with counted saves (1.258), be kept on through a fight (1.263), and say what their holder does with their turn (1.264). Dropping, keeping out, a turn freed when stuck, saves out of sight and destroying by tier (1.266). - **Health:** health pools, health ceilings and killing outright (1.196), and a pool can pass over some creatures (1.199). Damage can leave some health, and targets can be chosen by what they hold (1.235). A failed save can drop to 0, and harm can come as a condition ends (1.245). - **Turns and initiative:** a second turn in the first round (1.238), a grant held to melee strikes (1.239), initiative thrown twice (1.240), and answers to one's own hit, added to it, with capped higher costs (1.241). - **Uses, pools and cures:** a cure can do one of its cures (1.204). Several uses can be spent at once (1.245), and a heal can spend as many uses as its user chooses (1.251). An entry can give back to a pool or fill a slot past its maximum (1.252), and change how another entry is used (1.253). Rescues of a holder's own, entries never used on their user (1.256), narrowed or budgeted rescues and dice off checks and damage (1.257), and a rescue on an item's use (1.259). Item uses can read off the holder's sheet and spend more charges for more (1.269). - **Auras, sight and saves:** contests against a fixed number, on allies, the wounded or the dying (1.193). Auras (1.263) can be heard, harm or ask saves, with save changes against what a catalog casts (1.265). Senses any one of which serves (1.267). Auras by target kind or on whoever holds their holder, gaze margins and averting, and saves leaning on sight (1.268). Auras by kind or by sight, and saves from far away (1.270). - `docs/extending/writing-rulesets.md` covers all of it, and `docs/extending/ruleset.schema.json` is regenerated. ## Validation - [x] `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` - Regression lanes run locally on this head: capability 19/19, package 7/7, creature 8/8, game-ruleset 161/161, inventory 4/4, avatar 14/14. ### Manual verification notes - Each feature has its own regression under `scripts/regressions/game-ruleset-combat-*.regression.ts` that drives a fight through the shared resolver, and checks the install gate at its version. - Not checked by a person yet: these rules in a live game with a full 5e ruleset. ### Changed test expectations No maintainer asked for these; each follows a change in this PR, and the check it replaces is kept: - Supported Capability API 1.181 to 1.270, and the unsupported fixture 1.182 to 1.271 (`capability-package-lifecycle`): this PR's versions run to 1.270. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README) as needed - [x] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) - `docs/extending/writing-rulesets.md` changed and `docs/extending/ruleset.schema.json` is regenerated. The translations are tracked on #7512. ## UI evidence (if applicable) No screenshots attached. The combat board, menu, status and log changes are covered by the regressions above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Expanded ruleset combat with selectable use amounts and alterations, charge spending, and options to spare allies or heighten effects on selected targets. * Added support for surprised combatants, multi-cell creatures, destructible wall sections, and actions such as turning zones, picking up items, and averting gaze. * Expanded combat mechanics for conditions, auras, rescues, diseases, weapon effects, and extra turns. * Improved combat status, event messages, and board displays with additional combat details. * Expanded ruleset documentation and editor validation for newer combat capabilities. * **Bug Fixes** * Improved handling of healing restrictions, health recovery, and combatant positioning and targeting across occupied cells. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:07:45 +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#7814
No description provided.