本文整理汇总了C#中Obj_AI_Base.Valid方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.Valid方法的具体用法?C# Obj_AI_Base.Valid怎么用?C# Obj_AI_Base.Valid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.Valid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Cast
/// <summary>
/// Casts E Logic.
/// </summary>
/// <param name="target">The target.</param>
/// <param name="activeMode">The active mode.</param>
public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
{
if (!ShouldCast())
{
_spellCasted = false;
return;
}
if (_spellCasted)
{
if (HitChanceCast(E, target, 70)) _spellCasted = false;
}
else if (!target.Valid(E.Range))
{
return;
}
switch (activeMode)
{
case Orbwalker.ActiveModes.Combo:
if (HitChanceCast(E, target)) _spellCasted = true;
break;
case Orbwalker.ActiveModes.Harass:
if (HitChanceCast(E, target)) _spellCasted = true;
break;
}
}
示例2: Cast
/// <summary>
/// Casts Q Logic.
/// </summary>
/// <param name="target">The target.</param>
/// <param name="activeMode">The active mode.</param>
public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
{
if (!ShouldCast() || !target.Valid(Q.Range)) return;
switch (activeMode)
{
case Orbwalker.ActiveModes.Combo:
base.HitChanceCast(Q, target);
break;
case Orbwalker.ActiveModes.Harass:
base.HitChanceCast(Q, target);
break;
}
}
示例3: Cast
/// <summary>
/// Casts R Logic.
/// </summary>
/// <param name="target">The target.</param>
/// <param name="activeMode">The active mode.</param>
public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
{
if (!ShouldCast() || !target.Valid(R.Range)) return;
if (Player.Instance.IsInAutoAttackRange(target) && Player.Instance.GetAutoAttackDamage(target, true) > target.Health && Orbwalker.CanAutoAttack)
{
return;
}
if (Q.IsReady() && Player.Instance.GetSpellDamage(target, SpellSlot.Q) > target.Health && Q.IsInRange(target))
{
return;
}
if (E.IsReady() && Player.Instance.GetSpellDamage(target, SpellSlot.E) > target.Health && E.IsInRange(target))
{
return;
}
switch (activeMode)
{
case Orbwalker.ActiveModes.Combo:
if (target.HasBuff("LuxIlluminatingFraulein"))
{
if (Killable(target, (10 + 8 * Player.Instance.Level)))
{
if (target.HasBuffOfType(BuffType.Snare))
R.Cast(target.Position);
else if (target.HasBuffOfType(BuffType.Slow))
HitChanceCast(R, target);
else
R.Cast(Prediction.Position.PredictUnitPosition(target, 500).To3D());
}
}
else
{
if (Killable(target))
{
if (target.IsRooted)
R.Cast(target.Position);
else if (target.HasBuffOfType(BuffType.Slow))
HitChanceCast(R, target);
else
R.Cast(Prediction.Position.PredictUnitPosition(target, 500).To3D());
}
}
break;
}
}