Esempio n. 1
0
 public static double GetPassiveDamage(this Obj_AI_Base target, int?passiveCount = null)
 {
     return(passiveCount ??
            target.CountPassive() *
            (.03f +
             (Math.Min(
                  Math.Max(
                      .028f,
                      (.027 +
                       .001f * ObjectManager.Player.Level * ObjectManager.Player.FlatPhysicalDamageMod / 100f)),
                  .45f))) * target.MaxHealth);
 }
Esempio n. 2
0
        public static bool CastQ(Obj_AI_Base target, bool force = false)
        {
            if (!Q.IsReady() || !target.IsValidTarget(Q.Range))
            {
                return(false);
            }


            var forcePassive = Menu.Item("QForcePassive").IsActive() && !force;
            var predicted    = Prediction.GetPrediction(target, Q.Delay);
            var condition    = predicted.Hitchance > HitChance.High && Q.IsInRange(predicted.UnitPosition);

            if (target.CountPassive() == 0)
            {
                if (forcePassive)
                {
                    //  Console.WriteLine("NO PASSIVE");
                    return(false);
                }

                return(condition && Q.Cast(predicted.UnitPosition));
            }

            var pos = target.GetPassivePosition();

            if (pos.Equals(Vector3.Zero))
            {
                if (forcePassive)
                {
                    // Console.WriteLine("CAN'T FIND PASSIVE POS");
                    return(false);
                }
                return(condition && Q.Cast(predicted.UnitPosition));
            }

            if (Player.Distance(pos) > Q.Range)
            {
                if (forcePassive)
                {
                    // Console.WriteLine("PASSIVE OUT OF RANGE");
                    return(false);
                }
                return(condition && Q.Cast(predicted.UnitPosition));
            }
            return(Q.Cast(pos));
        }
Esempio n. 3
0
        public static double GetPassiveDamage(this Obj_AI_Base target)
        {
            var count = target.CountPassive();

            return(count == 0 ? 0 : GetPassiveDamage(target, count));
        }
Esempio n. 4
0
        public static bool CastQ(Obj_AI_Base target, bool force = false)
        {
            if (!Q.IsReady() || !target.IsValidTarget(Q.Range))
            {
                return false;
            }

            var forcePassive = Menu.Item("QForcePassive").IsActive() && !force;
            var predicted = Prediction.GetPrediction(target, Q.Delay);
            var condition = predicted.Hitchance > HitChance.High && Q.IsInRange(predicted.UnitPosition);

            if (target.CountPassive() == 0)
            {
                if (forcePassive)
                {
                    //  Console.WriteLine("NO PASSIVE");
                    return false;
                }

                return condition && Q.Cast(predicted.UnitPosition);
            }

            var pos = target.GetPassivePosition();
            if (pos.Equals(Vector3.Zero))
            {
                if (forcePassive)
                {
                    // Console.WriteLine("CAN'T FIND PASSIVE POS");
                    return false;
                }
                return condition && Q.Cast(predicted.UnitPosition);
            }

            if (Player.Distance(pos) > Q.Range)
            {
                if (forcePassive)
                {
                    // Console.WriteLine("PASSIVE OUT OF RANGE");
                    return false;
                }
                return condition && Q.Cast(predicted.UnitPosition);
            }
            return Q.Cast(pos);
        }