Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
        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;
        }