当前位置: 首页>>代码示例>>C#>>正文


C# Obj_AI_Hero.IsValidTarget方法代码示例

本文整理汇总了C#中Obj_AI_Hero.IsValidTarget方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Hero.IsValidTarget方法的具体用法?C# Obj_AI_Hero.IsValidTarget怎么用?C# Obj_AI_Hero.IsValidTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Obj_AI_Hero的用法示例。


在下文中一共展示了Obj_AI_Hero.IsValidTarget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Combo

        //from mundo TheKushStyle
        private void Combo(Obj_AI_Hero target)
        {
            var ActiveW = false;
            if (Player.HasBuff("BurningAgony"))
            {
                ActiveW = true;
            }
            else
            {
                ActiveW = false;
            }

            if (Q.CastCheck(target, "ComboQ"))
            {
                Q.CastIfHitchanceEquals(Target, HitChance.Low);
            }

            if (target.IsValidTarget() && W.IsReady() && Player.Distance(target) <= W.Range && !ActiveW)
            {
                W.Cast();
            }
            if (target.IsValidTarget() && Player.Distance(target) > 700f && ActiveW)
            {
                W.Cast();
            }

            if (E.IsReady() && Player.Distance(target) <= E.Range)
            {
                E.Cast();
            }
        }
开发者ID:werdbrian,项目名称:AIM-1,代码行数:32,代码来源:Drmundo.cs

示例2: Combo

        private void Combo(Obj_AI_Hero t)
        {
            if (E.IsReady() && t.IsValidTarget(Q.Range) && Q.IsReady())
            {
                //xsalice Code
                var vec = t.ServerPosition - Player.ServerPosition;
                var castBehind = E.GetPrediction(t).CastPosition + Vector3.Normalize(vec) * 100;
                E.Cast(castBehind);
                Utility.DelayAction.Add(200, () => Q.Cast(castBehind));
            }
            if (W.IsReady())
            {
                if (t.IsValidTarget(W.Range))
                    W.Cast();
            }
            if (Q.IsReady() && !E.IsReady())
            {
                if (t.IsValidTarget(Q.Range))
                    Q.Cast(t, UsePackets, true);
            }
            if (R.IsReady())
            {
                if (R.IsKillable(t))
                {
                    R.Cast(t);
                }
                R.CastIfWillHit(t, 2);

            }
        }
开发者ID:werdbrian,项目名称:AIM-1,代码行数:30,代码来源:JarvanIV.cs

示例3: Combo

        //from mundo TheKushStyle
        private void Combo(Obj_AI_Hero target)
        {
            var ActiveW = false;
            if ()
            {
                ActiveW = true;
            }
            else
            {
                ActiveW = false;
            }

            if (Q.CastCheck(target, "ComboQ"))
            {
                Q.CastIfHitchanceEquals(Target, HitChance.High);
            }

            if (target.IsValidTarget() && W.IsReady() && Player.Distance(target) <= 500 && !Player.HasBuff("BurningAgony"))
            {
                W.Cast();
            }
            if (target.IsValidTarget() && Player.Distance(target) > 500 && Player.HasBuff("BurningAgony"))
            {
                W.Cast();
            }

            if (E.IsReady() && Player.Distance(target) <= 700)
            {
                E.Cast();
            }
        }
开发者ID:werdbrian,项目名称:AIM-1,代码行数:32,代码来源:Drmundo.cs

示例4: Interrupter2_OnInterruptableTarget

        static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!Program.Config.Item("EnabledInterrupter").GetValue<bool>() || !sender.IsValidTarget()) return;
            Interrupter2.DangerLevel a;
            switch (Program.Config.Item("minChannel").GetValue<StringList>().SelectedValue)
            {
                case "HIGH":
                    a = Interrupter2.DangerLevel.High;
                    break;
                case "MEDIUM":
                    a = Interrupter2.DangerLevel.Medium;
                    break;
                default:
                    a = Interrupter2.DangerLevel.Low;
                    break;
            }

            if (args.DangerLevel == Interrupter2.DangerLevel.High ||
                args.DangerLevel == Interrupter2.DangerLevel.Medium && a != Interrupter2.DangerLevel.High ||
                args.DangerLevel == Interrupter2.DangerLevel.Medium && a != Interrupter2.DangerLevel.Medium &&
                a != Interrupter2.DangerLevel.High)
            {
                if (Program.spells[Spells.E].IsReady() && sender.IsValidTarget(Program.spells[Spells.E].Range))
                {
                    Program.spells[Spells.E].Cast(sender);
                }
            }
        }
开发者ID:AlrikSharp,项目名称:LeagueSharp-2,代码行数:28,代码来源:AntiSpells.cs

示例5: CastQ

 public static void CastQ(Obj_AI_Hero target)
 {
     if (!target.IsValidTarget()) return;
     if(target.IsValidTarget(Q.Range) && Q.IsReady()&&Q.IsInRange(target.ServerPosition) && !firstQ && isEn("UseQ") && (Game.Time-QCastTime)>=(menu.Item("SecondQDelay").GetValue<Slider>().Value/1000))
     {
         Q.Cast(target, true, false);
         firstQ = true;
         QCastTime = Game.Time;
     }
 }
开发者ID:evangelineak1026,项目名称:LeagueSharp,代码行数:10,代码来源:Program.cs

示例6: UseBotrk

 public static bool UseBotrk(Obj_AI_Hero target)
 {
     if (Settings.UseBotrk && BOTRK.IsReady() && target.IsValidTarget(BOTRK.Range) &&
         player.Health + player.GetItemDamage(target, Damage.DamageItems.Botrk) < player.MaxHealth)
     {
         return BOTRK.Cast(target);
     }
     else if (Settings.UseCutlass && CUTLASS.IsReady() && target.IsValidTarget(CUTLASS.Range))
     {
         return CUTLASS.Cast(target);
     }
     return false;
 }
开发者ID:a1342473512,项目名称:LeagueSharp,代码行数:13,代码来源:ItemManager.cs

示例7: OnPossibleToInterrupt

 public static void OnPossibleToInterrupt(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (Program.E.IsReady() && args.DangerLevel == Interrupter2.DangerLevel.High && sender.IsValidTarget(700))
     {
         Program.E.Cast(Program.E.GetPrediction(sender).UnitPosition);
     }
 }
开发者ID:q51251,项目名称:LeagueSharp-1,代码行数:7,代码来源:Interrupter.cs

示例8: CastR

 public static void CastR(Obj_AI_Hero target)
 {
     if (isCombo() && target.IsValidTarget() && R.IsInRange(target.ServerPosition) && isEn("UseR"))
     {
         R.Cast(target,true);
     }
 }
开发者ID:evangelineak1026,项目名称:LeagueSharp,代码行数:7,代码来源:Program.cs

示例9: doCombo

        public static void doCombo(Obj_AI_Hero target)
        {
            igniteIfKIllable(target);
            if (!target.IsValidTarget())
                return;

            if (!W.IsReady() && !E.IsReady() && R.IsReady() && Rdata.Name == "TalonShadowAssault" && (target.Health > getAAdmg(target) || targetInRange(target, 125f))
                && target.Health<(getRdmg(target)*2 + getTargetBleedDmg(target)))
            {
                PredictionOutput po = R.GetPrediction(target);
                if (po.Hitchance >= HitChance.Medium)
                {
                    R.Cast();
                    posRCast = Player.ServerPosition;
                }
            }

            if (Rdata.Name == "TalonShadowAssault")
            {
                if (target.Health<= getRdmg(target) && target.Distance(posRCast) < R.Range)
                    R.Cast();
            }

            if (E.IsReady() && targetInRange(target, E.Range))
            {
                E.Cast(target);
            }
            if (W.IsReady() && !E.IsReady() && targetInRange(target, W.Range) && !targetInRange(target, 100) && !Player.IsChanneling
                && (!targetInRange(target,250) || targetHasCut(target)))
            {

                    W.Cast(target);
            }
            castItemsFull(target);
        }
开发者ID:Merc491,项目名称:GoodGuyJodu,代码行数:35,代码来源:Talon.cs

示例10: CastItems

 private static void CastItems(Obj_AI_Hero currTarget)
 {
     foreach (var item in items)
     {
         if (Items.CanUseItem(item.Id) && currTarget.IsValidTarget(item.Range)) Items.UseItem(item.Id);
     }
 }
开发者ID:Pawes1234,项目名称:LeagueSharp,代码行数:7,代码来源:Program.cs

示例11: GetQPrediction

 public static Vector3? GetQPrediction(Obj_AI_Hero unit)
 {
     var normalPrediction = Spells[SpellSlot.Q].GetPrediction(unit);
     if (normalPrediction.Hitchance == HitChance.Collision || normalPrediction.Hitchance == HitChance.OutOfRange)
     {
         //There's collision or is out of range. We use Q shard prediction
         //Get Shard prediction
         var shardPrediction = QShard.GetPrediction(unit);
         if (shardPrediction.Hitchance >= HitChance.High) //TODO Might need to change to >= High in case it doesn't cast too often
         {
             //Make a list of positions including the Cast Position for the Shard Prediction
             var positionsList = new List<Vector2>();
             {
                 positionsList.Add(shardPrediction.CastPosition.To2D());
             }
             //Check the collision Objects between my position and the cast position
             var collisionObjects = QShard.GetCollision(ObjectManager.Player.ServerPosition.To2D(), positionsList);
             //If there's a minion/Any collisionable object in between
             if (collisionObjects.Any())
             {
                 return shardPrediction.CastPosition;
             }
         }
     }
     if (normalPrediction.Hitchance >= HitChance.High && unit.IsValidTarget(Spells[SpellSlot.Q].Range))
     {
         //The Hitchance is not Collision or Out of Range, Normal prediction.
         return normalPrediction.CastPosition;
     }
     return null;
 }
开发者ID:blacky,项目名称:LeagueSharp,代码行数:31,代码来源:SkillsHandler.cs

示例12: Interrupter2_OnInterruptableTarget

 private void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (E.IsReady() && sender.IsValidTarget(E.Range))
     {
         E.Cast(sender);
     }
 }
开发者ID:MrWenzoxfs,项目名称:elobuddy,代码行数:7,代码来源:Draven.cs

示例13: Interrupter2_OnInterruptableTarget

 private void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (E.IsReady() && Config.Item("inter", true).GetValue<bool>() && sender.IsValidTarget(E.Range))
     {
         E.Cast(sender.ServerPosition);
     }
 }
开发者ID:MrWenzoxfs,项目名称:elobuddy,代码行数:7,代码来源:Thresh.cs

示例14: OnPossibleToInterrupt

 public override void OnPossibleToInterrupt(Obj_AI_Hero unit, Interrupter2.InterruptableTargetEventArgs spell)
 {
     if (E.IsReady() && unit.IsValidTarget(E.Range))
     {
         E.Cast(unit);
     }
 }
开发者ID:ChewyMoon,项目名称:Experimental,代码行数:7,代码来源:Draven.cs

示例15: AutoIgnite

 private static void AutoIgnite(Obj_AI_Hero enemy)
 {
     if (enemy.IsValidTarget(600f) && enemy.Health <= 50 + (20 * _player.Level) && IgniteSlot.IsReady())
     {
         _player.Spellbook.CastSpell(IgniteSlot, enemy);
     }
 }
开发者ID:TheKushStyle,项目名称:LeagueSharp,代码行数:7,代码来源:DrMundo.cs


注:本文中的Obj_AI_Hero.IsValidTarget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。