Esempio n. 1
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)));
            }

            return(null);
        }
Esempio n. 2
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);
        }