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


C# Player.IsHeld方法代码示例

本文整理汇总了C#中Classes.Player.IsHeld方法的典型用法代码示例。如果您正苦于以下问题:C# Player.IsHeld方法的具体用法?C# Player.IsHeld怎么用?C# Player.IsHeld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Classes.Player的用法示例。


在下文中一共展示了Player.IsHeld方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: sub_33B26


//.........这里部分代码省略.........
                        break;

                    default:
                        dir = 8;
                        break;
                }

                if (dir < 8)
                {
                    ovr033.draw_74B3F(false, Icon.Normal, dir, player);
                    int ground_tile;
                    int target_index;

                    ovr033.getGroundInformation(out ground_tile, out target_index, dir, player);

                    if (target_index > 0)
                    {
                        sub_33F03(ref arg_0, gbl.player_array[target_index], player);
                    }
                    else if (ground_tile == 0)
                    {
                        char b = ovr027.yes_no(gbl.defaultMenuColors, "Flee:");
                        if (b == 'Y')
                        {
                            arg_0 = true;
                            ovr014.flee_battle(player);
                        }
                        else if (b == 'N')
                        {
                            arg_0 = false;
                        }
                    }
                    else
                    {
                        int cost;

                        if ((dir / 2) < 1)
                        {
                            cost = gbl.BackGroundTiles[ground_tile].move_cost * 3;
                        }
                        else
                        {
                            cost = gbl.BackGroundTiles[ground_tile].move_cost * 2;
                        }

                        if (gbl.BackGroundTiles[ground_tile].move_cost == 0xFF)
                        {
                            cost = 0xFFFF;
                        }

                        if (cost > player.actions.move)
                        {
                            ovr025.string_print01("can't go there");
                        }
                        else
                        {
                            ovr014.move_step_away_attack(dir, player);

                            if (player.in_combat == false)
                            {
                                arg_0 = true;
                                ovr025.clear_actions(player);
                            }
                            else
                            {
                                if (player.actions.move > 0)
                                {
                                    ovr014.sub_3E748(dir, player);
                                }

                                if (player.in_combat == false)
                                {
                                    arg_0 = true;
                                    ovr025.clear_actions(player);
                                }

                                ovr024.in_poison_cloud(1, player);

                                if (player.IsHeld())
                                {
                                    arg_0 = true;
                                    ovr025.clear_actions(player);
                                }
                            }
                        }
                    }
                }

                if (arg_4 != 0 &&
                    arg_4 != 13)
                {
                    arg_4 = ' ';
                }
            }

            if (player.actions.move < 2)
            {
                player.actions.move = 0;
            }
        }
开发者ID:gowantervo,项目名称:coab,代码行数:101,代码来源:ovr009.cs

示例2: CombatDisplayPlayerSummary

        /* hitpoint_ac */
        internal static void CombatDisplayPlayerSummary(Player player)
        {
            if (gbl.display_hitpoints_ac == true)
            {
                gbl.display_hitpoints_ac = false;
                seg037.draw8x8_clear_area(TextRegion.CombatSummary);

                int line = 1;

                DisplayPlayerStatusString(false, line, " ", player);

                line++;

                seg041.displayString("Hitpoints", 0, 10, line + 1, 0x17);

                display_hp(false, line + 1, 0x21, player);
                line += 2;

                seg041.displayString("AC", 0, 10, line + 1, 0x17);
                display_AC(line + 1, 0x1A, player);

                gbl.textYCol = line + 1;

                if (player.activeItems.primaryWeapon != null)
                {
                    line += 2;
                    /*var_1 = 0x17;*/
                    ItemDisplayNameBuild(false, false, 0, 0, player.activeItems.primaryWeapon);

                    seg041.press_any_key(player.activeItems.primaryWeapon.name, true, 10, line + 3, 0x26, line + 1, 0x17);
                }

                line = gbl.textYCol + 1;

                if (player.in_combat == false)
                {
                    seg041.displayString(ovr020.statusString[(int)player.health_status], 0, 15, line + 1, 0x17);
                }
                else if (player.IsHeld() == true)
                {
                    seg041.displayString("(Helpless)", 0, 15, line + 1, 0x17);
                }
            }
        }
开发者ID:gowantervo,项目名称:coab,代码行数:45,代码来源:ovr025.cs

示例3: 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)
//.........这里部分代码省略.........
开发者ID:gowantervo,项目名称:coab,代码行数:101,代码来源:ovr014.cs

示例4: TryGuarding

        // sub_361F7
        static void TryGuarding(Player player)
        {
            ovr025.ClearPlayerTextArea();

            if (player.IsHeld() == true ||
                ovr025.is_weapon_ranged(player) == true ||
                player.actions.delay == 0)
            {
                player.actions.Clear();
            }
            else
            {
                ovr025.guarding(player);
            }
        }
开发者ID:gowantervo,项目名称:coab,代码行数:16,代码来源:ovr010.cs

示例5: sub_3E748

        internal static void sub_3E748(int direction, Player player)
        {
            int player_index = ovr033.GetPlayerIndex(player);

            Point oldPos = gbl.CombatMap[player_index].pos;
            Point newPos = oldPos + gbl.MapDirectionDelta[direction];

            // TODO does this solve more problems than it causes? Regarding AI flee
            if (newPos.MapInBounds() == false)
            {
                return;
            }

            int costToMove = 0;
            if ((direction & 0x01) != 0)
            {
                // Diagonal walking...
                costToMove = gbl.BackGroundTiles[gbl.mapToBackGroundTile[newPos]].move_cost * 3;
            }
            else
            {
                costToMove = gbl.BackGroundTiles[gbl.mapToBackGroundTile[newPos]].move_cost * 2;
            }

            if (costToMove > player.actions.move)
            {
                player.actions.move = 0;
            }
            else
            {
                player.actions.move -= costToMove;
            }

            byte radius = 1;

            if (player.quick_fight == QuickFight.True)
            {
                radius = 3;

                if (ovr033.CoordOnScreen(newPos - gbl.mapToBackGroundTile.mapScreenTopLeft) == false &&
                    gbl.focusCombatAreaOnPlayer == true)
                {
                    ovr033.redrawCombatArea(8, 2, oldPos);
                }
            }

            if (gbl.focusCombatAreaOnPlayer == true)
            {
                ovr033.RedrawPlayerBackground(player_index);
            }

            gbl.CombatMap[player_index].pos = newPos;

            ovr033.setup_mapToPlayerIndex_and_playerScreen();

            if (gbl.focusCombatAreaOnPlayer == true)
            {
                ovr033.redrawCombatArea(8, radius, newPos);
            }

            player.actions.AttacksReceived = 0;
            player.actions.directionChanges = 0;
            seg044.PlaySound(Sound.sound_a);

            move_step_into_attack(player);

            if (player.in_combat == false ||
                player.IsHeld() == true)
            {
                player.actions.move = 0;
            }
        }
开发者ID:gowantervo,项目名称:coab,代码行数:72,代码来源:ovr014.cs


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