internal static bool IsKillableAndValidTarget(this Obj_AI_Minion target, double calculatedDamage, DamageType damageType, float distance = float.MaxValue) { if (target == null || !target.IsValidTarget(distance) || target.Health <= 0 || target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield) || target.CharData.BaseSkinName == "gangplankbarrel") { return(false); } if (ObjectManager.Player.HasBuff("summonerexhaust")) { calculatedDamage *= 0.6; } var dragonSlayerBuff = ObjectManager.Player.GetBuff("s5test_dragonslayerbuff"); if (dragonSlayerBuff != null) { if (dragonSlayerBuff.Count >= 4) { calculatedDamage += dragonSlayerBuff.Count == 5 ? calculatedDamage * 0.30 : calculatedDamage * 0.15; } if (target.CharData.BaseSkinName.ToLowerInvariant().Contains("dragon")) { calculatedDamage *= 1 - dragonSlayerBuff.Count * 0.07; } } if (target.CharData.BaseSkinName.ToLowerInvariant().Contains("baron") && ObjectManager.Player.HasBuff("barontarget")) { calculatedDamage *= 0.5; } return(target.Health + target.HPRegenRate + (damageType == DamageType.Physical ? target.AttackShield : target.MagicShield) < calculatedDamage - 2); }