diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 59901a99..84b8d0a9 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -925,9 +925,20 @@ public enum PowersManager { if (pb.isHarmful()) mobTarget.handleDirectAggro(playerCharacter); } - //Power is aiding a target, handle aggro if combat target is a Mob. - if (!pb.isHarmful() && target.getObjectType() == GameObjectType.PlayerCharacter) { + + //Check for immunities + if (target.getObjectType() == GameObjectType.PlayerCharacter) { PlayerCharacter pcTarget = (PlayerCharacter) target; + PlayerBonuses tarBonus = pcTarget.getBonuses(); + SourceType source = SourceType.GetSourceType(pb.category); + boolean immune = tarBonus.getBool(ModType.ImmuneTo, source); + if(!immune){ + DamageType damageType = DamageType.getDamageType(pb.category); + immune = pcTarget.getResists().immuneTo(damageType); + } + if(immune){ + return; + } } // update target of used power timer