当前位置: 首页>>代码示例>>C#>>正文


C# Player.AttacksLeftSet方法代码示例

本文整理汇总了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;
        }
开发者ID:gowantervo,项目名称:coab,代码行数:101,代码来源:ovr014.cs


注:本文中的Classes.Player.AttacksLeftSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。