Ejemplo n.º 1
0
        private static void KillSteal()
        {
            var enemies = EntityManager.Heroes.Enemies.OrderByDescending
                              (a => a.HealthPercent)
                          .Where(
                a =>
                !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= Q.Range && !a.IsDead && !a.IsZombie &&
                a.HealthPercent <= 25);

            foreach (
                var target2 in
                enemies)
            {
                if (!target2.IsValidTarget() && Channeling == true)
                {
                    return;
                }

                if (MissInopportuneMenu.KillstealQ() && Q.IsReady() &&
                    target2.Health + target2.AttackShield <
                    Player.GetSpellDamage(target2, SpellSlot.Q))

                {
                    Q.Cast(target2);
                }

                if (MissInopportuneMenu.KillstealE() && E.IsReady() &&
                    target2.Health + target2.AttackShield <
                    Player.GetSpellDamage(target2, SpellSlot.E) && Player.Mana >= 80)
                {
                    E.Cast(target2.ServerPosition);
                }
            }
        }