Pair forge generated with the forge that never got swung #346
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!346
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/forge-counterpart"
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?
TotalForgeGeneratedhad no counterpart, and forge needs one more than moststats do, because of what forge actually is. From the game's own docs:
ForgeCmd.Forgemints a Sovereign Blade into hand on the first forge of acombat, and every forge after it calls
IncreaseSovereignBladeDamage. So forgeis per combat, it is not a spendable pool, and it only becomes damage if you
swing. A card that forges 9 across a fight you never swing in generated 9 forge
of nothing — and the generated total alone could not say so.
Approach
A third provenance ledger beside block and energy, with one simplification the
others do not get: a Blade's damage is its accumulated forge, so playing it
cashes in every outstanding chunk at once. There is no FIFO/LIFO question to
settle here. Combat end charges the remainder back to the cards that granted it,
newest-first.
Consumed at the card-play path, not from a damage observer. The swing can be
fully blocked, or land on a target already dying that emits no damage entry, and
the forge was spent either way. "Wasted" here means never swung, not swung for
nothing — blocked and overkill are already their own stats.
A gap I'm stating rather than hiding
IncreaseSovereignBladeDamageadds the amount to every Blade includingexhausted ones. So forging after a Blade has been exhausted also buffs that dead
copy, which can never be swung. The new Blade minted by that same forge can be,
so the chunk counts as live and the duplicate buff is not counted as waste. It
produces no damage and no waste either way; if you'd rather it counted as waste,
that's a one-line change.
Surfaces
18/6.5,36%) rather than the two a pair would cost — the #330 convention.Verification
forge-wasted-ledger-run.json, which also pins that the wasted half keeps thefractional shape the generated half has (forge is decimal-backed in the game's
command path).
SchemaLoadingTestshistorical and resumable, plus an older-shape caseproving a pre-ledger run keeps its generated total and reads zero wasted.
ForgeLedgerConservationTests: swung leaves nothing wasted, never-swungcharges each card exactly its own grant, and fractional forge does not round.
No new Harmony targets — both write points sit inside handlers that already run,
so hot reload was sufficient (439 classes patched, 0 failed).
Found while doing this
TotalStarsGeneratedhas the same gap. Stars are Regent's separate spendablepool, so it's the direct analogue of the energy ledger in #331 rather than this
one. Not in here; worth adding to the audit list.
🤖 Generated with Claude Code