예제 #1
0
        private static void RLogic()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (target != null && R.IsReady() && target.Distance(Player) < R.Range)
            {
                if (E.IsReady() && Config.GetBoolValue("combo.e"))
                {
                    E.Cast(target.Position);
                }
                if (W.IsReady() && Config.GetBoolValue("combo.w"))
                {
                    W.Cast();
                }
                if ((!E.IsReady() || !Config.GetBoolValue("combo.e")) && (!W.IsReady() || !Config.GetBoolValue("combo.w")))
                {
                    R.Cast();
                }
            }
        }
예제 #2
0
        private static void QLogic(bool KSMode = false)
        {
            if (!Q.IsReady())
            {
                return;
            }
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range + 300, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (!KSMode && Config.GetBoolValue("combo.q.minion") && target.Distance(Player) > 400)
            {
                //Optimal Position to attack Target
                Vector3     OptimalQPosition = target.ServerPosition.Extend(Player.Position, 350);
                Obj_AI_Base min = ObjectManager.Get <Obj_AI_Base>().Aggregate((x, y) => x.Distance(OptimalQPosition) < y.Distance(OptimalQPosition) ? x : y);
                if (min.Distance(OptimalQPosition) < 130)
                {
                    Q.Cast(min);
                }
            }
            if (target.Distance(Player) < Q.Range && (Config.GetBoolValue("combo.q.direct") && (!Config.GetBoolValue("combo.q.onlyrunaway") || !target.IsFacing(Player) || target.Distance(Player) < 300) || KSMode))
            {
                Q.Cast(target);
            }
        }