From 90ae798bb855ff5a7c41a63230fb4b5a5d8eee70 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 28 May 2023 11:19:32 -0500 Subject: [PATCH] no more skating rink --- src/engine/ai/MobileFSM.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index 810ad1a6..fa36f49b 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -226,9 +226,6 @@ public class MobileFSM { return false; if (mob.mobPowers.isEmpty()) return false; - //added in cast chance for mobs, editable by MBServerStatics.AI_POWER_CHANCE - if(ThreadLocalRandom.current().nextInt(100) > MBServerStatics.AI_POWER_CHANCE) - return false; if (mob.nextCastTime == 0) mob.nextCastTime = System.currentTimeMillis(); return mob.nextCastTime <= System.currentTimeMillis(); @@ -422,6 +419,8 @@ public class MobileFSM { if (mob.getCombatTarget() == null) { if(!mob.isMoving()) { Patrol(mob); + } else{ + mob.stopPatrolTime = System.currentTimeMillis(); } }else { chaseTarget(mob); @@ -466,7 +465,7 @@ public class MobileFSM { //checks if mob can attack based on attack timer and range if (mob.isAlive() == false) return; - if (MovementUtilities.inRangeDropAggro(mob, (AbstractCharacter)mob.getCombatTarget()) == false) { + if (mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && MovementUtilities.inRangeDropAggro(mob, (PlayerCharacter)mob.getCombatTarget()) == false) { mob.setCombatTarget(null); if (mob.isCombat()) { mob.setCombat(false);