本文整理汇总了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();
}
}
示例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);
}
}
示例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();
}
}
示例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);
}
}
}
示例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;
}
}
示例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;
}
示例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);
}
}
示例8: CastR
public static void CastR(Obj_AI_Hero target)
{
if (isCombo() && target.IsValidTarget() && R.IsInRange(target.ServerPosition) && isEn("UseR"))
{
R.Cast(target,true);
}
}
示例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);
}
示例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);
}
}
示例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;
}
示例12: Interrupter2_OnInterruptableTarget
private void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
{
if (E.IsReady() && sender.IsValidTarget(E.Range))
{
E.Cast(sender);
}
}
示例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);
}
}
示例14: OnPossibleToInterrupt
public override void OnPossibleToInterrupt(Obj_AI_Hero unit, Interrupter2.InterruptableTargetEventArgs spell)
{
if (E.IsReady() && unit.IsValidTarget(E.Range))
{
E.Cast(unit);
}
}
示例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);
}
}