Пример #1
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();
            }
        }