private static void Game_OnUpdate(EventArgs args)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear)
     {
         return;
     }
     if (!BadaoEliseSpellsManager.IsHuman && BadaoEliseHelper.CanUseQSpider())
     {
         foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q2.Range).OrderBy(x => x.Health))
         {
             BadaoMainVariables.Q2.Cast(minion);
         }
     }
 }
Esempio n. 2
0
 private static void Game_OnUpdate(EventArgs args)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear)
     {
         return;
     }
     if (BadaoEliseSpellsManager.IsHuman)
     {
         if (BadaoEliseHelper.UseQJungleClear())
         {
             foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q.Range,
                                                                       MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.Health))
             {
                 BadaoMainVariables.Q.Cast(minion);
             }
         }
         if (BadaoEliseHelper.UseWJungleClear())
         {
             foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.W.Range,
                                                                       MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.Health))
             {
                 BadaoMainVariables.W.Cast(minion);
             }
         }
     }
     if (!BadaoEliseSpellsManager.IsHuman)
     {
         if (BadaoEliseHelper.CanUseQSpider())
         {
             foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q2.Range,
                                                                       MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.Health))
             {
                 BadaoMainVariables.Q.Cast(minion);
             }
         }
     }
     if (BadaoEliseHelper.UseRJungleClear())
     {
         if (BadaoEliseSpellsManager.IsHuman && !BadaoEliseHelper.UseWJungleClear() && (!BadaoMainVariables.Q.IsReady() ||
                                                                                        !BadaoEliseVariables.JungleQ.GetValue <bool>()))
         {
             BadaoMainVariables.R.Cast();
         }
     }
 }
Esempio n. 3
0
 private static void Game_OnUpdate(EventArgs args)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
     {
         Orbwalking.Attack = true;
         return;
     }
     if (BadaoEliseHelper.CanUseQHuman() && BadaoEliseSpellsManager.IsHuman)
     {
         Orbwalking.Attack = false;
     }
     else
     {
         Orbwalking.Attack = true;
     }
     if (BadaoEliseHelper.UseE1Combo())
     {
         var target = TargetSelector.GetTarget(BadaoMainVariables.E.Range, TargetSelector.DamageType.Magical);
         if (target.BadaoIsValidTarget())
         {
             if (BadaoEliseSpellsManager.IsHuman)
             {
                 BadaoMainVariables.E.Cast(target);
             }
         }
     }
     if (BadaoEliseHelper.CanUseQHuman())
     {
         var target = TargetSelector.GetTarget(BadaoMainVariables.Q.Range, TargetSelector.DamageType.Magical);
         if (target.BadaoIsValidTarget() && BadaoEliseSpellsManager.IsHuman)
         {
             BadaoMainVariables.Q.Cast(target);
         }
     }
     if (BadaoEliseHelper.CanUseWHuman())
     {
         var target = TargetSelector.GetTarget(BadaoMainVariables.W.Range, TargetSelector.DamageType.Magical);
         if (target.BadaoIsValidTarget() && BadaoEliseSpellsManager.IsHuman)
         {
             BadaoMainVariables.W.Cast(target);
         }
     }
     if (BadaoEliseHelper.CanUseQSpider())
     {
         var target = TargetSelector.GetTarget(BadaoMainVariables.Q2.Range, TargetSelector.DamageType.Magical);
         if (target.BadaoIsValidTarget() && !BadaoEliseSpellsManager.IsHuman)
         {
             BadaoMainVariables.Q2.Cast(target);
         }
     }
     if (BadaoEliseHelper.UseE2Combo())
     {
         var target = TargetSelector.GetTarget(BadaoMainVariables.E2.Range, TargetSelector.DamageType.Magical);
         if (target.BadaoIsValidTarget() && !BadaoEliseSpellsManager.IsHuman &&
             target.Position.To2D().Distance(ObjectManager.Player.Position.To2D()) > BadaoMainVariables.Q2.Range)
         {
             BadaoMainVariables.E2.Cast(target);
         }
     }
     if (BadaoEliseHelper.UseRCombo())
     {
         if (BadaoEliseSpellsManager.IsHuman)
         {
             var targetQ = TargetSelector.GetTarget(BadaoMainVariables.Q.Range, TargetSelector.DamageType.Magical);
             var targetW = TargetSelector.GetTarget(BadaoMainVariables.W.Range, TargetSelector.DamageType.Magical);
             var targetE = TargetSelector.GetTarget(BadaoMainVariables.E.Range, TargetSelector.DamageType.Magical);
             if ((!BadaoEliseHelper.CanUseQHuman() || !targetQ.BadaoIsValidTarget()) &&
                 (!BadaoEliseHelper.CanUseWHuman() || !targetW.BadaoIsValidTarget() ||
                  BadaoMainVariables.W.GetPrediction(targetW).Hitchance < HitChance.Medium) &&
                 (!BadaoEliseHelper.UseE1Combo() || !targetE.BadaoIsValidTarget() ||
                  BadaoMainVariables.E.GetPrediction(targetW).Hitchance < HitChance.Medium))
             {
                 var target = TargetSelector.GetTarget(BadaoMainVariables.E2.Range, TargetSelector.DamageType.Magical);
                 if (BadaoEliseHelper.UseE2Combo() || (BadaoEliseHelper.CanUseQSpider() &&
                                                       target.Position.To2D().Distance(ObjectManager.Player.Position.To2D()) <= BadaoMainVariables.Q2.Range))
                 {
                     BadaoMainVariables.R.Cast();
                 }
             }
         }
         if (!BadaoEliseSpellsManager.IsHuman)
         {
             var targetQ = TargetSelector.GetTarget(BadaoMainVariables.Q2.Range, TargetSelector.DamageType.Magical);
             var targetE = TargetSelector.GetTarget(BadaoMainVariables.E2.Range, TargetSelector.DamageType.Magical);
             if (!(BadaoEliseHelper.CanUseQSpider() && targetQ.BadaoIsValidTarget()) &&
                 !(BadaoEliseHelper.CanUseESpider() && targetE.BadaoIsValidTarget()))
             {
                 var targetEH = TargetSelector.GetTarget(BadaoMainVariables.E.Range, TargetSelector.DamageType.Magical);
                 var targetQH = TargetSelector.GetTarget(BadaoMainVariables.Q.Range, TargetSelector.DamageType.Magical);
                 var targetWH = TargetSelector.GetTarget(BadaoMainVariables.W.Range, TargetSelector.DamageType.Magical);
                 if ((
                         targetEH.BadaoIsValidTarget() &&
                         BadaoMainVariables.E.GetPrediction(targetEH).Hitchance >= HitChance.Medium &&
                         BadaoEliseHelper.UseE1Combo()) ||
                     (targetQH.BadaoIsValidTarget() &&
                      BadaoMainVariables.Q.IsInRange(targetQH) &&
                      BadaoEliseHelper.CanUseQHuman()) ||
                     (targetWH.BadaoIsValidTarget() &&
                      BadaoEliseHelper.CanUseWHuman() &&
                      BadaoMainVariables.W.IsInRange(targetWH) &&
                      BadaoMainVariables.W.GetPrediction(targetWH).Hitchance >= HitChance.Medium))
                 {
                     BadaoMainVariables.R.Cast();
                 }
             }
         }
     }
 }