protected override void LaneClear()
        {
            if (!ResourceManager.Check("lane-clear"))
            {
                return;
            }

            var useQ = Menu.Item(Menu.Name + ".lane-clear.q").GetValue <bool>() && Q.IsReady();
            var useE = Menu.Item(Menu.Name + ".lane-clear.e").GetValue <bool>() && E.IsReady();

            if (!useQ && !useE)
            {
                return;
            }

            var minE    = ItemData.Runaans_Hurricane_Ranged_Only.GetItem().IsOwned(Player) ? 3 : 2;
            var minQ    = Menu.Item(Menu.Name + ".lane-clear.q-min").GetValue <Slider>().Value;
            var minions = MinionManager.GetMinions(Q.Range);

            if (minions.Count == 0)
            {
                return;
            }
            if (useQ && minions.Count >= minQ && !Player.IsWindingUp && !Player.IsDashing())
            {
                foreach (var minion in minions.Where(x => x.Health <= Q.GetDamage(x)))
                {
                    var killcount = 0;
                    foreach (var colminion in
                             QGetCollisions(Player, Player.ServerPosition.Extend(minion.ServerPosition, Q.Range)))
                    {
                        if (colminion.Health <= Q.GetDamage(colminion))
                        {
                            killcount++;
                        }
                        else
                        {
                            break;
                        }
                    }

                    if (killcount >= minQ)
                    {
                        Q.Cast(minion.ServerPosition);
                        break;
                    }
                }
            }
            if (useE)
            {
                var killable = minions.Where(m => E.IsInRange(m) && Rend.IsKillable(m, false)).ToList();
                if (killable.Count >= minE)
                {
                    CastE();
                }
            }
        }
        protected override void JungleClear()
        {
            if (!ResourceManager.Check("jungle-clear"))
            {
                return;
            }

            var useQ = Menu.Item(Menu.Name + ".jungle-clear.q").GetValue <bool>() && Q.IsReady();
            var useE = Menu.Item(Menu.Name + ".jungle-clear.e").GetValue <bool>() && E.IsReady();

            if (!useQ && !useE)
            {
                return;
            }

            var minions = MinionManager.GetMinions(
                Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);

            if (minions.Count == 0)
            {
                return;
            }
            if (useQ && minions.Count >= 1 && !Player.IsWindingUp && !Player.IsDashing())
            {
                foreach (var minion in minions.Where(x => x.Health <= Q.GetDamage(x)))
                {
                    var killcount = 0;
                    foreach (var colminion in
                             QGetCollisions(Player, Player.ServerPosition.Extend(minion.ServerPosition, Q.Range)))
                    {
                        if (colminion.Health <= Q.GetDamage(colminion))
                        {
                            killcount++;
                        }
                        else
                        {
                            break;
                        }
                    }

                    if (killcount >= 1)
                    {
                        Q.Cast(minion.ServerPosition);
                        break;
                    }
                }
            }
            if (useE)
            {
                var killable = minions.Where(m => E.IsInRange(m) && Rend.IsKillable(m, false)).ToList();
                if (killable.Count >= 1)
                {
                    CastE();
                }
            }
        }
 private void OnOrbwalkingNonKillableMinion(AttackableUnit unit)
 {
     try
     {
         if (Menu.Item(Menu.Name + ".lasthit.e-unkillable").GetValue <bool>() && E.IsReady() &&
             ResourceManager.Check("lasthit"))
         {
             var target = unit as Obj_AI_Base;
             if (target != null && Rend.IsKillable(target, true))
             {
                 CastE();
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
        protected override void Harass()
        {
            if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady() && ResourceManager.Check("harass-q") &&
                !Player.IsWindingUp && !Player.IsDashing())
            {
                var target = TargetSelector.GetTarget(Q);
                if (target != null)
                {
                    var prediction = Q.GetPrediction(target);
                    if (prediction.Hitchance >= Q.GetHitChance("harass"))
                    {
                        Q.Cast(prediction.CastPosition);
                    }
                    else if (prediction.Hitchance == HitChance.Collision)
                    {
                        QCollisionCheck(target);
                    }
                }
            }

            if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && E.IsReady() && ResourceManager.Check("harass-e"))
            {
                var target = TargetSelector.GetTarget(E, false);
                if (target != null && Rend.HasBuff(target))
                {
                    if (Rend.IsKillable(target, false))
                    {
                        CastE();
                    }
                    if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target))
                    {
                        if (
                            GameObjects.EnemyMinions.Any(
                                m => m.IsValidTarget(E.Range * 0.95f) && Rend.IsKillable(m, m.HealthPercent < 10)))
                        {
                            CastE();
                        }
                        else
                        {
                            var dashObjects =
                                GameObjects.EnemyMinions.Where(
                                    m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m))).ToList();
                            var minion =
                                dashObjects.FirstOrDefault(
                                    m =>
                                    m.Health > Player.GetAutoAttackDamage(m) * 1.1f &&
                                    m.Health < Player.GetAutoAttackDamage(m) + Rend.GetDamage(m, 1));
                            if (minion != null)
                            {
                                Orbwalker.ForceTarget(minion);
                                if (Orbwalking.CanAttack())
                                {
                                    ObjectManager.Player.IssueOrder(GameObjectOrder.AttackUnit, minion);
                                }
                            }
                        }
                    }
                    else if (E.IsInRange(target))
                    {
                        if (Rend.IsKillable(target, false))
                        {
                            CastE();
                        }
                        else
                        {
                            var buff = Rend.GetBuff(target);
                            if (buff != null &&
                                buff.Count >= Menu.Item(Menu.Name + ".harass.e-min").GetValue <Slider>().Value)
                            {
                                if (target.Distance(Player) > E.Range * 0.8 && !target.IsFacing(Player) ||
                                    buff.EndTime - Game.Time < 0.3)
                                {
                                    CastE();
                                }
                            }
                        }
                    }
                }
            }
        }
        protected override void OnPreUpdate()
        {
            if (E.IsReady())
            {
                if (Menu.Item(Menu.Name + ".miscellaneous.e-death").GetValue <bool>())
                {
                    if (IncomingDamageManager.GetDamage(Player) > Player.Health &&
                        GameObjects.EnemyHeroes.Any(e => e.IsValidTarget(E.Range) && Rend.HasBuff(e)))
                    {
                        CastE();
                    }
                }

                var eBig    = Menu.Item(Menu.Name + ".lasthit.e-big").GetValue <bool>();
                var eJungle = Menu.Item(Menu.Name + ".lasthit.e-jungle").GetValue <bool>();
                if (eBig || eJungle)
                {
                    if (eJungle && Player.Level >= 3 || eBig)
                    {
                        var creeps =
                            GameObjects.Jungle.Where(e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, false))
                            .ToList();
                        if (eJungle && creeps.Any() ||
                            eBig &&
                            creeps.Any(
                                m =>
                                m.CharData.BaseSkinName.StartsWith("SRU_Dragon") ||
                                m.CharData.BaseSkinName.StartsWith("SRU_Baron")))
                        {
                            CastE();
                            return;
                        }
                    }
                }

                var eSiege = (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
                              Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit) &&
                             Menu.Item(Menu.Name + ".lasthit.e-siege").GetValue <bool>();
                var eTurret = (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
                               Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit) &&
                              Menu.Item(Menu.Name + ".lasthit.e-turret").GetValue <bool>();
                var eReset = Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None &&
                             Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Flee &&
                             Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo &&
                             Menu.Item(Menu.Name + ".miscellaneous.e-reset").GetValue <bool>();

                IEnumerable <Obj_AI_Minion> minions = new HashSet <Obj_AI_Minion>();
                if (eSiege || eTurret || eReset)
                {
                    minions =
                        GameObjects.EnemyMinions.Where(
                            e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, e.HealthPercent < 25));
                }

                if (ResourceManager.Check("lasthit"))
                {
                    if (eSiege)
                    {
                        if (
                            minions.Any(
                                m =>
                                m.CharData.BaseSkinName.Contains("MinionSiege") ||
                                m.CharData.BaseSkinName.Contains("Super")))
                        {
                            CastE();
                            return;
                        }
                    }
                    if (eTurret)
                    {
                        if (minions.Any(m => Utils.UnderAllyTurret(m.Position)))
                        {
                            CastE();
                            return;
                        }
                    }
                }

                if (eReset && minions.Any() && ResourceManager.Check("misc") &&
                    GameObjects.EnemyHeroes.Any(e => Rend.HasBuff(e) && e.IsValidTarget(E.Range)))
                {
                    CastE();
                    return;
                }
            }

            if (ShouldSave())
            {
                R.Cast();
            }
        }