From a8e8804ce3bff7ab06569703c9a15bf1adccdffe Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 5 Sep 2023 12:34:46 -0400 Subject: [PATCH] Attacking guard flags you as an outlaw. --- src/engine/gameManager/CombatManager.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index ecb05f66..74cde7af 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -1318,10 +1318,18 @@ public enum CombatManager { //handle minion informing his captain of an attack - if (attackedMobile.agentType.equals(AIAgentType.GUARDMINION) && attackedMobile.guardCaptain != null && attackedMobile.guardCaptain.isAlive()) + if (attackedMobile.agentType.equals(AIAgentType.GUARDMINION) && attackedMobile.guardCaptain != null && attackedMobile.guardCaptain.isAlive()) { + if (attackedMobile.guardCaptain.combatTarget == null) attackedMobile.guardCaptain.setCombatTarget(attacker); + // Add to city outlaw list + + if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter)) + attackedMobile.guardedCity.cityOutlaws.add(attacker.getObjectUUID()); + + } + // Mobile already has a target; don't switch. if (attackedMobile.getCombatTarget() != null && !attackedMobile.isSiege())