public bool QMinionExtend(Obj_AI_Base minion) { var target = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget(Spell.Range)); if (minion == null || target == null) { return false; } var prediction = Spell.GetPrediction(target); if (prediction.Hitchance < HitChance.Medium) { return false; } var hit = new Geometry.Polygon.Rectangle(ObjectManager.Player.Position, ObjectManager.Player.Position.Extend(minion.Position, Spell.Range), Spell.Width); return !hit.IsOutside(QPred(target).To2D()); }
static void AutoUseQ() { if (Q.IsReady() && AutoQ && Player.ManaPercent > MinMana) { var extarget = TargetSelector.GetTarget(Q1.Range, TargetSelector.DamageType.Physical); var Minions = MinionManager.GetMinions(Q.Range); foreach (var Minion in Minions) { var QHit = new Geometry.Polygon.Rectangle(Player.Position, Player.Position.Extend(Minion.Position, Q1.Range), Q1.Width); var QPred = Q1.GetPrediction(extarget); if (!QHit.IsOutside(QPred.UnitPosition.To2D()) && QPred.Hitchance == HitChance.High) { Q.Cast(Minion); break; } } } }
private static void OnDoCastDelayedLC(GameObjectProcessSpellCastEventArgs args) { AAPassive = false; if (args.Target is Obj_AI_Minion && args.Target.IsValid) { if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && Player.ManaPercent > LMinMana) { var Minions = MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(Player), MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health); if (Minions[0].IsValid && Minions.Count != 0) { if (!LT) return; if (E.IsReady() && !AAPassive && LE) E.Cast(Player.Position.Extend(Game.CursorPos, 70)); if (Q.IsReady() && (!E.IsReady() || (E.IsReady() && !LE)) && LQ != 0 && !AAPassive) { var QMinions = MinionManager.GetMinions(Q.Range); var exminions = MinionManager.GetMinions(Q1.Range); foreach (var Minion in QMinions) { var QHit = new Geometry.Polygon.Rectangle(Player.Position,Player.Position.Extend(Minion.Position, Q1.Range),Q1.Width); if (exminions.Count(x => !QHit.IsOutside(x.Position.To2D())) >= LQ) { Q.Cast(Minion); break; } } } if ((!E.IsReady() || (E.IsReady() && !LE)) && (!Q.IsReady() || (Q.IsReady() && LQ == 0)) && LW && W.IsReady() && !AAPassive) W.Cast(Minions[0].Position); } } } }