Esempio n. 1
0
 private static Obj_AI_Base MinionWlh(GameObjectType type, AttackSpell spell)
 {
     return(EntityManager.MinionsAndMonsters.EnemyMinions.OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
                                                                                                &&
                                                                                                a.Type ==
                                                                                                type
                                                                                                &&
                                                                                                a.Distance(
                                                                                                    Kennen) <=
                                                                                                Program.W
                                                                                                .Range &&
                                                                                                !a.IsDead
                                                                                                &&
                                                                                                !a
                                                                                                .IsInvulnerable
                                                                                                &&
                                                                                                a
                                                                                                .IsValidTarget
                                                                                                (
                                                                                                    Program
                                                                                                    .W
                                                                                                    .Range)
                                                                                                &&
                                                                                                a.Health <=
                                                                                                Misc.Wcalc(a)));
 }
Esempio n. 2
0
        public static Obj_AI_Base GetEnemy(GameObjectType type, AttackSpell spell)
        {
            if (spell == AttackSpell.Q)
            {
                return(ObjectManager.Get <Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy &&
                                                                                               a.Type == type
                                                                                               &&
                                                                                               a.Distance(Kennen) <=
                                                                                               Program.Q.Range &&
                                                                                               !a.IsDead &&
                                                                                               !a.IsInvulnerable
                                                                                               &&
                                                                                               a.IsValidTarget(
                                                                                                   Program.Q.Range)
                                                                                               &&
                                                                                               a.Health <=
                                                                                               Misc.Qcalc(a)));
            }

            return(null);
        }