예제 #1
0
파일: Zed.cs 프로젝트: commonsharp/PortAIO
        private static void Evading(Obj_AI_Base sender)
        {
            var skillshot =
                Evade.SkillshotAboutToHit(sender, 50)
                .Where(i => i.CanDodge)
                .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.IsValid() && !Evade.IsAboutToHit(wShadow, 30) &&
                (!wShadow.IsUnderEnemyTurret() || getCheckBoxItem(Config.evadeMenu, zedW2.Name + "Tower")) &&
                skillshot.Any(i => i.DangerLevel >= zedW2.DangerLevel))
            {
                sender.Spellbook.CastSpell(zedW2.Slot);
                return;
            }
            var zedR2 =
                EvadeSpellDatabase.Spells.FirstOrDefault(
                    i => i.Enable && i.IsReady && i.Slot == SpellSlot.R && i.CheckSpellName == "zedr2");

            if (zedR2 != null && rShadow.IsValid() && !Evade.IsAboutToHit(rShadow, 30) && (!rShadow.IsUnderEnemyTurret() || getCheckBoxItem(Config.evadeMenu, zedR2.Name + "Tower") && skillshot.Any(i => i.DangerLevel >= zedR2.DangerLevel)))
            {
                sender.Spellbook.CastSpell(zedR2.Slot);
            }
        }
예제 #2
0
        /* TODO: UNFINISHED */
        private static void MethodMinion()
        {
            IEnumerable <Obj_AI_Minion> minions = Globals.GetLaneMinions(2000);

            if (minions.IsEmpty())
            {
                return;
            }

            Obj_AI_Minion target = minions.FirstOrDefault();

            if (!target.IsValid())
            {
                return;
            }

            if (Globals.MyHero.IsUnderEnemyTurret())
            {
                Obj_AI_Turret _Turret = ObjectManager.Turrets.Enemy.MinOrDefault(x => x.Distance(Globals.MyHero));
                Globals.MyHero.IssueOrder(Globals.Tibbers.CanAttack ? GameObjectOrder.AutoAttackPet : GameObjectOrder.MovePet, target);
            }
            else
            {
                Globals.MyHero.IssueOrder(Globals.Tibbers.CanAttack ? GameObjectOrder.AutoAttackPet : GameObjectOrder.MovePet, target);
            }
        }
예제 #3
0
 private static void CastE()
 {
     if (!E.IsReady())
     {
         return;
     }
     if (
         GameObjects.EnemyHeroes.Where(i => i.IsValidTarget())
         .Any(
             i =>
             E.IsInRange(i) || (wShadow.IsValid() && wShadow.Distance(i) < E.Range) ||
             (rShadow.IsValid() && rShadow.Distance(i) < E.Range)))
     {
         E.Cast();
     }
 }
예제 #4
0
        private static void CastE(Obj_AI_Hero target, bool isCombo = false)
        {
            var canCombo = !MainMenu["Orbwalk"]["R"].GetValue <MenuBool>().Value ||
                           !MainMenu["Orbwalk"]["RCast" + target.ChampionName].GetValue <MenuBool>().Value ||
                           (Player.Distance(target) > MainMenu["Orbwalk"]["RStopRange"].GetValue <MenuSlider>().Value &&
                            RState == 0) || HaveRMark(target) || rShadow.IsValid() || RState == -1;

            if (!E.IsReady() || (isCombo && !canCombo))
            {
                return;
            }
            if (E.IsInRange(target) && E.Cast())
            {
                return;
            }
            if (wShadow.IsValid() && wShadow.Distance(target) < E.Range && E.Cast())
            {
                return;
            }
            if (rShadow.IsValid() && rShadow.Distance(target) < E.Range)
            {
                E.Cast();
            }
        }