From 2f6137f8dfa05b1cae16b6ce4ebe59ac5db592af Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 1 Sep 2023 12:38:23 -0400 Subject: [PATCH] Minion agent type set properly. --- src/engine/objects/Mob.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 2ea937b2..f47656ce 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1545,6 +1545,10 @@ public class Mob extends AbstractIntelligenceAgent { this.spawnTime = 600; this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); break; + case GuardMinion: + this.agentType = AIAgentType.GUARDMINION; + this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); + break; case GuardWallArcher: this.agentType = AIAgentType.GUARDWALLARCHER; this.spawnTime = 450; @@ -1799,10 +1803,7 @@ public class Mob extends AbstractIntelligenceAgent { public boolean isPlayerGuard() { - if (EnumSet.of(AIAgentType.GUARDCAPTAIN, AIAgentType.GUARDMINION, AIAgentType.GUARDWALLARCHER).contains(this.agentType)) - return true; - else - return false; + return EnumSet.of(AIAgentType.GUARDCAPTAIN, AIAgentType.GUARDMINION, AIAgentType.GUARDWALLARCHER).contains(this.agentType); } public int getLastMobPowerToken() {