From db218139b34176f9d08da2efb3e347cf596b2246 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 7 May 2023 07:58:52 -0500 Subject: [PATCH] scaling respawn timer for guard minions based on barracks rank --- src/engine/objects/Mob.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 82ffc22e..9b40b523 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -803,8 +803,8 @@ public class Mob extends AbstractIntelligenceAgent { guardCaptain.siegeMinionMap.put(mob, slot); mob.deathTime = System.currentTimeMillis(); - mob.spawnTime = 900; mob.npcOwner = guardCaptain; + mob.spawnTime = (int)(-2.500 * guardCaptain.building.getRank() + 22.5); mob.BehaviourType = Enum.MobBehaviourType.GuardMinion; //add mob to zone set of captain guardCaptain.getParentZone().zoneMobSet.add(mob); @@ -1303,7 +1303,9 @@ public class Mob extends AbstractIntelligenceAgent { this.playerAgroMap.clear(); this.timeToSpawnSiege = System.currentTimeMillis() + 60 * 15 * 1000; - + if(this.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()) { + this.spawnTime = (int) (-2.500 * ((Mob) this.npcOwner).building.getRank() + 22.5); + } if (this.isPet()) { PlayerCharacter petOwner = this.getOwner();