mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7375
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6903
Author: @kolacheee
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @kolacheee
Base:
staging← Head:feat/ruleset-items-money📝 Commits (2)
7dda27cfeat(rulesets): money: coins in the bags, paying and earning, coin layers and loot (#6901)d2fb52ftest(rulesets): the money turn's retelling is checked to succeed and pay again (#6901)📊 Changes
39 files changed (+1541 additions, -72 deletions)
View changed files
📝
CHANGELOG.md(+4 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+39 -0)📝
docs/examples/rulesets/gravewatch.json(+5 -3)📝
docs/extending/ruleset.schema.json(+32 -0)📝
docs/extending/writing-rulesets.md(+26 -7)📝
docs/game/party-and-npcs.md(+10 -0)📝
e2e/game-ruleset-fight-fixture.ts(+8 -1)➕
e2e/game-ruleset-money.e2e.ts(+196 -0)📝
packages/client/src/components/game/GameInventory.tsx(+55 -0)📝
packages/client/src/components/game/GameSurface.tsx(+10 -1)📝
packages/client/src/components/game/RulesetItemPicker.tsx(+18 -6)📝
packages/client/src/localization/locales/en.json(+4 -0)📝
packages/server/src/routes/generate.routes.ts(+22 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+18 -0)📝
packages/server/src/services/game/gm-prompts.ts(+37 -1)📝
packages/shared/src/features/rulesets/item-book.ts(+109 -9)📝
packages/shared/src/features/rulesets/layers.ts(+19 -0)📝
packages/shared/src/features/rulesets/loot.ts(+3 -1)📝
packages/shared/src/index.ts(+1 -0)📝
packages/shared/src/schemas/capability-package.schema.ts(+6 -1)...and 19 more files
📄 Description
Linked issue
Closes #6901
Why this change
What changed
coin:<unit id>, named for its unit, so it gets everything a stack already has: each character's bag, giving, splitting, merging, carry-over and a turn's restart. It weighs one unit of the carry stat perperWeightof its family and counts toward its bearer's load.[inventory: action="pay" amount="3 shillings" who="Ada"]andaction="earn". A payment comes out of one bag (the player's withoutwho=), inside the coin's family only: the largest coins that fit go first, then the smallest coin left that covers the rest is broken and the change comes back in smaller coins. The answer says what was paid and what came back ("Paid with crowns ×1; shillings ×2 back."), and a payment the purse cannot meet, a coin the ruleset does not have, or any payment in a ruleset without currencies is refused. An earning is an add of the coin. The journal lists both, and the screen announces each ("You paid shillings x3.").currenciesnamesremoveUnitsorremoveFamilies; a family's smallest coin goes only with its family. Like a catalog entry a layer hides, the ruleset keeps the coin: the purse, the picker, paying, earning and loot leave it out, coins already held stay in the bag, and a price named in it is said at the same worth in the largest coin left that pays it exactly. Taking the coins out of the layered definition instead made its validation fail wherever an item is priced in them, which silently dropped the whole layer.coins(a unit id) instead of an item or a filter.currenciesand the capability list indocs/extending/writing-rulesets.md, a Money section indocs/game/party-and-npcs.md, the 1.64 record indocs/development/game-rulesets-and-sheets-implementation.md, the regenerated JSON schema and CHANGELOG entries.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Local run on this branch (Fedora):
pnpm check,pnpm localization:checkand prettier: clean.pnpm regression: 479 of 479.pnpm smoke:ui: 7 passed.Lanes:
game-ruleset-money.regression.ts: every import refusal; the 1.64 gate (the example, a coin loot line alone, a layer's coins alone, neither); coin refs; the book's coins (weights fromperWeight, the load, found by id or label, one or many, the family largest first, a name finding a coin, salt as its own family); paying (largest first, breaking the smallest coin that covers the rest, change in smaller coins, one bag only, change into the payer's bag, never across families); the Game Master's pay and earn (answers, notes,now, a bare pay, an item and a count as an amount, the journal, every refusal, amounts by the thousand, an earning into the player's bag); the purse text and an item's price for the Game Master; the pay and earn line with and without coins; the long night (the layer still applies, the ruleset keeps its coins, the book hides the crown but reads a held one, prices at the same worth, a price no coin pays exactly, a family gone taking its prices, the purse and a payment ignoring hidden coins, the Game Master taught only the coins left); loot dropping coins, and not a hidden one.game-inventory-turn.regression.tsgains a real turn under the long night: the prompt carries the purse and a price in shillings and never names crowns, the saved reply pays largest first, and a regenerated reply pays once.game-ruleset-loot.regression.tspins the browser's listing keeping the long night.e2e/game-ruleset-money.e2e.ts: the purse line, the picker's Coins list, and a real turn against a local model fixture whose Game Master charges 3 shillings and gives 2 pennies (both announced, the bag and the purse line changed); and a long night game whose purse and Coins list leave the crown out while a held crown stays, and whose picker prices the watch pistol at 15 shillings.57 deliberate breaks. 50 were caught on the first run. Five slipped past, and four new cases now catch them: a coin found by its id and by its name in the singular when those differ (Gravewatch's pence written as
d), a family that lists its coins largest first, the same coin in two bags, and an earning of 50,000 coins. The other two showed conditions in the payment that could never change its result (every coin still held after the first pass is worth more than what is left, and change is always worth less than the coin broken), so they were deleted. All 55 that remain are caught.Local CodeRabbit raised two findings. One was real: the implementation record still had a placeholder for the break count, now filled in. One was declined: it asked to drop currency families left with no coins before the Game Master's pay line reads a family's first and last coin, but no family can be left empty. The import refuses a layer that takes a family's smallest coin without the whole family (pinned by the money lane), so every family left keeps its coin worth 1.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs touched:
docs/extending/writing-rulesets.md,docs/game/party-and-npcs.mdanddocs/development/game-rulesets-and-sheets-implementation.md(all carried bydocs-i18n),CHANGELOG.md, the generateddocs/extending/ruleset.schema.jsonand the Gravewatch example. Translations: #6813 is the items arc's follow-up; this PR is added to it there.UI evidence (if applicable)
The purse line above the stacks reads "Coin: crowns x1, shillings x1, pennies x12 (worth 84 pennies)" after a shilling is picked from the Coins list (captured by
e2e/game-ruleset-money.e2e.tsasmoney-purse.png).Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.