[priority: 3] Combat store partialize missing floorHP/floorMaxHP/castProgress — state lost on refresh #80
Reference in New Issue
Block a user
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?
Severity: 3 — Medium
File:
src/lib/game/stores/combatStore.tsDescription:
The
partializefunction only persistscurrentFloor,maxFloorReached,spells, andactiveSpell. Critical combat state likefloorHP,floorMaxHP,castProgress,spireMode,clearedFloors,golemancy,equipmentSpellStates,activityLog, andachievementsare not persisted.On page refresh, the combat store resets to its initial state (floor 1, full HP, no cast progress) even though
currentFloorandspellsare restored. This creates an inconsistency: you could be on floor 50 with spells learned, but floor HP is reset to floor 1 values.Fix: Add
floorHP,floorMaxHP,castProgress, and other critical combat state topartialize.Starting work on combat store partialize fix.
✅ Fixed. Added
floorHP,floorMaxHP,castProgress,spireMode,clearedFloors,golemancy,equipmentSpellStates,activityLog, andachievementsto the combat store'spartializefunction. Combat state now persists correctly across page refreshes. Regression tests added.