本文整理汇总了C#中Unit.IsLinkensProtected方法的典型用法代码示例。如果您正苦于以下问题:C# Unit.IsLinkensProtected方法的具体用法?C# Unit.IsLinkensProtected怎么用?C# Unit.IsLinkensProtected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Unit
的用法示例。
在下文中一共展示了Unit.IsLinkensProtected方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckTarget
private static bool CheckTarget(Unit enemy, bool doubleOwnage = false)
{
if (enemy.IsIllusion || !enemy.IsValidTarget(dagon.GetCastRange(), true, hero.NetworkPosition))
{
return false;
}
if (enemy.IsLinkensProtected() || enemy.IsMagicImmune())
{
return false;
}
if (!enemy.CanDie() || enemy.Modifiers.Any(x => IgnoreModifiers.Any(x.Name.Equals)))
{
return false;
}
var damage = AbilityDamage.CalculateDamage(dagon, hero, enemy);
if (doubleOwnage)
{
damage *= 2;
}
return enemy.Health < damage;
}
示例2: CheckTarget
private static bool CheckTarget(Unit enemy)
{
if (enemy == null || enemy.IsIllusion || !enemy.IsValidTarget(dagon.GetCastRange(), true, me.NetworkPosition) || enemy.IsLinkensProtected() || enemy.IsMagicImmune() || !enemy.CanDie() || enemy.Modifiers.Any(x => IgnoreModifiers.Any(x.Name.Equals)))
return false;
return enemy.Health <
enemy.SpellDamageTaken(dagon.GetAbilityData("damage"), DamageType.Magical, me, dagon.Name);
}
示例3: UseBlink
private static async Task UseBlink(Unit target, CancellationToken cancellationToken)
{
while (true)
{
var position = Helper.GetBestPositionForStun();
if (!position.IsZero)
{
var blink = Members.MyHero.FindItem("item_blink");
var stun = Members.MyHero.FindSpell(Members.AbilityList[0]);
var ult = Members.MyHero.FindSpell(Members.AbilityList[3]);
if (blink != null && blink.CanBeCasted())
{
var dist = Members.MyHero.Distance2D(position);
if (dist <= 1150)
{
blink.UseAbility(position);
await Task.Delay(50, cancellationToken);
}
else
{
Members.MyHero.Move(position);
await Task.Delay(125, cancellationToken);
continue;
}
}
if (stun != null && stun.CanBeCasted() && !target.IsLinkensProtected())
{
if (ult.CanHit(target))
{
stun.UseAbility(target);
await Task.Delay((int) (150 + Game.Ping), cancellationToken);
}
}
if (ult.CanBeCasted() && !target.IsLinkensProtected())
{
if (ult.CanHit(target))
{
ult.UseAbility(target);
await Task.Delay(500, cancellationToken);
}
else
{
Members.MyHero.Move(target.Position);
await Task.Delay(125, cancellationToken);
continue;
}
}
}
break;
}
}
示例4: CheckTarget
private static bool CheckTarget(Unit enemy, bool doubleOwnage = false) {
if (enemy.IsIllusion || !enemy.IsValidTarget(dagon.GetCastRange(), true, hero.NetworkPosition))
return false;
if (enemy.IsLinkensProtected() || enemy.IsMagicImmune())
return false;
if (!enemy.CanDie() || enemy.Modifiers.Any(x => IgnoreModifiers.Any(x.Name.Equals)))
return false;
return enemy.Health <
enemy.DamageTaken(DagonDamage[dagon.Level - 1] * (doubleOwnage ? 2 : 1), DamageType.Magical, hero);
}
示例5: CheckEnemy
protected virtual bool CheckEnemy(Unit unit)
{
return !unit.IsInvul()
&& (CanBeUsedOnAlly || unit.Equals(Hero)
|| ((PiercesMagicImmunity || !unit.IsMagicImmune())
&& (IgnoresLinkensSphere || !unit.IsLinkensProtected())));
}