From dc81ddaba78ec7a3ee9ab087b1236cd7ded5fe44 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 9 Apr 2024 21:23:29 -0500 Subject: [PATCH] handle retaliate when being attacked --- src/engine/gameManager/CombatManager.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index f5b2b75d..9f9566b2 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -136,6 +136,13 @@ public enum CombatManager { if (inRange) { + //handle retaliate + if(AbstractCharacter.IsAbstractCharacter(target)){ + if(((AbstractCharacter)target).combatTarget == null){ + ((AbstractCharacter)target).combatTarget = attacker; + } + } + // take stamina away from attacker if (weapon != null) {