[PR #6406] [MERGED] feat(game): a ruleset fight is played on the battlefield, drawn from the server's own view (real combat C4b) #7167

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

📋 Pull Request Information

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

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


📝 Commits (10+)

  • 5353035 refactor(game): the battlefield's look moves into one module both boards read
  • 37fa6e1 feat(game): a ruleset fight on a board, drawn from the server's own view
  • c677371 fix(game): the board fits its box whole, the tokens keep their own squares, and Escape hands the keyboard back
  • 6df17a4 test(game): the board's squares, its distances and its four refusals are pinned on both examples
  • 68bea4e test(game): the browser lane walks, reads the log in paces and swings on a positioned board
  • 1ce5fd7 docs(game): the guides, the authoring notes, the plan and the handoff say the board is on screen
  • c3543af fix(game): the board keeps its squares square on a wide screen, and opening a walk or an aim takes the keyboard onto the board
  • 2ebf3b5 fix(game): the board says health and strikes in plainer words, reads a square to a screen reader once, and the menu's turn reset no longer depends on who hands it a function
  • 62c07b2 fix(game): a shape with nowhere to land opens its aiming step and says so instead of sending a choice the server refuses, and the screen regression reads real health
  • 4e5f6e8 fix(game): the menu hands its half-made choice to an owner only when the owner passes both halves

📊 Changes

22 files changed (+2070 additions, -305 deletions)

View changed files

📝 CHANGELOG.md (+2 -1)
📝 docs/development/game-combat-rulesets-implementation.md (+5 -2)
📝 docs/development/game-rulesets-and-sheets-implementation.md (+36 -5)
📝 docs/extending/writing-rulesets.md (+14 -4)
📝 docs/game/combat.md (+3 -1)
📝 docs/game/getting-started.md (+1 -1)
📝 e2e/game-combat-director.e2e.ts (+286 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+6 -0)
📝 packages/client/src/components/game/DirectedCombatUI.tsx (+44 -2)
📝 packages/client/src/components/game/GameSurface.tsx (+5 -0)
➕ packages/client/src/components/game/RulesetCombatBoard.tsx (+471 -0)
📝 packages/client/src/components/game/RulesetCombatMenu.tsx (+91 -19)
📝 packages/client/src/components/game/RulesetCombatStatus.tsx (+11 -1)
📝 packages/client/src/components/game/TacticalCombatUI.tsx (+14 -229)
📝 packages/client/src/features/chat-settings/sections/CombatStyleSection.tsx (+9 -3)
📝 packages/client/src/hooks/use-directed-combat.ts (+3 -0)
➕ packages/client/src/lib/ruleset-combat-board.ts (+211 -0)
📝 packages/client/src/lib/ruleset-combat-log.ts (+18 -4)
📝 packages/client/src/lib/ruleset-combat-menu.ts (+41 -3)
➕ packages/client/src/lib/tactical-board-look.ts (+241 -0)

...and 2 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 C4b: the board on screen; it does not close the issue) and of #6314. Builds on #6397 (positions, the shared and server half), merged.

Why this change

  • #6397 taught a ruleset fight where everybody stands: movement, reach, range, line of sight, cover, real area shapes and opportunity strikes, all resolved on the server. Nothing on screen could reach it. This PR is the screen: a fight on a ruleset that says what a cell is worth, in a game whose combat preference is Tactical, is played on a board.
  • The client decides nothing. Which cells can be reached, what a step costs, who a step provokes, who may be targeted and who an aim would catch all come from the server's view; the board only draws them. Nothing on it is 5e shaped: every distance is said in the ruleset's own unit ("Movement 30 ft" on the 5e example, "Movement 8 paces" on Ember Roads).

What changed

  • When a fight is on a board: the client sends positioned: true to /start exactly when the fight is a ruleset fight, the game's combat preference is Tactical, and the ruleset declares combat.distance, with the same environment, formation and battlefield brief the Tactical style already sends. The screen then decides from the VIEW (ruleset.grid present means the board), never from the preference. Classic preference, or a ruleset without distance, stays theatre of the mind on the existing screen, unchanged.
  • RulesetCombatBoard (new, presentational), mounted by the ruleset branch of DirectedCombatUI in place of the portrait stage. One focusable button per cell with terrain drawn as the Tactical board draws it; tokens with portrait or initials, side colour, a health bar from the view's own health, the actor on turn marked, the defeated shown faded. Choosing Move lights every reachable cell with its cost, draws the path on hover or focus, marks in amber a cell whose path provokes and names who; click or Enter sends { to }. An option that takes targets highlights exactly the server's targetIds and a token's square can be clicked as well as the list entry (the list stays: it is the keyboard and screen reader path). An area option enters aiming: the cells in the server's aim[] light up, each names who it would catch (friends included, before it is confirmed), and the command carries at. When living opponents exist but no attack is offered, a line says "Nobody is in reach. Move closer."
  • One look for both boards: the Tactical board's purely visual constants and helpers (terrain palettes, icons, tile textures and tints, three keyframes, the token sprite, initials and ring colour helpers) moved into lib/tactical-board-look.ts, a pure move with no behaviour change. TacticalCombatUI lost 229 lines and gained 14 (the import and one <style>); nothing else in it was touched.
  • The menu and the status strip: RulesetCombatMenu learns the move kind (walking and standing up, told apart by the shared RULESET_MOVE_OPTION and RULESET_STAND_OPTION constants, never by a literal) and an optional controlled step so the half-made choice can live on the board; passed nothing, it behaves exactly as before. RulesetCombatStatus shows the movement left beside the budgets. The log says walks in the ruleset's unit. The four new refusals get sentences.
  • Layout and keyboard: the board keeps a guaranteed share of the height and keeps its squares square (container query units, so it fits its box by whichever of width or height binds); the menu and the log scroll inside their own bounds. Arrow keys move between cells, Home and End along a row, one tab stop for the whole board; opening Move or an aim puts the keyboard on the actor's cell, Escape leaves the step and returns focus to the menu only when the PLAYER closed it; aria-live stays polite. Every cell has an accessible name: coordinates, terrain, who stands there, and what can be done with it.
  • Combat Style setting: for a game whose ruleset resolves its own fights, the line now says the two truths: with a declared distance, Classic plays them without positions and Tactical plays them on a board; without one, the preference is not used.
  • Docs: docs/game/combat.md, docs/game/getting-started.md, docs/extending/writing-rulesets.md (the Positions section says the board exists), the plan, the combat handoff's status header, CHANGELOG.md (and the earlier unreleased entry loses its "the board is next" sentence).
  • Proof: the pure rules (cell lookups, the distance formatter, the "why no attack" rule, refusal sentences, aim lookups, the two move labels) live in lib/ and are pinned in ruleset-combat-screen-client on both examples; e2e/game-combat-director.e2e.ts gains a positioned Ember Roads mode (the board is there, Move, click a reachable cell, the token's data-cell changed, the log printed the walk in paces, then an attack when adjacent).

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). Six complete local CodeRabbit sweeps were run before opening (8, 2, 1, 2, 0 and 0 findings). What they changed: a shape with nowhere to land was sent to the server, which refuses a shape with no square, instead of opening its aiming step and saying it would catch nobody; three board sentences said health and strikes in plainer words; a square's sentences are worked out once per view rather than once per draw, and a square being read is no longer said twice to a screen reader; the menu's turn reset no longer depends on who hands it a function, and it only gives its half-made choice to an owner that passes both halves of the pair; and the screen regression's fixture reads the fight's real health instead of zeroes, with the Ember Roads walk assertions made unconditional.

Driven for real by the agent on a scratch Engine (own port, fresh data directory, stopped afterwards), in the app's browser pane with mouse and keyboard, on both example rulesets: a fight seeded with the Tactical preference shows the board; Move lights the reachable squares with their cost ("2 paces", "15 ft"), the token moves and the log says the walk in the ruleset's unit; a burst is aimed at a square and names who it catches, a friend included, before it is confirmed; an adjacent opponent is attacked by clicking its square; before anyone is adjacent the strip says nobody is in reach; Escape returns the keyboard to the menu. Measured at 1366x850 with a 17 line log: board 578x385, 96 cells, squares square, no horizontal page scroll, no overlapping tokens. At an emulated 375x812: the whole board visible (cells 28x28), no horizontal page scroll. The same game seeded with the Classic preference shows the existing portrait screen with no Movement group, and a plain Tactical fight with no ruleset shows the Tactical style's own screen, unchanged after the visual constants moved. That pass found and fixed two things: on a wide screen the squares were stretched (110x46) because a percentage width with a maximum height does not keep an aspect ratio, and opening Move or an aim with the mouse left the keyboard on the page instead of on the board.

Not verified, plainly: Playwright does not run on this machine, so the new positioned e2e mode is typechecked only and CI is what runs it; a cone or a line on screen (both examples' only shaped ability is a burst; the lookup is shape-blind and pinned); picking several targets by clicking several tokens (the board and the menu share one pinned rule for it); a Game Master controlled boss on a board (the board shows "waiting" while a window is open, and that path's client code is unchanged); real portraits on tokens (the seeded fights had none; the helper is the Tactical board's own, moved unchanged); a real finger on a touch screen; a ruleset that resolves its own fights but declares no distance, on screen (both examples declare one; both setting lines are pinned). One narrowing to know about: the board offers only the aims the server lists, and the server lists only aims that catch somebody, so a player cannot aim a shape at empty ground even though the rules would accept it.

Still to verify by hand:

  • Manually play a positioned fight on a ruleset with a declared distance and the Tactical preference: walk, attack in reach, aim an area, get struck while leaving a reach (5e example), stand up after being knocked down.
  • Manually confirm a plain Tactical battle looks and plays exactly as before (its visual constants moved files).
  • Manually confirm a ruleset fight with the Classic preference, and a Classic directed battle, are unchanged.
  • Manually check the board with a screen reader, on a real phone, and in light mode.

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/game/combat.md, docs/game/getting-started.md, docs/extending/writing-rulesets.md, docs/development/game-combat-rulesets-implementation.md and the plan. 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. New English strings: 27 keys under game.combat.ruleset.*; no community locale was touched, and the six terrain words are reused from the Tactical board's own keys so the two boards cannot disagree.

UI evidence (if applicable)

Driven on a scratch Engine and looked at in a browser, on both example rulesets and on the REAL 5e data (the package's own combat block, weapons and stat blocks, with Fireball, Burning Hands and the Goblin, Ogre and Adult Red Dragon inlined to fit the import limit).

On the 5e fight the header reads "Brenna is up" and "Movement 30 ft", and the panel below reads the ruleset's own numbers: Brenna 60/60 Armor Class 18, Goblin 4/4 Armor Class 15, Ogre 68/68 Armor Class 11, Adult Red Dragon 269/269 Armor Class 19, with the death save tracks and the initiative order beside them. Before anybody is adjacent the strip under the board reads "Nobody is in reach. Move closer."

Choosing Move lights every square she can reach with its cost in the ruleset's own distance, in feet: 5 ft, 10 ft, 15 ft, 20 ft, 25 ft, 30 ft, with the wooded squares costing more than the open ones and nothing beyond her 30 feet offered. The strip reads "Plains. Brenna stands here, health 60 of 60. On turn." for the square under the keyboard, and the prompt reads "Choose where Brenna walks to, then press Enter. Escape goes back."

A screenshot cannot be attached from this environment; the measurements and the exact strings are above and in the manual verification notes.

Summary by CodeRabbit

  • New Features

    • Tactical ruleset battles now display an interactive battlefield when supported, with movement paths, costs, targeting, area previews, terrain, and remaining movement.
    • Use mouse or keyboard controls to navigate, select squares, aim, attack, and flee.
    • Distances and combat logs use the ruleset’s own units.
    • Combat preferences determine whether supported fights use Classic or Tactical presentation.
  • Compatibility

    • Rulesets without distance data and Classic combat retain their previous behavior.
  • Documentation

    • Updated combat, ruleset authoring, and getting-started guidance.
  • Tests

    • Added end-to-end and regression coverage for tactical combat boards.

🔄 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/6406 **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-board` --- ### 📝 Commits (10+) - [`5353035`](https://github.com/Pasta-Devs/Marinara-Engine/commit/53530357495809d09d89340a28e363a22c7ff337) refactor(game): the battlefield's look moves into one module both boards read - [`37fa6e1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/37fa6e11a76f9d01633110e27b10e5888ed7561a) feat(game): a ruleset fight on a board, drawn from the server's own view - [`c677371`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c6773711a6401f4c55f61987bb929e211da3f083) fix(game): the board fits its box whole, the tokens keep their own squares, and Escape hands the keyboard back - [`6df17a4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6df17a44a8685cce64d51a8b02cd6c2996bfb74d) test(game): the board's squares, its distances and its four refusals are pinned on both examples - [`68bea4e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/68bea4ef64ee4aca5a52910b84c0baa473d1a2ae) test(game): the browser lane walks, reads the log in paces and swings on a positioned board - [`1ce5fd7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1ce5fd73f4205317983614b597df3cc4027400d4) docs(game): the guides, the authoring notes, the plan and the handoff say the board is on screen - [`c3543af`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c3543af1d4b8eacb3314223def006f7cbb9ae3df) fix(game): the board keeps its squares square on a wide screen, and opening a walk or an aim takes the keyboard onto the board - [`2ebf3b5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2ebf3b53cda87f8a14f024144e0d115febf8be8d) fix(game): the board says health and strikes in plainer words, reads a square to a screen reader once, and the menu's turn reset no longer depends on who hands it a function - [`62c07b2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/62c07b29bd0d2ce922e5341dd78f3d34ba30077d) fix(game): a shape with nowhere to land opens its aiming step and says so instead of sending a choice the server refuses, and the screen regression reads real health - [`4e5f6e8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4e5f6e8ad57645cb4bc5fca50467256962ac728a) fix(game): the menu hands its half-made choice to an owner only when the owner passes both halves ### 📊 Changes **22 files changed** (+2070 additions, -305 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -1) 📝 `docs/development/game-combat-rulesets-implementation.md` (+5 -2) 📝 `docs/development/game-rulesets-and-sheets-implementation.md` (+36 -5) 📝 `docs/extending/writing-rulesets.md` (+14 -4) 📝 `docs/game/combat.md` (+3 -1) 📝 `docs/game/getting-started.md` (+1 -1) 📝 `e2e/game-combat-director.e2e.ts` (+286 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+6 -0) 📝 `packages/client/src/components/game/DirectedCombatUI.tsx` (+44 -2) 📝 `packages/client/src/components/game/GameSurface.tsx` (+5 -0) ➕ `packages/client/src/components/game/RulesetCombatBoard.tsx` (+471 -0) 📝 `packages/client/src/components/game/RulesetCombatMenu.tsx` (+91 -19) 📝 `packages/client/src/components/game/RulesetCombatStatus.tsx` (+11 -1) 📝 `packages/client/src/components/game/TacticalCombatUI.tsx` (+14 -229) 📝 `packages/client/src/features/chat-settings/sections/CombatStyleSection.tsx` (+9 -3) 📝 `packages/client/src/hooks/use-directed-combat.ts` (+3 -0) ➕ `packages/client/src/lib/ruleset-combat-board.ts` (+211 -0) 📝 `packages/client/src/lib/ruleset-combat-log.ts` (+18 -4) 📝 `packages/client/src/lib/ruleset-combat-menu.ts` (+41 -3) ➕ `packages/client/src/lib/tactical-board-look.ts` (+241 -0) _...and 2 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 C4b: the board on screen; it does not close the issue) and of #6314. Builds on #6397 (positions, the shared and server half), merged. ## Why this change - #6397 taught a ruleset fight where everybody stands: movement, reach, range, line of sight, cover, real area shapes and opportunity strikes, all resolved on the server. Nothing on screen could reach it. This PR is the screen: a fight on a ruleset that says what a cell is worth, in a game whose combat preference is Tactical, is played on a board. - The client decides nothing. Which cells can be reached, what a step costs, who a step provokes, who may be targeted and who an aim would catch all come from the server's view; the board only draws them. Nothing on it is 5e shaped: every distance is said in the ruleset's own unit ("Movement 30 ft" on the 5e example, "Movement 8 paces" on Ember Roads). ## What changed - **When a fight is on a board**: the client sends `positioned: true` to `/start` exactly when the fight is a ruleset fight, the game's combat preference is Tactical, and the ruleset declares `combat.distance`, with the same environment, formation and battlefield brief the Tactical style already sends. The screen then decides from the VIEW (`ruleset.grid` present means the board), never from the preference. Classic preference, or a ruleset without `distance`, stays theatre of the mind on the existing screen, unchanged. - **`RulesetCombatBoard`** (new, presentational), mounted by the ruleset branch of `DirectedCombatUI` in place of the portrait stage. One focusable button per cell with terrain drawn as the Tactical board draws it; tokens with portrait or initials, side colour, a health bar from the view's own health, the actor on turn marked, the defeated shown faded. Choosing Move lights every reachable cell with its cost, draws the path on hover or focus, marks in amber a cell whose path provokes and names who; click or Enter sends `{ to }`. An option that takes targets highlights exactly the server's `targetIds` and a token's square can be clicked as well as the list entry (the list stays: it is the keyboard and screen reader path). An area option enters aiming: the cells in the server's `aim[]` light up, each names who it would catch (friends included, before it is confirmed), and the command carries `at`. When living opponents exist but no attack is offered, a line says "Nobody is in reach. Move closer." - **One look for both boards**: the Tactical board's purely visual constants and helpers (terrain palettes, icons, tile textures and tints, three keyframes, the token sprite, initials and ring colour helpers) moved into `lib/tactical-board-look.ts`, a pure move with no behaviour change. `TacticalCombatUI` lost 229 lines and gained 14 (the import and one `<style>`); nothing else in it was touched. - **The menu and the status strip**: `RulesetCombatMenu` learns the `move` kind (walking and standing up, told apart by the shared `RULESET_MOVE_OPTION` and `RULESET_STAND_OPTION` constants, never by a literal) and an optional controlled step so the half-made choice can live on the board; passed nothing, it behaves exactly as before. `RulesetCombatStatus` shows the movement left beside the budgets. The log says walks in the ruleset's unit. The four new refusals get sentences. - **Layout and keyboard**: the board keeps a guaranteed share of the height and keeps its squares square (container query units, so it fits its box by whichever of width or height binds); the menu and the log scroll inside their own bounds. Arrow keys move between cells, Home and End along a row, one tab stop for the whole board; opening Move or an aim puts the keyboard on the actor's cell, Escape leaves the step and returns focus to the menu only when the PLAYER closed it; `aria-live` stays polite. Every cell has an accessible name: coordinates, terrain, who stands there, and what can be done with it. - **Combat Style setting**: for a game whose ruleset resolves its own fights, the line now says the two truths: with a declared distance, Classic plays them without positions and Tactical plays them on a board; without one, the preference is not used. - Docs: `docs/game/combat.md`, `docs/game/getting-started.md`, `docs/extending/writing-rulesets.md` (the Positions section says the board exists), the plan, the combat handoff's status header, `CHANGELOG.md` (and the earlier unreleased entry loses its "the board is next" sentence). - Proof: the pure rules (cell lookups, the distance formatter, the "why no attack" rule, refusal sentences, aim lookups, the two move labels) live in `lib/` and are pinned in `ruleset-combat-screen-client` on both examples; `e2e/game-combat-director.e2e.ts` gains a positioned Ember Roads mode (the board is there, Move, click a reachable cell, the token's `data-cell` changed, the log printed the walk in paces, then an attack when adjacent). ## 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). Six complete local CodeRabbit sweeps were run before opening (8, 2, 1, 2, 0 and 0 findings). What they changed: a shape with nowhere to land was sent to the server, which refuses a shape with no square, instead of opening its aiming step and saying it would catch nobody; three board sentences said health and strikes in plainer words; a square's sentences are worked out once per view rather than once per draw, and a square being read is no longer said twice to a screen reader; the menu's turn reset no longer depends on who hands it a function, and it only gives its half-made choice to an owner that passes both halves of the pair; and the screen regression's fixture reads the fight's real health instead of zeroes, with the Ember Roads walk assertions made unconditional. Driven for real by the agent on a scratch Engine (own port, fresh data directory, stopped afterwards), in the app's browser pane with mouse and keyboard, on both example rulesets: a fight seeded with the Tactical preference shows the board; Move lights the reachable squares with their cost ("2 paces", "15 ft"), the token moves and the log says the walk in the ruleset's unit; a burst is aimed at a square and names who it catches, a friend included, before it is confirmed; an adjacent opponent is attacked by clicking its square; before anyone is adjacent the strip says nobody is in reach; Escape returns the keyboard to the menu. Measured at 1366x850 with a 17 line log: board 578x385, 96 cells, squares square, no horizontal page scroll, no overlapping tokens. At an emulated 375x812: the whole board visible (cells 28x28), no horizontal page scroll. The same game seeded with the Classic preference shows the existing portrait screen with no Movement group, and a plain Tactical fight with no ruleset shows the Tactical style's own screen, unchanged after the visual constants moved. That pass found and fixed two things: on a wide screen the squares were stretched (110x46) because a percentage width with a maximum height does not keep an aspect ratio, and opening Move or an aim with the mouse left the keyboard on the page instead of on the board. Not verified, plainly: Playwright does not run on this machine, so the new positioned e2e mode is typechecked only and CI is what runs it; a cone or a line on screen (both examples' only shaped ability is a burst; the lookup is shape-blind and pinned); picking several targets by clicking several tokens (the board and the menu share one pinned rule for it); a Game Master controlled boss on a board (the board shows "waiting" while a window is open, and that path's client code is unchanged); real portraits on tokens (the seeded fights had none; the helper is the Tactical board's own, moved unchanged); a real finger on a touch screen; a ruleset that resolves its own fights but declares no distance, on screen (both examples declare one; both setting lines are pinned). One narrowing to know about: the board offers only the aims the server lists, and the server lists only aims that catch somebody, so a player cannot aim a shape at empty ground even though the rules would accept it. Still to verify by hand: - Manually play a positioned fight on a ruleset with a declared distance and the Tactical preference: walk, attack in reach, aim an area, get struck while leaving a reach (5e example), stand up after being knocked down. - Manually confirm a plain Tactical battle looks and plays exactly as before (its visual constants moved files). - Manually confirm a ruleset fight with the Classic preference, and a Classic directed battle, are unchanged. - Manually check the board with a screen reader, on a real phone, and in light mode. ## 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/game/combat.md`, `docs/game/getting-started.md`, `docs/extending/writing-rulesets.md`, `docs/development/game-combat-rulesets-implementation.md` and the plan. 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. New English strings: 27 keys under `game.combat.ruleset.*`; no community locale was touched, and the six terrain words are reused from the Tactical board's own keys so the two boards cannot disagree. ## UI evidence (if applicable) Driven on a scratch Engine and looked at in a browser, on both example rulesets and on the REAL 5e data (the package's own `combat` block, weapons and stat blocks, with Fireball, Burning Hands and the Goblin, Ogre and Adult Red Dragon inlined to fit the import limit). On the 5e fight the header reads "Brenna is up" and "Movement 30 ft", and the panel below reads the ruleset's own numbers: Brenna 60/60 Armor Class 18, Goblin 4/4 Armor Class 15, Ogre 68/68 Armor Class 11, Adult Red Dragon 269/269 Armor Class 19, with the death save tracks and the initiative order beside them. Before anybody is adjacent the strip under the board reads "Nobody is in reach. Move closer." Choosing Move lights every square she can reach with its cost in the ruleset's own distance, in feet: 5 ft, 10 ft, 15 ft, 20 ft, 25 ft, 30 ft, with the wooded squares costing more than the open ones and nothing beyond her 30 feet offered. The strip reads "Plains. Brenna stands here, health 60 of 60. On turn." for the square under the keyboard, and the prompt reads "Choose where Brenna walks to, then press Enter. Escape goes back." A screenshot cannot be attached from this environment; the measurements and the exact strings are above and in the manual verification notes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Tactical ruleset battles now display an interactive battlefield when supported, with movement paths, costs, targeting, area previews, terrain, and remaining movement. - Use mouse or keyboard controls to navigate, select squares, aim, attack, and flee. - Distances and combat logs use the ruleset’s own units. - Combat preferences determine whether supported fights use Classic or Tactical presentation. - **Compatibility** - Rulesets without distance data and Classic combat retain their previous behavior. - **Documentation** - Updated combat, ruleset authoring, and getting-started guidance. - **Tests** - Added end-to-end and regression coverage for tactical combat boards. <!-- 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:09 +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#7167
No description provided.