From a79562de01d18941afe90d92c1bab728fcba8954 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 5 Aug 2023 23:23:27 -0500 Subject: [PATCH] random extra spell cooldown to stagger --- src/engine/mobileAI/MobAI.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 72891e4a..090bcbb0 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -429,8 +429,8 @@ public class MobAI { msg.setUnknown04(2); PowersManager.finishUseMobPower(msg, mob, 0, 0); - - mob.nextCastTime = System.currentTimeMillis() + (long) ((mobPower.getCooldown() + (MobAIThread.AI_POWER_DIVISOR * 1000))); + int randomCooldown = ThreadLocalRandom.current().nextInt(1,10); + mob.nextCastTime = System.currentTimeMillis() + (long) ((mobPower.getCooldown() + (MobAIThread.AI_POWER_DIVISOR * 1000))) + (randomCooldown * 1000); return true; } } catch (Exception e) { @@ -528,8 +528,8 @@ public class MobAI { msg.setUnknown04(2); PowersManager.finishUseMobPower(msg, mob, 0, 0); - - mob.nextCastTime = System.currentTimeMillis() + (long) ((mobPower.getCooldown() + (MobAIThread.AI_POWER_DIVISOR * 1000))); + int randomCooldown = ThreadLocalRandom.current().nextInt(1,10); + mob.nextCastTime = System.currentTimeMillis() + (long) ((mobPower.getCooldown() + (MobAIThread.AI_POWER_DIVISOR * 1000))) + (randomCooldown * 1000); return true; } } catch (Exception e) {