Exemplo n.º 1
0
        private static void OnHarrass()
        {
            var enemies = EntityManager.Heroes.Enemies.OrderByDescending
                              (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= E.Range);
            var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (!target.IsValidTarget() && Channeling == true)
            {
                return;
            }

            if (E.IsReady() && target.IsValidTarget(E.Range))
            {
                foreach (var eenemies in enemies)
                {
                    var useE = MissInopportuneMenu.MyHarass["harass.E"
                                                            + eenemies.ChampionName].Cast <CheckBox>().CurrentValue;
                    if (useE)
                    {
                        E.Cast(eenemies.ServerPosition);
                    }
                }
            }

            if (MissInopportuneMenu.HarassQ() &&
                Player.ManaPercent >= MissInopportuneMenu.HarassQe())
            {
                if (MissInopportuneMenu.HarassQ() && target.IsValidTarget(Q.Range))
                {
                    Q.Cast(target);
                }
                if (MissInopportuneMenu.HarassQ1() && target.IsValidTarget(Q1.Range))
                {
                    CastExtendedQ();
                }
            }
        }