Record out-of-combat healing and stop Ancient points booking under "?" #342
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!342
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/sad-napier-14962f"
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?
The gap
CreatureCmd.Healonly callsHook.AfterCurrentHpChangedwhencreature.CombatState != null, and the player's creature is detached fromcombat state outside a fight (
CombatManager.Reset(graceful)→CombatState.RemoveCreature). SpireLens recorded healing only through thathook, so the map legend's
HpHealedsilently missed every out-of-combat heal:rest-site Rest and Mend, event heals, Ancient arrival heals, Meal Ticket,
Eternal Feather, and potions drunk on the map. No other patch covered them —
the relic-heal patches only feed per-relic stats (via their own before/after HP
fallback), and
RunHistoryCampfireSummaryreads the game's map-point historyfor a different surface.
Second bug of the same shape: in combat the hook receives the requested
amount, not the clampednumthe method computed, so a heal near full HPreported more than it restored.
CalculateRelicHealingActualRestoredkeepsMax(hook, observed), so that overcount reached relicTotalHealingRestoredtoo.
The fix
CreatureHealObservationPatchreadsCurrentHparoundCreature.HealInternal— the one caller isCreatureCmd.Heal, the mutationis synchronous and ahead of every
await, so the delta is the HP actuallyrestored in or out of combat. It feeds both
RecordRunHpGainedandRecordRelicHealingHpChanged.HookAfterCurrentHpChangedPatchkeeps losses only, so in-combat heals are notcounted twice. Its other positive source,
CreatureCmd.SetCurrentHp, raisesHP only for monsters in the current game.
ResolveMapLegendCategoryKeyLockedno longer falls through to room type whenthe picked icon for the floor has no legend row. Ancient and Boss have none,
and an Ancient is an
EventRoom, so with heals now arriving there Neow'srun-start heal to full would have landed under "?" every run. Ancient relic
picks were already landing there; they now land nowhere, which matches Boss.
No new persisted fields, so no schema fixture.
Verification
Built, deployed and hot-reloaded:
Patch install: 439 classes patched, 0 failed/skipped,Core.Initialize complete,HOT RELOAD DONE, andCreature.HealInternalpresent in the patched-method listing. Tests and livebehavioral verification not run (user-owned).
Restart requirement is uncertain:
Creature.HealInternalis a newly addedHarmony target and the running process may have compiled
CreatureCmd.Healwith it inlined. Concrete way to learn without a restart: note the Rest Site
"HP restored" row in the map legend, then rest — if it moves, the live path
already reaches the patch.