mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8220] [MERGED] feat(rulesets): fights for symbol-pool rulesets (combat.kind symbol-pool, Capability API 1.382) #8192
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#8192
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/8220
Author: @kolacheee
Created: 10/23/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @kolacheee
Base:
staging← Head:claude/project-thread-o9hpq2📝 Commits (10+)
de1e495feat(rulesets): fights for symbol-pool rulesets (combat.kind symbol-pool, 1.382)7aacdf3test(rulesets): moving-initiative pool message covers symbol-pool fights135d690Merge remote-tracking branch 'origin/staging' into claude/project-thread-o9hpq28b571edfix(rulesets): price and deliver symbol spends as the fight doesda2b1abMerge remote-tracking branch 'origin/staging' into claude/project-thread-o9hpq2740a105fix(rulesets): never charge symbols for a condition that would not land7f2b5a1fix(rulesets): a symbol spend is bought only as often as it landsa1873b8Merge remote-tracking branch 'origin/staging' into claude/project-thread-o9hpq2b0a7926fix(rulesets): one spend budget per throw for the fight and its forecastd65b993fix(rulesets): settle two spends contending for one holder by worth📊 Changes
22 files changed (+2748 additions, -62 deletions)
View changed files
📝
docs/extending/ruleset.schema.json(+598 -1)📝
docs/extending/writing-rulesets.md(+90 -8)📝
packages/client/src/lib/ruleset-combat-log.ts(+87 -1)📝
packages/client/src/localization/locales/en.json(+17 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+23 -0)📝
packages/server/src/services/game/ruleset-combat-director.service.ts(+12 -3)📝
packages/shared/src/features/ruleset-combat/creatures.ts(+5 -0)📝
packages/shared/src/features/ruleset-combat/encounter.ts(+136 -2)📝
packages/shared/src/features/ruleset-combat/index.ts(+3 -0)📝
packages/shared/src/features/ruleset-combat/options.ts(+69 -9)📝
packages/shared/src/features/ruleset-combat/pool.ts(+6 -0)📝
packages/shared/src/features/ruleset-combat/resolve.ts(+288 -10)➕
packages/shared/src/features/ruleset-combat/symbols.ts(+430 -0)📝
packages/shared/src/features/ruleset-combat/types.ts(+37 -1)📝
packages/shared/src/schemas/capability-package.schema.ts(+7 -1)📝
packages/shared/src/schemas/ruleset.schema.ts(+221 -18)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+6 -5)📝
scripts/regressions/game-ruleset-combat-moving-initiative.regression.ts(+1 -1)📝
scripts/regressions/game-ruleset-combat-pool.regression.ts(+1 -1)➕
scripts/regressions/game-ruleset-combat-symbol-pool.regression.ts(+689 -0)...and 2 more files
📄 Description
Linked issue
Closes #8219
Why this change
A ruleset whose checks throw symbol dice could not have an Engine fight: the validator refused its combat block, so every attack in such a game cost an LLM call. Letting the Engine take over those fights keeps Game Mode cheaper and gives ruleset creators the same option dice-pool and d20 rulesets already have.
What changed
combat.kind: "symbol-pool"(Capability API 1.382). It needs asymbol-poolresolution and a newcombat.symbolsblock; it refusesattackRollandpool.toHitdice (withupgradesof them upgraded) againstdefensedifficulty dice. Condition bonuses and the wound penalty become boost or setback dice; advantage adds a boost die, disadvantage a setback die. A hit needs the ruleset's needed net successes.symbols.damage.perSuccessfor each success (counts: "all"or"beyond"the needed ones), plus whatever spends buy, minus flat soak fromsymbols.soak(allandbyKind).symbols.spendsdeclares what leftover symbols buy: extra damage, a critical, a condition, a track move, or boost/setback dice on a combatant's next throw. Each spend names its symbol, cost, side (byattacker or target), when it applies (hit,miss,any), how many times it can be bought (max), and who it lands on (attacker, target, or an ally of either). The Engine picks the best set of spends for each side with a small knapsack and logs each one as asymbol-spendevent.upgrades; a sheet pool larger than its upgraded part is split into dice plus upgrades.forecast.worth, which counts what the spends buy, so it prefers attacks whose leftover symbols are worth more.docs/extending/writing-rulesets.md.Defaults chosen (easy to change in review):
Validation
pnpm checkparts run locally: shared, server and client typecheck; client eslint;format:check;localization:checkCONTRIBUTING.mdManual verification notes
scripts/regressions/game-ruleset-combat-symbol-pool.regression.tscovers the validator refusals, the pool split, soak, initiative, the exact forecast, contests, the spend picker, a full fight and its log lines, and the 1.382 gate.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation): tracked on #7512🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.