From e2f9a4c7f09ed61ad93b71091a7975551e0e2f0b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 31 Aug 2023 13:57:46 -0400 Subject: [PATCH] Guard minions inherit powers from captain. --- src/engine/gameManager/PowersManager.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index bc0e15b2..3651840b 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -108,12 +108,18 @@ public enum PowersManager { ArrayList mobPowers = new ArrayList<>(); ArrayList powerEntries; - powerEntries = PowersManager._allMobPowers.get(mobile.loadID); + if (mobile.agentType.equals(AIAgentType.GUARDMINION)) + powerEntries = PowersManager._allMobPowers.get(((Mob) mobile.guardCaptain).loadID); + else + powerEntries = PowersManager._allMobPowers.get(mobile.loadID); if (powerEntries != null) mobPowers.addAll(powerEntries); - powerEntries = PowersManager._allMobPowers.get(mobile.contractUUID); + if (mobile.agentType.equals(AIAgentType.GUARDMINION)) + powerEntries = PowersManager._allMobPowers.get(mobile.guardCaptain.contractUUID); + else + powerEntries = PowersManager._allMobPowers.get(mobile.contractUUID); if (powerEntries != null) mobPowers.addAll(powerEntries);