private void LHSkills() { if (SpellSlot.Q.IsReady() && !Yasuo.IsDashing()) { if (!TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.FarmingA, "Farm.UseQ")) { var minion = ObjectManager.Get <Obj_AI_Minion>() .FirstOrDefault(x => x.IsValidMinion(Spells[Q].Range) && x.QCanKill()); if (minion != null) { Spells[Q].Cast(minion.ServerPosition); } } else if (TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.FarmingA, "Farm.UseQ2")) { var minions = ObjectManager.Get <Obj_AI_Minion>() .Where( x => x.Distance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && x.QCanKill()); var pred = MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[Q2].Width, Spells[Q2].Range); if (pred.MinionsHit >= YasuoMenu.getSliderItem(YasuoMenu.FarmingA, "Farm.Qcount")) { Spells[Q2].Cast(pred.Position); } } } if (Spells[E].IsReady() && YasuoMenu.getCheckBoxItem(YasuoMenu.FarmingA, "Farm.UseE")) { var minion = ObjectManager.Get <Obj_AI_Minion>() .FirstOrDefault( x => x.IsDashable() && x.ECanKill() && (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.ETower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !GetDashPos(x).PointUnderEnemyTurret())); if (minion != null) { Spells[E].Cast(minion); } } }
void LHSkills() { if (SpellSlot.Q.IsReady() && !Yasuo.IsDashing()) { if (!TornadoReady && GetBool("Farm.UseQ")) { var minion = ObjectManager.Get <Obj_AI_Minion>() .FirstOrDefault(x => x.IsValidMinion(Spells[Q].Range) && x.QCanKill()); if (minion != null) { Spells[Q].Cast(minion.ServerPosition); } } else if (TornadoReady && GetBool("Farm.UseQ2")) { var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Distance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && (x.QCanKill())); var pred = MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[Q2].Width, Spells[Q2].Range); if (pred.MinionsHit >= GetSliderInt("Farm.Qcount")) { Spells[Q2].Cast(pred.Position); } } } if (Spells[E].IsReady() && GetBool("Farm.UseE")) { var minion = ObjectManager.Get <Obj_AI_Minion>().FirstOrDefault(x => x.IsDashable() && x.ECanKill() && (GetBool("Waveclear.ETower") || ShouldDive(x))); if (minion != null) { Spells[E].Cast(minion); } } }
void Waveclear() { if (SpellSlot.Q.IsReady() && !Yasuo.IsDashing() && !InDash) { if (!TornadoReady && GetBool("Waveclear.UseQ") && Yasuo.Spellbook.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.ServerPosition); LastTornadoClearTick = Helper.TickCount; } } else if (TornadoReady && GetBool("Waveclear.UseQ2")) { 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")) { Spells[Q2].Cast(pred.Position); LastTornadoClearTick = Helper.TickCount; } } } if (Helper.TickCount - LastTornadoClearTick < 500) { return; } if (SpellSlot.E.IsReady() && GetBool("Waveclear.UseE") && (!GetBool("Waveclear.Smart") || isHealthy) && (Helper.TickCount - WCLastE) >= GetSliderInt("Waveclear.Edelay")) { var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsDashable() && ((GetBool("Waveclear.UseENK") && (!GetBool("Waveclear.Smart") || x.Health - GetProperEDamage(x) > GetProperEDamage(x) * 3)) || x.ECanKill()) && (GetBool("Waveclear.ETower") || ShouldDive(x))); Obj_AI_Minion minion = null; minion = minions.OrderBy(x => x.ECanKill()).ThenBy(x => GetDashPos(x).MinionsInRange(200)).FirstOrDefault(); if (minion != null) { Spells[E].Cast(minion); WCLastE = Helper.TickCount; } } if (GetBool("Waveclear.UseItems")) { if (GetBool("Waveclear.UseTIA")) { Tiamat.minioncount = GetSliderInt("Waveclear.MinCountHDR"); Tiamat.Cast(null, true); } if (GetBool("Waveclear.UseTitanic")) { Titanic.minioncount = GetSliderInt("Waveclear.MinCountHDR"); Titanic.Cast(null, true); } if (GetBool("Waveclear.UseHDR")) { Hydra.minioncount = GetSliderInt("Waveclear.MinCountHDR"); Hydra.Cast(null, true); } if (GetBool("Waveclear.UseYMU")) { Youmu.minioncount = GetSliderInt("Waveclear.MinCountYOU"); Youmu.Cast(null, true); } } }
void Flee() { Orbwalker.SetAttack(false); if (GetBool("Flee.UseQ2") && !Yasuo.IsDashing() && SpellSlot.Q.IsReady() && TornadoReady) { var qtarg = TargetSelector.GetTarget(Spells[Q2].Range, TargetSelector.DamageType.Physical); if (qtarg != null) { Spells[Q2].Cast(qtarg.ServerPosition); } } if (FleeMode == FleeType.ToCursor) { Orbwalker.SetOrbwalkingPoint(Game.CursorPos); var smart = GetBool("Flee.Smart"); 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.Distance(Yasuo)); var potential = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MaxOrDefault(x => GetDashPos(x).Distance(closestturret)); if (potential != null) { var gdpos = GetDashPos(potential); if (gdpos.Distance(Game.CursorPos) < Yasuo.Distance(Game.CursorPos) && gdpos.Distance(closestturret.Position) - closestturret.BoundingRadius > Yasuo.Distance(closestturret.Position) - Yasuo.BoundingRadius) { Spells[E].Cast(potential); } } } dashTarg = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(Game.CursorPos)); if (dashTarg != null) { var posafdash = GetDashPos(dashTarg); if (posafdash.Distance(Game.CursorPos) < Yasuo.Distance(Game.CursorPos) && !posafdash.PointUnderEnemyTurret()) { Spells[E].CastOnUnit(dashTarg); } } } else { var dashtarg = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(Game.CursorPos)); if (dashtarg != null) { Spells[E].CastOnUnit(dashtarg); } } } if (GetBool("Flee.StackQ") && SpellSlot.Q.IsReady() && !TornadoReady && !Yasuo.IsDashing()) { Obj_AI_Minion qtarg = null; if (!Spells[E].IsReady()) { qtarg = ObjectManager.Get <Obj_AI_Minion>() .Find(x => x.IsValidTarget(Spells[Q].Range) && MinionManager.IsMinion(x)); } else { var etargs = ObjectManager.Get <Obj_AI_Minion>() .Where( x => x.IsValidTarget(Spells[E].Range) && MinionManager.IsMinion(x) && x.IsDashable()); if (!etargs.Any()) { qtarg = ObjectManager.Get <Obj_AI_Minion>() .Find(x => x.IsValidTarget(Spells[Q].Range) && MinionManager.IsMinion(x)); } } if (qtarg != null) { Spells[Q].Cast(qtarg.ServerPosition); } } } if (FleeMode == FleeType.ToNexus) { var nexus = shop; if (nexus != null) { Orbwalker.SetOrbwalkingPoint(nexus.Position); var bestminion = ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsDashable()).MinOrDefault(x => GetDashPos(x).Distance(nexus.Position)); if (bestminion != null && (!GetBool("Flee.Smart") || GetDashPos(bestminion).Distance(nexus.Position) < Yasuo.Distance(nexus.Position))) { Spells[E].CastOnUnit(bestminion); if (GetBool("Flee.StackQ") && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(bestminion.ServerPosition); } } } } if (FleeMode == FleeType.ToAllies) { Obj_AI_Base bestally = HeroManager.Allies.Where(x => !x.IsMe && x.CountEnemiesInRange(300) == 0).MinOrDefault(x => x.Distance(Yasuo)); if (bestally == null) { bestally = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidAlly(3000)) .MinOrDefault(x => x.Distance(Yasuo)); } if (bestally != null) { Orbwalker.SetOrbwalkingPoint(bestally.ServerPosition); if (Spells[E].IsReady()) { var besttarget = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(bestally.ServerPosition)); if (besttarget != null) { Spells[E].CastOnUnit(besttarget); if (GetBool("Flee.StackQ") && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(besttarget.ServerPosition); } } } } else { var nexus = shop; if (nexus != null) { Orbwalker.SetOrbwalkingPoint(nexus.Position); var bestminion = ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsDashable()).MinOrDefault(x => GetDashPos(x).Distance(nexus.Position)); if (bestminion != null && GetDashPos(bestminion).Distance(nexus.Position) < Yasuo.Distance(nexus.Position)) { Spells[E].CastOnUnit(bestminion); } } } } }
void OnUpdate(EventArgs args) { if (Yasuo.IsDead || Yasuo.IsRecalling()) { return; } CastUlt(); if (GetBool("Evade.WTS")) { TargettedDanger.OnUpdate(); } if (GetBool("Misc.AutoStackQ") && !TornadoReady && !CurrentTarget.IsValidEnemy(Spells[Q].Range) && !Yasuo.IsDashing() && !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.Distance(Yasuo)); if (closest != null) { var pred = Spells[Q].GetPrediction(closest); if (pred.Hitchance >= HitChance.Low) { Spells[Q].Cast(closest.ServerPosition); } } } if (GetBool("Misc.Walljump") && Game.MapId == GameMapId.SummonersRift) { WallJump.OnUpdate(); } if (GetKeyBind("Misc.DashMode")) { MoveToMouse(); return; } Fleeing = Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.CustomMode; if (GetBool("Killsteal.Enabled") && !Fleeing) { Killsteal(); } if (GetKeyBind("Harass.KB") && !Fleeing) { Harass(); } switch (Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true); Combo(); break; case Orbwalking.OrbwalkingMode.Mixed: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true); Mixed(); break; case Orbwalking.OrbwalkingMode.LastHit: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true); LHSkills(); break; case Orbwalking.OrbwalkingMode.LaneClear: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true); Waveclear(); break; case Orbwalking.OrbwalkingMode.CustomMode: Flee(); break; case Orbwalking.OrbwalkingMode.None: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); break; } }
internal void CastENew(AIHeroClient target) { if (!SpellSlot.E.IsReady() || Yasuo.IsDashing() || 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, TargetSelector.DamageType.Physical); } if (target != null && TowerCheck(target, true)) { var dist = Yasuo.Distance(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).Distance(target)); var shouldETarget = bestminion == null || GetDashPos(target).Distance(target) < GetDashPos(bestminion).Distance(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).Distance(target)); if (minion != null) { Spells[E].CastOnUnit(minion); } } } } }
internal void CastQ(AIHeroClient target) { if (target != null && !target.IsInRange(Qrange)) { target = TargetSelector.GetTarget(Qrange, TargetSelector.DamageType.Physical); } if (target != null) { if (Spells[Q].IsReady() && target.IsValidEnemy(Qrange)) { UseQ(target, GetHitChance("Hitchance.Q"), GetBool("Combo.UseQ"), GetBool("Combo.UseQ2")); return; } if (GetBool("Combo.StackQ") && !target.IsValidEnemy(Qrange) && !TornadoReady && !Yasuo.IsDashing() && !InDash) { var bestmin = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidMinion(Qrange) && MinionManager.IsMinion(x, false)) .MinOrDefault(x => x.Distance(Yasuo)); if (bestmin != null) { var pred = Spells[Q].GetPrediction(bestmin); if (pred.Hitchance >= HitChance.Medium) { Spells[Q].Cast(bestmin.ServerPosition); } } } } }
private void Waveclear() { if (SpellSlot.Q.IsReady() && !Yasuo.IsDashing()) { if (!TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseQ")) { 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.ServerPosition); } } else if (TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseQ2")) { 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 >= YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.Qcount")) { Spells[Q2].Cast(pred.Position); } } } if (SpellSlot.E.IsReady() && YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseE") && (!YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.Smart") || isHealthy)) { var minions = ObjectManager.Get <Obj_AI_Minion>() .Where( x => x.IsDashable() && ((YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseENK") && (!YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.Smart") || x.Health - GetProperEDamage(x) > GetProperEDamage(x) * 3)) || x.ECanKill()) && (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.ETower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !GetDashPos(x).PointUnderEnemyTurret())); Obj_AI_Minion minion = null; minion = minions.MaxOrDefault(x => GetDashPos(x).MinionsInRange(200)); if (minion != null) { Spells[E].Cast(minion); } } if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseItems")) { if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseTIA")) { Tiamat.minioncount = YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.MinCountHDR"); Tiamat.Cast(null, true); } if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseHDR")) { Hydra.minioncount = YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.MinCountHDR"); Hydra.Cast(null, true); } if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseYMU")) { Youmu.minioncount = YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.MinCountYOU"); Youmu.Cast(null, true); } } }
private void Flee() { //Orbwalker.SetAttack(false); Orbwalker.DisableAttacking = true; if (YasuoMenu.getCheckBoxItem(YasuoMenu.Flee, "Flee.UseQ2") && !Yasuo.IsDashing() && 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); if (Spells[E].IsReady()) { var dashtarg = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(Game.CursorPos)); if (dashtarg != null && GetDashPos(dashtarg).Distance(Game.CursorPos) < Yasuo.Distance(Game.CursorPos)) { Spells[E].CastOnUnit(dashtarg); if (YasuoMenu.getCheckBoxItem(YasuoMenu.Flee, "Flee.StackQ") && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(dashtarg.ServerPosition); } } } } if (FleeMode == FleeType.ToNexus) { var nexus = ObjectManager.Get <Obj_Shop>().FirstOrDefault(x => x.IsAlly); if (nexus != null) { Orbwalker.OrbwalkTo(nexus.Position); var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(nexus.Position)); if (bestminion != null && GetDashPos(bestminion).Distance(nexus.Position) < Yasuo.Distance(nexus.Position)) { Spells[E].CastOnUnit(bestminion); if (YasuoMenu.getCheckBoxItem(YasuoMenu.Flee, "Flee.StackQ") && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(bestminion.ServerPosition); } } } } if (FleeMode == FleeType.ToAllies) { Obj_AI_Base bestally = HeroManager.Allies.Where(x => !x.IsMe && x.CountEnemiesInRange(300) == 0) .MinOrDefault(x => x.Distance(Yasuo)) ?? (Obj_AI_Base)ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidAlly(3000)) .MinOrDefault(x => x.Distance(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).Distance(bestally.ServerPosition)); if (besttarget != null) { Spells[E].CastOnUnit(besttarget); if (YasuoMenu.getCheckBoxItem(YasuoMenu.Flee, "Flee.StackQ") && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(besttarget.ServerPosition); } } } } else { var nexus = ObjectManager.Get <Obj_Shop>().FirstOrDefault(x => x.IsAlly); if (nexus != null) { Orbwalker.OrbwalkTo(nexus.Position); var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(nexus.Position)); if (bestminion != null && GetDashPos(bestminion).Distance(nexus.Position) < Yasuo.Distance(nexus.Position)) { Spells[E].CastOnUnit(bestminion); } } } } }
internal void CastENew(Obj_AI_Hero target) { if (!SpellSlot.E.IsReady() || Yasuo.IsDashing() || 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, TargetSelector.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).Distance(target)); if (bestminion != null) { Spells[E].CastOnUnit(bestminion); return; } } else { var dist = Yasuo.Distance(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).Distance(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).Distance(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).Distance(target)); if (bestminion != null) { Spells[E].CastOnUnit(bestminion); } else if (target.IsDashable() && GetDashPos(target).IsCloser(target) && TowerCheck(target, true)) { Spells[E].CastOnUnit(target); } } } } } }