private static bool CanDash( Obj_AI_Base target, bool inQCir = false, bool underTower = true, Vector3 pos = new Vector3()) { if (HaveE(target)) { return(false); } if (!pos.IsValid()) { pos = E.GetPredPosition(target, true); } var posAfterE = GetPosAfterDash(target); return((underTower || !posAfterE.IsUnderEnemyTurret()) && (inQCir ? Q3.WillHit(pos, posAfterE) : posAfterE.Distance(pos) < pos.DistanceToPlayer()) && Evade.IsSafePoint(posAfterE.ToVector2()).IsSafe); }
private static void KillSteal() { if (getCheckBoxItem(ksMenu, "Q") && Q.IsReady()) { if (IsDashing) { if (CanCastQCir) { var targets = GetQCirTarget.Where(i => i.Health + i.AttackShield <= GetQDmg(i)).ToList(); if (CastQCir(targets)) { return; } } } else { var target = SpellQ.GetTarget(SpellQ.Width / 2); if (target != null && target.Health + target.AttackShield <= GetQDmg(target)) { if (!haveQ3) { if (Q.Casting(target).IsCasted()) { return; } } else if (Q2.Casting(target, false, CollisionableObjects.YasuoWall).IsCasted()) { return; } } } } if (getCheckBoxItem(ksMenu, "E") && E.IsReady()) { var canQ = getCheckBoxItem(ksMenu, "Q") && Q.IsReady(50); var target = EntityManager.Heroes.Enemies.FirstOrDefault( i => !HaveE(i) && E.IsInRange(i) && (canQ && Q3.WillHit(Q3.GetPredPosition(i), GetPosAfterDash(i)) ? i.Health - Math.Max(GetEDmg(i) - i.MagicShield, 0) + i.AttackShield <= GetQDmg(i) : i.Health + i.MagicShield <= GetEDmg(i))); if (target != null && E.CastOnUnit(target)) { return; } } if (getCheckBoxItem(ksMenu, "R") && R.IsReady()) { var target = EntityManager.Heroes.Enemies.Where( i => getCheckBoxItem(ksMenu, "RCast" + i.NetworkId) && i.Health + i.AttackShield <= R.GetDamage(i) + (Q.IsReady(1000) ? GetQDmg(i) : 0)) .MaxOrDefault(i => new Priority().GetDefaultPriority(i)); if (target != null) { R.CastOnUnit(target); } } }