Example #1
0
 private static void CastE(List<Obj_AI_Minion> minions = null)
 {
     if (!E.IsReady() || (Passive == 2 && (IsEOne || Variables.TickCount - E.LastCastAttemptT <= 2500)))
     {
         return;
     }
     if (IsEOne)
     {
         var count = minions?.Count(i => i.IsValidTarget(E.Range))
                     ?? Variables.TargetSelector.GetTargets(E.Range, E.DamageType, false).Count;
         if (Player.Mana >= 70 ? count > 0 : count > 2)
         {
             E.Cast();
         }
     }
     else
     {
         if (minions != null)
         {
             var minion = minions.Where(i => i.IsValidTarget(E2.Range) && HaveE(i)).ToList();
             if (minion.Any(i => CanE2(i, true)) || Passive == -1)
             {
                 E.Cast();
             }
         }
         else
         {
             var target =
                 Variables.TargetSelector.GetTargets(E2.Range, E.DamageType, false).Where(HaveE).ToList();
             if (target.Any(i => CanE2(i) || i.DistanceToPlayer() > i.GetRealAutoAttackRange() + 50)
                 || target.Count > 2 || Passive == -1)
             {
                 E.Cast();
             }
         }
     }
 }
Example #2
0
 public decimal? GetYearPrice(List<decimal> totalPrice)
 {
     return totalPrice?.Count();
 }
Example #3
0
 public static int? GetCount(List<int> l)
 {
     return l?.Count();
 }