private static bool IsTargetKillable(EnemyInfo target, float countDown) { float totalUltDamage = (float)GetBaseUltSpellDamage(target.Player, Player); float targetHealth = GetTargetHealth(target, countDown); if (totalUltDamage < targetHealth) { return(false); } return(true); }
private static float GetTargetHealth(EnemyInfo target, float additionalTime) { if (target.Player.IsHPBarRendered) { return(target.Player.Health); } float regen = (HasPotionActive(target.Player) && Program.BaseUltMenu["trackPotion"].Cast <CheckBox>().CurrentValue) ? target.Player.HPRegenRate + GetPotionRegenRate(GetPotionBuff(target.Player)) : target.Player.HPRegenRate; float predictedHealth = target.Player.Health + (regen * ((Core.GameTickCount - target.LastSeen + additionalTime) / 1000f)); return(predictedHealth > target.Player.MaxHealth ? target.Player.MaxHealth : predictedHealth); }
private static bool IsTargetKillable(EnemyInfo target, float countDown) { float totalUltDamage = (float)GetBaseUltSpellDamage(target.Player, Player); float targetHealth = GetTargetHealth(target, countDown); if (totalUltDamage < targetHealth) return false; return true; }
private static float GetTargetHealth(EnemyInfo target, float additionalTime) { if (target.Player.IsHPBarRendered) return target.Player.Health; float regen = (HasPotionActive(target.Player) && Program.BaseUltMenu["trackPotion"].Cast<CheckBox>().CurrentValue) ? target.Player.HPRegenRate + GetPotionRegenRate(GetPotionBuff(target.Player)) : target.Player.HPRegenRate; float predictedHealth = target.Player.Health + (regen * ((Core.GameTickCount - target.LastSeen + additionalTime) / 1000f)); return predictedHealth > target.Player.MaxHealth ? target.Player.MaxHealth : predictedHealth; }