v0.3.2c: tweaked chooseenemy behaviour, no longer sets enemy to null temporarily

This commit is contained in:
Evan Debenham
2015-11-19 00:09:32 -05:00
committed by Evan Debenham
parent ef44eaad08
commit 71d421fdd0
@@ -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) //or if the mob is amoked/corrupted and targeting the hero (will try to target something else)
if ( enemy != null && if ( enemy == null || !enemy.isAlive() || state == WANDERING ||
!enemy.isAlive() || state == WANDERING || ((buff( Amok.class ) != null || buff(Corruption.class) != null) && enemy == Dungeon.hero )) {
((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) {
HashSet<Char> enemies = new HashSet<Char>(); HashSet<Char> enemies = new HashSet<Char>();