[PR #6397] [MERGED] feat(game): a ruleset fight can be fought on a board: positions, reach and range, areas, cover and opportunity strikes (real combat C4a) #7165

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

📋 Pull Request Information

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

Base: staging ← Head: feat/ruleset-combat-grid


📝 Commits (10+)

  • d62170f feat(rulesets): a combat block may say what a cell is worth, and the menu measures it
  • b54af61 feat(rulesets): a ruleset fight resolves movement, reach, ranges, areas, cover and opportunity strikes
  • 97da4d3 feat(game): a ruleset fight may be fought on the tactical engine's own board
  • 0daece6 feat(rulesets): Capability API 1.28, and both examples say what a cell is worth
  • 1255ea1 test(rulesets): the install gate pins Capability API 1.28
  • 2a4a979 test(rulesets): hand-drawn boards pin movement, reach, ranges, shapes, cover and opportunity strikes
  • 61935b2 test(game): the director and its routes drive a positioned ruleset fight
  • 4533f32 docs(rulesets): the Positions section, what a ruleset fight on a board does, and Capability API 1.28
  • 579eb42 fix(game): a positioned fight's four new log lines, and the API pins move to 1.28
  • 19c8401 fix(game): the picker judges walking against standing still over one list, and wastes no search on a cell it will not walk twice from

📊 Changes

38 files changed (+5282 additions, -117 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 docs/development/game-combat-rulesets-implementation.md (+6 -2)
📝 docs/development/game-rulesets-and-sheets-implementation.md (+49 -2)
📝 docs/development/optional-agent-packages.md (+30 -0)
📝 docs/development/ruleset-5e-2014.example.json (+45 -3)
📝 docs/examples/rulesets/ember-roads.json (+13 -2)
📝 docs/extending/ruleset.schema.json (+284 -4)
📝 docs/extending/writing-rulesets.md (+152 -15)
📝 docs/game/combat.md (+10 -0)
📝 packages/client/src/lib/ruleset-combat-log.ts (+27 -0)
📝 packages/client/src/localization/locales/en.json (+6 -0)
📝 packages/server/src/routes/combat-director.routes.ts (+68 -0)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+41 -0)
📝 packages/server/src/services/game/combat-boss.service.ts (+39 -0)
📝 packages/server/src/services/game/ruleset-combat-director.service.ts (+464 -18)
📝 packages/shared/src/features/combat-director.ts (+28 -3)
📝 packages/shared/src/features/ruleset-combat/creatures.ts (+1 -0)
📝 packages/shared/src/features/ruleset-combat/encounter.ts (+180 -4)
➕ packages/shared/src/features/ruleset-combat/grid.ts (+400 -0)
📝 packages/shared/src/features/ruleset-combat/index.ts (+37 -4)

...and 18 more files

📄 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

Part of #6361 (real ruleset combat, slice C4a: positions, the shared and server half; it does not close the issue) and of #6314. Builds on #6386 (the fight on screen, merged).

Why this change

  • A fight resolved by a ruleset's own rules is theatre of the mind today: anybody can be pointed at anybody. Speed, reach, range and the shape of an area have been carried by the format since the first combat slice and read by nothing. This slice reads them, so a fight can be played on a grid the way the systems this is for are played.
  • The Engine must not know what a cell is worth, or what feet are. So the ruleset says it: a new combat.distance { label, perCell } (5 ft in the 5e example, 2 paces in Ember Roads) is what makes a fight positionable, and every other distance in the block is in that unit.
  • The board itself is the next PR. Until it lands, a positioned fight is reachable only through the director's routes, and the screen keeps playing fights without positions exactly as it does now.

What changed

  • Format, Capability API 1.28, all additive and optional: combat.distance, combat.ranged { long, adjacentFoe } (what shooting past normal range, or with a foe beside you, does), combat.cover { bonus }, combat.opportunity { budget }, weapon reach and range { normal, long? } on combat.attacks[] (a column of the list or a constant; a column reading 0 on a row means that row has no such distance, which is how a sword sits beside a thrown axe), a creature action's range as a number or { normal, long? }, and a creature action's area { shape, size, friendlyFire? }, so a breath weapon is a real cone on a board and still catches targetCount of them without one. Cross-checks: a cell is worth more than 0; the opportunity budget is declared; reach and range columns exist and are numbers; long is at least normal; and anything measured in cells is refused in a block that declares no distance.
  • The grid is the tactical engine's own: the same generator, terrain table, formations, board sizes and battlefield brief. No second generator. The ruleset fight keeps its OWN state and resolver, because the tactical engine's units and arithmetic are the Engine's stats.
  • How it plays (ruleset-combat/grid.ts, pure, with hand-drawn boards in the regression): eight neighbours at one cell each and distance as the larger axis difference; entering a cell costs its terrain's move cost; nothing solid is entered, no corner is cut between two solid cells, a friend may be walked past, nobody may be stopped on, an enemy is a wall. Movement is a budget in cells, refilled each turn from economy.movement or a creature's speed, spendable before, between and after actions. dash adds it again, speed-zero removes it, standing up costs half. Targets are filtered by reach, range and line of sight FROM WHERE THE ACTOR STANDS, by the one rule the menu and the resolution share. Areas are real shapes (burst, cone, line) that stop at anything solid and catch everybody in their cells unless the entry says its own side is spared; targetCount says nothing for an area on a board. Cover is the ground under the target (the terrain table's own defense bonus above 0) and adds the ruleset's cover.bonus to the defense an attack is rolled against, with an event saying so. The three distance condition effects are finally read: adjacent is one cell, far is anything beyond.
  • Opportunity strikes are data: a ruleset that declares opportunity gets one when somebody leaves the reach of a standing enemy who can act, holds that budget and has a melee attack; it is resolved on the path, before the mover leaves the cell, and a strike that drops the mover ends the walk there. disengage prevents it. It is automatic for everybody in this slice; choosing is a reaction window, which is a later slice. Ember Roads declares none, and has none.
  • The server: a fight is positioned when the ruleset declares distance AND /start asks for it (positioned: true, which the client will send for the Tactical preference). The board comes from the path the Tactical style already uses. The view gains the grid, each combatant's cell and movement left, the walk option with every reachable cell, its cost, its path and whom it provokes, and for an area the cells it may be aimed at with who each aim would catch (capped). The command gains to and at. The picker walks: it gets up first if it is on the ground, reads the cells it may walk to off its own menu, scores what it could do from the 48 of them nearest an opponent, takes a penalty for each strike the walk would provoke, stays put when it can already do its best, and otherwise closes the distance. The Game Master's boss window lists positioned candidates too, bounded, with positions and distances in the prompt and never the seed or future dice.
  • A swing, a shot, and something that is both: a row carrying both a reach and a range is a thrown weapon, so it is a swing inside its reach (no penalty for the foe holding it, and it may be used on somebody walking past) and a shot beyond it. An ability whose range is 0 is self or touch: one cell of reach, never a shot.
  • Nothing that works today changes: a fight without a board behaves byte for byte as before, and the regression compares whole event logs to prove it.
  • Examples: the 5e example declares its distance, ranged rules, cover and opportunity strikes, and its attacks list gains reach and range columns; Ember Roads declares its distance and a constant movement and nothing else, which proves none of the rest is required.
  • Docs: the authoring guide (a Positions section, with each shape drawn), docs/game/combat.md, docs/development/optional-agent-packages.md (1.28), the plan, the combat handoff's status header, the generated schema, CHANGELOG.md.
  • Regressions: game-ruleset-combat-grid (new, pure) and positioned cases in ruleset-combat-director and ruleset-combat-director-route. The client gains only the log lines for the four new events, because its drift guard asks for a line per event.

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

Manual verification notes

Commands run locally by the agent: pnpm check (exit 0), which includes pnpm localization:check, lint with the client regression lane's typecheck, and the e2e typecheck; the full node regression lane (pnpm regression:node, 333 of 333 on three complete runs; on the last one, 332 of 333, the odd one out being image-dimension-limit.regression.ts, which prints that it passed and then sometimes does not exit on this machine (the pino-pretty worker lifetime that #6359 worked around for the storage shutdown regression; this PR does not touch it, it passed on its own straight afterwards, and CI's node lane has passed it on every ruleset PR)); and the new regression. Eleven complete local CodeRabbit sweeps were run before opening (4, 4, 1, 3, 1, 3, 2, 2, 1, 2 and 0 findings). What the sweeps changed, none of it cosmetic: the burst, cone and aim loops ran over the DECLARED size and range (a ruleset may declare ten thousand units, which would have let one catalog entry stall a server), and are now scanned over the board only, with a hard ceiling; the walk and stand-up options carry ids no action can hold (move:walk, move:stand), because a creature may really have an action called "move"; one walk draws one strike from anybody, matching the preview; a strike made in passing spends its own use and recharge, and a creature with nothing left to strike with threatens nobody (the case fails against the old code); an area that MENDS lands only on the side it was written for; the preview and the resolution ask one shared question about who a step provokes instead of two copies of it; a terrain word the Engine does not know costs an ordinary step instead of throwing; and the published JSON Schema asks for distance beside anything measured in cells. The last of them were about how opponents PLAY, and each came with a regression that fails against the old code: the picker worked out for itself where it could walk instead of reading its own menu, so a creature knocked down chose a walk the rules refuse and lost its turn to the refusal; it scored only the cells nearest ITSELF, so a fast creature far from its target never found the cell it could strike from; and it never stood up at all, so one knocked down out of reach would have lain there for the rest of the fight. It now reads its walk off the menu, looks at the cells nearest an opponent first, and gets up before anything else. Since opening, CodeRabbit's first review found three things, all fixed with regressions that fail against the old code: an ability whose range is 0 became a one cell SHOT, so a touch spell took the penalty for a foe standing beside the caster (it is now a reach, and the same hole on a creature is fixed too); the loader accepted a saved fight with two standing combatants on one cell or somebody inside a wall, which would have made every distance on that board wrong; and each 1.28 key in the install-gate case set a distance first, so only distance was actually being proven. Chasing those turned up three more of my own: an opponent with nobody in reach spent its action on a dodge nobody was swinging at instead of sprinting closer; a thrown weapon was read as a shot in its owner's hand; and a creature could not say the shape its breath lands in at all, which flattened every printed cone and line to a number of targets. Declined, with the reason: requiring distance whenever a CREATURE action carries reach or range. Those have been legal, carried data since Capability API 1.27, and the shipped 5e package has them with no distance, so requiring it would refuse an installed package; only what 1.28 adds needs a cell size.

There is no new screen in this slice, so there is nothing to click: the client menu drops option kinds it does not know, which is why the walk never appears until the board PR. Not verified: the boss prompt on a positioned fight against a live provider (its candidates and positions are checked structurally); a very large board with a long-range area (the scans are bounded to the board and the picker to 48 cells, and the eight-fight director lane runs in about 2.5 seconds).

Still to verify by hand:

  • Manually confirm a Classic and a Tactical directed battle, and a ruleset fight without positions, run exactly as before.
  • Manually read the Positions section of the authoring guide against the 5e rules for movement, reach, ranges, areas, cover and opportunity attacks; the ceilings (no three-quarter cover, no elevation, no chosen path around a threat except by walking in two steps) are listed there.

Docs and release impact

  • 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 (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

Docs touched: CHANGELOG.md, docs/extending/writing-rulesets.md, docs/game/combat.md, docs/development/optional-agent-packages.md, docs/development/game-combat-rulesets-implementation.md, the plan, both example rulesets and the generated schema. The [docs-i18n] follow-up for the combat slices is batched into one issue for the whole arc, #6401, which this slice's pages are listed in.

UI evidence (if applicable)

None: this slice has no new UI.

Summary by CodeRabbit

  • New Features

    • Added ruleset-defined tactical combat with positioning, movement, reach, ranges, areas, line of sight, cover, and opportunity attacks.
    • NPCs can select legal movement and actions based on battlefield conditions.
    • Combat logs now report movement, area effects, cover, and opportunity attacks.
    • Added tactical distance and attack-range support to example rulesets.
    • Classic combat and rulesets without distance data retain their existing behavior.
  • Documentation

    • Expanded ruleset authoring guidance and schemas for tactical combat configuration.
    • Board rendering remains unavailable; tactical positioning is currently API-only.
    • Tactical combat ruleset features now require Capability API 1.28.

🔄 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/6397 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/20/2026 **Status:** ✅ Merged **Merged:** 9/20/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `feat/ruleset-combat-grid` --- ### 📝 Commits (10+) - [`d62170f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d62170f025f8c4110d4a4f7b4f6ef41c903c9db8) feat(rulesets): a combat block may say what a cell is worth, and the menu measures it - [`b54af61`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b54af616c292c482a4a5348db57280fcf36c0f8f) feat(rulesets): a ruleset fight resolves movement, reach, ranges, areas, cover and opportunity strikes - [`97da4d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/97da4d3c57ce2229aa9593655b42f35cbed3da7e) feat(game): a ruleset fight may be fought on the tactical engine's own board - [`0daece6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0daece600bc4aa616527d3a72d646b952775f764) feat(rulesets): Capability API 1.28, and both examples say what a cell is worth - [`1255ea1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1255ea19c2553058e9e82ce0e02b3ad18a6eca6d) test(rulesets): the install gate pins Capability API 1.28 - [`2a4a979`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2a4a9795ff63f899870a8c7a2423fd627f0344e8) test(rulesets): hand-drawn boards pin movement, reach, ranges, shapes, cover and opportunity strikes - [`61935b2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/61935b2126aab692e864ce396d5690472c25e66d) test(game): the director and its routes drive a positioned ruleset fight - [`4533f32`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4533f32a90695024c7c0f76978a910958095cc1d) docs(rulesets): the Positions section, what a ruleset fight on a board does, and Capability API 1.28 - [`579eb42`](https://github.com/Pasta-Devs/Marinara-Engine/commit/579eb42bfc773b9cbb7f847949d9653ff5bd189e) fix(game): a positioned fight's four new log lines, and the API pins move to 1.28 - [`19c8401`](https://github.com/Pasta-Devs/Marinara-Engine/commit/19c8401bdeb02a88b51bb278a057fc704b8a4901) fix(game): the picker judges walking against standing still over one list, and wastes no search on a cell it will not walk twice from ### 📊 Changes **38 files changed** (+5282 additions, -117 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `docs/development/game-combat-rulesets-implementation.md` (+6 -2) 📝 `docs/development/game-rulesets-and-sheets-implementation.md` (+49 -2) 📝 `docs/development/optional-agent-packages.md` (+30 -0) 📝 `docs/development/ruleset-5e-2014.example.json` (+45 -3) 📝 `docs/examples/rulesets/ember-roads.json` (+13 -2) 📝 `docs/extending/ruleset.schema.json` (+284 -4) 📝 `docs/extending/writing-rulesets.md` (+152 -15) 📝 `docs/game/combat.md` (+10 -0) 📝 `packages/client/src/lib/ruleset-combat-log.ts` (+27 -0) 📝 `packages/client/src/localization/locales/en.json` (+6 -0) 📝 `packages/server/src/routes/combat-director.routes.ts` (+68 -0) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+41 -0) 📝 `packages/server/src/services/game/combat-boss.service.ts` (+39 -0) 📝 `packages/server/src/services/game/ruleset-combat-director.service.ts` (+464 -18) 📝 `packages/shared/src/features/combat-director.ts` (+28 -3) 📝 `packages/shared/src/features/ruleset-combat/creatures.ts` (+1 -0) 📝 `packages/shared/src/features/ruleset-combat/encounter.ts` (+180 -4) ➕ `packages/shared/src/features/ruleset-combat/grid.ts` (+400 -0) 📝 `packages/shared/src/features/ruleset-combat/index.ts` (+37 -4) _...and 18 more files_ </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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Part of #6361 (real ruleset combat, slice C4a: positions, the shared and server half; it does not close the issue) and of #6314. Builds on #6386 (the fight on screen, merged). ## Why this change - A fight resolved by a ruleset's own rules is theatre of the mind today: anybody can be pointed at anybody. Speed, reach, range and the shape of an area have been carried by the format since the first combat slice and read by nothing. This slice reads them, so a fight can be played on a grid the way the systems this is for are played. - The Engine must not know what a cell is worth, or what feet are. So the ruleset says it: a new `combat.distance { label, perCell }` (5 ft in the 5e example, 2 paces in Ember Roads) is what makes a fight positionable, and every other distance in the block is in that unit. - **The board itself is the next PR.** Until it lands, a positioned fight is reachable only through the director's routes, and the screen keeps playing fights without positions exactly as it does now. ## What changed - **Format, Capability API 1.28, all additive and optional**: `combat.distance`, `combat.ranged { long, adjacentFoe }` (what shooting past normal range, or with a foe beside you, does), `combat.cover { bonus }`, `combat.opportunity { budget }`, weapon `reach` and `range { normal, long? }` on `combat.attacks[]` (a column of the list or a constant; a column reading 0 on a row means that row has no such distance, which is how a sword sits beside a thrown axe), a creature action's `range` as a number or `{ normal, long? }`, and a creature action's `area { shape, size, friendlyFire? }`, so a breath weapon is a real cone on a board and still catches `targetCount` of them without one. Cross-checks: a cell is worth more than 0; the opportunity budget is declared; reach and range columns exist and are numbers; `long` is at least `normal`; and anything measured in cells is refused in a block that declares no `distance`. - **The grid is the tactical engine's own**: the same generator, terrain table, formations, board sizes and battlefield brief. No second generator. The ruleset fight keeps its OWN state and resolver, because the tactical engine's units and arithmetic are the Engine's stats. - **How it plays** (`ruleset-combat/grid.ts`, pure, with hand-drawn boards in the regression): eight neighbours at one cell each and distance as the larger axis difference; entering a cell costs its terrain's move cost; nothing solid is entered, no corner is cut between two solid cells, a friend may be walked past, nobody may be stopped on, an enemy is a wall. Movement is a budget in cells, refilled each turn from `economy.movement` or a creature's `speed`, spendable before, between and after actions. `dash` adds it again, `speed-zero` removes it, standing up costs half. Targets are filtered by reach, range and line of sight FROM WHERE THE ACTOR STANDS, by the one rule the menu and the resolution share. Areas are real shapes (burst, cone, line) that stop at anything solid and catch everybody in their cells unless the entry says its own side is spared; `targetCount` says nothing for an area on a board. Cover is the ground under the target (the terrain table's own defense bonus above 0) and adds the ruleset's `cover.bonus` to the defense an attack is rolled against, with an event saying so. The three distance condition effects are finally read: adjacent is one cell, far is anything beyond. - **Opportunity strikes are data**: a ruleset that declares `opportunity` gets one when somebody leaves the reach of a standing enemy who can act, holds that budget and has a melee attack; it is resolved on the path, before the mover leaves the cell, and a strike that drops the mover ends the walk there. `disengage` prevents it. It is automatic for everybody in this slice; choosing is a reaction window, which is a later slice. Ember Roads declares none, and has none. - **The server**: a fight is positioned when the ruleset declares `distance` AND `/start` asks for it (`positioned: true`, which the client will send for the Tactical preference). The board comes from the path the Tactical style already uses. The view gains the grid, each combatant's cell and movement left, the walk option with every reachable cell, its cost, its path and whom it provokes, and for an area the cells it may be aimed at with who each aim would catch (capped). The command gains `to` and `at`. The picker walks: it gets up first if it is on the ground, reads the cells it may walk to off its own menu, scores what it could do from the 48 of them nearest an opponent, takes a penalty for each strike the walk would provoke, stays put when it can already do its best, and otherwise closes the distance. The Game Master's boss window lists positioned candidates too, bounded, with positions and distances in the prompt and never the seed or future dice. - **A swing, a shot, and something that is both**: a row carrying both a reach and a range is a thrown weapon, so it is a swing inside its reach (no penalty for the foe holding it, and it may be used on somebody walking past) and a shot beyond it. An ability whose range is 0 is self or touch: one cell of reach, never a shot. - **Nothing that works today changes**: a fight without a board behaves byte for byte as before, and the regression compares whole event logs to prove it. - Examples: the 5e example declares its distance, ranged rules, cover and opportunity strikes, and its attacks list gains reach and range columns; Ember Roads declares its distance and a constant movement and nothing else, which proves none of the rest is required. - Docs: the authoring guide (a Positions section, with each shape drawn), `docs/game/combat.md`, `docs/development/optional-agent-packages.md` (1.28), the plan, the combat handoff's status header, the generated schema, `CHANGELOG.md`. - Regressions: `game-ruleset-combat-grid` (new, pure) and positioned cases in `ruleset-combat-director` and `ruleset-combat-director-route`. The client gains only the log lines for the four new events, because its drift guard asks for a line per event. ## 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` ### Manual verification notes Commands run locally by the agent: `pnpm check` (exit 0), which includes `pnpm localization:check`, lint with the client regression lane's typecheck, and the e2e typecheck; the full node regression lane (`pnpm regression:node`, 333 of 333 on three complete runs; on the last one, 332 of 333, the odd one out being `image-dimension-limit.regression.ts`, which prints that it passed and then sometimes does not exit on this machine (the pino-pretty worker lifetime that #6359 worked around for the storage shutdown regression; this PR does not touch it, it passed on its own straight afterwards, and CI's node lane has passed it on every ruleset PR)); and the new regression. Eleven complete local CodeRabbit sweeps were run before opening (4, 4, 1, 3, 1, 3, 2, 2, 1, 2 and 0 findings). What the sweeps changed, none of it cosmetic: the burst, cone and aim loops ran over the DECLARED size and range (a ruleset may declare ten thousand units, which would have let one catalog entry stall a server), and are now scanned over the board only, with a hard ceiling; the walk and stand-up options carry ids no action can hold (`move:walk`, `move:stand`), because a creature may really have an action called "move"; one walk draws one strike from anybody, matching the preview; a strike made in passing spends its own use and recharge, and a creature with nothing left to strike with threatens nobody (the case fails against the old code); an area that MENDS lands only on the side it was written for; the preview and the resolution ask one shared question about who a step provokes instead of two copies of it; a terrain word the Engine does not know costs an ordinary step instead of throwing; and the published JSON Schema asks for `distance` beside anything measured in cells. The last of them were about how opponents PLAY, and each came with a regression that fails against the old code: the picker worked out for itself where it could walk instead of reading its own menu, so a creature knocked down chose a walk the rules refuse and lost its turn to the refusal; it scored only the cells nearest ITSELF, so a fast creature far from its target never found the cell it could strike from; and it never stood up at all, so one knocked down out of reach would have lain there for the rest of the fight. It now reads its walk off the menu, looks at the cells nearest an opponent first, and gets up before anything else. Since opening, CodeRabbit's first review found three things, all fixed with regressions that fail against the old code: an ability whose range is 0 became a one cell SHOT, so a touch spell took the penalty for a foe standing beside the caster (it is now a reach, and the same hole on a creature is fixed too); the loader accepted a saved fight with two standing combatants on one cell or somebody inside a wall, which would have made every distance on that board wrong; and each 1.28 key in the install-gate case set a distance first, so only `distance` was actually being proven. Chasing those turned up three more of my own: an opponent with nobody in reach spent its action on a dodge nobody was swinging at instead of sprinting closer; a thrown weapon was read as a shot in its owner's hand; and a creature could not say the shape its breath lands in at all, which flattened every printed cone and line to a number of targets. Declined, with the reason: requiring `distance` whenever a CREATURE action carries `reach` or `range`. Those have been legal, carried data since Capability API 1.27, and the shipped 5e package has them with no `distance`, so requiring it would refuse an installed package; only what 1.28 adds needs a cell size. There is no new screen in this slice, so there is nothing to click: the client menu drops option kinds it does not know, which is why the walk never appears until the board PR. Not verified: the boss prompt on a positioned fight against a live provider (its candidates and positions are checked structurally); a very large board with a long-range area (the scans are bounded to the board and the picker to 48 cells, and the eight-fight director lane runs in about 2.5 seconds). Still to verify by hand: - Manually confirm a Classic and a Tactical directed battle, and a ruleset fight without positions, run exactly as before. - Manually read the Positions section of the authoring guide against the 5e rules for movement, reach, ranges, areas, cover and opportunity attacks; the ceilings (no three-quarter cover, no elevation, no chosen path around a threat except by walking in two steps) are listed there. ## Docs and release impact - [ ] 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 (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) Docs touched: `CHANGELOG.md`, `docs/extending/writing-rulesets.md`, `docs/game/combat.md`, `docs/development/optional-agent-packages.md`, `docs/development/game-combat-rulesets-implementation.md`, the plan, both example rulesets and the generated schema. The `[docs-i18n]` follow-up for the combat slices is batched into one issue for the whole arc, #6401, which this slice's pages are listed in. ## UI evidence (if applicable) None: this slice has no new UI. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added ruleset-defined tactical combat with positioning, movement, reach, ranges, areas, line of sight, cover, and opportunity attacks. - NPCs can select legal movement and actions based on battlefield conditions. - Combat logs now report movement, area effects, cover, and opportunity attacks. - Added tactical distance and attack-range support to example rulesets. - Classic combat and rulesets without distance data retain their existing behavior. - **Documentation** - Expanded ruleset authoring guidance and schemas for tactical combat configuration. - Board rendering remains unavailable; tactical positioning is currently API-only. - Tactical combat ruleset features now require Capability API 1.28. <!-- 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-23 04:17:07 +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#7165
No description provided.