diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index b32b43bf..a1753e0c 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -50,6 +50,12 @@ public class MobAI { return; } + if (target.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && + !mob.canSee((AbstractCharacter) target)) { + mob.setCombatTarget(null); + return; + } + if (target.getObjectType() == Enum.GameObjectType.PlayerCharacter && canCast(mob)) { if (mob.isPlayerGuard() == false && MobCast(mob)) { @@ -324,11 +330,6 @@ public class MobAI { return false; } - if (!mob.canSee((AbstractCharacter) mob.getCombatTarget())) { - mob.setCombatTarget(null); - return false; - } - // Mobile has no powers defined in mobbase or contract.. if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() &&