コード例 #1
0
 protected override void Harass()
 {
     if (ResourceManager.Check("harass"))
     {
         var useQ = Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady();
         var useW = Menu.Item(Menu.Name + ".harass.w").GetValue <bool>() && W.IsReady();
         if (useQ)
         {
             Casting.SkillShot(Q, Q.GetHitChance("harass"));
         }
         if (useW)
         {
             WLogic();
         }
     }
     if (ResourceManager.Check("harass-r"))
     {
         var useR = Menu.Item(Menu.Name + ".harass.r").GetValue <bool>() && R.IsReady();
         if (useR && Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount())
         {
             var target = TargetSelector.GetTarget(R);
             if (target != null &&
                 (Player.FlatMagicDamageMod > 50 ||
                  !GameObjects.Enemy.Any(e => e.IsValidTarget() && Orbwalking.InAutoAttackRange(e))))
             {
                 Casting.SkillShot(R, R.GetHitChance("harass"));
             }
         }
     }
 }
コード例 #2
0
 protected override void Harass()
 {
     if (ResourceManager.Check("harass"))
     {
         var useQ = Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady();
         var useW = Menu.Item(Menu.Name + ".harass.w").GetValue <bool>() && W.IsReady();
         if (useQ && ShouldUseSpells())
         {
             Casting.SkillShot(Q, Q.GetHitChance("harass"));
         }
         if (useW)
         {
             WLogic();
         }
     }
     if (ResourceManager.Check("harass-r") && ShouldUseSpells())
     {
         var useR = Menu.Item(Menu.Name + ".harass.r").GetValue <bool>() && R.IsReady();
         if (useR && Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount())
         {
             var target = TargetSelector.GetTarget(R);
             if (target != null && (Player.FlatMagicDamageMod > 50))
             {
                 Casting.SkillShot(R, R.GetHitChance("harass"));
             }
         }
     }
 }
コード例 #3
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady();
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();
            var useR = Menu.Item(Menu.Name + ".combo.r").GetValue <bool>() && R.IsReady();

            if (useW)
            {
                WLogic();
            }
            if (ShouldUseSpells())
            {
                if (useQ)
                {
                    Casting.SkillShot(Q, Q.GetHitChance("combo"));
                }

                if (useE)
                {
                    Casting.SkillShot(E, E.GetHitChance("combo"));
                }
                if (useR && ResourceManager.Check("combo-r") &&
                    Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount())
                {
                    var target = TargetSelector.GetTarget(R);
                    if (target != null &&
                        Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount())
                    {
                        Casting.SkillShot(R, R.GetHitChance("combo"));
                    }
                }
            }
        }
コード例 #4
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);
 }
コード例 #5
0
 protected void ItemsSummonersLogic(Obj_AI_Hero ultimateTarget, bool single = true)
 {
     try
     {
         var range = Math.Max(
             600,
             Math.Max(
                 SummonerManager.SummonerSpells.Where(s => s.CastType == CastType.Target).Max(s => s.Range),
                 ItemManager.Items.Where(
                     i => i.EffectFlags.HasFlag(EffectFlags.Damage) && i.Flags.HasFlag(ItemFlags.Offensive))
                 .Max(i => i.Range)));
         if (ultimateTarget == null || Ultimate == null || !ultimateTarget.IsValidTarget(range))
         {
             var target = TargetSelector.GetTarget(range);
             if (target != null)
             {
                 if (ItemManager.CalculateComboDamage(target) + SummonerManager.CalculateComboDamage(target) >
                     target.Health)
                 {
                     ItemManager.UseComboItems(target);
                     SummonerManager.UseComboSummoners(target);
                 }
             }
         }
         else
         {
             if (Ultimate.GetDamage(ultimateTarget, UltimateModeType.Combo, single ? 1 : 5) >
                 ultimateTarget.Health)
             {
                 ItemManager.UseComboItems(ultimateTarget);
                 SummonerManager.UseComboSummoners(ultimateTarget);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
コード例 #6
0
 public static void TargetSkill(Spell spell)
 {
     TargetSkill(TargetSelector.GetTarget(spell), spell);
 }
コード例 #7
0
 public static void SkillShot(Spell spell, HitChance hitChance, bool boundingRadius = true, bool maxRange = true)
 {
     SkillShot(TargetSelector.GetTarget(spell), spell, hitChance);
 }