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#7357
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/6851
Author: @kolacheee
Created: 9/29/2026
Status: ✅ Merged
Merged: 9/29/2026
Merged by: @kolacheee
Base:
staging← Head:feat/ruleset-items-requirements📝 Commits (2)
021a74bfeat(rulesets): item requirements, abilities from items, and levels off a derived value (#6846)7a13603fix(rulesets): name every requirement value, and keep derived levels apart from tracks (#6846)📊 Changes
39 files changed (+2123 additions, -120 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+42 -0)📝
docs/examples/rulesets/ember-roads.json(+31 -1)📝
docs/examples/rulesets/gravewatch.json(+8 -1)📝
docs/extending/ruleset.schema.json(+692 -1)📝
docs/extending/writing-rulesets.md(+41 -7)📝
e2e/game-ruleset-wearing.e2e.ts(+118 -1)📝
packages/client/src/components/game/RulesetItemPicker.tsx(+31 -9)📝
packages/client/src/lib/ruleset-combat-log.ts(+10 -3)📝
packages/client/src/localization/locales/en.json(+6 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+29 -0)📝
packages/server/src/services/game/gm-prompts.ts(+2 -1)📝
packages/shared/src/features/ruleset-combat/encounter.ts(+19 -9)📝
packages/shared/src/features/ruleset-combat/options.ts(+2 -1)📝
packages/shared/src/features/ruleset-combat/resolve.ts(+8 -2)📝
packages/shared/src/features/ruleset-combat/types.ts(+4 -3)📝
packages/shared/src/features/rulesets/check-effects.ts(+34 -10)📝
packages/shared/src/features/rulesets/invented-items.ts(+70 -7)📝
packages/shared/src/features/rulesets/item-book.ts(+90 -7)📝
packages/shared/src/features/rulesets/sheet-math.ts(+32 -10)...and 19 more files
📄 Description
Linked issue
Closes #6846
Why this change
What changed
requires, each a value off the wearer's sheet (any value reference, live ones too), the least it must be, andotherwise: what applies on their checks while it is worn and they fall short, in the worn-effect vocabulary. An unmet requirement cannot change an ability, so a requirement can never feed itself.wornorcarriedeffect maysetan ability to at least a number oraddto it (up to 12 per effect). The highest set and the sum of the adds apply before the sheet is worked out, inside the ability's own range, so the sheet, derived values, checks, the Game Master's sheet block and fights all read the changed ability. Each item applies once, however many stacks.derivedinstead oftrack(one of them), so a ruleset can say "carrying 10 bulk or more slows you" with a derived value that sums an item stat. It counts on checks outside a fight and in fights, and the fight log names it.+Nor-Non an ability's name inworn=orcarried=, held to the rarity'sbonus; asetcopied fromlike=is left out at a capped rarity, andlike=brings its requirements. A small local model often wrote the bonus asBrawn +1, insidestats=, or besidetags="none", so a proposal now reads a number after the name, liftsworn=,carried=andsummary=out ofstats=when the ruleset has no stat of that name and the part was not also given on its own, and readsnoneas an empty list of tags, stats or slots.requires, an effect'sabilities(in the ruleset file and in catalog files) and a level'sderived; the published JSON schema mirrors the one-of level, abilities as an item effect's content, and no abilities in an unmet requirement.rulesetReadsItemsis now simply "the ruleset has anitemsblock", since abilities and requirements can come from any item.docs/extending/writing-rulesets.md, the 1.54 record indocs/development/game-rulesets-and-sheets-implementation.md, the regenerated JSON schema, and a CHANGELOG entry.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run by the agent on this branch at
021a74b1b(one commit on staging0cad58d35):pnpm checkexits 0 andpnpm localization:checkexits 0; Prettier passes on the changed source and lanes.pnpm regressionpasses 446/446, andpnpm smoke:uipasses 7/7.--project=desktop-chromium, the ruleset, inventory and game dice specs (e2e/game-ruleset-*.e2e.ts,e2e/ruleset-*.e2e.ts,e2e/game-inventory-*.e2e.ts,e2e/game-native-dice.e2e.ts,e2e/game-one-request-dice.e2e.ts) pass 20/20; the game ruleset specs pass 6/6 on--project=mobile-chromium.Lanes:
game-ruleset-requirements.regression.ts: every import refusal and the 1.54 gate (ruleset file, catalog file, each key on its own); abilities from items on the sheet, in a derived value, in the Game Master's sheet block and in a fight's initiative; requirements on checks, including one met by an item; derived levels on checks and in a fight, and their names in the fight log; item facts; invented items with ability bonuses held to the rarity; and each of a proposal's slips above, including through the Game Master's item book.game-ruleset-invented-items.regression.ts: a tag'stags,statsandslotswritten asnoneread as given and empty.game-inventory-turn.regression.ts: a real Game Master turn's Sneak check in Ember Roads now carrieseffects="-2" from="Bulk carried 10; Leather coat".e2e/game-ruleset-wearing.e2e.ts: the gauntlets make the in-game sheet's Brawn +2, their details say "While worn: Brawn at least 2", and the Gravewatch spade's say "Needs Sinew 3, otherwise: -1 on checks (Dig)".Forty-one deliberate breaks, across the format, the gate, ability changes, requirements, derived levels on checks and in fights, item facts, the screen and the invented-item slips, were each caught.
Local CodeRabbit (
coderabbit review --agent --base staging): two passes. The first had no findings. The second, after the proposal fixes and a rebase onto current staging, had one trivial finding, declined: it asked for a fixed numeric bound on an ability change'sset. An ability's ownminandmaxhave no fixed bound, and asetoutside the ability's range is already refused at import (the lane's "a set out of range" case), so a fixed number would be arbitrary and could refuse a valid ruleset.Game Master turns on a real local model (Gemma 4 E4B, Q8, through llama.cpp) on an isolated Engine from this branch, in Ember Roads with Ada (Brawn 0) wearing the ox-hide gauntlets:
stats=or wroteBrawn +1, and the ring came out with no effect. After them, 3 of 3 tellings invented the ring with +1 Brawn (twice worn, once carried); one of the three had writtenstats="worn=+1 Brawn", which is now lifted out.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.mdanddocs/development/game-rulesets-and-sheets-implementation.md(both carried bydocs-i18n),CHANGELOG.md, the generateddocs/extending/ruleset.schema.jsonand the two example rulesets. Translations: #6813 is the items arc's follow-up; this PR is added to it there.UI evidence (if applicable)
In an Ember Roads game where Ada wears the ox-hide gauntlets, the in-game sheet's Brawn card shows +2 and the gauntlets' details say "While worn: Brawn at least 2"; in Gravewatch the grave spade's details say "Needs Sinew 3, otherwise: -1 on checks (Dig)" (checked by
e2e/game-ruleset-wearing.e2e.ts, desktop and phone).Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.