From 71d421fdd0ef22bcdc2ac6a04c6a3a3399ae3736 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 19 Nov 2015 00:09:32 -0500 Subject: [PATCH] v0.3.2c: tweaked chooseenemy behaviour, no longer sets enemy to null temporarily --- .../shatteredpixeldungeon/actors/mobs/Mob.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index 5efc242f1..dce4966e0 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -179,15 +179,10 @@ public abstract class Mob extends Char { } } - //resets target if: the target is dead, the target has been lost (wandering) + //resets target if: there is no current target, the target is dead, the target has been lost (wandering) //or if the mob is amoked/corrupted and targeting the hero (will try to target something else) - if ( enemy != null && - !enemy.isAlive() || state == WANDERING || - ((buff( Amok.class ) != null || buff(Corruption.class) != null) && enemy == Dungeon.hero )) - enemy = null; - - //if there is no current target, find a new one. - if (enemy == null) { + if ( enemy == null || !enemy.isAlive() || state == WANDERING || + ((buff( Amok.class ) != null || buff(Corruption.class) != null) && enemy == Dungeon.hero )) { HashSet enemies = new HashSet();