Exemplo n.º 1
0
        private static void OnLaneClear()
        {
            var count =
                EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Player.ServerPosition,
                                                                Player.AttackRange, false).Count();

            var source =
                EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Player.ServerPosition,
                                                                Player.AttackRange).OrderBy(a => a.MaxHealth).FirstOrDefault();

            if (count == 0)
            {
                return;
            }
            if (E.IsReady() && MissInopportuneMenu.LcE() && source.IsValidTarget(E.Range) &&
                Player.ManaPercent >= MissInopportuneMenu.LcM() && MissInopportuneMenu.LcE1() <= count)
            {
                E.Cast(source.Position);
            }

            if (Q.IsReady() && Player.ManaPercent >= MissInopportuneMenu.LcM())
            {
                if (MissInopportuneMenu.LcQ() && MissInopportuneMenu.LcQ1() && source.IsValidTarget(Q.Range) &&
                    Player.GetSpellDamage(source, SpellSlot.Q) >= source.Health && !source.IsDead)
                {
                    Q.Cast(source);
                }

                if (Q.IsReady() && MissInopportuneMenu.LcQ() && !MissInopportuneMenu.LcQ1() && source.IsValidTarget(Q.Range))
                {
                    Q.Cast(source);
                }
            }

            if (W.IsReady() && MissInopportuneMenu.LcW() &&
                Player.ManaPercent >= MissInopportuneMenu.LcM())
            {
                W.Cast();
            }
        }