From 92666dca2190bc6b70ee7c4ea2069599a419a70b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 2 Sep 2023 15:25:19 -0400 Subject: [PATCH] Invis check precedes power check. --- src/engine/mobileAI/MobAI.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 4123c536..5dc2e425 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -323,17 +323,17 @@ public class MobAI { return false; } - // Mobile has no powers defined. - - if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() && - PowersManager.getPowersForRune(mob.contractUUID).isEmpty()) - return false; - if (!mob.canSee((PlayerCharacter) mob.getCombatTarget())) { mob.setCombatTarget(null); return false; } + // Mobile has no powers defined in mobbase or contract.. + + if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() && + mob.getContract() != null && PowersManager.getPowersForRune(mob.getContract().getObjectUUID()).isEmpty()) + return false; + if (mob.nextCastTime == 0) mob.nextCastTime = System.currentTimeMillis();