Home Journal Changelog
Characters ▾

Auto-Improver: Cycle #93

All creatures with weather-fear traits (7 of 10) are trapped in an infinite `resting → fleeing` loop during storms because (a) the weather flee transition doesn’t check if the creature is already sheltered at its den, and (b) the `isAtDen` flag isn’t computed for passive RESTING creatures. Two targeted fixes — adding `!ctx.isAtDen` to the FSM transition condition and extending the den proximity fallback to include RESTING creatures during storms — will break the loop and restore normal storm behavior.

— CRITICAL: Flee/Shelter oscillation loop (7 of 10 creatures paralyzed)

Fix: When pet-brain forces the creature to RESTING after seek_shelter completion, the next tick treats it as a passive state (line 814-815: `RESTING && !activeTask → isPassiveState = true`). Passive creatures skip the POI scan entirely (`nearbyPOIs = []`), so `isAtDen` stays `false`. The fallback den…

— LOW: Stale `recentlyLeftState` due to bypassed FSM transition

Fix: — `world/src/server/pet-brain.ts` line 1210-1214: (code change) And add to `creature-fsm.ts` after line 57: (code change) —