示例#1
0
        void Waveclear()
        {
            if (SpellSlot.Q.IsReady() && !Yasuo.LSIsDashing())
            {
                if (!TornadoReady && GetBool("Waveclear.UseQ", YasuoMenu.WaveclearM) && Orbwalker.IsAutoAttacking)
                {
                    var minion =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(x => x.IsValidMinion(Spells[Q].Range) && ((x.IsDashable() && (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= GetProperEDamage(x))) || (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.15 * x.MaxHealth || x.QCanKill()))).MaxOrDefault(x => x.MaxHealth);
                    if (minion != null)
                    {
                        Spells[Q].Cast(minion);
                    }
                }

                else if (TornadoReady && GetBool("Waveclear.UseQ2", YasuoMenu.WaveclearM))
                {
                    var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Distance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && ((x.IsDashable() && x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.85 * GetProperEDamage(x)) || (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.10 * x.MaxHealth) || x.CanKill(SpellSlot.Q)));
                    var pred    =
                        MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.To2D()).ToList(),
                                                              Spells[Q2].Width, Spells[Q2].Range);
                    if (pred.MinionsHit >= GetSliderInt("Waveclear.Qcount", YasuoMenu.WaveclearM))
                    {
                        Spells[Q2].Cast(pred.Position);
                    }
                }
            }

            if (SpellSlot.E.IsReady() && GetBool("Waveclear.UseE", YasuoMenu.WaveclearM) && (!GetBool("Waveclear.Smart", YasuoMenu.WaveclearM) || isHealthy) && (YasuoEvade.TickCount - WCLastE) >= GetSliderInt("Waveclear.Edelay", YasuoMenu.WaveclearM))
            {
                var           minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsDashable() && ((GetBool("Waveclear.UseENK", YasuoMenu.WaveclearM) && (!GetBool("Waveclear.Smart", YasuoMenu.WaveclearM) || x.Health - GetProperEDamage(x) > GetProperEDamage(x) * 3)) || x.ECanKill()) && (GetBool("Waveclear.ETower", YasuoMenu.WaveclearM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(x).PointUnderEnemyTurret()));
                Obj_AI_Minion minion  = null;
                minion = minions.MaxOrDefault(x => GetDashPos(x).MinionsInRange(200));
                if (minion != null)
                {
                    Spells[E].Cast(minion);
                    WCLastE = YasuoEvade.TickCount;
                }
            }

            if (GetBool("Waveclear.UseItems", YasuoMenu.WaveclearM))
            {
                if (GetBool("Waveclear.UseTIA", YasuoMenu.WaveclearM))
                {
                    Tiamat.minioncount = GetSliderInt("Waveclear.MinCountHDR", YasuoMenu.WaveclearM);
                    Tiamat.Cast(null, true);
                }
                if (GetBool("Waveclear.UseHDR", YasuoMenu.WaveclearM))
                {
                    Hydra.minioncount = GetSliderInt("Waveclear.MinCountHDR", YasuoMenu.WaveclearM);
                    Hydra.Cast(null, true);
                }
                if (GetBool("Waveclear.UseYMU", YasuoMenu.WaveclearM))
                {
                    Youmu.minioncount = GetSliderInt("Waveclear.MinCountYOU", YasuoMenu.WaveclearM);
                    Youmu.Cast(null, true);
                }
            }
        }
示例#2
0
文件: Yasuo.cs 项目: Burbb/Portaio
        void CastENew()
        {
            if (Yasuo.LSIsDashing())
            {
                return;
            }

            if (isHealthy)
            {
                AIHeroClient best = null;
                TargetSelectorA.TargetSelectionConditionDelegate condition = delegate(AIHeroClient target)
                {
                    return(IsPossibleToDash(target, 3).foundPath);
                };

                best = TargetSelector.GetTarget(Spells[E].Range * 4, DamageType.Physical);

                if (best != null)
                {
                    if (best.Distance(Yasuo) < 0.30 * Orbwalking.GetRealAutoAttackRange(best))
                    {
                        return;
                    }


                    if (best.IsValidTarget(Spells[E].Range))
                    {
                        Spells[E].Cast(best);
                    }

                    else
                    {
                        var getPath = GetClosestPath(best, 3);
                        if (getPath.foundPath)
                        {
                            var min = getPath.minionPath.FirstOrDefault();
                            if (min != null && min.IsValidTarget() && ((GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM)) || !GetDashPos(min).PointUnderEnemyTurret()))
                            {
                                Spells[E].CastOnUnit(min);
                            }
                        }
                    }
                }
            }

            else if (!Yasuo.LSIsDashing() && GetBool("Combo.EToSafety", YasuoMenu.ComboM))
            {
                var bestmin =
                    ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsDashable() && GetDashPos(x).Distance(shop.Position) < Yasuo.Distance(shop.Position)).MinOrDefault(x => GetDashPos(x).Distance(shop.Position));
                if (bestmin != null)
                {
                    Spells[E].Cast(bestmin);
                }
            }
        }
示例#3
0
文件: Yasuo.cs 项目: Burbb/Portaio
 internal void PerformEQ()
 {
     if (ETarget != null && ETarget.IsValid && !ETarget.ECanKill() && Yasuo.LSIsDashing() && Spells[Q].IsReady())
     {
         if (!TornadoReady)
         {
             Spells[Q].Cast(ETarget);
         }
         else
         {
             if (ETarget is AIHeroClient)
             {
                 Spells[Q].Cast(ETarget);
             }
         }
     }
 }
示例#4
0
文件: Yasuo.cs 项目: geramz/PortAIO
        void LHSkills()
        {
            if (SpellSlot.Q.IsReady() && !Yasuo.LSIsDashing())
            {
                if (!TornadoReady && GetBool("Farm.UseQ", YasuoMenu.FarmingM))
                {
                    var minion =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .FirstOrDefault(x => x.IsValidMinion(Spells[Q].Range) && x.QCanKill());
                    if (minion != null)
                    {
                        Spells[Q].Cast(minion);
                    }
                }

                else if (TornadoReady && GetBool("Farm.UseQ2", YasuoMenu.FarmingM))
                {
                    var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.LSDistance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && (x.QCanKill()));
                    var pred    =
                        MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.LSTo2D()).ToList(),
                                                              Spells[Q2].Width, Spells[Q2].Range);
                    if (pred.MinionsHit >= GetSliderInt("Farm.Qcount", YasuoMenu.FarmingM))
                    {
                        Spells[Q2].Cast(pred.Position);
                    }
                }
            }

            if (Spells[E].IsReady() && GetBool("Farm.UseE", YasuoMenu.FarmingM))
            {
                var minion = ObjectManager.Get <Obj_AI_Minion>().FirstOrDefault(x => x.IsDashable() && x.ECanKill() && (GetBool("Waveclear.ETower", YasuoMenu.WaveclearM) || ShouldDive(x)));
                if (minion != null)
                {
                    Spells[E].Cast(minion);
                }
            }
        }
示例#5
0
文件: Yasuo.cs 项目: geramz/PortAIO
        void Flee()
        {
            Orbwalker.DisableAttacking = true; // BERB
            if (GetBool("Flee.UseQ2", YasuoMenu.MiscM) && !Yasuo.LSIsDashing() && SpellSlot.Q.IsReady() && TornadoReady)
            {
                var qtarg = TargetSelector.GetTarget(Spells[Q2].Range, DamageType.Physical);
                if (qtarg != null)
                {
                    Spells[Q2].Cast(qtarg.ServerPosition);
                }
            }

            if (FleeMode == FleeType.ToCursor)
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);

                var smart = GetBool("Flee.Smart", YasuoMenu.MiscM);

                if (Spells[E].IsReady())
                {
                    if (smart)
                    {
                        Obj_AI_Base dashTarg;

                        if (Yasuo.ServerPosition.PointUnderEnemyTurret())
                        {
                            var closestturret =
                                ObjectManager.Get <Obj_AI_Turret>()
                                .Where(x => x.IsEnemy)
                                .MinOrDefault(y => y.LSDistance(Yasuo));

                            var potential =
                                ObjectManager.Get <Obj_AI_Base>()
                                .Where(x => x.IsDashable())
                                .MaxOrDefault(x => GetDashPos(x).LSDistance(closestturret));

                            if (potential != null)
                            {
                                var gdpos = GetDashPos(potential);
                                if (gdpos.LSDistance(Game.CursorPos) < Yasuo.LSDistance(Game.CursorPos) &&
                                    gdpos.LSDistance(closestturret.Position) - closestturret.BoundingRadius >
                                    Yasuo.LSDistance(closestturret.Position) - Yasuo.BoundingRadius)
                                {
                                    Spells[E].Cast(potential);
                                }
                            }
                        }

                        dashTarg = ObjectManager.Get <Obj_AI_Base>()
                                   .Where(x => x.IsDashable())
                                   .MinOrDefault(x => GetDashPos(x).LSDistance(Game.CursorPos));

                        if (dashTarg != null)
                        {
                            var posafdash = GetDashPos(dashTarg);

                            if (posafdash.LSDistance(Game.CursorPos) < Yasuo.LSDistance(Game.CursorPos) &&
                                !posafdash.PointUnderEnemyTurret())
                            {
                                Spells[E].CastOnUnit(dashTarg);
                            }
                        }
                    }

                    else
                    {
                        var dashtarg =
                            ObjectManager.Get <Obj_AI_Minion>()
                            .Where(x => x.IsDashable())
                            .MinOrDefault(x => GetDashPos(x).LSDistance(Game.CursorPos));

                        if (dashtarg != null)
                        {
                            Spells[E].CastOnUnit(dashtarg);
                        }
                    }
                }

                if (GetBool("Flee.StackQ", YasuoMenu.MiscM) && SpellSlot.Q.IsReady() && !TornadoReady && !Yasuo.LSIsDashing())
                {
                    Obj_AI_Minion qtarg = null;
                    if (!Spells[E].IsReady())
                    {
                        qtarg =
                            ObjectManager.Get <Obj_AI_Minion>()
                            .Find(x => x.LSIsValidTarget(Spells[Q].Range) && MinionManager.IsMinion(x));
                    }
                    else
                    {
                        var etargs =
                            ObjectManager.Get <Obj_AI_Minion>()
                            .Where(
                                x => x.LSIsValidTarget(Spells[E].Range) && MinionManager.IsMinion(x) && x.IsDashable());
                        if (!etargs.Any())
                        {
                            qtarg =
                                ObjectManager.Get <Obj_AI_Minion>()
                                .Find(x => x.LSIsValidTarget(Spells[Q].Range) && MinionManager.IsMinion(x));
                        }
                    }

                    if (qtarg != null)
                    {
                        Spells[Q].Cast(qtarg);
                    }
                }
            }

            if (FleeMode == FleeType.ToNexus)
            {
                var nexus = shop;
                if (nexus != null)
                {
                    Orbwalker.OrbwalkTo(nexus.Position);
                    var bestminion = ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsDashable()).MinOrDefault(x => GetDashPos(x).LSDistance(nexus.Position));
                    if (bestminion != null && (!GetBool("Flee.Smart", YasuoMenu.MiscM) || GetDashPos(bestminion).LSDistance(nexus.Position) < Yasuo.LSDistance(nexus.Position)))
                    {
                        Spells[E].CastOnUnit(bestminion);
                        if (GetBool("Flee.StackQ", YasuoMenu.MiscM) && SpellSlot.Q.IsReady() && !TornadoReady)
                        {
                            Spells[Q].Cast(bestminion);
                        }
                    }
                }
            }

            if (FleeMode == FleeType.ToAllies)
            {
                Obj_AI_Base bestally = HeroManager.Allies.Where(x => !x.IsMe && x.LSCountEnemiesInRange(300) == 0).MinOrDefault(x => x.LSDistance(Yasuo));
                if (bestally == null)
                {
                    bestally =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(x => x.IsValidAlly(3000))
                        .MinOrDefault(x => x.LSDistance(Yasuo));
                }

                if (bestally != null)
                {
                    Orbwalker.OrbwalkTo(bestally.ServerPosition);
                    if (Spells[E].IsReady())
                    {
                        var besttarget =
                            ObjectManager.Get <Obj_AI_Base>()
                            .Where(x => x.IsDashable())
                            .MinOrDefault(x => GetDashPos(x).LSDistance(bestally.ServerPosition));
                        if (besttarget != null)
                        {
                            Spells[E].CastOnUnit(besttarget);
                            if (GetBool("Flee.StackQ", YasuoMenu.MiscM) && SpellSlot.Q.IsReady() && !TornadoReady)
                            {
                                Spells[Q].Cast(besttarget);
                            }
                        }
                    }
                }

                else
                {
                    var nexus = shop;
                    if (nexus != null)
                    {
                        Orbwalker.OrbwalkTo(nexus.Position);
                        var bestminion = ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsDashable()).MinOrDefault(x => GetDashPos(x).LSDistance(nexus.Position));
                        if (bestminion != null && GetDashPos(bestminion).LSDistance(nexus.Position) < Yasuo.LSDistance(nexus.Position))
                        {
                            Spells[E].CastOnUnit(bestminion);
                        }
                    }
                }
            }
        }
示例#6
0
文件: Yasuo.cs 项目: geramz/PortAIO
        void OnUpdate(EventArgs args)
        {
            if (Yasuo.IsDead || Yasuo.LSIsRecalling())
            {
                return;
            }

            CastUlt();

            if (GetBool("Misc.AutoStackQ", YasuoMenu.MiscM) && !TornadoReady && !CurrentTarget.IsValidEnemy(Spells[Q].Range) && !Yasuo.LSIsDashing() && !InDash)
            {
                var closest =
                    ObjectManager.Get <Obj_AI_Minion>()
                    .Where(x => x.IsValidMinion(Spells[Q].Range) && (MinionManager.IsMinion(x) || x.BaseSkinName.Equals("Sru_Crab")))
                    .MinOrDefault(x => x.LSDistance(Yasuo));
                if (closest != null)
                {
                    var pred = Spells[Q].GetPrediction(closest);
                    if (pred.Hitchance >= HitChance.Low)
                    {
                        Spells[Q].Cast(closest.ServerPosition);
                    }
                }
            }

            if (GetBool("Misc.Walljump", YasuoMenu.MiscM) && Game.MapId == GameMapId.SummonersRift)
            {
                WallJump.OnUpdate();
            }

            if (GetKeyBind("Misc.DashMode", YasuoMenu.MiscM))
            {
                MoveToMouse();
                return;
            }

            Fleeing = Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee);

            if (GetBool("Killsteal.Enabled", YasuoMenu.KillstealM) && !Fleeing)
            {
                Killsteal();
            }

            if (GetKeyBind("Harass.KB", YasuoMenu.HarassM) && !Fleeing)
            {
                Harass();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);
                Orbwalker.DisableAttacking = false;
                Combo();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);
                Orbwalker.DisableAttacking = false;
                Mixed();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);
                Orbwalker.DisableAttacking = false;
                LHSkills();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);
                Orbwalker.DisableAttacking = false;
                Waveclear();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))
            {
                Flee();
            }
        }
示例#7
0
文件: Yasuo.cs 项目: geramz/PortAIO
        internal void CastENew(AIHeroClient target)
        {
            if (!SpellSlot.E.IsReady() || Yasuo.LSIsDashing() || InDash)
            {
                return;
            }

            var minionsinrange = ObjectManager.Get <Obj_AI_Minion>().Any(x => x.IsDashable());

            if (target == null || !target.IsInRange(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range))
            {
                target = TargetSelector.GetTarget(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range,
                                                  DamageType.Physical);
            }

            if (target != null && TowerCheck(target, true))
            {
                var dist          = Yasuo.LSDistance(target);
                var pctOutOfRange = dist / Yasuo.AttackRange * 100;

                if (pctOutOfRange > 0.8f)
                {
                    if (target.IsDashable())
                    {
                        if (target.ECanKill())
                        {
                            return;
                        }

                        if (TornadoReady && target.IsInRange(Spells[E].Range) && targInKnockupRadius(target))
                        {
                            Spells[E].CastOnUnit(target);
                        }

                        //Stay in range
                        else if (pctOutOfRange > 0.8f)
                        {
                            var bestminion = ObjectManager.Get <Obj_AI_Base>()
                                             .Where(x =>
                                                    x.IsDashable() &&
                                                    GetDashPos(x).IsCloser(target) && TowerCheck(x, true))
                                             .MinOrDefault(x => GetDashPos(x).LSDistance(target));

                            var shouldETarget = bestminion == null || GetDashPos(target).Distance(target) <
                                                GetDashPos(bestminion).LSDistance(target);
                            if (shouldETarget && GetDashPos(target).IsCloser(target))
                            {
                                Spells[E].CastOnUnit(target);
                            }

                            else if (bestminion != null)
                            {
                                Spells[E].CastOnUnit(bestminion);
                            }
                        }
                    }

                    else
                    {
                        var minion = ObjectManager.Get <Obj_AI_Minion>()
                                     .Where(x => x.IsDashable() && x.IsCloser(target) && TowerCheck(x, true))
                                     .MinOrDefault(x => GetDashPos(x).LSDistance(target));
                        if (minion != null)
                        {
                            Spells[E].CastOnUnit(minion);
                        }
                    }
                }
            }
        }
示例#8
0
文件: Yasuo.cs 项目: geramz/PortAIO
        internal void CastQ(AIHeroClient target)
        {
            if (target != null && !target.IsInRange(Qrange))
            {
                target = TargetSelector.GetTarget(Qrange, DamageType.Physical);
            }

            if (target != null)
            {
                if (Spells[Q].IsReady() && target.IsValidEnemy(Qrange))
                {
                    UseQ(target, GetHitChance("Hitchance.Q"), GetBool("Combo.UseQ", YasuoMenu.ComboM), GetBool("Combo.UseQ2", YasuoMenu.ComboM));
                    return;
                }

                if (GetBool("Combo.StackQ", YasuoMenu.ComboM) && !target.IsValidEnemy(Qrange) && !TornadoReady && !Yasuo.LSIsDashing() && !InDash)
                {
                    var bestmin =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(x => x.IsValidMinion(Qrange) && MinionManager.IsMinion(x, false))
                        .MinOrDefault(x => x.LSDistance(Yasuo));
                    if (bestmin != null)
                    {
                        var pred = Spells[Q].GetPrediction(bestmin);

                        if (pred.Hitchance >= HitChance.Medium)
                        {
                            Spells[Q].Cast(bestmin);
                        }
                    }
                }
            }
        }
示例#9
0
        //minimum amount of minions
        internal void CastENew(AIHeroClient target)
        {
            if (!SpellSlot.E.IsReady() || Yasuo.LSIsDashing() || InDash)
            {
                return;
            }

            var minionsinrange = ObjectManager.Get <Obj_AI_Minion>().Any(x => x.IsDashable());

            if (target == null || !target.IsInRange(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range))
            {
                target = TargetSelector.GetTarget(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range,
                                                  DamageType.Physical);
            }

            if (target != null && TowerCheck(target, true))
            {
                if (!target.IsDashable())
                {
                    var bestminion = ObjectManager.Get <Obj_AI_Base>()
                                     .Where(x =>
                                            x.IsDashable() &&
                                            GetDashPos(x).IsCloser(target) && TowerCheck(x, true))
                                     .MinOrDefault(x => GetDashPos(x).LSDistance(target));

                    if (bestminion != null)
                    {
                        Spells[E].CastOnUnit(bestminion);
                        return;
                    }
                }

                else
                {
                    var dist          = Yasuo.LSDistance(target);
                    var pctOutOfRange = dist / Spells[E].Range * 100;

                    //Stay in range
                    if (pctOutOfRange > 0.8f)
                    {
                        if (TornadoReady && target.IsDashable() && targInKnockupRadius(target))
                        {
                            Spells[E].CastOnUnit(target);
                        }
                        else
                        {
                            var bestminion = ObjectManager.Get <Obj_AI_Base>()
                                             .Where(x =>
                                                    x.IsDashable() &&
                                                    GetDashPos(x).IsCloser(target) && TowerCheck(x, true))
                                             .MinOrDefault(x => GetDashPos(x).LSDistance(target));

                            if (bestminion != null)
                            {
                                Spells[E].CastOnUnit(bestminion);
                            }

                            else if (target.IsDashable() && GetDashPos(target).IsCloser(target))
                            {
                                Spells[E].CastOnUnit(target);
                            }
                        }
                    }

                    //Catch up using a minion
                    else if (pctOutOfRange > 1)
                    {
                        var minion =
                            ObjectManager.Get <Obj_AI_Minion>()
                            .Where(x => x.IsDashable() && x.IsCloser(target) && TowerCheck(x, true))
                            .MinOrDefault(x => GetDashPos(x).LSDistance(target));
                        if (minion != null)
                        {
                            Spells[E].CastOnUnit(target);
                        }
                    }

                    //Go for a EQ if target is well within range
                    else
                    {
                        if (Spells[Q].IsReady() && TornadoReady)
                        {
                            if (targInKnockupRadius(target))
                            {
                                Spells[E].CastOnUnit(target);
                                return;
                            }
                        }


                        if (DashCount == 0)
                        {
                            var bestminion =
                                ObjectManager.Get <Obj_AI_Base>()
                                .Where(
                                    x =>
                                    x.IsDashable() &&
                                    GetDashPos(x).IsCloser(target) && TowerCheck(x, true))
                                .MinOrDefault(x => GetDashPos(x).LSDistance(target));

                            if (bestminion != null)
                            {
                                Spells[E].CastOnUnit(bestminion);
                            }

                            else if (target.IsDashable() && GetDashPos(target).IsCloser(target) &&
                                     TowerCheck(target, true))
                            {
                                Spells[E].CastOnUnit(target);
                            }
                        }
                    }
                }
            }
        }