Exemplo n.º 1
0
 static void Killsteal()
 {
     if (SpellManager.R.IsReady() && Config.Killsteal)
     {
         var t =
             HeroManager.Enemies.FirstOrDefault(
                 hero =>
                 hero.IsValidTarget(Config.UltMaxRange) && Player.Distance(hero) > Config.UltMinRange &&
                 hero.Health < DamageCalc.GetRDamage(hero));
         if (t != null)
         {
             SpellManager.CastSpell(SpellManager.R, t, HitChance.High);
         }
     }
 }
Exemplo n.º 2
0
        static void Combo()
        {
            if (SpellManager.Q.IsReady() && Config.ComboQ)
            {
                var t = TargetSelector.GetTarget(SpellManager.Q.Range, TargetSelector.DamageType.Physical);
                if (t != null)
                {
                    SpellManager.CastSpell(SpellManager.Q, t, HitChance.High);
                }
            }

            if (SpellManager.W.IsReady() && Config.ComboW)
            {
                var t = TargetSelector.GetTarget(SpellManager.W.Range, TargetSelector.DamageType.Magical);
                if (t != null)
                {
                    SpellManager.CastSpell(SpellManager.W, t, HitChance.High);
                }
            }

            if (SpellManager.R.IsReady() && Config.ComboR)
            {
                foreach (var t in HeroManager.Enemies.Where(hero => hero.IsValidTarget(Config.UltMaxRange)))
                {
                    SpellManager.R.CastIfWillHit(t, Config.ComboRHit);
                    return;
                }
            }

            if (SpellManager.R.IsReady() && Config.ComboR)
            {
                var t = TargetSelector.GetTarget(Config.UltMaxRange, TargetSelector.DamageType.Physical);
                if (t != null)
                {
                    if (Player.Distance(t) > Config.UltMinRange && t.Health < DamageCalc.GetRDamage(t))
                    {
                        SpellManager.CastSpell(SpellManager.R, t, HitChance.High);
                    }
                }
            }
        }