Browse Source

Sight check moved out of cancast.

feature-workorder
MagicBot 1 year ago
parent
commit
39379e1ac0
  1. 11
      src/engine/mobileAI/MobAI.java

11
src/engine/mobileAI/MobAI.java

@ -50,6 +50,12 @@ public class MobAI {
return; 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 (target.getObjectType() == Enum.GameObjectType.PlayerCharacter && canCast(mob)) {
if (mob.isPlayerGuard() == false && MobCast(mob)) { if (mob.isPlayerGuard() == false && MobCast(mob)) {
@ -324,11 +330,6 @@ public class MobAI {
return false; return false;
} }
if (!mob.canSee((AbstractCharacter) mob.getCombatTarget())) {
mob.setCombatTarget(null);
return false;
}
// Mobile has no powers defined in mobbase or contract.. // Mobile has no powers defined in mobbase or contract..
if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() && if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() &&

Loading…
Cancel
Save