From 4ce1a5fad1bbb2d8ba0c652a7bc46265e59e0d9c Mon Sep 17 00:00:00 2001 From: Gene Pressinger Date: Wed, 26 May 2021 18:53:52 -0400 Subject: [PATCH] This is actually the real fix (includes action too) --- .../combat/command/CombatCommandHeal.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/projectswg/holocore/services/gameplay/combat/command/CombatCommandHeal.java b/src/main/java/com/projectswg/holocore/services/gameplay/combat/command/CombatCommandHeal.java index 422a20f00..03f28c8a8 100644 --- a/src/main/java/com/projectswg/holocore/services/gameplay/combat/command/CombatCommandHeal.java +++ b/src/main/java/com/projectswg/holocore/services/gameplay/combat/command/CombatCommandHeal.java @@ -64,11 +64,6 @@ enum CombatCommandHeal implements CombatCommandHitType { // Apply special line heal boost healAmount += CombatCommandCommon.getAddedDamageBoost(source, combatCommand); - if (healAmount <= 0) { - // Pointless to calculate who gets healed if we aren't healing any amount - return; - } - switch (combatCommand.getAttackType()) { case SINGLE_TARGET: { switch (combatCommand.getTargetType()) { @@ -147,6 +142,11 @@ enum CombatCommandHeal implements CombatCommandHitType { switch (combatCommand.getHealAttrib()) { case HEALTH: { + if (healed.getHealth() == healed.getMaxHealth()) { + // Pointless to heal health if health is already full + return; + } + int currentHealth = healed.getHealth(); healed.modifyHealth(healAmount); difference = healed.getHealth() - currentHealth; @@ -156,6 +156,11 @@ enum CombatCommandHeal implements CombatCommandHitType { } case ACTION: { + if (healed.getAction() == healed.getMaxAction()) { + // Pointless to heal action if health is already full + return; + } + int currentAction = healed.getAction(); healed.modifyAction(healAmount); difference = healed.getAction() - currentAction;