mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6876] [MERGED] Game Mode: fire modes, off-hand attacks, a damage floor and conditions on a hit for ruleset weapons #7365
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#7365
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/6876
Author: @kolacheee
Created: 9/29/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @kolacheee
Base:
staging← Head:feat/ruleset-items-fire-modes📝 Commits (3)
9a1ceaefeat(rulesets): fire modes, off-hand attacks, a damage floor and conditions on a hit (#6875)68169acfix(rulesets): conditions on a hit land after the blow, the picker forecasts a mode in each style, and clearer floor and on-hit words (#6875)d724312Merge remote-tracking branch 'origin/staging' into feat/ruleset-items-fire-modes📊 Changes
36 files changed (+1982 additions, -231 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+48 -0)📝
docs/examples/rulesets/ember-roads.json(+11 -1)📝
docs/examples/rulesets/gravewatch.json(+16 -2)📝
docs/extending/ruleset.schema.json(+128 -0)📝
docs/extending/writing-rulesets.md(+29 -5)📝
e2e/game-ruleset-ammo.e2e.ts(+6 -154)➕
e2e/game-ruleset-fight-fixture.ts(+160 -0)➕
e2e/game-ruleset-weapon-modes.e2e.ts(+168 -0)📝
packages/client/src/components/game/DirectedCombatUI.tsx(+2 -0)📝
packages/client/src/components/game/RulesetCombatBoard.tsx(+4 -3)📝
packages/client/src/components/game/RulesetCombatMenu.tsx(+72 -14)📝
packages/client/src/components/game/RulesetItemPicker.tsx(+32 -1)📝
packages/client/src/lib/ruleset-combat-log.ts(+1 -0)📝
packages/client/src/lib/ruleset-combat-menu.ts(+17 -2)📝
packages/client/src/localization/locales/en.json(+16 -0)📝
packages/server/src/routes/combat-director.routes.ts(+2 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+17 -0)📝
packages/server/src/services/game/ruleset-combat-director.service.ts(+40 -4)📝
packages/shared/src/features/combat-director.ts(+3 -0)...and 16 more files
📄 Description
Linked issue
Closes #6875
Why this change
What changed
attack.modes(up to six) are other ways to make the attack, each with alabeland what it changes:ammo(one attack's shots, so the weapon shoots something, and no more than a written clip holds),toHit(dice in a pool fight),target(a pool fight's per-die target moved, where it can move) andtargets(how many it may be aimed at, each its own roll). The fight menu asks "How is Hunting bow used?" once the attack is picked (after its initiative style, where there are styles), with "As it is" and each mode its holder has the shots for, and what each is expected to do. The attack is named for its mode ("Hunting bow (Volley)"), a held attack picks up in the same mode, and a mode the option does not offer is refused. A party member the Engine plays weighs every mode aimed at one target like any other way to attack.offHandnames the budget a second attack spends, and whether its damage keeps a positive ability (penalty-only, as 5e's two-weapon fighting). A weapon markedoffHand, once its holder has attacked this turn with another such weapon, offers a second attack on that budget, "Silver coffin nail, off hand" on the menu: one blow, and never a strike at somebody walking away.floor, the least a hit deals: a pool fight's harm after soak, or a summed fight's damage, before a save or a resistance halves it, and the log says so ("Raised to the weapon's floor of 1."). A spending blow is never raised.onHitputs a condition of the ruleset's on the target when the harm the blow dealt reachedatLeast, for someroundsor until something takes it off; immunity counts.offHand, its budget, a floor read off a stat that is no number, and an unknown condition. The install gate asks for 1.58 in the ruleset file and in catalog files.modes Volley (2 shots, -2 to hit, up to 2 targets),off hand (Quick),at least 1 on a hit before resistanceorMarked for 2 rounds when a hit deals 2 or more.docs/extending/writing-rulesets.md(whose line saying these come later is removed, and whose note on spending blows now says a floor does not raise them), the 1.58 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
9a1ceae07(one commit on stagingc4a695eb6):pnpm checkexits 0,pnpm localization:checkexits 0,pnpm regressionpasses 467/467, 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 31/31, and the game ruleset specs pass 12/12 on--project=mobile-chromium.Lanes:
game-ruleset-weapon-modes.regression.ts: every import refusal; the 1.58 gate (each new key on its own, the combat block'soffHandalone, and a catalog file); a volley at two targets and at one (two arrows either way, two less to hit, each its own roll), refused at three, an unknown mode refused and a mode not offered without its shots; a volley held by a hit window picking up as a volley; a pool mode moving the per-die target and taking a die; the off hand only after another off-hand weapon's attack (not after a spade, not alone, not the next turn), on the quick budget, one blow whatever the main attack's strikes, never in passing, withfullandpenalty-only; a floor in a pool fight under soak and a summed fight under a resistance; conditions on a hit at the number and not one short, for rounds or lasting, and refused by an immune creature; the director's command naming a mode (and refusing an unknown one) and the Engine's picker choosing a mode that is far likelier to land; item facts, the Game Master's line, the menu's words and the log.e2e/game-ruleset-ammo.e2e.tsnow takes its fight helpers from a shared fixture and leaves its bow's volley out.e2e/game-ruleset-weapon-modes.e2e.ts: in Ember Roads, the bow's details show its modes, the fight menu asks how it is used, a volley at the moth is confirmed and logged, and the saved inventory holds two fewer arrows; in Gravewatch, a nail's details say it is for the off hand and what it marks, no off-hand option appears before the first nail strikes, and "Silver coffin nail, off hand" then spends Quick.Sixty deliberate breaks, across the import checks, the gate, building the actions, the moded attack, the menu, resolution (a held attack's mode included), the off hand, the floor, conditions on a hit, the director's command and picker, the facts and the client's words, were each caught: 58 by the lanes, and dropping the mode from the client's command or skipping its mode step by
e2e/game-ruleset-weapon-modes.e2e.ts.Local CodeRabbit (
coderabbit review --agent --base staging, with the new files included): one finding, declined. It asked for the Game Master's answer to a fight window to carry a chosen style and mode as the turn's answer does; a window's menu never offers either (both are left out of an option taken at its moment), so no window answer can hold one.GitHub CodeRabbit, first review: fixed in
68169ac46, conditions on a hit now land after the blow ends what it ends (so one that ends on damage stays on), the Engine's picker expands modes before initiative styles (so a mode in a taking style forecasts no harm), and the floor and on-hit wording says "before resistance" and "when a hit deals"; each with a lane case, and the two reorders caught as deliberate breaks. Declined: coordinating the e2e import-policy toggle across workers (the same sequence nine specs already use, only moved into the fixture). After that commit,pnpm checkexits 0,pnpm regressionpasses 467/467 and both weapon e2e specs pass.No Game Master turn was run on a local model for this slice: what the model sees differently is the weapon's inventory line, and the Engine's own picker (not the model) chooses modes for the party members it plays, 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, picking Juno's hunting bow asks "How is Hunting bow used?" with "As it is · 100% to hit, about 8 damage" and "Volley · 92% to hit, about 8 damage · up to 2 targets"; in a Gravewatch fight, once Ada's first nail has struck, "Silver coffin nail, off hand · Spends Quick" appears (captured by
e2e/game-ruleset-weapon-modes.e2e.tsasruleset-modes-step.png,ruleset-modes-volley.png,ruleset-offhand-menu.pngandruleset-offhand-struck.png).Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.