3 #include "world/world.h"
13 * Maximum number of dungeon in d_info.txt
19 * @brief これまでに入ったダンジョンの一覧を表示し、選択させる。
20 * @param note ダンジョンに施す処理記述
23 * @return 選択されたダンジョンID
25 DUNGEON_IDX choose_dungeon(concptr note, POSITION y, POSITION x)
27 DUNGEON_IDX select_dungeon;
32 /* Hack -- No need to choose dungeon in some case */
33 if (lite_town || vanilla_town || ironman_downward)
35 if (max_dlv[DUNGEON_ANGBAND]) return DUNGEON_ANGBAND;
38 msg_format(_("まだ%sに入ったことはない。", "You haven't entered %s yet."), d_name + d_info[DUNGEON_ANGBAND].name);
44 /* Allocate the "dun" array */
45 C_MAKE(dun, current_world_ptr->max_d_idx, DUNGEON_IDX);
48 for (i = 1; i < current_world_ptr->max_d_idx; i++)
53 if (!d_info[i].maxdepth) continue;
54 if (!max_dlv[i]) continue;
55 if (d_info[i].final_guardian)
57 if (!r_info[d_info[i].final_guardian].max_num) seiha = TRUE;
59 else if (max_dlv[i] == d_info[i].maxdepth) seiha = TRUE;
61 sprintf(buf, _(" %c) %c%-12s : 最大 %d 階", " %c) %c%-16s : Max level %d"),
62 'a' + num, seiha ? '!' : ' ', d_name + d_info[i].name, (int)max_dlv[i]);
69 prt(_(" 選べるダンジョンがない。", " No dungeon is available."), y, x);
72 prt(format(_("どのダンジョン%sしますか:", "Which dungeon do you %s?: "), note), 0, 0);
76 if ((i == ESCAPE) || !num)
78 /* Free the "dun" array */
79 C_KILL(dun, current_world_ptr->max_d_idx, DUNGEON_IDX);
84 if (i >= 'a' && i < ('a' + num))
86 select_dungeon = dun[i - 'a'];
93 /* Free the "dun" array */
94 C_KILL(dun, current_world_ptr->max_d_idx, DUNGEON_IDX);
96 return select_dungeon;