示例#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)));
 }
示例#2
0
 public static Obj_AI_Base MinionLh(GameObjectType type, AttackSpell spell)
 {
     return(EntityManager.MinionsAndMonsters.EnemyMinions.OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
                                                                                                &&
                                                                                                a.Type ==
                                                                                                type
                                                                                                &&
                                                                                                a.Distance(
                                                                                                    Vladimir) <=
                                                                                                Program.Q
                                                                                                .Range &&
                                                                                                !a.IsDead
                                                                                                &&
                                                                                                !a
                                                                                                .IsInvulnerable
                                                                                                &&
                                                                                                a
                                                                                                .IsValidTarget
                                                                                                (
                                                                                                    Program
                                                                                                    .Q
                                                                                                    .Range)
                                                                                                &&
                                                                                                a.Health <=
                                                                                                Misc.Qdmg(a)));
 }
示例#3
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();
 }
 public static Obj_AI_Base GetEnemyKS(GameObjectType type, AttackSpell spell, bool EwithQ = false)
 {
     float range = 0;
     if (spell == AttackSpell.Q)
         range = Program.Q.Range;
     else if (spell == AttackSpell.E)
         range = Program.E.Range + 200;
     else if (spell == AttackSpell.Ignite)
         range = Program.Ignite.Range;
     else if (spell == AttackSpell.R)
         range = int.MaxValue;
     //ksing
     return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(GP) <= range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.Name != "Barrel"
         && a.IsValidTarget(range)
         &&
         (
         (a.Health <= GPCalcs.Q(a) && AttackSpell.Q == spell && !NearbyBarrel(350, a.Position)) ||
         (a.Health <= GPCalcs.E(a, EwithQ) && AttackSpell.E == spell) ||
         (a.Health <= (GPCalcs.RDamagePerWave(a) * 8) && AttackSpell.R == spell) ||
         (a.Health <= GPCalcs.Ignite(a) && AttackSpell.Ignite == spell)
         )).FirstOrDefault();
 }
示例#5
0
        public static Obj_AI_Base GetEnemy(GameObjectType type, AttackSpell spell)
        {
            var eminion =
                EntityManager.MinionsAndMonsters.GetJungleMonsters(Program.Eve.Position, Program.E.Range)
                    .FirstOrDefault(
                        m =>
                            m.Distance(Program.Eve) <= Program.E.Range &&
                            m.Health <= Misc.Ecalc(m) &&
                            m.IsValidTarget());

            if (Program.E.IsReady() && Program.LaneJungleClear["LCE"].Cast<CheckBox>().CurrentValue && eminion != null &&
                !Orbwalker.IsAutoAttacking)
            {
                Program.E.Cast(eminion);
            }

            if (spell == AttackSpell.Q)
            {
                return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
                                                                                                   && a.Type == type
                                                                                                   &&
                                                                                                   a.Distance(Evelynn) <=
                                                                                                   Program.Q.Range
                                                                                                   && !a.IsDead
                                                                                                   && !a.IsInvulnerable
                                                                                                   &&
                                                                                                   a.IsValidTarget(
                                                                                                       Program.Q.Range)
                                                                                                   &&
                                                                                                   a.Health <=
                                                                                                   Misc.Qcalc(a));
            }

            return null;
        }
        public static Obj_AI_Base GetEnemyKS(GameObjectType type, AttackSpell spell)
        {
            float range = 0;

            if (spell == AttackSpell.W)
            {
                range = Program.W.Range;
            }
            else if (spell == AttackSpell.R)
            {
                range = Program.R.Range + (Program.R.Width / 2);
            }
            else if (spell == AttackSpell.Q)
            {
                range = Program.Q.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(Annie) <= range &&
                                                                                  !a.IsDead &&
                                                                                  !a.IsInvulnerable &&
                                                                                  a.IsValidTarget(range)
                                                                                  &&
                                                                                  (
                                                                                      (a.Health <= AnnieCalcs.W(a) && AttackSpell.W == spell) ||
                                                                                      (a.Health <= AnnieCalcs.Q(a) && AttackSpell.Q == spell) ||
                                                                                      (a.Health <= AnnieCalcs.R(a) && AttackSpell.R == spell) ||
                                                                                      (a.Health <= AnnieCalcs.Ignite(a) && AttackSpell.Ignite == spell)
                                                                                  )).FirstOrDefault());
        }
示例#7
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));
 }
示例#8
0
        public static Obj_AI_Base GetEnemy(GameObjectType type, AttackSpell spell)
        {
            var eminion =
                EntityManager.MinionsAndMonsters.GetJungleMonsters(Program.Eve.Position, Program.E.Range)
                .FirstOrDefault(
                    m =>
                    m.Distance(Program.Eve) <= Program.E.Range &&
                    m.Health <= Misc.Ecalc(m) &&
                    m.IsValidTarget());

            if (Program.E.IsReady() && Program.LaneJungleClear["LCE"].Cast <CheckBox>().CurrentValue&& eminion != null &&
                !Orbwalker.IsAutoAttacking)
            {
                Program.E.Cast(eminion);
            }

            if (spell == AttackSpell.Q)
            {
                return(ObjectManager.Get <Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy &&
                                                                                               a.Type == type
                                                                                               &&
                                                                                               a.Distance(Evelynn) <=
                                                                                               Program.Q.Range &&
                                                                                               !a.IsDead &&
                                                                                               !a.IsInvulnerable
                                                                                               &&
                                                                                               a.IsValidTarget(
                                                                                                   Program.Q.Range)
                                                                                               &&
                                                                                               a.Health <=
                                                                                               Misc.Qcalc(a)));
            }

            return(null);
        }
 public static Obj_AI_Base GetEnemyKS(GameObjectType type, AttackSpell spell)
 {
     float range = 0;
     if (spell == AttackSpell.W)
         range = Program.W.Range;
     else if (spell == AttackSpell.R)
         range = Program.R.Range + (Program.R.Width /2);
     else if (spell == AttackSpell.Q)
         range = Program.Q.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(Annie) <= range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(range)
         && 
         (
         (a.Health <= AnnieCalcs.W(a) && AttackSpell.W == spell) ||
         (a.Health <= AnnieCalcs.Q(a) && AttackSpell.Q == spell) ||
         (a.Health <= AnnieCalcs.R(a) && AttackSpell.R == spell) ||
         (a.Health <= AnnieCalcs.Ignite(a) && AttackSpell.Ignite == spell)
         )).FirstOrDefault();
 }
示例#10
0
 public static Obj_AI_Base MinionLh(GameObjectType type, AttackSpell spell)
 {
     return EntityManager.MinionsAndMonsters.EnemyMinions.OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
                                                                                                     &&
                                                                                                     a.Type ==
                                                                                                     type
                                                                                                     &&
                                                                                                     a.Distance(
                                                                                                         Vladimir) <=
                                                                                                     Program.Q
                                                                                                         .Range
                                                                                                     && !a.IsDead
                                                                                                     &&
                                                                                                     !a
                                                                                                         .IsInvulnerable
                                                                                                     &&
                                                                                                     a
                                                                                                         .IsValidTarget
                                                                                                         (
                                                                                                             Program
                                                                                                                 .Q
                                                                                                                 .Range)
                                                                                                     &&
                                                                                                     a.Health <=
                                                                                                     Misc.Qdmg(a));
 }
示例#11
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());
        }
示例#12
0
        public static Obj_AI_Base GetEnemyKS(AttackSpell spell, GameObjectType gametype)
        {
            /* Last hit with Q */
            if (spell == AttackSpell.Q)
            {
                return(ObjectManager.Get <Obj_AI_Base>().OrderBy(a => a.Health)
                       .Where(a => a.IsEnemy &&
                              a.Type == gametype &&
                              !a.IsDead && a.IsValidTarget(Program.Q.Range) && !a.IsInvulnerable &&
                              a.Health <= QDamage(a) &&
                              a.Distance(Ryze) <= Program.Q.Range).FirstOrDefault());
            }

            /* Last hit with W */
            else if (spell == AttackSpell.W)
            {
                return(ObjectManager.Get <Obj_AI_Base>()
                       .Where(a => a.IsEnemy &&
                              a.Type == gametype &&
                              !a.IsDead && a.IsValidTarget(Program.W.Range) && !a.IsInvulnerable &&
                              a.Health <= WDamage(a) &&
                              a.Distance(Ryze) <= Program.W.Range).FirstOrDefault());
            }

            /* Last hit with E */
            else if (spell == AttackSpell.E)
            {
                return(ObjectManager.Get <Obj_AI_Base>()
                       .Where(a => a.IsEnemy &&
                              a.Type == gametype &&
                              !a.IsDead && a.IsValidTarget(Program.E.Range) && !a.IsInvulnerable &&
                              a.Health <= EDamage(a) &&
                              a.Distance(Ryze) <= Program.E.Range).FirstOrDefault());
            }
            else if (spell == AttackSpell.I)
            {
                return(ObjectManager.Get <Obj_AI_Base>()
                       .Where(a => a.IsEnemy &&
                              a.Type == gametype &&
                              !a.IsDead && a.IsValidTarget(Program.Ignite.Range) && !a.IsInvulnerable &&
                              a.Health <= (Ryze.GetSummonerSpellDamage(a, DamageLibrary.SummonerSpells.Ignite) - (a.HPRegenRate * 0.1)) &&
                              a.Distance(Ryze) <= Program.Ignite.Range).FirstOrDefault());
            }
            else if (spell == AttackSpell.S)
            {
                return(ObjectManager.Get <Obj_AI_Base>()
                       .Where(a => a.IsEnemy &&
                              a.Type == gametype &&
                              !a.IsDead && a.IsValidTarget(Program.Smite.Range) && !a.IsInvulnerable &&
                              Monsters.Any(name => a.Name.StartsWith(name)) &&
                              a.Health <= Ryze.GetSummonerSpellDamage(a, DamageLibrary.SummonerSpells.Smite) &&
                              a.Distance(Ryze) <= Program.Smite.Range).FirstOrDefault());
            }
            else
            {
                return(null);
            }
        }
示例#13
0
 public static Obj_AI_Base MinionLh(GameObjectType type, AttackSpell spell)
 {
     return
         (ObjectManager.Get <Obj_AI_Base>()
          .OrderBy(a => a.Health)
          .FirstOrDefault(
              a =>
              a.IsEnemy && a.Type == type && a.Distance(Morgana) <= Program.Q.Range && !a.IsDead &&
              !a.IsInvulnerable && a.IsValidTarget(Program.Q.Range) && a.Health <= Qcalc(a)));
 }
示例#14
0
 public static Obj_AI_Base MinionLh(GameObjectType type, AttackSpell spell)
 {
     return
         ObjectManager.Get<Obj_AI_Base>()
             .OrderBy(a => a.Health)
             .FirstOrDefault(
                 a =>
                     a.IsEnemy && a.Type == type && a.Distance(Morgana) <= Program.Q.Range && !a.IsDead &&
                     !a.IsInvulnerable && a.IsValidTarget(Program.Q.Range) && a.Health <= Qcalc(a));
 }
示例#15
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(Sivir) <= ObjectManager.Player.GetAutoAttackRange() &&
                !a.IsDead &&
                !a.IsInvulnerable &&
                a.IsValidTarget(ObjectManager.Player.GetAutoAttackRange()) &&
                a.Health <= ObjectManager.Player.GetAutoAttackDamage(a)));
 }
示例#16
0
 private static Obj_AI_Base MinionELh(GameObjectType type, AttackSpell spell)
 {
     return(ObjectManager.Get <Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy &&
                                                                                    a.Type == type
                                                                                    &&
                                                                                    a.Distance(Player) <=
                                                                                    E.Range &&
                                                                                    !a.IsDead &&
                                                                                    !a.IsInvulnerable
                                                                                    &&
                                                                                    a.IsValidTarget(
                                                                                        E.Range)));
 }
示例#17
0
        public static Obj_AI_Base GetEnemy(GameObjectType type, AttackSpell spell)
        {
            if (spell == AttackSpell.E)
            {
                return(ObjectManager.Get <Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy &&
                                                                                               a.Type == type
                                                                                               &&
                                                                                               a.Distance(Vladimir) <=
                                                                                               Program.E.Range &&
                                                                                               !a.IsDead &&
                                                                                               !a.IsInvulnerable
                                                                                               &&
                                                                                               a.IsValidTarget(
                                                                                                   Program.E.Range)
                                                                                               &&
                                                                                               a.Health <=
                                                                                               Misc.Edmg(a)));
            }

            if (spell == AttackSpell.Q)
            {
                return(ObjectManager.Get <Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy &&
                                                                                               a.Type == type
                                                                                               &&
                                                                                               a.Distance(Vladimir) <=
                                                                                               Program.Q.Range &&
                                                                                               !a.IsDead &&
                                                                                               !a.IsInvulnerable
                                                                                               &&
                                                                                               a.IsValidTarget(
                                                                                                   Program.Q.Range)
                                                                                               &&
                                                                                               a.Health <=
                                                                                               Misc.Qdmg(a)));
            }
            var target = TargetSelector.GetTarget(1500, DamageType.True);

            if (target == null || !target.IsValid())
            {
                if (Program.Ignite.IsInRange(target) &&
                    target.Health < 50 + 20 * Program._Player.Level - (target.HPRegenRate / 5 * 3) &&
                    Program.ComboMenu["useignite"].Cast <CheckBox>().CurrentValue)
                {
                    Program.Ignite.Cast(target);
                }
            }
            {
                Chat.Print("igniteused");
            }
            return(null);
        }
示例#18
0
        public static Obj_AI_Base GetEnemy(GameObjectType type, AttackSpell spell)
        {
            if (spell == AttackSpell.E)
            {
                return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
                                                                                                   && a.Type == type
                                                                                                   &&
                                                                                                   a.Distance(Vladimir) <=
                                                                                                   Program.E.Range
                                                                                                   && !a.IsDead
                                                                                                   && !a.IsInvulnerable
                                                                                                   &&
                                                                                                   a.IsValidTarget(
                                                                                                       Program.E.Range)
                                                                                                   &&
                                                                                                   a.Health <=
                                                                                                   Misc.Edmg(a));
            }

            if (spell == AttackSpell.Q)
            {
                return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
                                                                                                   && a.Type == type
                                                                                                   &&
                                                                                                   a.Distance(Vladimir) <=
                                                                                                   Program.Q.Range
                                                                                                   && !a.IsDead
                                                                                                   && !a.IsInvulnerable
                                                                                                   &&
                                                                                                   a.IsValidTarget(
                                                                                                       Program.Q.Range)
                                                                                                   &&
                                                                                                   a.Health <=
                                                                                                   Misc.Qdmg(a));
            }
            var target = TargetSelector.GetTarget(1500, DamageType.True);
            if (target == null || !target.IsValid())
                if (Program.Ignite.IsInRange(target) &&
                    target.Health < 50 + 20*Program._Player.Level - (target.HPRegenRate/5*3) &&
                    Program.ComboMenu["useignite"].Cast<CheckBox>().CurrentValue)
                {
                    Program.Ignite.Cast(target);
                }
            {
                Chat.Print("igniteused");
            }
            return null;
        }
示例#19
0
 public static Obj_AI_Base GetEnemyKS(AttackSpell spell, GameObjectType gametype)
 {
     /* Last hit with Q */
     if (spell == AttackSpell.Q)
     {
         return(ObjectManager.Get <Obj_AI_Base>().OrderBy(a => a.Health)
                .Where(a => a.IsEnemy &&
                       a.Type == gametype &&
                       a.IsValidTarget(Program.Q.Range) && !a.IsInvulnerable &&
                       a.Health <= QDamage(a) &&
                       a.Distance(KogMaw) <= Program.Q.Range).FirstOrDefault());
     }
     /* Last hit with R */
     else if (spell == AttackSpell.R)
     {
         return(ObjectManager.Get <Obj_AI_Base>()
                .Where(a => a.IsEnemy &&
                       a.Type == gametype &&
                       a.IsValidTarget(Program.R.Range) && !a.IsInvulnerable &&
                       a.Health <= RDamage(a) &&
                       a.Distance(KogMaw) <= Program.R.Range).FirstOrDefault());
     }
     else if (spell == AttackSpell.I)
     {
         return(ObjectManager.Get <Obj_AI_Base>()
                .Where(a => a.IsEnemy &&
                       a.Type == gametype &&
                       a.IsValidTarget(Program.Ignite.Range) && !a.IsInvulnerable &&
                       a.Health <= (KogMaw.GetSummonerSpellDamage(a, DamageLibrary.SummonerSpells.Ignite) - (a.HPRegenRate * 0.1)) &&
                       a.Distance(KogMaw) <= Program.Ignite.Range).FirstOrDefault());
     }
     else if (spell == AttackSpell.A)
     {
         return(ObjectManager.Get <Obj_AI_Base>()
                .Where(a => a.IsEnemy &&
                       a.Type == gametype &&
                       a.IsValidTarget(KogMaw.GetAutoAttackRange()) && !a.IsInvulnerable &&
                       a.Health <= PassiveDamage(a) &&
                       a.Distance(KogMaw) <= KogMaw.GetAutoAttackRange()).FirstOrDefault());
     }
     else
     {
         return(null);
     }
 }
示例#20
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;
        }
示例#21
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(Ziggs) <=
                                                                                               Spells.Q.Range &&
                                                                                               !a.IsDead &&
                                                                                               !a.IsInvulnerable
                                                                                               &&
                                                                                               a.IsValidTarget(
                                                                                                   Spells.Q.Range)
                                                                                               &&
                                                                                               a.Health <=
                                                                                               Misc.Qcalc(a)));
            }

            return(null);
        }
示例#22
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(Sivir) <= ObjectManager.Player.GetAutoAttackRange()
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(ObjectManager.Player.GetAutoAttackRange())
         && a.Health <= ObjectManager.Player.GetAutoAttackDamage(a));
 }
 public static Obj_AI_Base GetEnemyKS(AttackSpell spell, GameObjectType gametype)
 {
     /* Last hit with Q */
     if (spell == AttackSpell.Q)
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health)
             .Where(a => a.IsEnemy
             && a.Type == gametype
             && !a.IsDead && a.IsValidTarget(Program.Q.Range) && !a.IsInvulnerable
             && a.Health <= QDamage(a)
             && a.Distance(Urgot) <= Program.Q.Range).FirstOrDefault();
     }
     else if (spell == AttackSpell.I)
     {
         return ObjectManager.Get<Obj_AI_Base>()
             .Where(a => a.IsEnemy
             && a.Type == gametype
             && !a.IsDead && a.IsValidTarget(Program.Ignite.Range) && !a.IsInvulnerable
             && a.Health <= (Urgot.GetSummonerSpellDamage(a, DamageLibrary.SummonerSpells.Ignite) - (a.HPRegenRate * 0.1))
             && a.Distance(Urgot) <= Program.Ignite.Range).FirstOrDefault();
     }
     else if (spell == AttackSpell.S)
     {
         return ObjectManager.Get<Obj_AI_Base>()
             .Where(a => a.IsEnemy
             && a.Type == gametype
             && !a.IsDead && a.IsValidTarget(Program.Smite.Range) && !a.IsInvulnerable
             && Monsters.Any(name => a.Name.StartsWith(name))
             && a.Health <= Urgot.GetSummonerSpellDamage(a, DamageLibrary.SummonerSpells.Smite)
             && a.Distance(Urgot) <= Program.Smite.Range).FirstOrDefault();
     }
     else
         return null;
 }
示例#24
0
 public static Obj_AI_Base GetEnemyKS(AttackSpell spell, GameObjectType gametype)
 {
     /* Last hit with Q */
     if (spell == AttackSpell.Q)
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health)
             .Where(a => a.IsEnemy
             && a.Type == gametype
             && a.IsValidTarget(Program.Q.Range) && !a.IsInvulnerable
             && a.Health <= QDamage(a)
             && a.Distance(KogMaw) <= Program.Q.Range).FirstOrDefault();
     }
     /* Last hit with R */
     else if (spell == AttackSpell.R)
     {
         return ObjectManager.Get<Obj_AI_Base>()
             .Where(a => a.IsEnemy
             && a.Type == gametype
             && a.IsValidTarget(Program.R.Range) && !a.IsInvulnerable
             && a.Health <= RDamage(a)
             && a.Distance(KogMaw) <= Program.R.Range).FirstOrDefault();
     }
     else if (spell == AttackSpell.I)
     {
         return ObjectManager.Get<Obj_AI_Base>()
             .Where(a => a.IsEnemy
             && a.Type == gametype
             && a.IsValidTarget(Program.Ignite.Range) && !a.IsInvulnerable
             && a.Health <= (KogMaw.GetSummonerSpellDamage(a, DamageLibrary.SummonerSpells.Ignite) - (a.HPRegenRate * 0.1))
             && a.Distance(KogMaw) <= Program.Ignite.Range).FirstOrDefault();
     }
     else if (spell == AttackSpell.A)
     {
         return ObjectManager.Get<Obj_AI_Base>()
             .Where(a => a.IsEnemy
             && a.Type == gametype
             && a.IsValidTarget(KogMaw.GetAutoAttackRange()) && !a.IsInvulnerable
             && a.Health <= PassiveDamage(a)
             && a.Distance(KogMaw) <= KogMaw.GetAutoAttackRange()).FirstOrDefault();
     }
     else
         return null;
 }
示例#25
0
 public static Obj_AI_Base GetEnemy(GameObjectType type, AttackSpell spell)
 {
     //ksing
     if (spell == AttackSpell.W)//w
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(Annie) <= Program.W.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.W.Range)
         && a.Health <= AnnieCalcs.W(a)).FirstOrDefault();
     }
     else if (spell == AttackSpell.Q)//q
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(Annie) <= Program.Q.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.Q.Range)
         && a.Health <= AnnieCalcs.Q(a)).FirstOrDefault();
     }
     else if (spell == AttackSpell.R)//r
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(Annie) <= Program.R.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.R.Range)
         && a.Health <= AnnieCalcs.R(a)).FirstOrDefault();
     }
     else if (spell == AttackSpell.RPet)//rpet
     {
         if (Annie.Pet == null)
             return null;
         return ObjectManager.Get<Obj_AI_Base>().Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(Annie.Pet) <= 200
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(200)).FirstOrDefault();
     }
     else//ignite
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(Annie) <= Program.Ignite.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.Ignite.Range)
         && a.Health <= AnnieCalcs.Ignite(a)).FirstOrDefault();
     }
 }
 public static Obj_AI_Base GetEnemy(GameObjectType type, AttackSpell spell)
 {
     //KS
     if (spell == AttackSpell.W)//w
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(Pantheon) <= Program.W.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.W.Range)
         && a.Health <= PantheonCalcs.W(a)).FirstOrDefault();
     }
     else if (spell == AttackSpell.Q)//q
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(Pantheon) <= Program.Q.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.Q.Range)
         && a.Health <= PantheonCalcs.Q(a)).FirstOrDefault();
     }
     else if (spell == AttackSpell.E)//r
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(Pantheon) <= Program.E.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.E.Range)
         && a.Health <= PantheonCalcs.E(a)).FirstOrDefault();
     }
     else//ignite
     {
         return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(Pantheon) <= Program.Ignite.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.Ignite.Range)
         && a.Health <= PantheonCalcs.Ignite(a)).FirstOrDefault();
     }
 }
示例#27
0
 public static Obj_AI_Base GetEnemy(GameObjectType type, AttackSpell spell)
 {
     if(spell == AttackSpell.E)
     {
         return ObjectManager.Get<Obj_AI_Base>().Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(_Player) <= Program.E.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.E.Range)
         && !a.HasBuff("YasuoDashWrapper")
         && a.Health <= YasuoCalcs.E(a)).FirstOrDefault();
     }
     else if (spell == AttackSpell.Q)
     {
         return ObjectManager.Get<Obj_AI_Base>().Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(_Player) <= Program.Q.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.Q.Range)
         && a.Health <= YasuoCalcs.Q(a)).FirstOrDefault();
     }
     else if (spell == AttackSpell.EQ)//eq
     {
         return ObjectManager.Get<Obj_AI_Base>().Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(_Player) <= Program.E.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.E.Range)
         && !a.HasBuff("YasuoDashWrapper")
         && a.Health <= (YasuoCalcs.Q(a) + YasuoCalcs.E(a))).FirstOrDefault();
     }
     else//ignite
     {
         return ObjectManager.Get<Obj_AI_Base>().Where(a => a.IsEnemy
         && a.Type == type
         && a.Distance(_Player) <= Program.Ignite.Range
         && !a.IsDead
         && !a.IsInvulnerable
         && a.IsValidTarget(Program.Ignite.Range)
         && a.Health <= (YasuoCalcs.Ignite(a))).FirstOrDefault();
     }
 }
示例#28
0
 private static Obj_AI_Base MinionELh(GameObjectType type, AttackSpell spell)
 {
     return ObjectManager.Get<Obj_AI_Base>().OrderBy(a => a.Health).FirstOrDefault(a => a.IsEnemy
                                                                                        && a.Type == type
                                                                                        &&
                                                                                        a.Distance(Player) <=
                                                                                        E.Range
                                                                                        && !a.IsDead
                                                                                        && !a.IsInvulnerable
                                                                                        &&
                                                                                        a.IsValidTarget(
                                                                                            E.Range));
 }