OSDN Git Service

[Refactor] #37353 player_type の 闘技場観戦モードフラグ名を inside_arena から phase_out に改名。 (効果としては...
authordeskull <deskull@users.sourceforge.jp>
Mon, 17 Jun 2019 14:44:01 +0000 (23:44 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 17 Jun 2019 14:48:35 +0000 (23:48 +0900)
27 files changed:
src/bldg.c
src/core.c
src/floor-events.c
src/floor-generate.c
src/floor-save.c
src/floor.h
src/gamevalue.h
src/geometry.h
src/load.c
src/melee1.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/player-status.c
src/player-status.h
src/save.c
src/spells-floor.c
src/spells.h
src/spells1.c
src/spells2.c
src/spells3.c
src/util.c
src/view-mainwindow.c

index 5832cbf..fef487b 100644 (file)
@@ -1452,7 +1452,7 @@ void update_gambling_monsters(void)
        int mon_level;
        int power[4];
        bool tekitou;
-       bool old_inside_battle = p_ptr->inside_battle;
+       bool old_inside_battle = p_ptr->phase_out;
 
        for (i = 0; i < max_d_idx; i++)
                if (max_dl < max_dlv[i]) max_dl = max_dlv[i];
@@ -1480,9 +1480,9 @@ void update_gambling_monsters(void)
                        while (1)
                        {
                                get_mon_num_prep(monster_can_entry_arena, NULL);
-                               p_ptr->inside_battle = TRUE;
+                               p_ptr->phase_out = TRUE;
                                r_idx = get_mon_num(mon_level);
-                               p_ptr->inside_battle = old_inside_battle;
+                               p_ptr->phase_out = old_inside_battle;
                                if (!r_idx) continue;
 
                                if ((r_info[r_idx].flags1 & RF1_UNIQUE) || (r_info[r_idx].flags7 & RF7_UNIQUE2))
@@ -1661,10 +1661,10 @@ static bool kakutoujou(void)
                        /* Save the surface floor as saved floor */
                        prepare_change_floor_mode(CFM_SAVE_FLOORS);
 
-                       p_ptr->inside_battle = TRUE;
+                       p_ptr->phase_out = TRUE;
                        p_ptr->leaving = TRUE;
-
                        p_ptr->leave_bldg = TRUE;
+
                        screen_load();
 
                        return (TRUE);
@@ -4125,13 +4125,13 @@ void do_cmd_bldg(void)
 
                return;
        }
-       else if (p_ptr->inside_battle)
+       else if (p_ptr->phase_out)
        {
                /* Don't save the arena as saved floor */
                prepare_change_floor_mode(CFM_SAVE_FLOORS | CFM_NO_RETURN);
 
                p_ptr->leaving = TRUE;
-               p_ptr->inside_battle = FALSE;
+               p_ptr->phase_out = FALSE;
 
                /* Re-enter the monster arena */
                command_new = SPECIAL_KEY_BUILDING;
@@ -4175,7 +4175,7 @@ void do_cmd_bldg(void)
                {
                        p_ptr->leave_bldg = TRUE;
                        p_ptr->inside_arena = FALSE;
-                       p_ptr->inside_battle = FALSE;
+                       p_ptr->phase_out = FALSE;
                        break;
                }
 
@@ -4226,7 +4226,7 @@ void do_cmd_bldg(void)
 void determine_today_mon(bool conv_old)
 {
        int max_dl = 3, i;
-       bool old_inside_battle = p_ptr->inside_battle;
+       bool old_inside_battle = p_ptr->phase_out;
        monster_race *r_ptr;
 
        if (!conv_old)
@@ -4239,7 +4239,7 @@ void determine_today_mon(bool conv_old)
        }
        else max_dl = MAX(max_dlv[DUNGEON_ANGBAND], 3);
 
-       p_ptr->inside_battle = TRUE;
+       p_ptr->phase_out = TRUE;
        get_mon_num_prep(NULL, NULL);
 
        while (1)
@@ -4257,7 +4257,7 @@ void determine_today_mon(bool conv_old)
        }
 
        p_ptr->today_mon = 0;
-       p_ptr->inside_battle = old_inside_battle;
+       p_ptr->phase_out = old_inside_battle;
 }
 
 
index 87c8203..b0507be 100644 (file)
@@ -1265,7 +1265,7 @@ static object_type *choose_cursed_obj_name(BIT_FLAGS flag)
 
 static void process_world_aux_digestion(void)
 {
-       if (!p_ptr->inside_battle)
+       if (!p_ptr->phase_out)
        {
                /* Digest quickly when gorged */
                if (p_ptr->food >= PY_FOOD_MAX)
@@ -2149,7 +2149,7 @@ static void process_world_aux_mutation(void)
        if (!p_ptr->muta2) return;
 
        /* No effect on monster arena */
-       if (p_ptr->inside_battle) return;
+       if (p_ptr->phase_out) return;
 
        /* No effect on the global map */
        if (p_ptr->wild_mode) return;
@@ -2593,7 +2593,7 @@ static void process_world_aux_mutation(void)
  */
 static void process_world_aux_curse(void)
 {
-       if ((p_ptr->cursed & TRC_P_FLAG_MASK) && !p_ptr->inside_battle && !p_ptr->wild_mode)
+       if ((p_ptr->cursed & TRC_P_FLAG_MASK) && !p_ptr->phase_out && !p_ptr->wild_mode)
        {
                /*
                 * Hack: Uncursed teleporting items (e.g. Trump Weapons)
@@ -2938,7 +2938,7 @@ static void process_world_aux_movement(void)
                 * The player is yanked up/down as soon as
                 * he loads the autosaved game.
                 */
-               if (autosave_l && (p_ptr->word_recall == 1) && !p_ptr->inside_battle)
+               if (autosave_l && (p_ptr->word_recall == 1) && !p_ptr->phase_out)
                        do_cmd_save_game(TRUE);
 
                /* Count down towards recall */
@@ -3052,7 +3052,7 @@ static void process_world_aux_movement(void)
        /* Delayed Alter reality */
        if (p_ptr->alter_reality)
        {
-               if (autosave_l && (p_ptr->alter_reality == 1) && !p_ptr->inside_battle)
+               if (autosave_l && (p_ptr->alter_reality == 1) && !p_ptr->phase_out)
                        do_cmd_save_game(TRUE);
 
                /* Count down towards alter */
@@ -3118,7 +3118,7 @@ static void process_world(void)
        }
 
        /*** Check monster arena ***/
-       if (p_ptr->inside_battle && !p_ptr->leaving)
+       if (p_ptr->phase_out && !p_ptr->leaving)
        {
                int i2, j2;
                int win_m_idx = 0;
@@ -3183,7 +3183,7 @@ static void process_world(void)
        if (current_world_ptr->game_turn % TURNS_PER_TICK) return;
 
        /*** Attempt timed autosave ***/
-       if (autosave_t && autosave_freq && !p_ptr->inside_battle)
+       if (autosave_t && autosave_freq && !p_ptr->phase_out)
        {
                if (!(current_world_ptr->game_turn % ((s32b)autosave_freq * TURNS_PER_TICK)))
                        do_cmd_save_game(TRUE);
@@ -3197,7 +3197,7 @@ static void process_world(void)
        /*** Handle the wilderness/town (sunshine) ***/
 
        /* While in town/wilderness */
-       if (!current_floor_ptr->dun_level && !p_ptr->inside_quest && !p_ptr->inside_battle && !p_ptr->inside_arena)
+       if (!current_floor_ptr->dun_level && !p_ptr->inside_quest && !p_ptr->phase_out && !p_ptr->inside_arena)
        {
                /* Hack -- Daybreak/Nighfall in town */
                if (!(current_world_ptr->game_turn % ((TURNS_PER_TICK * TOWN_DAWN) / 2)))
@@ -3214,7 +3214,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->inside_quest && !p_ptr->inside_battle && !p_ptr->inside_arena)) && current_floor_ptr->dun_level)
+       else if ((vanilla_town || (lite_town && !p_ptr->inside_quest && !p_ptr->phase_out && !p_ptr->inside_arena)) && current_floor_ptr->dun_level)
        {
                /*** Shuffle the Storekeepers ***/
 
@@ -3265,14 +3265,14 @@ 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->inside_quest && !p_ptr->inside_battle)
+           !p_ptr->inside_arena && !p_ptr->inside_quest && !p_ptr->phase_out)
        {
                /* Make a new monster */
                (void)alloc_monster(MAX_SIGHT + 5, 0);
        }
 
        /* Hack -- Check for creature regeneration */
-       if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 10)) && !p_ptr->inside_battle) regen_monsters();
+       if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 10)) && !p_ptr->phase_out) regen_monsters();
        if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 3))) regen_captured_monsters();
 
        if (!p_ptr->leaving)
@@ -4429,7 +4429,7 @@ static void process_player(void)
                p_ptr->invoking_midnight_curse = FALSE;
        }
 
-       if (p_ptr->inside_battle)
+       if (p_ptr->phase_out)
        {
                for(m_idx = 1; m_idx < current_floor_ptr->m_max; m_idx++)
                {
@@ -4644,7 +4644,7 @@ static void process_player(void)
                /* Assume free current_world_ptr->game_turn */
                free_turn(p_ptr);
 
-               if (p_ptr->inside_battle)
+               if (p_ptr->phase_out)
                {
                        /* Place the cursor on the player */
                        move_cursor_relative(p_ptr->y, p_ptr->x);
@@ -4997,7 +4997,7 @@ static void dungeon(bool load_game)
            !((quest_num == QUEST_OBERON) || (quest_num == QUEST_SERPENT) ||
            !(quest[quest_num].flags & QUEST_FLAG_PRESET)))) do_cmd_feeling();
 
-       if (p_ptr->inside_battle)
+       if (p_ptr->phase_out)
        {
                if (load_game)
                {
@@ -5049,7 +5049,7 @@ static void dungeon(bool load_game)
 
        current_world_ptr->is_loading_now = TRUE;
 
-       if (p_ptr->energy_need > 0 && !p_ptr->inside_battle &&
+       if (p_ptr->energy_need > 0 && !p_ptr->phase_out &&
            (current_floor_ptr->dun_level || p_ptr->leaving_dungeon || p_ptr->inside_arena))
                p_ptr->energy_need = 0;
 
@@ -5063,10 +5063,10 @@ static void dungeon(bool load_game)
        while (TRUE)
        {
                /* Hack -- Compact the monster list occasionally */
-               if ((current_floor_ptr->m_cnt + 32 > current_floor_ptr->max_m_idx) && !p_ptr->inside_battle) compact_monsters(64);
+               if ((current_floor_ptr->m_cnt + 32 > current_floor_ptr->max_m_idx) && !p_ptr->phase_out) compact_monsters(64);
 
                /* Hack -- Compress the monster list occasionally */
-               if ((current_floor_ptr->m_cnt + 32 < current_floor_ptr->m_max) && !p_ptr->inside_battle) compact_monsters(0);
+               if ((current_floor_ptr->m_cnt + 32 < current_floor_ptr->m_max) && !p_ptr->phase_out) compact_monsters(0);
 
 
                /* Hack -- Compact the object list occasionally */
@@ -5396,7 +5396,7 @@ void play_game(bool new_game)
                current_floor_ptr->dun_level = 0;
                p_ptr->inside_quest = 0;
                p_ptr->inside_arena = FALSE;
-               p_ptr->inside_battle = FALSE;
+               p_ptr->phase_out = FALSE;
 
                write_level = TRUE;
 
index 1be04fb..9eecdeb 100644 (file)
@@ -283,7 +283,7 @@ void update_dungeon_feeling(void)
        if (!current_floor_ptr->dun_level) return;
 
        /* No feeling in the arena */
-       if (p_ptr->inside_battle) return;
+       if (p_ptr->phase_out) return;
 
        /* Extract delay time */
        delay = MAX(10, 150 - p_ptr->skill_fos) * (150 - current_floor_ptr->dun_level) * TURNS_PER_TICK / 100;
@@ -1551,7 +1551,7 @@ void update_mon_lite(void)
                        if (!rad) continue;
                        else if (rad > 0)
                        {
-                               if (!(r_ptr->flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2)) && (MON_CSLEEP(m_ptr) || (!current_floor_ptr->dun_level && is_daytime()) || p_ptr->inside_battle)) continue;
+                               if (!(r_ptr->flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2)) && (MON_CSLEEP(m_ptr) || (!current_floor_ptr->dun_level && is_daytime()) || p_ptr->phase_out)) continue;
                                if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) rad = 1;
                                add_mon_lite = mon_lite_hack;
                                f_flag = FF_LOS;
index e458cd5..bcba35d 100644 (file)
@@ -1412,7 +1412,7 @@ void generate_random_floor(void)
                }
 
                /* Build the battle -KMW- */
-               else if (p_ptr->inside_battle)
+               else if (p_ptr->phase_out)
                {
                        /* Small arena */
                        generate_gambling_arena();
index 176f804..9d7b621 100644 (file)
@@ -420,7 +420,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->inside_battle)
+       if (!p_ptr->wild_mode && !p_ptr->inside_arena && !p_ptr->phase_out)
        {
                for (i = current_floor_ptr->m_max - 1, num = 1; (i >= 1 && num < MAX_PARTY_MON); i--)
                {
index dc31414..0437c76 100644 (file)
@@ -340,7 +340,7 @@ typedef struct {
  * Note the use of comparison to zero to force a "boolean" result
  */
 #define player_has_los_bold(Y,X) \
-    (((current_floor_ptr->grid_array[Y][X].info & (CAVE_VIEW)) != 0) || p_ptr->inside_battle)
+    (((current_floor_ptr->grid_array[Y][X].info & (CAVE_VIEW)) != 0) || p_ptr->phase_out)
 
 
 /*
index b6c000d..cc7d8f6 100644 (file)
@@ -33,7 +33,7 @@
 * More maximum values
 */
 #define MAX_SIGHT       20      /*!< プレイヤーの最大視界範囲(マス) / Maximum view distance */
-#define MAX_RANGE       (p_ptr->inside_battle ? 36 : 18)      /*!< プレイヤーの攻撃射程(マス) / Maximum range (spells, etc) */
+#define MAX_RANGE       (p_ptr->phase_out ? 36 : 18)      /*!< プレイヤーの攻撃射程(マス) / Maximum range (spells, etc) */
 #define AAF_LIMIT       100     /*!< モンスターの限界感知範囲(マス) Limit of sensing radius */
 
 #define MIN_M_ALLOC_TD          4 /*!< 街(昼間)の最低住人配置数 / The town starts out with 4 residents during the day */
index ad126b4..354d2f6 100644 (file)
@@ -83,6 +83,6 @@ struct coord
  * Is the monster seen by the player?
  */
 #define is_seen(A) \
-       ((bool)((A)->ml && (!ignore_unview || p_ptr->inside_battle || \
+       ((bool)((A)->ml && (!ignore_unview || p_ptr->phase_out || \
         (player_can_see_bold((A)->fy, (A)->fx) && projectable(p_ptr->y, p_ptr->x, (A)->fy, (A)->fx)))))
 
index 7f9baa6..7c841ca 100644 (file)
@@ -1967,11 +1967,11 @@ static void rd_extra(void)
        rd_s16b(&tmp16s);
        p_ptr->inside_arena = (bool)tmp16s;
        rd_s16b(&p_ptr->inside_quest);
-       if (z_older_than(10, 3, 5)) p_ptr->inside_battle = FALSE;
+       if (z_older_than(10, 3, 5)) p_ptr->phase_out = FALSE;
        else
        {
                rd_s16b(&tmp16s);
-               p_ptr->inside_battle = (bool)tmp16s;
+               p_ptr->phase_out = (bool)tmp16s;
        }
        rd_byte(&p_ptr->exit_bldg);
        rd_byte(&tmp8u);
index 6ffc91d..1f0dcf5 100644 (file)
@@ -4813,7 +4813,7 @@ void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear,
        {
                if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) ||
                        (r_ptr->flags7 & RF7_NAZGUL)) &&
-                       !p_ptr->inside_battle)
+                       !p_ptr->phase_out)
                {
                        m_ptr->hp = 1;
                }
index 42e65d7..eeb1297 100644 (file)
@@ -72,7 +72,7 @@ static bool get_enemy_dir(MONSTER_IDX m_idx, int *mm)
        }
        else
        {
-               if (p_ptr->inside_battle)
+               if (p_ptr->phase_out)
                {
                        start = randint1(current_floor_ptr->m_max-1)+current_floor_ptr->m_max;
                        if(randint0(2)) plus = -1;
@@ -1370,7 +1370,7 @@ void process_monster(MONSTER_IDX m_idx)
                if(dead) return;
        }
 
-       if ((is_pet(m_ptr) || is_friendly(m_ptr)) && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
+       if ((is_pet(m_ptr) || is_friendly(m_ptr)) && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->phase_out)
        {
                static int riding_pinch = 0;
 
@@ -1471,7 +1471,7 @@ void process_monster(MONSTER_IDX m_idx)
                gets_angry = TRUE;
        }
 
-       if (p_ptr->inside_battle) gets_angry = FALSE;
+       if (p_ptr->phase_out) gets_angry = FALSE;
 
        if (gets_angry)
        {
@@ -1532,7 +1532,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->inside_battle)
+                       if (!p_ptr->inside_arena && !p_ptr->phase_out)
                        {
                                if (r_ptr->freq_spell && (randint1(100) <= r_ptr->freq_spell))
                                {
@@ -1554,7 +1554,7 @@ void process_monster(MONSTER_IDX m_idx)
                }
        }
 
-       if (!p_ptr->inside_battle)
+       if (!p_ptr->phase_out)
        {
                /* Hack! "Cyber" monster makes noise... */
                if (m_ptr->ap_r_idx == MON_CYBER &&
@@ -2373,7 +2373,7 @@ void process_monster(MONSTER_IDX m_idx)
 
        /* Notice changes in view */
        if (do_move && ((r_ptr->flags7 & (RF7_SELF_LD_MASK | RF7_HAS_DARK_1 | RF7_HAS_DARK_2))
-               || ((r_ptr->flags7 & (RF7_HAS_LITE_1 | RF7_HAS_LITE_2)) && !p_ptr->inside_battle)))
+               || ((r_ptr->flags7 & (RF7_HAS_LITE_1 | RF7_HAS_LITE_2)) && !p_ptr->phase_out)))
        {
                p_ptr->update |= (PU_MON_LITE);
        }
@@ -2568,7 +2568,7 @@ void process_monsters(void)
                }
 
                /* Handle "sight" and "aggravation" */
-        else if ((m_ptr->cdis <= MAX_SIGHT || p_ptr->inside_battle) &&
+        else if ((m_ptr->cdis <= MAX_SIGHT || p_ptr->phase_out) &&
                        (player_has_los_bold(fy, fx) || (p_ptr->cursed & TRC_AGGRAVATE)))
                {
                        /* We can "see" or "feel" the player */
index 0de1701..d7a172f 100644 (file)
@@ -120,7 +120,7 @@ static void get_exp_from_mon(HIT_POINT dam, monster_type *m_ptr)
        u32b div_l;
 
        if (!monster_is_valid(m_ptr)) return;
-       if (is_pet(m_ptr) || p_ptr->inside_battle) return;
+       if (is_pet(m_ptr) || p_ptr->phase_out) return;
 
        /*
         * - Ratio of monster's level to player's level effects
@@ -887,7 +887,7 @@ void monster_gain_exp(MONSTER_IDX m_idx, MONRACE_IDX s_idx)
        r_ptr = &r_info[m_ptr->r_idx];
        s_ptr = &r_info[s_idx];
 
-       if (p_ptr->inside_battle) return;
+       if (p_ptr->phase_out) return;
 
        if (!r_ptr->next_exp) return;
 
@@ -1352,7 +1352,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->inside_battle))
+               if ((m_ptr->r_idx == MON_IKETA) && !(p_ptr->inside_arena || p_ptr->phase_out))
                {
                        POSITION dummy_y = m_ptr->fy;
                        POSITION dummy_x = m_ptr->fx;
index bdf9777..784f51c 100644 (file)
@@ -2234,7 +2234,7 @@ void set_pet(monster_type *m_ptr)
  */
 void set_hostile(monster_type *m_ptr)
 {
-       if (p_ptr->inside_battle) return;
+       if (p_ptr->phase_out) return;
        m_ptr->smart &= ~SM_PET;
        m_ptr->smart &= ~SM_FRIENDLY;
 }
@@ -2248,7 +2248,7 @@ void set_hostile(monster_type *m_ptr)
  */
 void anger_monster(monster_type *m_ptr)
 {
-       if (p_ptr->inside_battle) return;
+       if (p_ptr->phase_out) return;
        if (is_friendly(m_ptr))
        {
                GAME_TEXT m_name[MAX_NLEN];
@@ -2407,7 +2407,7 @@ bool are_enemies(monster_type *m_ptr, monster_type *n_ptr)
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
        monster_race *s_ptr = &r_info[n_ptr->r_idx];
 
-       if (p_ptr->inside_battle)
+       if (p_ptr->phase_out)
        {
                if (is_pet(m_ptr) || is_pet(n_ptr)) return FALSE;
                return TRUE;
@@ -2541,7 +2541,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
        object_type *q_ptr;
 
        bool drop_chosen_item = drop_item && !cloned && !p_ptr->inside_arena
-               && !p_ptr->inside_battle && !is_pet(m_ptr);
+               && !p_ptr->phase_out && !is_pet(m_ptr);
 
        /* The caster is dead? */
        if (current_world_ptr->timewalk_m_idx && current_world_ptr->timewalk_m_idx == m_idx) current_world_ptr->timewalk_m_idx = 0;
@@ -2634,7 +2634,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->inside_battle || cloned || ((m_ptr->r_idx == today_mon) && is_pet(m_ptr))))
+               !(p_ptr->inside_arena || p_ptr->phase_out || cloned || ((m_ptr->r_idx == today_mon) && is_pet(m_ptr))))
        {
                /* Assume skeleton */
                bool corpse = FALSE;
@@ -2682,7 +2682,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->inside_battle))
+               if (!(p_ptr->inside_arena || p_ptr->phase_out))
                {
                        bool notice = FALSE;
 
@@ -2741,7 +2741,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->inside_battle)
+               if (!p_ptr->inside_arena && !p_ptr->phase_out)
                {
                        if (!one_in_(7))
                        {
@@ -3040,7 +3040,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->inside_battle || p_ptr->inside_arena)
+       if (is_pet(m_ptr) || p_ptr->phase_out || p_ptr->inside_arena)
                number = 0; /* Pets drop no stuff */
        if (!drop_item && (r_ptr->d_char != '$')) number = 0;
 
@@ -3088,7 +3088,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
 
        /* Only process "Quest Monsters" */
        if (!(r_ptr->flags1 & RF1_QUESTOR)) return;
-       if (p_ptr->inside_battle) return;
+       if (p_ptr->phase_out) return;
 
        /* Winner? */
        if ((m_ptr->r_idx == MON_SERPENT) && !cloned)
index fa82f4a..96b0dfd 100644 (file)
@@ -1063,7 +1063,7 @@ errr get_mon_num_prep(monsterrace_hook_type monster_hook,
                    (get_mon_num2_hook && !((*get_mon_num2_hook)(entry->index))))
                        continue;
 
-               if (!p_ptr->inside_battle && !chameleon_change_m_idx &&
+               if (!p_ptr->phase_out && !chameleon_change_m_idx &&
                    summon_specific_type != SUMMON_GUARDIANS)
                {
                        /* Hack -- don't create questors */
@@ -1083,7 +1083,7 @@ errr get_mon_num_prep(monsterrace_hook_type monster_hook,
                entry->prob2 = entry->prob1;
 
                if (current_floor_ptr->dun_level && (!p_ptr->inside_quest || is_fixed_quest_idx(p_ptr->inside_quest)) &&
-                       !restrict_monster_to_dungeon(p_ptr->dungeon_idx, entry->index) && !p_ptr->inside_battle)
+                       !restrict_monster_to_dungeon(p_ptr->dungeon_idx, entry->index) && !p_ptr->phase_out)
                {
                        int hoge = entry->prob2 * d_info[p_ptr->dungeon_idx].special_div;
                        entry->prob2 = hoge / 64;
@@ -1145,7 +1145,7 @@ MONRACE_IDX get_mon_num(DEPTH level)
        }
 
        /* Boost the level */
-       if (!p_ptr->inside_battle && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_BEGINNER))
+       if (!p_ptr->phase_out && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_BEGINNER))
        {
                /* Nightmare mode allows more out-of depth monsters */
                if (ironman_nightmare && !randint0(pls_kakuritu))
@@ -1185,7 +1185,7 @@ MONRACE_IDX get_mon_num(DEPTH level)
                /* Access the actual race */
                r_ptr = &r_info[r_idx];
 
-               if (!p_ptr->inside_battle && !chameleon_change_m_idx)
+               if (!p_ptr->phase_out && !chameleon_change_m_idx)
                {
                        /* Hack -- "unique" monsters must be "unique" */
                        if (((r_ptr->flags1 & (RF1_UNIQUE)) ||
@@ -1535,7 +1535,7 @@ void monster_desc(char *desc, monster_type *m_ptr, BIT_FLAGS mode)
                        }
 
                        /* Inside monster arena, and it is not your mount */
-                       else if (p_ptr->inside_battle &&
+                       else if (p_ptr->phase_out &&
                                 !(p_ptr->riding && (&current_floor_ptr->m_list[p_ptr->riding] == m_ptr)))
                        {
                                /* It is a fake unique monster */
@@ -2534,7 +2534,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
                if (!monster_can_enter(y, x, r_ptr, 0)) return FALSE;
        }
 
-       if (!p_ptr->inside_battle)
+       if (!p_ptr->phase_out)
        {
                /* Hack -- "unique" monsters must be "unique" */
                if (((r_ptr->flags1 & (RF1_UNIQUE)) ||
index 62158ee..5a776cb 100644 (file)
@@ -811,7 +811,7 @@ static bool spell_world(byte spell)
  */
 static bool spell_special(byte spell)
 {
-       if (p_ptr->inside_battle) return FALSE;
+       if (p_ptr->phase_out) return FALSE;
        if (spell == 160 + 7) return (TRUE);
        return (FALSE);
 }
@@ -1577,7 +1577,7 @@ bool make_attack_spell(MONSTER_IDX m_idx)
        /* Remove the "ineffective" spells */
        remove_bad_spells(m_idx, &f4, &f5, &f6);
 
-       if (p_ptr->inside_arena || p_ptr->inside_battle)
+       if (p_ptr->inside_arena || p_ptr->phase_out)
        {
                f4 &= ~(RF4_SUMMON_MASK);
                f5 &= ~(RF5_SUMMON_MASK);
index ee2e654..b2ffc18 100644 (file)
@@ -354,7 +354,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
        {
                bool success = FALSE;
 
-               if (p_ptr->inside_battle)
+               if (p_ptr->phase_out)
                {
                        start = randint1(current_floor_ptr->m_max-1) + current_floor_ptr->m_max;
                        if (randint0(2)) plus = -1;
@@ -434,7 +434,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
                f6 &= (RF6_NOMAGIC_MASK);
        }
 
-       if (p_ptr->inside_arena || p_ptr->inside_battle)
+       if (p_ptr->inside_arena || p_ptr->phase_out)
        {
                f4 &= ~(RF4_SUMMON_MASK);
                f5 &= ~(RF5_SUMMON_MASK);
@@ -443,7 +443,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
                if (m_ptr->r_idx == MON_ROLENTO) f6 &= ~(RF6_SPECIAL);
        }
 
-       if (p_ptr->inside_battle && !one_in_(3))
+       if (p_ptr->phase_out && !one_in_(3))
        {
                f6 &= ~(RF6_HEAL);
        }
index c275982..4a597ae 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->inside_battle || !summon_possible(m_ptr->fy, m_ptr->fx)) 
+                       if (p_ptr->inside_arena || p_ptr->phase_out || !summon_possible(m_ptr->fy, m_ptr->fx)) 
                                return -1;
 
                        delete_monster_idx(current_floor_ptr->grid_array[m_ptr->fy][m_ptr->fx].m_idx);
index 893c486..522b0bc 100644 (file)
@@ -5205,7 +5205,7 @@ void sanity_blast(monster_type *m_ptr, bool necro)
 {
        int power = 100;
 
-       if (p_ptr->inside_battle || !current_world_ptr->character_dungeon) return;
+       if (p_ptr->phase_out || !current_world_ptr->character_dungeon) return;
 
        if (!necro && m_ptr)
        {
@@ -5847,7 +5847,7 @@ void cheat_death(player_type *creature_ptr)
 
        current_floor_ptr->dun_level = 0;
        creature_ptr->inside_arena = FALSE;
-       creature_ptr->inside_battle = FALSE;
+       creature_ptr->phase_out = FALSE;
        leaving_quest = 0;
        creature_ptr->inside_quest = 0;
        if (p_ptr->dungeon_idx) creature_ptr->recall_dungeon = p_ptr->dungeon_idx;
index 9eb7cee..6c9135e 100644 (file)
@@ -121,7 +121,7 @@ struct player_type
        s16b arena_number;              /* monster number in arena -KMW- */
        bool inside_arena;              /* Is character inside arena? */
        QUEST_IDX inside_quest;         /* Inside quest level */
-       bool inside_battle;             /* Is character inside tougijou? */
+       bool phase_out;         /*!< フェイズアウト状態(闘技場観戦状態などに利用、NPCの処理の対象にならず自身もほとんどの行動ができない) */
 
        DUNGEON_IDX dungeon_idx; /* current dungeon index */
        POSITION wilderness_x;  /* Coordinates in the wilderness */
index fc3b733..e7d39b9 100644 (file)
@@ -697,7 +697,7 @@ static void wr_extra(void)
        wr_s16b(p_ptr->arena_number);
        wr_s16b(p_ptr->inside_arena);
        wr_s16b(p_ptr->inside_quest);
-       wr_s16b(p_ptr->inside_battle);
+       wr_s16b(p_ptr->phase_out);
        wr_byte(p_ptr->exit_bldg);
        wr_byte(0); /* Unused */
 
index 1816428..1f36a9b 100644 (file)
@@ -282,7 +282,7 @@ void stair_creation(void)
        /* No effect out of standard dungeon floor */
        if (!current_floor_ptr->dun_level || (!up && !down) ||
                (p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)) ||
-               p_ptr->inside_arena || p_ptr->inside_battle)
+               p_ptr->inside_arena || p_ptr->phase_out)
        {
                /* arena or quest */
                msg_print(_("効果がありません!", "There is no effect!"));
index 841ebd6..ea67f94 100644 (file)
@@ -341,7 +341,7 @@ extern bool tele_town(void);
 
 /* Is "teleport level" ineffective to this target? */
 #define TELE_LEVEL_IS_INEFF(TARGET) \
-       (p_ptr->inside_arena || p_ptr->inside_battle || \
+       (p_ptr->inside_arena || p_ptr->phase_out || \
         (p_ptr->inside_quest && !random_quest_number(current_floor_ptr->dun_level)) || \
         (((TARGET) <= 0) && (quest_number(current_floor_ptr->dun_level) || (current_floor_ptr->dun_level >= d_info[p_ptr->dungeon_idx].maxdepth)) && \
          (current_floor_ptr->dun_level >= 1) && ironman_downward))
index a8a8a76..fbe853a 100644 (file)
@@ -597,7 +597,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                case GF_DARK_WEAK:
                case GF_DARK:
                {
-                       bool do_dark = !p_ptr->inside_battle && !is_mirror_grid(g_ptr);
+                       bool do_dark = !p_ptr->phase_out && !is_mirror_grid(g_ptr);
                        int j;
 
                        /* Turn off the light. */
@@ -1154,7 +1154,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        bool obvious = FALSE;
 
        /* Can the player know about this effect? */
-       bool known = ((m_ptr->cdis <= MAX_SIGHT) || p_ptr->inside_battle);
+       bool known = ((m_ptr->cdis <= MAX_SIGHT) || p_ptr->phase_out);
 
        /* Were the effects "irrelevant"? */
        bool skipped = FALSE;
@@ -3613,7 +3613,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_poly = FALSE;
 
        /* "Unique" and "quest" monsters can only be "killed" by the player. */
-       if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
+       if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->phase_out)
        {
                if (who && (dam > m_ptr->hp)) dam = m_ptr->hp;
        }
@@ -3901,7 +3901,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                blood_curse_to_enemy(who);
        }
 
-       if (p_ptr->inside_battle)
+       if (p_ptr->phase_out)
        {
                p_ptr->health_who = g_ptr->m_idx;
                p_ptr->redraw |= (PR_HEALTH);
index 82296d1..52465c7 100644 (file)
@@ -1033,7 +1033,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->inside_quest && !random_quest_number(current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle) resist = TRUE;
+       else if ((p_ptr->inside_quest && !random_quest_number(current_floor_ptr->dun_level)) || p_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;
 
@@ -1112,7 +1112,7 @@ bool symbol_genocide(int power, bool player_cast)
        bool result = FALSE;
 
        /* Prevent genocide in quest levels */
-       if ((p_ptr->inside_quest && !random_quest_number(current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
+       if ((p_ptr->inside_quest && !random_quest_number(current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->phase_out)
        {
                msg_print(_("何も起きないようだ……", "It seems nothing happen here..."));
                return (FALSE);
@@ -1156,7 +1156,7 @@ bool mass_genocide(int power, bool player_cast)
        bool result = FALSE;
 
        /* Prevent mass genocide in quest levels */
-       if ((p_ptr->inside_quest && !random_quest_number(current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
+       if ((p_ptr->inside_quest && !random_quest_number(current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->phase_out)
        {
                return (FALSE);
        }
@@ -1196,7 +1196,7 @@ bool mass_genocide_undead(int power, bool player_cast)
        bool result = FALSE;
 
        /* Prevent mass genocide in quest levels */
-       if ((p_ptr->inside_quest && !random_quest_number(current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
+       if ((p_ptr->inside_quest && !random_quest_number(current_floor_ptr->dun_level)) || p_ptr->inside_arena || p_ptr->phase_out)
        {
                return (FALSE);
        }
@@ -4401,7 +4401,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->inside_battle
+               && one_in_(2) && !creature_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 de77035..5fa7de6 100644 (file)
@@ -541,7 +541,7 @@ void teleport_away_followable(MONSTER_IDX m_idx)
 
        teleport_away(m_idx, MAX_SIGHT * 2 + 5, 0L);
 
-       if (old_ml && (old_cdis <= MAX_SIGHT) && !current_world_ptr->timewalk_m_idx && !p_ptr->inside_battle && los(p_ptr->y, p_ptr->x, oldfy, oldfx))
+       if (old_ml && (old_cdis <= MAX_SIGHT) && !current_world_ptr->timewalk_m_idx && !p_ptr->phase_out && los(p_ptr->y, p_ptr->x, oldfy, oldfx))
        {
                bool follow = FALSE;
 
@@ -3213,7 +3213,7 @@ bool polymorph_monster(POSITION y, POSITION x)
        bool health_tracked = (p_ptr->health_who == g_ptr->m_idx) ? TRUE : FALSE;
        monster_type back_m;
 
-       if (p_ptr->inside_arena || p_ptr->inside_battle) return (FALSE);
+       if (p_ptr->inside_arena || p_ptr->phase_out) return (FALSE);
 
        if ((p_ptr->riding == g_ptr->m_idx) || (m_ptr->mflag2 & MFLAG2_KAGE)) return (FALSE);
 
@@ -3968,7 +3968,7 @@ bool tele_town(void)
                return FALSE;
        }
 
-       if (p_ptr->inside_arena || p_ptr->inside_battle)
+       if (p_ptr->inside_arena || p_ptr->phase_out)
        {
                msg_print(_("この魔法は外でしか使えない!", "This spell can only be used outside!"));
                return FALSE;
index 75da14c..915e74a 100644 (file)
@@ -1824,7 +1824,7 @@ void select_floor_music(void)
                return;
        }
 
-       if(p_ptr->inside_battle)
+       if(p_ptr->phase_out)
        {
                play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BATTLE);
                return;
index ebee239..95b6e49 100644 (file)
@@ -196,7 +196,7 @@ concptr map_name(void)
                return _("地上", "Surface");
        else if (p_ptr->inside_arena)
                return _("アリーナ", "Arena");
-       else if (p_ptr->inside_battle)
+       else if (p_ptr->phase_out)
                return _("闘技場", "Monster Arena");
        else if (!current_floor_ptr->dun_level && p_ptr->town_num)
                return town_info[p_ptr->town_num].name;
@@ -1393,7 +1393,7 @@ static void health_redraw(bool riding)
 
        m_ptr = &current_floor_ptr->m_list[health_who];
 
-       if (p_ptr->wizard && p_ptr->inside_battle)
+       if (p_ptr->wizard && p_ptr->phase_out)
        {
                row = ROW_INFO - 2;
                col = COL_INFO + 2;