Exemple #1
0
 private void RLogicSingle(bool q, bool e)
 {
     try
     {
         foreach (var enemy in
                  GameObjects.EnemyHeroes.Where(t => UltimateManager.CheckSingle(t, CalcComboDamage(t, q, e, true))))
         {
             if (RLogic(enemy, 1, q, e))
             {
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemple #2
0
 private void RLogicSingle(bool q, bool e)
 {
     try
     {
         foreach (var t in GameObjects.EnemyHeroes)
         {
             if (UltimateManager.CheckSingle(t, CalcComboDamage(t, q, e, true)))
             {
                 if (RLogic(t, R.GetHitChance("combo"), 1, q, e))
                 {
                     break;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemple #3
0
 private void RLogicSingle(UltimateModeType mode)
 {
     try
     {
         if (_ultimate.ShouldSingle(mode))
         {
             foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)))
             {
                 var pred = CPrediction.Circle(R, target, HitChance.High, false);
                 if (pred.TotalHits > 0)
                 {
                     R.Cast(pred.CastPosition);
                     break;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemple #4
0
 private void RLogicSingle(UltimateModeType mode)
 {
     try
     {
         if (_ultimate.ShouldSingle(mode))
         {
             foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)))
             {
                 var hits = GetRHits(target);
                 if (hits.Item1 > 0)
                 {
                     R.Cast(hits.Item3);
                     break;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemple #5
0
 private void RLogicSingle(UltimateModeType mode, HitChance hitChance)
 {
     try
     {
         if (Q.IsCharging || !_ultimate.ShouldSingle(mode))
         {
             return;
         }
         foreach (var t in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)))
         {
             var pred = R.GetPrediction(t);
             if (pred.Hitchance >= hitChance)
             {
                 R.Cast(pred.CastPosition);
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemple #6
0
 private void RLogicSingle(HitChance hitChance, bool q, bool w, bool e, bool face = true)
 {
     try
     {
         foreach (var t in Targets)
         {
             if ((!face || t.IsFacing(Player)) && R.CanCast(t))
             {
                 if (UltimateManager.CheckSingle(t, CalcComboDamage(t, q, w, e, true)))
                 {
                     if (RLogic(hitChance, 1, q, w, e))
                     {
                         break;
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemple #7
0
        /// <summary>
        /// Attempts to cast the ultimate on a single target
        /// </summary>
        /// <param name="mode"></param>
        /// <returns></returns>
        private void CastUltimateSingle(UltimateModeType mode)
        {
            try
            {
                if (!_ultimateManager.ShouldSingle(mode))
                {
                    return;
                }

                foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimateManager.CheckSingle(mode, t)))
                {
                    var hits = GetUltimateExplosionHits(target);
                    if (hits.Item1 > 0)
                    {
                        R.Cast(hits.Item3);
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
        protected override void OnPostUpdate()
        {
            if (_ultimate.IsActive(UltimateModeType.Flash) && R.IsReady() && SummonerManager.Flash.IsReady())
            {
                if (_ultimate.ShouldMove(UltimateModeType.Flash))
                {
                    Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                }
                var targets =
                    Targets.Where(
                        t =>
                        t.Distance(Player) < (R.Range + R.Width + SummonerManager.Flash.Range) * 1.5f &&
                        !t.IsDashing() &&
                        (t.IsFacing(Player)
                                ? (t.Distance(Player))
                                : (R.GetPrediction(t).UnitPosition.Distance(Player.Position))) > R.Range);
                var backwards = Menu.Item(Menu.Name + ".ultimate.backwards").GetValue <bool>();
                foreach (var target in targets)
                {
                    var flashPos = Player.Position.Extend(target.Position, SummonerManager.Flash.Range);
                    var maxHits  = GetMaxRHits(HitChance.High, flashPos);
                    if (maxHits.Item1.Count > 0)
                    {
                        var castPos = backwards
                            ? Player.Position.Extend(maxHits.Item2, -(Player.Position.Distance(maxHits.Item2) * 2))
                            : Player.Position.Extend(maxHits.Item2, Player.Position.Distance(maxHits.Item2));
                        if (_ultimate.Check(UltimateModeType.Flash, maxHits.Item1))
                        {
                            if (R.Cast(castPos))
                            {
                                Utility.DelayAction.Add(
                                    300 + (Game.Ping / 2), () => SummonerManager.Flash.Cast(flashPos));
                            }
                        }
                        else if (_ultimate.ShouldSingle(UltimateModeType.Flash))
                        {
                            if (
                                maxHits.Item1.Where(hit => _ultimate.CheckSingle(UltimateModeType.Flash, hit))
                                .Any(hit => R.Cast(castPos)))
                            {
                                Utility.DelayAction.Add(
                                    300 + (Game.Ping / 2), () => SummonerManager.Flash.Cast(flashPos));
                            }
                        }
                    }
                }
            }

            if (_ultimate.IsActive(UltimateModeType.Assisted) && R.IsReady())
            {
                if (_ultimate.ShouldMove(UltimateModeType.Assisted))
                {
                    Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                }

                if (!RLogic(UltimateModeType.Assisted, R.GetHitChance("combo")))
                {
                    RLogicSingle(UltimateModeType.Assisted, R.GetHitChance("combo"), false);
                }
            }

            if (_ultimate.IsActive(UltimateModeType.Auto) && R.IsReady())
            {
                if (!RLogic(UltimateModeType.Auto, R.GetHitChance("combo")))
                {
                    RLogicSingle(UltimateModeType.Auto, R.GetHitChance("combo"));
                }
            }

            if (HeroListManager.Enabled("w-immobile") && W.IsReady())
            {
                var target =
                    Targets.FirstOrDefault(
                        t =>
                        HeroListManager.Check("w-immobile", t) && BestTargetOnlyManager.Check("w-immobile", W, t) &&
                        Utils.IsImmobile(t));
                if (target != null)
                {
                    Casting.SkillShot(target, W, HitChance.High);
                }
            }
        }