From a96375385857c585ed051c92092b8bad3636a44a Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 27 Nov 2023 14:11:54 -0500 Subject: [PATCH] v2.3.0: dumb allies (e.g. corrupted) no longer atk passive enemies --- .../shatteredpixeldungeon/actors/mobs/Mob.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index 8b0ae3efa..a839a4c48 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -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); }