本文整理汇总了C#中Classes.Player.AttacksLeftSet方法的典型用法代码示例。如果您正苦于以下问题:C# Player.AttacksLeftSet方法的具体用法?C# Player.AttacksLeftSet怎么用?C# Player.AttacksLeftSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Classes.Player
的用法示例。
在下文中一共展示了Player.AttacksLeftSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AttackTarget01
//.........这里部分代码省略.........
{
BehindAttack = true;
}
if (BehindAttack == true)
{
target_ac = target.ac_behind;
}
else
{
target_ac = target.ac;
}
}
target_ac += RangedDefenseBonus(target, attacker);
AttackType attack_type = AttackType.Normal;
if (BehindAttack == true)
{
attack_type = AttackType.Behind;
}
if (CanBackStabTarget(target, attacker) == true)
{
attack_type = AttackType.Backstab;
}
for (int attackIdx = attacker.actions.attackIdx; attackIdx >= 1; attackIdx--)
{
while (attacker.AttacksLeft(attackIdx) > 0 &&
targetNotInCombat == false)
{
attacker.AttacksLeftDec(attackIdx);
attacker.actions.attackIdx = attackIdx;
gbl.bytes_1D900[attackIdx] += 1;
if (ovr024.PC_CanHitTarget(target_ac, target, attacker) ||
target.IsHeld() == true)
{
gbl.bytes_1D2C9[attackIdx] += 1;
seg044.PlaySound(Sound.sound_attackHeld);
var_11 = true;
sub_3E192(attackIdx, target, attacker);
DisplayAttackMessage(true, gbl.damage, gbl.damage, attack_type, target, attacker);
if (target.in_combat == true)
{
ovr024.CheckAffectsEffect(attacker, (CheckType)attackIdx + 1);
}
if (target.in_combat == false)
{
targetNotInCombat = true;
}
if (attacker.in_combat == false)
{
attacker.AttacksLeftSet(attackIdx, 0);
}
}
}
}
if (item != null &&
item.count == 0 &&
item.type == ItemType.DartOfHornetsNest)
{
attacker.attack1_AttacksLeft = 0;
attacker.attack2_AttacksLeft = 0;
}
if (var_11 == false)
{
seg044.PlaySound(Sound.sound_9);
DisplayAttackMessage(false, 0, 0, attack_type, target, attacker);
}
turnComplete = true;
if (attacker.attack1_AttacksLeft > 0 ||
attacker.attack2_AttacksLeft > 0)
{
turnComplete = false;
}
attacker.actions.maxSweapTargets = 0;
}
if (attacker.in_combat == false)
{
turnComplete = true;
}
if (turnComplete == true)
{
ovr025.clear_actions(attacker);
}
return turnComplete;
}