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/self-info.h"
58 #include "player-status/player-energy.h"
59 #include "player/digestion-processor.h"
60 #include "player/patron.h"
61 #include "player/player-class.h"
62 #include "player/player-race.h"
63 #include "player/player-race-types.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/monster-type-definition.h"
80 #include "system/player-type-definition.h"
81 #include "target/grid-selector.h"
82 #include "term/screen-processor.h"
83 #include "util/angband-files.h"
84 #include "util/bit-flags-calculator.h"
85 #include "util/int-char-converter.h"
86 #include "view/display-messages.h"
87 #include "wizard/tval-descriptions-table.h"
88 #include "wizard/wizard-spells.h"
89 #include "wizard/wizard-spoiler.h"
90 #include "world/world.h"
95 * @brief プレイヤーを完全回復する /
96 * Cure everything instantly
98 void wiz_cure_all(player_type *creature_ptr)
100 (void)life_stream(creature_ptr, FALSE, FALSE);
101 (void)restore_mana(creature_ptr, TRUE);
102 (void)set_food(creature_ptr, PY_FOOD_MAX - 1);
106 * @brief ベースアイテムのウィザード生成のために大項目IDと小項目IDを取得する /
107 * Specify tval and sval (type and subtype of object) originally
110 * by RAK, heavily modified by -Bernd-
111 * This function returns the k_idx of an object type, or zero if failed
112 * List up to 50 choices in three columns
114 KIND_OBJECT_IDX wiz_create_itemtype(void)
120 for (num = 0; (num < 80) && tvals[num].tval; num++) {
121 row = 2 + (num % 20);
122 col = 20 * (num / 20);
124 prt(format("[%c] %s", ch, tvals[num].desc), row, col);
128 if (!get_com("Get what type of object? ", &ch, FALSE))
131 for (num = 0; num < max_num; num++)
132 if (listsym[num] == ch)
135 if ((num < 0) || (num >= max_num))
138 tval_type tval = static_cast<tval_type>(tvals[num].tval);
139 concptr tval_desc = tvals[num].desc;
142 KIND_OBJECT_IDX choice[80];
144 for (KIND_OBJECT_IDX i = 1; (num < 80) && (i < max_k_idx); i++) {
145 object_kind *k_ptr = &k_info[i];
146 if (k_ptr->tval != tval)
149 row = 2 + (num % 20);
150 col = 20 * (num / 20);
154 prt(format("[%c] %s", ch, buf), row, col);
159 if (!get_com(format("What Kind of %s? ", tval_desc), &ch, FALSE))
162 for (num = 0; num < max_num; num++)
163 if (listsym[num] == ch)
166 if ((num < 0) || (num >= max_num))
173 * @brief 任意のベースアイテム生成のメインルーチン /
174 * Wizard routine for creating objects -RAK-
176 * Heavily modified to allow magification and artifactification -Bernd-
178 * Note that wizards cannot create objects on top of other objects.
180 * Hack -- this routine always makes a "dungeon object", and applies
181 * magic to it, and attempts to decline cursed items.
183 void wiz_create_item(player_type *caster_ptr)
186 OBJECT_IDX k_idx = wiz_create_itemtype();
191 if (k_info[k_idx].gen_flags.has(TRG::INSTA_ART)) {
192 for (ARTIFACT_IDX i = 1; i < max_a_idx; i++) {
193 if ((a_info[i].tval != k_info[k_idx].tval) || (a_info[i].sval != k_info[k_idx].sval))
196 (void)create_named_art(caster_ptr, i, caster_ptr->y, caster_ptr->x);
197 msg_print("Allocated(INSTA_ART).");
205 q_ptr->prep(caster_ptr, k_idx);
206 apply_magic_to_object(caster_ptr, q_ptr, caster_ptr->current_floor_ptr->dun_level, AM_NO_FIXED_ART);
207 (void)drop_near(caster_ptr, q_ptr, -1, caster_ptr->y, caster_ptr->x);
208 msg_print("Allocated.");
212 * @brief 指定されたIDの固定アーティファクトを生成する / Create the artifact of the specified number
213 * @param caster_ptr プレーヤーへの参照ポインタ
215 void wiz_create_named_art(player_type *caster_ptr, ARTIFACT_IDX a_idx)
219 sprintf(tmp, "Artifact ID (1-%d): ", max_a_idx - 1);
220 char tmp_val[10] = "";
221 if (!get_string(tmp, tmp_val, 3))
224 a_idx = (ARTIFACT_IDX)atoi(tmp_val);
227 if (a_idx <= 0 || a_idx >= max_a_idx) {
228 msg_format(_("番号は1から%dの間で指定して下さい。", "ID must be between 1 to %d."), max_a_idx - 1);
232 (void)create_named_art(caster_ptr, a_idx, caster_ptr->y, caster_ptr->x);
233 msg_print("Allocated.");
237 * @brief プレイヤーの現能力値を調整する / Change various "permanent" player variables.
238 * @param creature_ptr プレーヤーへの参照ポインタ
240 void wiz_change_status(player_type *creature_ptr)
245 for (int i = 0; i < A_MAX; i++) {
246 sprintf(ppp, "%s (3-%d): ", stat_names[i], creature_ptr->stat_max_max[i]);
247 sprintf(tmp_val, "%d", creature_ptr->stat_max[i]);
248 if (!get_string(ppp, tmp_val, 3))
251 tmp_int = atoi(tmp_val);
252 if (tmp_int > creature_ptr->stat_max_max[i])
253 tmp_int = creature_ptr->stat_max_max[i];
254 else if (tmp_int < 3)
257 creature_ptr->stat_cur[i] = creature_ptr->stat_max[i] = (BASE_STATUS)tmp_int;
260 sprintf(tmp_val, "%d", WEAPON_EXP_MASTER);
261 if (!get_string(_("熟練度: ", "Proficiency: "), tmp_val, 4))
264 s16b tmp_s16b = (s16b)atoi(tmp_val);
265 if (tmp_s16b < WEAPON_EXP_UNSKILLED)
266 tmp_s16b = WEAPON_EXP_UNSKILLED;
268 if (tmp_s16b > WEAPON_EXP_MASTER)
269 tmp_s16b = WEAPON_EXP_MASTER;
271 for (int j = 0; j <= TV_WEAPON_END - TV_WEAPON_BEGIN; j++) {
272 for (int i = 0; i < 64; i++) {
273 creature_ptr->weapon_exp[j][i] = tmp_s16b;
274 if (creature_ptr->weapon_exp[j][i] > s_info[creature_ptr->pclass].w_max[j][i])
275 creature_ptr->weapon_exp[j][i] = s_info[creature_ptr->pclass].w_max[j][i];
279 for (int j = 0; j < 10; j++) {
280 creature_ptr->skill_exp[j] = tmp_s16b;
281 if (creature_ptr->skill_exp[j] > s_info[creature_ptr->pclass].s_max[j])
282 creature_ptr->skill_exp[j] = s_info[creature_ptr->pclass].s_max[j];
286 for (k = 0; k < 32; k++)
287 creature_ptr->spell_exp[k] = (tmp_s16b > SPELL_EXP_MASTER ? SPELL_EXP_MASTER : tmp_s16b);
290 creature_ptr->spell_exp[k] = (tmp_s16b > SPELL_EXP_EXPERT ? SPELL_EXP_EXPERT : tmp_s16b);
292 sprintf(tmp_val, "%ld", (long)(creature_ptr->au));
293 if (!get_string("Gold: ", tmp_val, 9))
296 long tmp_long = atol(tmp_val);
300 creature_ptr->au = tmp_long;
301 sprintf(tmp_val, "%ld", (long)(creature_ptr->max_exp));
302 if (!get_string("Experience: ", tmp_val, 9))
305 tmp_long = atol(tmp_val);
309 if (creature_ptr->prace == RACE_ANDROID)
312 creature_ptr->max_exp = tmp_long;
313 creature_ptr->exp = tmp_long;
314 check_experience(creature_ptr);
315 do_cmd_redraw(creature_ptr);
319 * @brief 指定された地点の地形IDを変更する /
320 * Create desired feature
321 * @param creaturer_ptr プレーヤーへの参照ポインタ
323 void wiz_create_feature(player_type *creature_ptr)
326 if (!tgt_pt(creature_ptr, &x, &y))
330 g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
331 static int prev_feat = 0;
333 sprintf(tmp_val, "%d", prev_feat);
335 if (!get_string(_("地形: ", "Feature: "), tmp_val, 3))
338 FEAT_IDX tmp_feat = (FEAT_IDX)atoi(tmp_val);
341 else if (tmp_feat >= max_f_idx)
342 tmp_feat = max_f_idx - 1;
344 static int prev_mimic = 0;
345 sprintf(tmp_val, "%d", prev_mimic);
347 if (!get_string(_("地形 (mimic): ", "Feature (mimic): "), tmp_val, 3))
350 FEAT_IDX tmp_mimic = (FEAT_IDX)atoi(tmp_val);
353 else if (tmp_mimic >= max_f_idx)
354 tmp_mimic = max_f_idx - 1;
356 cave_set_feat(creature_ptr, y, x, tmp_feat);
357 g_ptr->mimic = (s16b)tmp_mimic;
359 f_ptr = &f_info[get_feat_mimic(g_ptr)];
361 if (has_flag(f_ptr->flags, FF_RUNE_PROTECTION) || has_flag(f_ptr->flags, FF_RUNE_EXPLOSION))
362 g_ptr->info |= CAVE_OBJECT;
363 else if (has_flag(f_ptr->flags, FF_MIRROR))
364 g_ptr->info |= CAVE_GLOW | CAVE_OBJECT;
366 note_spot(creature_ptr, y, x);
367 lite_spot(creature_ptr, y, x);
368 creature_ptr->update |= PU_FLOW;
369 prev_feat = tmp_feat;
370 prev_mimic = tmp_mimic;
374 * @brief 選択したダンジョンの任意フロアを選択する
375 * @param creature_ptr プレーヤーへの参照ポインタ
376 * @param dungeon_type ダンジョン番号
377 * @return フロアを選択したらtrue、キャンセルならfalse
378 * @details 0を指定すると地上に飛ぶが、元いた場所にしか飛ばない
379 * @todo 可能ならダンジョンの入口 (例:ルルイエなら大洋の真ん中)へ飛べるようにしたい
381 static bool select_debugging_floor(player_type *creature_ptr, int dungeon_type)
383 auto max_depth = d_info[dungeon_type].maxdepth;
384 if ((max_depth == 0) || (dungeon_type > current_world_ptr->max_d_idx)) {
385 dungeon_type = DUNGEON_ANGBAND;
388 auto min_depth = (int)d_info[dungeon_type].mindepth;
392 sprintf(ppp, "Jump to level (0, %d-%d): ", min_depth, max_depth);
393 sprintf(tmp_val, "%d", (int)creature_ptr->current_floor_ptr->dun_level);
394 if (!get_string(ppp, tmp_val, 10)) {
398 auto tmp_command_arg = (COMMAND_ARG)atoi(tmp_val);
399 if (tmp_command_arg == 0) {
400 command_arg = tmp_command_arg;
404 auto is_valid_floor = tmp_command_arg > 0;
405 is_valid_floor &= tmp_command_arg >= min_depth;
406 is_valid_floor &= tmp_command_arg <= max_depth;
407 if (is_valid_floor) {
408 command_arg = tmp_command_arg;
412 msg_print("Invalid floor. Please re-input.");
416 creature_ptr->dungeon_idx = (DUNGEON_IDX)dungeon_type;
421 * @brief デバッグ帰還のダンジョンを選ぶ
422 * @param creature_ptr プレーヤーへの参照ポインタ
423 * @details 範囲外の値が選択されたら再入力を促す
425 static bool select_debugging_dungeon(player_type *creature_ptr, int *dungeon_type)
427 if (command_arg > 0) {
434 sprintf(ppp, "Jump which dungeon : ");
435 sprintf(tmp_val, "%d", creature_ptr->dungeon_idx);
436 if (!get_string(ppp, tmp_val, 2)) {
440 *dungeon_type = atoi(tmp_val);
441 if ((*dungeon_type < DUNGEON_ANGBAND) || (*dungeon_type > DUNGEON_MAX)) {
442 msg_print("Invalid dungeon. Please re-input.");
451 * @brief 任意のダンジョン及び階層に飛ぶ /
454 void wiz_jump_to_dungeon(player_type *creature_ptr)
457 if (!select_debugging_dungeon(creature_ptr, &dungeon_type)) {
461 if (!select_debugging_floor(creature_ptr, dungeon_type)) {
465 if (command_arg < d_info[creature_ptr->dungeon_idx].mindepth)
468 if (command_arg > d_info[creature_ptr->dungeon_idx].maxdepth)
469 command_arg = (COMMAND_ARG)d_info[creature_ptr->dungeon_idx].maxdepth;
471 msg_format("You jump to dungeon level %d.", command_arg);
473 do_cmd_save_game(creature_ptr, TRUE);
475 creature_ptr->current_floor_ptr->dun_level = command_arg;
476 prepare_change_floor_mode(creature_ptr, CFM_RAND_PLACE);
477 if (!is_in_dungeon(creature_ptr))
478 creature_ptr->dungeon_idx = 0;
480 creature_ptr->current_floor_ptr->inside_arena = FALSE;
481 creature_ptr->wild_mode = FALSE;
482 leave_quest_check(creature_ptr);
484 exe_write_diary(creature_ptr, DIARY_WIZ_TELE, 0, NULL);
486 creature_ptr->current_floor_ptr->inside_quest = 0;
487 PlayerEnergy(creature_ptr).reset_player_turn();
488 creature_ptr->energy_need = 0;
489 prepare_change_floor_mode(creature_ptr, CFM_FIRST_FLOOR);
490 creature_ptr->leaving = TRUE;
494 * @brief 全ベースアイテムを鑑定済みにする /
495 * Become aware of a lot of objects
496 * @param caster_ptr プレーヤーへの参照ポインタ
498 void wiz_learn_items_all(player_type *caster_ptr)
502 for (KIND_OBJECT_IDX i = 1; i < max_k_idx; i++) {
503 object_kind *k_ptr = &k_info[i];
504 if (k_ptr->level <= command_arg) {
506 q_ptr->prep(caster_ptr, i);
507 object_aware(caster_ptr, q_ptr);
513 * @brief プレイヤーの種族を変更する
515 void wiz_reset_race(player_type *creature_ptr)
518 sprintf(ppp, "Race (0-%d): ", MAX_RACES - 1);
521 sprintf(tmp_val, "%d", creature_ptr->prace);
523 if (!get_string(ppp, tmp_val, 2))
526 int tmp_int = atoi(tmp_val);
527 if (tmp_int < 0 || tmp_int >= MAX_RACES)
530 creature_ptr->prace = static_cast<player_race_type>(tmp_int);
531 rp_ptr = &race_info[creature_ptr->prace];
533 creature_ptr->window_flags |= PW_PLAYER;
534 creature_ptr->update |= PU_BONUS | PU_HP | PU_MANA | PU_SPELLS;
535 creature_ptr->redraw |= PR_BASIC | PR_HP | PR_MANA | PR_STATS;
536 handle_stuff(creature_ptr);
540 * @brief プレイヤーの職業を変更する
541 * @todo 魔法領域の再選択などがまだ不完全、要実装。
543 void wiz_reset_class(player_type *creature_ptr)
546 sprintf(ppp, "Class (0-%d): ", MAX_CLASS - 1);
549 sprintf(tmp_val, "%d", creature_ptr->pclass);
551 if (!get_string(ppp, tmp_val, 2))
554 int tmp_int = atoi(tmp_val);
555 if (tmp_int < 0 || tmp_int >= MAX_CLASS)
558 creature_ptr->pclass = static_cast<player_class_type>(tmp_int);
559 cp_ptr = &class_info[creature_ptr->pclass];
560 mp_ptr = &m_info[creature_ptr->pclass];
561 creature_ptr->window_flags |= PW_PLAYER;
562 creature_ptr->update |= PU_BONUS | PU_HP | PU_MANA | PU_SPELLS;
563 creature_ptr->redraw |= PR_BASIC | PR_HP | PR_MANA | PR_STATS;
564 handle_stuff(creature_ptr);
568 * @brief プレイヤーの領域を変更する
569 * @todo 存在有無などは未判定。そのうちすべき。
571 void wiz_reset_realms(player_type *creature_ptr)
576 sprintf(ppp, "1st Realm (None=0, 1-%d): ", MAX_REALM - 1);
577 sprintf(tmp_val, "%d", creature_ptr->realm1);
578 if (!get_string(ppp, tmp_val, 2))
581 creature_ptr->realm1 = static_cast<REALM_IDX>(atoi(tmp_val));
583 sprintf(ppp, "2st Realm (None=0, 1-%d): ", MAX_REALM - 1);
584 sprintf(tmp_val, "%d", creature_ptr->realm2);
585 if (!get_string(ppp, tmp_val, 2))
588 creature_ptr->realm2 = static_cast<REALM_IDX>(atoi(tmp_val));
589 creature_ptr->window_flags |= PW_PLAYER;
590 creature_ptr->update |= PU_BONUS | PU_HP | PU_MANA | PU_SPELLS;
591 creature_ptr->redraw |= PR_BASIC;
592 handle_stuff(creature_ptr);
596 * @brief 現在のオプション設定をダンプ出力する /
597 * @param creature_ptr プレーヤーへの参照ポインタ
598 * Hack -- Dump option bits usage
600 void wiz_dump_options(void)
603 path_build(buf, sizeof(buf), ANGBAND_DIR_USER, "opt_info.txt");
605 fff = angband_fopen(buf, "a");
607 msg_format(_("ファイル %s を開けませんでした。", "Failed to open file %s."), buf);
613 C_MAKE(exist, NUM_O_SET, int *);
614 C_MAKE(*exist, NUM_O_BIT * NUM_O_SET, int);
615 for (int i = 1; i < NUM_O_SET; i++)
616 exist[i] = *exist + i * NUM_O_BIT;
618 for (int i = 0; option_info[i].o_desc; i++) {
619 const option_type *ot_ptr = &option_info[i];
621 exist[ot_ptr->o_set][ot_ptr->o_bit] = i + 1;
626 fprintf(fff, "[Option bits usage on %s\n]", title);
627 fputs("Set - Bit (Page) Option Name\n", fff);
628 fputs("------------------------------------------------\n", fff);
629 for (int i = 0; i < NUM_O_SET; i++) {
630 for (int j = 0; j < NUM_O_BIT; j++) {
632 const option_type *ot_ptr = &option_info[exist[i][j] - 1];
633 fprintf(fff, " %d - %02d (%4d) %s\n", i, j, ot_ptr->o_page, ot_ptr->o_text);
635 fprintf(fff, " %d - %02d\n", i, j);
642 C_KILL(*exist, NUM_O_BIT * NUM_O_SET, int);
643 C_KILL(exist, NUM_O_SET, int *);
645 msg_format(_("オプションbit使用状況をファイル %s に書き出しました。", "Option bits usage dump saved to file %s."), buf);
649 * @brief プレイ日数を変更する / Set gametime.
650 * @return 実際に変更を行ったらTRUEを返す
652 void set_gametime(void)
655 char ppp[80], tmp_val[40];
656 sprintf(ppp, "Dungeon Turn (0-%ld): ", (long)current_world_ptr->dungeon_turn_limit);
657 sprintf(tmp_val, "%ld", (long)current_world_ptr->dungeon_turn);
658 if (!get_string(ppp, tmp_val, 10))
661 tmp_int = atoi(tmp_val);
662 if (tmp_int >= current_world_ptr->dungeon_turn_limit)
663 tmp_int = current_world_ptr->dungeon_turn_limit - 1;
664 else if (tmp_int < 0)
667 current_world_ptr->dungeon_turn = current_world_ptr->game_turn = tmp_int;
671 * @brief プレイヤー近辺の全モンスターを消去する / Delete all nearby monsters
673 void wiz_zap_surrounding_monsters(player_type *caster_ptr)
675 for (MONSTER_IDX i = 1; i < caster_ptr->current_floor_ptr->m_max; i++) {
676 monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
677 if (!monster_is_valid(m_ptr) || (i == caster_ptr->riding) || (m_ptr->cdis > MAX_SIGHT))
680 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname) {
681 GAME_TEXT m_name[MAX_NLEN];
683 monster_desc(caster_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
684 exe_write_diary(caster_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_WIZ_ZAP, m_name);
687 delete_monster_idx(caster_ptr, i);
692 * @brief フロアに存在する全モンスターを消去する / Delete all monsters
693 * @param caster_ptr 術者の参照ポインタ
695 void wiz_zap_floor_monsters(player_type *caster_ptr)
697 for (MONSTER_IDX i = 1; i < caster_ptr->current_floor_ptr->m_max; i++) {
698 monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
699 if (!monster_is_valid(m_ptr) || (i == caster_ptr->riding))
702 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname) {
703 GAME_TEXT m_name[MAX_NLEN];
704 monster_desc(caster_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
705 exe_write_diary(caster_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_WIZ_ZAP, m_name);
708 delete_monster_idx(caster_ptr, i);
712 void cheat_death(player_type *creature_ptr)
714 if (creature_ptr->sc)
715 creature_ptr->sc = creature_ptr->age = 0;
718 current_world_ptr->noscore |= 0x0001;
719 msg_print(_("ウィザードモードに念を送り、死を欺いた。", "You invoke wizard mode and cheat death."));
722 creature_ptr->is_dead = FALSE;
723 (void)life_stream(creature_ptr, FALSE, FALSE);
724 (void)restore_mana(creature_ptr, TRUE);
725 (void)recall_player(creature_ptr, 0);
726 reserve_alter_reality(creature_ptr, 0);
728 (void)strcpy(creature_ptr->died_from, _("死の欺き", "Cheating death"));
729 (void)set_food(creature_ptr, PY_FOOD_MAX - 1);
731 floor_type *floor_ptr = creature_ptr->current_floor_ptr;
732 floor_ptr->dun_level = 0;
733 floor_ptr->inside_arena = FALSE;
734 creature_ptr->phase_out = FALSE;
736 floor_ptr->inside_quest = 0;
737 if (creature_ptr->dungeon_idx)
738 creature_ptr->recall_dungeon = creature_ptr->dungeon_idx;
739 creature_ptr->dungeon_idx = 0;
740 if (lite_town || vanilla_town) {
741 creature_ptr->wilderness_y = 1;
742 creature_ptr->wilderness_x = 1;
744 creature_ptr->oldpy = 10;
745 creature_ptr->oldpx = 34;
747 creature_ptr->oldpy = 33;
748 creature_ptr->oldpx = 131;
751 creature_ptr->wilderness_y = 48;
752 creature_ptr->wilderness_x = 5;
753 creature_ptr->oldpy = 33;
754 creature_ptr->oldpx = 131;
757 creature_ptr->wild_mode = FALSE;
758 creature_ptr->leaving = TRUE;
760 exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 1, _(" しかし、生き返った。", " but revived."));
761 leave_floor(creature_ptr);