Beispiel #1
0
        internal static void Harass(bool useQ, bool useW, bool useE, bool combo = false)
        {
            SharpDX.Vector3 landing;
            var             turret = Calculation.NearestAllyTurret();

            if (MySpells.E.IsReady() && useE)
            {
                foreach (var enemy in ObjectManager.Heroes.Enemies.Where(t => t.IsValidTarget(300)))
                {
                    landing = MySpells.getELandingPos(enemy);
                    if (PoisonPath.IsInPoison(landing) &&
                        landing.Distance(turret) < enemy.Distance(turret) &&
                        Singed.Player.HealthPercent + 40 >= enemy.HealthPercent)
                    {
                        if (!enemy.IsFacing(Singed.Player) && !enemy.IsValidTarget(MySpells.E.Range))
                        {
                            continue;
                        }
                        if (useW)
                        {
                            MySpells.W.Cast(landing);
                        }
                        MySpells.E.Cast(enemy);
                    }
                    else if (turret.Distance(landing) < TowerRange)
                    {
                        if (TowerRange - turret.Distance(landing) > 150 && enemy.Distance(Singed.Player) < 100)
                        {
                            if (useW)
                            {
                                MySpells.W.Cast((landing * 2 + Singed.Player.Position) / 3);
                            }
                            MySpells.E.Cast(enemy);
                        }
                        else
                        {
                            MySpells.E.Cast(enemy);
                        }
                    }
                }
            }
            if (MySpells.E.IsLearned && useQ)
            {
                var target = TargetSelector.GetTarget(850);
                if (target == null)
                {
                    return;
                }
                if (Singed.Player.Position.Distance(MySpells.getELandingPos(target.ServerPosition)) < 400 && target.IsFacing(Singed.Player))
                {
                    MySpells.EnableQ();
                }
                else if (!combo)
                {
                    MySpells.DisableQ();
                }

                if (target.Distance(Singed.Player) < 400 && MyMenu.GetValue("Harass (E engage).QMana") < Singed.Player.ManaPercent)
                {
                    MySpells.EnableQ();
                }
            }
        }