Beispiel #1
0
        public static Obj_AI_Base GetEnemyKS(GameObjectType type, AttackSpell spell)
        {
            float range = 0;

            if (spell == AttackSpell.Q)
            {
                range = Program.Q.Range;
            }
            else if (spell == AttackSpell.E)
            {
                range = Program.E.Range;
            }
            else if (spell == AttackSpell.W)
            {
                range = Program.W.Range;
            }
            else if (spell == AttackSpell.Ignite)
            {
                range = Program.Ignite.Range;
            }
            //ksing
            return(ObjectManager.Get <Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy &&
                                                                                  a.Type == type &&
                                                                                  a.Distance(Ryze) <= range &&
                                                                                  !a.IsDead &&
                                                                                  !a.IsInvulnerable &&
                                                                                  a.IsValidTarget(range)
                                                                                  &&
                                                                                  (
                                                                                      (a.Health <= RyzeCalcs.W(a) && AttackSpell.W == spell) ||
                                                                                      (a.Health <= RyzeCalcs.Q(a) && Program.Q.GetPrediction(a).HitChance >= HitChance.Low && AttackSpell.Q == spell) ||
                                                                                      (a.Health <= RyzeCalcs.E(a) && AttackSpell.E == spell) ||
                                                                                      (a.Health <= RyzeCalcs.Ignite(a) && AttackSpell.Ignite == spell)
                                                                                  )).FirstOrDefault());
        }
Beispiel #2
0
 public static Obj_AI_Base EBounceTarget(Obj_AI_Base target)
 {
     if (target == null)
     {
         return(null);
     }
     foreach (Obj_AI_Base enemyUnit in ObjectManager.Get <Obj_AI_Base>().Where(a => a.IsEnemy && !a.IsDead && a.IsInRange(target, 250) && a.IsInRange(Ryze, Program.E.Range) && RyzeCalcs.E(a) >= a.Health))
     {
         return(enemyUnit);
     }
     return(null);
 }