Esempio n. 1
0
        public static void Execute()
        {
            var laneMinions =
                StaticCacheProvider.GetMinions(CachedEntityType.EnemyMinion, x => x.IsValidTargetCached(Q.Range))
                .ToList();

            if (!laneMinions.Any() || !CanILaneClear())
            {
                return;
            }

            if (Q.IsReady() && Settings.LaneClear.UseQInLaneClear &&
                (Player.Instance.ManaPercent >= Settings.LaneClear.MinManaQ))
            {
                Q.CastOnBestFarmPosition();
            }

            if (!IsPostAttack || !W.IsReady() || !Settings.LaneClear.UseWInLaneClear || (Player.Instance.ManaPercent < Settings.LaneClear.WMinMana))
            {
                return;
            }

            if (laneMinions.Count(x => x.IsValidTargetCached(Player.Instance.GetAutoAttackRange())) != 0 && (laneMinions.Count > 3))
            {
                W.Cast();
            }
        }
Esempio n. 2
0
        public static void Execute()
        {
            var jungleMinions = StaticCacheProvider.GetMinions(CachedEntityType.Monsters, x => x.IsValidTargetCached(E.Range)).ToList();

            if (!jungleMinions.Any())
            {
                return;
            }

            if (E.IsReady() && Settings.JungleClear.UseE && (Player.Instance.ManaPercent >= Settings.JungleClear.EMinMana))
            {
                if (StaticCacheProvider.GetMinions(CachedEntityType.Monsters, x => x.IsValidTargetCached(E.Range))
                    .Any(
                        unit =>
                        unit.IsValidTargetCached(E.Range) && (unit.BaseSkinName.Contains("Baron") || unit.BaseSkinName.Contains("Dragon") ||
                                                              unit.BaseSkinName.Contains("RiftHerald") || unit.BaseSkinName.Contains("Blue") ||
                                                              unit.BaseSkinName.Contains("Red") || unit.BaseSkinName.Contains("Crab")) && !unit.BaseSkinName.Contains("Mini") &&
                        Damage.IsTargetKillableByE(unit)))
                {
                    E.Cast();
                    return;
                }
            }

            if (W.IsReady() && Settings.JungleClear.UseW && Player.Instance.ManaPercent >= Settings.JungleClear.WMinMana)
            {
                W.CastOnBestFarmPosition(1);
            }
        }
Esempio n. 3
0
        public static void Execute()
        {
            var laneMinions =
                StaticCacheProvider.GetMinions(CachedEntityType.EnemyMinion, x => x.IsValidTargetCached(W.Range))
                .ToList();

            if (!laneMinions.Any() || !CanILaneClear())
            {
                return;
            }

            if (Q.IsReady() && Settings.LaneClear.UseQInLaneClear &&
                Player.Instance.ManaPercent >= Settings.LaneClear.MinManaQ && IsPreAttack && laneMinions.Count > 3)
            {
                Q.Cast();
            }

            if (!W.IsReady() || !Settings.LaneClear.UseWInLaneClear ||
                !(Player.Instance.ManaPercent >= Settings.LaneClear.MinManaW) || laneMinions.Count <= 3)
            {
                return;
            }

            var bestPos = W.GetBestLinearCastPosition(laneMinions);

            if (bestPos.CastPosition != Vector3.Zero)
            {
                W.Cast(bestPos.CastPosition);
            }
        }
Esempio n. 4
0
        public static void Execute()
        {
            if (!Q.IsReady() || !Settings.LaneClear.UseQInLaneClear || Player.Instance.HasSheenBuff() ||
                (Player.Instance.ManaPercent < Settings.LaneClear.MinManaQ))
            {
                return;
            }

            var laneMinions = StaticCacheProvider.GetMinions(CachedEntityType.EnemyMinion, x => x.IsValidTargetCached(Q.Range)).ToList();

            if (!laneMinions.Any() || !CanILaneClear())
            {
                return;
            }

            foreach (var minion in
                     (from minion in laneMinions.Where(
                          x => x.IsValidTargetCached(Q.Range) && Q.GetPrediction(x).HitChance == HitChance.High)
                      let health = Prediction.Health.GetPrediction(minion,
                                                                   (int)((minion.DistanceCached(Player.Instance) + Q.CastDelay) / Q.Speed * 1000))
                                   where (health > 30) && (health < Player.Instance.GetSpellDamageCached(minion, SpellSlot.Q))
                                   select minion).Where(minion => !Orbwalker.GetTarget().IdEquals(minion) && !IsPreAttack))
            {
                if ((Player.Instance.GetAutoAttackDamageCached(minion, true) > minion.Health) &&
                    Player.Instance.IsInAutoAttackRange(minion))
                {
                    return;
                }

                Q.Cast(minion);
                return;
            }
        }
Esempio n. 5
0
        public static void Execute()
        {
            var jungleMinions =
                StaticCacheProvider.GetMinions(CachedEntityType.Monsters,
                                               x => x.IsValidTargetCached(Player.Instance.GetAutoAttackRange())).ToList();

            if (!jungleMinions.Any())
            {
                return;
            }

            if (!Settings.LaneClear.UseQInJungleClear || (Player.Instance.ManaPercent < Settings.LaneClear.MinManaQ))
            {
                return;
            }

            if (HasMinigun && (jungleMinions.Count > 1) && !IsPreAttack &&
                (jungleMinions.Count(x => Orbwalker.GetTarget()?.DistanceCached(x) < 150) > 1))
            {
                Q.Cast();
            }
            else if (HasRocketLauncher && !IsPreAttack)
            {
                Q.Cast();
            }
        }
Esempio n. 6
0
        public static void ELogics()
        {
            if (!E.IsReady() || !Settings.Combo.UseE)
            {
                return;
            }

            var possibleTargets = StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero,
                                                                   x =>
                                                                   x.IsValidTargetCached(E.Range) && !x.HasUndyingBuffA() &&
                                                                   (E.GetPrediction(x).HitChance >= HitChance.High));

            var target = TargetSelector.GetTarget(possibleTargets, DamageType.Physical);

            if (target == null)
            {
                return;
            }

            var ePrediction = E.GetPrediction(target);

            if (ePrediction.HitChance < HitChance.High)
            {
                return;
            }

            if ((QCooldown < 1) || (target.Health < Player.Instance.GetSpellDamageCached(target, SpellSlot.E)))
            {
                E.Cast(ePrediction.CastPosition);
            }
        }
Esempio n. 7
0
        public static void Execute()
        {
            RLogics();

            QLogics();

            if (!Settings.Combo.UseE || !E.IsReady() || IsPreAttack)
            {
                return;
            }

            if (StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero).Count(x => x.IsValidTargetCached(E.Range)) >= 2)
            {
                E.CastIfItWillHit();
            }

            var possibleTargets = StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero,
                                                                   x => x.IsValidTargetCached(E.Range) && !x.HasSpellShield() && !x.HasUndyingBuffA() &&
                                                                   (!Settings.Combo.UseEToProc || HasWDebuff(x) && GetWDebuff(x).Count == 3)).ToList();

            var target = TargetSelector.GetTarget(possibleTargets, DamageType.Physical);

            if (target != null)
            {
                E.CastMinimumHitchance(target, 60);
            }
        }
Esempio n. 8
0
        public static void Execute()
        {
            var jungleMinions = StaticCacheProvider.GetMinions(CachedEntityType.Monsters, x => x.IsValidTarget() && IsInQRange(x)).ToList();

            if (!jungleMinions.Any())
            {
                return;
            }

            if (Q.IsReady() && Settings.LaneClear.UseQInJungleClear && (Player.Instance.ManaPercent >= Settings.LaneClear.MinManaQ))
            {
                foreach (var target in jungleMinions.Where(x =>
                {
                    if (Player.Instance.IsInAutoAttackRange(x) &&
                        (x.Health <= Player.Instance.GetAutoAttackDamageCached(x, true)))
                    {
                        return(false);
                    }

                    return(HasEDebuff(x) || Q.GetPrediction(x).Collision);
                }))
                {
                    Player.Instance.Spellbook.CastSpell(SpellSlot.Q, target.Position);
                }
            }

            if (!E.IsReady() || !Settings.LaneClear.UseEInJungleClear ||
                (Player.Instance.ManaPercent < Settings.LaneClear.MinManaE))
            {
                return;
            }

            E.CastOnBestFarmPosition(1);
        }
Esempio n. 9
0
        public static void Execute()
        {
            var laneMinions = StaticCacheProvider.GetMinions(CachedEntityType.EnemyMinion, x => x.IsValidTargetCached(1500)).ToList();

            if (!laneMinions.Any())
            {
                return;
            }

            if (Q.IsReady() && Settings.LaneClear.UseQInLaneClear)
            {
                if (!Q.IsCharging && !Player.Instance.IsUnderTurret() && (Player.Instance.ManaPercent >= Settings.LaneClear.MinManaQ) && (laneMinions.Count >= Settings.LaneClear.MinMinionsHitQ) && !IsPreAttack && (EntityManager.MinionsAndMonsters.GetLineFarmLocation(laneMinions, Q.Width, 1550).HitNumber >= Settings.LaneClear.MinMinionsHitQ))
                {
                    if (CanILaneClear() && !IsPreAttack && !Orbwalker.ShouldWait)
                    {
                        Q.StartCharging();
                    }
                }
                else if (Q.IsCharging && Q.IsFullyCharged)
                {
                    Q.CastOnBestFarmPosition(1);
                }
            }

            if (E.IsReady() && !Player.Instance.IsUnderTurret() && Settings.LaneClear.UseEInLaneClear &&
                (Player.Instance.ManaPercent >= Settings.LaneClear.MinManaE))
            {
                E.CastOnBestFarmPosition(1);
            }
        }
Esempio n. 10
0
        public static void Execute()
        {
            var jungleMinions = StaticCacheProvider.GetMinions(CachedEntityType.Monsters, x => x.IsValidTargetCached(E.Range)).ToList();

            if (!jungleMinions.Any())
            {
                return;
            }

            if (E.IsReady() && Settings.JungleClear.UseE && Player.Instance.ManaPercent >= Settings.JungleClear.EMinMana)
            {
                if (StaticCacheProvider.GetMinions(CachedEntityType.Monsters, x => x.IsValidTargetCached(E.Range))
                    .Any(
                        unit =>
                        unit.IsValidTargetCached(E.Range) && (unit.BaseSkinName.Contains("Baron") || unit.BaseSkinName.Contains("Dragon") ||
                                                              unit.BaseSkinName.Contains("RiftHerald") || unit.BaseSkinName.Contains("Blue") ||
                                                              unit.BaseSkinName.Contains("Red") || unit.BaseSkinName.Contains("Crab")) && !unit.BaseSkinName.Contains("Mini") &&
                        Damage.IsTargetKillableByE(unit)))
                {
                    Misc.PrintDebugMessage($"Casting E to ks blue [{Game.Time}]");
                    E.Cast();
                }
            }

            if (W.IsReady() && Settings.JungleClear.UseW && Player.Instance.ManaPercent >= Settings.JungleClear.WMinMana)
            {
                var c = EntityManager.MinionsAndMonsters.GetCircularFarmLocation(jungleMinions, 260, 950,
                                                                                 250, 1400);

                if (c.HitNumber > 1)
                {
                    W.Cast(c.CastPosition);
                }
            }
        }
Esempio n. 11
0
        private void BuildMenu()
        {
            BaseUltMenu.AddGroupLabel("Recall tracker settings");
            BaseUltMenu.Add("RecallTracker.Enable", new CheckBox("Enable Recall tracker"));

            BaseUltMenu.Add("RecallTracker.BarColor", new CheckBox("Change bar color", false)).OnValueChange += (a, b) =>
            {
                if (!b.NewValue)
                {
                    return;
                }

                ColorPicker.Initialize(Color.DeepPink);
                a.CurrentValue = false;
            };

            var fontSize = BaseUltMenu.Add("RecallTracker.FontSize", new Slider("Font size : {0}", 10, 5, 20));

            fontSize.OnValueChange +=
                (sender, args) =>
            {
                Text.ReplaceFont(new Font("tahoma", args.NewValue, FontStyle.Italic));

                TextHeight = Text.Description.Height;
            };

            Text.ReplaceFont(new Font("tahoma", fontSize.CurrentValue, FontStyle.Italic));

            TextHeight = Text.Description.Height;

            BaseUltMenu.Add("RecallTracker.BarSize", new Slider("Bar thickness : {0}", 7, 1, 15));

            if (!SupportedChampions.Contains(Player.Instance.Hero))
            {
                BaseUltMenu.AddGroupLabel("Your champion is not supported !");

                Dispose();

                return;
            }

            BaseUltMenu.AddGroupLabel("Base ult settings");

            BaseUltMenu.AddLabel("Basic settings : ");
            BaseUltMenu.Add("BaseUlt.Enable", new CheckBox("Enable Base ult"));
            BaseUltMenu.Add("BaseUlt.DisableInComboMode", new CheckBox("Disable Base ult in combo mode", false));
            BaseUltMenu.Add("BaseUlt.MaxTimeout", new Slider("Maximum target invisibility time : {0} seconds", 30, 0, 120));
            BaseUltMenu.AddSeparator(2);
            BaseUltMenu.AddLabel("Health prediction is not working currently.\nPlease don't set this value too high or you will see a lot missed baseults.");
            BaseUltMenu.AddSeparator(5);

            BaseUltMenu.AddLabel("Whitelist :");

            foreach (var aiHeroClient in StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero))
            {
                BaseUltMenu.Add($"BaseUlt.Enable.{aiHeroClient.ChampionName}", new CheckBox($"Enable on {aiHeroClient.ChampionName}"));
            }

            SubscribeToEvents();
        }
Esempio n. 12
0
        public static void Execute()
        {
            var laneMinions = StaticCacheProvider.GetMinions(CachedEntityType.EnemyMinion, x => x.IsValidTargetCached(W.Range)).ToList();

            if (!laneMinions.Any() || !CanILaneClear())
            {
                return;
            }

            if (W.IsReady() && Settings.LaneClear.UseW && Player.Instance.ManaPercent >= Settings.LaneClear.WMinMana)
            {
                W.CastOnBestFarmPosition();
            }

            if (E.IsReady() && Settings.LaneClear.UseE && Player.Instance.ManaPercent >= Settings.LaneClear.EMinMana)
            {
                var minions =
                    laneMinions.Where(
                        minion => minion.IsValidTargetCached(E.Range) &&
                        HasDeadlyVenomBuff(minion));

                if (minions.Count() >= Settings.LaneClear.EMinMinionsHit)
                {
                    E.Cast();
                }
            }
        }
Esempio n. 13
0
        public static List <T> GetCollisionObjects <T>(Obj_AI_Base unit) where T : Obj_AI_Base
        {
            try
            {
                var minions = StaticCacheProvider.GetMinions(CachedEntityType.CombinedAttackableMinions,
                                                             obj => obj.IsValidTargetCached() && Prediction.Position.PredictUnitPosition(obj, (int)R_ETA(obj)).IsInRangeCached(unit, HasBigRMissile ? 280 : 130)).ToList();

                var enemies = StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero,
                                                               obj => obj.IsValidTargetCached() && Prediction.Position.PredictUnitPosition(obj, (int)R_ETA(obj)).IsInRangeCached(unit, HasBigRMissile ? 280 : 130)).ToList();

                if (typeof(T) == typeof(Obj_AI_Base))
                {
                    return((List <T>)Convert.ChangeType(minions.Cast <Obj_AI_Base>().Concat(enemies).ToList(), typeof(List <T>)));
                }
                if (typeof(T) == typeof(AIHeroClient))
                {
                    return((List <T>)Convert.ChangeType(enemies, typeof(List <T>)));
                }
                if (typeof(T) == typeof(Obj_AI_Minion))
                {
                    return((List <T>)Convert.ChangeType(minions, typeof(List <T>)));
                }
                Logger.Error("Error at Corki.cs => GetCollisionObjects => Cannot cast to " + typeof(T));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
            return(null);
        }
Esempio n. 14
0
        public static void Execute()
        {
            var jungleMinions = StaticCacheProvider.GetMinions(CachedEntityType.Monsters, x => x.IsValidTargetCached(Player.Instance.GetAutoAttackRange())).ToList();

            if (!jungleMinions.Any())
            {
                return;
            }

            string[] allowedMonsters =
            {
                "SRU_Gromp",      "SRU_Blue",   "SRU_Red", "SRU_Razorbeak", "SRU_Krug", "SRU_Murkwolf", "Sru_Crab",
                "SRU_RiftHerald", "SRU_Dragon", "SRU_Baron"
            };

            if (Q.IsReady() && Settings.LaneClear.UseQInJungleClear && Player.Instance.ManaPercent >= Settings.LaneClear.MinManaQ && jungleMinions.Count(x => allowedMonsters.Contains(x.BaseSkinName, StringComparer.CurrentCultureIgnoreCase)) >= 1)
            {
                Q.Cast();
            }

            if (W.IsReady() && Settings.LaneClear.UseWInJungleClear &&
                Player.Instance.ManaPercent >= Settings.LaneClear.MinManaW)
            {
                var minion =
                    jungleMinions.FirstOrDefault(
                        x => allowedMonsters.Contains(x.BaseSkinName, StringComparer.CurrentCultureIgnoreCase));

                if (minion != null && minion.Health > Player.Instance.GetAutoAttackDamageCached(minion, true) * 2)
                {
                    var pred = W.GetPrediction(minion);
                    W.Cast(pred.CastPosition);
                }
            }
        }
Esempio n. 15
0
        public static void Execute()
        {
            if (W.IsReady())
            {
                var incomingDamage = IncomingDamage.GetIncomingDamage(Player.Instance);

                if ((incomingDamage / Player.Instance.TotalHealthWithShields() * 100 >= Settings.Misc.MinDamage) ||
                    (incomingDamage > Player.Instance.Health))
                {
                    W.Cast();
                }
            }

            if (Settings.Misc.EnableKillsteal && !Player.Instance.IsRecalling())
            {
                foreach (
                    var target in StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero,
                                                                   x =>
                                                                   x.IsValidTargetCached() && IsInQRange(x) && !x.HasUndyingBuffA() &&
                                                                   (x.TotalHealthWithShields() < Player.Instance.GetSpellDamageCached(x, SpellSlot.Q))))
                {
                    if (HasEDebuff(target))
                    {
                        Player.Instance.Spellbook.CastSpell(SpellSlot.Q, target.Position);
                        return;
                    }

                    var qPrediction = Q.GetPrediction(target);

                    if (qPrediction.HitChance != HitChance.High)
                    {
                        continue;
                    }

                    Q.Cast(qPrediction.CastPosition);
                    return;
                }
            }

            if (Settings.Misc.AutoHarass && HasAnyOrbwalkerFlags)
            {
                Combo.ELogics();
            }

            if (!Settings.Misc.AutoHarass || !Settings.Combo.UseQ || !HasAnyOrbwalkerFlags ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                return;
            }

            foreach (
                var corrosiveDebufTarget in
                CorrosiveDebufTargets.Where(
                    unit => (unit.Type == GameObjectType.AIHeroClient) && unit.IsValidTargetCached(1300)))
            {
                Player.Instance.Spellbook.CastSpell(SpellSlot.Q, corrosiveDebufTarget.Position);
                return;
            }
        }
Esempio n. 16
0
        public static void Execute()
        {
            var laneMinions = StaticCacheProvider.GetMinions(CachedEntityType.EnemyMinion, x => x.IsValidTarget(1100)).ToList();

            if (!laneMinions.Any() || !CanILaneClear())
            {
                return;
            }

            if (!Q.IsReady() || !Settings.LaneClear.UseQInLaneClear || HasPassiveBuff || Player.Instance.HasSheenBuff() ||
                (Player.Instance.ManaPercent < Settings.LaneClear.MinManaQ) || (laneMinions.Count <= 1))
            {
                return;
            }

            foreach (var objAiMinion in from objAiMinion in laneMinions
                     let rectangle = new Geometry.Polygon.Rectangle(Player.Instance.Position,
                                                                    Player.Instance.Position.Extend(objAiMinion, Player.Instance.Distance(objAiMinion) > 900 ? 900 - Player.Instance.Distance(objAiMinion) : 900).To3D(), 20)
                                     let count = laneMinions.Count(minion => new Geometry.Polygon.Circle(minion.Position, objAiMinion.BoundingRadius).Points.Any(rectangle.IsInside))
                                                 where count >= Settings.LaneClear.MinMinionsHitQ
                                                 select objAiMinion)
            {
                Q.Cast(objAiMinion);
            }
        }
Esempio n. 17
0
        public static void Execute()
        {
            if (!R.IsReady())
            {
                return;
            }

            var possibleTargets = StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero,
                                                                   x =>
                                                                   x.IsValidTarget(R.Range) &&
                                                                   (x.TotalHealthWithShields() - IncomingDamage.GetIncomingDamage(x) < Damage.GetRDamage(x)));

            var target = TargetSelector.GetTarget(possibleTargets, EloBuddy.DamageType.Magical);

            if (target == null)
            {
                return;
            }

            var rPrediction = R.GetPrediction(target);

            if (((HasKogMawRBuff && (GetKogMawRBuff.Count <= Settings.Combo.RAllowedStacks + 1)) ||
                 !HasKogMawRBuff) && (rPrediction.HitChancePercent >= Settings.Combo.RHitChancePercent))
            {
                R.Cast(rPrediction.CastPosition);
            }
        }
Esempio n. 18
0
        public static void Execute()
        {
            var jungleMinions = StaticCacheProvider.GetMinions(CachedEntityType.Monsters, x => x.IsValidTargetCached(Player.Instance.GetAutoAttackRange()))
                                .ToList();

            if (!jungleMinions.Any())
            {
                return;
            }

            if (Q.IsReady() && Settings.LaneClear.UseQInJungleClear &&
                (Player.Instance.ManaPercent >= Settings.LaneClear.MinManaQ))
            {
                Q.CastOnBestFarmPosition(1);
            }

            if (!IsPostAttack || !W.IsReady() || !Settings.LaneClear.UseWInJungleClear || (Player.Instance.ManaPercent < Settings.LaneClear.WMinMana))
            {
                return;
            }

            if (jungleMinions.Count > 1)
            {
                W.Cast();
            }
        }
Esempio n. 19
0
        public static void Execute()
        {
            var jungleMinions = StaticCacheProvider.GetMinions(CachedEntityType.Monsters, x => x.IsValidTargetCached(Player.Instance.GetAutoAttackRange())).ToList();

            if (!jungleMinions.Any())
            {
                return;
            }

            if (Q.IsReady() && jungleMinions.Count > 1 && Settings.LaneClear.UseQInJungleClear &&
                Player.Instance.ManaPercent >= Settings.LaneClear.MinManaQ)
            {
                var minion = jungleMinions.OrderBy(unit => unit.Health).FirstOrDefault();
                if (minion != null)
                {
                    Q.Cast(minion);
                }
            }

            if (!W.IsReady() || jungleMinions.Count <= 1 || !Settings.LaneClear.UseWInJungleClear ||
                !(Player.Instance.ManaPercent >= Settings.LaneClear.MinManaW))
            {
                return;
            }

            var farmLocation = EntityManager.MinionsAndMonsters.GetLineFarmLocation(jungleMinions, 40, 2500, Player.Instance.Position.To2D());

            if (farmLocation.HitNumber > 1)
            {
                W.Cast(farmLocation.CastPosition);
            }
        }
Esempio n. 20
0
        public static void Execute()
        {
            if (R.IsReady() && Settings.Combo.UseR && Settings.Combo.RifTargetOutOfRange && !E.IsReady() && Player.Instance.Spellbook.GetSpell(SpellSlot.E).CooldownExpires - Game.Time > 2)
            {
                var enemy = StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero).FirstOrDefault(x =>
                                                                                                        !x.IsDead && x.IsValidTargetCached(850) &&
                                                                                                        (x.DistanceCached(Player.Instance) > Player.Instance.GetAutoAttackRange()) &&
                                                                                                        (x.Health <
                                                                                                         Player.Instance.CalculateDamageOnUnit(x, DamageType.Physical,
                                                                                                                                               Player.Instance.TotalAttackDamage + Damage.RBonusAd[R.Level], false, true) * 2));

                if (enemy != null && enemy.IsValidTargetCached(750) && Orbwalker.CanAutoAttack && (enemy.Health + Player.Instance.CalculateDamageOnUnit(enemy, DamageType.Physical,
                                                                                                                                                        Player.Instance.TotalAttackDamage + Damage.RBonusAd[R.Level], false, true) > IncomingDamage.GetIncomingDamage(enemy)))
                {
                    Misc.PrintInfoMessage("Casting R to kill <font color=\"#ff1493\">" + enemy.Hero + "</font>.");
                    R.Cast();
                }
            }

            if (W.IsReady() && Settings.Combo.UseW)
            {
                var target = TargetSelector.GetTarget(W.Range, DamageType.Physical, Player.Instance.Position);

                if (target != null)
                {
                    var prediction = W.GetPrediction(target);
                    if (prediction.HitChancePercent > 50)
                    {
                        W.Cast(prediction.CastPosition);
                    }
                }
            }
            if (E.IsReady() && Settings.Combo.UseE)
            {
                if (Settings.Combo.EMode == 0) // percentage
                {
                    var enemyUnit = StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero).ToList().Find(unit => !unit.IsDead && unit.IsValidTargetCached(E.Range) && HasDeadlyVenomBuff(unit));

                    if (enemyUnit != null && Damage.CanCastEOnUnit(enemyUnit))
                    {
                        var percentDamage = Damage.GetEDamage(enemyUnit) / enemyUnit.TotalHealthWithShields() * 100;
                        if (percentDamage >= Settings.Combo.EAt)
                        {
                            E.Cast();
                            Misc.PrintDebugMessage($"Casting E cause it will deal {percentDamage} percent of enemy hp.");
                        }
                    }
                }
                if (Settings.Combo.EMode == 1) // at stacks
                {
                    if (StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero,
                                                         unit => !unit.IsZombie && unit.IsValidTargetCached(E.Range) && HasDeadlyVenomBuff(unit) &&
                                                         Damage.CountEStacks(unit) >= Settings.Combo.EAt).Any())
                    {
                        E.Cast();
                    }
                }
            }
        }
 public override void Setup()
 {
     base.Setup();
     _provider = new StaticCacheProvider();
 }