OSDN Git Service

[Refactor] #37353 inside_arena を player_type から floor_type へ移動. / Move inside_arena...
authordeskull <deskull@users.sourceforge.jp>
Tue, 10 Dec 2019 00:04:54 +0000 (09:04 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Tue, 10 Dec 2019 00:04:54 +0000 (09:04 +0900)
33 files changed:
src/birth.c
src/bldg.c
src/cmd/cmd-basic.c
src/cmd/cmd-dump.c
src/combat/melee1.c
src/core.c
src/floor-generate.c
src/floor-save.c
src/floor.h
src/load.c
src/monster-process.c
src/monster-status.c
src/monster1.c
src/monster2.c
src/mspells1.c
src/mspells2.c
src/mspells4.c
src/mutation.c
src/player-damage.c
src/player-status.c
src/player-status.h
src/save.c
src/spells-diceroll.c
src/spells-floor.c
src/spells.h
src/spells1.c
src/spells2.c
src/spells3.c
src/targeting.c
src/trap.c
src/util.c
src/view-mainwindow.c
src/wizard2.c

index 0e13817..02301ff 100644 (file)
@@ -1833,7 +1833,7 @@ static void player_wipe_without_name(player_type *creature_ptr)
 
        /* Initialize arena and rewards information -KMW- */
        creature_ptr->arena_number = 0;
-       creature_ptr->inside_arena = FALSE;
+       creature_ptr->current_floor_ptr->inside_arena = FALSE;
        creature_ptr->current_floor_ptr->inside_quest = 0;
        for (i = 0; i < MAX_MANE; i++)
        {
index 41d5548..f27acdd 100644 (file)
@@ -355,7 +355,7 @@ static void arena_comm(int cmd)
                                                /* Save the surface floor as saved floor */
                                                prepare_change_floor_mode(CFM_SAVE_FLOORS);
 
-                                               p_ptr->inside_arena = TRUE;
+                                               p_ptr->current_floor_ptr->inside_arena = TRUE;
                                                p_ptr->leaving = TRUE;
                                                p_ptr->leave_bldg = TRUE;
                                        }
@@ -385,7 +385,7 @@ static void arena_comm(int cmd)
                                /* Save the surface floor as saved floor */
                                prepare_change_floor_mode(CFM_SAVE_FLOORS);
 
-                               p_ptr->inside_arena = TRUE;
+                               p_ptr->current_floor_ptr->inside_arena = TRUE;
                                p_ptr->leaving = TRUE;
                                p_ptr->leave_bldg = TRUE;
                        }
@@ -4102,7 +4102,7 @@ void do_cmd_bldg(void)
                msg_print(_("「敗者に用はない。」", "'There's no place here for a LOSER like you!'"));
                return;
        }
-       else if ((which == 2) && p_ptr->inside_arena)
+       else if ((which == 2) && p_ptr->current_floor_ptr->inside_arena)
        {
                if (!p_ptr->exit_bldg && p_ptr->current_floor_ptr->m_cnt > 0)
                {
@@ -4113,7 +4113,7 @@ void do_cmd_bldg(void)
                        /* Don't save the arena as saved floor */
                        prepare_change_floor_mode(CFM_SAVE_FLOORS | CFM_NO_RETURN);
 
-                       p_ptr->inside_arena = FALSE;
+                       p_ptr->current_floor_ptr->inside_arena = FALSE;
                        p_ptr->leaving = TRUE;
 
                        /* Re-enter the arena */
@@ -4174,7 +4174,7 @@ void do_cmd_bldg(void)
                if (command == ESCAPE)
                {
                        p_ptr->leave_bldg = TRUE;
-                       p_ptr->inside_arena = FALSE;
+                       p_ptr->current_floor_ptr->inside_arena = FALSE;
                        p_ptr->phase_out = FALSE;
                        break;
                }
index d7046d8..2f3ad12 100644 (file)
@@ -144,7 +144,7 @@ bool cmd_limit_stun(player_type *creature_ptr)
 
 bool cmd_limit_arena(player_type *creature_ptr)
 {
-       if (creature_ptr->inside_arena)
+       if (creature_ptr->current_floor_ptr->inside_arena)
        {
                msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
                msg_print(NULL);
@@ -2415,7 +2415,7 @@ bool do_cmd_throw(player_type *creature_ptr, int mult, bool boomerang, OBJECT_ID
                return FALSE;
        }
 
-       if (creature_ptr->inside_arena && !boomerang)
+       if (creature_ptr->current_floor_ptr->inside_arena && !boomerang)
        {
                if (o_ptr->tval != TV_SPIKE)
                {
@@ -2697,7 +2697,7 @@ bool do_cmd_throw(player_type *creature_ptr, int mult, bool boomerang, OBJECT_ID
        j = (hit_body ? breakage_chance(q_ptr, creature_ptr->pclass == CLASS_ARCHER, 0) : 0);
 
        /* Figurines transform */
-       if ((q_ptr->tval == TV_FIGURINE) && !(creature_ptr->inside_arena))
+       if ((q_ptr->tval == TV_FIGURINE) && !(creature_ptr->current_floor_ptr->inside_arena))
        {
                j = 100;
 
index 7521425..3c66728 100644 (file)
@@ -458,7 +458,7 @@ errr exe_write_diary(player_type *creature_ptr, int type, int num, concptr note)
 
        if (write_level)
        {
-               if (creature_ptr->inside_arena)
+               if (creature_ptr->current_floor_ptr->inside_arena)
                        note_level = _("アリーナ:", "Arane:");
                else if (!creature_ptr->current_floor_ptr->dun_level)
                        note_level = _("地上:", "Surface:");
index 69ee55a..95ed830 100644 (file)
@@ -4094,7 +4094,7 @@ bool make_attack_normal(player_type *target_ptr, MONSTER_IDX m_idx)
 
 
        /* Always notice cause of death */
-       if (target_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !target_ptr->inside_arena)
+       if (target_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !target_ptr->current_floor_ptr->inside_arena)
        {
                r_ptr->r_deaths++;
        }
index b178b0a..bb9cae6 100644 (file)
@@ -2478,7 +2478,7 @@ static void process_world_aux_mutation(player_type *creature_ptr)
                if (hex_spelling_any(creature_ptr)) stop_hex_spell_all();
        }
 
-       if ((creature_ptr->muta2 & MUT2_WALK_SHAD) && !creature_ptr->anti_magic && one_in_(12000) && !creature_ptr->inside_arena)
+       if ((creature_ptr->muta2 & MUT2_WALK_SHAD) && !creature_ptr->anti_magic && one_in_(12000) && !creature_ptr->current_floor_ptr->inside_arena)
        {
                alter_reality();
        }
@@ -3114,7 +3114,7 @@ static void process_world(void)
                p_ptr->current_floor_ptr->dun_level = 0;
                p_ptr->dungeon_idx = 0;
                prepare_change_floor_mode(CFM_FIRST_FLOOR | CFM_RAND_PLACE);
-               p_ptr->inside_arena = FALSE;
+               p_ptr->current_floor_ptr->inside_arena = FALSE;
                p_ptr->wild_mode = FALSE;
                p_ptr->leaving = TRUE;
        }
@@ -3199,7 +3199,7 @@ static void process_world(void)
        /*** Handle the wilderness/town (sunshine) ***/
 
        /* While in town/wilderness */
-       if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->current_floor_ptr->inside_quest && !p_ptr->phase_out && !p_ptr->inside_arena)
+       if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->current_floor_ptr->inside_quest && !p_ptr->phase_out && !p_ptr->current_floor_ptr->inside_arena)
        {
                /* Hack -- Daybreak/Nighfall in town */
                if (!(current_world_ptr->game_turn % ((TURNS_PER_TICK * TOWN_DAWN) / 2)))
@@ -3216,7 +3216,7 @@ static void process_world(void)
        }
 
        /* While in the dungeon (vanilla_town or lite_town mode only) */
-       else if ((vanilla_town || (lite_town && !p_ptr->current_floor_ptr->inside_quest && !p_ptr->phase_out && !p_ptr->inside_arena)) && p_ptr->current_floor_ptr->dun_level)
+       else if ((vanilla_town || (lite_town && !p_ptr->current_floor_ptr->inside_quest && !p_ptr->phase_out && !p_ptr->current_floor_ptr->inside_arena)) && p_ptr->current_floor_ptr->dun_level)
        {
                /*** Shuffle the Storekeepers ***/
 
@@ -3267,7 +3267,7 @@ static void process_world(void)
 
        /* Check for creature generation. */
        if (one_in_(d_info[p_ptr->dungeon_idx].max_m_alloc_chance) &&
-           !p_ptr->inside_arena && !p_ptr->current_floor_ptr->inside_quest && !p_ptr->phase_out)
+           !p_ptr->current_floor_ptr->inside_arena && !p_ptr->current_floor_ptr->inside_quest && !p_ptr->phase_out)
        {
                /* Make a new monster */
                (void)alloc_monster(MAX_SIGHT + 5, 0);
@@ -3744,7 +3744,7 @@ static void process_command(player_type *creature_ptr)
                /* Go up staircase */
                case '<':
                {
-                       if (!creature_ptr->wild_mode && !p_ptr->current_floor_ptr->dun_level && !creature_ptr->inside_arena && !creature_ptr->current_floor_ptr->inside_quest)
+                       if (!creature_ptr->wild_mode && !p_ptr->current_floor_ptr->dun_level && !creature_ptr->current_floor_ptr->inside_arena && !creature_ptr->current_floor_ptr->inside_quest)
                        {
                                if (vanilla_town) break;
 
@@ -5048,7 +5048,7 @@ static void dungeon(bool load_game)
        current_world_ptr->is_loading_now = TRUE;
 
        if (p_ptr->energy_need > 0 && !p_ptr->phase_out &&
-           (p_ptr->current_floor_ptr->dun_level || p_ptr->leaving_dungeon || p_ptr->inside_arena))
+           (p_ptr->current_floor_ptr->dun_level || p_ptr->leaving_dungeon || p_ptr->current_floor_ptr->inside_arena))
                p_ptr->energy_need = 0;
 
        /* Not leaving dungeon */
@@ -5393,7 +5393,7 @@ void play_game(bool new_game)
                /* Start in town */
                p_ptr->current_floor_ptr->dun_level = 0;
                p_ptr->current_floor_ptr->inside_quest = 0;
-               p_ptr->inside_arena = FALSE;
+               p_ptr->current_floor_ptr->inside_arena = FALSE;
                p_ptr->phase_out = FALSE;
 
                write_level = TRUE;
@@ -5640,9 +5640,9 @@ void play_game(bool new_game)
                /* Accidental Death */
                if (p_ptr->playing && p_ptr->is_dead)
                {
-                       if (p_ptr->inside_arena)
+                       if (p_ptr->current_floor_ptr->inside_arena)
                        {
-                               p_ptr->inside_arena = FALSE;
+                               p_ptr->current_floor_ptr->inside_arena = FALSE;
                                if (p_ptr->arena_number > MAX_ARENA_MONS)
                                        p_ptr->arena_number++;
                                else
index f993463..a238daa 100644 (file)
@@ -1417,7 +1417,7 @@ void generate_floor(floor_type *floor_ptr)
 
                clear_cave(floor_ptr);
 
-               if (p_ptr->inside_arena)
+               if (p_ptr->current_floor_ptr->inside_arena)
                {
                        generate_challenge_arena(floor_ptr);
                }
index e73531d..038a9d0 100644 (file)
@@ -422,7 +422,7 @@ static void preserve_pet(void)
         * If player is in wild mode, no pets are preserved
         * except a monster whom player riding
         */
-       if (!p_ptr->wild_mode && !p_ptr->inside_arena && !p_ptr->phase_out)
+       if (!p_ptr->wild_mode && !p_ptr->current_floor_ptr->inside_arena && !p_ptr->phase_out)
        {
                for (i = p_ptr->current_floor_ptr->m_max - 1, num = 1; (i >= 1 && num < MAX_PARTY_MON); i--)
                {
index e4842cc..3d18b0b 100644 (file)
@@ -124,6 +124,7 @@ typedef struct {
 
        bool monster_noise;
        QUEST_IDX inside_quest;         /* Inside quest level */
+       bool inside_arena;              /* Is character inside arena? */
 
 } floor_type;
 
index 8db6640..98edef6 100644 (file)
@@ -1960,7 +1960,7 @@ static void rd_extra(void)
                if (p_ptr->arena_number >= 99) p_ptr->arena_number = ARENA_DEFEATED_OLD_VER;
        }
        rd_s16b(&tmp16s);
-       p_ptr->inside_arena = (bool)tmp16s;
+       p_ptr->current_floor_ptr->inside_arena = (bool)tmp16s;
        rd_s16b(&p_ptr->current_floor_ptr->inside_quest);
        if (z_older_than(10, 3, 5)) p_ptr->phase_out = FALSE;
        else
@@ -1976,7 +1976,7 @@ static void rd_extra(void)
        rd_s16b(&tmp16s);
        p_ptr->oldpy = (POSITION)tmp16s;
 
-       if (z_older_than(10, 3, 13) && !p_ptr->current_floor_ptr->dun_level && !p_ptr->inside_arena) {p_ptr->oldpy = 33;p_ptr->oldpx = 131;}
+       if (z_older_than(10, 3, 13) && !p_ptr->current_floor_ptr->dun_level && !p_ptr->current_floor_ptr->inside_arena) {p_ptr->oldpy = 33;p_ptr->oldpx = 131;}
 
        /* Was p_ptr->rewards[MAX_BACT] */
        rd_s16b(&tmp16s);
@@ -2602,7 +2602,7 @@ static errr rd_dungeon_old(void)
        p_ptr->y = (POSITION)tmp16s;
        rd_s16b(&tmp16s);
        p_ptr->x = (POSITION)tmp16s;
-       if (z_older_than(10, 3, 13) && !p_ptr->current_floor_ptr->dun_level && !p_ptr->inside_arena) {p_ptr->y = 33;p_ptr->x = 131;}
+       if (z_older_than(10, 3, 13) && !p_ptr->current_floor_ptr->dun_level && !p_ptr->current_floor_ptr->inside_arena) {p_ptr->y = 33;p_ptr->x = 131;}
        rd_s16b(&tmp16s);
        p_ptr->current_floor_ptr->height = (POSITION)tmp16s;
        rd_s16b(&tmp16s);
@@ -2962,7 +2962,7 @@ static errr rd_dungeon_old(void)
        /*** Success ***/
 
        /* The dungeon is ready */
-       if (z_older_than(10, 3, 13) && !p_ptr->current_floor_ptr->dun_level && !p_ptr->inside_arena)
+       if (z_older_than(10, 3, 13) && !p_ptr->current_floor_ptr->dun_level && !p_ptr->current_floor_ptr->inside_arena)
                current_world_ptr->character_dungeon = FALSE;
        else
                current_world_ptr->character_dungeon = TRUE;
index 5b1a4cc..b4dded0 100644 (file)
@@ -1531,7 +1531,7 @@ void process_monster(MONSTER_IDX m_idx)
                /* Hack -- Ohmu scatters molds! */
                if (m_ptr->r_idx == MON_OHMU)
                {
-                       if (!p_ptr->inside_arena && !p_ptr->phase_out)
+                       if (!p_ptr->current_floor_ptr->inside_arena && !p_ptr->phase_out)
                        {
                                if (r_ptr->freq_spell && (randint1(100) <= r_ptr->freq_spell))
                                {
index 7787720..60e6c28 100644 (file)
@@ -1145,7 +1145,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note)
 
                if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_BEGINNER))
                {
-                       if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->ambush_flag && !p_ptr->inside_arena)
+                       if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->ambush_flag && !p_ptr->current_floor_ptr->inside_arena)
                        {
                                chg_virtue(p_ptr, V_VALOUR, -1);
                        }
@@ -1335,7 +1335,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note)
                monster_death(m_idx, TRUE);
 
                /* Mega hack : replace IKETA to BIKETAL */
-               if ((m_ptr->r_idx == MON_IKETA) && !(p_ptr->inside_arena || p_ptr->phase_out))
+               if ((m_ptr->r_idx == MON_IKETA) && !(p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out))
                {
                        POSITION dummy_y = m_ptr->fy;
                        POSITION dummy_x = m_ptr->fx;
index 7f903d4..e4eeb90 100644 (file)
@@ -2538,7 +2538,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
        object_type forge;
        object_type *q_ptr;
 
-       bool drop_chosen_item = drop_item && !cloned && !p_ptr->inside_arena
+       bool drop_chosen_item = drop_item && !cloned && !p_ptr->current_floor_ptr->inside_arena
                && !p_ptr->phase_out && !is_pet(m_ptr);
 
        /* The caster is dead? */
@@ -2586,7 +2586,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
        check_quest_completion(m_ptr);
 
        /* Handle the possibility of player vanquishing arena combatant -KMW- */
-       if (p_ptr->inside_arena && !is_pet(m_ptr))
+       if (p_ptr->current_floor_ptr->inside_arena && !is_pet(m_ptr))
        {
                p_ptr->exit_bldg = TRUE;
 
@@ -2632,7 +2632,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
        /* Drop a dead corpse? */
        if (one_in_(r_ptr->flags1 & RF1_UNIQUE ? 1 : 4) &&
                (r_ptr->flags9 & (RF9_DROP_CORPSE | RF9_DROP_SKELETON)) &&
-               !(p_ptr->inside_arena || p_ptr->phase_out || cloned || ((m_ptr->r_idx == today_mon) && is_pet(m_ptr))))
+               !(p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out || cloned || ((m_ptr->r_idx == today_mon) && is_pet(m_ptr))))
        {
                /* Assume skeleton */
                bool corpse = FALSE;
@@ -2680,7 +2680,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
        {
        case MON_PINK_HORROR:
                /* Pink horrors are replaced with 2 Blue horrors */
-               if (!(p_ptr->inside_arena || p_ptr->phase_out))
+               if (!(p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out))
                {
                        bool notice = FALSE;
 
@@ -2739,7 +2739,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                 * Mega^3-hack: killing a 'Warrior of the Dawn' is likely to
                 * spawn another in the fallen one's place!
                 */
-               if (!p_ptr->inside_arena && !p_ptr->phase_out)
+               if (!p_ptr->current_floor_ptr->inside_arena && !p_ptr->phase_out)
                {
                        if (!one_in_(7))
                        {
@@ -3038,7 +3038,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
        if (cloned && !(r_ptr->flags1 & RF1_UNIQUE))
                number = 0; /* Clones drop no stuff unless Cloning Pits */
 
-       if (is_pet(m_ptr) || p_ptr->phase_out || p_ptr->inside_arena)
+       if (is_pet(m_ptr) || p_ptr->phase_out || p_ptr->current_floor_ptr->inside_arena)
                number = 0; /* Pets drop no stuff */
        if (!drop_item && (r_ptr->d_char != '$')) number = 0;
 
index 1abd5bb..11a0ef4 100644 (file)
@@ -2472,7 +2472,7 @@ SPEED get_mspeed(monster_race *r_ptr)
        SPEED mspeed = r_ptr->speed;
 
        /* Hack -- small racial variety */
-       if (!(r_ptr->flags1 & RF1_UNIQUE) && !p_ptr->inside_arena)
+       if (!(r_ptr->flags1 & RF1_UNIQUE) && !p_ptr->current_floor_ptr->inside_arena)
        {
                /* Allow some small variation per monster */
                int i = SPEED_TO_ENERGY(r_ptr->speed) / (one_in_(4) ? 3 : 10);
@@ -3485,7 +3485,7 @@ bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int t
        POSITION x, y;
        MONRACE_IDX r_idx;
 
-       if (p_ptr->inside_arena) return (FALSE);
+       if (p_ptr->current_floor_ptr->inside_arena) return (FALSE);
 
        if (!mon_scatter(0, &y, &x, y1, x1, 2)) return FALSE;
 
@@ -3541,7 +3541,7 @@ bool summon_named_creature(MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_ID
        /* Prevent illegal monsters */
        if (r_idx >= max_r_idx) return FALSE;
 
-       if (p_ptr->inside_arena) return FALSE;
+       if (p_ptr->current_floor_ptr->inside_arena) return FALSE;
 
        if (!mon_scatter(r_idx, &y, &x, oy, ox, 2)) return FALSE;
 
index e0e315b..389c02b 100644 (file)
@@ -1577,7 +1577,7 @@ bool make_attack_spell(MONSTER_IDX m_idx, player_type *target_ptr)
        /* Remove the "ineffective" spells */
        remove_bad_spells(m_idx, &f4, &f5, &f6);
 
-       if (target_ptr->inside_arena || target_ptr->phase_out)
+       if (target_ptr->current_floor_ptr->inside_arena || target_ptr->phase_out)
        {
                f4 &= ~(RF4_SUMMON_MASK);
                f5 &= ~(RF5_SUMMON_MASK);
@@ -1830,7 +1830,7 @@ bool make_attack_spell(MONSTER_IDX m_idx, player_type *target_ptr)
 
 
        /* Always take note of monsters that kill you */
-       if (target_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !target_ptr->inside_arena)
+       if (target_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !target_ptr->current_floor_ptr->inside_arena)
        {
                r_ptr->r_deaths++; /* Ignore appearance difference */
        }
index 0daa23f..8a5f855 100644 (file)
@@ -434,7 +434,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
                f6 &= (RF6_NOMAGIC_MASK);
        }
 
-       if (p_ptr->inside_arena || p_ptr->phase_out)
+       if (p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out)
        {
                f4 &= ~(RF4_SUMMON_MASK);
                f5 &= ~(RF5_SUMMON_MASK);
@@ -761,7 +761,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
        }
 
        /* Always take note of monsters that kill you */
-       if (p_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !p_ptr->inside_arena)
+       if (p_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !p_ptr->current_floor_ptr->inside_arena)
        {
                r_ptr->r_deaths++; /* Ignore appearance difference */
        }
index 107ce16..b54d560 100644 (file)
@@ -1947,7 +1947,7 @@ HIT_POINT spell_RF6_SPECIAL_BANORLUPART(MONSTER_IDX m_idx)
                        dummy_hp = (m_ptr->hp + 1) / 2;
                        dummy_maxhp = m_ptr->maxhp / 2;
                        
-                       if (p_ptr->inside_arena || p_ptr->phase_out || !summon_possible(m_ptr->fy, m_ptr->fx)) 
+                       if (p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out || !summon_possible(m_ptr->fy, m_ptr->fx)) 
                                return -1;
 
                        delete_monster_idx(p_ptr->current_floor_ptr->grid_array[m_ptr->fy][m_ptr->fx].m_idx);
index 121fc92..a03a1c2 100644 (file)
@@ -2312,7 +2312,7 @@ bool exe_mutation_power(player_type *creature_ptr, int power)
                                if ((r_ptr->flags3 & RF3_EVIL) &&
                                    !(r_ptr->flags1 & RF1_QUESTOR) &&
                                    !(r_ptr->flags1 & RF1_UNIQUE) &&
-                                   !creature_ptr->inside_arena && !creature_ptr->current_floor_ptr->inside_quest &&
+                                   !creature_ptr->current_floor_ptr->inside_arena && !creature_ptr->current_floor_ptr->inside_quest &&
                                        (r_ptr->level < randint1(creature_ptr->lev+50)) &&
                                        !(m_ptr->mflag2 & MFLAG2_NOGENO))
                                {
index e63bfff..6a50b6b 100644 (file)
@@ -49,7 +49,7 @@ int inven_damage(inven_func typ, int perc)
 
        if (CHECK_MULTISHADOW(p_ptr)) return 0;
 
-       if (p_ptr->inside_arena) return 0;
+       if (p_ptr->current_floor_ptr->inside_arena) return 0;
 
        /* Count the casualties */
        k = 0;
@@ -500,7 +500,7 @@ int take_hit(player_type *creature_ptr, int damage_type, HIT_POINT damage, concp
                /* Note death */
                creature_ptr->is_dead = TRUE;
 
-               if (creature_ptr->inside_arena)
+               if (creature_ptr->current_floor_ptr->inside_arena)
                {
                        concptr m_name = r_name + r_info[arena_info[creature_ptr->arena_number].r_idx].name;
                        msg_format(_("あなたは%sの前に敗れ去った。", "You are beaten by %s."), m_name);
@@ -550,7 +550,7 @@ int take_hit(player_type *creature_ptr, int damage_type, HIT_POINT damage, concp
                        {
                                char buf[20];
 
-                               if (creature_ptr->inside_arena)
+                               if (creature_ptr->current_floor_ptr->inside_arena)
                                        strcpy(buf, _("アリーナ", "in the Arena"));
                                else if (!p_ptr->current_floor_ptr->dun_level)
                                        strcpy(buf, _("地上", "on the surface"));
index ad3620e..53b6f9d 100644 (file)
@@ -5847,7 +5847,7 @@ void cheat_death(player_type *creature_ptr)
        (void)set_food(creature_ptr, PY_FOOD_MAX - 1);
 
        p_ptr->current_floor_ptr->dun_level = 0;
-       creature_ptr->inside_arena = FALSE;
+       creature_ptr->current_floor_ptr->inside_arena = FALSE;
        creature_ptr->phase_out = FALSE;
        leaving_quest = 0;
        creature_ptr->current_floor_ptr->inside_quest = 0;
index 59ece68..9b8d1a9 100644 (file)
@@ -123,7 +123,6 @@ struct player_type
 
        TOWN_IDX town_num;                      /* Current town number */
        s16b arena_number;              /* monster number in arena -KMW- */
-       bool inside_arena;              /* Is character inside arena? */
        bool phase_out;         /*!< フェイズアウト状態(闘技場観戦状態などに利用、NPCの処理の対象にならず自身もほとんどの行動ができない) */
 
        DUNGEON_IDX dungeon_idx; /* current dungeon index */
index cea6242..6c9a524 100644 (file)
@@ -692,7 +692,7 @@ static void wr_extra(void)
 
        /* Write arena and rewards information -KMW- */
        wr_s16b(p_ptr->arena_number);
-       wr_s16b(p_ptr->inside_arena);
+       wr_s16b(p_ptr->current_floor_ptr->inside_arena);
        wr_s16b(p_ptr->current_floor_ptr->inside_quest);
        wr_s16b(p_ptr->phase_out);
        wr_byte(p_ptr->exit_bldg);
index ee16ec8..e1f955c 100644 (file)
@@ -19,7 +19,7 @@ bool_hack common_saving_throw_charm(player_type *player_ptr, HIT_POINT pow, mons
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
-       if (p_ptr->inside_arena) return TRUE;
+       if (p_ptr->current_floor_ptr->inside_arena) return TRUE;
 
        /* Memorize a flag */
        if (r_ptr->flagsr & RFR_RES_ALL)
@@ -51,7 +51,7 @@ bool_hack common_saving_throw_control(player_type *player_ptr, HIT_POINT pow, mo
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
-       if (p_ptr->inside_arena) return TRUE;
+       if (p_ptr->current_floor_ptr->inside_arena) return TRUE;
 
        /* Memorize a flag */
        if (r_ptr->flagsr & RFR_RES_ALL)
index 5b0e953..186afbd 100644 (file)
@@ -283,7 +283,7 @@ void stair_creation(player_type *caster_ptr)
        /* No effect out of standard dungeon floor */
        if (!floor_ptr->dun_level || (!up && !down) ||
                (caster_ptr->current_floor_ptr->inside_quest && is_fixed_quest_idx(caster_ptr->current_floor_ptr->inside_quest)) ||
-               caster_ptr->inside_arena || caster_ptr->phase_out)
+               caster_ptr->current_floor_ptr->inside_arena || caster_ptr->phase_out)
        {
                /* arena or quest */
                msg_print(_("効果がありません!", "There is no effect!"));
index 0b52ab2..c77090b 100644 (file)
@@ -331,7 +331,7 @@ extern int project_length;
 
 /* Is "teleport level" ineffective to this target? */
 #define TELE_LEVEL_IS_INEFF(TARGET) \
-       (p_ptr->inside_arena || p_ptr->phase_out || \
+       (p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out || \
         (p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || \
         (((TARGET) <= 0) && (quest_number(p_ptr->current_floor_ptr->dun_level) || (p_ptr->current_floor_ptr->dun_level >= d_info[p_ptr->dungeon_idx].maxdepth)) && \
          (p_ptr->current_floor_ptr->dun_level >= 1) && ironman_downward))
index e798793..aa260c2 100644 (file)
@@ -2088,7 +2088,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        {
                                if (seen) obvious = TRUE;
 
-                               if ((p_ptr->inside_arena) || is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
+                               if ((p_ptr->current_floor_ptr->inside_arena) || is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
                                {
                                        note = _("には効果がなかった。", " is unaffected.");
                                }
@@ -3525,7 +3525,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                bool success = FALSE;
                                if (seen) obvious = TRUE;
 
-                               if ((r_ptr->flags3 & (RF3_GOOD)) && !p_ptr->inside_arena)
+                               if ((r_ptr->flags3 & (RF3_GOOD)) && !p_ptr->current_floor_ptr->inside_arena)
                                {
                                        if (r_ptr->flags3 & (RF3_NO_CONF)) dam -= 50;
                                        if (dam < 1) dam = 1;
index c064466..9481e62 100644 (file)
@@ -1034,7 +1034,7 @@ bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side,
        if (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) resist = TRUE;
        else if (r_ptr->flags7 & RF7_UNIQUE2) resist = TRUE;
        else if (m_idx == p_ptr->riding) resist = TRUE;
-       else if ((p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->phase_out) resist = TRUE;
+       else if ((p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out) resist = TRUE;
        else if (player_cast && (r_ptr->level > randint0(power))) resist = TRUE;
        else if (player_cast && (m_ptr->mflag2 & MFLAG2_NOGENO)) resist = TRUE;
 
@@ -1113,7 +1113,7 @@ bool symbol_genocide(int power, bool player_cast)
        bool result = FALSE;
 
        /* Prevent genocide in quest levels */
-       if ((p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->phase_out)
+       if ((p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out)
        {
                msg_print(_("何も起きないようだ……", "It seems nothing happen here..."));
                return (FALSE);
@@ -1157,7 +1157,7 @@ bool mass_genocide(int power, bool player_cast)
        bool result = FALSE;
 
        /* Prevent mass genocide in quest levels */
-       if ((p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->phase_out)
+       if ((p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out)
        {
                return (FALSE);
        }
@@ -1197,7 +1197,7 @@ bool mass_genocide_undead(int power, bool player_cast)
        bool result = FALSE;
 
        /* Prevent mass genocide in quest levels */
-       if ((p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->phase_out)
+       if ((p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out)
        {
                return (FALSE);
        }
@@ -4402,7 +4402,7 @@ bool rodeo(player_type *creature_ptr)
        if (r_ptr->flags1 & RF1_UNIQUE) rlev = rlev * 3 / 2;
        if (rlev > 60) rlev = 60 + (rlev - 60) / 2;
        if ((randint1(creature_ptr->skill_exp[GINOU_RIDING] / 120 + creature_ptr->lev * 2 / 3) > rlev)
-               && one_in_(2) && !creature_ptr->inside_arena && !creature_ptr->phase_out
+               && one_in_(2) && !creature_ptr->current_floor_ptr->inside_arena && !creature_ptr->phase_out
                && !(r_ptr->flags7 & (RF7_GUARDIAN)) && !(r_ptr->flags1 & (RF1_QUESTOR))
                && (rlev < creature_ptr->lev * 3 / 2 + randint0(creature_ptr->lev / 5)))
        {
index cecac62..41619d6 100644 (file)
@@ -124,7 +124,7 @@ bool teleport_away(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION dis, BIT
                        if (!cave_monster_teleportable_bold(m_idx, ny, nx, mode)) continue;
 
                        /* No teleporting into vaults and such */
-                       if (!(caster_ptr->current_floor_ptr->inside_quest || caster_ptr->inside_arena))
+                       if (!(caster_ptr->current_floor_ptr->inside_quest || caster_ptr->current_floor_ptr->inside_arena))
                                if (caster_ptr->current_floor_ptr->grid_array[ny][nx].info & CAVE_ICKY) continue;
 
                        /* This grid looks good */
@@ -791,7 +791,7 @@ bool recall_player(player_type *creature_ptr, TIME_EFFECT turns)
         */
 
        /* Ironman option */
-       if (creature_ptr->inside_arena || ironman_downward)
+       if (creature_ptr->current_floor_ptr->inside_arena || ironman_downward)
        {
                msg_print(_("何も起こらなかった。", "Nothing happens."));
                return TRUE;
@@ -1348,7 +1348,7 @@ void fetch(player_type *caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los)
 void alter_reality(void)
 {
        /* Ironman option */
-       if (p_ptr->inside_arena || ironman_downward)
+       if (p_ptr->current_floor_ptr->inside_arena || ironman_downward)
        {
                msg_print(_("何も起こらなかった。", "Nothing happens."));
                return;
@@ -2866,7 +2866,7 @@ bool polymorph_monster(player_type *caster_ptr, POSITION y, POSITION x)
        bool health_tracked = (caster_ptr->health_who == g_ptr->m_idx) ? TRUE : FALSE;
        monster_type back_m;
 
-       if (caster_ptr->inside_arena || caster_ptr->phase_out) return (FALSE);
+       if (caster_ptr->current_floor_ptr->inside_arena || caster_ptr->phase_out) return (FALSE);
 
        if ((caster_ptr->riding == g_ptr->m_idx) || (m_ptr->mflag2 & MFLAG2_KAGE)) return (FALSE);
 
@@ -3628,7 +3628,7 @@ bool tele_town(player_type *caster_ptr)
                return FALSE;
        }
 
-       if (caster_ptr->inside_arena || caster_ptr->phase_out)
+       if (caster_ptr->current_floor_ptr->inside_arena || caster_ptr->phase_out)
        {
                msg_print(_("この魔法は外でしか使えない!", "This spell can only be used outside!"));
                return FALSE;
index 7d560e2..51d785a 100644 (file)
@@ -920,7 +920,7 @@ static char target_set_aux(player_type *subject_ptr, POSITION y, POSITION x, BIT
                }
 
                /* Hack -- special handling for building doors */
-               else if (have_flag(f_ptr->flags, FF_BLDG) && !subject_ptr->inside_arena)
+               else if (have_flag(f_ptr->flags, FF_BLDG) && !subject_ptr->current_floor_ptr->inside_arena)
                {
                        name = building[f_ptr->subtype].name;
                }
@@ -954,7 +954,7 @@ static char target_set_aux(player_type *subject_ptr, POSITION y, POSITION x, BIT
                /* Hack -- special introduction for store & building doors -KMW- */
                if (have_flag(f_ptr->flags, FF_STORE) ||
                    have_flag(f_ptr->flags, FF_QUEST_ENTER) ||
-                   (have_flag(f_ptr->flags, FF_BLDG) && !subject_ptr->inside_arena) ||
+                   (have_flag(f_ptr->flags, FF_BLDG) && !subject_ptr->current_floor_ptr->inside_arena) ||
                    have_flag(f_ptr->flags, FF_ENTRANCE))
                {
                        s2 = _("の入口", "");
index dba71f1..63d5d27 100644 (file)
@@ -158,7 +158,7 @@ FEAT_IDX choose_random_trap(void)
                if (!have_flag(f_info[feat].flags, FF_MORE)) break;
 
                /* Hack -- no trap doors on special levels */
-               if (p_ptr->inside_arena || quest_number(p_ptr->current_floor_ptr->dun_level)) continue;
+               if (p_ptr->current_floor_ptr->inside_arena || quest_number(p_ptr->current_floor_ptr->dun_level)) continue;
 
                /* Hack -- no trap doors on the deepest level */
                if (p_ptr->current_floor_ptr->dun_level >= d_info[p_ptr->dungeon_idx].maxdepth) continue;
index 95e809b..341c455 100644 (file)
@@ -1812,7 +1812,7 @@ void select_floor_music(player_type *player_ptr)
                if (!play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_WILD)) return;
        }
 
-       if(player_ptr->inside_arena)
+       if(player_ptr->current_floor_ptr->inside_arena)
        {
                if (!play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_ARENA)) return;
        }
@@ -4340,7 +4340,7 @@ static char inkey_from_menu(void)
                                        if (p_ptr->pclass == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
                                        break;
                                case MENU_WILD:
-                                       if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->inside_arena && !p_ptr->current_floor_ptr->inside_quest)
+                                       if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->current_floor_ptr->inside_arena && !p_ptr->current_floor_ptr->inside_quest)
                                        {
                                                if ((byte)p_ptr->wild_mode == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
                                        }
index b341b2d..fa4877c 100644 (file)
@@ -195,7 +195,7 @@ concptr map_name(void)
                return _("クエスト", "Quest");
        else if (p_ptr->wild_mode)
                return _("地上", "Surface");
-       else if (p_ptr->inside_arena)
+       else if (p_ptr->current_floor_ptr->inside_arena)
                return _("アリーナ", "Arena");
        else if (p_ptr->phase_out)
                return _("闘技場", "Monster Arena");
@@ -1011,7 +1011,7 @@ static void prt_depth(void)
  */
 static void prt_hunger(void)
 {
-       if(current_world_ptr->wizard && p_ptr->inside_arena) return;
+       if(current_world_ptr->wizard && p_ptr->current_floor_ptr->inside_arena) return;
 
        /* Fainting / Starving */
        if (p_ptr->food < PY_FOOD_FAINT)
index de3a490..076aac7 100644 (file)
@@ -1440,7 +1440,7 @@ static void do_cmd_wiz_jump(player_type *creature_ptr)
        prepare_change_floor_mode(CFM_RAND_PLACE);
 
        if (!p_ptr->current_floor_ptr->dun_level) creature_ptr->dungeon_idx = 0;
-       creature_ptr->inside_arena = FALSE;
+       creature_ptr->current_floor_ptr->inside_arena = FALSE;
        creature_ptr->wild_mode = FALSE;
 
        leave_quest_check();