Bug: Guardians never marked as defeated — pact ritual unreachable #220
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?
Bug Description
When a guardian is defeated during combat, the prestige store is never notified. The
onFloorClearedcallback ingameStore.tsonly logs a message and resets shield/barrier state — it never callsdefeatGuardian()oraddDefeatedGuardian().Code Location
src/lib/game/stores/gameStore.tslines 270-277:Impact
Critical. The
defeatedGuardiansarray is never populated during normal gameplay. SincestartPactRitualchecksdefeatedGuardians.includes(floor), players can never start a pact ritual through normal gameplay. The entire pact-signing flow is unreachable without debug commands.Fix Required
Add
usePrestigeStore.getState().defeatGuardian(floor)(or equivalent) to thewasGuardianbranch of theonFloorClearedcallback.Fixed: Added usePrestigeStore.getState().addDefeatedGuardian(floor) call in the onFloorCleared callback in gameStore.ts. Guardians are now properly tracked as defeated, making the pact ritual reachable.