Esempio n. 1
0
        //Cast
        private static void CastQ(Obj_AI_Base target)
        {
            if (target == null)
            {
                return;
            }

            if (Me.IsDashing() && DashManager.GetPlayerPosition(350).Distance(target.Position) <= QCircleRange)
            {
                Q.Cast();
            }

            if (HasQ3())
            {
                Q3.SmartCast(target, HitChance.High);
            }
            else
            {
                Q.SmartCast(target);
            }
        }
Esempio n. 2
0
        public override void LaneClear()
        {
            if (Me.CountEnemyHeroesInRange(1200) >= 1)
            {
                if (!Me.IsDashing())
                {
                    var minionQ =
                        GameObjects.EnemyMinions.OrderBy(m => m.Health)
                        .FirstOrDefault(
                            m =>
                            m.LSIsValidTarget(GetQRange()) &&
                            Health.GetPrediction(m,
                                                 (int)Q.Delay + (E.IsReady() && m.IsSafeToE() ? 150 : 0) + Game.Ping) <
                            Q.GetDamage(m) + (E.IsReady() && !HasEBuff(m) ? E.GetDamage(m) : 0f));

                    if (!HasQ3() && minionQ != null && GetBoolValue(Q, LaneClearMenu))
                    {
                        CastQ(minionQ);
                    }

                    var minionE =
                        GameObjects.EnemyMinions.OrderBy(m => m.Health)
                        .FirstOrDefault(
                            m =>
                            m.LSIsValidTarget(E.Range) && m.IsSafeToE() &&
                            Health.GetPrediction(m, 30 + Game.Ping) < E.GetDamage(m));

                    if (minionE != null && GetBoolValue(E, LaneClearMenu))
                    {
                        CastE(minionE);
                    }
                }
            }
            //Faster Laneclear(faster, not safe)
            else
            {
                if (!Me.IsDashing())
                {
                    //LastHit
                    var minionQ =
                        GameObjects.EnemyMinions.OrderBy(m => m.Health)
                        .FirstOrDefault(
                            m =>
                            m.LSIsValidTarget(GetQRange()) &&
                            Health.GetPrediction(m,
                                                 (int)Q.Delay + (E.IsReady() ? 30 : 0) + Game.Ping) <=
                            Q.GetDamage(m) +
                            (E.IsReady() && !HasEBuff(m) && m.IsSafeToE() ? E.GetDamage(m) : 0f));

                    if (minionQ != null && GetBoolValue(Q, LaneClearMenu))
                    {
                        CastQ(minionQ);
                    }

                    var minionE =
                        GameObjects.EnemyMinions.OrderBy(m => m.Health)
                        .FirstOrDefault(
                            m =>
                            m.LSIsValidTarget(E.Range) && !HasEBuff(m) &&
                            Health.GetPrediction(m, 30 + Game.Ping) <= E.GetDamage(m));

                    if (minionE != null && GetBoolValue(E, LaneClearMenu))
                    {
                        CastE(minionE);
                    }
                    //Lasthit
                }

                if (Me.CountAllyMinions(900) >= 5)
                {
                    //Fast
                    var minionEKinda =
                        GameObjects.EnemyMinions.OrderBy(m => m.Health)
                        .FirstOrDefault(
                            m =>
                            m.LSIsValidTarget(E.Range) && !HasEBuff(m) &&
                            m.GetPosAfterE().CountEnemyMinions(QCircleRange) >= 1 &&
                            Health.GetPrediction(m, 30 + Game.Ping) <
                            E.GetDamage(m));

                    if (minionEKinda != null && GetBoolValue(E, LaneClearMenu))
                    {
                        CastE(minionEKinda);
                    }
                    if (Me.IsDashing())
                    {
                        var minionQFast =
                            GameObjects.EnemyMinions.OrderBy(m => m.Health)
                            .FirstOrDefault(
                                m =>
                                m.LSIsValidTarget(750) &&
                                DashManager.GetPlayerPosition(250).CountEnemyMinions(QCircleRange) >= 1);

                        if (minionQFast != null && GetBoolValue(Q, LaneClearMenu))
                        {
                            CastQ(minionQFast);
                        }
                    }

                    //Fast
                }

                if (Me.CountAllyMinions(900) <= 1)
                {
                    //Fast
                    var minionEFast =
                        GameObjects.EnemyMinions.OrderBy(m => m.Health)
                        .FirstOrDefault(
                            m =>
                            m.LSIsValidTarget(E.Range) && !HasEBuff(m) &&
                            m.GetPosAfterE().CountEnemyMinions(QCircleRange) >= 1);

                    if (minionEFast != null && GetBoolValue(E, LaneClearMenu))
                    {
                        CastE(minionEFast);
                    }

                    var minionQFast =
                        GameObjects.EnemyMinions.OrderBy(m => m.Health)
                        .FirstOrDefault(
                            m =>
                            m.LSIsValidTarget(750) &&
                            DashManager.GetPlayerPosition(250).CountEnemyMinions(QCircleRange) >= 1);

                    if (minionQFast != null && GetBoolValue(Q, LaneClearMenu))
                    {
                        CastQ(minionQFast);
                    }
                    //Fast
                }
            }

            //Jungleclear
            if (GetBoolValue(E, JungleClearMenu))
            {
                E.SmartCast(E.GetBestJungleClearMinion());
            }

            if (GetBoolValue(Q, JungleClearMenu))
            {
                Q.SmartCast(Q.GetBestJungleClearMinion());
            }
        }