mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6528] [Feature]: an opponent and the Game Master cannot pay a ruleset ability out of a higher pool #3658
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#3658
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?
Originally created by @kolacheee on GitHub (Sep 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6528
Originally assigned to: @kolacheee on GitHub.
What problem does this solve?
In a Game Mode fight resolved by a ruleset's own numbers, an ability may be paid for out of a higher pool than the one it names: a spell cast with a bigger slot, and the ruleset's own
perCostStepsaying what the extra buys. A player gets that choice on the menu, becauseRulesetCombatOption.payWithlists every pool the use could be paid from and the client asks which one.Nobody else ever gets it.
rulesetCandidatesFrominpackages/server/src/services/game/ruleset-combat-director.service.tsbuilds one candidate per option and never setschoice.payWith, so every candidate is the base cost. That is what the Engine's own picker chooses from when it plays an opponent, and it is also what the Game Master is shown when a boss is asked what to do. Neither can ever upcast.The effect is quiet rather than broken: the action still resolves, at its base cost. An opponent written with a scaling spell simply never uses the scaling, and a Game Master told a boss has four third-level slots cannot spend one on a spell written at first.
Proposed solution
Give the candidate builder one candidate per eligible pool, so the picker and the Game Master choose between "cast it" and "cast it bigger" the way a player does.
Two things to settle while doing it:
RULESET_WINDOW_CANDIDATE_LIMITalready cuts a Game Master's list at 24 by score, and a caster with four pools would multiply its own entries. The cut is by score, so the cheap version and the big version of the same spell compete on their forecast, which is probably right, but it deserves a look rather than an assumption.rulesetCandidatesFromalready sumsoption.costintocost, and an upcast candidate has to carry the price of the pool it actually spends rather than the base one, or the bigger version looks free.Alternatives considered
Pick the largest affordable pool automatically. Rejected: a caster that always upcasts burns its best slots on its first turn, and the choice is exactly the kind of judgement the picker exists to make.
Leave it to the Game Master's own text. Rejected: the menu is the single source of legality in this system, so an answer naming a pool that is not on the menu is refused. The option has to exist before anybody can pick it.
Additional context
Found while reviewing #6525, which forwards
atandpayWithfrom a picked option into the answer the Game Master gives to a reaction window. The forwarding is correct and stays; thepayWithhalf of it is inert today for the reason above, so that PR takes the inert line back out rather than leaving code that promises something which never arrives.This is not specific to windows: it is the same gap on an ordinary turn.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@kolacheee commented on GitHub (Sep 22, 2026):
Being folded into the slice that follows https://github.com/Pasta-Devs/Marinara-Engine/pull/6525 rather than handled on its own, at the maintainer's direction.
That slice's candidate builder now emits one candidate per way of paying: the base cost, and one for each pool the ability could be upcast out of. Each carries the pool in
choice.payWith, the forecast the extra steps actually buy (perCostSteptimes the steps), a label naming the pool so a Game Master reading the menu can tell two entries apart, and a price that counts the steps as well as the amount, because one pool of a higher rung is worth more than one of a lower and without that the bigger version reads as free.@kolacheee commented on GitHub (Sep 24, 2026):
A correction to this issue's premise, found in review of https://github.com/Pasta-Devs/Marinara-Engine/pull/6608.
The title says an opponent and the Game Master cannot pay a ruleset ability out of a higher pool. That is true, but not for the reason this issue gives, and #6608 does not change it. An opponent is a stat block, and a block's actions cost nothing off any pool:
planRulesetCombatCostreturnsnullfor any combatant without a sheet when a pool is named. So an opponent, and a Game Master's boss, has no bigger way of paying to be offered at all.The gap that was real is a party member handed to the Engine to play. That character has a sheet and pools, and the Engine's own picker only ever offered it the base cost, so it never cast a spell that grows any bigger. That is what #6608 fixes, with a candidate per way of paying, and a regression now pins that an opponent's actions cannot be paid out of any pool.
Giving stat blocks pools of their own would be a change to the ruleset format rather than a picker fix, and nothing here asks for it. If that is wanted, it deserves its own issue.
@kolacheee commented on GitHub (Sep 24, 2026):
Follow-up filed as https://github.com/Pasta-Devs/Marinara-Engine/issues/6610: let a stat block carry the ruleset's own parameters (pools, tracks, fields, skills, and whatever the ruleset declares as health and defense) instead of a fixed shape. That is what would let an opponent pay out of a pool at all, whoever plays it, and it takes the wound-track and several-defenses limits with it.