本文整理汇总了C#中Classes.Player.AttacksLeft方法的典型用法代码示例。如果您正苦于以下问题:C# Player.AttacksLeft方法的具体用法?C# Player.AttacksLeft怎么用?C# Player.AttacksLeft使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Classes.Player
的用法示例。
在下文中一共展示了Player.AttacksLeft方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AttackTarget01
// sub_3F4EB
internal static bool AttackTarget01(Item item, int arg_8, Player target, Player attacker)
{
int target_ac;
bool turnComplete = true;
bool BehindAttack = arg_8 != 0;
turnComplete = false;
gbl.bytes_1D2C9[1] = 0;
gbl.bytes_1D2C9[2] = 0;
gbl.bytes_1D900[1] = 0;
gbl.bytes_1D900[2] = 0;
bool var_11 = false;
bool targetNotInCombat = false;
gbl.damage = 0;
attacker.actions.field_8 = true;
if (target.IsHeld() == true)
{
seg044.PlaySound(Sound.sound_attackHeld);
while (attacker.AttacksLeft(attacker.actions.attackIdx) == 0)
{
attacker.actions.attackIdx--;
}
gbl.bytes_1D900[attacker.actions.attackIdx] += 1;
DisplayAttackMessage(true, 1, target.hit_point_current + 5, AttackType.Slay, target, attacker);
ovr024.remove_invisibility(attacker);
attacker.attack1_AttacksLeft = 0;
attacker.attack2_AttacksLeft = 0;
var_11 = true;
turnComplete = true;
}
else
{
if (attacker.activeItems.primaryWeapon != null &&
(target.field_DE > 0x80 || (target.field_DE & 7) > 1))
{
ItemData itemData = gbl.ItemDataTable[attacker.activeItems.primaryWeapon.type];
attacker.attack1_DiceCount = itemData.diceCountLarge;
attacker.attack1_DiceSize = itemData.diceSizeLarge;
attacker.attack1_DamageBonus -= itemData.bonusNormal;
attacker.attack1_DamageBonus += itemData.bonusLarge;
}
ovr025.reclac_player_values(target);
ovr024.CheckAffectsEffect(target, CheckType.Type_11);
if (CanBackStabTarget(target, attacker) == true)
{
target_ac = target.ac_behind - 4;
}
else
{
if (target.actions.AttacksReceived > 1 &&
getTargetDirection(target, attacker) == target.actions.direction &&
target.actions.directionChanges > 4)
{
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)
//.........这里部分代码省略.........