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#7378
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/6908
Author: @kolacheee
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @kolacheee
Base:
staging← Head:feat/ruleset-items-classic-fights📝 Commits (4)
e18e2d4feat(rulesets): a ruleset's items fight by their own use in Classic and Tactical battles (#6905)bae5635fix(rulesets): a plain item sharing a ruleset item's name keeps its own guess in either order (#6905)68063a6docs: the I8-1 record holds its own break count, and an earlier record keeps its own7b0948fdocs: the item-gate record keeps its own break count📊 Changes
20 files changed (+1163 additions, -56 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+31 -0)📝
docs/extending/writing-rulesets.md(+15 -2)📝
docs/game/combat.md(+1 -1)➕
e2e/game-ruleset-classic-items.e2e.ts(+196 -0)📝
packages/client/src/components/game/GameSurface.tsx(+15 -7)📝
packages/server/src/routes/combat-director.routes.ts(+7 -11)📝
packages/server/src/routes/encounter.routes.ts(+30 -12)📝
packages/server/src/routes/game.routes.ts(+36 -11)📝
packages/server/src/services/game/combat.service.ts(+9 -5)📝
packages/server/src/services/game/game-inventory.service.ts(+23 -0)📝
packages/shared/src/features/rulesets/combat-bridge.ts(+2 -2)➕
packages/shared/src/features/rulesets/item-fight.ts(+104 -0)📝
packages/shared/src/index.ts(+1 -0)📝
packages/shared/src/types/combat-encounter.ts(+3 -0)📝
scripts/regressions/combat-boss-provider.regression.ts(+1 -1)📝
scripts/regressions/combat-director-route.regression.ts(+11 -0)➕
scripts/regressions/game-ruleset-classic-items.regression.ts(+669 -0)📝
scripts/regressions/hybrid-terrain-route.regression.ts(+2 -2)📝
scripts/regressions/ruleset-combat-director-route.regression.ts(+5 -2)📄 Description
Linked issue
Closes #6905
Why this change
use(Capability API 1.59): a poultice could be guessed as a weapon. The ruleset's items with no use (a coat, a spade) were offered too, doing whatever was guessed, and a ruleset with native items off offered nothing at all. This is slice I8-1 of the ruleset items plan.What changed
useis its fight effect (rulesetItemFightEffect, newfeatures/rulesets/item-fight.ts):healheals and anattackharms by a share of the target's maximum health, from the average of itsamount, on the scale the combat bridge already reads a catalog entry's numbers on (an average of 7 is 0.22 of a maximum, from 0.05 to all of it);targets, or a friend for a heal or buff and a foe otherwise;consumes: truespends one, and a use without it keeps the item.gameFightItems): plain items while native items are on, and the ruleset's own items only when they have an effect. A guess for one of the ruleset's items, or one that claims to be the ruleset's, is dropped. A game without ruleset items is unchanged: every item is guessed at.gate), is not offered in these battles yet, as the combat bridge leaves out a skill whose cost it cannot charge.native: falseand "What reads items" lines indocs/extending/writing-rulesets.md, the Items line indocs/game/combat.md, the I8-1 record indocs/development/game-rulesets-and-sheets-implementation.md, and a CHANGELOG entry. No Capability API change: every key read here shipped with 1.59.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Local run on this branch, rebased onto staging with the money slice (Fedora):
pnpm check,pnpm localization:checkand prettier: clean.pnpm regression: 480 of 480. After the last fix, 479 of 480:mari-completion-framestimed out while the e2e ran beside it, and passes alone.pnpm smoke:ui: 7 passed.Lanes:
game-ruleset-classic-items.regression.ts: the mapping (the poultice, a firepot with fire and Shaken for three rounds, a war horn's buff, a name the fight lists it by, the floor and the ceiling, charges and a gate left out, no use, a heal with no amount, an attack with nothing, a condition alone as a status,targets, a debuff and a buff with no strength); which items a battle offers (native on, native off, no book); the heal strength (a ruleset heal by its power, a guessed heal by its name); the server's own reading; the encounter's start through Fastify against a local model fixture (the prompt names the ruleset's items, their guesses are dropped, native off asks for none); the Classic round route (a forged effect replaced, a coat and a missing item refused, a plain rope used, a plain rope marked as the ruleset's still healing by its name, native off); the screen-played Tactical route (the poultice, the coat and a missing item refused, the rope taken); and the director's start (the forged effects replaced, the coat not offered).combat-director-route.regression.ts: the cursed ring that proves a bound cursed item cannot be spent now has a use, since a ruleset item with none is no longer offered.combat-boss-provider,hybrid-terrain-routeandruleset-combat-director-routefollow the new native-off prompt text and refusal.e2e/game-ruleset-classic-items.e2e.ts: a real encounter start against a local model fixture, then a Classic battle whose Items menu offers the poultice as "heals 1d4 + 1, range 0" and the rope as guessed, leaves the coat out (even with an older guess for it saved in the fight), and whose poultice heals 11 of 100 and leaves two in the bag.40 deliberate breaks, each caught by these lanes and the e2e. One slipped past on the first run: the screen hid a ruleset item only by the absence of its effect, so dropping the check that the effect is the Engine's own went unseen. The e2e now seeds a fight saved with an older guess for the coat, which must stay hidden.
Local CodeRabbit raised three findings over two passes:
rulesetmark in the Classic round route. The route's schema strips unknown keys, so the mark never reaches the handler; the lane now proves it (a plain rope marked as the ruleset's heals by its name, 30 of 100, not the forged strength).gameInventoryNameKey. The Engine names each worked effect with its line's name verbatim, so the exact comparison is already right.The first full gate run caught one more thing:
game-combat-ai.e2e.tshands a Classic fight a Potion the chat does not hold, and the new "only what the battle offers" check had started refusing that in games without a ruleset too. That check now applies only in a game whose ruleset has items; a game without them is checked no more than it ever was (pinned in the lane for both routes, and by two more breaks).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/combat.mdanddocs/development/game-rulesets-and-sheets-implementation.md(all carried bydocs-i18n), andCHANGELOG.md. Translations: #6813 is the items arc's follow-up; this PR is added to it there.UI evidence (if applicable)
A Classic battle's Items menu offers "Rope: Tangles a foe's legs" and "Poultice ×3: heals 1d4 + 1, range 0", and not the leather coat (captured by
e2e/game-ruleset-classic-items.e2e.tsasclassic-ruleset-items.png).Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.