From 76f33534d4a57252c4acb611be93781294a9a124 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 7 Sep 2023 13:09:25 -0400 Subject: [PATCH] Captains force march minions --- src/engine/mobileAI/MobAI.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 9fb3c215..099dcf73 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -252,14 +252,17 @@ public class MobAI { try { - //make sure mob is out of combat stance - int patrolDelay = ThreadLocalRandom.current().nextInt((int) (MobAIThread.AI_PATROL_DIVISOR * 0.5f), MobAIThread.AI_PATROL_DIVISOR) + MobAIThread.AI_PATROL_DIVISOR; - //early exit while waiting to patrol again + // early exit while waiting to patrol again. + // Minions are force marched if captain is alive + + boolean forced = mob.agentType.equals(Enum.AIAgentType.GUARDMINION) && + mob.guardCaptain.isAlive(); if (mob.stopPatrolTime + (patrolDelay * 1000) > System.currentTimeMillis()) - return; + if (!forced) + return; //guards inherit barracks patrol points dynamically