• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision3b87c7250e7a560a11398daa278da2018efaeff8 (tree)
Time2019-02-27 14:08:03
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38993 m_list と max_m_idx を floor_type に取り込む。 / Move m_list and max_m_idx to floor_type structure.

Change Summary

Incremental Difference

--- a/src/birth.c
+++ b/src/birth.c
@@ -4548,7 +4548,7 @@ void player_birth(void)
45484548
45494549 /*
45504550 * Wipe monsters in old dungeon
4551- * This wipe destroys value of m_list[].cur_num .
4551+ * This wipe destroys value of current_floor_ptr->m_list[].cur_num .
45524552 */
45534553 wipe_m_list();
45544554
--- a/src/cmd-activate.c
+++ b/src/cmd-activate.c
@@ -308,8 +308,8 @@ static bool ang_sort_comp_pet(vptr u, vptr v, int a, int b)
308308 int w1 = who[a];
309309 int w2 = who[b];
310310
311- monster_type *m_ptr1 = &m_list[w1];
312- monster_type *m_ptr2 = &m_list[w2];
311+ monster_type *m_ptr1 = &current_floor_ptr->m_list[w1];
312+ monster_type *m_ptr2 = &current_floor_ptr->m_list[w2];
313313 monster_race *r_ptr1 = &r_info[m_ptr1->r_idx];
314314 monster_race *r_ptr2 = &r_info[m_ptr2->r_idx];
315315
@@ -463,12 +463,12 @@ void do_cmd_activate_aux(INVENTORY_IDX item)
463463 u16b dummy_why;
464464
465465 /* Allocate the "who" array */
466- C_MAKE(who, max_m_idx, MONSTER_IDX);
466+ C_MAKE(who, current_floor_ptr->max_m_idx, MONSTER_IDX);
467467
468468 /* Process the monsters (backwards) */
469469 for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
470470 {
471- if (is_pet(&m_list[pet_ctr]) && (p_ptr->riding != pet_ctr))
471+ if (is_pet(&current_floor_ptr->m_list[pet_ctr]) && (p_ptr->riding != pet_ctr))
472472 who[max_pet++] = pet_ctr;
473473 }
474474
@@ -486,7 +486,7 @@ void do_cmd_activate_aux(INVENTORY_IDX item)
486486 }
487487
488488 /* Free the "who" array */
489- C_KILL(who, max_m_idx, IDX);
489+ C_KILL(who, current_floor_ptr->max_m_idx, IDX);
490490 }
491491 o_ptr->timeout = 100 + randint1(100);
492492 return;
@@ -557,10 +557,10 @@ void do_cmd_activate_aux(INVENTORY_IDX item)
557557 {
558558 if (place_monster_aux(0, p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
559559 {
560- if (o_ptr->xtra3) m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
561- if (o_ptr->xtra5) m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
562- if (o_ptr->xtra4) m_list[hack_m_idx_ii].hp = o_ptr->xtra4;
563- m_list[hack_m_idx_ii].maxhp = m_list[hack_m_idx_ii].max_maxhp;
560+ if (o_ptr->xtra3) current_floor_ptr->m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
561+ if (o_ptr->xtra5) current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
562+ if (o_ptr->xtra4) current_floor_ptr->m_list[hack_m_idx_ii].hp = o_ptr->xtra4;
563+ current_floor_ptr->m_list[hack_m_idx_ii].maxhp = current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp;
564564 if (o_ptr->inscription)
565565 {
566566 char buf[80];
@@ -602,7 +602,7 @@ void do_cmd_activate_aux(INVENTORY_IDX item)
602602 s--;
603603 #endif
604604 *s = '\0';
605- m_list[hack_m_idx_ii].nickname = quark_add(buf);
605+ current_floor_ptr->m_list[hack_m_idx_ii].nickname = quark_add(buf);
606606 t = quark_str(o_ptr->inscription);
607607 s = buf;
608608 while(*t && (*t != '#'))
@@ -1605,7 +1605,7 @@ bool activate_artifact(object_type *o_ptr)
16051605 for (i = m_max - 1; i >= 1; i--)
16061606 {
16071607 /* Access the monster */
1608- m_ptr = &m_list[i];
1608+ m_ptr = &current_floor_ptr->m_list[i];
16091609
16101610 /* Ignore "dead" monsters */
16111611 if (!m_ptr->r_idx) continue;
--- a/src/cmd-pet.c
+++ b/src/cmd-pet.c
@@ -65,8 +65,8 @@ static bool ang_sort_comp_pet_dismiss(vptr u, vptr v, int a, int b)
6565 int w1 = who[a];
6666 int w2 = who[b];
6767
68- monster_type *m_ptr1 = &m_list[w1];
69- monster_type *m_ptr2 = &m_list[w2];
68+ monster_type *m_ptr1 = &current_floor_ptr->m_list[w1];
69+ monster_type *m_ptr2 = &current_floor_ptr->m_list[w2];
7070 monster_race *r_ptr1 = &r_info[m_ptr1->r_idx];
7171 monster_race *r_ptr2 = &r_info[m_ptr2->r_idx];
7272
@@ -114,7 +114,7 @@ int calculate_upkeep(void)
114114 monster_type *m_ptr;
115115 monster_race *r_ptr;
116116
117- m_ptr = &m_list[m_idx];
117+ m_ptr = &current_floor_ptr->m_list[m_idx];
118118 if (!m_ptr->r_idx) continue;
119119 r_ptr = &r_info[m_ptr->r_idx];
120120
@@ -180,12 +180,12 @@ void do_cmd_pet_dismiss(void)
180180 Term->scr->cv = 1;
181181
182182 /* Allocate the "who" array */
183- C_MAKE(who, max_m_idx, MONSTER_IDX);
183+ C_MAKE(who, current_floor_ptr->max_m_idx, MONSTER_IDX);
184184
185185 /* Process the monsters (backwards) */
186186 for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
187187 {
188- if (is_pet(&m_list[pet_ctr]))
188+ if (is_pet(&current_floor_ptr->m_list[pet_ctr]))
189189 who[max_pet++] = pet_ctr;
190190 }
191191
@@ -204,7 +204,7 @@ void do_cmd_pet_dismiss(void)
204204
205205 /* Access the monster */
206206 pet_ctr = who[i];
207- m_ptr = &m_list[pet_ctr];
207+ m_ptr = &current_floor_ptr->m_list[pet_ctr];
208208
209209 delete_this = FALSE;
210210 kakunin = ((pet_ctr == p_ptr->riding) || (m_ptr->nickname));
@@ -286,7 +286,7 @@ void do_cmd_pet_dismiss(void)
286286 Term->scr->cv = cv;
287287 Term_fresh();
288288
289- C_KILL(who, max_m_idx, MONSTER_IDX);
289+ C_KILL(who, current_floor_ptr->max_m_idx, MONSTER_IDX);
290290
291291 #ifdef JP
292292 msg_format("%d 体のペットを放しました。", Dismissed);
@@ -348,7 +348,7 @@ bool do_riding(bool force)
348348 {
349349 if (cmd_limit_confused(p_ptr)) return FALSE;
350350
351- m_ptr = &m_list[g_ptr->m_idx];
351+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
352352
353353 if (!g_ptr->m_idx || !m_ptr->ml)
354354 {
@@ -444,7 +444,7 @@ static void do_name_pet(void)
444444
445445 if (current_floor_ptr->grid_array[target_row][target_col].m_idx)
446446 {
447- m_ptr = &m_list[current_floor_ptr->grid_array[target_row][target_col].m_idx];
447+ m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[target_row][target_col].m_idx];
448448
449449 if (!is_pet(m_ptr))
450450 {
@@ -532,10 +532,10 @@ void do_cmd_pet(void)
532532
533533 #ifdef JP
534534 sprintf(target_buf, "ペットのターゲットを指定 (現在:%s)",
535- (pet_t_m_idx ? (p_ptr->image ? "何か奇妙な物" : (r_name + r_info[m_list[pet_t_m_idx].ap_r_idx].name)) : "指定なし"));
535+ (pet_t_m_idx ? (p_ptr->image ? "何か奇妙な物" : (r_name + r_info[current_floor_ptr->m_list[pet_t_m_idx].ap_r_idx].name)) : "指定なし"));
536536 #else
537537 sprintf(target_buf, "specify a target of pet (now:%s)",
538- (pet_t_m_idx ? (p_ptr->image ? "something strange" : (r_name + r_info[m_list[pet_t_m_idx].ap_r_idx].name)) : "nothing"));
538+ (pet_t_m_idx ? (p_ptr->image ? "something strange" : (r_name + r_info[current_floor_ptr->m_list[pet_t_m_idx].ap_r_idx].name)) : "nothing"));
539539 #endif
540540 power_desc[num] = target_buf;
541541 powers[num++] = PET_TARGET;
@@ -859,7 +859,7 @@ void do_cmd_pet(void)
859859 for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
860860 {
861861 /* Player has pet */
862- if (is_pet(&m_list[pet_ctr])) break;
862+ if (is_pet(&current_floor_ptr->m_list[pet_ctr])) break;
863863 }
864864
865865 if (!pet_ctr)
@@ -878,7 +878,7 @@ void do_cmd_pet(void)
878878 else
879879 {
880880 grid_type *g_ptr = &current_floor_ptr->grid_array[target_row][target_col];
881- if (g_ptr->m_idx && (m_list[g_ptr->m_idx].ml))
881+ if (g_ptr->m_idx && (current_floor_ptr->m_list[g_ptr->m_idx].ml))
882882 {
883883 pet_t_m_idx = current_floor_ptr->grid_array[target_row][target_col].m_idx;
884884 p_ptr->pet_follow_distance = PET_DESTROY_DIST;
@@ -937,7 +937,7 @@ void do_cmd_pet(void)
937937 for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
938938 {
939939 /* Access the monster */
940- m_ptr = &m_list[pet_ctr];
940+ m_ptr = &current_floor_ptr->m_list[pet_ctr];
941941
942942 if (is_pet(m_ptr))
943943 {
@@ -1042,7 +1042,7 @@ bool rakuba(HIT_POINT dam, bool force)
10421042 int i, y, x, oy, ox;
10431043 int sn = 0, sy = 0, sx = 0;
10441044 GAME_TEXT m_name[MAX_NLEN];
1045- monster_type *m_ptr = &m_list[p_ptr->riding];
1045+ monster_type *m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
10461046 monster_race *r_ptr = &r_info[m_ptr->r_idx];
10471047 bool fall_dam = FALSE;
10481048
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -2580,7 +2580,7 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
25802580 if (current_floor_ptr->grid_array[y][x].m_idx)
25812581 {
25822582 grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
2583- monster_type *m_ptr = &m_list[g_ptr->m_idx];
2583+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
25842584
25852585 /* Check the visibility */
25862586 visible = m_ptr->ml;
@@ -2713,17 +2713,17 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
27132713
27142714 if (potion_smash_effect(0, y, x, q_ptr->k_idx))
27152715 {
2716- monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[y][x].m_idx];
2716+ monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx];
27172717
27182718 /* ToDo (Robert): fix the invulnerability */
27192719 if (current_floor_ptr->grid_array[y][x].m_idx &&
2720- is_friendly(&m_list[current_floor_ptr->grid_array[y][x].m_idx]) &&
2720+ is_friendly(&current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx]) &&
27212721 !MON_INVULNER(m_ptr))
27222722 {
27232723 GAME_TEXT m_name[MAX_NLEN];
2724- monster_desc(m_name, &m_list[current_floor_ptr->grid_array[y][x].m_idx], 0);
2724+ monster_desc(m_name, &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx], 0);
27252725 msg_format(_("%sは怒った!", "%^s gets angry!"), m_name);
2726- set_hostile(&m_list[current_floor_ptr->grid_array[y][x].m_idx]);
2726+ set_hostile(&current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx]);
27272727 }
27282728 }
27292729 do_drop = FALSE;
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -5851,7 +5851,7 @@ static void do_cmd_knowledge_pets(void)
58515851 for (i = m_max - 1; i >= 1; i--)
58525852 {
58535853 /* Access the monster */
5854- m_ptr = &m_list[i];
5854+ m_ptr = &current_floor_ptr->m_list[i];
58555855
58565856 /* Ignore "dead" monsters */
58575857 if (!m_ptr->r_idx) continue;
--- a/src/defines.h
+++ b/src/defines.h
@@ -3246,7 +3246,7 @@
32463246 (bool)(((A)->smart & SM_FRIENDLY) ? TRUE : FALSE)
32473247
32483248 #define is_friendly_idx(IDX) \
3249- (bool)((IDX) > 0 && is_friendly(&m_list[(IDX)]))
3249+ (bool)((IDX) > 0 && is_friendly(&current_floor_ptr->m_list[(IDX)]))
32503250
32513251 #define is_pet(A) \
32523252 (bool)(((A)->smart & SM_PET) ? TRUE : FALSE)
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -902,7 +902,7 @@ static void regen_monsters(void)
902902 for (i = 1; i < m_max; i++)
903903 {
904904 /* Check the i'th monster */
905- monster_type *m_ptr = &m_list[i];
905+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
906906 monster_race *r_ptr = &r_info[m_ptr->r_idx];
907907
908908
@@ -1675,27 +1675,27 @@ static void process_world_aux_hp_and_sp(void)
16751675 if (p_ptr->riding)
16761676 {
16771677 HIT_POINT damage;
1678- if ((r_info[m_list[p_ptr->riding].r_idx].flags2 & RF2_AURA_FIRE) && !p_ptr->immune_fire)
1678+ if ((r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].flags2 & RF2_AURA_FIRE) && !p_ptr->immune_fire)
16791679 {
1680- damage = r_info[m_list[p_ptr->riding].r_idx].level / 2;
1680+ damage = r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level / 2;
16811681 if (prace_is_(RACE_ENT)) damage += damage / 3;
16821682 if (p_ptr->resist_fire) damage = damage / 3;
16831683 if (IS_OPPOSE_FIRE()) damage = damage / 3;
16841684 msg_print(_("熱い!", "It's hot!"));
16851685 take_hit(DAMAGE_NOESCAPE, damage, _("炎のオーラ", "Fire aura"), -1);
16861686 }
1687- if ((r_info[m_list[p_ptr->riding].r_idx].flags2 & RF2_AURA_ELEC) && !p_ptr->immune_elec)
1687+ if ((r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].flags2 & RF2_AURA_ELEC) && !p_ptr->immune_elec)
16881688 {
1689- damage = r_info[m_list[p_ptr->riding].r_idx].level / 2;
1689+ damage = r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level / 2;
16901690 if (prace_is_(RACE_ANDROID)) damage += damage / 3;
16911691 if (p_ptr->resist_elec) damage = damage / 3;
16921692 if (IS_OPPOSE_ELEC()) damage = damage / 3;
16931693 msg_print(_("痛い!", "It hurts!"));
16941694 take_hit(DAMAGE_NOESCAPE, damage, _("電気のオーラ", "Elec aura"), -1);
16951695 }
1696- if ((r_info[m_list[p_ptr->riding].r_idx].flags3 & RF3_AURA_COLD) && !p_ptr->immune_cold)
1696+ if ((r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].flags3 & RF3_AURA_COLD) && !p_ptr->immune_cold)
16971697 {
1698- damage = r_info[m_list[p_ptr->riding].r_idx].level / 2;
1698+ damage = r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level / 2;
16991699 if (p_ptr->resist_cold) damage = damage / 3;
17001700 if (IS_OPPOSE_COLD()) damage = damage / 3;
17011701 msg_print(_("冷たい!", "It's cold!"));
@@ -2527,7 +2527,7 @@ static void process_world_aux_mutation(void)
25272527
25282528 for (monster = 0; monster < m_max; monster++)
25292529 {
2530- monster_type *m_ptr = &m_list[monster];
2530+ monster_type *m_ptr = &current_floor_ptr->m_list[monster];
25312531 monster_race *r_ptr = &r_info[m_ptr->r_idx];
25322532
25332533 /* Paranoia -- Skip dead monsters */
@@ -3149,7 +3149,7 @@ static void process_world_aux_movement(void)
31493149 */
31503150 static int get_monster_crowd_number(MONSTER_IDX m_idx)
31513151 {
3152- monster_type *m_ptr = &m_list[m_idx];
3152+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
31533153 POSITION my = m_ptr->fy;
31543154 POSITION mx = m_ptr->fx;
31553155 int i;
@@ -3193,7 +3193,7 @@ static byte get_dungeon_feeling(void)
31933193 /* Examine each monster */
31943194 for (i = 1; i < m_max; i++)
31953195 {
3196- monster_type *m_ptr = &m_list[i];
3196+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
31973197 monster_race *r_ptr;
31983198 int delta = 0;
31993199
@@ -3430,7 +3430,7 @@ static void process_world(void)
34303430 GAME_TEXT m_name[MAX_NLEN];
34313431 monster_type *wm_ptr;
34323432
3433- wm_ptr = &m_list[win_m_idx];
3433+ wm_ptr = &current_floor_ptr->m_list[win_m_idx];
34343434
34353435 monster_desc(m_name, wm_ptr, 0);
34363436 msg_format(_("%sが勝利した!", "%s is winner!"), m_name);
@@ -4746,7 +4746,7 @@ static void process_player(void)
47464746 {
47474747 for(i = 1; i < m_max; i++)
47484748 {
4749- monster_type *m_ptr = &m_list[i];
4749+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
47504750
47514751 if (!m_ptr->r_idx) continue;
47524752
@@ -4818,7 +4818,7 @@ static void process_player(void)
48184818 if (place_monster_aux(0, y, x, r_idx, PM_NO_KAGE))
48194819 {
48204820 GAME_TEXT m_name[MAX_NLEN];
4821- monster_desc(m_name, &m_list[current_floor_ptr->grid_array[y][x].m_idx], 0);
4821+ monster_desc(m_name, &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx], 0);
48224822 msg_format(_("%sが釣れた!", "You have a good catch!"), m_name);
48234823 success = TRUE;
48244824 }
@@ -4855,7 +4855,7 @@ static void process_player(void)
48554855
48564856 if (p_ptr->riding && !p_ptr->confused && !p_ptr->blind)
48574857 {
4858- monster_type *m_ptr = &m_list[p_ptr->riding];
4858+ monster_type *m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
48594859 monster_race *r_ptr = &r_info[m_ptr->r_idx];
48604860
48614861 if (MON_CSLEEP(m_ptr))
@@ -5115,7 +5115,7 @@ static void process_player(void)
51155115 monster_race *r_ptr;
51165116
51175117 /* Access monster */
5118- m_ptr = &m_list[i];
5118+ m_ptr = &current_floor_ptr->m_list[i];
51195119
51205120 /* Skip dead monsters */
51215121 if (!m_ptr->r_idx) continue;
@@ -5151,7 +5151,7 @@ static void process_player(void)
51515151 monster_type *m_ptr;
51525152
51535153 /* Access monster */
5154- m_ptr = &m_list[i];
5154+ m_ptr = &current_floor_ptr->m_list[i];
51555155
51565156 /* Skip dead monsters */
51575157 if (!m_ptr->r_idx) continue;
@@ -5439,7 +5439,7 @@ static void dungeon(bool load_game)
54395439 while (TRUE)
54405440 {
54415441 /* Hack -- Compact the monster list occasionally */
5442- if ((m_cnt + 32 > max_m_idx) && !p_ptr->inside_battle) compact_monsters(64);
5442+ if ((m_cnt + 32 > current_floor_ptr->max_m_idx) && !p_ptr->inside_battle) compact_monsters(64);
54435443
54445444 /* Hack -- Compress the monster list occasionally */
54455445 if ((m_cnt + 32 < m_max) && !p_ptr->inside_battle) compact_monsters(0);
@@ -5942,7 +5942,7 @@ void play_game(bool new_game)
59425942 p_ptr->riding = 0;
59435943 for (i = m_max; i > 0; i--)
59445944 {
5945- if (player_bold(m_list[i].fy, m_list[i].fx))
5945+ if (player_bold(current_floor_ptr->m_list[i].fy, current_floor_ptr->m_list[i].fx))
59465946 {
59475947 p_ptr->riding = i;
59485948 break;
@@ -6103,7 +6103,7 @@ void play_game(bool new_game)
61036103 monster_race *r_ptr = &r_info[pet_r_idx];
61046104 place_monster_aux(0, p_ptr->y, p_ptr->x - 1, pet_r_idx,
61056105 (PM_FORCE_PET | PM_NO_KAGE));
6106- m_ptr = &m_list[hack_m_idx_ii];
6106+ m_ptr = &current_floor_ptr->m_list[hack_m_idx_ii];
61076107 m_ptr->mspeed = r_ptr->speed;
61086108 m_ptr->maxhp = r_ptr->hdice*(r_ptr->hside+1)/2;
61096109 m_ptr->max_maxhp = m_ptr->maxhp;
--- a/src/externs.h
+++ b/src/externs.h
@@ -261,8 +261,6 @@ extern floor_type *current_floor_ptr;
261261 extern saved_floor_type saved_floors[MAX_SAVED_FLOORS];
262262 extern FLOOR_IDX max_floor_id;
263263 extern u32b saved_floor_file_sign;
264-extern object_type *o_list;
265-extern monster_type *m_list;
266264 extern s16b *mproc_list[MAX_MTIMED];
267265 extern s16b mproc_max[MAX_MTIMED];
268266 extern TOWN_IDX max_towns;
@@ -340,7 +338,6 @@ extern FEAT_IDX max_f_idx;
340338 extern ARTIFACT_IDX max_a_idx;
341339 extern EGO_IDX max_e_idx;
342340 extern DUNGEON_IDX max_d_idx;
343-extern MONSTER_IDX max_m_idx;
344341 extern POSITION max_wild_x;
345342 extern POSITION max_wild_y;
346343 extern quest_type *quest;
--- a/src/files.c
+++ b/src/files.c
@@ -1820,8 +1820,8 @@ static void display_player_middle(void)
18201820 }
18211821 else
18221822 {
1823- if (MON_FAST(&m_list[p_ptr->riding])) tmp_speed += 10;
1824- if (MON_SLOW(&m_list[p_ptr->riding])) tmp_speed -= 10;
1823+ if (MON_FAST(&current_floor_ptr->m_list[p_ptr->riding])) tmp_speed += 10;
1824+ if (MON_SLOW(&current_floor_ptr->m_list[p_ptr->riding])) tmp_speed -= 10;
18251825 }
18261826
18271827 if (tmp_speed)
@@ -4187,7 +4187,7 @@ static void dump_aux_pet(FILE *fff)
41874187
41884188 for (i = m_max - 1; i >= 1; i--)
41894189 {
4190- monster_type *m_ptr = &m_list[i];
4190+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
41914191
41924192 if (!m_ptr->r_idx) continue;
41934193 if (!is_pet(m_ptr)) continue;
--- a/src/floor-events.c
+++ b/src/floor-events.c
@@ -103,7 +103,7 @@ MONSTER_NUMBER count_all_hostile_monsters(void)
103103 {
104104 MONSTER_IDX m_idx = current_floor_ptr->grid_array[y][x].m_idx;
105105
106- if (m_idx > 0 && is_hostile(&m_list[m_idx]))
106+ if (m_idx > 0 && is_hostile(&current_floor_ptr->m_list[m_idx]))
107107 {
108108 ++number_mon;
109109 }
--- a/src/floor-generate.c
+++ b/src/floor-generate.c
@@ -1164,11 +1164,11 @@ static void generate_gambling_arena(void)
11641164 for(i = 0; i < 4; i++)
11651165 {
11661166 place_monster_aux(0, p_ptr->y + 8 + (i/2)*4, p_ptr->x - 2 + (i%2)*4, battle_mon[i], (PM_NO_KAGE | PM_NO_PET));
1167- set_friendly(&m_list[current_floor_ptr->grid_array[p_ptr->y+8+(i/2)*4][p_ptr->x-2+(i%2)*4].m_idx]);
1167+ set_friendly(&current_floor_ptr->m_list[current_floor_ptr->grid_array[p_ptr->y+8+(i/2)*4][p_ptr->x-2+(i%2)*4].m_idx]);
11681168 }
11691169 for(i = 1; i < m_max; i++)
11701170 {
1171- monster_type *m_ptr = &m_list[i];
1171+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
11721172
11731173 if (!m_ptr->r_idx) continue;
11741174
@@ -1320,7 +1320,7 @@ void clear_cave(void)
13201320 /* Very simplified version of wipe_m_list() */
13211321 for (i = 1; i < max_r_idx; i++)
13221322 r_info[i].cur_num = 0;
1323- (void)C_WIPE(m_list, m_max, monster_type);
1323+ (void)C_WIPE(current_floor_ptr->m_list, m_max, monster_type);
13241324 m_max = 1;
13251325 m_cnt = 0;
13261326 for (i = 0; i < MAX_MTIMED; i++) mproc_max[i] = 0;
@@ -1424,7 +1424,7 @@ void generate_random_floor(void)
14241424 okay = FALSE;
14251425 }
14261426 /* Prevent monster over-flow */
1427- else if (m_max >= max_m_idx)
1427+ else if (m_max >= current_floor_ptr->max_m_idx)
14281428 {
14291429 why = _("モンスターが多すぎる", "too many monsters");
14301430 okay = FALSE;
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -367,7 +367,7 @@ static void preserve_pet(void)
367367
368368 if (p_ptr->riding)
369369 {
370- monster_type *m_ptr = &m_list[p_ptr->riding];
370+ monster_type *m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
371371
372372 /* Pet of other pet don't follow. */
373373 if (m_ptr->parent_m_idx)
@@ -394,7 +394,7 @@ static void preserve_pet(void)
394394 {
395395 for (i = m_max - 1, num = 1; (i >= 1 && num < MAX_PARTY_MON); i--)
396396 {
397- monster_type *m_ptr = &m_list[i];
397+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
398398
399399 if (!m_ptr->r_idx) continue;
400400 if (!is_pet(m_ptr)) continue;
@@ -430,7 +430,7 @@ static void preserve_pet(void)
430430 }
431431 }
432432
433- (void)COPY(&party_mon[num], &m_list[i], monster_type);
433+ (void)COPY(&party_mon[num], &current_floor_ptr->m_list[i], monster_type);
434434
435435 num++;
436436
@@ -443,7 +443,7 @@ static void preserve_pet(void)
443443 {
444444 for (i = m_max - 1; i >=1; i--)
445445 {
446- monster_type *m_ptr = &m_list[i];
446+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
447447 GAME_TEXT m_name[MAX_NLEN];
448448
449449 if (!m_ptr->r_idx) continue;
@@ -460,10 +460,10 @@ static void preserve_pet(void)
460460 /* Pet of other pet may disappear. */
461461 for (i = m_max - 1; i >=1; i--)
462462 {
463- monster_type *m_ptr = &m_list[i];
463+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
464464
465465 /* Are there its parent? */
466- if (m_ptr->parent_m_idx && !m_list[m_ptr->parent_m_idx].r_idx)
466+ if (m_ptr->parent_m_idx && !current_floor_ptr->m_list[m_ptr->parent_m_idx].r_idx)
467467 {
468468 /* Its parent have gone, it also goes away. */
469469
@@ -549,7 +549,7 @@ static void place_pet(void)
549549
550550 if (m_idx)
551551 {
552- monster_type *m_ptr = &m_list[m_idx];
552+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
553553 monster_race *r_ptr;
554554
555555 current_floor_ptr->grid_array[cy][cx].m_idx = m_idx;
@@ -634,7 +634,7 @@ static void update_unique_artifact(s16b cur_floor_id)
634634 for (i = 1; i < m_max; i++)
635635 {
636636 monster_race *r_ptr;
637- monster_type *m_ptr = &m_list[i];
637+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
638638
639639 /* Skip dead monsters */
640640 if (!m_ptr->r_idx) continue;
@@ -717,7 +717,7 @@ static void get_out_monster(void)
717717
718718 /*** It's a good place ***/
719719
720- m_ptr = &m_list[m_idx];
720+ m_ptr = &current_floor_ptr->m_list[m_idx];
721721
722722 /* Update the old location */
723723 current_floor_ptr->grid_array[oy][ox].m_idx = 0;
@@ -891,7 +891,7 @@ void leave_floor(void)
891891 for (i = 1; i < m_max; i++)
892892 {
893893 monster_race *r_ptr;
894- monster_type *m_ptr = &m_list[i];
894+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
895895
896896 /* Skip dead monsters */
897897 if (!m_ptr->r_idx) continue;
@@ -1201,7 +1201,7 @@ void change_floor(void)
12011201 for (i = 1; i < m_max; i++)
12021202 {
12031203 monster_race *r_ptr;
1204- monster_type *m_ptr = &m_list[i];
1204+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
12051205
12061206 /* Skip dead monsters */
12071207 if (!m_ptr->r_idx) continue;
--- a/src/floor-streams.c
+++ b/src/floor-streams.c
@@ -281,7 +281,7 @@ void build_streamer(IDX feat, int chance)
281281 if (is_closed_door(g_ptr->feat)) continue;
282282 }
283283
284- if (g_ptr->m_idx && !(have_flag(streamer_ptr->flags, FF_PLACE) && monster_can_cross_terrain(feat, &r_info[m_list[g_ptr->m_idx].r_idx], 0)))
284+ if (g_ptr->m_idx && !(have_flag(streamer_ptr->flags, FF_PLACE) && monster_can_cross_terrain(feat, &r_info[current_floor_ptr->m_list[g_ptr->m_idx].r_idx], 0)))
285285 {
286286 /* Delete the monster (if any) */
287287 delete_monster(ty, tx);
--- a/src/gamevalue.h
+++ b/src/gamevalue.h
@@ -44,7 +44,7 @@
4444 * @details
4545 * A monster can only "multiply" (reproduce) if there are fewer than 100
4646 * monsters on the level capable of such spontaneous reproduction. This
47-* is a hack which prevents the "m_list[]" array from exploding due to
47+* is a hack which prevents the "current_floor_ptr->m_list[]" array from exploding due to
4848 * reproducing monsters. Messy, but necessary.
4949 */
5050 #define MAX_REPRO 100
--- a/src/grid.c
+++ b/src/grid.c
@@ -1989,7 +1989,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLO
19891989 /* Handle monsters */
19901990 if (g_ptr->m_idx && display_autopick == 0)
19911991 {
1992- monster_type *m_ptr = &m_list[g_ptr->m_idx];
1992+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
19931993
19941994 /* Visible monster */
19951995 if (m_ptr->ml)
@@ -2501,7 +2501,7 @@ void prt_path(POSITION y, POSITION x)
25012501 TERM_COLOR ta = default_color;
25022502 char tc = '*';
25032503
2504- if (g_ptr->m_idx && m_list[g_ptr->m_idx].ml)
2504+ if (g_ptr->m_idx && current_floor_ptr->m_list[g_ptr->m_idx].ml)
25052505 {
25062506 /* Determine what is there */
25072507 map_info(ny, nx, &a, &c, &ta, &tc);
@@ -3737,7 +3737,7 @@ void update_mon_lite(void)
37373737 /* Loop through monsters, adding newly lit squares to changes list */
37383738 for (i = 1; i < m_max; i++)
37393739 {
3740- m_ptr = &m_list[i];
3740+ m_ptr = &current_floor_ptr->m_list[i];
37413741 r_ptr = &r_info[m_ptr->r_idx];
37423742
37433743 /* Skip dead monsters */
@@ -5636,7 +5636,7 @@ void glow_deep_lava_and_bldg(void)
56365636 */
56375637 bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode)
56385638 {
5639- monster_type *m_ptr = &m_list[m_idx];
5639+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
56405640 grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
56415641 feature_type *f_ptr = &f_info[g_ptr->feat];
56425642
--- a/src/init1.c
+++ b/src/init1.c
@@ -4047,7 +4047,7 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
40474047 if (clone)
40484048 {
40494049 /* clone */
4050- m_list[hack_m_idx_ii].smart |= SM_CLONED;
4050+ current_floor_ptr->m_list[hack_m_idx_ii].smart |= SM_CLONED;
40514051
40524052 /* Make alive again for real unique monster */
40534053 r_info[monster_index].cur_num = old_cur_num;
@@ -4383,7 +4383,7 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
43834383 /* Maximum m_idx */
43844384 else if (zz[0][0] == 'M')
43854385 {
4386- max_m_idx = (IDX)atoi(zz[1]);
4386+ current_floor_ptr->max_m_idx = (IDX)atoi(zz[1]);
43874387 }
43884388
43894389 /* Wilderness size */
--- a/src/init2.c
+++ b/src/init2.c
@@ -1224,12 +1224,12 @@ static errr init_other(void)
12241224 C_MAKE(current_floor_ptr->o_list, current_floor_ptr->max_o_idx, object_type);
12251225
12261226 /* Allocate and Wipe the monster list */
1227- C_MAKE(m_list, max_m_idx, monster_type);
1227+ C_MAKE(current_floor_ptr->m_list, current_floor_ptr->max_m_idx, monster_type);
12281228
12291229 /* Allocate and Wipe the monster process list */
12301230 for (i = 0; i < MAX_MTIMED; i++)
12311231 {
1232- C_MAKE(mproc_list[i], max_m_idx, s16b);
1232+ C_MAKE(mproc_list[i], current_floor_ptr->max_m_idx, s16b);
12331233 }
12341234
12351235 /* Allocate and Wipe the max dungeon level */
--- a/src/load.c
+++ b/src/load.c
@@ -2874,7 +2874,7 @@ static errr rd_dungeon_old(void)
28742874 monster_type *m_ptr;
28752875
28762876 /* Monster */
2877- m_ptr = &m_list[o_ptr->held_m_idx];
2877+ m_ptr = &current_floor_ptr->m_list[o_ptr->held_m_idx];
28782878
28792879 /* Build a stack */
28802880 o_ptr->next_o_idx = m_ptr->hold_o_idx;
@@ -2904,7 +2904,7 @@ static errr rd_dungeon_old(void)
29042904 rd_u16b(&limit);
29052905
29062906 /* Hack -- verify */
2907- if (limit > max_m_idx)
2907+ if (limit > current_floor_ptr->max_m_idx)
29082908 {
29092909 note(format(_("モンスターの配列が大きすぎる(%d)!", "Too many (%d) monster entries!"), limit));
29102910 return (161);
@@ -2927,7 +2927,7 @@ static errr rd_dungeon_old(void)
29272927
29282928
29292929 /* Acquire monster */
2930- m_ptr = &m_list[m_idx];
2930+ m_ptr = &current_floor_ptr->m_list[m_idx];
29312931
29322932 /* Read the monster */
29332933 rd_monster(m_ptr);
@@ -3192,7 +3192,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
31923192 monster_type *m_ptr;
31933193
31943194 /* Monster */
3195- m_ptr = &m_list[o_ptr->held_m_idx];
3195+ m_ptr = &current_floor_ptr->m_list[o_ptr->held_m_idx];
31963196
31973197 /* Build a stack */
31983198 o_ptr->next_o_idx = m_ptr->hold_o_idx;
@@ -3222,7 +3222,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
32223222 rd_u16b(&limit);
32233223
32243224 /* Hack -- verify */
3225- if (limit > max_m_idx) return 161;
3225+ if (limit > current_floor_ptr->max_m_idx) return 161;
32263226
32273227 /* Read the monsters */
32283228 for (i = 1; i < limit; i++)
@@ -3238,7 +3238,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
32383238
32393239
32403240 /* Acquire monster */
3241- m_ptr = &m_list[m_idx];
3241+ m_ptr = &current_floor_ptr->m_list[m_idx];
32423242
32433243 /* Read the monster */
32443244 rd_monster(m_ptr);
--- a/src/mane.c
+++ b/src/mane.c
@@ -677,7 +677,7 @@ static bool use_mane(int spell)
677677 if (!current_floor_ptr->grid_array[target_row][target_col].m_idx) break;
678678 if (!player_has_los_bold(target_row, target_col)) break;
679679 if (!projectable(p_ptr->y, p_ptr->x, target_row, target_col)) break;
680- m_ptr = &m_list[current_floor_ptr->grid_array[target_row][target_col].m_idx];
680+ m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[target_row][target_col].m_idx];
681681 r_ptr = &r_info[m_ptr->r_idx];
682682 monster_desc(m_name, m_ptr, 0);
683683 if (r_ptr->flagsr & RFR_RES_TELE)
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -301,7 +301,7 @@ static void natural_attack(MONSTER_IDX m_idx, int attack, bool *fear, bool *mdea
301301 HIT_POINT k;
302302 int bonus, chance;
303303 WEIGHT n_weight = 0;
304- monster_type *m_ptr = &m_list[m_idx];
304+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
305305 monster_race *r_ptr = &r_info[m_ptr->r_idx];
306306 GAME_TEXT m_name[MAX_NLEN];
307307
@@ -438,7 +438,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
438438
439439 grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
440440
441- monster_type *m_ptr = &m_list[g_ptr->m_idx];
441+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
442442 monster_race *r_ptr = &r_info[m_ptr->r_idx];
443443
444444 /* Access the weapon */
@@ -1152,7 +1152,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
11521152 }
11531153
11541154 /* Hack -- Get new monster */
1155- m_ptr = &m_list[g_ptr->m_idx];
1155+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
11561156
11571157 /* Oops, we need a different name... */
11581158 monster_desc(m_name, m_ptr, 0);
@@ -1163,7 +1163,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
11631163 }
11641164 else if (o_ptr->name1 == ART_G_HAMMER)
11651165 {
1166- monster_type *target_ptr = &m_list[g_ptr->m_idx];
1166+ monster_type *target_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
11671167
11681168 if (target_ptr->hold_o_idx)
11691169 {
@@ -1327,7 +1327,7 @@ bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode)
13271327 bool stormbringer = FALSE;
13281328
13291329 grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
1330- monster_type *m_ptr = &m_list[g_ptr->m_idx];
1330+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
13311331 monster_race *r_ptr = &r_info[m_ptr->r_idx];
13321332 GAME_TEXT m_name[MAX_NLEN];
13331333
@@ -1448,7 +1448,7 @@ bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode)
14481448
14491449 if (cur < max)
14501450 {
1451- DEPTH ridinglevel = r_info[m_list[p_ptr->riding].r_idx].level;
1451+ DEPTH ridinglevel = r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level;
14521452 DEPTH targetlevel = r_ptr->level;
14531453 int inc = 0;
14541454
@@ -1511,7 +1511,7 @@ bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode)
15111511 */
15121512 bool make_attack_normal(MONSTER_IDX m_idx)
15131513 {
1514- monster_type *m_ptr = &m_list[m_idx];
1514+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
15151515 monster_race *r_ptr = &r_info[m_ptr->r_idx];
15161516
15171517 int ap_cnt;
@@ -3203,7 +3203,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
32033203 if (p_ptr->riding && damage)
32043204 {
32053205 char m_steed_name[MAX_NLEN];
3206- monster_desc(m_steed_name, &m_list[p_ptr->riding], 0);
3206+ monster_desc(m_steed_name, &current_floor_ptr->m_list[p_ptr->riding], 0);
32073207 if (rakuba((damage > 200) ? 200 : damage, FALSE))
32083208 {
32093209 msg_format(_("%^sから落ちてしまった!", "You have fallen from %s."), m_steed_name);
--- a/src/mind.c
+++ b/src/mind.c
@@ -1638,7 +1638,7 @@ static bool cast_ninja_spell(int spell)
16381638 if (m_idx == p_ptr->riding) break;
16391639 if (!player_has_los_bold(target_row, target_col)) break;
16401640 if (!projectable(p_ptr->y, p_ptr->x, target_row, target_col)) break;
1641- m_ptr = &m_list[m_idx];
1641+ m_ptr = &current_floor_ptr->m_list[m_idx];
16421642 monster_desc(m_name, m_ptr, 0);
16431643 msg_format(_("%sを引き戻した。", "You pull back %s."), m_name);
16441644 path_n = project_path(path_g, MAX_RANGE, target_row, target_col, p_ptr->y, p_ptr->x, 0);
--- a/src/monster-process.c
+++ b/src/monster-process.c
@@ -42,19 +42,19 @@ static bool get_enemy_dir(MONSTER_IDX m_idx, int *mm)
4242 int start;
4343 int plus = 1;
4444
45- monster_type *m_ptr = &m_list[m_idx];
45+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
4646 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4747 monster_type *t_ptr;
4848
4949 if (riding_t_m_idx && player_bold(m_ptr->fy, m_ptr->fx))
5050 {
51- y = m_list[riding_t_m_idx].fy;
52- x = m_list[riding_t_m_idx].fx;
51+ y = current_floor_ptr->m_list[riding_t_m_idx].fy;
52+ x = current_floor_ptr->m_list[riding_t_m_idx].fx;
5353 }
5454 else if (is_pet(m_ptr) && pet_t_m_idx)
5555 {
56- y = m_list[pet_t_m_idx].fy;
57- x = m_list[pet_t_m_idx].fx;
56+ y = current_floor_ptr->m_list[pet_t_m_idx].fy;
57+ x = current_floor_ptr->m_list[pet_t_m_idx].fx;
5858 }
5959 else
6060 {
@@ -73,7 +73,7 @@ static bool get_enemy_dir(MONSTER_IDX m_idx, int *mm)
7373 if (!dummy) continue;
7474
7575 t_idx = dummy;
76- t_ptr = &m_list[t_idx];
76+ t_ptr = &current_floor_ptr->m_list[t_idx];
7777
7878 /* The monster itself isn't a target */
7979 if (t_ptr == m_ptr) continue;
@@ -203,7 +203,7 @@ static bool get_enemy_dir(MONSTER_IDX m_idx, int *mm)
203203 */
204204 void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, IDX who)
205205 {
206- monster_type *m_ptr = &m_list[m_idx];
206+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
207207 monster_race *r_ptr = &r_info[m_ptr->r_idx];
208208 GAME_TEXT m_name[160];
209209 bool seen = is_seen(m_ptr);
@@ -356,9 +356,9 @@ void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear,
356356
357357 if ((dam > 0) && !is_pet(m_ptr) && !is_friendly(m_ptr) && (who != m_idx))
358358 {
359- if (is_pet(&m_list[who]) && !player_bold(m_ptr->target_y, m_ptr->target_x))
359+ if (is_pet(&current_floor_ptr->m_list[who]) && !player_bold(m_ptr->target_y, m_ptr->target_x))
360360 {
361- set_target(m_ptr, m_list[who].fy, m_list[who].fx);
361+ set_target(m_ptr, current_floor_ptr->m_list[who].fy, current_floor_ptr->m_list[who].fx);
362362 }
363363 }
364364
@@ -397,7 +397,7 @@ void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear,
397397 */
398398 static bool mon_will_run(MONSTER_IDX m_idx)
399399 {
400- monster_type *m_ptr = &m_list[m_idx];
400+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
401401
402402 #ifdef ALLOW_TERROR
403403
@@ -479,7 +479,7 @@ static bool get_moves_aux2(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
479479 bool can_open_door = FALSE;
480480 int now_cost;
481481
482- monster_type *m_ptr = &m_list[m_idx];
482+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
483483 monster_race *r_ptr = &r_info[m_ptr->r_idx];
484484
485485 /* Monster location */
@@ -583,7 +583,7 @@ static bool get_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp, bool no
583583 grid_type *g_ptr;
584584 bool use_scent = FALSE;
585585
586- monster_type *m_ptr = &m_list[m_idx];
586+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
587587 monster_race *r_ptr = &r_info[m_ptr->r_idx];
588588
589589 /* Can monster cast attack spell? */
@@ -700,7 +700,7 @@ static bool get_fear_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
700700 int score = -1;
701701 int i;
702702
703- monster_type *m_ptr = &m_list[m_idx];
703+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
704704
705705 /* Monster location */
706706 fy = m_ptr->fy;
@@ -887,7 +887,7 @@ static POSITION *dist_offsets_x[10] =
887887 */
888888 static bool find_safety(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
889889 {
890- monster_type *m_ptr = &m_list[m_idx];
890+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
891891
892892 POSITION fy = m_ptr->fy;
893893 POSITION fx = m_ptr->fx;
@@ -981,7 +981,7 @@ static bool find_safety(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
981981 */
982982 static bool find_hiding(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
983983 {
984- monster_type *m_ptr = &m_list[m_idx];
984+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
985985 monster_race *r_ptr = &r_info[m_ptr->r_idx];
986986
987987 POSITION fy = m_ptr->fy;
@@ -1055,7 +1055,7 @@ static bool find_hiding(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
10551055 */
10561056 static bool get_moves(MONSTER_IDX m_idx, DIRECTION *mm)
10571057 {
1058- monster_type *m_ptr = &m_list[m_idx];
1058+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
10591059 monster_race *r_ptr = &r_info[m_ptr->r_idx];
10601060 POSITION y = 0, ay, x = 0, ax;
10611061 int move_val = 0;
@@ -1074,7 +1074,7 @@ static bool get_moves(MONSTER_IDX m_idx, DIRECTION *mm)
10741074
10751075 /* The monster must be an enemy, and in LOS */
10761076 if (t_m_idx &&
1077- are_enemies(m_ptr, &m_list[t_m_idx]) &&
1077+ are_enemies(m_ptr, &current_floor_ptr->m_list[t_m_idx]) &&
10781078 los(m_ptr->fy, m_ptr->fx, m_ptr->target_y, m_ptr->target_x) &&
10791079 projectable(m_ptr->fy, m_ptr->fx, m_ptr->target_y, m_ptr->target_x))
10801080 {
@@ -1424,8 +1424,8 @@ static int check_hit2(int power, DEPTH level, ARMOUR_CLASS ac, int stun)
14241424 */
14251425 static bool monst_attack_monst(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
14261426 {
1427- monster_type *m_ptr = &m_list[m_idx];
1428- monster_type *t_ptr = &m_list[t_idx];
1427+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
1428+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
14291429
14301430 monster_race *r_ptr = &r_info[m_ptr->r_idx];
14311431 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
@@ -2078,7 +2078,7 @@ static bool check_hp_for_feat_destruction(feature_type *f_ptr, monster_type *m_p
20782078 */
20792079 void process_monster(MONSTER_IDX m_idx)
20802080 {
2081- monster_type *m_ptr = &m_list[m_idx];
2081+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
20822082 monster_race *r_ptr = &r_info[m_ptr->r_idx];
20832083 monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
20842084
@@ -2120,7 +2120,7 @@ void process_monster(MONSTER_IDX m_idx)
21202120 msg_print("地面に落とされた。");
21212121 #else
21222122 GAME_TEXT m_name[MAX_NLEN];
2123- monster_desc(m_name, &m_list[p_ptr->riding], 0);
2123+ monster_desc(m_name, &current_floor_ptr->m_list[p_ptr->riding], 0);
21242124 msg_format("You have fallen from %s.", m_name);
21252125 #endif
21262126 }
@@ -2144,7 +2144,7 @@ void process_monster(MONSTER_IDX m_idx)
21442144 }
21452145
21462146 /* Are there its parent? */
2147- if (m_ptr->parent_m_idx && !m_list[m_ptr->parent_m_idx].r_idx)
2147+ if (m_ptr->parent_m_idx && !current_floor_ptr->m_list[m_ptr->parent_m_idx].r_idx)
21482148 {
21492149 /* Its parent have gone, it also goes away. */
21502150
@@ -2358,7 +2358,7 @@ void process_monster(MONSTER_IDX m_idx)
23582358 if (multiply_monster(m_idx, FALSE, (is_pet(m_ptr) ? PM_FORCE_PET : 0)))
23592359 {
23602360 /* Take note if visible */
2361- if (m_list[hack_m_idx_ii].ml && is_original_ap_and_seen(m_ptr))
2361+ if (current_floor_ptr->m_list[hack_m_idx_ii].ml && is_original_ap_and_seen(m_ptr))
23622362 {
23632363 r_ptr->r_flags2 |= (RF2_MULTIPLY);
23642364 }
@@ -2386,7 +2386,7 @@ void process_monster(MONSTER_IDX m_idx)
23862386 {
23872387 if (summon_specific(m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_MOLD, (PM_ALLOW_GROUP | p_mode), '\0'))
23882388 {
2389- if (m_list[hack_m_idx_ii].ml) count++;
2389+ if (current_floor_ptr->m_list[hack_m_idx_ii].ml) count++;
23902390 }
23912391 }
23922392
@@ -2452,7 +2452,7 @@ void process_monster(MONSTER_IDX m_idx)
24522452 MONSTER_IDX t_m_idx = current_floor_ptr->grid_array[m_ptr->target_y][m_ptr->target_x].m_idx;
24532453
24542454 /* The monster must be an enemy, and projectable */
2455- if (t_m_idx && are_enemies(m_ptr, &m_list[t_m_idx]) &&
2455+ if (t_m_idx && are_enemies(m_ptr, &current_floor_ptr->m_list[t_m_idx]) &&
24562456 projectable(m_ptr->fy, m_ptr->fx, m_ptr->target_y, m_ptr->target_x))
24572457 {
24582458 counterattack = TRUE;
@@ -2628,7 +2628,7 @@ void process_monster(MONSTER_IDX m_idx)
26282628 can_cross = monster_can_cross_terrain(g_ptr->feat, r_ptr, is_riding_mon ? CEM_RIDING : 0);
26292629
26302630 /* Access that grid's contents */
2631- y_ptr = &m_list[g_ptr->m_idx];
2631+ y_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
26322632
26332633 /* Hack -- player 'in' wall */
26342634 if (player_bold(ny, nx))
@@ -2942,7 +2942,7 @@ void process_monster(MONSTER_IDX m_idx)
29422942
29432943 if (is_riding_mon)
29442944 {
2945- if (!p_ptr->riding_ryoute && !MON_MONFEAR(&m_list[p_ptr->riding])) do_move = FALSE;
2945+ if (!p_ptr->riding_ryoute && !MON_MONFEAR(&current_floor_ptr->m_list[p_ptr->riding])) do_move = FALSE;
29462946 }
29472947
29482948 if (did_kill_wall && do_move)
@@ -3370,7 +3370,7 @@ void process_monsters(void)
33703370 for (i = m_max - 1; i >= 1; i--)
33713371 {
33723372 /* Access the monster */
3373- m_ptr = &m_list[i];
3373+ m_ptr = &current_floor_ptr->m_list[i];
33743374 r_ptr = &r_info[m_ptr->r_idx];
33753375
33763376 /* Handle "leaving" */
--- a/src/monster-status.c
+++ b/src/monster-status.c
@@ -165,7 +165,7 @@ int get_mproc_idx(MONSTER_IDX m_idx, int mproc_type)
165165 */
166166 static void mproc_add(MONSTER_IDX m_idx, int mproc_type)
167167 {
168- if (mproc_max[mproc_type] < max_m_idx) mproc_list[mproc_type][mproc_max[mproc_type]++] = (s16b)m_idx;
168+ if (mproc_max[mproc_type] < current_floor_ptr->max_m_idx) mproc_list[mproc_type][mproc_max[mproc_type]++] = (s16b)m_idx;
169169 }
170170
171171
@@ -199,7 +199,7 @@ void mproc_init(void)
199199 for (i = m_max - 1; i >= 1; i--)
200200 {
201201 /* Access the monster */
202- m_ptr = &m_list[i];
202+ m_ptr = &current_floor_ptr->m_list[i];
203203
204204 /* Ignore "dead" monsters */
205205 if (!m_ptr->r_idx) continue;
@@ -221,7 +221,7 @@ void mproc_init(void)
221221 */
222222 bool set_monster_csleep(MONSTER_IDX m_idx, int v)
223223 {
224- monster_type *m_ptr = &m_list[m_idx];
224+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
225225 bool notice = FALSE;
226226 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
227227
@@ -272,7 +272,7 @@ bool set_monster_csleep(MONSTER_IDX m_idx, int v)
272272 */
273273 bool set_monster_fast(MONSTER_IDX m_idx, int v)
274274 {
275- monster_type *m_ptr = &m_list[m_idx];
275+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
276276 bool notice = FALSE;
277277 v = (v > 200) ? 200 : (v < 0) ? 0 : v;
278278
@@ -312,7 +312,7 @@ bool set_monster_fast(MONSTER_IDX m_idx, int v)
312312 */
313313 bool set_monster_slow(MONSTER_IDX m_idx, int v)
314314 {
315- monster_type *m_ptr = &m_list[m_idx];
315+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
316316 bool notice = FALSE;
317317 v = (v > 200) ? 200 : (v < 0) ? 0 : v;
318318
@@ -356,7 +356,7 @@ bool set_monster_slow(MONSTER_IDX m_idx, int v)
356356 */
357357 bool set_monster_stunned(MONSTER_IDX m_idx, int v)
358358 {
359- monster_type *m_ptr = &m_list[m_idx];
359+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
360360 bool notice = FALSE;
361361 v = (v > 200) ? 200 : (v < 0) ? 0 : v;
362362
@@ -396,7 +396,7 @@ bool set_monster_stunned(MONSTER_IDX m_idx, int v)
396396 */
397397 bool set_monster_confused(MONSTER_IDX m_idx, int v)
398398 {
399- monster_type *m_ptr = &m_list[m_idx];
399+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
400400 bool notice = FALSE;
401401 v = (v > 200) ? 200 : (v < 0) ? 0 : v;
402402
@@ -436,7 +436,7 @@ bool set_monster_confused(MONSTER_IDX m_idx, int v)
436436 */
437437 bool set_monster_monfear(MONSTER_IDX m_idx, int v)
438438 {
439- monster_type *m_ptr = &m_list[m_idx];
439+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
440440 bool notice = FALSE;
441441 v = (v > 200) ? 200 : (v < 0) ? 0 : v;
442442
@@ -486,7 +486,7 @@ bool set_monster_monfear(MONSTER_IDX m_idx, int v)
486486 */
487487 bool set_monster_invulner(MONSTER_IDX m_idx, int v, bool energy_need)
488488 {
489- monster_type *m_ptr = &m_list[m_idx];
489+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
490490 bool notice = FALSE;
491491 v = (v > 200) ? 200 : (v < 0) ? 0 : v;
492492
@@ -537,7 +537,7 @@ static u32b csleep_noise;
537537 */
538538 static void process_monsters_mtimed_aux(MONSTER_IDX m_idx, int mtimed_idx)
539539 {
540- monster_type *m_ptr = &m_list[m_idx];
540+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
541541
542542 switch (mtimed_idx)
543543 {
@@ -748,7 +748,7 @@ void process_monsters_mtimed(int mtimed_idx)
748748 */
749749 void dispel_monster_status(MONSTER_IDX m_idx)
750750 {
751- monster_type *m_ptr = &m_list[m_idx];
751+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
752752 GAME_TEXT m_name[MAX_NLEN];
753753
754754 monster_desc(m_name, m_ptr, 0);
@@ -775,7 +775,7 @@ void dispel_monster_status(MONSTER_IDX m_idx)
775775 */
776776 bool process_the_world(int num, MONSTER_IDX who, bool vs_player)
777777 {
778- monster_type *m_ptr = &m_list[hack_m_idx]; /* the world monster */
778+ monster_type *m_ptr = &current_floor_ptr->m_list[hack_m_idx]; /* the world monster */
779779
780780 if (world_monster) return (FALSE);
781781
@@ -839,7 +839,7 @@ void monster_gain_exp(MONSTER_IDX m_idx, IDX s_idx)
839839 /* Paranoia */
840840 if (m_idx <= 0 || s_idx <= 0) return;
841841
842- m_ptr = &m_list[m_idx];
842+ m_ptr = &current_floor_ptr->m_list[m_idx];
843843
844844 /* Paranoia -- Skip dead monsters */
845845 if (!m_ptr->r_idx) return;
@@ -973,7 +973,7 @@ void monster_gain_exp(MONSTER_IDX m_idx, IDX s_idx)
973973 */
974974 bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note)
975975 {
976- monster_type *m_ptr = &m_list[m_idx];
976+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
977977 monster_race *r_ptr = &r_info[m_ptr->r_idx];
978978 monster_type exp_mon;
979979
--- a/src/monster1.c
+++ b/src/monster1.c
@@ -2531,7 +2531,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
25312531 int dump_gold = 0;
25322532 int number = 0;
25332533
2534- monster_type *m_ptr = &m_list[m_idx];
2534+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
25352535 monster_race *r_ptr = &r_info[m_ptr->r_idx];
25362536
25372537 bool visible = ((m_ptr->ml && !p_ptr->image) || (r_ptr->flags1 & RF1_UNIQUE));
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -235,7 +235,7 @@ MONRACE_IDX real_r_idx(monster_type *m_ptr)
235235 void delete_monster_idx(MONSTER_IDX i)
236236 {
237237 POSITION x, y;
238- monster_type *m_ptr = &m_list[i];
238+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
239239 monster_race *r_ptr = &r_info[m_ptr->r_idx];
240240 OBJECT_IDX this_o_idx, next_o_idx = 0;
241241
@@ -343,7 +343,7 @@ static void compact_monsters_aux(IDX i1, IDX i2)
343343 if (i1 == i2) return;
344344
345345 /* Old monster */
346- m_ptr = &m_list[i1];
346+ m_ptr = &current_floor_ptr->m_list[i1];
347347
348348 y = m_ptr->fy;
349349 x = m_ptr->fx;
@@ -385,7 +385,7 @@ static void compact_monsters_aux(IDX i1, IDX i2)
385385 {
386386 for (i = 1; i < m_max; i++)
387387 {
388- monster_type *m2_ptr = &m_list[i];
388+ monster_type *m2_ptr = &current_floor_ptr->m_list[i];
389389
390390 if (m2_ptr->parent_m_idx == i1)
391391 m2_ptr->parent_m_idx = i2;
@@ -393,10 +393,10 @@ static void compact_monsters_aux(IDX i1, IDX i2)
393393 }
394394
395395 /* Structure copy */
396- (void)COPY(&m_list[i2], &m_list[i1], monster_type);
396+ (void)COPY(&current_floor_ptr->m_list[i2], &current_floor_ptr->m_list[i1], monster_type);
397397
398398 /* Wipe the hole */
399- (void)WIPE(&m_list[i1], monster_type);
399+ (void)WIPE(&current_floor_ptr->m_list[i1], monster_type);
400400
401401 for (i = 0; i < MAX_MTIMED; i++)
402402 {
@@ -442,7 +442,7 @@ void compact_monsters(int size)
442442 /* Check all the monsters */
443443 for (i = 1; i < m_max; i++)
444444 {
445- monster_type *m_ptr = &m_list[i];
445+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
446446
447447 monster_race *r_ptr = &r_info[m_ptr->r_idx];
448448
@@ -488,7 +488,7 @@ void compact_monsters(int size)
488488 for (i = m_max - 1; i >= 1; i--)
489489 {
490490 /* Get the i'th monster */
491- monster_type *m_ptr = &m_list[i];
491+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
492492
493493 /* Skip real monsters */
494494 if (m_ptr->r_idx) continue;
@@ -535,7 +535,7 @@ void wipe_m_list(void)
535535 /* Delete all the monsters */
536536 for (i = m_max - 1; i >= 1; i--)
537537 {
538- monster_type *m_ptr = &m_list[i];
538+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
539539
540540 /* Skip dead monsters */
541541 if (!m_ptr->r_idx) continue;
@@ -590,7 +590,7 @@ MONSTER_IDX m_pop(void)
590590 MONSTER_IDX i;
591591
592592 /* Normal allocation */
593- if (m_max < max_m_idx)
593+ if (m_max < current_floor_ptr->max_m_idx)
594594 {
595595 /* Access the next hole */
596596 i = m_max;
@@ -611,7 +611,7 @@ MONSTER_IDX m_pop(void)
611611 monster_type *m_ptr;
612612
613613 /* Acquire monster */
614- m_ptr = &m_list[i];
614+ m_ptr = &current_floor_ptr->m_list[i];
615615
616616 /* Skip live monsters */
617617 if (m_ptr->r_idx) continue;
@@ -1663,7 +1663,7 @@ void monster_desc(char *desc, monster_type *m_ptr, BIT_FLAGS mode)
16631663
16641664 /* Inside monster arena, and it is not your mount */
16651665 else if (p_ptr->inside_battle &&
1666- !(p_ptr->riding && (&m_list[p_ptr->riding] == m_ptr)))
1666+ !(p_ptr->riding && (&current_floor_ptr->m_list[p_ptr->riding] == m_ptr)))
16671667 {
16681668 /* It is a fake unique monster */
16691669 (void)sprintf(desc, _("%sもどき", "fake %s"), name);
@@ -1708,7 +1708,7 @@ void monster_desc(char *desc, monster_type *m_ptr, BIT_FLAGS mode)
17081708 strcat(desc,buf);
17091709 }
17101710
1711- if (p_ptr->riding && (&m_list[p_ptr->riding] == m_ptr))
1711+ if (p_ptr->riding && (&current_floor_ptr->m_list[p_ptr->riding] == m_ptr))
17121712 {
17131713 strcat(desc,_("(乗馬中)", "(riding)"));
17141714 }
@@ -1869,7 +1869,7 @@ int lore_do_probe(MONRACE_IDX r_idx)
18691869 */
18701870 void lore_treasure(MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold)
18711871 {
1872- monster_type *m_ptr = &m_list[m_idx];
1872+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
18731873
18741874 monster_race *r_ptr = &r_info[m_ptr->r_idx];
18751875
@@ -2234,7 +2234,7 @@ void sanity_blast(monster_type *m_ptr, bool necro)
22342234 */
22352235 void update_monster(MONSTER_IDX m_idx, bool full)
22362236 {
2237- monster_type *m_ptr = &m_list[m_idx];
2237+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
22382238
22392239 monster_race *r_ptr = &r_info[m_ptr->r_idx];
22402240
@@ -2630,7 +2630,7 @@ void update_monsters(bool full)
26302630 /* Update each (live) monster */
26312631 for (i = 1; i < m_max; i++)
26322632 {
2633- monster_type *m_ptr = &m_list[i];
2633+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
26342634
26352635 /* Skip dead monsters */
26362636 if (!m_ptr->r_idx) continue;
@@ -2647,7 +2647,7 @@ void update_monsters(bool full)
26472647 static bool monster_hook_chameleon_lord(MONRACE_IDX r_idx)
26482648 {
26492649 monster_race *r_ptr = &r_info[r_idx];
2650- monster_type *m_ptr = &m_list[chameleon_change_m_idx];
2650+ monster_type *m_ptr = &current_floor_ptr->m_list[chameleon_change_m_idx];
26512651 monster_race *old_r_ptr = &r_info[m_ptr->r_idx];
26522652
26532653 if (!(r_ptr->flags1 & (RF1_UNIQUE))) return FALSE;
@@ -2669,7 +2669,7 @@ static bool monster_hook_chameleon_lord(MONRACE_IDX r_idx)
26692669 /* Born now */
26702670 else if (summon_specific_who > 0)
26712671 {
2672- if (monster_has_hostile_align(&m_list[summon_specific_who], 0, 0, r_ptr)) return FALSE;
2672+ if (monster_has_hostile_align(&current_floor_ptr->m_list[summon_specific_who], 0, 0, r_ptr)) return FALSE;
26732673 }
26742674
26752675 return TRUE;
@@ -2683,7 +2683,7 @@ static bool monster_hook_chameleon_lord(MONRACE_IDX r_idx)
26832683 static bool monster_hook_chameleon(MONRACE_IDX r_idx)
26842684 {
26852685 monster_race *r_ptr = &r_info[r_idx];
2686- monster_type *m_ptr = &m_list[chameleon_change_m_idx];
2686+ monster_type *m_ptr = &current_floor_ptr->m_list[chameleon_change_m_idx];
26872687 monster_race *old_r_ptr = &r_info[m_ptr->r_idx];
26882688
26892689 if (r_ptr->flags1 & (RF1_UNIQUE)) return FALSE;
@@ -2706,7 +2706,7 @@ static bool monster_hook_chameleon(MONRACE_IDX r_idx)
27062706 /* Born now */
27072707 else if (summon_specific_who > 0)
27082708 {
2709- if (monster_has_hostile_align(&m_list[summon_specific_who], 0, 0, r_ptr)) return FALSE;
2709+ if (monster_has_hostile_align(&current_floor_ptr->m_list[summon_specific_who], 0, 0, r_ptr)) return FALSE;
27102710 }
27112711
27122712 return (*(get_monster_hook()))(r_idx);
@@ -2722,7 +2722,7 @@ static bool monster_hook_chameleon(MONRACE_IDX r_idx)
27222722 void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx)
27232723 {
27242724 int oldmaxhp;
2725- monster_type *m_ptr = &m_list[m_idx];
2725+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
27262726 monster_race *r_ptr;
27272727 char old_m_name[MAX_NLEN];
27282728 bool old_unique = FALSE;
@@ -3005,7 +3005,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
30053005 for (i2 = 0; i2 < current_floor_ptr->width; ++i2)
30063006 for (j2 = 0; j2 < current_floor_ptr->height; j2++)
30073007 if (current_floor_ptr->grid_array[j2][i2].m_idx > 0)
3008- if (m_list[current_floor_ptr->grid_array[j2][i2].m_idx].r_idx == quest[hoge].r_idx)
3008+ if (current_floor_ptr->m_list[current_floor_ptr->grid_array[j2][i2].m_idx].r_idx == quest[hoge].r_idx)
30093009 number_mon++;
30103010 if(number_mon + quest[hoge].cur_num >= quest[hoge].max_num)
30113011 return FALSE;
@@ -3048,7 +3048,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
30483048
30493049
30503050 /* Get a new monster record */
3051- m_ptr = &m_list[g_ptr->m_idx];
3051+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
30523052
30533053 /* Save the race */
30543054 m_ptr->r_idx = r_idx;
@@ -3059,17 +3059,17 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
30593059 m_ptr->mflag2 = 0;
30603060
30613061 /* Hack -- Appearance transfer */
3062- if ((mode & PM_MULTIPLY) && (who > 0) && !is_original_ap(&m_list[who]))
3062+ if ((mode & PM_MULTIPLY) && (who > 0) && !is_original_ap(&current_floor_ptr->m_list[who]))
30633063 {
3064- m_ptr->ap_r_idx = m_list[who].ap_r_idx;
3064+ m_ptr->ap_r_idx = current_floor_ptr->m_list[who].ap_r_idx;
30653065
30663066 /* Hack -- Shadower spawns Shadower */
3067- if (m_list[who].mflag2 & MFLAG2_KAGE) m_ptr->mflag2 |= MFLAG2_KAGE;
3067+ if (current_floor_ptr->m_list[who].mflag2 & MFLAG2_KAGE) m_ptr->mflag2 |= MFLAG2_KAGE;
30683068 }
30693069
30703070 /* Sub-alignment of a monster */
30713071 if ((who > 0) && !(r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)))
3072- m_ptr->sub_align = m_list[who].sub_align;
3072+ m_ptr->sub_align = current_floor_ptr->m_list[who].sub_align;
30733073 else
30743074 {
30753075 m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
@@ -3096,7 +3096,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
30963096
30973097
30983098 /* Your pet summons its pet. */
3099- if (who > 0 && is_pet(&m_list[who]))
3099+ if (who > 0 && is_pet(&current_floor_ptr->m_list[who]))
31003100 {
31013101 mode |= PM_FORCE_PET;
31023102 m_ptr->parent_m_idx = who;
@@ -3503,7 +3503,7 @@ static MONSTER_IDX place_monster_m_idx = 0;
35033503 static bool place_monster_can_escort(MONRACE_IDX r_idx)
35043504 {
35053505 monster_race *r_ptr = &r_info[place_monster_idx];
3506- monster_type *m_ptr = &m_list[place_monster_m_idx];
3506+ monster_type *m_ptr = &current_floor_ptr->m_list[place_monster_m_idx];
35073507
35083508 monster_race *z_ptr = &r_info[r_idx];
35093509
@@ -3708,7 +3708,7 @@ bool alloc_horde(POSITION y, POSITION x)
37083708
37093709 m_idx = current_floor_ptr->grid_array[y][x].m_idx;
37103710
3711- if (m_list[m_idx].mflag2 & MFLAG2_CHAMELEON) r_ptr = &r_info[m_list[m_idx].r_idx];
3711+ if (current_floor_ptr->m_list[m_idx].mflag2 & MFLAG2_CHAMELEON) r_ptr = &r_info[current_floor_ptr->m_list[m_idx].r_idx];
37123712
37133713 for (attempts = randint1(10) + 5; attempts; attempts--)
37143714 {
@@ -3846,7 +3846,7 @@ static bool summon_specific_okay(MONRACE_IDX r_idx)
38463846 /* Hack -- identify the summoning monster */
38473847 if (summon_specific_who > 0)
38483848 {
3849- monster_type *m_ptr = &m_list[summon_specific_who];
3849+ monster_type *m_ptr = &current_floor_ptr->m_list[summon_specific_who];
38503850
38513851 /* Do not summon enemies */
38523852
@@ -3995,7 +3995,7 @@ bool summon_named_creature(MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_ID
39953995 */
39963996 bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode)
39973997 {
3998- monster_type *m_ptr = &m_list[m_idx];
3998+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
39993999 POSITION y, x;
40004000
40014001 if (!mon_scatter(m_ptr->r_idx, &y, &x, m_ptr->fy, m_ptr->fx, 1))
@@ -4010,8 +4010,8 @@ bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode)
40104010 /* Hack -- Transfer "clone" flag */
40114011 if (clone || (m_ptr->smart & SM_CLONED))
40124012 {
4013- m_list[hack_m_idx_ii].smart |= SM_CLONED;
4014- m_list[hack_m_idx_ii].mflag2 |= MFLAG2_NOPET;
4013+ current_floor_ptr->m_list[hack_m_idx_ii].smart |= SM_CLONED;
4014+ current_floor_ptr->m_list[hack_m_idx_ii].mflag2 |= MFLAG2_NOPET;
40154015 }
40164016
40174017 return TRUE;
@@ -4033,7 +4033,7 @@ void message_pain(MONSTER_IDX m_idx, HIT_POINT dam)
40334033 HIT_POINT tmp;
40344034 PERCENTAGE percentage;
40354035
4036- monster_type *m_ptr = &m_list[m_idx];
4036+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
40374037 monster_race *r_ptr = &r_info[m_ptr->r_idx];
40384038
40394039 GAME_TEXT m_name[MAX_NLEN];
@@ -4357,7 +4357,7 @@ void message_pain(MONSTER_IDX m_idx, HIT_POINT dam)
43574357 */
43584358 void update_smart_learn(MONSTER_IDX m_idx, int what)
43594359 {
4360- monster_type *m_ptr = &m_list[m_idx];
4360+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
43614361 monster_race *r_ptr = &r_info[m_ptr->r_idx];
43624362
43634363 /* Not allowed to learn */
--- a/src/mspells1.c
+++ b/src/mspells1.c
@@ -73,7 +73,7 @@ static bool int_outof(monster_race *r_ptr, PERCENTAGE prob)
7373 */
7474 static void remove_bad_spells(MONSTER_IDX m_idx, u32b *f4p, u32b *f5p, u32b *f6p)
7575 {
76- monster_type *m_ptr = &m_list[m_idx];
76+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
7777 monster_race *r_ptr = &r_info[m_ptr->r_idx];
7878
7979 u32b f4 = (*f4p);
@@ -485,7 +485,7 @@ bool clean_shot(POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_frie
485485
486486 if ((current_floor_ptr->grid_array[y][x].m_idx > 0) && !((y == y2) && (x == x2)))
487487 {
488- monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[y][x].m_idx];
488+ monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx];
489489 if (is_friend == is_pet(m_ptr))
490490 {
491491 return (FALSE);
@@ -580,7 +580,7 @@ void beam(MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp,
580580 */
581581 void breath(POSITION y, POSITION x, MONSTER_IDX m_idx, EFFECT_ID typ, int dam_hp, POSITION rad, bool breath, int monspell, int target_type)
582582 {
583- monster_type *m_ptr = &m_list[m_idx];
583+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
584584 monster_race *r_ptr = &r_info[m_ptr->r_idx];
585585 bool learnable = spell_learnable(m_idx);
586586 BIT_FLAGS flg = 0x00;
@@ -861,7 +861,7 @@ static bool spell_dispel(byte spell)
861861 */
862862 bool dispel_check(MONSTER_IDX m_idx)
863863 {
864- monster_type *m_ptr = &m_list[m_idx];
864+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
865865 monster_race *r_ptr = &r_info[m_ptr->r_idx];
866866
867867 /* Invulnabilty (including the song) */
@@ -947,9 +947,9 @@ bool dispel_check(MONSTER_IDX m_idx)
947947 /* Light speed */
948948 if (p_ptr->lightspeed && (m_ptr->mspeed < 136)) return (TRUE);
949949
950- if (p_ptr->riding && (m_list[p_ptr->riding].mspeed < 135))
950+ if (p_ptr->riding && (current_floor_ptr->m_list[p_ptr->riding].mspeed < 135))
951951 {
952- if (MON_FAST(&m_list[p_ptr->riding])) return (TRUE);
952+ if (MON_FAST(&current_floor_ptr->m_list[p_ptr->riding])) return (TRUE);
953953 }
954954
955955 /* No need to cast dispel spell */
@@ -978,7 +978,7 @@ bool dispel_check(MONSTER_IDX m_idx)
978978 */
979979 static int choose_attack_spell(MONSTER_IDX m_idx, byte spells[], byte num)
980980 {
981- monster_type *m_ptr = &m_list[m_idx];
981+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
982982 monster_race *r_ptr = &r_info[m_ptr->r_idx];
983983
984984 byte escape[96], escape_num = 0;
@@ -1347,7 +1347,7 @@ bool make_attack_spell(MONSTER_IDX m_idx)
13471347 PERCENTAGE failrate;
13481348 byte spell[96], num = 0;
13491349 BIT_FLAGS f4, f5, f6;
1350- monster_type *m_ptr = &m_list[m_idx];
1350+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
13511351 monster_race *r_ptr = &r_info[m_ptr->r_idx];
13521352 GAME_TEXT m_name[MAX_NLEN];
13531353 #ifndef JP
--- a/src/mspells2.c
+++ b/src/mspells2.c
@@ -51,7 +51,7 @@ static bool direct_beam(POSITION y1, POSITION x1, POSITION y2, POSITION x2, mons
5151 if (y == y2 && x == x2)
5252 hit2 = TRUE;
5353 else if (is_friend && current_floor_ptr->grid_array[y][x].m_idx > 0 &&
54- !are_enemies(m_ptr, &m_list[current_floor_ptr->grid_array[y][x].m_idx]))
54+ !are_enemies(m_ptr, &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx]))
5555 {
5656 /* Friends don't shoot friends */
5757 return FALSE;
@@ -228,7 +228,7 @@ void get_project_point(POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT
228228 */
229229 static bool dispel_check_monster(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
230230 {
231- monster_type *t_ptr = &m_list[t_idx];
231+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
232232
233233 /* Invulnabilty */
234234 if (MON_INVULNER(t_ptr)) return TRUE;
@@ -276,7 +276,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
276276 char m_poss[160];
277277 #endif
278278
279- monster_type *m_ptr = &m_list[m_idx];
279+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
280280 monster_type *t_ptr = NULL;
281281
282282 monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -305,7 +305,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
305305 if (pet_t_m_idx && pet)
306306 {
307307 target_idx = pet_t_m_idx;
308- t_ptr = &m_list[target_idx];
308+ t_ptr = &current_floor_ptr->m_list[target_idx];
309309
310310 /* Cancel if not projectable (for now) */
311311 if ((m_idx == target_idx) || !projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
@@ -321,7 +321,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
321321
322322 if (target_idx)
323323 {
324- t_ptr = &m_list[target_idx];
324+ t_ptr = &current_floor_ptr->m_list[target_idx];
325325
326326 /* Cancel if neither enemy nor a given target */
327327 if ((m_idx == target_idx) ||
@@ -359,7 +359,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
359359 if (!dummy) continue;
360360
361361 target_idx = dummy;
362- t_ptr = &m_list[target_idx];
362+ t_ptr = &current_floor_ptr->m_list[target_idx];
363363
364364 /* Skip dead monsters */
365365 if (!t_ptr->r_idx) continue;
--- a/src/mspells3.c
+++ b/src/mspells3.c
@@ -1054,7 +1054,7 @@ static bool cast_learned_spell(int spell, bool success)
10541054 if (!current_floor_ptr->grid_array[target_row][target_col].m_idx) break;
10551055 if (!player_has_los_bold(target_row, target_col)) break;
10561056 if (!projectable(p_ptr->y, p_ptr->x, target_row, target_col)) break;
1057- m_ptr = &m_list[current_floor_ptr->grid_array[target_row][target_col].m_idx];
1057+ m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[target_row][target_col].m_idx];
10581058 r_ptr = &r_info[m_ptr->r_idx];
10591059 monster_desc(m_name, m_ptr, 0);
10601060 if (r_ptr->flagsr & RFR_RES_TELE)
--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -20,7 +20,7 @@
2020 */
2121 void monster_name(MONSTER_IDX m_idx, char* m_name)
2222 {
23- monster_type *m_ptr = &m_list[m_idx];
23+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
2424 monster_desc(m_name, m_ptr, 0x00);
2525 }
2626
@@ -32,8 +32,8 @@ void monster_name(MONSTER_IDX m_idx, char* m_name)
3232 */
3333 bool monster_near_player(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
3434 {
35- monster_type *m_ptr = &m_list[m_idx];
36- monster_type *t_ptr = &m_list[t_idx];
35+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
36+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
3737 return (m_ptr->cdis <= MAX_SIGHT) || (t_ptr->cdis <= MAX_SIGHT);
3838 }
3939
@@ -44,7 +44,7 @@ bool monster_near_player(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
4444 */
4545 bool see_monster(MONSTER_IDX m_idx)
4646 {
47- monster_type *m_ptr = &m_list[m_idx];
47+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
4848 return is_seen(m_ptr);
4949 }
5050
@@ -55,7 +55,7 @@ bool see_monster(MONSTER_IDX m_idx)
5555 */
5656 bool spell_learnable(MONSTER_IDX m_idx)
5757 {
58- monster_type *m_ptr = &m_list[m_idx];
58+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
5959 /* Extract the "see-able-ness" */
6060 bool seen = (!p_ptr->blind && m_ptr->ml);
6161
@@ -70,7 +70,7 @@ bool spell_learnable(MONSTER_IDX m_idx)
7070 */
7171 int monster_level_idx(MONSTER_IDX m_idx)
7272 {
73- monster_type *m_ptr = &m_list[m_idx];
73+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
7474 monster_race *r_ptr = &r_info[m_ptr->r_idx];
7575 int rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
7676 return rlev;
@@ -83,7 +83,7 @@ int monster_level_idx(MONSTER_IDX m_idx)
8383 */
8484 bool monster_is_powerful(MONSTER_IDX m_idx)
8585 {
86- monster_type *m_ptr = &m_list[m_idx];
86+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
8787 monster_race *r_ptr = &r_info[m_ptr->r_idx];
8888 bool powerful = r_ptr->flags2 & RF2_POWERFUL ? TRUE : FALSE;
8989 return powerful;
@@ -97,7 +97,7 @@ bool monster_is_powerful(MONSTER_IDX m_idx)
9797 u32b monster_u_mode(MONSTER_IDX m_idx)
9898 {
9999 u32b u_mode = 0L;
100- monster_type *m_ptr = &m_list[m_idx];
100+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
101101 bool pet = is_pet(m_ptr);
102102 if (!pet) u_mode |= PM_ALLOW_UNIQUE;
103103 return u_mode;
@@ -316,7 +316,7 @@ HIT_POINT spell_RF4_BREATH(int GF_TYPE, POSITION y, POSITION x, MONSTER_IDX m_id
316316 HIT_POINT dam, ms_type, drs_type = 0;
317317 concptr type_s;
318318 bool smart_learn_aux = TRUE;
319- monster_type *m_ptr = &m_list[m_idx];
319+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
320320 bool known = monster_near_player(m_idx, t_idx);
321321 bool see_either = see_monster(m_idx) || see_monster(t_idx);
322322 bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
@@ -632,7 +632,7 @@ HIT_POINT spell_RF5_BA_ELEC(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_I
632632 HIT_POINT spell_RF5_BA_FIRE(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
633633 {
634634 HIT_POINT dam, rad;
635- monster_type *m_ptr = &m_list[m_idx];
635+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
636636
637637 if (m_ptr->r_idx == MON_ROLENTO)
638638 {
@@ -880,7 +880,7 @@ HIT_POINT spell_RF5_DRAIN_MANA(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTE
880880 */
881881 HIT_POINT spell_RF5_MIND_BLAST(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
882882 {
883- monster_type *m_ptr = &m_list[m_idx];
883+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
884884 bool seen = (!p_ptr->blind && m_ptr->ml);
885885 HIT_POINT dam;
886886 GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN];
@@ -917,7 +917,7 @@ HIT_POINT spell_RF5_MIND_BLAST(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTE
917917 */
918918 HIT_POINT spell_RF5_BRAIN_SMASH(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
919919 {
920- monster_type *m_ptr = &m_list[m_idx];
920+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
921921 bool seen = (!p_ptr->blind && m_ptr->ml);
922922 HIT_POINT dam;
923923 GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN];
@@ -1467,7 +1467,7 @@ void spell_badstatus_message(MONSTER_IDX m_idx, MONSTER_IDX t_idx, concptr msg1,
14671467 */
14681468 void spell_RF5_SCARE(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
14691469 {
1470- monster_type *t_ptr = &m_list[t_idx];
1470+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
14711471 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
14721472 int rlev = monster_level_idx(m_idx);
14731473 bool resist, saving_throw;
@@ -1517,7 +1517,7 @@ void spell_RF5_SCARE(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
15171517 */
15181518 void spell_RF5_BLIND(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
15191519 {
1520- monster_type *t_ptr = &m_list[t_idx];
1520+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
15211521 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
15221522 int rlev = monster_level_idx(m_idx);
15231523 bool resist, saving_throw;
@@ -1580,7 +1580,7 @@ void spell_RF5_BLIND(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
15801580 */
15811581 void spell_RF5_CONF(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
15821582 {
1583- monster_type *t_ptr = &m_list[t_idx];
1583+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
15841584 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
15851585 int rlev = monster_level_idx(m_idx);
15861586 bool resist, saving_throw;
@@ -1630,7 +1630,7 @@ void spell_RF5_CONF(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
16301630 */
16311631 void spell_RF5_SLOW(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
16321632 {
1633- monster_type *t_ptr = &m_list[t_idx];
1633+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
16341634 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
16351635 int rlev = monster_level_idx(m_idx);
16361636 bool resist, saving_throw;
@@ -1693,7 +1693,7 @@ void spell_RF5_SLOW(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
16931693 */
16941694 void spell_RF5_HOLD(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
16951695 {
1696- monster_type *t_ptr = &m_list[t_idx];
1696+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
16971697 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
16981698 int rlev = monster_level_idx(m_idx);
16991699 bool resist, saving_throw;
@@ -1744,7 +1744,7 @@ void spell_RF5_HOLD(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
17441744 void spell_RF6_HASTE(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
17451745 {
17461746 bool see_m = see_monster(m_idx);
1747- monster_type *m_ptr = &m_list[m_idx];
1747+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
17481748 GAME_TEXT m_name[MAX_NLEN];
17491749 monster_name(m_idx, m_name);
17501750
@@ -1803,7 +1803,7 @@ HIT_POINT spell_RF6_HAND_DOOM(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER
18031803 */
18041804 void spell_RF6_HEAL(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
18051805 {
1806- monster_type *m_ptr = &m_list[m_idx];
1806+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
18071807 int rlev = monster_level_idx(m_idx);
18081808 bool seen = (!p_ptr->blind && m_ptr->ml);
18091809 GAME_TEXT m_name[MAX_NLEN];
@@ -1869,7 +1869,7 @@ void spell_RF6_HEAL(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
18691869 */
18701870 void spell_RF6_INVULNER(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
18711871 {
1872- monster_type *m_ptr = &m_list[m_idx];
1872+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
18731873 bool seen = (!p_ptr->blind && m_ptr->ml);
18741874
18751875 monspell_message_base(m_idx, t_idx,
@@ -1946,7 +1946,7 @@ void spell_RF6_TPORT(MONSTER_IDX m_idx, int TARGET_TYPE)
19461946 */
19471947 HIT_POINT spell_RF6_WORLD(MONSTER_IDX m_idx)
19481948 {
1949- monster_type *m_ptr = &m_list[m_idx];
1949+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
19501950 MONSTER_IDX who = 0;
19511951 GAME_TEXT m_name[MAX_NLEN];
19521952 monster_name(m_idx, m_name);
@@ -1964,7 +1964,7 @@ HIT_POINT spell_RF6_WORLD(MONSTER_IDX m_idx)
19641964 */
19651965 HIT_POINT spell_RF6_SPECIAL_BANORLUPART(MONSTER_IDX m_idx)
19661966 {
1967- monster_type *m_ptr = &m_list[m_idx];
1967+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
19681968 HIT_POINT dummy_hp, dummy_maxhp;
19691969 MONSTER_IDX k;
19701970 POSITION dummy_y = m_ptr->fy;
@@ -1982,11 +1982,11 @@ HIT_POINT spell_RF6_SPECIAL_BANORLUPART(MONSTER_IDX m_idx)
19821982
19831983 delete_monster_idx(current_floor_ptr->grid_array[m_ptr->fy][m_ptr->fx].m_idx);
19841984 summon_named_creature(0, dummy_y, dummy_x, MON_BANOR, mode);
1985- m_list[hack_m_idx_ii].hp = dummy_hp;
1986- m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
1985+ current_floor_ptr->m_list[hack_m_idx_ii].hp = dummy_hp;
1986+ current_floor_ptr->m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
19871987 summon_named_creature(0, dummy_y, dummy_x, MON_LUPART, mode);
1988- m_list[hack_m_idx_ii].hp = dummy_hp;
1989- m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
1988+ current_floor_ptr->m_list[hack_m_idx_ii].hp = dummy_hp;
1989+ current_floor_ptr->m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
19901990
19911991 msg_print(_("『バーノール・ルパート』が分裂した!","Banor=Rupart splits in two person!"));
19921992 break;
@@ -2001,21 +2001,21 @@ HIT_POINT spell_RF6_SPECIAL_BANORLUPART(MONSTER_IDX m_idx)
20012001
20022002 for (k = 1; k < m_max; k++)
20032003 {
2004- if (m_list[k].r_idx == MON_BANOR || m_list[k].r_idx == MON_LUPART)
2004+ if (current_floor_ptr->m_list[k].r_idx == MON_BANOR || current_floor_ptr->m_list[k].r_idx == MON_LUPART)
20052005 {
2006- dummy_hp += m_list[k].hp;
2007- dummy_maxhp += m_list[k].maxhp;
2008- if (m_list[k].r_idx != m_ptr->r_idx)
2006+ dummy_hp += current_floor_ptr->m_list[k].hp;
2007+ dummy_maxhp += current_floor_ptr->m_list[k].maxhp;
2008+ if (current_floor_ptr->m_list[k].r_idx != m_ptr->r_idx)
20092009 {
2010- dummy_y = m_list[k].fy;
2011- dummy_x = m_list[k].fx;
2010+ dummy_y = current_floor_ptr->m_list[k].fy;
2011+ dummy_x = current_floor_ptr->m_list[k].fx;
20122012 }
20132013 delete_monster_idx(k);
20142014 }
20152015 }
20162016 summon_named_creature(0, dummy_y, dummy_x, MON_BANORLUPART, mode);
2017- m_list[hack_m_idx_ii].hp = dummy_hp;
2018- m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
2017+ current_floor_ptr->m_list[hack_m_idx_ii].hp = dummy_hp;
2018+ current_floor_ptr->m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
20192019
20202020 msg_print(_("『バーノール』と『ルパート』が合体した!", "Banor and Rupart combine into one!"));
20212021 break;
@@ -2067,8 +2067,8 @@ HIT_POINT spell_RF6_SPECIAL_ROLENTO(POSITION y, POSITION x, MONSTER_IDX m_idx, M
20672067 HIT_POINT spell_RF6_SPECIAL_B(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
20682068 {
20692069 HIT_POINT dam = -1;
2070- monster_type *m_ptr = &m_list[m_idx];
2071- monster_type *t_ptr = &m_list[t_idx];
2070+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
2071+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
20722072 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
20732073 bool monster_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
20742074 bool monster_to_monster = (TARGET_TYPE == MONSTER_TO_MONSTER);
@@ -2144,7 +2144,7 @@ HIT_POINT spell_RF6_SPECIAL_B(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER
21442144 }
21452145
21462146 if(monster_to_player && p_ptr->riding)
2147- mon_take_hit_mon(p_ptr->riding, dam, &dead, &fear, extract_note_dies(real_r_idx(&m_list[p_ptr->riding])), m_idx);
2147+ mon_take_hit_mon(p_ptr->riding, dam, &dead, &fear, extract_note_dies(real_r_idx(&current_floor_ptr->m_list[p_ptr->riding])), m_idx);
21482148
21492149 if(monster_to_monster)
21502150 mon_take_hit_mon(t_idx, dam, &dead, &fear, extract_note_dies(real_r_idx(t_ptr)), m_idx);
@@ -2163,7 +2163,7 @@ HIT_POINT spell_RF6_SPECIAL_B(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER
21632163 */
21642164 HIT_POINT spell_RF6_SPECIAL(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
21652165 {
2166- monster_type *m_ptr = &m_list[m_idx];
2166+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
21672167 monster_race *r_ptr = &r_info[m_ptr->r_idx];
21682168
21692169 disturb(TRUE, TRUE);
@@ -2203,8 +2203,8 @@ HIT_POINT spell_RF6_SPECIAL(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_I
22032203 */
22042204 void spell_RF6_TELE_TO(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
22052205 {
2206- monster_type *m_ptr = &m_list[m_idx];
2207- monster_type *t_ptr = &m_list[t_idx];
2206+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
2207+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
22082208 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
22092209
22102210 simple_monspell_message(m_idx, t_idx,
@@ -2265,7 +2265,7 @@ void spell_RF6_TELE_TO(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
22652265 */
22662266 void spell_RF6_TELE_AWAY(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
22672267 {
2268- monster_type *t_ptr = &m_list[t_idx];
2268+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
22692269 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
22702270
22712271 simple_monspell_message(m_idx, t_idx,
@@ -2334,7 +2334,7 @@ void spell_RF6_TELE_AWAY(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
23342334 */
23352335 void spell_RF6_TELE_LEVEL(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
23362336 {
2337- monster_type *t_ptr = &m_list[t_idx];
2337+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
23382338 monster_race *tr_ptr = &r_info[t_ptr->r_idx];
23392339 int rlev = monster_level_idx(m_idx);
23402340 bool resist, saving_throw;
@@ -2411,8 +2411,8 @@ HIT_POINT spell_RF6_PSY_SPEAR(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER
24112411 */
24122412 void spell_RF6_DARKNESS(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
24132413 {
2414- monster_type *m_ptr = &m_list[m_idx];
2415- monster_type *t_ptr = &m_list[t_idx];
2414+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
2415+ monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
24162416 monster_race *r_ptr = &r_info[m_ptr->r_idx];
24172417 bool can_use_lite_area = FALSE;
24182418 bool monster_to_monster = TARGET_TYPE == MONSTER_TO_MONSTER;
@@ -2541,7 +2541,7 @@ void spell_RF6_FORGET(MONSTER_IDX m_idx)
25412541 */
25422542 void spell_RF6_RAISE_DEAD(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
25432543 {
2544- monster_type *m_ptr = &m_list[m_idx];
2544+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
25452545
25462546 monspell_message(m_idx, t_idx,
25472547 _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -2680,7 +2680,7 @@ MONSTER_NUMBER summon_LOUSE(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
26802680 MONSTER_NUMBER summon_Kin(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
26812681 {
26822682 int k, count = 0;
2683- monster_type *m_ptr = &m_list[m_idx];
2683+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
26842684 monster_race *r_ptr = &r_info[m_ptr->r_idx];
26852685
26862686 for (k = 0; k < 4; k++)
@@ -2705,7 +2705,7 @@ void spell_RF6_S_KIN(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_id
27052705 bool see_either = see_monster(m_idx) || see_monster(t_idx);
27062706 bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
27072707 bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
2708- monster_type *m_ptr = &m_list[m_idx];
2708+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
27092709 monster_race *r_ptr = &r_info[m_ptr->r_idx];
27102710 int rlev = monster_level_idx(m_idx);
27112711 int count = 0;
@@ -2795,7 +2795,7 @@ void spell_RF6_S_KIN(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_id
27952795 void spell_RF6_S_CYBER(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
27962796 {
27972797 int count = 0;
2798- monster_type *m_ptr = &m_list[m_idx];
2798+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
27992799 int rlev = monster_level_idx(m_idx);
28002800 bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
28012801 bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
@@ -3047,7 +3047,7 @@ void spell_RF6_S_ANGEL(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_
30473047 {
30483048 int count = 0, k;
30493049 int num = 1;
3050- monster_type *m_ptr = &m_list[m_idx];
3050+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
30513051 monster_race *r_ptr = &r_info[m_ptr->r_idx];
30523052 int rlev = monster_level_idx(m_idx);
30533053 bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
@@ -3253,7 +3253,7 @@ void spell_RF6_S_HI_UNDEAD(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_ID
32533253 {
32543254 bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
32553255 bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
3256- monster_type *m_ptr = &m_list[m_idx];
3256+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
32573257 int rlev = monster_level_idx(m_idx);
32583258 int k, count = 0;
32593259 GAME_TEXT m_name[MAX_NLEN];
@@ -3381,7 +3381,7 @@ void spell_RF6_S_AMBERITES(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_ID
33813381 void spell_RF6_S_UNIQUE(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
33823382 {
33833383 int count = 0, k;
3384- monster_type *m_ptr = &m_list[m_idx];
3384+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
33853385 int rlev = monster_level_idx(m_idx);
33863386 bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
33873387 bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
@@ -4106,7 +4106,7 @@ HIT_POINT monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, i
41064106 */
41074107 HIT_POINT monspell_damage(int SPELL_NUM, MONSTER_IDX m_idx, int TYPE)
41084108 {
4109- monster_type *m_ptr = &m_list[m_idx];
4109+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
41104110 monster_race *r_ptr = &r_info[m_ptr->r_idx];
41114111 int hp;
41124112 int rlev = monster_level_idx(m_idx);
--- a/src/mutation.c
+++ b/src/mutation.c
@@ -2296,7 +2296,7 @@ bool mutation_power_aux(int power)
22962296 break;
22972297 }
22982298
2299- m_ptr = &m_list[g_ptr->m_idx];
2299+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
23002300 r_ptr = &r_info[m_ptr->r_idx];
23012301
23022302 if ((r_ptr->flags3 & RF3_EVIL) &&
--- a/src/object2.c
+++ b/src/object2.c
@@ -78,7 +78,7 @@ void excise_object_idx(OBJECT_IDX o_idx)
7878 monster_type *m_ptr;
7979
8080 /* Monster */
81- m_ptr = &m_list[j_ptr->held_m_idx];
81+ m_ptr = &current_floor_ptr->m_list[j_ptr->held_m_idx];
8282
8383 /* Scan all objects in the grid */
8484 for (this_o_idx = m_ptr->hold_o_idx; this_o_idx; this_o_idx = next_o_idx)
@@ -287,7 +287,7 @@ static void compact_objects_aux(OBJECT_IDX i1, OBJECT_IDX i2)
287287 monster_type *m_ptr;
288288
289289 /* Acquire monster */
290- m_ptr = &m_list[o_ptr->held_m_idx];
290+ m_ptr = &current_floor_ptr->m_list[o_ptr->held_m_idx];
291291
292292 /* Repair monster */
293293 if (m_ptr->hold_o_idx == i1)
@@ -384,7 +384,7 @@ void compact_objects(int size)
384384 monster_type *m_ptr;
385385
386386 /* Acquire monster */
387- m_ptr = &m_list[o_ptr->held_m_idx];
387+ m_ptr = &current_floor_ptr->m_list[o_ptr->held_m_idx];
388388
389389 y = m_ptr->fy;
390390 x = m_ptr->fx;
@@ -479,7 +479,7 @@ void wipe_o_list(void)
479479 monster_type *m_ptr;
480480
481481 /* Monster */
482- m_ptr = &m_list[o_ptr->held_m_idx];
482+ m_ptr = &current_floor_ptr->m_list[o_ptr->held_m_idx];
483483
484484 /* Hack -- see above */
485485 m_ptr->hold_o_idx = 0;
@@ -6464,7 +6464,7 @@ static void spell_damcalc(monster_type *m_ptr, EFFECT_ID typ, HIT_POINT dam, int
64646464 */
64656465 void spell_damcalc_by_spellnum(int spell_num, EFFECT_ID typ, MONSTER_IDX m_idx, int *max)
64666466 {
6467- monster_type *m_ptr = &m_list[m_idx];
6467+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
64686468 HIT_POINT dam = monspell_damage((spell_num), m_idx, DAM_MAX);
64696469 spell_damcalc(m_ptr, typ, dam, max);
64706470 }
@@ -6577,7 +6577,7 @@ bool process_warning(POSITION xx, POSITION yy)
65776577
65786578 if (!g_ptr->m_idx) continue;
65796579
6580- m_ptr = &m_list[g_ptr->m_idx];
6580+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
65816581
65826582 if (MON_CSLEEP(m_ptr)) continue;
65836583 if (!is_hostile(m_ptr)) continue;
--- a/src/player-move.c
+++ b/src/player-move.c
@@ -800,7 +800,7 @@ bool player_can_enter(FEAT_IDX feature, BIT_FLAGS16 mode)
800800 {
801801 feature_type *f_ptr = &f_info[feature];
802802
803- if (p_ptr->riding) return monster_can_cross_terrain(feature, &r_info[m_list[p_ptr->riding].r_idx], mode | CEM_RIDING);
803+ if (p_ptr->riding) return monster_can_cross_terrain(feature, &r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx], mode | CEM_RIDING);
804804
805805 if (have_flag(f_ptr->flags, FF_PATTERN))
806806 {
@@ -850,7 +850,7 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
850850
851851 if (om_idx > 0) /* Monster on old spot (or p_ptr->riding) */
852852 {
853- monster_type *om_ptr = &m_list[om_idx];
853+ monster_type *om_ptr = &current_floor_ptr->m_list[om_idx];
854854 om_ptr->fy = ny;
855855 om_ptr->fx = nx;
856856 update_monster(om_idx, TRUE);
@@ -858,7 +858,7 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
858858
859859 if (nm_idx > 0) /* Monster on new spot */
860860 {
861- monster_type *nm_ptr = &m_list[nm_idx];
861+ monster_type *nm_ptr = &current_floor_ptr->m_list[nm_idx];
862862 nm_ptr->fy = oy;
863863 nm_ptr->fx = ox;
864864 update_monster(nm_idx, TRUE);
@@ -1113,7 +1113,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
11131113
11141114 monster_type *m_ptr;
11151115
1116- monster_type *riding_m_ptr = &m_list[p_ptr->riding];
1116+ monster_type *riding_m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
11171117 monster_race *riding_r_ptr = &r_info[p_ptr->riding ? riding_m_ptr->r_idx : 0]; /* Paranoia */
11181118
11191119 GAME_TEXT m_name[MAX_NLEN];
@@ -1213,7 +1213,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
12131213 p_can_enter = FALSE;
12141214 }
12151215
1216- m_ptr = &m_list[g_ptr->m_idx];
1216+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
12171217
12181218 if (inventory[INVEN_RARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
12191219 if (inventory[INVEN_LARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
@@ -1792,7 +1792,7 @@ static bool run_test(void)
17921792 /* Visible monsters abort running */
17931793 if (g_ptr->m_idx)
17941794 {
1795- monster_type *m_ptr = &m_list[g_ptr->m_idx];
1795+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
17961796
17971797 /* Visible monster */
17981798 if (m_ptr->ml) return (TRUE);
@@ -2182,7 +2182,7 @@ static DIRECTION travel_test(DIRECTION prev_dir)
21822182 /* Visible monsters abort running */
21832183 if (g_ptr->m_idx)
21842184 {
2185- monster_type *m_ptr = &m_list[g_ptr->m_idx];
2185+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
21862186
21872187 /* Visible monster */
21882188 if (m_ptr->ml) return (0);
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -1800,7 +1800,7 @@ void calc_bonuses(void)
18001800 }
18011801 else
18021802 {
1803- monster_type *riding_m_ptr = &m_list[p_ptr->riding];
1803+ monster_type *riding_m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
18041804 monster_race *riding_r_ptr = &r_info[riding_m_ptr->r_idx];
18051805 SPEED speed = riding_m_ptr->mspeed;
18061806
@@ -2169,7 +2169,7 @@ void calc_bonuses(void)
21692169 }
21702170 else
21712171 {
2172- penalty = r_info[m_list[p_ptr->riding].r_idx].level - p_ptr->skill_exp[GINOU_RIDING] / 80;
2172+ penalty = r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level - p_ptr->skill_exp[GINOU_RIDING] / 80;
21732173 penalty += 30;
21742174 if (penalty < 30) penalty = 30;
21752175 }
@@ -2208,7 +2208,7 @@ void calc_bonuses(void)
22082208 }
22092209 else
22102210 {
2211- penalty = r_info[m_list[p_ptr->riding].r_idx].level - p_ptr->skill_exp[GINOU_RIDING] / 80;
2211+ penalty = r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level - p_ptr->skill_exp[GINOU_RIDING] / 80;
22122212 penalty += 30;
22132213 if (penalty < 30) penalty = 30;
22142214 }
--- a/src/realm-hex.c
+++ b/src/realm-hex.c
@@ -277,7 +277,7 @@ void revenge_store(HIT_POINT dam)
277277 */
278278 bool teleport_barrier(MONSTER_IDX m_idx)
279279 {
280- monster_type *m_ptr = &m_list[m_idx];
280+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
281281 monster_race *r_ptr = &r_info[m_ptr->r_idx];
282282
283283 if (!hex_spelling(HEX_ANTI_TELE)) return FALSE;
@@ -293,7 +293,7 @@ bool teleport_barrier(MONSTER_IDX m_idx)
293293 */
294294 bool magic_barrier(MONSTER_IDX m_idx)
295295 {
296- monster_type *m_ptr = &m_list[m_idx];
296+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
297297 monster_race *r_ptr = &r_info[m_ptr->r_idx];
298298
299299 if (!hex_spelling(HEX_ANTI_MAGIC)) return FALSE;
@@ -309,7 +309,7 @@ bool magic_barrier(MONSTER_IDX m_idx)
309309 */
310310 bool multiply_barrier(MONSTER_IDX m_idx)
311311 {
312- monster_type *m_ptr = &m_list[m_idx];
312+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
313313 monster_race *r_ptr = &r_info[m_ptr->r_idx];
314314
315315 if (!hex_spelling(HEX_ANTI_MULTI)) return FALSE;
--- a/src/realm-hissatsu.c
+++ b/src/realm-hissatsu.c
@@ -288,7 +288,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
288288 POSITION ty = y, tx = x;
289289 POSITION oy = y, ox = x;
290290 MONSTER_IDX m_idx = current_floor_ptr->grid_array[y][x].m_idx;
291- monster_type *m_ptr = &m_list[m_idx];
291+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
292292 GAME_TEXT m_name[MAX_NLEN];
293293
294294 monster_desc(m_name, m_ptr, 0);
@@ -526,7 +526,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
526526 y = p_ptr->y + ddy_ddd[dir];
527527 x = p_ptr->x + ddx_ddd[dir];
528528 g_ptr = &current_floor_ptr->grid_array[y][x];
529- m_ptr = &m_list[g_ptr->m_idx];
529+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
530530
531531 /* Hack -- attack monsters */
532532 if (g_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
@@ -661,7 +661,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
661661 ny = y + ddy[dir];
662662 nx = x + ddx[dir];
663663 m_idx = g_ptr->m_idx;
664- m_ptr = &m_list[m_idx];
664+ m_ptr = &current_floor_ptr->m_list[m_idx];
665665
666666 /* Monster cannot move back? */
667667 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx], 0))
--- a/src/save.c
+++ b/src/save.c
@@ -1134,7 +1134,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
11341134 /* Dump the monsters */
11351135 for (i = 1; i < m_max; i++)
11361136 {
1137- monster_type *m_ptr = &m_list[i];
1137+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
11381138
11391139 /* Dump it */
11401140 wr_monster(m_ptr);
--- a/src/shoot.c
+++ b/src/shoot.c
@@ -599,7 +599,7 @@ void exe_fire(INVENTORY_IDX item, object_type *j_ptr)
599599 {
600600 grid_type *c_mon_ptr = &current_floor_ptr->grid_array[y][x];
601601
602- monster_type *m_ptr = &m_list[c_mon_ptr->m_idx];
602+ monster_type *m_ptr = &current_floor_ptr->m_list[c_mon_ptr->m_idx];
603603 monster_race *r_ptr = &r_info[m_ptr->r_idx];
604604
605605 /* Check the visibility */
@@ -632,7 +632,7 @@ void exe_fire(INVENTORY_IDX item, object_type *j_ptr)
632632 if (p_ptr->riding)
633633 {
634634 if ((p_ptr->skill_exp[GINOU_RIDING] < s_info[p_ptr->pclass].s_max[GINOU_RIDING])
635- && ((p_ptr->skill_exp[GINOU_RIDING] - (RIDING_EXP_BEGINNER * 2)) / 200 < r_info[m_list[p_ptr->riding].r_idx].level)
635+ && ((p_ptr->skill_exp[GINOU_RIDING] - (RIDING_EXP_BEGINNER * 2)) / 200 < r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level)
636636 && one_in_(2))
637637 {
638638 p_ptr->skill_exp[GINOU_RIDING] += 1;
@@ -826,7 +826,7 @@ void exe_fire(INVENTORY_IDX item, object_type *j_ptr)
826826 if (stick_to)
827827 {
828828 MONSTER_IDX m_idx = current_floor_ptr->grid_array[y][x].m_idx;
829- monster_type *m_ptr = &m_list[m_idx];
829+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
830830 OBJECT_IDX o_idx = o_pop();
831831
832832 if (!o_idx)
--- a/src/spells-status.c
+++ b/src/spells-status.c
@@ -409,7 +409,7 @@ bool fishing(player_type *creature_ptr)
409409 else if (current_floor_ptr->grid_array[y][x].m_idx)
410410 {
411411 GAME_TEXT m_name[MAX_NLEN];
412- monster_desc(m_name, &m_list[current_floor_ptr->grid_array[y][x].m_idx], 0);
412+ monster_desc(m_name, &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx], 0);
413413 msg_format(_("%sが邪魔だ!", "%^s is stand in your way."), m_name);
414414 free_turn(creature_ptr);
415415 return FALSE;
--- a/src/spells-summon.c
+++ b/src/spells-summon.c
@@ -371,7 +371,7 @@ int summon_cyber(MONSTER_IDX who, POSITION y, POSITION x)
371371 /* Summoned by a monster */
372372 if (who > 0)
373373 {
374- monster_type *m_ptr = &m_list[who];
374+ monster_type *m_ptr = &current_floor_ptr->m_list[who];
375375 if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
376376 }
377377
@@ -408,7 +408,7 @@ void mitokohmon(void)
408408 {
409409 for (i = m_max - 1; i > 0; i--)
410410 {
411- m_ptr = &m_list[i];
411+ m_ptr = &current_floor_ptr->m_list[i];
412412 if (!m_ptr->r_idx) continue;
413413 if (!((m_ptr->r_idx == MON_SUKE) || (m_ptr->r_idx == MON_KAKU))) continue;
414414 if (!los(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)) continue;
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -842,7 +842,7 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
842842 int i;
843843 BIT_FLAGS mode = 0L;
844844
845- if (!who || is_pet(&m_list[who]))
845+ if (!who || is_pet(&current_floor_ptr->m_list[who]))
846846 mode |= PM_FORCE_PET;
847847
848848 for (i = 0; i < o_ptr->number ; i++)
@@ -997,8 +997,8 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
997997
998998 grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
999999
1000- monster_type *m_ptr = &m_list[g_ptr->m_idx];
1001- monster_type *caster_ptr = (who > 0) ? &m_list[who] : NULL;
1000+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
1001+ monster_type *caster_ptr = (who > 0) ? &current_floor_ptr->m_list[who] : NULL;
10021002
10031003 monster_race *r_ptr = &r_info[m_ptr->r_idx];
10041004
@@ -3586,7 +3586,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
35863586 }
35873587
35883588 /* Hack -- Get new monster */
3589- m_ptr = &m_list[g_ptr->m_idx];
3589+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
35903590
35913591 /* Hack -- Get new race */
35923592 r_ptr = &r_info[m_ptr->r_idx];
@@ -3911,16 +3911,16 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
39113911 {
39123912 do
39133913 {
3914- t_y = m_list[who].fy - 1 + randint1(3);
3915- t_x = m_list[who].fx - 1 + randint1(3);
3914+ t_y = current_floor_ptr->m_list[who].fy - 1 + randint1(3);
3915+ t_x = current_floor_ptr->m_list[who].fx - 1 + randint1(3);
39163916 max_attempts--;
39173917 }
39183918 while (max_attempts && in_bounds2u(t_y, t_x) && !projectable(p_ptr->y, p_ptr->x, t_y, t_x));
39193919
39203920 if (max_attempts < 1)
39213921 {
3922- t_y = m_list[who].fy;
3923- t_x = m_list[who].fx;
3922+ t_y = current_floor_ptr->m_list[who].fy;
3923+ t_x = current_floor_ptr->m_list[who].fx;
39243924 }
39253925 }
39263926 else
@@ -3948,7 +3948,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
39483948
39493949 if (who > 0)
39503950 {
3951- m_ptr = &m_list[who];
3951+ m_ptr = &current_floor_ptr->m_list[who];
39523952 rlev = (((&r_info[m_ptr->r_idx])->level >= 1) ? (&r_info[m_ptr->r_idx])->level : 1);
39533953 monster_desc(m_name, m_ptr, 0);
39543954
@@ -5503,9 +5503,9 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
55035503 /* Start at monster */
55045504 else if (who > 0)
55055505 {
5506- x1 = m_list[who].fx;
5507- y1 = m_list[who].fy;
5508- monster_desc(who_name, &m_list[who], MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
5506+ x1 = current_floor_ptr->m_list[who].fx;
5507+ y1 = current_floor_ptr->m_list[who].fy;
5508+ monster_desc(who_name, &current_floor_ptr->m_list[who], MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
55095509 }
55105510
55115511 else
@@ -5673,7 +5673,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
56735673 if (project_m(0, 0, y, x, dam, GF_SEEKER, flg, TRUE)) notice = TRUE;
56745674 if (!who && (project_m_n == 1) && !jump) {
56755675 if (current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx > 0) {
5676- monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
5676+ monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
56775677
56785678 if (m_ptr->ml)
56795679 {
@@ -5697,7 +5697,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
56975697 if (!who && (project_m_n == 1) && !jump) {
56985698 if (current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx > 0)
56995699 {
5700- monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
5700+ monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
57015701
57025702 if (m_ptr->ml)
57035703 {
@@ -5826,7 +5826,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
58265826 (void)project_m(0, 0, py, px, dam, GF_SUPER_RAY, flg, TRUE);
58275827 if(!who && (project_m_n == 1) && !jump){
58285828 if(current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx >0 ){
5829- monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
5829+ monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
58305830
58315831 if (m_ptr->ml)
58325832 {
@@ -6106,7 +6106,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
61066106
61076107 if (flg & PROJECT_KILL)
61086108 {
6109- see_s_msg = (who > 0) ? is_seen(&m_list[who]) :
6109+ see_s_msg = (who > 0) ? is_seen(&current_floor_ptr->m_list[who]) :
61106110 (!who ? TRUE : (player_can_see_bold(y1, x1) && projectable(p_ptr->y, p_ptr->x, y1, x1)));
61116111 }
61126112
@@ -6204,7 +6204,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
62046204 /* A single bolt may be reflected */
62056205 if (grids <= 1)
62066206 {
6207- monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[y][x].m_idx];
6207+ monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx];
62086208 monster_race *ref_ptr = &r_info[m_ptr->r_idx];
62096209
62106210 if ((flg & PROJECT_REFLECTABLE) && current_floor_ptr->grid_array[y][x].m_idx && (ref_ptr->flags2 & RF2_REFLECTING) &&
@@ -6350,7 +6350,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
63506350 /* Track if possible */
63516351 if (current_floor_ptr->grid_array[y][x].m_idx > 0)
63526352 {
6353- monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[y][x].m_idx];
6353+ monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx];
63546354
63556355 if (m_ptr->ml)
63566356 {
@@ -6441,7 +6441,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
64416441 {
64426442 GAME_TEXT m_name[MAX_NLEN];
64436443
6444- monster_desc(m_name, &m_list[p_ptr->riding], 0);
6444+ monster_desc(m_name, &current_floor_ptr->m_list[p_ptr->riding], 0);
64456445
64466446 if (rakubadam_m > 0)
64476447 {
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -371,7 +371,7 @@ bool detect_monsters_normal(POSITION range)
371371
372372 for (i = 1; i < m_max; i++)
373373 {
374- monster_type *m_ptr = &m_list[i];
374+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
375375 monster_race *r_ptr = &r_info[m_ptr->r_idx];
376376
377377 /* Skip dead monsters */
@@ -419,7 +419,7 @@ bool detect_monsters_invis(POSITION range)
419419
420420 for (i = 1; i < m_max; i++)
421421 {
422- monster_type *m_ptr = &m_list[i];
422+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
423423 monster_race *r_ptr = &r_info[m_ptr->r_idx];
424424
425425 /* Skip dead monsters */
@@ -472,7 +472,7 @@ bool detect_monsters_evil(POSITION range)
472472
473473 for (i = 1; i < m_max; i++)
474474 {
475- monster_type *m_ptr = &m_list[i];
475+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
476476 monster_race *r_ptr = &r_info[m_ptr->r_idx];
477477
478478 /* Skip dead monsters */
@@ -529,7 +529,7 @@ bool detect_monsters_nonliving(POSITION range)
529529
530530 for (i = 1; i < m_max; i++)
531531 {
532- monster_type *m_ptr = &m_list[i];
532+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
533533
534534 /* Skip dead monsters */
535535 if (!m_ptr->r_idx) continue;
@@ -579,7 +579,7 @@ bool detect_monsters_mind(POSITION range)
579579
580580 for (i = 1; i < m_max; i++)
581581 {
582- monster_type *m_ptr = &m_list[i];
582+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
583583 monster_race *r_ptr = &r_info[m_ptr->r_idx];
584584
585585 /* Skip dead monsters */
@@ -632,7 +632,7 @@ bool detect_monsters_string(POSITION range, concptr Match)
632632
633633 for (i = 1; i < m_max; i++)
634634 {
635- monster_type *m_ptr = &m_list[i];
635+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
636636 monster_race *r_ptr = &r_info[m_ptr->r_idx];
637637
638638 /* Skip dead monsters */
@@ -687,7 +687,7 @@ bool detect_monsters_xxx(POSITION range, u32b match_flag)
687687
688688 for (i = 1; i < m_max; i++)
689689 {
690- monster_type *m_ptr = &m_list[i];
690+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
691691 monster_race *r_ptr = &r_info[m_ptr->r_idx];
692692
693693 /* Skip dead monsters */
@@ -790,7 +790,7 @@ bool project_all_los(EFFECT_ID typ, HIT_POINT dam)
790790 /* Mark all (nearby) monsters */
791791 for (i = 1; i < m_max; i++)
792792 {
793- monster_type *m_ptr = &m_list[i];
793+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
794794
795795 /* Paranoia -- Skip dead monsters */
796796 if (!m_ptr->r_idx) continue;
@@ -808,7 +808,7 @@ bool project_all_los(EFFECT_ID typ, HIT_POINT dam)
808808 /* Affect all marked monsters */
809809 for (i = 1; i < m_max; i++)
810810 {
811- monster_type *m_ptr = &m_list[i];
811+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
812812
813813 /* Skip unmarked monsters */
814814 if (!(m_ptr->mflag & (MFLAG_TEMP))) continue;
@@ -980,7 +980,7 @@ void aggravate_monsters(MONSTER_IDX who)
980980 /* Aggravate everyone nearby */
981981 for (i = 1; i < m_max; i++)
982982 {
983- monster_type *m_ptr = &m_list[i];
983+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
984984
985985 /* Paranoia -- Skip dead monsters */
986986 if (!m_ptr->r_idx) continue;
@@ -1029,7 +1029,7 @@ void aggravate_monsters(MONSTER_IDX who)
10291029 bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name)
10301030 {
10311031 int msec = delay_factor * delay_factor * delay_factor;
1032- monster_type *m_ptr = &m_list[m_idx];
1032+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
10331033 monster_race *r_ptr = &r_info[m_ptr->r_idx];
10341034 bool resist = FALSE;
10351035
@@ -1130,7 +1130,7 @@ bool symbol_genocide(int power, bool player_cast)
11301130 /* Delete the monsters of that "type" */
11311131 for (i = 1; i < m_max; i++)
11321132 {
1133- monster_type *m_ptr = &m_list[i];
1133+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
11341134 monster_race *r_ptr = &r_info[m_ptr->r_idx];
11351135
11361136 /* Paranoia -- Skip dead monsters */
@@ -1172,7 +1172,7 @@ bool mass_genocide(int power, bool player_cast)
11721172 /* Delete the (nearby) monsters */
11731173 for (i = 1; i < m_max; i++)
11741174 {
1175- monster_type *m_ptr = &m_list[i];
1175+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
11761176
11771177 /* Paranoia -- Skip dead monsters */
11781178 if (!m_ptr->r_idx) continue;
@@ -1214,7 +1214,7 @@ bool mass_genocide_undead(int power, bool player_cast)
12141214 /* Delete the (nearby) monsters */
12151215 for (i = 1; i < m_max; i++)
12161216 {
1217- monster_type *m_ptr = &m_list[i];
1217+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
12181218 monster_race *r_ptr = &r_info[m_ptr->r_idx];
12191219
12201220 /* Paranoia -- Skip dead monsters */
@@ -1260,7 +1260,7 @@ bool probing(void)
12601260 /* Probe all (nearby) monsters */
12611261 for (i = 1; i < m_max; i++)
12621262 {
1263- monster_type *m_ptr = &m_list[i];
1263+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
12641264 monster_race *r_ptr = &r_info[m_ptr->r_idx];
12651265
12661266 /* Paranoia -- Skip dead monsters */
@@ -1450,7 +1450,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
14501450
14511451 if (g_ptr->m_idx)
14521452 {
1453- monster_type *m_ptr = &m_list[g_ptr->m_idx];
1453+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
14541454 monster_race *r_ptr = &r_info[m_ptr->r_idx];
14551455
14561456 if (in_generate) /* In generation */
@@ -1837,7 +1837,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
18371837 if (m_idx)
18381838 {
18391839 GAME_TEXT m_name[MAX_NLEN];
1840- monster_type *m_ptr = &m_list[m_idx];
1840+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
18411841
18421842 /* Get the monster's real name */
18431843 monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
@@ -1871,7 +1871,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
18711871 /* Process monsters */
18721872 if (g_ptr->m_idx)
18731873 {
1874- monster_type *m_ptr = &m_list[g_ptr->m_idx];
1874+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
18751875 monster_race *r_ptr = &r_info[m_ptr->r_idx];
18761876
18771877 /* Quest monsters */
@@ -1950,7 +1950,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
19501950
19511951 if (g_ptr->m_idx)
19521952 {
1953- if (record_named_pet && is_pet(&m_list[g_ptr->m_idx]) && m_list[g_ptr->m_idx].nickname)
1953+ if (record_named_pet && is_pet(&current_floor_ptr->m_list[g_ptr->m_idx]) && current_floor_ptr->m_list[g_ptr->m_idx].nickname)
19541954 {
19551955 char m2_name[MAX_NLEN];
19561956
@@ -2125,7 +2125,7 @@ void discharge_minion(void)
21252125
21262126 for (i = 1; i < m_max; i++)
21272127 {
2128- monster_type *m_ptr = &m_list[i];
2128+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
21292129 if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
21302130 if (m_ptr->nickname) okay = FALSE;
21312131 }
@@ -2137,7 +2137,7 @@ void discharge_minion(void)
21372137 for (i = 1; i < m_max; i++)
21382138 {
21392139 HIT_POINT dam;
2140- monster_type *m_ptr = &m_list[i];
2140+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
21412141 monster_race *r_ptr;
21422142
21432143 if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
@@ -2213,7 +2213,7 @@ static void cave_temp_room_lite(void)
22132213 if (g_ptr->m_idx)
22142214 {
22152215 int chance = 25;
2216- monster_type *m_ptr = &m_list[g_ptr->m_idx];
2216+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
22172217 monster_race *r_ptr = &r_info[m_ptr->r_idx];
22182218 update_monster(g_ptr->m_idx, FALSE);
22192219
@@ -2925,7 +2925,7 @@ bool teleport_swap(DIRECTION dir)
29252925 return FALSE;
29262926 }
29272927
2928- m_ptr = &m_list[g_ptr->m_idx];
2928+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
29292929 r_ptr = &r_info[m_ptr->r_idx];
29302930
29312931 (void)set_monster_csleep(g_ptr->m_idx, 0);
@@ -3821,7 +3821,7 @@ bool rush_attack(bool *mdeath)
38213821 update_monster(current_floor_ptr->grid_array[ny][nx].m_idx, TRUE);
38223822
38233823 /* Found a monster */
3824- m_ptr = &m_list[current_floor_ptr->grid_array[ny][nx].m_idx];
3824+ m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[ny][nx].m_idx];
38253825
38263826 if (tm_idx != current_floor_ptr->grid_array[ny][nx].m_idx)
38273827 {
@@ -5143,7 +5143,7 @@ bool rodeo(player_type *creature_ptr)
51435143 }
51445144 if (!do_riding(TRUE)) return TRUE;
51455145
5146- m_ptr = &m_list[creature_ptr->riding];
5146+ m_ptr = &current_floor_ptr->m_list[creature_ptr->riding];
51475147 r_ptr = &r_info[m_ptr->r_idx];
51485148 monster_desc(m_name, m_ptr, 0);
51495149 msg_format(_("%sに乗った。", "You ride on %s."), m_name);
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -47,7 +47,7 @@ bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode)
4747
4848 bool look = TRUE;
4949
50- monster_type *m_ptr = &m_list[m_idx];
50+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
5151
5252 /* Paranoia */
5353 if (!m_ptr->r_idx) return (FALSE);
@@ -154,7 +154,7 @@ void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power,
154154 int attempts = 500;
155155 POSITION dis = 2;
156156 bool look = TRUE;
157- monster_type *m_ptr = &m_list[m_idx];
157+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
158158
159159 /* Paranoia */
160160 if(!m_ptr->r_idx) return;
@@ -387,7 +387,7 @@ void teleport_player(POSITION dis, BIT_FLAGS mode)
387387 /* A monster except your mount may follow */
388388 if (tmp_m_idx && (p_ptr->riding != tmp_m_idx))
389389 {
390- monster_type *m_ptr = &m_list[tmp_m_idx];
390+ monster_type *m_ptr = &current_floor_ptr->m_list[tmp_m_idx];
391391 monster_race *r_ptr = &r_info[m_ptr->r_idx];
392392
393393 /*
@@ -429,7 +429,7 @@ void teleport_player_away(MONSTER_IDX m_idx, POSITION dis)
429429 /* A monster except your mount or caster may follow */
430430 if (tmp_m_idx && (p_ptr->riding != tmp_m_idx) && (m_idx != tmp_m_idx))
431431 {
432- monster_type *m_ptr = &m_list[tmp_m_idx];
432+ monster_type *m_ptr = &current_floor_ptr->m_list[tmp_m_idx];
433433 monster_race *r_ptr = &r_info[m_ptr->r_idx];
434434
435435 /*
@@ -503,7 +503,7 @@ void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode)
503503
504504 void teleport_away_followable(MONSTER_IDX m_idx)
505505 {
506- monster_type *m_ptr = &m_list[m_idx];
506+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
507507 POSITION oldfy = m_ptr->fy;
508508 POSITION oldfx = m_ptr->fx;
509509 bool old_ml = m_ptr->ml;
@@ -566,7 +566,7 @@ bool teleport_level_other(player_type *creature_ptr)
566566 if (!target_m_idx) return TRUE;
567567 if (!player_has_los_bold(target_row, target_col)) return TRUE;
568568 if (!projectable(creature_ptr->y, creature_ptr->x, target_row, target_col)) return TRUE;
569- m_ptr = &m_list[target_m_idx];
569+ m_ptr = &current_floor_ptr->m_list[target_m_idx];
570570 r_ptr = &r_info[m_ptr->r_idx];
571571 monster_desc(m_name, m_ptr, 0);
572572 msg_format(_("%^sの足を指さした。", "You gesture at %^s's feet."), m_name);
@@ -598,7 +598,7 @@ void teleport_level(MONSTER_IDX m_idx)
598598 }
599599 else /* To monster */
600600 {
601- monster_type *m_ptr = &m_list[m_idx];
601+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
602602
603603 /* Get the monster name (or "it") */
604604 monster_desc(m_name, m_ptr, 0);
@@ -738,7 +738,7 @@ void teleport_level(MONSTER_IDX m_idx)
738738 /* Monster level teleportation is simple deleting now */
739739 if (m_idx > 0)
740740 {
741- monster_type *m_ptr = &m_list[m_idx];
741+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
742742
743743 /* Check for quest completion */
744744 check_quest_completion(m_ptr);
@@ -1402,7 +1402,7 @@ static bool vanish_dungeon(void)
14021402 /* Lose room and vault */
14031403 g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
14041404
1405- m_ptr = &m_list[g_ptr->m_idx];
1405+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
14061406
14071407 /* Awake monster */
14081408 if (g_ptr->m_idx && MON_CSLEEP(m_ptr))
@@ -3560,7 +3560,7 @@ PERCENTAGE spell_chance(SPELL_IDX spell, REALM_IDX use_realm)
35603560 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[mp_ptr->spell_stat]] - 1);
35613561
35623562 if (p_ptr->riding)
3563- chance += (MAX(r_info[m_list[p_ptr->riding].r_idx].level - p_ptr->skill_exp[GINOU_RIDING] / 100 - 10, 0));
3563+ chance += (MAX(r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level - p_ptr->skill_exp[GINOU_RIDING] / 100 - 10, 0));
35643564
35653565 /* Extract mana consumption rate */
35663566 need_mana = mod_need_mana(s_ptr->smana, spell, use_realm);
@@ -3912,7 +3912,7 @@ static MONRACE_IDX poly_r_idx(MONRACE_IDX r_idx)
39123912 bool polymorph_monster(POSITION y, POSITION x)
39133913 {
39143914 grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
3915- monster_type *m_ptr = &m_list[g_ptr->m_idx];
3915+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
39163916 bool polymorphed = FALSE;
39173917 MONRACE_IDX new_r_idx;
39183918 MONRACE_IDX old_r_idx = m_ptr->r_idx;
@@ -3951,9 +3951,9 @@ bool polymorph_monster(POSITION y, POSITION x)
39513951 /* Create a new monster (no groups) */
39523952 if (place_monster_aux(0, y, x, new_r_idx, mode))
39533953 {
3954- m_list[hack_m_idx_ii].nickname = back_m.nickname;
3955- m_list[hack_m_idx_ii].parent_m_idx = back_m.parent_m_idx;
3956- m_list[hack_m_idx_ii].hold_o_idx = back_m.hold_o_idx;
3954+ current_floor_ptr->m_list[hack_m_idx_ii].nickname = back_m.nickname;
3955+ current_floor_ptr->m_list[hack_m_idx_ii].parent_m_idx = back_m.parent_m_idx;
3956+ current_floor_ptr->m_list[hack_m_idx_ii].hold_o_idx = back_m.hold_o_idx;
39573957
39583958 /* Success */
39593959 polymorphed = TRUE;
@@ -3963,7 +3963,7 @@ bool polymorph_monster(POSITION y, POSITION x)
39633963 /* Placing the new monster failed */
39643964 if (place_monster_aux(0, y, x, old_r_idx, (mode | PM_NO_KAGE | PM_IGNORE_TERRAIN)))
39653965 {
3966- m_list[hack_m_idx_ii] = back_m;
3966+ current_floor_ptr->m_list[hack_m_idx_ii] = back_m;
39673967
39683968 /* Re-initialize monster process */
39693969 mproc_init();
@@ -4358,7 +4358,7 @@ void massacre(void)
43584358 y = p_ptr->y + ddy_ddd[dir];
43594359 x = p_ptr->x + ddx_ddd[dir];
43604360 g_ptr = &current_floor_ptr->grid_array[y][x];
4361- m_ptr = &m_list[g_ptr->m_idx];
4361+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
43624362
43634363 /* Hack -- attack monsters */
43644364 if (g_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
@@ -4392,7 +4392,7 @@ bool eat_lock(void)
43924392 }
43934393 else if (g_ptr->m_idx)
43944394 {
4395- monster_type *m_ptr = &m_list[g_ptr->m_idx];
4395+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
43964396 msg_print(_("何かが邪魔しています!", "There's something in the way!"));
43974397
43984398 if (!m_ptr->ml || !is_pet(m_ptr)) py_attack(y, x, 0);
@@ -4449,7 +4449,7 @@ bool shock_power(void)
44494449 POSITION ty = y, tx = x;
44504450 POSITION oy = y, ox = x;
44514451 MONSTER_IDX m_idx = current_floor_ptr->grid_array[y][x].m_idx;
4452- monster_type *m_ptr = &m_list[m_idx];
4452+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
44534453 monster_race *r_ptr = &r_info[m_ptr->r_idx];
44544454 GAME_TEXT m_name[MAX_NLEN];
44554455
@@ -4539,7 +4539,7 @@ bool detonation(player_type *creature_ptr)
45394539
45404540 void blood_curse_to_enemy(MONSTER_IDX m_idx)
45414541 {
4542- monster_type *m_ptr = &m_list[m_idx];
4542+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
45434543 grid_type *g_ptr = &current_floor_ptr->grid_array[m_ptr->fy][m_ptr->fx];
45444544 BIT_FLAGS curse_flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
45454545 int count = 0;
--- a/src/trap.c
+++ b/src/trap.c
@@ -535,8 +535,8 @@ void hit_trap(bool break_trap)
535535 /* Let them fight each other */
536536 if (evil_idx && good_idx)
537537 {
538- monster_type *evil_ptr = &m_list[evil_idx];
539- monster_type *good_ptr = &m_list[good_idx];
538+ monster_type *evil_ptr = &current_floor_ptr->m_list[evil_idx];
539+ monster_type *good_ptr = &current_floor_ptr->m_list[good_idx];
540540 evil_ptr->target_y = good_ptr->fy;
541541 evil_ptr->target_x = good_ptr->fx;
542542 good_ptr->target_y = evil_ptr->fy;
--- a/src/types.h
+++ b/src/types.h
@@ -440,7 +440,7 @@ struct skill_table
440440 * amound of memory, but they all seem rather complicated, and would
441441 * probably add enough code that the savings would be lost. So for
442442 * these reasons, we simply store an index into the "o_list" and
443- * "m_list" arrays, using "zero" when no monster/object is present.
443+ * "current_floor_ptr->m_list" arrays, using "zero" when no monster/object is present.
444444 *
445445 * Note that "o_idx" is the index of the top object in a stack of
446446 * objects, using the "next_o_idx" field of objects (see below) to
@@ -1887,5 +1887,9 @@ typedef struct {
18871887 object_type *o_list; /*!< The array of dungeon items [current_floor_ptr->max_o_idx] */
18881888 OBJECT_IDX max_o_idx; /*!< Maximum number of objects in the level */
18891889
1890+ monster_type *m_list; /*!< The array of dungeon monsters [current_floor_ptr->max_m_idx] */
1891+ MONSTER_IDX max_m_idx; /*!< Maximum number of monsters in the level */
1892+
1893+
18901894 } floor_type;
18911895
--- a/src/variable.c
+++ b/src/variable.c
@@ -482,13 +482,9 @@ FLOOR_IDX max_floor_id;
482482 u32b saved_floor_file_sign;
483483
484484
485-/*
486- * The array of dungeon monsters [max_m_idx]
487- */
488-monster_type *m_list;
489485
490486 /*
491- * The array to process dungeon monsters [max_m_idx]
487+ * The array to process dungeon monsters [current_floor_ptr->max_m_idx]
492488 */
493489 s16b *mproc_list[MAX_MTIMED];
494490 s16b mproc_max[MAX_MTIMED]; /* Number of monsters to be processed */
@@ -767,11 +763,6 @@ EGO_IDX max_e_idx;
767763 DUNGEON_IDX max_d_idx;
768764
769765 /*
770- * Maximum number of monsters in the level
771- */
772-MONSTER_IDX max_m_idx;
773-
774-/*
775766 * Maximum size of the wilderness
776767 */
777768 POSITION max_wild_x;
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -1191,7 +1191,7 @@ static void prt_speed(void)
11911191 {
11921192 if (p_ptr->riding)
11931193 {
1194- monster_type *m_ptr = &m_list[p_ptr->riding];
1194+ monster_type *m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
11951195 if (MON_FAST(m_ptr) && !MON_SLOW(m_ptr)) attr = TERM_L_BLUE;
11961196 else if (MON_SLOW(m_ptr) && !MON_FAST(m_ptr)) attr = TERM_VIOLET;
11971197 else attr = TERM_GREEN;
@@ -1212,7 +1212,7 @@ static void prt_speed(void)
12121212 {
12131213 if (p_ptr->riding)
12141214 {
1215- monster_type *m_ptr = &m_list[p_ptr->riding];
1215+ monster_type *m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
12161216 if (MON_FAST(m_ptr) && !MON_SLOW(m_ptr)) attr = TERM_L_BLUE;
12171217 else if (MON_SLOW(m_ptr) && !MON_FAST(m_ptr)) attr = TERM_VIOLET;
12181218 else attr = TERM_RED;
@@ -1398,7 +1398,7 @@ static void health_redraw(bool riding)
13981398 col = COL_INFO;
13991399 }
14001400
1401- m_ptr = &m_list[health_who];
1401+ m_ptr = &current_floor_ptr->m_list[health_who];
14021402
14031403 if (p_ptr->wizard && p_ptr->inside_battle)
14041404 {
@@ -1410,32 +1410,32 @@ static void health_redraw(bool riding)
14101410 Term_putstr(col - 2, row + 2, 12, TERM_WHITE, " / ");
14111411 Term_putstr(col - 2, row + 3, 12, TERM_WHITE, " / ");
14121412
1413- if(m_list[1].r_idx)
1413+ if(current_floor_ptr->m_list[1].r_idx)
14141414 {
1415- Term_putstr(col - 2, row, 2, r_info[m_list[1].r_idx].x_attr, format("%c", r_info[m_list[1].r_idx].x_char));
1416- Term_putstr(col - 1, row, 5, TERM_WHITE, format("%5d", m_list[1].hp));
1417- Term_putstr(col + 5, row, 6, TERM_WHITE, format("%5d", m_list[1].max_maxhp));
1415+ Term_putstr(col - 2, row, 2, r_info[current_floor_ptr->m_list[1].r_idx].x_attr, format("%c", r_info[current_floor_ptr->m_list[1].r_idx].x_char));
1416+ Term_putstr(col - 1, row, 5, TERM_WHITE, format("%5d", current_floor_ptr->m_list[1].hp));
1417+ Term_putstr(col + 5, row, 6, TERM_WHITE, format("%5d", current_floor_ptr->m_list[1].max_maxhp));
14181418 }
14191419
1420- if(m_list[2].r_idx)
1420+ if(current_floor_ptr->m_list[2].r_idx)
14211421 {
1422- Term_putstr(col - 2, row + 1, 2, r_info[m_list[2].r_idx].x_attr, format("%c", r_info[m_list[2].r_idx].x_char));
1423- Term_putstr(col - 1, row + 1, 5, TERM_WHITE, format("%5d", m_list[2].hp));
1424- Term_putstr(col + 5, row + 1, 6, TERM_WHITE, format("%5d", m_list[2].max_maxhp));
1422+ Term_putstr(col - 2, row + 1, 2, r_info[current_floor_ptr->m_list[2].r_idx].x_attr, format("%c", r_info[current_floor_ptr->m_list[2].r_idx].x_char));
1423+ Term_putstr(col - 1, row + 1, 5, TERM_WHITE, format("%5d", current_floor_ptr->m_list[2].hp));
1424+ Term_putstr(col + 5, row + 1, 6, TERM_WHITE, format("%5d", current_floor_ptr->m_list[2].max_maxhp));
14251425 }
14261426
1427- if(m_list[3].r_idx)
1427+ if(current_floor_ptr->m_list[3].r_idx)
14281428 {
1429- Term_putstr(col - 2, row + 2, 2, r_info[m_list[3].r_idx].x_attr, format("%c", r_info[m_list[3].r_idx].x_char));
1430- Term_putstr(col - 1, row + 2, 5, TERM_WHITE, format("%5d", m_list[3].hp));
1431- Term_putstr(col + 5, row + 2, 6, TERM_WHITE, format("%5d", m_list[3].max_maxhp));
1429+ Term_putstr(col - 2, row + 2, 2, r_info[current_floor_ptr->m_list[3].r_idx].x_attr, format("%c", r_info[current_floor_ptr->m_list[3].r_idx].x_char));
1430+ Term_putstr(col - 1, row + 2, 5, TERM_WHITE, format("%5d", current_floor_ptr->m_list[3].hp));
1431+ Term_putstr(col + 5, row + 2, 6, TERM_WHITE, format("%5d", current_floor_ptr->m_list[3].max_maxhp));
14321432 }
14331433
1434- if(m_list[4].r_idx)
1434+ if(current_floor_ptr->m_list[4].r_idx)
14351435 {
1436- Term_putstr(col - 2, row + 3, 2, r_info[m_list[4].r_idx].x_attr, format("%c", r_info[m_list[4].r_idx].x_char));
1437- Term_putstr(col - 1, row + 3, 5, TERM_WHITE, format("%5d", m_list[4].hp));
1438- Term_putstr(col + 5, row + 3, 6, TERM_WHITE, format("%5d", m_list[4].max_maxhp));
1436+ Term_putstr(col - 2, row + 3, 2, r_info[current_floor_ptr->m_list[4].r_idx].x_attr, format("%c", r_info[current_floor_ptr->m_list[4].r_idx].x_char));
1437+ Term_putstr(col - 1, row + 3, 5, TERM_WHITE, format("%5d", current_floor_ptr->m_list[4].hp));
1438+ Term_putstr(col + 5, row + 3, 6, TERM_WHITE, format("%5d", current_floor_ptr->m_list[4].max_maxhp));
14391439 }
14401440 }
14411441 else
@@ -1696,8 +1696,8 @@ void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines){
16961696
16971697 for(i=0;i<temp_n;i++){
16981698 grid_type* g_ptr = &current_floor_ptr->grid_array[temp_y[i]][temp_x[i]];
1699- if(!g_ptr->m_idx || !m_list[g_ptr->m_idx].ml)continue;//no mons or cannot look
1700- m_ptr = &m_list[g_ptr->m_idx];
1699+ if(!g_ptr->m_idx || !current_floor_ptr->m_list[g_ptr->m_idx].ml)continue;//no mons or cannot look
1700+ m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
17011701 if(is_pet(m_ptr))continue;//pet
17021702 if(!m_ptr->r_idx)continue;//dead?
17031703 {
--- a/src/wild.c
+++ b/src/wild.c
@@ -1138,7 +1138,7 @@ bool change_wild_mode(void)
11381138
11391139 for (i = 1; i < m_max; i++)
11401140 {
1141- monster_type *m_ptr = &m_list[i];
1141+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
11421142
11431143 if (!m_ptr->r_idx) continue;
11441144 if (is_pet(m_ptr) && i != p_ptr->riding) have_pet = TRUE;
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -1474,7 +1474,7 @@ static void do_cmd_wiz_zap(void)
14741474 /* Genocide everyone nearby */
14751475 for (i = 1; i < m_max; i++)
14761476 {
1477- monster_type *m_ptr = &m_list[i];
1477+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
14781478
14791479 /* Paranoia -- Skip dead monsters */
14801480 if (!m_ptr->r_idx) continue;
@@ -1511,7 +1511,7 @@ static void do_cmd_wiz_zap_all(void)
15111511 /* Genocide everyone */
15121512 for (i = 1; i < m_max; i++)
15131513 {
1514- monster_type *m_ptr = &m_list[i];
1514+ monster_type *m_ptr = &current_floor_ptr->m_list[i];
15151515
15161516 /* Paranoia -- Skip dead monsters */
15171517 if (!m_ptr->r_idx) continue;
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -490,7 +490,7 @@ concptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
490490 */
491491 bool target_able(MONSTER_IDX m_idx)
492492 {
493- monster_type *m_ptr = &m_list[m_idx];
493+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
494494
495495 /* Monster must be alive */
496496 if (!m_ptr->r_idx) return (FALSE);
@@ -532,7 +532,7 @@ bool target_okay(void)
532532 /* Accept reasonable targets */
533533 if (target_able(target_who))
534534 {
535- monster_type *m_ptr = &m_list[target_who];
535+ monster_type *m_ptr = &current_floor_ptr->m_list[target_who];
536536
537537 /* Acquire monster location */
538538 target_row = m_ptr->fy;
@@ -592,8 +592,8 @@ static bool ang_sort_comp_importance(vptr u, vptr v, int a, int b)
592592 POSITION *y = (POSITION*)(v);
593593 grid_type *ca_ptr = &current_floor_ptr->grid_array[y[a]][x[a]];
594594 grid_type *cb_ptr = &current_floor_ptr->grid_array[y[b]][x[b]];
595- monster_type *ma_ptr = &m_list[ca_ptr->m_idx];
596- monster_type *mb_ptr = &m_list[cb_ptr->m_idx];
595+ monster_type *ma_ptr = &current_floor_ptr->m_list[ca_ptr->m_idx];
596+ monster_type *mb_ptr = &current_floor_ptr->m_list[cb_ptr->m_idx];
597597 monster_race *ap_ra_ptr, *ap_rb_ptr;
598598
599599 /* The player grid */
@@ -746,7 +746,7 @@ static bool target_set_accept(POSITION y, POSITION x)
746746 /* Visible monsters */
747747 if (g_ptr->m_idx)
748748 {
749- monster_type *m_ptr = &m_list[g_ptr->m_idx];
749+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
750750
751751 /* Visible monsters */
752752 if (m_ptr->ml) return (TRUE);
@@ -824,7 +824,7 @@ static void target_set_prepare(BIT_FLAGS mode)
824824 /* Require target_able monsters for "TARGET_KILL" */
825825 if ((mode & (TARGET_KILL)) && !target_able(g_ptr->m_idx)) continue;
826826
827- if ((mode & (TARGET_KILL)) && !target_pet && is_pet(&m_list[g_ptr->m_idx])) continue;
827+ if ((mode & (TARGET_KILL)) && !target_pet && is_pet(&current_floor_ptr->m_list[g_ptr->m_idx])) continue;
828828
829829 /* Save the location */
830830 temp_x[temp_n] = x;
@@ -1012,9 +1012,9 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, concptr info)
10121012
10131013
10141014 /* Actual monsters */
1015- if (g_ptr->m_idx && m_list[g_ptr->m_idx].ml)
1015+ if (g_ptr->m_idx && current_floor_ptr->m_list[g_ptr->m_idx].ml)
10161016 {
1017- monster_type *m_ptr = &m_list[g_ptr->m_idx];
1017+ monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
10181018 monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
10191019 GAME_TEXT m_name[MAX_NLEN];
10201020 bool recall = FALSE;
@@ -2155,7 +2155,7 @@ bool get_direction(DIRECTION *dp, bool allow_under, bool with_steed)
21552155 }
21562156 else if (p_ptr->riding && with_steed)
21572157 {
2158- monster_type *m_ptr = &m_list[p_ptr->riding];
2158+ monster_type *m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
21592159 monster_race *r_ptr = &r_info[m_ptr->r_idx];
21602160
21612161 if (MON_CONFUSED(m_ptr))
@@ -2190,7 +2190,7 @@ bool get_direction(DIRECTION *dp, bool allow_under, bool with_steed)
21902190 else
21912191 {
21922192 GAME_TEXT m_name[MAX_NLEN];
2193- monster_type *m_ptr = &m_list[p_ptr->riding];
2193+ monster_type *m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
21942194
21952195 monster_desc(m_name, m_ptr, 0);
21962196 if (MON_CONFUSED(m_ptr))
@@ -2300,7 +2300,7 @@ bool get_rep_dir(DIRECTION *dp, bool under)
23002300 }
23012301 else if (p_ptr->riding)
23022302 {
2303- monster_type *m_ptr = &m_list[p_ptr->riding];
2303+ monster_type *m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
23042304 monster_race *r_ptr = &r_info[m_ptr->r_idx];
23052305
23062306 if (MON_CONFUSED(m_ptr))
@@ -2335,7 +2335,7 @@ bool get_rep_dir(DIRECTION *dp, bool under)
23352335 else
23362336 {
23372337 GAME_TEXT m_name[MAX_NLEN];
2338- monster_type *m_ptr = &m_list[p_ptr->riding];
2338+ monster_type *m_ptr = &current_floor_ptr->m_list[p_ptr->riding];
23392339
23402340 monster_desc(m_name, m_ptr, 0);
23412341 if (MON_CONFUSED(m_ptr))
Show on old repository browser