[PR #8278] [MERGED] fix(game): rolled turns keep their trades and finish in one request by default; poolless harm and comma items land #8261

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

📋 Pull Request Information

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

Base: staging ← Head: fix/tag-leniency-live


📝 Commits (6)

  • 5d638f7 fix(game): a rewrite keeps the draft's trades, harm with no pool is health's, list items keep their commas
  • 0dd3d76 feat(game): finish rolled turns in one request by default
  • 29f2a80 Merge origin/staging into fix/tag-leniency-live
  • 83136e2 test(game): tests of the outcome rewrite turn one-request dice off themselves
  • 862ac33 Merge origin/staging into fix/tag-leniency-live
  • 4cd8f8a fix: rewrite prompt says the draft's trades are kept

📊 Changes

25 files changed (+284 additions, -65 deletions)

View changed files

📝 docs/game/dice-and-skill-checks.md (+1 -1)
📝 docs/game/getting-started.md (+1 -1)
📝 e2e/core-flows.e2e.ts (+7 -1)
📝 e2e/game-one-request-dice.e2e.ts (+3 -1)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+1 -1)
📝 packages/client/src/components/game/GameSurface.tsx (+1 -1)
📝 packages/server/src/routes/encounter.routes.ts (+32 -2)
📝 packages/server/src/routes/generate.routes.ts (+10 -10)
📝 packages/server/src/services/game/dice-rewrite-costs.ts (+59 -14)
📝 packages/server/src/services/game/one-request-dice.ts (+3 -2)
📝 packages/shared/src/features/rulesets/sheet-commands.ts (+8 -1)
📝 packages/shared/src/types/chat.ts (+1 -1)
📝 packages/shared/src/utils/game-inventory-tags.ts (+20 -9)
📝 packages/shared/src/utils/sheet-command-tag.ts (+17 -6)
📝 scripts/regressions/game-dice-commands.regression.ts (+1 -0)
📝 scripts/regressions/game-dice-rewrite-costs.regression.ts (+30 -1)
📝 scripts/regressions/game-final-planning.regression.ts (+6 -1)
📝 scripts/regressions/game-ruleset-live.regression.ts (+16 -0)
📝 scripts/regressions/game-ruleset-markets.regression.ts (+13 -0)
📝 scripts/regressions/game-text-dice.regression.ts (+1 -1)

...and 5 more files

📄 Description

Linked issue

Closes #8277

Why this change

  • Before: a rolled turn's rewrite that left out the draft's buy tags lost the purchase, and the player was never told. An injury tag with no pool= was refused as malformed. An inventory list of comma-named items was split at every comma. A fight setup with an attack kind: "damage" was refused. Every rolled turn cost two requests unless a chat turned on one-request dice.
  • After: the draft's trades survive the rewrite, the injury lands on health, each comma item stays whole, the fight starts, and rolled turns finish in one request unless a chat turns that off.

What changed

  • A rolled turn's rewrite keeps the draft's buys, sales, payments, gifts, and gear worn, bound, or used. These are put back when the rewrite drops them, the same way spends already are. Items found and coin earned are still the rewrite's to say, since the dice decide them. Games without a ruleset keep trades too.
  • A sheet damage, heal, or temp tag that names no pool goes to the ruleset's health pool, and the saved tag names that pool. A spend still has to name its pool.
  • A sheet tag's unquoted value runs to the next attribute, so who=Ulfgar Stonejaw is the whole name.
  • In an inventory list, each item whose name holds a comma is read whole when the ruleset, a coin, or a held stack knows that name.
  • A fight setup's attack kind written as a synonym ("damage", "healing", "support", "control", and so on) reads as its kind. An unknown kind is left out instead of refusing the fight.
  • "Finish rolled turns in one request" is on by default, including for chats that never set it. Only a chat that turned it off keeps the outcome rewrite. The docs say so.

Validation

  • Regressions pass locally: game-dice-rewrite-costs (trades kept), game-ruleset-live (poolless and unquoted injury), game-ruleset-markets (comma list), ruleset-combat-director-route (attack kinds), one-request-dice-gate (new default), and the dice and Game turn regressions updated to turn the switch off where they test the rewrite
  • Server and client typecheck, prettier
  • 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

  • Found in an end-to-end Game Mode pass against an SRD ruleset; covered here by regressions.

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): noted on #7512
  • Version/release files updated (only if this PR includes a version bump)

🔄 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/8278 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/tag-leniency-live` --- ### 📝 Commits (6) - [`5d638f7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5d638f7a3341e2a5d7b9ae5a584b5a19dafb3668) fix(game): a rewrite keeps the draft's trades, harm with no pool is health's, list items keep their commas - [`0dd3d76`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0dd3d76fd1acb414069c2dfa02384bac6d87b5a5) feat(game): finish rolled turns in one request by default - [`29f2a80`](https://github.com/Pasta-Devs/Marinara-Engine/commit/29f2a80992f7bf5444d446aa35d87c5b1d178a6a) Merge origin/staging into fix/tag-leniency-live - [`83136e2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/83136e20c8728d27065d5ed237e1eed9ae9a1fe0) test(game): tests of the outcome rewrite turn one-request dice off themselves - [`862ac33`](https://github.com/Pasta-Devs/Marinara-Engine/commit/862ac33af81c9b367f3ca2e58b49685660c6259f) Merge origin/staging into fix/tag-leniency-live - [`4cd8f8a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4cd8f8a18375a260aea0900942d2c4ffa9411736) fix: rewrite prompt says the draft's trades are kept ### 📊 Changes **25 files changed** (+284 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `docs/game/dice-and-skill-checks.md` (+1 -1) 📝 `docs/game/getting-started.md` (+1 -1) 📝 `e2e/core-flows.e2e.ts` (+7 -1) 📝 `e2e/game-one-request-dice.e2e.ts` (+3 -1) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameSurface.tsx` (+1 -1) 📝 `packages/server/src/routes/encounter.routes.ts` (+32 -2) 📝 `packages/server/src/routes/generate.routes.ts` (+10 -10) 📝 `packages/server/src/services/game/dice-rewrite-costs.ts` (+59 -14) 📝 `packages/server/src/services/game/one-request-dice.ts` (+3 -2) 📝 `packages/shared/src/features/rulesets/sheet-commands.ts` (+8 -1) 📝 `packages/shared/src/types/chat.ts` (+1 -1) 📝 `packages/shared/src/utils/game-inventory-tags.ts` (+20 -9) 📝 `packages/shared/src/utils/sheet-command-tag.ts` (+17 -6) 📝 `scripts/regressions/game-dice-commands.regression.ts` (+1 -0) 📝 `scripts/regressions/game-dice-rewrite-costs.regression.ts` (+30 -1) 📝 `scripts/regressions/game-final-planning.regression.ts` (+6 -1) 📝 `scripts/regressions/game-ruleset-live.regression.ts` (+16 -0) 📝 `scripts/regressions/game-ruleset-markets.regression.ts` (+13 -0) 📝 `scripts/regressions/game-text-dice.regression.ts` (+1 -1) _...and 5 more files_ </details> ### 📄 Description ## Linked issue Closes #8277 ## Why this change - Before: a rolled turn's rewrite that left out the draft's buy tags lost the purchase, and the player was never told. An injury tag with no `pool=` was refused as malformed. An inventory list of comma-named items was split at every comma. A fight setup with an attack `kind: "damage"` was refused. Every rolled turn cost two requests unless a chat turned on one-request dice. - After: the draft's trades survive the rewrite, the injury lands on health, each comma item stays whole, the fight starts, and rolled turns finish in one request unless a chat turns that off. ## What changed - A rolled turn's rewrite keeps the draft's buys, sales, payments, gifts, and gear worn, bound, or used. These are put back when the rewrite drops them, the same way spends already are. Items found and coin earned are still the rewrite's to say, since the dice decide them. Games without a ruleset keep trades too. - A sheet `damage`, `heal`, or `temp` tag that names no pool goes to the ruleset's health pool, and the saved tag names that pool. A `spend` still has to name its pool. - A sheet tag's unquoted value runs to the next attribute, so `who=Ulfgar Stonejaw` is the whole name. - In an inventory list, each item whose name holds a comma is read whole when the ruleset, a coin, or a held stack knows that name. - A fight setup's attack kind written as a synonym ("damage", "healing", "support", "control", and so on) reads as its kind. An unknown kind is left out instead of refusing the fight. - "Finish rolled turns in one request" is on by default, including for chats that never set it. Only a chat that turned it off keeps the outcome rewrite. The docs say so. ## Validation - [x] Regressions pass locally: `game-dice-rewrite-costs` (trades kept), `game-ruleset-live` (poolless and unquoted injury), `game-ruleset-markets` (comma list), `ruleset-combat-director-route` (attack kinds), `one-request-dice-gate` (new default), and the dice and Game turn regressions updated to turn the switch off where they test the rewrite - [x] Server and client typecheck, prettier - [ ] 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) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Found in an end-to-end Game Mode pass against an SRD ruleset; covered here by regressions. ## 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): noted on #7512 - [ ] Version/release files updated (only if this PR includes a version bump) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 04:04:11 +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#8261
No description provided.