Пример #1
0
        public override void Execute(AIHeroClient target)
        {
            if (target == null)
            {
                target = TargetSelector.GetTarget(1200, DamageType.Magical);
            }
            if (target == null)
            {
                return;
            }

            var dmgPerBounce = ObjectManager.Player.GetSpellDamage(target, Slot) + BrandCombo.GetPassiveDamage(target);

            if (dmgPerBounce > target.Health && target.Distance(ObjectManager.Player) > 750)
            {
                TryBridgeUlt(target);
            }

            if (dmgPerBounce > target.Health && !Provider.ShouldBeDead(target) &&
                ObjectManager.Player.GetAutoAttackDamage(target, true) < target.Health &&
                (_otherSkills.All(
                     skill => skill.Instance.State != SpellState.Ready && skill.Instance.State != SpellState.Surpressed
                     /*&& !skill.IsSafeCasting(1)*/) ||
                 ObjectManager.Player.GetSpellDamage(target, SpellSlot.Q) + dmgPerBounce +
                 ObjectManager.Player.GetAutoAttackDamage(target) > target.Health && !target.HasBuff("brandablaze") &&
                 target.Distance(ObjectManager.Player) < 750))
            {
                if (ObjectManager.Player.HealthPercent - target.HealthPercent < Program.getRMenuSL("healthDifference") ||
                    !Program.getRMenuCB("DontRwith") ||
                    Program.getRMenuCB("Ignorewhenfleeing") &&
                    target.Distance(ObjectManager.Player) > ObjectManager.Player.AttackRange)
                {
                    Cast(target);
                }
                else if (ObjectManager.Player.HealthPercent < target.HealthPercent)
                {
                    Cast(target);
                }
            }


            // if (target.Distance(ObjectManager.Player) > 750) return;
            var inBounce  = new bool[HeroManager.Enemies.Count];
            var canBounce = BounceCheck(target, inBounce);

            if (canBounce)
            {
                var inBounceEnemies =
                    HeroManager.Enemies.Where(enemy => inBounce[HeroManager.Enemies.IndexOf(enemy)]).ToArray();
                var distance = target.Distance(ObjectManager.Player);

                var bounceCount = inBounce.Count(item => item);
                if (bounceCount <= 1)
                {
                    return;
                }
                //Console.WriteLine("bounce r " + bounceCount);

                if (inBounceEnemies.Any(enemy => dmgPerBounce > enemy.Health && MaxDamage > enemy.Health) &&
                    (bounceCount == 2 || Program.getRMenuCB("RiskyR")))
                {
                    TryUlt(target, inBounceEnemies, distance);
                }
                else if (bounceCount == 2 && dmgPerBounce * 3 > target.Health && MaxDamage > target.Health &&
                         distance < 750 && Program.getRMenuCB("RiskyR"))
                {
                    Cast(target);
                }
                else if (dmgPerBounce * 2 > target.Health && MaxDamage > target.Health)
                {
                    TryUlt(target, inBounceEnemies, distance);
                }
                else if (Program.getRMenuCB("Ultnonkillable") && Program.getRMenuSL("whenminXtargets") <= bounceCount)
                {
                    TryUlt(target, inBounceEnemies, distance, false);
                }
            }
        }
Пример #2
0
        public override void Execute(AIHeroClient target)
        {
            if (target == null)
            {
                target = TargetSelector.GetTarget(1200, TargetSelector.DamageType.Magical);
            }
            if (target == null)
            {
                return;
            }

            var dmgPerBounce = ObjectManager.Player.GetSpellDamage(target, Slot) + BrandCombo.GetPassiveDamage(target);

            if (dmgPerBounce > target.Health && target.Distance(ObjectManager.Player) > 750)
            {
                TryBridgeUlt(target);

                //   Console.WriteLine("ayy lmao bridge bois");
            }

            if (dmgPerBounce > target.Health && !Provider.ShouldBeDead(target) && ObjectManager.Player.GetAutoAttackDamage(target, true) < target.Health && ((_otherSkills.All(skill => skill.Instance.State != SpellState.Ready && skill.Instance.State != SpellState.Surpressed /*&& !skill.IsSafeCasting(1)*/) /*|| target.Distance(ObjectManager.Player) > 650*/) || ObjectManager.Player.GetSpellDamage(target, SpellSlot.Q) + dmgPerBounce + ObjectManager.Player.GetAutoAttackDamage(target) > target.Health && !target.HasBuff("brandablaze") && target.Distance(ObjectManager.Player) < 750))
            {
                if (ObjectManager.Player.HealthPercent - target.HealthPercent < OverkillPercent || !AntiOverkill || IgnoreAntiOverkillOnFlee && target.Distance(ObjectManager.Player) > ObjectManager.Player.AttackRange)
                {
                    Cast(target);
                }
                else if (ObjectManager.Player.HealthPercent < target.HealthPercent && IgniteManager.CanBeUsed() && IgniteManager.GetDamage() + dmgPerBounce > target.Health)
                {
                    if (target.Distance(ObjectManager.Player) < 600)
                    {
                        IgniteManager.UseIgnite(target);
                    }
                    Cast(target);
                }
            }


            // if (target.Distance(ObjectManager.Player) > 750) return;
            var inBounce  = new bool[HeroManager.Enemies.Count];
            var canBounce = BounceCheck(target, inBounce);

            if (canBounce)
            {
                var inBounceEnemies = HeroManager.Enemies.Where(enemy => inBounce[HeroManager.Enemies.IndexOf(enemy)]).ToArray();
                var distance        = target.Distance(ObjectManager.Player);

                var bounceCount = inBounce.Count(item => item);
                if (bounceCount <= 1)
                {
                    return;
                }
                //Console.WriteLine("bounce r " + bounceCount);

                if ((inBounceEnemies.Any(enemy => (dmgPerBounce > enemy.Health && MaxDamage > enemy.Health)) && (bounceCount == 2 || RiskyUlt)))
                {
                    TryUlt(target, inBounceEnemies, distance);
                }
                else if (bounceCount == 2 && dmgPerBounce * 3 > target.Health && MaxDamage > target.Health && distance < 750 && RiskyUlt)
                {
                    Cast(target);
                }
                else if (dmgPerBounce * 2 > target.Health && MaxDamage > target.Health)
                {
                    TryUlt(target, inBounceEnemies, distance);
                }
                else if (UltNonKillable && MinBounceTargets <= bounceCount)
                {
                    TryUlt(target, inBounceEnemies, distance, false);
                }
            }
        }