示例#1
0
        public static void Execute()
        {
            var count  = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Program._player.ServerPosition, Program._player.AttackRange, false).Count();
            var source = EntityManager.MinionsAndMonsters.GetLaneMinions().OrderBy(a => a.MaxHealth).FirstOrDefault(a => a.IsValidTarget(Q.Range));

            if (count == 0)
            {
                return;
            }
            if (source == null || source.IsInvulnerable || source.MagicImmune)
            {
                return;
            }

            var qDamage = DamageManager.GetQDamage(source);

            if (LaneClearMenu.GetComboBoxValue("QSE") <= 0 && Q.IsReady() && LaneClearMenu.GetCheckBoxValue("qUse") && Player.Instance.GetSpellDamage(source, SpellSlot.Q) >= Prediction.Health.GetPrediction(source, Q.CastDelay + Game.Ping))
            {
                Q.Cast(source.ServerPosition);
            }

            else if (LaneClearMenu.GetComboBoxValue("QSE") <= 1 && Q.IsReady() && LaneClearMenu.GetCheckBoxValue("qUse"))
            {
                Q.Cast(source.ServerPosition);
            }

            if (E.IsReady() && LaneClearMenu.GetCheckBoxValue("eUse") && source.IsValidTarget(E.Range))
            {
                E.Cast(source);
            }
        }