2 * @brief ウィザードモードの処理(特別処理中心) / Wizard commands
5 * Copyright (c) 1997 Ben Harrison, and others<br>
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.<br>
9 * 2014 Deskull rearranged comment for Doxygen.<br>
12 #include "wizard/wizard-special-process.h"
13 #include "artifact/fixed-art-generator.h"
14 #include "birth/inventory-initializer.h"
15 #include "cmd-io/cmd-dump.h"
16 #include "cmd-io/cmd-help.h"
17 #include "cmd-io/cmd-save.h"
18 #include "cmd-visual/cmd-draw.h"
19 #include "core/asking-player.h"
20 #include "core/player-redraw-types.h"
21 #include "core/player-update-types.h"
22 #include "core/stuff-handler.h"
23 #include "core/window-redrawer.h"
24 #include "dungeon/dungeon.h"
25 #include "dungeon/quest.h"
26 #include "flavor/object-flavor.h"
27 #include "floor/floor-leaver.h"
28 #include "floor/floor-mode-changer.h"
29 #include "floor/floor-object.h"
30 #include "game-option/birth-options.h"
31 #include "game-option/option-types-table.h"
32 #include "game-option/play-record-options.h"
33 #include "game-option/special-options.h"
34 #include "grid/feature.h"
35 #include "grid/grid.h"
36 #include "info-reader/fixed-map-parser.h"
37 #include "inventory/inventory-object.h"
38 #include "inventory/inventory-slot-types.h"
39 #include "io/files-util.h"
40 #include "io/input-key-requester.h"
41 #include "io/write-diary.h"
42 #include "market/arena.h"
43 #include "monster-floor/monster-remover.h"
44 #include "monster-floor/monster-summon.h"
45 #include "monster/monster-describer.h"
46 #include "monster/monster-description-types.h"
47 #include "monster/monster-info.h"
48 #include "monster/monster-status.h"
49 #include "monster/smart-learn-types.h"
50 #include "mutation/mutation-investor-remover.h"
51 #include "object-enchant/apply-magic.h"
52 #include "object-enchant/item-apply-magic.h"
53 #include "object-enchant/trc-types.h"
54 #include "object-enchant/trg-types.h"
55 #include "object/object-kind.h"
56 #include "perception/object-perception.h"
57 #include "player-info/race-info.h"
58 #include "player-info/race-types.h"
59 #include "player-info/self-info.h"
60 #include "player-status/player-energy.h"
61 #include "player/digestion-processor.h"
62 #include "player/patron.h"
63 #include "player/player-class.h"
64 #include "player/player-skill.h"
65 #include "player/player-status-table.h"
66 #include "player/player-status.h"
67 #include "player/race-info-table.h"
68 #include "spell-kind/spells-detection.h"
69 #include "spell-kind/spells-sight.h"
70 #include "spell-kind/spells-teleport.h"
71 #include "spell-kind/spells-world.h"
72 #include "spell/spells-object.h"
73 #include "spell/spells-status.h"
74 #include "spell/spells-summon.h"
75 #include "status/experience.h"
76 #include "system/angband-version.h"
77 #include "system/artifact-type-definition.h"
78 #include "system/floor-type-definition.h"
79 #include "system/grid-type-definition.h"
80 #include "system/monster-type-definition.h"
81 #include "system/player-type-definition.h"
82 #include "target/grid-selector.h"
83 #include "term/screen-processor.h"
84 #include "util/angband-files.h"
85 #include "util/bit-flags-calculator.h"
86 #include "util/enum-converter.h"
87 #include "util/int-char-converter.h"
88 #include "view/display-messages.h"
89 #include "wizard/tval-descriptions-table.h"
90 #include "wizard/wizard-spells.h"
91 #include "wizard/wizard-spoiler.h"
92 #include "world/world.h"
97 * @brief プレイヤーを完全回復する /
98 * Cure everything instantly
100 void wiz_cure_all(player_type *creature_ptr)
102 (void)life_stream(creature_ptr, false, false);
103 (void)restore_mana(creature_ptr, true);
104 (void)set_food(creature_ptr, PY_FOOD_MAX - 1);
108 * @brief ベースアイテムのウィザード生成のために大項目IDと小項目IDを取得する /
109 * Specify tval and sval (type and subtype of object) originally
112 * by RAK, heavily modified by -Bernd-
113 * This function returns the k_idx of an object type, or zero if failed
114 * List up to 50 choices in three columns
116 KIND_OBJECT_IDX wiz_create_itemtype(void)
122 for (num = 0; (num < 80) && tvals[num].tval; num++) {
123 row = 2 + (num % 20);
124 col = 20 * (num / 20);
126 prt(format("[%c] %s", ch, tvals[num].desc), row, col);
130 if (!get_com("Get what type of object? ", &ch, false))
133 for (num = 0; num < max_num; num++)
134 if (listsym[num] == ch)
137 if ((num < 0) || (num >= max_num))
140 tval_type tval = static_cast<tval_type>(tvals[num].tval);
141 concptr tval_desc = tvals[num].desc;
144 KIND_OBJECT_IDX choice[80];
146 for (KIND_OBJECT_IDX i = 1; (num < 80) && (i < max_k_idx); i++) {
147 object_kind *k_ptr = &k_info[i];
148 if (k_ptr->tval != tval)
151 row = 2 + (num % 20);
152 col = 20 * (num / 20);
156 prt(format("[%c] %s", ch, buf), row, col);
161 if (!get_com(format("What Kind of %s? ", tval_desc), &ch, false))
164 for (num = 0; num < max_num; num++)
165 if (listsym[num] == ch)
168 if ((num < 0) || (num >= max_num))
175 * @brief 任意のベースアイテム生成のメインルーチン /
176 * Wizard routine for creating objects -RAK-
178 * Heavily modified to allow magification and artifactification -Bernd-
180 * Note that wizards cannot create objects on top of other objects.
182 * Hack -- this routine always makes a "dungeon object", and applies
183 * magic to it, and attempts to decline cursed items.
185 void wiz_create_item(player_type *caster_ptr)
188 OBJECT_IDX k_idx = wiz_create_itemtype();
193 if (k_info[k_idx].gen_flags.has(TRG::INSTA_ART)) {
194 for (ARTIFACT_IDX i = 1; i < max_a_idx; i++) {
195 if ((a_info[i].tval != k_info[k_idx].tval) || (a_info[i].sval != k_info[k_idx].sval))
198 (void)create_named_art(caster_ptr, i, caster_ptr->y, caster_ptr->x);
199 msg_print("Allocated(INSTA_ART).");
208 apply_magic_to_object(caster_ptr, q_ptr, caster_ptr->current_floor_ptr->dun_level, AM_NO_FIXED_ART);
209 (void)drop_near(caster_ptr, q_ptr, -1, caster_ptr->y, caster_ptr->x);
210 msg_print("Allocated.");
214 * @brief 指定されたIDの固定アーティファクトを生成する / Create the artifact of the specified number
215 * @param caster_ptr プレーヤーへの参照ポインタ
217 void wiz_create_named_art(player_type *caster_ptr, ARTIFACT_IDX a_idx)
221 sprintf(tmp, "Artifact ID (1-%d): ", max_a_idx - 1);
222 char tmp_val[10] = "";
223 if (!get_string(tmp, tmp_val, 3))
226 a_idx = (ARTIFACT_IDX)atoi(tmp_val);
229 if (a_idx <= 0 || a_idx >= max_a_idx) {
230 msg_format(_("番号は1から%dの間で指定して下さい。", "ID must be between 1 to %d."), max_a_idx - 1);
234 (void)create_named_art(caster_ptr, a_idx, caster_ptr->y, caster_ptr->x);
235 msg_print("Allocated.");
239 * @brief プレイヤーの現能力値を調整する / Change various "permanent" player variables.
240 * @param creature_ptr プレーヤーへの参照ポインタ
242 void wiz_change_status(player_type *creature_ptr)
247 for (int i = 0; i < A_MAX; i++) {
248 sprintf(ppp, "%s (3-%d): ", stat_names[i], creature_ptr->stat_max_max[i]);
249 sprintf(tmp_val, "%d", creature_ptr->stat_max[i]);
250 if (!get_string(ppp, tmp_val, 3))
253 tmp_int = atoi(tmp_val);
254 if (tmp_int > creature_ptr->stat_max_max[i])
255 tmp_int = creature_ptr->stat_max_max[i];
256 else if (tmp_int < 3)
259 creature_ptr->stat_cur[i] = creature_ptr->stat_max[i] = (BASE_STATUS)tmp_int;
262 sprintf(tmp_val, "%d", WEAPON_EXP_MASTER);
263 if (!get_string(_("熟練度: ", "Proficiency: "), tmp_val, 4))
266 int16_t tmp_s16b = (int16_t)atoi(tmp_val);
267 if (tmp_s16b < WEAPON_EXP_UNSKILLED)
268 tmp_s16b = WEAPON_EXP_UNSKILLED;
270 if (tmp_s16b > WEAPON_EXP_MASTER)
271 tmp_s16b = WEAPON_EXP_MASTER;
273 for (int j = 0; j <= TV_WEAPON_END - TV_WEAPON_BEGIN; j++) {
274 for (int i = 0; i < 64; i++) {
275 creature_ptr->weapon_exp[j][i] = tmp_s16b;
276 if (creature_ptr->weapon_exp[j][i] > s_info[creature_ptr->pclass].w_max[j][i])
277 creature_ptr->weapon_exp[j][i] = s_info[creature_ptr->pclass].w_max[j][i];
281 for (int j = 0; j < 10; j++) {
282 creature_ptr->skill_exp[j] = tmp_s16b;
283 if (creature_ptr->skill_exp[j] > s_info[creature_ptr->pclass].s_max[j])
284 creature_ptr->skill_exp[j] = s_info[creature_ptr->pclass].s_max[j];
288 for (k = 0; k < 32; k++)
289 creature_ptr->spell_exp[k] = (tmp_s16b > SPELL_EXP_MASTER ? SPELL_EXP_MASTER : tmp_s16b);
292 creature_ptr->spell_exp[k] = (tmp_s16b > SPELL_EXP_EXPERT ? SPELL_EXP_EXPERT : tmp_s16b);
294 sprintf(tmp_val, "%ld", (long)(creature_ptr->au));
295 if (!get_string("Gold: ", tmp_val, 9))
298 long tmp_long = atol(tmp_val);
302 creature_ptr->au = tmp_long;
303 sprintf(tmp_val, "%ld", (long)(creature_ptr->max_exp));
304 if (!get_string("Experience: ", tmp_val, 9))
307 tmp_long = atol(tmp_val);
311 if (creature_ptr->prace == player_race_type::ANDROID)
314 creature_ptr->max_exp = tmp_long;
315 creature_ptr->exp = tmp_long;
316 check_experience(creature_ptr);
317 do_cmd_redraw(creature_ptr);
321 * @brief 指定された地点の地形IDを変更する /
322 * Create desired feature
323 * @param creaturer_ptr プレーヤーへの参照ポインタ
325 void wiz_create_feature(player_type *creature_ptr)
328 if (!tgt_pt(creature_ptr, &x, &y))
332 g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
333 static int prev_feat = 0;
335 sprintf(tmp_val, "%d", prev_feat);
337 if (!get_string(_("地形: ", "Feature: "), tmp_val, 3))
340 FEAT_IDX tmp_feat = (FEAT_IDX)atoi(tmp_val);
343 else if (tmp_feat >= max_f_idx)
344 tmp_feat = max_f_idx - 1;
346 static int prev_mimic = 0;
347 sprintf(tmp_val, "%d", prev_mimic);
349 if (!get_string(_("地形 (mimic): ", "Feature (mimic): "), tmp_val, 3))
352 FEAT_IDX tmp_mimic = (FEAT_IDX)atoi(tmp_val);
355 else if (tmp_mimic >= max_f_idx)
356 tmp_mimic = max_f_idx - 1;
358 cave_set_feat(creature_ptr, y, x, tmp_feat);
359 g_ptr->mimic = (int16_t)tmp_mimic;
361 f_ptr = &f_info[g_ptr->get_feat_mimic()];
363 if (f_ptr->flags.has(FF::RUNE_PROTECTION) || f_ptr->flags.has(FF::RUNE_EXPLOSION))
364 g_ptr->info |= CAVE_OBJECT;
365 else if (f_ptr->flags.has(FF::MIRROR))
366 g_ptr->info |= CAVE_GLOW | CAVE_OBJECT;
368 note_spot(creature_ptr, y, x);
369 lite_spot(creature_ptr, y, x);
370 creature_ptr->update |= PU_FLOW;
371 prev_feat = tmp_feat;
372 prev_mimic = tmp_mimic;
376 * @brief 選択したダンジョンの任意フロアを選択する
377 * @param creature_ptr プレーヤーへの参照ポインタ
378 * @param dungeon_type ダンジョン番号
379 * @return フロアを選択したらtrue、キャンセルならfalse
380 * @details 0を指定すると地上に飛ぶが、元いた場所にしか飛ばない
381 * @todo 可能ならダンジョンの入口 (例:ルルイエなら大洋の真ん中)へ飛べるようにしたい
383 static bool select_debugging_floor(player_type *creature_ptr, int dungeon_type)
385 auto max_depth = d_info[dungeon_type].maxdepth;
386 if ((max_depth == 0) || (dungeon_type > current_world_ptr->max_d_idx)) {
387 dungeon_type = DUNGEON_ANGBAND;
390 auto min_depth = (int)d_info[dungeon_type].mindepth;
394 sprintf(ppp, "Jump to level (0, %d-%d): ", min_depth, max_depth);
395 sprintf(tmp_val, "%d", (int)creature_ptr->current_floor_ptr->dun_level);
396 if (!get_string(ppp, tmp_val, 10)) {
400 auto tmp_command_arg = (COMMAND_ARG)atoi(tmp_val);
401 if (tmp_command_arg == 0) {
402 command_arg = tmp_command_arg;
406 auto is_valid_floor = tmp_command_arg > 0;
407 is_valid_floor &= tmp_command_arg >= min_depth;
408 is_valid_floor &= tmp_command_arg <= max_depth;
409 if (is_valid_floor) {
410 command_arg = tmp_command_arg;
414 msg_print("Invalid floor. Please re-input.");
422 * @brief デバッグ帰還のダンジョンを選ぶ
423 * @param creature_ptr プレーヤーへの参照ポインタ
424 * @details 範囲外の値が選択されたら再入力を促す
426 static bool select_debugging_dungeon(player_type *creature_ptr, DUNGEON_IDX *dungeon_type)
428 if (command_arg > 0) {
435 sprintf(ppp, "Jump which dungeon : ");
436 sprintf(tmp_val, "%d", creature_ptr->dungeon_idx);
437 if (!get_string(ppp, tmp_val, 2)) {
441 *dungeon_type = (DUNGEON_IDX)atoi(tmp_val);
442 if ((*dungeon_type < DUNGEON_ANGBAND) || (*dungeon_type > DUNGEON_MAX)) {
443 msg_print("Invalid dungeon. Please re-input.");
452 * @brief 任意のダンジョン及び階層に飛ぶtための選択処理
455 void wiz_jump_to_dungeon(player_type *creature_ptr)
457 DUNGEON_IDX dungeon_type = 1;
458 if (!select_debugging_dungeon(creature_ptr, &dungeon_type)) {
462 if (!select_debugging_floor(creature_ptr, dungeon_type)) {
466 if (command_arg < d_info[dungeon_type].mindepth)
469 if (command_arg > d_info[dungeon_type].maxdepth)
470 command_arg = (COMMAND_ARG)d_info[dungeon_type].maxdepth;
472 msg_format("You jump to dungeon level %d.", command_arg);
474 do_cmd_save_game(creature_ptr, true);
476 jump_floor(creature_ptr, dungeon_type, command_arg);
480 * @brief 全ベースアイテムを鑑定済みにする /
481 * Become aware of a lot of objects
482 * @param caster_ptr プレーヤーへの参照ポインタ
484 void wiz_learn_items_all(player_type *caster_ptr)
488 for (KIND_OBJECT_IDX i = 1; i < max_k_idx; i++) {
489 object_kind *k_ptr = &k_info[i];
490 if (k_ptr->level <= command_arg) {
493 object_aware(caster_ptr, q_ptr);
499 * @brief プレイヤーの種族を変更する
501 void wiz_reset_race(player_type *creature_ptr)
504 sprintf(ppp, "Race (0-%d): ", MAX_RACES - 1);
507 sprintf(tmp_val, "%d", enum2i(creature_ptr->prace));
509 if (!get_string(ppp, tmp_val, 2))
512 int tmp_int = atoi(tmp_val);
513 if (tmp_int < 0 || tmp_int >= MAX_RACES)
516 creature_ptr->prace = static_cast<player_race_type>(tmp_int);
517 rp_ptr = &race_info[enum2i(creature_ptr->prace)];
519 creature_ptr->window_flags |= PW_PLAYER;
520 creature_ptr->update |= PU_BONUS | PU_HP | PU_MANA | PU_SPELLS;
521 creature_ptr->redraw |= PR_BASIC | PR_HP | PR_MANA | PR_STATS;
522 handle_stuff(creature_ptr);
526 * @brief プレイヤーの職業を変更する
527 * @todo 魔法領域の再選択などがまだ不完全、要実装。
529 void wiz_reset_class(player_type *creature_ptr)
532 sprintf(ppp, "Class (0-%d): ", MAX_CLASS - 1);
535 sprintf(tmp_val, "%d", creature_ptr->pclass);
537 if (!get_string(ppp, tmp_val, 2))
540 int tmp_int = atoi(tmp_val);
541 if (tmp_int < 0 || tmp_int >= MAX_CLASS)
544 creature_ptr->pclass = static_cast<player_class_type>(tmp_int);
545 cp_ptr = &class_info[creature_ptr->pclass];
546 mp_ptr = &m_info[creature_ptr->pclass];
547 creature_ptr->window_flags |= PW_PLAYER;
548 creature_ptr->update |= PU_BONUS | PU_HP | PU_MANA | PU_SPELLS;
549 creature_ptr->redraw |= PR_BASIC | PR_HP | PR_MANA | PR_STATS;
550 handle_stuff(creature_ptr);
554 * @brief プレイヤーの領域を変更する
555 * @todo 存在有無などは未判定。そのうちすべき。
557 void wiz_reset_realms(player_type *creature_ptr)
562 sprintf(ppp, "1st Realm (None=0, 1-%d): ", MAX_REALM - 1);
563 sprintf(tmp_val, "%d", creature_ptr->realm1);
564 if (!get_string(ppp, tmp_val, 2))
567 creature_ptr->realm1 = static_cast<int16_t>(atoi(tmp_val));
569 sprintf(ppp, "2st Realm (None=0, 1-%d): ", MAX_REALM - 1);
570 sprintf(tmp_val, "%d", creature_ptr->realm2);
571 if (!get_string(ppp, tmp_val, 2))
574 creature_ptr->realm2 = static_cast<int16_t>(atoi(tmp_val));
575 creature_ptr->window_flags |= PW_PLAYER;
576 creature_ptr->update |= PU_BONUS | PU_HP | PU_MANA | PU_SPELLS;
577 creature_ptr->redraw |= PR_BASIC;
578 handle_stuff(creature_ptr);
582 * @brief 現在のオプション設定をダンプ出力する /
583 * @param creature_ptr プレーヤーへの参照ポインタ
584 * Hack -- Dump option bits usage
586 void wiz_dump_options(void)
589 path_build(buf, sizeof(buf), ANGBAND_DIR_USER, "opt_info.txt");
591 fff = angband_fopen(buf, "a");
592 if (fff == nullptr) {
593 msg_format(_("ファイル %s を開けませんでした。", "Failed to open file %s."), buf);
599 C_MAKE(exist, NUM_O_SET, int *);
600 C_MAKE(*exist, NUM_O_BIT * NUM_O_SET, int);
601 for (int i = 1; i < NUM_O_SET; i++)
602 exist[i] = *exist + i * NUM_O_BIT;
604 for (int i = 0; option_info[i].o_desc; i++) {
605 const option_type *ot_ptr = &option_info[i];
607 exist[ot_ptr->o_set][ot_ptr->o_bit] = i + 1;
612 fprintf(fff, "[Option bits usage on %s\n]", title);
613 fputs("Set - Bit (Page) Option Name\n", fff);
614 fputs("------------------------------------------------\n", fff);
615 for (int i = 0; i < NUM_O_SET; i++) {
616 for (int j = 0; j < NUM_O_BIT; j++) {
618 const option_type *ot_ptr = &option_info[exist[i][j] - 1];
619 fprintf(fff, " %d - %02d (%4d) %s\n", i, j, ot_ptr->o_page, ot_ptr->o_text);
621 fprintf(fff, " %d - %02d\n", i, j);
628 C_KILL(*exist, NUM_O_BIT * NUM_O_SET, int);
629 C_KILL(exist, NUM_O_SET, int *);
631 msg_format(_("オプションbit使用状況をファイル %s に書き出しました。", "Option bits usage dump saved to file %s."), buf);
635 * @brief プレイ日数を変更する / Set gametime.
636 * @return 実際に変更を行ったらTRUEを返す
638 void set_gametime(void)
641 char ppp[80], tmp_val[40];
642 sprintf(ppp, "Dungeon Turn (0-%ld): ", (long)current_world_ptr->dungeon_turn_limit);
643 sprintf(tmp_val, "%ld", (long)current_world_ptr->dungeon_turn);
644 if (!get_string(ppp, tmp_val, 10))
647 tmp_int = atoi(tmp_val);
648 if (tmp_int >= current_world_ptr->dungeon_turn_limit)
649 tmp_int = current_world_ptr->dungeon_turn_limit - 1;
650 else if (tmp_int < 0)
653 current_world_ptr->dungeon_turn = current_world_ptr->game_turn = tmp_int;
657 * @brief プレイヤー近辺の全モンスターを消去する / Delete all nearby monsters
659 void wiz_zap_surrounding_monsters(player_type *caster_ptr)
661 for (MONSTER_IDX i = 1; i < caster_ptr->current_floor_ptr->m_max; i++) {
662 monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
663 if (!monster_is_valid(m_ptr) || (i == caster_ptr->riding) || (m_ptr->cdis > MAX_SIGHT))
666 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname) {
667 GAME_TEXT m_name[MAX_NLEN];
669 monster_desc(caster_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
670 exe_write_diary(caster_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_WIZ_ZAP, m_name);
673 delete_monster_idx(caster_ptr, i);
678 * @brief フロアに存在する全モンスターを消去する / Delete all monsters
679 * @param caster_ptr 術者の参照ポインタ
681 void wiz_zap_floor_monsters(player_type *caster_ptr)
683 for (MONSTER_IDX i = 1; i < caster_ptr->current_floor_ptr->m_max; i++) {
684 monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
685 if (!monster_is_valid(m_ptr) || (i == caster_ptr->riding))
688 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname) {
689 GAME_TEXT m_name[MAX_NLEN];
690 monster_desc(caster_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
691 exe_write_diary(caster_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_WIZ_ZAP, m_name);
694 delete_monster_idx(caster_ptr, i);
698 void cheat_death(player_type *creature_ptr)
700 if (creature_ptr->sc)
701 creature_ptr->sc = creature_ptr->age = 0;
704 current_world_ptr->noscore |= 0x0001;
705 msg_print(_("ウィザードモードに念を送り、死を欺いた。", "You invoke wizard mode and cheat death."));
708 creature_ptr->is_dead = false;
709 (void)life_stream(creature_ptr, false, false);
710 (void)restore_mana(creature_ptr, true);
711 (void)recall_player(creature_ptr, 0);
712 reserve_alter_reality(creature_ptr, 0);
714 (void)strcpy(creature_ptr->died_from, _("死の欺き", "Cheating death"));
715 (void)set_food(creature_ptr, PY_FOOD_MAX - 1);
717 floor_type *floor_ptr = creature_ptr->current_floor_ptr;
718 floor_ptr->dun_level = 0;
719 floor_ptr->inside_arena = false;
720 creature_ptr->phase_out = false;
722 floor_ptr->inside_quest = 0;
723 if (creature_ptr->dungeon_idx)
724 creature_ptr->recall_dungeon = creature_ptr->dungeon_idx;
725 creature_ptr->dungeon_idx = 0;
726 if (lite_town || vanilla_town) {
727 creature_ptr->wilderness_y = 1;
728 creature_ptr->wilderness_x = 1;
730 creature_ptr->oldpy = 10;
731 creature_ptr->oldpx = 34;
733 creature_ptr->oldpy = 33;
734 creature_ptr->oldpx = 131;
737 creature_ptr->wilderness_y = 48;
738 creature_ptr->wilderness_x = 5;
739 creature_ptr->oldpy = 33;
740 creature_ptr->oldpx = 131;
743 creature_ptr->wild_mode = false;
744 creature_ptr->leaving = true;
746 exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 1, _(" しかし、生き返った。", " but revived."));
747 leave_floor(creature_ptr);