예제 #1
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana)
            {
                var minions = MinionManager.GetMinions(Me.Position, R.Range);

                if (minions.Any())
                {
                    if (LaneClearOption.UseR && R.IsReady() && LaneClearOption.GetSlider("LaneClearRLimit") >= GetRCount)
                    {
                        var rMinion =
                            minions.FirstOrDefault(x => x.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me));

                        if (rMinion != null && MinionHealthPrediction.GetHealthPrediction(rMinion, 250) > 0)
                        {
                            R.Cast(rMinion);
                        }
                    }

                    if (LaneClearOption.UseE && E.IsReady())
                    {
                        var eMinions = MinionManager.GetMinions(Me.Position, E.Range);
                        var eFarm    =
                            MinionManager.GetBestLineFarmLocation(eMinions.Select(x => x.Position.To2D()).ToList(),
                                                                  E.Width, E.Range);

                        if (eFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearECount"))
                        {
                            E.Cast(eFarm.Position);
                        }
                    }

                    if (LaneClearOption.UseQ && Q.IsReady())
                    {
                        var qMinion =
                            MinionManager
                            .GetMinions(
                                Me.Position, Q.Range)
                            .FirstOrDefault(
                                x =>
                                x.Health < Q.GetDamage(x) &&
                                MinionHealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                x.Health > Me.GetAutoAttackDamage(x));

                        if (qMinion != null)
                        {
                            Q.Cast(qMinion);
                        }
                    }
                }
            }
        }
예제 #2
0
        private static void LastHit()
        {
            if (LastHitOption.HasEnouguMana)
            {
                if (LastHitOption.UseQ && Q.IsReady())
                {
                    var minion =
                        MinionManager.GetMinions(Me.Position, Q.Range)
                        .Where(x => x.IsValidTarget(Q.Range) && MinionHealthPrediction.GetHealthPrediction(x, 250) > 0)
                        .OrderBy(x => x.Health)
                        .FirstOrDefault(x => x.Health < Q.GetDamage(x));

                    if (minion != null)
                    {
                        Q.CastOnUnit(minion, true);
                    }
                }
            }
        }
예제 #3
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana)
            {
                if (LaneClearOption.UseQ && Q.IsReady())
                {
                    var minions = MinionManager.GetMinions(Me.Position, Q.Range);

                    if (minions.Any())
                    {
                        if (LaneClearOption.GetBool("LaneClearQLH"))
                        {
                            var min = minions.FirstOrDefault(x => x.Health < Q.GetDamage(x) && MinionHealthPrediction.GetHealthPrediction(x, 250) > 0);

                            if (min != null)
                            {
                                Q.Cast(min, true);
                            }
                        }
                        else
                        {
                            Q.Cast(minions.FirstOrDefault(), true);
                        }
                    }
                }
            }
        }
예제 #4
0
 private static float MyMinionHealthPrediction(this Obj_AI_Base minion, Spell daSpell) => MinionHealthPrediction.GetHealthPrediction(minion, Game.GameTimeTickCount, (int)Math.Ceiling(daSpell.Delay));
예제 #5
0
        public static void UseIgnite()
        {
            var summoner = GetIgniteSlot();

            if (!summoner.IsReady())
            {
                return;
            }

            var enemy = ObjectManager.Heroes.Enemies.FirstOrDefault(
                x => x.IsValidTarget(600) && !x.IsDead && GetIgniteDamage(GetIgniteSlot()) > MinionHealthPrediction.GetHealthPrediction(x, 250));

            ObjectManager.Player.Spellbook.CastSpell(summoner, enemy);
        }