M3: Utility card closure (energy, draw) #7
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#7
Loading…
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?
Goal
For cards that don't deal damage or generate block directly, measure their downstream value — energy generated and used, cards drawn and played.
Scope
Energy generating cards:
Draw cards:
Hooks
CardPlayFinishedEntry(already tracked)CardDrawnEntry(already flowing through CombatHistory.Add)EnergySpentEntry(already flowing)CombatManager.TurnEndedevent for turn boundariesSchema additions
TotalEnergyGeneratedTotalEnergyUsed— consumed before turn endTotalCardsDrawn— caused by this cardTotalDrawnCardsPlayed— closure: drawn cards that got playedSchema bump coordinated with M2 or bumps again.
Closing this as resolved.
The remaining gap here turned out to be narrower than the original issue text: energy spend tracking and the other utility asks were already handled, and the missing piece was attribution for cards that directly grant energy while they resolve.
That is now implemented in commit
282e2d30af8df3e3ab25fc1b9e3c6e62f869113e(Track energy gained from card effects).Shipped pieces:
PlayerGainEnergyPatchnow observes real post-clamp energy gain while a card is resolving.RunTrackerrecords that gain onto the active card instance and rolls it into aggregates asTotalEnergyGenerated.RunDatapersists the per-event and aggregate energy-gained fields.Energy gainedin both the full tooltip and the compact in-hand view.Deliberate non-changes:
With direct energy-generation attribution now working in game, this issue is resolved.