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); } } }
private void CastUlt() { if (!SpellSlot.R.IsReady()) { return; } if (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.UseR") && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { CastR(YasuoMenu.getSliderItem(YasuoMenu.ComboA, "Combo.RMinHit")); } if (YasuoMenu.getCheckBoxItem(YasuoMenu.MiscA, "Misc.AutoR") && !Fleeing) { CastR(YasuoMenu.getSliderItem(YasuoMenu.MiscA, "Misc.RMinHit")); } }
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 CastR(float minhit = 1) { var ultmode = GetUltMode(); IOrderedEnumerable <AIHeroClient> ordered = null; if (ultmode == UltMode.Health) { ordered = KnockedUp.OrderBy(x => x.Health) .ThenByDescending(TargetSelector.GetPriority) .ThenByDescending(x => x.CountEnemiesInRange(350)); } if (ultmode == UltMode.Priority) { ordered = KnockedUp.OrderByDescending(TargetSelector.GetPriority) .ThenBy(x => x.Health) .ThenByDescending(x => x.CountEnemiesInRange(350)); } if (ultmode == UltMode.EnemiesHit) { ordered = KnockedUp.OrderByDescending(x => x.CountEnemiesInRange(350)) .ThenByDescending(TargetSelector.GetPriority) .ThenBy(x => x.Health); } if ((YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.OnlyifMin") && ordered.Count() < minhit) || (ordered.Count() == 1 && ordered.FirstOrDefault().HealthPercent < YasuoMenu.getSliderItem(YasuoMenu.ComboA, "Combo.MinHealthUlt"))) { return; } if (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.RPriority")) { var best = ordered.Find( x => !x.isBlackListed() && TargetSelector.GetPriority(x) == 5 && (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.UltTower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !x.Position.To2D().PointUnderEnemyTurret())); if (best != null && Yasuo.HealthPercent / best.HealthPercent <= 1) { Spells[R].CastOnUnit(best); return; } } if (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.UltOnlyKillable")) { var killable = ordered.FirstOrDefault( x => !x.isBlackListed() && x.Health <= Yasuo.GetSpellDamage(x, SpellSlot.R) && x.HealthPercent >= YasuoMenu.getSliderItem(YasuoMenu.ComboA, "Combo.MinHealthUlt") && (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.UltTower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !x.Position.To2D().PointUnderEnemyTurret())); if (killable != null && !killable.IsInRange(Spells[Q].Range)) { Spells[R].CastOnUnit(killable); return; } } if (ordered.Count() >= minhit) { var best2 = ordered.FirstOrDefault( x => !x.isBlackListed() && (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.UltTower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !x.Position.To2D().PointUnderEnemyTurret())); if (best2 != null) { Spells[R].CastOnUnit(best2); } } }