Exemplo n.º 1
0
        public static void Flee()
        {
            var unit = ForDash.GetClosestEUnit(Game.CursorPos);

            if (Yasuo.Flee["FleeE"].Cast <CheckBox>().CurrentValue&& unit != null && unit.GetDashPos().Distance(Game.CursorPos) < Player.Instance.Distance(Game.CursorPos))
            {
                SpellDataBase.E.Cast(unit);
                return;
            }
            if (Yasuo.Flee["Flee.stack"].Cast <CheckBox>().CurrentValue&& Player.Instance.HasWhirlwind() && !Player.Instance.IsDashing())
            {
                var target =
                    EntityManager.Heroes.Enemies.Where(a => a.IsValidTarget(SpellDataBase.Q.Range) && a.Health > 0 && !a.IsDead)
                    .OrderBy(a => a.Distance(Player.Instance))
                    .FirstOrDefault();
                if (target == null)
                {
                    return;
                }
                SpellDataBase.Q.Cast(target);
                return;
            }
            if (Yasuo.Flee["Flee.stack"].Cast <CheckBox>().CurrentValue)
            {
                SpellDataBase.StackQ();
            }
        }
Exemplo n.º 2
0
        public static void Harass()
        {
            var target = TargetSelector.SeletedEnabled && TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget.IsValidTarget(1375)
                    ? TargetSelector.SelectedTarget
                    : TargetSelector.GetTarget(SpellDataBase.Q.Range + 475 + 100, DamageType.Physical);

            if (target == null)
            {
                return;
            }
            if (target.IsValidTarget(SpellDataBase.Q.Range) && Yasuo.Combo["harass.Q"].Cast <CheckBox>().CurrentValue)
            {
                if (Player.Instance.IsDashing())
                {
                    var pos = ForDash.GetPlayerPosition(300);
                    if (SpellDataBase.Q.IsReady() && (target.Distance(pos) < 400))
                    {
                        Player.CastSpell(SpellSlot.Q);
                    }
                }
                else if (SpellDataBase.Q.IsReady())
                {
                    SpellDataBase.Q.Cast(target);
                    return;
                }
            }

            var unit = target.GetClosestEUnit();

            if (Yasuo.Combo["harass.E"].Cast <CheckBox>().CurrentValue&& unit != null && unit.GetDashPos().Distance(target) < Player.Instance.Distance(target) && (!unit.GetDashPos().IsUnderTower() || TargetSelector.SelectedTarget == target))
            {
                SpellDataBase.E.Cast(unit);
            }
            if (Player.Instance.HasWhirlwind())
            {
                return;
            }
            if (Yasuo.Combo["harass.stack"].Cast <CheckBox>().CurrentValue)
            {
                SpellDataBase.StackQ();
            }
        }
Exemplo n.º 3
0
        public static void Combo()
        {
            var target = TargetSelector.SeletedEnabled && Yasuo.Combo["combo.leftclickRape"].Cast <CheckBox>().CurrentValue&& TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget.IsValidTarget(1375)
                    ? TargetSelector.SelectedTarget
                    : TargetSelector.GetTarget(SpellDataBase.Q.Range + 475 + 100, DamageType.Physical);

            if (target == null)
            {
                return;
            }

            if (SpellDataBase.R.IsReady() && SpellDataBase.GetLowestKnockupTime() <= 250 + Game.Ping &&
                Yasuo.Combo["UseRCombo"].Cast <CheckBox>().CurrentValue&&
                (Yasuo.Combo["combo.RTarget"].Cast <CheckBox>().CurrentValue&& target.IsKnockedUp() && TargetSelector.SelectedTarget == target ||
                 Yasuo.Combo["combo.RKillable"].Cast <CheckBox>().CurrentValue&& target.Health <= DamageInfo.RDamage(target) && target.Health > DamageInfo.QDamage(target) ||
                 SpellDataBase.GetKnockedUpTargets() >= Yasuo.Combo["combo.MinTargetsR"].Cast <Slider>().CurrentValue))
            {
                SpellDataBase.R.Cast();
            }

            if (target.IsValidTarget(SpellDataBase.Q.Range) && Yasuo.Combo["UseQCombo"].Cast <CheckBox>().CurrentValue)
            {
                if (Player.Instance.IsDashing())
                {
                    var pos = ForDash.GetPlayerPosition(300);
                    if (SpellDataBase.Q.IsReady() && (target.Distance(pos) < 400))
                    {
                        Player.CastSpell(SpellSlot.Q);
                    }
                }
                else if (SpellDataBase.Q.IsReady())
                {
                    SpellDataBase.Q.Cast(target);
                    return;
                }
            }

            if (Yasuo.Combo["UseECombo"].Cast <CheckBox>().CurrentValue&& target.GetDashPos().Distance(target) < 400 && target.CanDash() && target.Distance(Player.Instance) > Player.Instance.GetAutoAttackRange(target))
            {
                SpellDataBase.E.Cast(target);
            }

            if (Yasuo.Combo["UseECombo"].Cast <CheckBox>().CurrentValue&& target.Distance(Player.Instance) > Player.Instance.GetAutoAttackRange(target) && !Player.Instance.IsDashing())
            {
                foreach (var unit in EntityManager.MinionsAndMonsters.CombinedAttackable)
                {
                    if (!(unit.GetDashPos().Distance(target) < Player.Instance.Distance(target)) || (unit.GetDashPos().IsUnderTower() && TargetSelector.SelectedTarget != target))
                    {
                        continue;
                    }
                    SpellDataBase.E.Cast(unit);
                    return;
                }
                foreach (var unit in EntityManager.Heroes.Enemies)
                {
                    if (!(unit.GetDashPos().Distance(target) < Player.Instance.Distance(target)) || (unit.GetDashPos().IsUnderTower() && TargetSelector.SelectedTarget != target))
                    {
                        continue;
                    }
                    SpellDataBase.E.Cast(unit);
                    return;
                }
            }
            if (Player.Instance.HasWhirlwind())
            {
                return;
            }

            if (Yasuo.Combo["stack.combo"].Cast <CheckBox>().CurrentValue)
            {
                SpellDataBase.StackQ();
            }
        }