Esempio n. 1
0
        public void ELogic()
        {
            if (!E.IsReady())
            {
                return;
            }
            //TODO: check all enemies, include zhonya, zilean buff, check buff time;
            var goodTarget =
                ValidTargets.OrderByDescending(GetPriority).FirstOrDefault(
                    e =>
                    e.IsValidTarget(900) && (e.HasBuffOfType(BuffType.Knockup) || e.HasBuffOfType(BuffType.Snare) ||
                                             e.HasBuffOfType(BuffType.Stun) || e.HasBuffOfType(BuffType.Suppression) || e.IsCharmed ||
                                             e.IsCastingInterruptableSpell()));// || e.HasBuff("ChronoRevive") || e.HasBuff("ChronoShift")));

            if (goodTarget != null)
            {
                var pos = goodTarget.ServerPosition;
                if (pos.Distance(ObjectManager.Player.ServerPosition) < 900)
                {
                    this.CastE(goodTarget.ServerPosition);
                }
            }
            foreach (
                var enemyMinion in
                ObjectManager.Get <Obj_AI_Base>()
                .Where(
                    m =>
                    m.IsEnemy && m.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < E.Range &&
                    m.HasBuff("teleport_target")))
            {
                DelayAction.Add(3250, () =>
                {
                    if (enemyMinion != null && enemyMinion.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 900)
                    {
                        this.CastE(enemyMinion.ServerPosition);
                    }
                });
            }
        }