Example #1
0
        private static void OnHarass()
        {
            var target = TargetSelector.GetTarget(1110f, TargetSelector.DamageType.Physical);

            if (target != null)
            {
                if (Spells.Q.IsReady() && !Spells.Q.Empowered() &&
                    Utilities.Enabled("q.harass") && target.IsValidTarget(Spells.Q.Range))
                {
                    Spells.Q.Do(target, Utilities.HikiChance("q.hitchance"), true);
                }

                if (Spells.Q3.IsReady() && Spells.Q.Empowered() && Utilities.Enabled("q3.harass") &&
                    target.IsValidTarget(Spells.Q3.Range))
                {
                    Spells.Q.Do(target, Utilities.HikiChance("q3.hitchance"), true);
                }
            }

            else
            {
                if (Spells.Q.IsReady() && Utilities.Enabled("q.lasthit") && !Spells.Q.Empowered())
                {
                    foreach (var minion in MinionManager.GetMinions(Spells.Q.Range)
                             .Where(x => x.IsValid && Spells.Q.GetDamage(x) > x.Health))
                    {
                        Spells.Q.Cast(minion.Position);
                    }
                }

                if (Spells.E.IsReady() && Utilities.Enabled("e.lasthit") && !Spells.Q.Empowered())
                {
                    foreach (var minion in MinionManager.GetMinions(Spells.E.Range)
                             .Where(x => x.IsValid && Spells.E.GetDamage(x) > x.Health))
                    {
                        if (!YasuoE.GetDashingEnd(minion).To3D().UnderTurret(true))
                        {
                            Spells.E.CastOnUnit(minion);
                        }
                    }
                }
            }
        }
Example #2
0
        private static void OnLastHit()
        {
            if (Spells.Q.IsReady() && Utilities.Enabled("q.lasthit") && !Spells.Q.Empowered())
            {
                foreach (var minion in MinionManager.GetMinions(Spells.Q.Range)
                         .Where(x => x.IsValid && Spells.Q.GetDamage(x) > x.Health))
                {
                    Spells.Q.Cast(minion.Position);
                }
            }

            if (Spells.E.IsReady() && Utilities.Enabled("e.lasthit"))
            {
                foreach (var minion in MinionManager.GetMinions(Spells.E.Range)
                         .Where(x => x.IsValid && Spells.E.GetDamage(x) > x.Health))
                {
                    if (!YasuoE.GetDashingEnd(minion).To3D().UnderTurret(true)) // turret check for dash end pos e
                    {
                        Spells.E.CastOnUnit(minion);
                    }
                }
            }
        }