Ejemplo n.º 1
0
        private static void Evading(Obj_AI_Base sender)
        {
            var skillshot = Evade.SkillshotAboutToHit(sender, 100).OrderByDescending(i => i.DangerLevel).ToList();

            if (skillshot.Count == 0)
            {
                return;
            }
            var zedW2 = EvadeSpellDatabase.Spells.FirstOrDefault(i => i.Enable && i.IsReady && i.Slot == SpellSlot.W);

            if (zedW2 != null && wShadow.LSIsValid() && !Evade.IsAboutToHit(wShadow, 30) &&
                (!wShadow.IsUnderEnemyTurret() || getCheckBoxItem(Config.evadeMenu, zedW2.Name + "Tower")) &&
                skillshot.Any(i => i.DangerLevel >= zedW2.DangerLevel) && W.Cast())
            {
                return;
            }
            var zedR2 =
                EvadeSpellDatabase.Spells.FirstOrDefault(
                    i => i.Enable && i.IsReady && i.Slot == SpellSlot.R && i.CheckSpellName == "zedr2");

            if (zedR2 != null && rShadow.LSIsValid() && !Evade.IsAboutToHit(rShadow, 30) &&
                (!rShadow.IsUnderEnemyTurret() || getCheckBoxItem(Config.evadeMenu, zedR2.Name + "Tower")) &&
                skillshot.Any(i => i.DangerLevel >= zedR2.DangerLevel))
            {
                R.Cast();
            }
        }