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#7367
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/6882
Author: @kolacheee
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @kolacheee
Base:
staging← Head:feat/ruleset-items-use-in-fights📝 Commits (5)
4296cc3feat(rulesets): using items in ruleset fights, used up or spending charges (#6880)c819e3ddocs(rulesets): charges regained on a rest come in a later release (#6880)e514cb2fix(rulesets): an item's use says its pool target to hit, as a weapon does (#6880)d9b2abcfix(rulesets): charges read off a stat are held to the most a written count may be (#6880)7800103fix(rulesets): an item that gives its charges stat as less than one is refused (#6880)📊 Changes
38 files changed (+2599 additions, -172 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+48 -0)📝
docs/examples/rulesets/ember-roads.json(+21 -0)📝
docs/examples/rulesets/gravewatch.json(+27 -2)📝
docs/extending/ruleset.schema.json(+625 -0)📝
docs/extending/writing-rulesets.md(+40 -3)📝
e2e/game-ruleset-fight-fixture.ts(+1 -1)➕
e2e/game-ruleset-item-use.e2e.ts(+149 -0)📝
packages/client/src/components/game/GameInventory.tsx(+14 -0)📝
packages/client/src/components/game/RulesetItemPicker.tsx(+50 -0)📝
packages/client/src/lib/ruleset-combat-board.ts(+5 -1)📝
packages/client/src/lib/ruleset-combat-menu.ts(+1 -0)📝
packages/client/src/localization/locales/en.json(+17 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+16 -0)📝
packages/shared/src/features/ruleset-combat/ammo.ts(+45 -5)📝
packages/shared/src/features/ruleset-combat/encounter.ts(+156 -33)📝
packages/shared/src/features/ruleset-combat/grid.ts(+2 -0)📝
packages/shared/src/features/ruleset-combat/options.ts(+11 -1)📝
packages/shared/src/features/ruleset-combat/types.ts(+9 -3)📝
packages/shared/src/features/rulesets/invented-items.ts(+3 -0)...and 18 more files
📄 Description
Linked issue
Closes #6880
Why this change
What changed
use(Capability API 1.59): what using it does, in the words a catalog entry'smechanicsalready has (kindheal, attack, buff or debuff,amount,damageType,plus,attackRoll,save,applies,temporary,range,area,targets,targetCount,friendlyFire), with thebudgetit spends orfree, a weapon-styletoHitwhere it rolls, and its ownsaveDifficultywhere it asks a save (an item has no catalog source to read one off). What only a sheet row can mean (a poolcost,check,reaction,riderand the rest) is refused on a use: an item pays with itself.consumes: truetakes one off the stack;chargesspends that many of the item's owncharges(max, written down or read off a number stat), kept on its inventory stack, so a bell rung in one fight has fewer in the next. Charges are one item's, so an item that holds them is one to a stack.free(or both), used up and spending charges, charges on an item without any or an item's charges nothing spends, charges on a stack of several, a save with no number, an unknown save, condition, damage type or budget, a to-hit on a use that rolls none, a pool fight's harm dice off its die, temporary points on a wound track, and a stat read as the wrong kind. The install gate asks for 1.59 in the ruleset file and in catalog files.use (Act): Steel 7 save negates it, Rattled, 1 of 3 charges, and the log says "Poultice: 1 of 2 left.". An item the Game Master inventslike=one of these is used as that one is.docs/extending/writing-rulesets.md(whose line saying items are not used by their own rules yet now says that of using them outside a fight), the 1.59 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
4296cc3f9(one commit on staging9b313a48a; the second commit only rewords one docs line):pnpm checkexits 0,pnpm localization:checkexits 0,pnpm regressionpasses 471/471, andpnpm smoke:uipasses 7/7.--project=desktop-chromium, the ruleset, inventory, game dice and combat director 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,e2e/game-combat-director.e2e.ts) pass 33/33, and the game ruleset specs pass 14/14 on--project=mobile-chromium.Lanes:
game-ruleset-item-use.regression.ts: every import refusal; the 1.59 gate (the examples, charges alone, and a catalog file); a poultice on its holder and on a friend and never on a foe, spending the Action, used up and then refused; the Items group; a tonic on the quick budget beside a blow; a bell only while worn, its charges spent and kept between fights, a use that spends two, charges and a save's number read off a stat (and off one the item lacks); a use's own to-hit and a pool target; never a strike in passing; the write-back by stack id and a stack gone or given away refused; charges on a stack of one; the Engine's own party member healing whoever is hurt; item facts, the Game Master's lines and invented items.e2e/game-ruleset-item-use.e2e.ts: in Ember Roads, a poultice's details say what using it does, the Items group offers it with "2 left", pressing it on Juno is logged and the saved stack drops to one; in Gravewatch, a bound dawn bell's details show its use and "2 of 3 charges left", ringing it at the rats is logged and the saved stack keeps one charge.Sixty-nine deliberate breaks, across the import checks, the gate, building the actions, what is left, spending, the write-back, charges on a stack, invented items, the menu, the board and the facts, were each caught by the lanes.
Local CodeRabbit (
coderabbit review --agent --base staging, with the new files included): no findings.No Game Master turn was run on a local model for this slice: what the model sees differently is one more part of an item's inventory line, and the Engine's own picker (not the model) decides when a party member it plays uses an item, which a lane covers.
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 fight, the Items group offers "Poultice · Spends Action · 2 left · about 4 healed", and after it is pressed on Juno the log reads "Poultice: 1 of 2 left." then "Juno recovers 3, and is on 5 of 11."; in Gravewatch, ringing the dawn bell logs "Dawn bell: 1 of 3 left." (captured by
e2e/game-ruleset-item-use.e2e.tsasruleset-item-use-menu.png,ruleset-item-used.pngandruleset-item-charges.png).Summary by CodeRabbit
New Features
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.