예제 #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().OrderBy(a => a.MaxHealth).FirstOrDefault(a => a.IsValidTarget(Q.Range));

            if (count == 0)
            {
                return;
            }
            if (E.IsReady() && MariagiospaldaMenu.LcE() && MariagiospaldaMenu.LcE1() <= count &&
                Player.ManaPercent >= MariagiospaldaMenu.LcM() && PiuwPiuwMissile == null)
            {
                E.Cast(source.Position);
            }
            if (Q.IsReady() && Player.ManaPercent >= MariagiospaldaMenu.LcM() && MariagiospaldaMenu.LcQ1() <= count)
            {
                if (MariagiospaldaMenu.LcQ() && MariagiospaldaMenu.LcQ2() && source.IsValidTarget(Q.Range) &&
                    Player.GetSpellDamage(source, SpellSlot.Q) >= source.Health && !source.IsDead)
                {
                    Q.Cast(source.Position);
                }

                if (Q.IsReady() && MariagiospaldaMenu.LcQ() && !MariagiospaldaMenu.LcQ2() && source.IsValidTarget(Q.Range))
                {
                    Q.Cast(source.Position);
                }
            }

            if (W.IsReady() && MariagiospaldaMenu.LcW() && MariagiospaldaMenu.LcW1() <= count &&
                Player.ManaPercent >= MariagiospaldaMenu.LcM())
            {
                W.Cast();
            }
        }