[PR #8138] [MERGED] Game Mode: a player's ruleset sheet and fight screen fixes from the UI review (Capability API 1.378) #8123

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

📋 Pull Request Information

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

Base: staging ← Head: claude/game-mode-cloud-nx3wjf


📝 Commits (10+)

  • df9fdc0 feat(rulesets): a ruleset's own words on its sheet, menu and cards (1.377)
  • e94968b feat(rulesets): abilities from a list under its own menu heading (1.377)
  • dc9d90b feat(game): a player's ruleset sheet, and builder fixes
  • f5f0313 feat(game): fight screen fixes from the UI review
  • b30224c chore(rulesets): regenerate the ruleset schema and format
  • 61dd491 Merge upstream staging
  • e28bfc5 feat(game): leftover UI review items for fights and the builder
  • 7426005 fix(game): review fixes for the UI review items
  • c04a16c Merge branch 'staging' of https://github.com/pasta-devs/marinara-engine into claude/game-mode-cloud-nx3wjf
  • 840fa80 fix(game): a known entry's chip says so to a screen reader; a Ready row stays open

📊 Changes

39 files changed (+2701 additions, -501 deletions)

View changed files

📝 docs/extending/ruleset.schema.json (+332 -1)
📝 docs/extending/writing-rulesets.md (+15 -0)
📝 packages/client/src/App.tsx (+10 -2)
📝 packages/client/src/components/game/CombatAiControls.tsx (+0 -9)
📝 packages/client/src/components/game/GameCombatUI.tsx (+0 -1)
📝 packages/client/src/components/game/GameRulesetSheet.tsx (+575 -304)
📝 packages/client/src/components/game/RulesetCombatBoard.tsx (+89 -8)
📝 packages/client/src/components/game/RulesetCombatLog.tsx (+11 -2)
📝 packages/client/src/components/game/RulesetCombatMenu.tsx (+159 -30)
📝 packages/client/src/components/game/RulesetCombatScreen.tsx (+107 -55)
📝 packages/client/src/components/game/RulesetItemPicker.tsx (+2 -0)
📝 packages/client/src/components/game/RulesetTurnOrder.tsx (+5 -3)
📝 packages/client/src/components/game/TacticalCombatUI.tsx (+7 -1)
📝 packages/client/src/components/rulesets/RulesetCatalogPicker.tsx (+13 -8)
📝 packages/client/src/components/rulesets/RulesetSheetBuilder.tsx (+138 -21)
📝 packages/client/src/lib/ruleset-combat-log-rich.ts (+10 -2)
📝 packages/client/src/lib/ruleset-combat-log.ts (+27 -0)
📝 packages/client/src/lib/ruleset-combat-menu.ts (+117 -13)
📝 packages/client/src/lib/ruleset-sheet-view.ts (+62 -0)
📝 packages/client/src/localization/locales/en.json (+54 -9)

...and 19 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

Closes #8137

Why this change

Before: a player who opened their ruleset sheet in a game got a debugging panel. It listed every condition the ruleset defines as a toggle (hundreds of them for a full ruleset), could be edited mid-fight, and showed no attacks or summary. In a fight, the menu buried the useful options under a "Ready" row for every action and full-height rows for options with nobody in reach. Cards showed the base defense instead of the one an attack is rolled against. Tokens printed letters that overflowed small squares, and the end card said nothing about who fell or what was spent. The guided builder offered spells and languages the character already had, ticked steps before their source existed, and lost its picks when a card was copied into a game.

After: the sheet opens on an Overview (summary, ability scores with modifiers, pools, attacks with to-hit and damage, active conditions with an "Add condition…" search) plus a tab for each list the ruleset asks for. It is settled during a fight, except for health and pools. The fight screen shows the effective defense, per-target odds, save and damage for areas, what a reaction changes, condition badges and a legend. It also has one Ready row per action and phone tabs for Board, Actions, Turn order and Log. The end card lists each foe's fate and each party member's spent pools. The builder marks entries already held as "Already known" and keeps its picks on game copies. It also offers one class at a time and can start over.

What changed

  • A player's ruleset sheet.

    • Overview first, then one tab per list that declares display.tab, grouped by display.by with display.mark ticks. A tab whose lists are hidden falls back to the Overview.
    • Only active conditions show, with icons and a remove button; the rest are behind a search. Conditions marked pickable: false are left out.
    • The sheet is read-only in a fight, except pools and wound tracks.
    • There is one "Edit card" button and one "Edit ruleset sheet" button.
  • Fight screen.

    • Cards show the defense an attack is actually rolled against: the ground's cover always, and the cover and high ground from the foe whose turn it is.
    • The target step and the hover text give each target's odds.
    • Area aims and cards with a save say "DEX save DC 15, about 28 damage (14 on a save)".
    • A held hit says what rides on it, and an answer that raises defense says "Armor Class 13 → 18, the hit misses".
    • Menu folds:
      • "Ready an action" is one row per action, which opens onto its two moments and stays open as the player left it.
      • Options with nobody in reach fold into one line.
      • Contests fold the way standard actions do.
    • Abilities drawn from a list sit under that list's heading.
    • Tokens:
      • letters are sized by the token, with one letter on small squares and the full name on hover;
      • a thicker health bar;
      • condition badges.
    • A board legend.
    • Moves on a touch screen take two taps: a preview, then a confirm.
    • The log heads each turn with whoever took it, and an aim no longer prints coordinates.
    • The end card lists each foe as defeated, fled or still standing, and what each party member spent.
    • Enemy AI personas are no longer shown to players.
    • The accent colour stops cycling while a fight is on screen, on the ruleset board and the tactical board alike.
  • Phones.

    • Four tabs: Board, Actions, Turn order and Log.
    • The bar under the board keeps one height, so the board does not jump between steps.
  • Guided builder.

    • Entries the sheet already holds are marked "Already known" (and named so to a screen reader), and are not offered or counted. A name match counts only for a row that is nothing but its name.
    • A multi-pick step shows one pick at a time, with "Add another".
    • Steps wait for earlier unfinished steps before ticking.
    • Info shows the entry's stat line.
    • Raw filter values are no longer printed as chips.
    • Summary labels no longer truncate, and signed values show their sign.
    • A choice that builds on held training (Expertise) says so before it opens, and the trained line names the tier.
    • "Start over with the builder" rebuilds a sheet from scratch.
    • Game copies of a card keep the builder's picks.
  • Capability API 1.378 (ruleset-only keys a ruleset declares when it wants them, documented in docs/extending/writing-rulesets.md):

    • pool unit and units;
    • list display (tab, by, mark);
    • live text hideWhen on a field or a derived value;
    • condition pickable: false;
    • track showWhenSet;
    • item toggle onLabel and offLabel;
    • item use title;
    • combat modifier label;
    • derived signed;
    • creature trait text up to 1200 characters.

    A package using any of them must declare 1.378. (1.377 is the Motion 14 host slot from #8134.)

Validation

  • pnpm check passes locally. Every step was run separately (format, lint, localization, impeccable, e2e types, token estimation types, build).
  • 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

  • Every ruleset, combat and capability package regression passes: the game-ruleset-*, ruleset-*, combat-*, capability-package-* and game-combat-* scripts.
  • New: ruleset-sheet-words.regression.ts covers the 1.378 keys, the gate, list headings in the menu, hidden text (including a derived hideWhen with no comparison, refused by both the validator and the published schema), held entries and per-target odds.
  • Additions to ruleset-combat-director.regression.ts cover effective defense, Shield's raised defense on a held hit, and what rides on the hit.
  • Additions to ruleset-combat-screen-client.regression.ts cover the save wording.
  • Not clicked through in a browser yet.

Docs and release impact

  • No docs changes needed
  • Updated docs: docs/extending/writing-rulesets.md and the regenerated docs/extending/ruleset.schema.json.
  • Translated docs follow-up is tracked on #7512.
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

None yet.


🔄 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/8138 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `claude/game-mode-cloud-nx3wjf` --- ### 📝 Commits (10+) - [`df9fdc0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/df9fdc057029df60e03c512e75d42416c79bf438) feat(rulesets): a ruleset's own words on its sheet, menu and cards (1.377) - [`e94968b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e94968b0d71cf13bf52f321165c2867a2bfe4a1f) feat(rulesets): abilities from a list under its own menu heading (1.377) - [`dc9d90b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dc9d90bbbb2d9d563612a4997de3651445c8e053) feat(game): a player's ruleset sheet, and builder fixes - [`f5f0313`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f5f031330db71bf33e9af97bce55f839f04885cf) feat(game): fight screen fixes from the UI review - [`b30224c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b30224c3a861e75ad7dc7c05f7fcdefd0237c539) chore(rulesets): regenerate the ruleset schema and format - [`61dd491`](https://github.com/Pasta-Devs/Marinara-Engine/commit/61dd491d50acc0b2165dbb00b173baf140590a4c) Merge upstream staging - [`e28bfc5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e28bfc598112953cc744496ffd19c23d4c533edf) feat(game): leftover UI review items for fights and the builder - [`7426005`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7426005ec0b9aa1b266250e4347fd5b341086648) fix(game): review fixes for the UI review items - [`c04a16c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c04a16cdeaf8b493f7facc4d8a38c28c560b9735) Merge branch 'staging' of https://github.com/pasta-devs/marinara-engine into claude/game-mode-cloud-nx3wjf - [`840fa80`](https://github.com/Pasta-Devs/Marinara-Engine/commit/840fa80572d67684bea818c84c6b35febb759fee) fix(game): a known entry's chip says so to a screen reader; a Ready row stays open ### 📊 Changes **39 files changed** (+2701 additions, -501 deletions) <details> <summary>View changed files</summary> 📝 `docs/extending/ruleset.schema.json` (+332 -1) 📝 `docs/extending/writing-rulesets.md` (+15 -0) 📝 `packages/client/src/App.tsx` (+10 -2) 📝 `packages/client/src/components/game/CombatAiControls.tsx` (+0 -9) 📝 `packages/client/src/components/game/GameCombatUI.tsx` (+0 -1) 📝 `packages/client/src/components/game/GameRulesetSheet.tsx` (+575 -304) 📝 `packages/client/src/components/game/RulesetCombatBoard.tsx` (+89 -8) 📝 `packages/client/src/components/game/RulesetCombatLog.tsx` (+11 -2) 📝 `packages/client/src/components/game/RulesetCombatMenu.tsx` (+159 -30) 📝 `packages/client/src/components/game/RulesetCombatScreen.tsx` (+107 -55) 📝 `packages/client/src/components/game/RulesetItemPicker.tsx` (+2 -0) 📝 `packages/client/src/components/game/RulesetTurnOrder.tsx` (+5 -3) 📝 `packages/client/src/components/game/TacticalCombatUI.tsx` (+7 -1) 📝 `packages/client/src/components/rulesets/RulesetCatalogPicker.tsx` (+13 -8) 📝 `packages/client/src/components/rulesets/RulesetSheetBuilder.tsx` (+138 -21) 📝 `packages/client/src/lib/ruleset-combat-log-rich.ts` (+10 -2) 📝 `packages/client/src/lib/ruleset-combat-log.ts` (+27 -0) 📝 `packages/client/src/lib/ruleset-combat-menu.ts` (+117 -13) 📝 `packages/client/src/lib/ruleset-sheet-view.ts` (+62 -0) 📝 `packages/client/src/localization/locales/en.json` (+54 -9) _...and 19 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`. ## Linked issue Closes #8137 ## Why this change Before: a player who opened their ruleset sheet in a game got a debugging panel. It listed every condition the ruleset defines as a toggle (hundreds of them for a full ruleset), could be edited mid-fight, and showed no attacks or summary. In a fight, the menu buried the useful options under a "Ready" row for every action and full-height rows for options with nobody in reach. Cards showed the base defense instead of the one an attack is rolled against. Tokens printed letters that overflowed small squares, and the end card said nothing about who fell or what was spent. The guided builder offered spells and languages the character already had, ticked steps before their source existed, and lost its picks when a card was copied into a game. After: the sheet opens on an Overview (summary, ability scores with modifiers, pools, attacks with to-hit and damage, active conditions with an "Add condition…" search) plus a tab for each list the ruleset asks for. It is settled during a fight, except for health and pools. The fight screen shows the effective defense, per-target odds, save and damage for areas, what a reaction changes, condition badges and a legend. It also has one Ready row per action and phone tabs for Board, Actions, Turn order and Log. The end card lists each foe's fate and each party member's spent pools. The builder marks entries already held as "Already known" and keeps its picks on game copies. It also offers one class at a time and can start over. ## What changed - **A player's ruleset sheet.** - Overview first, then one tab per list that declares `display.tab`, grouped by `display.by` with `display.mark` ticks. A tab whose lists are hidden falls back to the Overview. - Only active conditions show, with icons and a remove button; the rest are behind a search. Conditions marked `pickable: false` are left out. - The sheet is read-only in a fight, except pools and wound tracks. - There is one "Edit card" button and one "Edit ruleset sheet" button. - **Fight screen.** - Cards show the defense an attack is actually rolled against: the ground's cover always, and the cover and high ground from the foe whose turn it is. - The target step and the hover text give each target's odds. - Area aims and cards with a save say "DEX save DC 15, about 28 damage (14 on a save)". - A held hit says what rides on it, and an answer that raises defense says "Armor Class 13 → 18, the hit misses". - Menu folds: - "Ready an action" is one row per action, which opens onto its two moments and stays open as the player left it. - Options with nobody in reach fold into one line. - Contests fold the way standard actions do. - Abilities drawn from a list sit under that list's heading. - Tokens: - letters are sized by the token, with one letter on small squares and the full name on hover; - a thicker health bar; - condition badges. - A board legend. - Moves on a touch screen take two taps: a preview, then a confirm. - The log heads each turn with whoever took it, and an aim no longer prints coordinates. - The end card lists each foe as defeated, fled or still standing, and what each party member spent. - Enemy AI personas are no longer shown to players. - The accent colour stops cycling while a fight is on screen, on the ruleset board and the tactical board alike. - **Phones.** - Four tabs: Board, Actions, Turn order and Log. - The bar under the board keeps one height, so the board does not jump between steps. - **Guided builder.** - Entries the sheet already holds are marked "Already known" (and named so to a screen reader), and are not offered or counted. A name match counts only for a row that is nothing but its name. - A multi-pick step shows one pick at a time, with "Add another". - Steps wait for earlier unfinished steps before ticking. - Info shows the entry's stat line. - Raw filter values are no longer printed as chips. - Summary labels no longer truncate, and signed values show their sign. - A choice that builds on held training (Expertise) says so before it opens, and the trained line names the tier. - "Start over with the builder" rebuilds a sheet from scratch. - Game copies of a card keep the builder's picks. - **Capability API 1.378** (ruleset-only keys a ruleset declares when it wants them, documented in `docs/extending/writing-rulesets.md`): - pool `unit` and `units`; - list `display` (`tab`, `by`, `mark`); - live text `hideWhen` on a field or a derived value; - condition `pickable: false`; - track `showWhenSet`; - item toggle `onLabel` and `offLabel`; - item use `title`; - combat modifier `label`; - derived `signed`; - creature trait text up to 1200 characters. A package using any of them must declare 1.378. (1.377 is the Motion 14 host slot from #8134.) ## Validation - [x] `pnpm check` passes locally. Every step was run separately (format, lint, localization, impeccable, e2e types, token estimation types, build). - [ ] 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 - Every ruleset, combat and capability package regression passes: the `game-ruleset-*`, `ruleset-*`, `combat-*`, `capability-package-*` and `game-combat-*` scripts. - New: `ruleset-sheet-words.regression.ts` covers the 1.378 keys, the gate, list headings in the menu, hidden text (including a derived `hideWhen` with no comparison, refused by both the validator and the published schema), held entries and per-target odds. - Additions to `ruleset-combat-director.regression.ts` cover effective defense, Shield's raised defense on a held hit, and what rides on the hit. - Additions to `ruleset-combat-screen-client.regression.ts` cover the save wording. - Not clicked through in a browser yet. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs: `docs/extending/writing-rulesets.md` and the regenerated `docs/extending/ruleset.schema.json`. - [x] Translated docs follow-up is tracked on #7512. - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) None yet. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:10:34 +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#8123
No description provided.