mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8623] [MERGED] Let a ruleset layer change where items are sold and what drops (Capability API 1.813) #8710
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#8710
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/8623
Author: @kolacheee
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @kolacheee
Base:
staging← Head:claude/project-thread-hl9xui📝 Commits (2)
86e4ce2Let a ruleset layer change where items are sold and what drops (Capability API 1.813)1bea058Refuse a ruleset whose market and layers' unsold wares together pass 24📊 Changes
11 files changed (+744 additions, -50 deletions)
View changed files
📝
docs/extending/ruleset-items.md(+2 -1)📝
docs/extending/ruleset-layers-and-translations.md(+20 -2)📝
docs/extending/ruleset.schema.json(+185 -0)📝
docs/game/rulesets.md(+1 -1)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+15 -0)📝
packages/shared/src/features/rulesets/layers.ts(+34 -0)📝
packages/shared/src/features/rulesets/market.ts(+9 -1)📝
packages/shared/src/schemas/capability-package.schema.ts(+7 -1)📝
packages/shared/src/schemas/ruleset.schema.ts(+142 -41)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+3 -3)➕
scripts/regressions/game-ruleset-layer-items.regression.ts(+326 -0)📄 Description
Requested by Alyssa · project thread
Linked issue
No issue: requested by the maintainer for the SRD 5.1 ruleset's Low magic layer, which ships in a follow-up 5e package (1.0.2) to the Agents catalog.
Why this change
A low-magic setting keeps magic items in the world but makes them rare and keeps them out of shops. Today a layer can only hide catalog entries, which removes an item from the game entirely (no loot, no Game Master hand-outs). Layers had no way to change a market or a loot table.
What changed
items(Capability API 1.813), narrowing or replacing only, like the rest of a layer:market.removeSellers: sellers there are none of while the layer is on. A market always keeps at least one seller; a removal that would empty it (even two layers together) is not made, because a market with no sellers lets anybody sell everything.market.unsold: item filters no seller has among their wares, appended to the market's own newunsold.lootTables: replace tables the ruleset already has, by id, with the same shape; the last active layer that replaces one wins.items.market.unsoldon the base market: an item it picks is sold at no place (rulesetItemSoldRankis past every place), so it is never a ware, is left out of the Game Master's MARKET block and cannot be bought as one. A seller'sstocktable may still roll it, and sellers still buy it back.layered()in one place, so the market, the item book, loot rolls, combat loot and the prompt all read the layered items with no change of their own. Nothing is added to the catalogs, so an unsold item stays an item the game offers.itemsor a market'sunsold;supportedCapabilityApito 1.813;ruleset.schema.jsonregenerated.unsold), Game Mode rulesets page (one clause).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run by Claude, not a human check:
scripts/regressions/game-ruleset-layer-items.regression.tson Gravewatch: sellers removed,unsoldappended, tables replaced in order, base definition untouched, two layers that would empty the market keep its sellers, last replacement wins; an unsold rare item is refused (not-here) while a common arm sells; the smith's replaced odd lot still sells the pistol from stock; the MARKET block lists no rare ware and no chapel; import refusals; the 1.813 gate.2e0dadf0c:game-ruleset-layer-items,game-ruleset-layers,game-ruleset-markets,capability-package-lifecycle; before the rebase alsoruleset-layers-client,game-ruleset-money,game-ruleset-loot.packages/sharedlint (tsc) and servertsc --noEmitclean; Prettier clean on changed files;ruleset.schema.jsonup to date.pnpm check, the app, Docker. Local Node was 22, not 24.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Translation follow-up: #8624.
Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01F2Yga6tiUUAsPShc6cnJui
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.