Ejemplo n.º 1
0
Archivo: Brand.cs Proyecto: jitart/adc
        public static void Rlogic(Obj_AI_Base target)
        {
            if (target == null)
            {
                return;
            }

            var Combomode = Common.orbmode(Orbwalker.ActiveModes.Combo);
            var hits      = ComboMenu.slider("Rhit");

            if (Combomode)
            {
                if (ComboMenu.checkbox("RAoe"))
                {
                    var AoeHit  = target.CountEnemeis(400) >= hits;
                    var bestaoe = EntityManager.Heroes.Enemies.OrderByDescending(e => e.CountEnemeis(400)).FirstOrDefault(e => e.IsKillable(R.Range) && e.IsKillable() && e.CountEnemeis(400) >= hits);
                    if (AoeHit)
                    {
                        R.Cast(target);
                    }
                    else
                    {
                        if (bestaoe != null)
                        {
                            R.Cast(bestaoe);
                        }
                    }
                }

                if (ComboMenu.checkbox("RFinisher"))
                {
                    var pred   = R.GetDamage(target) >= Prediction.Health.GetPrediction(target, Q.CastDelay);
                    var health = R.GetDamage(target) >= target.TotalShieldHealth();

                    if (Q.GetDamage(target) >= Prediction.Health.GetPrediction(target, Q.CastDelay))
                    {
                        return;
                    }

                    if (W.GetDamage(target) >= Prediction.Health.GetPrediction(target, W.CastDelay))
                    {
                        return;
                    }

                    if (E.GetDamage(target) >= Prediction.Health.GetPrediction(target, E.CastDelay))
                    {
                        return;
                    }

                    if (pred || health)
                    {
                        R.Cast(target);
                    }
                }
            }
        }
Ejemplo n.º 2
0
Archivo: Brand.cs Proyecto: jitart/adc
        private static void Orbwalker_OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
        {
            if (target == null || !Common.orbmode(Orbwalker.ActiveModes.LaneClear))
            {
                return;
            }

            var Eready = LaneClearMenu.checkbox("E") && E.IsReady() && target.IsKillable(E.Range) && E.Mana(LaneClearMenu);

            if (Eready && E.GetDamage(target) >= Prediction.Health.GetPrediction(target, E.CastDelay))
            {
                E.Cast(target);
            }
        }
Ejemplo n.º 3
0
        private static void Orbwalker_OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
        {
            if (target == null || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                return;
            }

            var Eready = LaneClear["E"].Cast <CheckBox>().CurrentValue&& E.IsReady() && target.IsValidTarget(E.Range) && Common.Emana &&
                         E.Mana(LaneClear);

            if (Eready && E.GetDamage(target) >= Prediction.Health.GetPrediction(target, E.CastDelay))
            {
                E.Cast(target);
            }
        }
Ejemplo n.º 4
0
        public static void KillStealLogic()
        {
            var Qready = KillSteal["Q"].Cast <CheckBox>().CurrentValue&& Q.IsReady();
            var Wready = KillSteal["W"].Cast <CheckBox>().CurrentValue&& W.IsReady();
            var Eready = KillSteal["E"].Cast <CheckBox>().CurrentValue&& E.IsReady();
            var Rready = KillSteal["R"].Cast <CheckBox>().CurrentValue&& R.IsReady();

            var Qksenemy = EntityManager.Heroes.Enemies.Where(e => e.IsKillable() && e.IsValidTarget(Q.Range));
            var Wksenemy = EntityManager.Heroes.Enemies.Where(e => e.IsKillable() && e.IsValidTarget(W.Range));
            var Eksenemy = EntityManager.Heroes.Enemies.Where(e => e.IsKillable() && e.IsValidTarget(E.Range));

            if (Qready)
            {
                if (Qksenemy != null)
                {
                    foreach (var enemy in Qksenemy.Where(enemy => Q.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, Q.CastDelay)))
                    {
                        if (Player.Instance.GetAutoAttackDamage(enemy, true) >= Prediction.Health.GetPrediction(enemy, (int)Orbwalker.AttackDelay))
                        {
                            return;
                        }
                        Q.Cast(enemy);
                    }
                }
            }

            if (Wready)
            {
                if (Wksenemy != null)
                {
                    foreach (var enemy in Wksenemy.Where(enemy => W.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, W.CastDelay)))
                    {
                        if ((Q.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, Q.CastDelay) && Q.IsReady()) ||
                            (Orbwalker.CanAutoAttack &&
                             Player.Instance.GetAutoAttackDamage(enemy, true)
                             >= Prediction.Health.GetPrediction(enemy, (int)Orbwalker.AttackDelay)))
                        {
                            return;
                        }
                        W.Cast(enemy);
                    }
                }
            }

            if (Eready)
            {
                if (Eksenemy != null)
                {
                    foreach (var enemy in Eksenemy.Where(enemy => E.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, E.CastDelay)))
                    {
                        if ((Q.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, Q.CastDelay) && Q.IsReady()) ||
                            (Orbwalker.CanAutoAttack &&
                             Player.Instance.GetAutoAttackDamage(enemy, true)
                             >= Prediction.Health.GetPrediction(enemy, (int)Orbwalker.AttackDelay)))
                        {
                            return;
                        }
                        if (W.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, W.CastDelay) && W.IsReady())
                        {
                            return;
                        }
                        E.Cast(enemy);
                    }
                }
            }

            if (Rready)
            {
                var ksenemy = EntityManager.Heroes.Enemies.Where(e => e.IsKillable() && e.IsValidTarget(R.Range));
                if (ksenemy != null)
                {
                    foreach (var enemy in ksenemy.Where(enemy => R.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, R.CastDelay)))
                    {
                        if ((Q.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, Q.CastDelay) && Q.IsReady()) ||
                            (W.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, W.CastDelay) && W.IsReady()) ||
                            (E.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, E.CastDelay) && E.IsReady()) ||
                            (Orbwalker.CanAutoAttack &&
                             Player.Instance.GetAutoAttackDamage(enemy, true)
                             >= Prediction.Health.GetPrediction(enemy, (int)Orbwalker.AttackDelay)))
                        {
                            return;
                        }

                        R.Cast(enemy);
                    }
                }
            }
        }