示例#1
0
文件: AIO Func.cs 项目: SmokyBot/LS
 internal static void SC(Spell spell, float ExtraTargetDistance = 150f,float ALPHA = float.MaxValue, float Cost = 1f) //
 { // 
     var target = TargetSelector.GetTarget(spell.Range, spell.DamageType, true); //
     bool HM = true;
     bool LM = true;
     bool LHM = false;
     if (Cost == 1f)
     {
         HM = getManaPercent(Player) > AIO_Menu.Champion.Harass.IfMana;
         LM = getManaPercent(Player) > AIO_Menu.Champion.Laneclear.IfMana;
         LHM = getManaPercent(Player) > AIO_Menu.Champion.Jungleclear.IfMana;
     }
     else
     {
         HM = true;
         LM = true;
         LHM = true;
     }
     if(target != null)
     {
         if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Menu.Item("Combo.Use " + spell.Slot.ToString(), true) != null)
         {
             if(Menu.Item("Combo.Use " + spell.Slot.ToString(), true).GetValue<bool>()
             && spell.IsReady())
             {
                 if(spell.IsSkillshot)
                 {
                     if(spell.Type == SkillshotType.SkillshotLine)
                     LCast(spell,target,ExtraTargetDistance,ALPHA);
                     else if(spell.Type == SkillshotType.SkillshotCircle)
                     {
                     var ctarget = TargetSelector.GetTarget(spell.Range + spell.Width/2, spell.DamageType, true);
                     CCast(spell,ctarget);
                     }
                     else if(spell.Type == SkillshotType.SkillshotCone)
                     spell.Cast(target);
                 }
                 else if(!spell.IsSkillshot)
                 spell.Cast(target);
                 else
                 spell.AOECast(target);
             }
         }
         else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && Menu.Item("Harass.Use " + spell.Slot.ToString(), true) != null)
         {
             if(Menu.Item("Harass.Use " + spell.Slot.ToString(), true).GetValue<bool>()
             && spell.IsReady() && HM)
             {
                 if(spell.IsSkillshot)
                 {
                     if(spell.Type == SkillshotType.SkillshotLine)
                     LCast(spell,target,ExtraTargetDistance,ALPHA);
                     else if(spell.Type == SkillshotType.SkillshotCircle)
                     {
                     var ctarget = TargetSelector.GetTarget(spell.Range + spell.Width/2, spell.DamageType, true);
                     CCast(spell,ctarget);
                     }
                     else if(spell.Type == SkillshotType.SkillshotCone)
                     spell.Cast(target);
                 }
                 else if(!spell.IsSkillshot)
                 spell.Cast(target);
                 else
                 spell.AOECast(target);
             }
         }
     }
     if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
     {            
         var Minions = MinionManager.GetMinions(spell.Range, MinionTypes.All, MinionTeam.Enemy);
         var Mobs = MinionManager.GetMinions(spell.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
         
         if (Mobs.Count > 0 && Menu.Item("Jungleclear.Use " + spell.Slot.ToString(), true) != null)
         {
             if(Menu.Item("Jungleclear.Use " + spell.Slot.ToString(), true).GetValue<bool>()
             && spell.IsReady() && LHM)
             {
                 if(spell.IsSkillshot)
                 {
                     if(spell.Type == SkillshotType.SkillshotLine)
                     LCast(spell,Mobs[0],ExtraTargetDistance,ALPHA);
                     else if(spell.Type == SkillshotType.SkillshotCircle)
                     CCast(spell,Mobs[0]);
                     else if(spell.Type == SkillshotType.SkillshotCone)
                     spell.Cast(Mobs[0]);
                 }
                 else if(!spell.IsSkillshot)
                 spell.Cast(Mobs[0]);
                 else
                 spell.AOECast(Mobs[0]);
             }
         }
         if (Minions.Count > 0 && Menu.Item("Laneclear.Use " + spell.Slot.ToString(), true) != null)
         {
             if(Menu.Item("Laneclear.Use " + spell.Slot.ToString(), true).GetValue<bool>()
             && spell.IsReady() && LM)
             {
                 if(spell.IsSkillshot)
                 {
                     if(spell.Type == SkillshotType.SkillshotLine)
                     {
                         if(ALPHA > 1f)
                         LCast(spell,Minions[0],ExtraTargetDistance,ALPHA);
                         else
                         LH(spell, ALPHA);
                     }
                     else if(spell.Type == SkillshotType.SkillshotCircle)
                     CCast(spell,Minions[0]);
                     else if(spell.Type == SkillshotType.SkillshotCone)
                     spell.Cast(Minions[0]);
                 }
                 else if(!spell.IsSkillshot)
                 spell.Cast(Minions[0]);
                 else
                 spell.AOECast(Minions[0]);
             }
         }
     }
     if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit && Menu.Item("Lasthit.Use " + spell.Slot.ToString(), true) != null)
     {
         if(Menu.Item("Lasthit.Use " + spell.Slot.ToString(), true).GetValue<bool>() && spell.IsReady() && LHM)
         {
             var Mini = MinionManager.GetMinions(spell.Range, MinionTypes.All, MinionTeam.NotAlly);
             if(Mini.Count() > 0)
             LH(spell,ALPHA);
         }
     }
 }