From e1f202b635a01742d1d6f1b6d573079a621710b2 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 24 Aug 2020 17:17:43 -0400 Subject: [PATCH] v0.8.2c: fixed non-enemy mobs triggering swarm intelligence --- .../shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 ff762778b..c9ff6f091 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 @@ -771,7 +771,7 @@ public abstract class Mob extends Char { state = HUNTING; target = enemy.pos; - if (Dungeon.isChallenged( Challenges.SWARM_INTELLIGENCE )) { + if (alignment == Alignment.ENEMY && Dungeon.isChallenged( Challenges.SWARM_INTELLIGENCE )) { for (Mob mob : Dungeon.level.mobs) { if (Dungeon.level.distance(pos, mob.pos) <= 8 && mob.state != mob.HUNTING) { mob.beckon( target ); @@ -817,7 +817,7 @@ public abstract class Mob extends Char { state = HUNTING; target = enemy.pos; - if (Dungeon.isChallenged( Challenges.SWARM_INTELLIGENCE )) { + if (alignment == Alignment.ENEMY && Dungeon.isChallenged( Challenges.SWARM_INTELLIGENCE )) { for (Mob mob : Dungeon.level.mobs) { if (Dungeon.level.distance(pos, mob.pos) <= 8 && mob.state != mob.HUNTING) { mob.beckon( target );