fix: initialize guardian defensive state for uncleared guardian rooms on descent
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s

This commit is contained in:
2026-06-08 14:40:53 +02:00
parent 01864216ac
commit 7f5493f4d8
3 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# Circular Dependencies
Generated: 2026-06-08T12:28:09.613Z
Generated: 2026-06-08T12:36:38.273Z
Found: 1 circular chain(s) — these MUST be fixed before modifying involved files.
1. 1) stores/golem-combat-actions.ts > stores/golem-combat-helpers.ts
+1 -1
View File
@@ -1,6 +1,6 @@
{
"_meta": {
"generated": "2026-06-08T12:28:07.502Z",
"generated": "2026-06-08T12:36:36.211Z",
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
},
@@ -194,6 +194,19 @@ export function onEnterRoomDescend(get: GetFn, set: SetFn): void {
if (!wasCleared) {
get().addActivityLog('floor_transition',
`Floor ${s.currentFloor} Room ${s.currentRoomIndex + 1} was not cleared — enemies present`);
// Initialize guardian defensive state for uncleared guardian rooms
if (s.currentRoom.roomType === 'guardian') {
const guardian = getGuardianForFloor(s.currentFloor);
if (guardian) {
set({
guardianShield: guardian.shield ?? 0,
guardianShieldMax: guardian.shield ?? 0,
guardianBarrier: guardian.barrier ?? 0,
guardianBarrierMax: guardian.barrier ?? 0,
});
}
}
return;
}