Exemple #1
0
        public static void FarmSelfAoe(Spell spell,
                                       int minHit                 = 3,
                                       float overrideWidth        = -1f,
                                       List <Obj_AI_Base> minions = null)
        {
            if (!spell.IsReady())
            {
                return;
            }
            var spellWidth = overrideWidth > 0 ? overrideWidth : (spell.Width > 25f ? spell.Width : spell.Range);

            if (minions == null)
            {
                minions = MinionManager.GetMinions(
                    spellWidth, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
            }

            if (minions.Count == 0)
            {
                return;
            }

            if (minHit > 1)
            {
                var nearest = minions.OrderBy(m => m.Distance(ObjectManager.Player)).FirstOrDefault();
                if (nearest != null && nearest.Team == GameObjectTeam.Neutral)
                {
                    minHit = 1;
                }
            }
            if (minions.Count >= minHit)
            {
                spell.Cast();
            }
        }
Exemple #2
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 825f, DamageType.Magical);
            Q.SetSkillshot(0.13f, 115f, 1400f, false, SkillshotType.SkillshotCircle);

            W = new Spell(SpellSlot.W, float.MaxValue, DamageType.Magical);
            W.SetSkillshot(0f, 220f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 1095f, DamageType.Magical);
            E.SetSkillshot(0.25f, 125f, 1700f, false, SkillshotType.SkillshotLine);

            R = new Spell(SpellSlot.R, float.MaxValue, DamageType.Magical);
            R.SetSkillshot(0.75f, 375f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            Ultimate = new UltimateManager
            {
                Combo = true,
                Assisted = true,
                Auto = true,
                Flash = true,
                Required = true,
                Force = true,
                Gapcloser = false,
                GapcloserDelay = false,
                Interrupt = true,
                InterruptDelay = false,
                Spells = Spells,
                DamageCalculation =
                    (hero, resMulti, rangeCheck) =>
                        CalcComboDamage(
                            hero, resMulti, rangeCheck, Menu.Item(Menu.Name + ".combo.q").GetValue<bool>(),
                            Menu.Item(Menu.Name + ".combo.w").GetValue<bool>(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue<bool>(), true)
            };
        }
Exemple #3
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 925f);
            Q.SetSkillshot(0.25f, 70f, 1800f, false, SkillshotType.SkillshotLine);
            Q.SetCharged("VarusQ", "VarusQ", 925, 1700, 1.5f);

            W = new Spell(SpellSlot.W, 0f, DamageType.Magical);

            E = new Spell(SpellSlot.E, 950f);
            E.SetSkillshot(0.25f, 250f, 1500f, false, SkillshotType.SkillshotCircle);

            R = new Spell(SpellSlot.R, 1075f);
            R.SetSkillshot(0.25f, 120f, 1950f, false, SkillshotType.SkillshotLine);

            Ultimate = new UltimateManager
            {
                Combo             = true,
                Assisted          = true,
                Auto              = true,
                Flash             = false,
                Required          = true,
                Force             = true,
                Gapcloser         = true,
                GapcloserDelay    = false,
                Interrupt         = false,
                InterruptDelay    = false,
                Spells            = Spells,
                DamageCalculation =
                    (hero, resMulti, rangeCheck) =>
                    CalcComboDamage(
                        hero, resMulti, rangeCheck, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>(),
                        Menu.Item(Menu.Name + ".combo.e").GetValue <bool>(), true)
            };
        }
Exemple #4
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 850f);
            Q.SetSkillshot(0.25f, 60f, 2000f, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 900f, DamageType.Magical);
            W.SetSkillshot(0.35f, 250f, 1650f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 425f);

            R = new Spell(SpellSlot.R, 1100f);
            R.SetSkillshot(0.25f, 110f, 2100f, false, SkillshotType.SkillshotLine);

            R2 = new Spell(SpellSlot.R, 700f);
            R2.SetSkillshot(0f, 110f, 1500f, false, SkillshotType.SkillshotCone);

            Ultimate = new UltimateManager
            {
                Combo             = true,
                Assisted          = true,
                Auto              = true,
                Flash             = false,
                Required          = true,
                Force             = true,
                Gapcloser         = false,
                GapcloserDelay    = false,
                Interrupt         = false,
                InterruptDelay    = false,
                Spells            = Spells,
                DamageCalculation =
                    (hero, resMulti, rangeCheck) =>
                    CalcComboDamage(
                        hero, resMulti, rangeCheck, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>(), true)
            };
        }
Exemple #5
0
        /// <summary>
        /// Sets up the spells
        /// </summary>
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q);
            Q.SetSkillshot(0.5f, 100f, Player.BasicAttack.MissileSpeed, false, SkillshotType.SkillshotCircle);

            W = new Spell(SpellSlot.W, 1450f);
            W.SetSkillshot(0.6f, 60f, 3300f, true, SkillshotType.SkillshotLine);

            E = new Spell(SpellSlot.E, 900f);
            E.SetSkillshot(0.3f, 120f, 3300f, false, SkillshotType.SkillshotCircle); // We don't set the delay to it's correct value as the prediction messes around.

            R = new Spell(SpellSlot.R, 3200f);
            R.SetSkillshot(0.6f, 140f, 1700f, true, SkillshotType.SkillshotLine);

            UltimateExplosion = new Spell(SpellSlot.R, 300f);
            UltimateExplosion.SetSkillshot(0f, 300f, 1500f, false, SkillshotType.SkillshotCircle);

            _ultimateManager = new UltimateManager
            {
                Combo             = true,
                Assisted          = true,
                Auto              = true,
                Flash             = false,
                Required          = true,
                Force             = true,
                Gapcloser         = false,
                GapcloserDelay    = false,
                Interrupt         = false,
                InterruptDelay    = false,
                Spells            = Spells,
                DamageCalculation = (hero, resMulti, rangeCheck) => CalculateComboDamage(hero, rangeCheck, true)
            };
        }
Exemple #6
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 925f);
            Q.SetSkillshot(0.25f, 70f, 1800f, false, SkillshotType.SkillshotLine);
            Q.SetCharged("VarusQ", "VarusQ", 925, 1700, 1.5f);

            W = new Spell(SpellSlot.W, 0f, DamageType.Magical);

            E = new Spell(SpellSlot.E, 950f);
            E.SetSkillshot(0.25f, 250f, 1500f, false, SkillshotType.SkillshotCircle);

            R = new Spell(SpellSlot.R, 1075f);
            R.SetSkillshot(0.25f, 120f, 1950f, false, SkillshotType.SkillshotLine);

            Ultimate = new UltimateManager
            {
                Combo = true,
                Assisted = true,
                Auto = true,
                Flash = false,
                Required = true,
                Force = true,
                Gapcloser = true,
                GapcloserDelay = false,
                Interrupt = false,
                InterruptDelay = false,
                Spells = Spells,
                DamageCalculation =
                    (hero, resMulti, rangeCheck) =>
                        CalcComboDamage(
                            hero, resMulti, rangeCheck, Menu.Item(Menu.Name + ".combo.q").GetValue<bool>(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue<bool>(), true)
            };
        }
Exemple #7
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 850f);
            Q.SetSkillshot(0.25f, 60f, 2000f, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 900f, DamageType.Magical);
            W.SetSkillshot(0.35f, 250f, 1650f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 425f);

            R = new Spell(SpellSlot.R, 1100f);
            R.SetSkillshot(0.25f, 110f, 2100f, false, SkillshotType.SkillshotLine);

            R2 = new Spell(SpellSlot.R, 700f);
            R2.SetSkillshot(0f, 110f, 1500f, false, SkillshotType.SkillshotCone);

            Ultimate = new UltimateManager
            {
                Combo = true,
                Assisted = true,
                Auto = true,
                Flash = false,
                Required = true,
                Force = true,
                Gapcloser = false,
                GapcloserDelay = false,
                Interrupt = false,
                InterruptDelay = false,
                Spells = Spells,
                DamageCalculation =
                    (hero, resMulti, rangeCheck) =>
                        CalcComboDamage(
                            hero, resMulti, rangeCheck, Menu.Item(Menu.Name + ".combo.q").GetValue<bool>(), true)
            };
        }
Exemple #8
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 600f, DamageType.Magical);
            Q.Range += GameObjects.EnemyHeroes.Select(e => e.BoundingRadius).DefaultIfEmpty(50).Min();
            Q.SetTargetted(0.25f, Q.Instance.SData.MissileSpeed);

            W = new Spell(SpellSlot.W, 175f, DamageType.Magical);

            E = new Spell(SpellSlot.E, 600f, DamageType.Magical) { Delay = 0.25f, Width = 600f };

            R = new Spell(SpellSlot.R, 700f, DamageType.Magical);
            R.SetSkillshot(0.25f, 175f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            Ultimate = new UltimateManager
            {
                Combo = true,
                Assisted = true,
                Auto = true,
                Flash = false,
                Required = true,
                Force = true,
                Gapcloser = false,
                GapcloserDelay = false,
                Interrupt = false,
                InterruptDelay = false,
                Spells = Spells,
                DamageCalculation =
                    (hero, resMulti, rangeCheck) =>
                        CalcComboDamage(
                            hero, rangeCheck, Menu.Item(Menu.Name + ".combo.q").GetValue<bool>(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue<bool>(), true)
            };
        }
Exemple #9
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, Player.BoundingRadius + 600f, DamageType.Magical);
            Q.Range += GameObjects.EnemyHeroes.Select(e => e.BoundingRadius).DefaultIfEmpty(25).Min();
            Q.SetTargetted(0.15f, 2050f);

            W = new Spell(SpellSlot.W, 700f, DamageType.Magical);
            W.SetSkillshot(1f, 300f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 525f, DamageType.Magical);
            E.SetSkillshot(0f, 90f, 800f, false, SkillshotType.SkillshotLine);

            R = new Spell(SpellSlot.R, 700f, DamageType.Magical);
            R.SetSkillshot(0.2f, 300f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            Ultimate = new UltimateManager
            {
                Combo = true,
                Assisted = true,
                Auto = true,
                Flash = false,
                Required = true,
                Force = true,
                Gapcloser = false,
                GapcloserDelay = false,
                Interrupt = true,
                InterruptDelay = true,
                DamageCalculation =
                    (hero, resMulti, rangeCheck) =>
                        CalcComboDamage(
                            hero, resMulti, rangeCheck, Menu.Item(Menu.Name + ".combo.q").GetValue<bool>(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue<bool>(), true)
            };
        }
Exemple #10
0
 private bool SpellCollision(Spell spell, Obj_AI_Base target)
 {
     return
         (spell.GetCollision(Player.ServerPosition.To2D(), new List <Vector2> {
         target.ServerPosition.To2D()
     })
          .Any(c => c.NetworkId != target.NetworkId));
 }
Exemple #11
0
        public static void TargetSkill(Obj_AI_Base target, Spell spell)
        {
            if (!spell.IsReady() || target == null)
            {
                return;
            }

            spell.CastOnUnit(target);
        }
Exemple #12
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 850f);
            Q.SetSkillshot(0.25f, 90f, 1350f, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 800f);
            E = new Spell(SpellSlot.E);
            R = new Spell(SpellSlot.R, 1100f);
        }
Exemple #13
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 850f);
            Q.SetSkillshot(0.25f, 90f, 1350f, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 800f);
            E = new Spell(SpellSlot.E);
            R = new Spell(SpellSlot.R, 1100f);
        }
Exemple #14
0
 public static Result Line(Spell spell,
                           Obj_AI_Hero target,
                           HitChance hitChance,
                           bool boundingRadius = true,
                           bool maxRange       = true)
 {
     try
     {
         if (spell == null || target == null)
         {
             return(new Result(Vector3.Zero, new List <Obj_AI_Hero>()));
         }
         var range = (spell.IsChargedSpell && maxRange ? spell.ChargedMaxRange : spell.Range) +
                     spell.Width * 0.9f +
                     (boundingRadius ? target.BoundingRadius * BoundingRadiusMultiplicator : 0);
         var positions = (from t in GameObjects.EnemyHeroes
                          where t.IsValidTarget(range, true, spell.RangeCheckFrom)
                          let prediction = spell.GetPrediction(t)
                                           where prediction.Hitchance >= hitChance
                                           select new Position(t, prediction.UnitPosition)).ToList();
         if (positions.Any())
         {
             var hits = new List <Obj_AI_Hero>();
             var pred = spell.GetPrediction(target);
             if (pred.Hitchance >= hitChance)
             {
                 hits.Add(target);
                 var rect = new Geometry.Polygon.Rectangle(
                     spell.From, spell.From.Extend(pred.CastPosition, range), spell.Width);
                 if (boundingRadius)
                 {
                     hits.AddRange(
                         from point in positions.Where(p => p.Hero.NetworkId != target.NetworkId)
                         let circle =
                             new Geometry.Polygon.Circle(
                                 point.UnitPosition, point.Hero.BoundingRadius * BoundingRadiusMultiplicator)
                             where circle.Points.Any(p => rect.IsInside(p))
                             select point.Hero);
                 }
                 else
                 {
                     hits.AddRange(
                         from position in positions
                         where rect.IsInside(position.UnitPosition)
                         select position.Hero);
                 }
                 return(new Result(pred.CastPosition, hits));
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(new Result(Vector3.Zero, new List <Obj_AI_Hero>()));
 }
Exemple #15
0
        private static void ConeFarm(Spell spell, List <Obj_AI_Base> minions, int min, float overrideWidth = -1f)
        {
            var spellWidth = overrideWidth > 0 ? overrideWidth : spell.Width;
            var pred       = spell.GetCircularFarmLocation(minions, spellWidth);

            if (pred.MinionsHit >= min)
            {
                spell.Cast(pred.Position);
            }
        }
Exemple #16
0
 public static void FarmSelfAoe(Spell spell, List <Obj_AI_Base> minions, int minHit = 3, float overrideWidth = -1f)
 {
     if (!spell.IsReady() || minions.Count == 0)
     {
         return;
     }
     if (minions.Count >= minHit)
     {
         spell.Cast();
     }
 }
Exemple #17
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 1150f);
            Q.SetSkillshot(0.25f, 40f, 1200f, true, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 5000f);

            E = new Spell(SpellSlot.E, 950f);

            R = new Spell(SpellSlot.R, 1200f);
        }
 public static Obj_AI_Hero GetTarget(this Spell spell,
                                     bool ignoreShields = true,
                                     Vector3 from       = new Vector3(),
                                     IEnumerable <Obj_AI_Hero> ignoredChampions = null)
 {
     return
         (GetTarget(
              (spell.Range + spell.Width +
               Targets.Items.Select(e => e.Hero.BoundingRadius).DefaultIfEmpty(50).Max()) * 1.1f, spell.DamageType,
              ignoreShields, from, ignoredChampions));
 }
Exemple #19
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 1050);
            Q.SetSkillshot(0.125f, 50, 1650, true, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 900);

            E = new Spell(SpellSlot.E);

            R = new Spell(SpellSlot.R, 500);
        }
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 1450f, DamageType.Magical);
            Q.SetSkillshot(0.25f, 40f, 1000f, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 550f, DamageType.Magical);
            W.SetSkillshot(0.5f, 100f, Player.BasicAttack.MissileSpeed, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E);

            R = new Spell(SpellSlot.R, 5500f);
        }
Exemple #21
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 1450f, DamageType.Magical);
            Q.SetSkillshot(0.25f, 40f, 1000f, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 550f, DamageType.Magical);
            W.SetSkillshot(0.5f, 100f, Player.BasicAttack.MissileSpeed, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E);

            R = new Spell(SpellSlot.R, 5500f);
        }
Exemple #22
0
        /// <summary>
        /// Setups the spells.
        /// </summary>
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 590f);
            Q.SetTargetted(0.25f, 2200f);

            W = new Spell(SpellSlot.W);

            E = new Spell(SpellSlot.E, 950f);
            E.SetSkillshot(0.15f, 40, float.MaxValue, false, SkillshotType.SkillshotCircle);

            R = new Spell(SpellSlot.R);
            R.SetSkillshot(1f, 100, float.MaxValue, false, SkillshotType.SkillshotCircle);
        }
Exemple #23
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 925f);
            Q.SetSkillshot(0.25f, 70f, 1800f, false, SkillshotType.SkillshotLine);
            Q.SetCharged("VarusQ", "VarusQ", 925, 1700, 1.5f);

            W = new Spell(SpellSlot.W, 0f, DamageType.Magical);

            E = new Spell(SpellSlot.E, 950f);
            E.SetSkillshot(0.25f, 250f, 1500f, false, SkillshotType.SkillshotCircle);

            R = new Spell(SpellSlot.R, 1075f);
            R.SetSkillshot(0.25f, 120f, 1950f, false, SkillshotType.SkillshotLine);
        }
Exemple #24
0
        protected override void SetupSpells()
        {
            Q        = new Spell(SpellSlot.Q, Player.BoundingRadius + 600f, DamageType.Magical);
            Q.Range += GameObjects.EnemyHeroes.Select(e => e.BoundingRadius).DefaultIfEmpty(50).Average();
            Q.SetTargetted(0.5f, 1800f);

            W = new Spell(SpellSlot.W, 700f, DamageType.Magical);
            W.SetSkillshot(1.6f, 300f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 525f, DamageType.Magical);
            E.SetSkillshot(0f, 90f, 800f, false, SkillshotType.SkillshotLine);

            R = new Spell(SpellSlot.R, 700f, DamageType.Magical);
            R.SetSkillshot(0.2f, 300f, float.MaxValue, false, SkillshotType.SkillshotCircle);
        }
Exemple #25
0
        protected override void SetupSpells()
        {
            Q        = new Spell(SpellSlot.Q, 600f, DamageType.Magical);
            Q.Range += GameObjects.EnemyHeroes.Select(e => e.BoundingRadius).DefaultIfEmpty(50).Average();
            Q.SetTargetted(Q.Instance.SData.CastFrame / 30f, Q.Instance.SData.MissileSpeed);

            W = new Spell(SpellSlot.W, 175f, DamageType.Magical);

            E       = new Spell(SpellSlot.E, 600f, DamageType.Magical);
            E.Delay = E.Instance.SData.CastFrame / 30f;
            E.Width = E.Range;

            R = new Spell(SpellSlot.R, 700f, DamageType.Magical);
            R.SetSkillshot(0.25f, 175f, float.MaxValue, false, SkillshotType.SkillshotCircle);
        }
Exemple #26
0
 public static HitChance GetHitChance(this Spell spell, string uniqueId)
 {
     try
     {
         if (spell != null && spell.Slot != SpellSlot.Unknown)
         {
             return(Get(uniqueId, spell.Slot.ToString()));
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(HitChance.High);
 }
Exemple #27
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 850f, DamageType.Magical);
            Q.SetSkillshot(0.4f, 60f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            W = new Spell(SpellSlot.W, 850f, DamageType.Magical);
            W.SetSkillshot(0.7f, 125f, 2500f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 700f, DamageType.Magical);
            E.SetTargetted(0.2f, 1700f);
            E.Collision = true;

            R = new Spell(SpellSlot.R, 825f, DamageType.Magical);
            R.SetSkillshot(0.8f, (float)(80 * Math.PI / 180), float.MaxValue, false, SkillshotType.SkillshotCone);
        }
Exemple #28
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 850f);
            Q.SetSkillshot(0.25f, 15f * (float)Math.PI / 180, 2000f, false, SkillshotType.SkillshotCone);

            W = new Spell(SpellSlot.W, 900f, DamageType.Magical);
            W.SetSkillshot(0.35f, 250f, 1650f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 425f);

            R = new Spell(SpellSlot.R, 1100f);
            R.SetSkillshot(0.25f, 110f, 2100f, false, SkillshotType.SkillshotLine);

            R2 = new Spell(SpellSlot.R, 750f);
            R2.SetSkillshot(0f, (float)(60 * Math.PI / 180), 1500f, false, SkillshotType.SkillshotCone);
        }
Exemple #29
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 980f, DamageType.Magical);
            Q.SetSkillshot(0.25f, 50f, 2000f, true, SkillshotType.SkillshotLine);

            W = new Spell(
                SpellSlot.W,
                Player.AttackRange + Player.BoundingRadius +
                GameObjects.EnemyHeroes.Select(e => e.BoundingRadius).DefaultIfEmpty(30).Min(), DamageType.Magical);

            E = new Spell(SpellSlot.E, 1200f, DamageType.Magical);
            E.SetSkillshot(0.25f, 120f, 1400f, false, SkillshotType.SkillshotLine);

            R = new Spell(SpellSlot.R, 1200f, DamageType.Magical);
            R.SetSkillshot(1.5f, 200f, float.MaxValue, false, SkillshotType.SkillshotCircle);
        }
Exemple #30
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 980f, DamageType.Magical);
            Q.SetSkillshot(0.25f, 50f, 2000f, true, SkillshotType.SkillshotLine);

            W = new Spell(
                SpellSlot.W,
                Player.AttackRange + Player.BoundingRadius +
                GameObjects.EnemyHeroes.Select(e => e.BoundingRadius).DefaultIfEmpty(50).Average(), DamageType.Magical);

            E = new Spell(SpellSlot.E, 1200f, DamageType.Magical);
            E.SetSkillshot(0.25f, 120f, 1400f, false, SkillshotType.SkillshotLine);

            R = new Spell(SpellSlot.R, 1200f, DamageType.Magical);
            R.SetSkillshot(1.5f, 200f, float.MaxValue, false, SkillshotType.SkillshotCircle);
        }
Exemple #31
0
        public static void Farm(Spell spell,
            int minHit = 3,
            float overrideWidth = -1f,
            bool chargeMax = true,
            List<Obj_AI_Base> minions = null)
        {
            if (!spell.IsReady())
            {
                return;
            }
            var spellWidth = overrideWidth > 0 ? overrideWidth : spell.Width;

            if (minions == null)
            {
                minions =
                    MinionManager.GetMinions(
                        (((chargeMax && spell.IsChargedSpell ? spell.ChargedMaxRange : spell.Range) + spellWidth) * 1.5f),
                        MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
            }

            if (minions.Count == 0)
            {
                return;
            }

            if (minHit > 1)
            {
                var nearest = minions.OrderBy(m => m.Distance(ObjectManager.Player)).FirstOrDefault();
                if (nearest != null && nearest.Team == GameObjectTeam.Neutral)
                {
                    minHit = 1;
                }
            }

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                CircleFarm(spell, minions, minHit, overrideWidth);
            }
            else if (spell.Type == SkillshotType.SkillshotLine)
            {
                LineFarm(spell, minions, minHit, overrideWidth);
            }
            else if (spell.Type == SkillshotType.SkillshotCone)
            {
                ConeFarm(spell, minions, minHit, overrideWidth);
            }
        }
Exemple #32
0
        public static void Farm(Spell spell,
                                int minHit                 = 3,
                                float overrideWidth        = -1f,
                                bool chargeMax             = true,
                                List <Obj_AI_Base> minions = null)
        {
            if (!spell.IsReady())
            {
                return;
            }
            var spellWidth = overrideWidth > 0 ? overrideWidth : spell.Width;

            if (minions == null)
            {
                minions =
                    MinionManager.GetMinions(
                        (((chargeMax && spell.IsChargedSpell ? spell.ChargedMaxRange : spell.Range) + spellWidth) * 1.5f),
                        MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
            }

            if (minions.Count == 0)
            {
                return;
            }

            if (minHit > 1)
            {
                var nearest = minions.OrderBy(m => m.Distance(ObjectManager.Player)).FirstOrDefault();
                if (nearest != null && nearest.Team == GameObjectTeam.Neutral)
                {
                    minHit = 1;
                }
            }

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                CircleFarm(spell, minions, minHit, overrideWidth);
            }
            else if (spell.Type == SkillshotType.SkillshotLine)
            {
                LineFarm(spell, minions, minHit, overrideWidth);
            }
            else if (spell.Type == SkillshotType.SkillshotCone)
            {
                ConeFarm(spell, minions, minHit, overrideWidth);
            }
        }
Exemple #33
0
 public static Obj_AI_Hero GetTargetNoCollision(Spell spell,
                                                bool ignoreShields = true,
                                                Vector3 from       = default(Vector3),
                                                IEnumerable <Obj_AI_Hero> ignoredChampions = null)
 {
     try
     {
         return
             (GetTargets(spell.Range, spell.DamageType, ignoreShields, from, ignoredChampions)
              .FirstOrDefault(t => spell.GetPrediction(t).Hitchance != HitChance.Collision));
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(null);
 }
Exemple #34
0
        private static void LineFarm(Spell spell, List <Obj_AI_Base> minions, int min, float overrideWidth = -1f)
        {
            if (!spell.IsReady() || minions.Count == 0)
            {
                return;
            }
            var spellWidth = overrideWidth > 0 ? overrideWidth : spell.Width;
            var totalHits  = 0;
            var castPos    = Vector3.Zero;

            var positions = (from minion in minions
                             let pred = spell.GetPrediction(minion)
                                        where pred.Hitchance >= HitChance.Medium
                                        select new Tuple <Obj_AI_Base, Vector3>(minion, pred.UnitPosition)).ToList();

            if (positions.Any())
            {
                foreach (var position in positions)
                {
                    var rect = new Geometry.Polygon.Rectangle(
                        ObjectManager.Player.Position, ObjectManager.Player.Position.Extend(position.Item2, spell.Range),
                        spellWidth);
                    var count =
                        positions.Select(
                            position2 =>
                            new Geometry.Polygon.Circle(position2.Item2, position2.Item1.BoundingRadius * 0.9f))
                        .Count(circle => circle.Points.Any(p => rect.IsInside(p)));
                    if (count > totalHits)
                    {
                        totalHits = count;
                        castPos   = position.Item2;
                    }
                    if (totalHits == minions.Count)
                    {
                        break;
                    }
                }
                if (!castPos.Equals(Vector3.Zero) && totalHits >= min)
                {
                    spell.Cast(castPos);
                }
            }
        }
Exemple #35
0
 public static void Farm(Spell spell,
                         List <Obj_AI_Base> minions,
                         int minHit          = 3,
                         float overrideWidth = -1f,
                         bool chargeMax      = true)
 {
     if (!spell.IsReady() || minions.Count == 0)
     {
         return;
     }
     if (spell.IsSkillshot)
     {
         if (spell.Collision)
         {
             minHit = 1;
         }
         if (spell.Type == SkillshotType.SkillshotCircle)
         {
             CircleFarm(spell, minions, minHit, overrideWidth);
         }
         else if (spell.Type == SkillshotType.SkillshotLine)
         {
             LineFarm(spell, minions, minHit, overrideWidth);
         }
         else if (spell.Type == SkillshotType.SkillshotCone)
         {
             ConeFarm(spell, minions, minHit, overrideWidth);
         }
     }
     else
     {
         var minion =
             minions.OrderBy(m => spell.IsKillable(m))
             .FirstOrDefault(
                 m =>
                 spell.IsInRange(m) && spell.GetDamage(m) > m.Health ||
                 m.Health - spell.GetDamage(m) > m.MaxHealth * 0.25f);
         if (minion != null)
         {
             spell.CastOnUnit(minion);
         }
     }
 }
Exemple #36
0
 private bool IsSpellUpgraded(Spell spell)
 {
     try
     {
         return
             (Player.Buffs.Select(b => b.Name.ToLower())
              .Where(b => b.StartsWith("viktor") && b.EndsWith("aug"))
              .Any(
                  b =>
                  spell.Slot == SpellSlot.R
                             ? b.Contains("qwe")
                             : b.Contains(spell.Slot.ToString().ToLower())));
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(false);
 }
Exemple #37
0
 public static Obj_AI_Hero GetTarget(Spell spell,
                                     bool ignoreShields = true,
                                     Vector3 from       = default(Vector3),
                                     IEnumerable <Obj_AI_Hero> ignoredChampions = null)
 {
     try
     {
         return
             (GetTarget(
                  (spell.Range + spell.Width +
                   Targets.Items.Select(e => e.Hero.BoundingRadius).DefaultIfEmpty(50).Max()) * 1.1f,
                  spell.DamageType, ignoreShields, from, ignoredChampions));
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(null);
 }
 public static bool Check(string uniqueId, Spell spell, Obj_AI_Hero hero)
 {
     try
     {
         if (hero == null || !Enabled(uniqueId))
         {
             return true;
         }
         var bestTarget = TargetSelector.GetTarget(spell);
         if (bestTarget == null || hero.NetworkId.Equals(bestTarget.NetworkId))
         {
             return true;
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return false;
 }
Exemple #39
0
 public static bool Check(string uniqueId, Spell spell, Obj_AI_Hero hero)
 {
     try
     {
         if (hero == null || !Enabled(uniqueId))
         {
             return(true);
         }
         var bestTarget = TargetSelector.GetTarget(spell);
         if (bestTarget == null || hero.NetworkId.Equals(bestTarget.NetworkId))
         {
             return(true);
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(false);
 }
Exemple #40
0
        private static void CircleFarm(Spell spell, List <Obj_AI_Base> minions, int min, float overrideWidth = -1f)
        {
            if (!spell.IsReady() || minions.Count == 0)
            {
                return;
            }
            var spellWidth = (overrideWidth > 0 ? overrideWidth : spell.Width) + minions.Average(m => m.BoundingRadius);
            var points     = (from minion in minions
                              select spell.GetPrediction(minion)
                              into pred
                              where pred.Hitchance >= HitChance.Medium
                              select pred.UnitPosition.To2D()).ToList();

            if (points.Any())
            {
                var possibilities = ListExtensions.ProduceEnumeration(points).Where(p => p.Count >= min).ToList();
                if (possibilities.Any())
                {
                    var hits   = 0;
                    var radius = float.MaxValue;
                    var pos    = Vector3.Zero;
                    foreach (var possibility in possibilities)
                    {
                        var mec = MEC.GetMec(possibility);
                        if (mec.Radius < spellWidth)
                        {
                            if (possibility.Count > hits || possibility.Count == hits && radius > mec.Radius)
                            {
                                hits   = possibility.Count;
                                radius = mec.Radius;
                                pos    = mec.Center.To3D();
                            }
                        }
                    }
                    if (hits >= min && !pos.Equals(Vector3.Zero))
                    {
                        spell.Cast(pos);
                    }
                }
            }
        }
 public static void Add(Spell spell, bool readyCheck = true)
 {
     try
     {
         if (_menu == null)
         {
             return;
         }
         _menu.AddItem(
             new MenuItem(_menu.Name + "." + spell.Slot, spell.Slot.ToString().ToUpper()).SetValue(false));
         if (readyCheck)
         {
             Functions.Add(spell.Slot.ToString(), hero => spell.IsReady() ? spell.GetDamage(hero) : 0);
         }
         else
         {
             Functions.Add(spell.Slot.ToString(), hero => spell.GetDamage(hero));
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemple #42
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 850f, DamageType.Magical);
            Q.SetSkillshot(0.3f, 50f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            W = new Spell(SpellSlot.W, 850f, DamageType.Magical);
            W.SetSkillshot(0.5f, 125f, 2500f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 700f, DamageType.Magical);
            E.SetTargetted(0.2f, 1700f);
            E.Collision = true;

            R = new Spell(SpellSlot.R, 825f, DamageType.Magical);
            R.SetSkillshot(0.8f, (float) (80 * Math.PI / 180), float.MaxValue, false, SkillshotType.SkillshotCone);

            Ultimate = new UltimateManager
            {
                Combo = true,
                Assisted = true,
                Auto = true,
                Flash = true,
                Required = true,
                Force = true,
                Gapcloser = true,
                GapcloserDelay = false,
                Interrupt = true,
                InterruptDelay = false,
                Spells = Spells,
                DamageCalculation =
                    (hero, resMulti, rangeCheck) =>
                        CalcComboDamage(
                            hero, resMulti, rangeCheck, Menu.Item(Menu.Name + ".combo.q").GetValue<bool>(),
                            Menu.Item(Menu.Name + ".combo.w").GetValue<bool>(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue<bool>(), true)
            };
        }
Exemple #43
0
        public static void SkillShot(Obj_AI_Hero target,
            Spell spell,
            HitChance hitChance,
            bool boundingRadius = true,
            bool maxRange = true)
        {
            if (!spell.IsReady() || target == null)
            {
                return;
            }

            if (spell.Type == SkillshotType.SkillshotLine)
            {
                var prediction = CPrediction.Line(spell, target, hitChance, boundingRadius, maxRange);
                if (prediction.TotalHits >= 1)
                {
                    spell.Cast(prediction.CastPosition);
                }
            }
            else if (spell.Type == SkillshotType.SkillshotCircle)
            {
                var prediction = CPrediction.Circle(spell, target, hitChance);
                if (prediction.TotalHits >= 1)
                {
                    spell.Cast(prediction.CastPosition);
                }
            }
            else
            {
                var prediction = spell.GetPrediction(target);
                if (prediction.Hitchance >= hitChance)
                {
                    spell.Cast(prediction.CastPosition);
                }
            }
        }
Exemple #44
0
        private static void LineFarm(Spell spell, List<Obj_AI_Base> minions, int min, float overrideWidth = -1f)
        {
            var spellWidth = overrideWidth > 0 ? overrideWidth : spell.Width;
            var totalHits = 0;
            var castPos = Vector3.Zero;

            var positions = (from minion in minions
                let pred = spell.GetPrediction(minion)
                where pred.Hitchance >= HitChance.Medium
                select new Tuple<Obj_AI_Base, Vector3>(minion, pred.UnitPosition)).ToList();

            if (positions.Any())
            {
                foreach (var position in positions)
                {
                    var rect = new Geometry.Polygon.Rectangle(
                        ObjectManager.Player.Position, ObjectManager.Player.Position.Extend(position.Item2, spell.Range),
                        spellWidth);
                    var count =
                        positions.Select(
                            position2 =>
                                new Geometry.Polygon.Circle(position2.Item2, position2.Item1.BoundingRadius * 0.9f))
                            .Count(circle => circle.Points.Any(p => rect.IsInside(p)));
                    if (count > totalHits)
                    {
                        totalHits = count;
                        castPos = position.Item2;
                    }
                    if (totalHits == minions.Count)
                    {
                        break;
                    }
                }
                if (!castPos.Equals(Vector3.Zero) && totalHits >= min)
                {
                    spell.Cast(castPos);
                }
            }
        }
Exemple #45
0
 private static void ConeFarm(Spell spell, List<Obj_AI_Base> minions, int min, float overrideWidth = -1f)
 {
     var spellWidth = overrideWidth > 0 ? overrideWidth : spell.Width;
     var pred = spell.GetCircularFarmLocation(minions, spellWidth);
     if (pred.MinionsHit >= min)
     {
         spell.Cast(pred.Position);
     }
 }
Exemple #46
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, Player.BoundingRadius + 600f, DamageType.Magical);
            Q.Range += GameObjects.EnemyHeroes.Select(e => e.BoundingRadius).DefaultIfEmpty(50).Average();
            Q.SetTargetted(0.5f, 1800f);

            W = new Spell(SpellSlot.W, 700f, DamageType.Magical);
            W.SetSkillshot(1.6f, 300f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 525f, DamageType.Magical);
            E.SetSkillshot(0f, 90f, 800f, false, SkillshotType.SkillshotLine);

            R = new Spell(SpellSlot.R, 700f, DamageType.Magical);
            R.SetSkillshot(0.2f, 300f, float.MaxValue, false, SkillshotType.SkillshotCircle);
        }
Exemple #47
0
 private void EComboLogic(Spell spell)
 {
     try
     {
         Obj_AI_Hero hero = null;
         var totalHits = 0;
         foreach (var ally in
             GameObjects.AllyHeroes.Where(
                 a =>
                     (Ball.Hero == null || Ball.Hero.NetworkId != a.NetworkId) && a.Distance(Player) <= E.Range &&
                     (a.IsMe || Menu.Item(Menu.Name + ".miscellaneous.e-allies").GetValue<bool>()) &&
                     (a.IsMe && ManaManager.Check("e-self") || !a.IsMe && ManaManager.Check("e-allies"))))
         {
             var hits = GameObjects.EnemyHeroes.Count(e => e.Distance(ally) < spell.Range);
             if (hits > totalHits)
             {
                 totalHits = hits;
                 hero = ally;
             }
         }
         if (totalHits > 0)
         {
             E.CastOnUnit(hero);
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemple #48
0
        private Tuple<int, List<Obj_AI_Hero>> GetHits(Spell spell,
            float overrideWidth = -1f,
            Vector3 fromCheck = default(Vector3))
        {
            try
            {
                if (fromCheck.Equals(default(Vector3)))
                {
                    fromCheck = Ball.Position;
                }

                var input = new PredictionInput
                {
                    Collision = true,
                    CollisionObjects = new[] { CollisionableObjects.YasuoWall },
                    From = fromCheck,
                    RangeCheckFrom = fromCheck,
                    Type = spell.Type,
                    Radius = spell.Width,
                    Delay = spell.Delay,
                    Speed = spell.Speed,
                    Range = spell.Range,
                    Aoe = true
                };

                var width = overrideWidth > 0 ? overrideWidth : spell.Width;
                var hits = new List<Obj_AI_Hero>();
                var positions = new List<CPrediction.Position>();
                foreach (var t in GameObjects.EnemyHeroes)
                {
                    if (t.IsValidTarget(width * 4, true, fromCheck))
                    {
                        input.Unit = t;
                        var prediction = Prediction.GetPrediction(input);
                        if (prediction.Hitchance >= HitChance.High)
                        {
                            if (Utils.IsImmobile(t) || Utils.IsSlowed(t) || t.Distance(fromCheck) < spell.Width * 0.75 ||
                                t.Distance(fromCheck) < spell.Width &&
                                (fromCheck.Distance(Ball.Position) > 100 || t.IsFacing(fromCheck, 120f)))
                            {
                                positions.Add(new CPrediction.Position(t, prediction.UnitPosition));
                            }
                        }
                    }
                }
                if (positions.Any())
                {
                    var circle = new Geometry.Polygon.Circle(fromCheck, width);
                    hits.AddRange(
                        from position in positions
                        where
                            !position.Hero.IsDashing() ||
                            (position.Hero.Distance(fromCheck) >= 100f &&
                             position.Hero.Position.Distance(fromCheck) >
                             position.Hero.GetDashInfo().EndPos.Distance(fromCheck) - 50f)
                        where circle.IsInside(position.UnitPosition)
                        select position.Hero);
                    return new Tuple<int, List<Obj_AI_Hero>>(hits.Count, hits);
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return new Tuple<int, List<Obj_AI_Hero>>(0, new List<Obj_AI_Hero>());
        }
Exemple #49
0
        public static void FarmSelfAoe(Spell spell,
            int minHit = 3,
            float overrideWidth = -1f,
            List<Obj_AI_Base> minions = null)
        {
            if (!spell.IsReady())
            {
                return;
            }
            var spellWidth = overrideWidth > 0 ? overrideWidth : (spell.Width > 25f ? spell.Width : spell.Range);

            if (minions == null)
            {
                minions = MinionManager.GetMinions(
                    spellWidth, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
            }

            if (minions.Count == 0)
            {
                return;
            }

            if (minHit > 1)
            {
                var nearest = minions.OrderBy(m => m.Distance(ObjectManager.Player)).FirstOrDefault();
                if (nearest != null && nearest.Team == GameObjectTeam.Neutral)
                {
                    minHit = 1;
                }
            }
            if (minions.Count >= minHit)
            {
                spell.Cast();
            }
        }
Exemple #50
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 600f, DamageType.Magical);
            Q.Range += GameObjects.EnemyHeroes.Select(e => e.BoundingRadius).DefaultIfEmpty(50).Average();
            Q.SetTargetted(Q.Instance.SData.CastFrame / 30f, Q.Instance.SData.MissileSpeed);

            W = new Spell(SpellSlot.W, 175f, DamageType.Magical);

            E = new Spell(SpellSlot.E, 600f, DamageType.Magical);
            E.Delay = E.Instance.SData.CastFrame / 30f;
            E.Width = E.Range;

            R = new Spell(SpellSlot.R, 700f, DamageType.Magical);
            R.SetSkillshot(0.25f, 175f, float.MaxValue, false, SkillshotType.SkillshotCircle);
        }
Exemple #51
0
 private bool IsSpellUpgraded(Spell spell)
 {
     try
     {
         return
             Player.Buffs.Select(b => b.Name.ToLower())
                 .Where(b => b.StartsWith("viktor") && b.EndsWith("aug"))
                 .Any(
                     b =>
                         spell.Slot == SpellSlot.R
                             ? b.Contains("qwe")
                             : b.Contains(spell.Slot.ToString().ToLower()));
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return false;
 }
Exemple #52
0
 public static void SkillShot(Spell spell, HitChance hitChance, bool boundingRadius = true, bool maxRange = true)
 {
     SkillShot(TargetSelector.GetTarget(spell), spell, hitChance);
 }
Exemple #53
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 825f, DamageType.Magical);
            Q.SetSkillshot(0.15f, 110f, 1375f, false, SkillshotType.SkillshotCircle);

            W = new Spell(SpellSlot.W, float.MaxValue, DamageType.Magical);
            W.SetSkillshot(0f, 220f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 1095f, DamageType.Magical);
            E.SetSkillshot(0.25f, 125f, 1700f, false, SkillshotType.SkillshotLine);

            R = new Spell(SpellSlot.R, float.MaxValue, DamageType.Magical);
            R.SetSkillshot(0.75f, 375f, float.MaxValue, false, SkillshotType.SkillshotCircle);
        }
Exemple #54
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 850f);
            Q.SetSkillshot(0.25f, 15f * (float) Math.PI / 180, 2000f, false, SkillshotType.SkillshotCone);

            W = new Spell(SpellSlot.W, 900f, DamageType.Magical);
            W.SetSkillshot(0.35f, 250f, 1650f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 425f);

            R = new Spell(SpellSlot.R, 1100f);
            R.SetSkillshot(0.25f, 110f, 2100f, false, SkillshotType.SkillshotLine);

            R2 = new Spell(SpellSlot.R, 750f);
            R2.SetSkillshot(0f, (float) (60 * Math.PI / 180), 1500f, false, SkillshotType.SkillshotCone);
        }
Exemple #55
0
 private Tuple<int, List<Obj_AI_Hero>> GetHits(Spell spell, float overrideWidth = -1f)
 {
     try
     {
         var width = overrideWidth > 0 ? overrideWidth : spell.Width;
         var hits = new List<Obj_AI_Hero>();
         var positions = (from t in GameObjects.EnemyHeroes
             where t.IsValidTarget(width * 4, true, spell.RangeCheckFrom)
             let prediction = spell.GetPrediction(t)
             where prediction.Hitchance >= HitChance.High
             where
                 Utils.IsImmobile(t) || Utils.IsSlowed(t) || t.Distance(Ball.Position) < spell.Width * 0.75 ||
                 t.Distance(Ball.Position) < spell.Width && t.IsFacing(Ball.Position, 120f)
             select new CPrediction.Position(t, prediction.UnitPosition)).ToList();
         if (positions.Any())
         {
             var circle = new Geometry.Polygon.Circle(Ball.Position, width);
             hits.AddRange(
                 from position in positions
                 where
                     !position.Hero.IsDashing() ||
                     (position.Hero.Distance(Ball.Position) >= 100f &&
                      position.Hero.Position.Distance(Ball.Position) >
                      position.Hero.GetDashInfo().EndPos.Distance(Ball.Position) - 50f)
                 where circle.IsInside(position.UnitPosition)
                 select position.Hero);
             return new Tuple<int, List<Obj_AI_Hero>>(hits.Count, hits);
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return new Tuple<int, List<Obj_AI_Hero>>(0, null);
 }
Exemple #56
0
 public static void TargetSkill(Spell spell)
 {
     TargetSkill(TargetSelector.GetTarget(spell), spell);
 }
Exemple #57
0
        public static void TargetSkill(Obj_AI_Base target, Spell spell)
        {
            if (!spell.IsReady() || target == null)
            {
                return;
            }

            spell.CastOnUnit(target);
        }
Exemple #58
0
 private static void CircleFarm(Spell spell, List<Obj_AI_Base> minions, int min, float overrideWidth = -1f)
 {
     var spellWidth = (overrideWidth > 0 ? overrideWidth : spell.Width) + minions.Average(m => m.BoundingRadius);
     var points = (from minion in minions
         select spell.GetPrediction(minion)
         into pred
         where pred.Hitchance >= HitChance.Medium
         select pred.UnitPosition.To2D()).ToList();
     if (points.Any())
     {
         var possibilities = ListExtensions.ProduceEnumeration(points).Where(p => p.Count >= min).ToList();
         if (possibilities.Any())
         {
             var hits = 0;
             var radius = float.MaxValue;
             var pos = Vector3.Zero;
             foreach (var possibility in possibilities)
             {
                 var mec = MEC.GetMec(possibility);
                 if (mec.Radius < spellWidth)
                 {
                     if (possibility.Count > hits || possibility.Count == hits && radius > mec.Radius)
                     {
                         hits = possibility.Count;
                         radius = mec.Radius;
                         pos = mec.Center.To3D();
                     }
                 }
             }
             if (hits >= min && !pos.Equals(Vector3.Zero))
             {
                 spell.Cast(pos);
             }
         }
     }
 }
Exemple #59
0
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 1150f);
            Q.SetSkillshot(0.25f, 40f, 1200f, true, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 5000f);

            E = new Spell(SpellSlot.E, 950f);

            R = new Spell(SpellSlot.R, 1200f);
        }
        protected override void SetupSpells()
        {
            Q = new Spell(SpellSlot.Q, 850f, DamageType.Magical);
            Q.SetSkillshot(0.4f, 60f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            W = new Spell(SpellSlot.W, 850f, DamageType.Magical);
            W.SetSkillshot(0.7f, 125f, 2500f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 700f, DamageType.Magical);
            E.SetTargetted(0.2f, 1700f);
            E.Collision = true;

            R = new Spell(SpellSlot.R, 825f, DamageType.Magical);
            R.SetSkillshot(0.8f, (float) (80 * Math.PI / 180), float.MaxValue, false, SkillshotType.SkillshotCone);
        }