Пример #1
0
        private static void Unit_OnDash(Obj_AI_Base sender, Dash.DashItem args)
        {
            if (sender.IsEnemy && Player.Distance(args.EndPos) > Player.Distance(args.StartPos))
            {
                if (E.IsInRange(args.StartPos))
                {
                    Utill.Debug("DEBUG:Unit_OnDash E");
                    E.Cast(sender);
                }

                if (Config.Item("位移Q").GetValue <bool>() && SpellQ.GetState() == QState.ThreshQ && Q.IsInRange(args.EndPos) && !E.IsInRange(args.EndPos) && Math.Abs(args.Duration - args.EndPos.Distance(sender) / Q.Speed * 1000) < 150)
                {
                    List <Vector2> to = new List <Vector2>();
                    to.Add(args.EndPos);
                    var QCollision = Q.GetCollision(Player.Position.To2D(), to);
                    if (QCollision == null || QCollision.Count == 0 || QCollision.All(a => !a.IsMinion))
                    {
                        if (Q.Cast(args.EndPos))
                        {
                            Utill.Debug("DEBUG:Unit_OnDash Q");
                            return;
                        }
                    }
                }
            }
        }
Пример #2
0
        private static void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser)
        {
            if (gapcloser.Sender.ChampionName == "MasterYi" && gapcloser.Slot == SpellSlot.Q)
            {
                return;
            }

            if (E.CanCast(gapcloser.Sender) && E.CastToReverse(gapcloser.Sender))
            {
                Utill.Debug("DEBUG:AntiGapcloser E");
                return;
            }
            else if (Q.CanCast(gapcloser.Sender) && SpellQ.GetState() == QState.ThreshQ)
            {
                if (gapcloser.Sender.ChampionName == "JarvanIV" && gapcloser.Slot == SpellSlot.Q)
                {
                    return;
                }
                Utill.Debug("DEBUG:AntiGapcloser Q");
                SpellQ.CastQ1(gapcloser.Sender);
            }
        }