From eb20d926e35343eb81f376cf24f41c3ce402e520 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 16 Apr 2023 18:58:55 -0500 Subject: [PATCH] guard aggro logic --- src/engine/ai/MobileFSM.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index dc373eeb..11b4b17f 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -523,9 +523,6 @@ public class MobileFSM { return; } if (mob.isPet() == false && mob.isSummonedPet() == false && mob.isNecroPet() == false) { - //if (mob.BehaviourType != null && mob.BehaviourType == MobBehaviourType.None) { - // return; - //} //TEST CODE FOR BEHAVIOUR CHANGING START if (mob.BehaviourType == null || mob.BehaviourType.ordinal() == MobBehaviourType.None.ordinal()) { mob.BehaviourType = MobBehaviourType.Simple; @@ -544,8 +541,12 @@ public class MobileFSM { return; } //check for players that can be aggroed if mob is agressive and has no target - if (mob.BehaviourType.isAgressive && mob.getCombatTarget() == null) { + if (mob.BehaviourType.isAgressive && mob.getCombatTarget() == null && mob.BehaviourType != MobBehaviourType.SimpleStandingGuard) { + //normal aggro CheckForAggro(mob); + } else if(mob.BehaviourType == MobBehaviourType.SimpleStandingGuard){ + //safehold guard + SafeGuardAggro(mob); } //check if mob can move for patrol or moving to target if (mob.BehaviourType.canRoam) { @@ -736,4 +737,9 @@ public class MobileFSM { } } } + private static void SafeGuardAggro(Mob mob){ + for(Entry entry : mob.playerAgroMap.entrySet()){ + + } + } } \ No newline at end of file