Example #1
0
        static void CastE(Obj_AI_Hero target)
        {
            if (!E.IsReady() || target == null || !target.IsValidTarget())
                return;

            bool Catched = IsPulling().Item1;
            Obj_AI_Hero CatchedQtarget = IsPulling().Item2;

            if (!Catched && qTimer == 0)
            {
                if (Player.Distance(target.Position) <= E.Range)
                {
                    if (Player.HpPercents() < 20 &&
                        target.HpPercents() > 20)
                    {
                        Push(target);
                    }
                    else
                    {
                        Pull(target);
                    }
                }
            }
            else if (Catched && CatchedQtarget != null)
            {
                if (Environment.TickCount > qTimer - 200 && Player.Distance(CatchedQtarget.Position) <= E.Range)
                {
                    Pull(CatchedQtarget);
                }
            }
        }