v2.3.0: dumb allies (e.g. corrupted) no longer atk passive enemies

This commit is contained in:
Evan Debenham
2023-11-27 14:11:54 -05:00
parent ae5c7f65ee
commit a963753858
@@ -342,9 +342,10 @@ public abstract class Mob extends Char {
for (Mob mob : Dungeon.level.mobs)
if (mob.alignment == Alignment.ENEMY && fieldOfView[mob.pos]
&& mob.invisible <= 0 && !mob.isInvulnerable(getClass()))
//intelligent allies do not target mobs which are passive, wandering, or asleep
if (!intelligentAlly ||
(mob.state != mob.SLEEPING && mob.state != mob.PASSIVE && mob.state != mob.WANDERING)) {
//do not target passive mobs
//intelligent allies also don't target mobs which are wandering or asleep
if (mob.state != mob.PASSIVE &&
(!intelligentAlly || (mob.state != mob.SLEEPING && mob.state != mob.WANDERING))) {
enemies.add(mob);
}