Ejemplo n.º 1
0
        private static void OnHarrass()
        {
            var enemiese = EntityManager.Heroes.Enemies.OrderByDescending
                               (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= R.Range);
            var enemiesq = EntityManager.Heroes.Enemies.OrderByDescending
                               (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= Q.Range);
            var target = TargetSelector.GetTarget(1900, DamageType.Magical);

            if (!target.IsValidTarget())
            {
                return;
            }

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

            if (target.IsValidTarget(Q.Range) && Player.ManaPercent >= FapturneMenu.HarassQE())
            {
                foreach (var qenemies in enemiesq)
                {
                    var useQ = FapturneMenu.MyHarass["harass.Q"
                                                     + qenemies.ChampionName].Cast <CheckBox>().CurrentValue;
                    if (useQ)
                    {
                        var predq = Q.GetPrediction(qenemies);
                        if (predq.HitChance >= HitChance.High)
                        {
                            Q.Cast(predq.CastPosition);
                        }
                    }
                }
            }
        }