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
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user