v2.2.0: fixed debuffed sleeping guardians causing softlocks

This commit is contained in:
Evan Debenham
2023-09-29 12:30:03 -04:00
parent 64b6f11040
commit 736bd37c8d

View File

@@ -983,6 +983,9 @@ public abstract class Mob extends Char {
for (Buff b : buffs()){
if (b.type == Buff.buffType.NEGATIVE){
awaken(enemyInFOV);
if (state == SLEEPING){
spend(TICK); //wait if we can't wake up for some reason
}
return true;
}
}
@@ -999,6 +1002,9 @@ public abstract class Mob extends Char {
if (Random.Float( distance( enemy ) + enemyStealth ) < 1) {
awaken(enemyInFOV);
if (state == SLEEPING){
spend(TICK); //wait if we can't wake up for some reason
}
return true;
}