void Waveclear() { if (SpellSlot.Q.IsReady() && !Yasuo.LSIsDashing() && !InDash) { 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.LSGetSpellDamage(x, SpellSlot.Q) >= GetProperEDamage(x))) || (x.Health - Yasuo.LSGetSpellDamage(x, SpellSlot.Q) >= 0.15 * x.MaxHealth || x.QCanKill()))).MaxOrDefault(x => x.MaxHealth); if (minion != null) { Spells[Q].Cast(minion); LastTornadoClearTick = Helper.TickCount; } } else if (TornadoReady && GetBool("Waveclear.UseQ2", YasuoMenu.WaveclearM)) { var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.LSDistance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && ((x.IsDashable() && x.Health - Yasuo.LSGetSpellDamage(x, SpellSlot.Q) >= 0.85 * GetProperEDamage(x)) || (x.Health - Yasuo.LSGetSpellDamage(x, SpellSlot.Q) >= 0.10 * x.MaxHealth) || x.CanKill(SpellSlot.Q))); var pred = MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.LSTo2D()).ToList(), Spells[Q2].Width, Spells[Q2].Range); if (pred.MinionsHit >= GetSliderInt("Waveclear.Qcount", YasuoMenu.WaveclearM)) { Spells[Q2].Cast(pred.Position); } } } if (Helper.TickCount - LastTornadoClearTick < 500) { return; } if (SpellSlot.E.IsReady() && GetBool("Waveclear.UseE", YasuoMenu.WaveclearM) && (!GetBool("Waveclear.Smart", YasuoMenu.WaveclearM) || isHealthy) && (Helper.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.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", YasuoMenu.WaveclearM)) { if (GetBool("Waveclear.UseTIA", YasuoMenu.WaveclearM)) { Tiamat.minioncount = GetSliderInt("Waveclear.MinCountHDR", YasuoMenu.WaveclearM); Tiamat.Cast(null, true); } if (GetBool("Waveclear.UseTitanic", YasuoMenu.WaveclearM)) { Titanic.minioncount = GetSliderInt("Waveclear.MinCountHDR", YasuoMenu.WaveclearM); Titanic.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); } } }
void CastR(int minhit = 1) { UltMode ultmode = GetUltMode(); List <AIHeroClient> ordered = new List <AIHeroClient>(); if (ultmode == UltMode.Health) { ordered = KnockedUp.OrderBy(x => x.Health).ThenByDescending(x => TargetSelector.GetPriority(x)).ThenByDescending(x => x.CountEnemiesInRange(350)).ToList(); } if (ultmode == UltMode.Priority) { ordered = KnockedUp.OrderByDescending(x => TargetSelector.GetPriority(x)).ThenBy(x => x.Health).ThenByDescending(x => x.CountEnemiesInRange(350)).ToList(); } if (ultmode == UltMode.EnemiesHit) { ordered = KnockedUp.OrderByDescending(x => x.LSCountEnemiesInRange(350)).ThenByDescending(x => TargetSelector.GetPriority(x)).ThenBy(x => x.Health).ToList(); } if (GetBool("Combo.UltOnlyKillable", YasuoMenu.ComboM)) { var killable = ordered.FirstOrDefault(x => !x.isBlackListed() && x.Health <= Yasuo.LSGetSpellDamage(x, SpellSlot.R) && x.HealthPercent >= GetSliderInt("Combo.MinHealthUlt", YasuoMenu.ComboM) && (GetBool("Combo.UltTower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || ShouldDive(x))); if (killable != null && (!killable.IsInRange(Spells[Q].Range) || !isHealthy)) { Spells[R].CastOnUnit(killable); } return; } if ((GetBool("Combo.OnlyifMin", YasuoMenu.ComboM) && ordered.Count() < minhit) || (ordered.Count() == 1 && ordered.FirstOrDefault().HealthPercent < GetSliderInt("Combo.MinHealthUlt", YasuoMenu.ComboM))) { return; } if (GetBool("Combo.RPriority", YasuoMenu.ComboM)) { var best = ordered.Find(x => !x.isBlackListed() && TargetSelector.GetPriority(x).Equals(2.5f) && (GetBool("Combo.UltTower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !x.Position.LSTo2D().PointUnderEnemyTurret())); if (best != null && Yasuo.HealthPercent / best.HealthPercent <= 1) { Spells[R].CastOnUnit(best); return; } } if (ordered.Count() >= minhit) { var best2 = ordered.FirstOrDefault(x => !x.isBlackListed() && (GetBool("Combo.UltTower", YasuoMenu.ComboM) || ShouldDive(x))); if (best2 != null) { Spells[R].CastOnUnit(best2); } return; } }