v2.3.0: dumb allies (e.g. corrupted) no longer atk passive enemies
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user