3 * @brief ウィザードモードの処理(特別処理中心) / Wizard commands
6 * Copyright (c) 1997 Ben Harrison, and others<br>
7 * This software may be copied and distributed for educational, research,
8 * and not for profit purposes provided that this copyright and statement
9 * are included in all such copies. Other copyrights may also apply.<br>
10 * 2014 Deskull rearranged comment for Doxygen.<br>
23 #include "player-status.h"
24 #include "player-effects.h"
25 #include "player-skill.h"
28 #include "spells-object.h"
29 #include "spells-summon.h"
30 #include "spells-status.h"
31 #include "spells-world.h"
32 #include "spells-floor.h"
34 #include "object-flavor.h"
35 #include "object-hook.h"
36 #include "monster-status.h"
39 #include "floor-save.h"
41 #include "dungeon-file.h"
43 #include "monster-spell.h"
45 #include "objectkind.h"
46 #include "targeting.h"
51 * @brief 必ず成功するウィザードモード用次元の扉処理 / Wizard Dimension Door
52 * @return 実際にテレポートを行ったらTRUEを返す
54 static bool wiz_dimension_door(void)
56 POSITION x = 0, y = 0;
57 if (!tgt_pt(&x, &y)) return FALSE;
58 teleport_player_to(y, x, TELEPORT_NONMAGICAL);
63 * @brief 指定されたIDの固定アーティファクトを生成する / Create the artifact of the specified number
66 static void wiz_create_named_art(void)
68 char tmp_val[10] = "";
72 if (!get_string("Artifact ID:", tmp_val, 3)) return;
75 a_idx = (ARTIFACT_IDX)atoi(tmp_val);
76 if(a_idx < 0) a_idx = 0;
77 if(a_idx >= max_a_idx) a_idx = 0;
79 (void)create_named_art(a_idx, p_ptr->y, p_ptr->x);
82 msg_print("Allocated.");
86 * @brief ウィザードモード用モンスターの群れ生成 / Summon a horde of monsters
89 static void do_cmd_summon_horde(void)
91 POSITION wy = p_ptr->y, wx = p_ptr->x;
96 scatter(&wy, &wx, p_ptr->y, p_ptr->x, 3, 0);
97 if (cave_empty_bold(wy, wx)) break;
100 (void)alloc_horde(wy, wx);
104 * @brief 32ビット変数のビット配列を並べて描画する / Output a long int in binary format.
107 static void prt_binary(BIT_FLAGS flags, int row, int col)
113 for (i = bitmask = 1; i <= 32; i++, bitmask *= 2)
118 Term_putch(col++, row, TERM_BLUE, '*');
121 /* Dump unset bits */
124 Term_putch(col++, row, TERM_WHITE, '-');
130 #define K_MAX_DEPTH 110 /*!< アイテムの階層毎生成率を表示する最大階 */
133 * @brief アイテムの階層毎生成率を表示する / Output a rarity graph for a type of object.
134 * @param tval ベースアイテムの大項目ID
135 * @param sval ベースアイテムの小項目ID
140 static void prt_alloc(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval, TERM_LEN row, TERM_LEN col)
144 u32b rarity[K_MAX_DEPTH];
145 u32b total[K_MAX_DEPTH];
147 concptr r = "+---Rate---+";
152 alloc_entry *table = alloc_kind_table;
154 /* Wipe the tables */
155 (void)C_WIPE(rarity, K_MAX_DEPTH, u32b);
156 (void)C_WIPE(total, K_MAX_DEPTH, u32b);
157 (void)C_WIPE(display, 22, s32b);
159 /* Scan all entries */
160 for (i = 0; i < K_MAX_DEPTH; i++)
163 for (j = 0; j < alloc_kind_size; j++)
167 if (table[j].level <= i)
169 prob = table[j].prob1 * GREAT_OBJ * K_MAX_DEPTH;
171 else if (table[j].level - 1 > 0)
173 prob = table[j].prob1 * i * K_MAX_DEPTH / (table[j].level - 1);
176 /* Acquire this kind */
177 k_ptr = &k_info[table[j].index];
179 /* Accumulate probabilities */
180 total[i] += prob / (GREAT_OBJ * K_MAX_DEPTH);
181 total_frac += prob % (GREAT_OBJ * K_MAX_DEPTH);
183 /* Accumulate probabilities */
184 if ((k_ptr->tval == tval) && (k_ptr->sval == sval))
187 rarity[i] += prob / (GREAT_OBJ * K_MAX_DEPTH);
190 total[i] += total_frac / (GREAT_OBJ * K_MAX_DEPTH);
193 /* Calculate probabilities for each range */
194 for (i = 0; i < 22; i++)
196 /* Shift the values into view */
198 for (j = i * K_MAX_DEPTH / 22; j < (i + 1) * K_MAX_DEPTH / 22; j++)
199 possibility += rarity[j] * 100000 / total[j];
200 display[i] = possibility / 5;
203 /* Graph the rarities */
204 for (i = 0; i < 22; i++)
206 Term_putch(col, row + i + 1, TERM_WHITE, '|');
208 prt(format("%2dF", (i * 5)), row + i + 1, col);
212 if ((i * K_MAX_DEPTH / 22 <= home) && (home < (i + 1) * K_MAX_DEPTH / 22))
214 c_prt(TERM_RED, format("%3d.%04d%%", display[i] / 1000, display[i] % 1000), row + i + 1, col + 3);
218 c_prt(TERM_WHITE, format("%3d.%04d%%", display[i] / 1000, display[i] % 1000), row + i + 1, col + 3);
222 /* Make it look nice */
227 * @brief プレイヤーの職業を変更する
229 * @todo 魔法領域の再選択などがまだ不完全、要実装。
231 static void do_cmd_wiz_reset_class(void)
238 sprintf(ppp, "Class (0-%d): ", MAX_CLASS - 1);
241 sprintf(tmp_val, "%d", p_ptr->pclass);
244 if (!get_string(ppp, tmp_val, 2)) return;
247 tmp_int = atoi(tmp_val);
250 if (tmp_int < 0 || tmp_int >= MAX_CLASS) return;
253 p_ptr->pclass = (byte_hack)tmp_int;
255 /* Redraw inscription */
256 p_ptr->window |= (PW_PLAYER);
258 /* {.} and {$} effect p_ptr->warning and TRC_TELEPORT_SELF */
259 p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
266 * @brief ウィザードモード用処理としてターゲット中の相手をテレポートバックする / Hack -- Teleport to the target
269 static void do_cmd_wiz_bamf(void)
271 /* Must have a target */
272 if (!target_who) return;
274 /* Teleport to the target */
275 teleport_player_to(target_row, target_col, TELEPORT_NONMAGICAL);
280 * @brief プレイヤーの現能力値を調整する
281 * Aux function for "do_cmd_wiz_change()". -RAK-
284 static void do_cmd_wiz_change_aux(void)
294 /* Query the stats */
295 for (i = 0; i < A_MAX; i++)
298 sprintf(ppp, "%s (3-%d): ", stat_names[i], p_ptr->stat_max_max[i]);
301 sprintf(tmp_val, "%d", p_ptr->stat_max[i]);
304 if (!get_string(ppp, tmp_val, 3)) return;
307 tmp_int = atoi(tmp_val);
310 if (tmp_int > p_ptr->stat_max_max[i]) tmp_int = p_ptr->stat_max_max[i];
311 else if (tmp_int < 3) tmp_int = 3;
314 p_ptr->stat_cur[i] = p_ptr->stat_max[i] = (BASE_STATUS)tmp_int;
319 sprintf(tmp_val, "%d", WEAPON_EXP_MASTER);
322 if (!get_string(_("熟練度: ", "Proficiency: "), tmp_val, 9)) return;
325 tmp_s16b = (s16b)atoi(tmp_val);
328 if (tmp_s16b < WEAPON_EXP_UNSKILLED) tmp_s16b = WEAPON_EXP_UNSKILLED;
329 if (tmp_s16b > WEAPON_EXP_MASTER) tmp_s16b = WEAPON_EXP_MASTER;
331 for (j = 0; j <= TV_WEAPON_END - TV_WEAPON_BEGIN; j++)
333 for (i = 0;i < 64;i++)
335 p_ptr->weapon_exp[j][i] = tmp_s16b;
336 if (p_ptr->weapon_exp[j][i] > s_info[p_ptr->pclass].w_max[j][i]) p_ptr->weapon_exp[j][i] = s_info[p_ptr->pclass].w_max[j][i];
340 for (j = 0; j < 10; j++)
342 p_ptr->skill_exp[j] = tmp_s16b;
343 if (p_ptr->skill_exp[j] > s_info[p_ptr->pclass].s_max[j]) p_ptr->skill_exp[j] = s_info[p_ptr->pclass].s_max[j];
346 for (j = 0; j < 32; j++)
347 p_ptr->spell_exp[j] = (tmp_s16b > SPELL_EXP_MASTER ? SPELL_EXP_MASTER : tmp_s16b);
349 p_ptr->spell_exp[j] = (tmp_s16b > SPELL_EXP_EXPERT ? SPELL_EXP_EXPERT : tmp_s16b);
352 sprintf(tmp_val, "%ld", (long)(p_ptr->au));
355 if (!get_string("Gold: ", tmp_val, 9)) return;
358 tmp_long = atol(tmp_val);
361 if (tmp_long < 0) tmp_long = 0L;
364 p_ptr->au = tmp_long;
367 sprintf(tmp_val, "%ld", (long)(p_ptr->max_exp));
370 if (!get_string("Experience: ", tmp_val, 9)) return;
373 tmp_long = atol(tmp_val);
376 if (tmp_long < 0) tmp_long = 0L;
378 if (p_ptr->prace != RACE_ANDROID)
381 p_ptr->max_exp = tmp_long;
382 p_ptr->exp = tmp_long;
391 * @brief プレイヤーの現能力値を調整する(メインルーチン)
392 * Change various "permanent" player variables.
395 static void do_cmd_wiz_change(void)
398 do_cmd_wiz_change_aux();
404 * @brief アイテムの詳細ステータスを表示する /
405 * Change various "permanent" player variables.
406 * @param o_ptr 詳細を表示するアイテム情報の参照ポインタ
409 * Wizard routines for creating objects -RAK-
410 * And for manipulating them! -Bernd-
412 * This has been rewritten to make the whole procedure
413 * of debugging objects much easier and more comfortable.
415 * The following functions are meant to play with objects:
416 * Create, modify, roll for them (for statistic purposes) and more.
417 * The original functions were by RAK.
418 * The function to show an item's debug information was written
419 * by David Reeve Sward <sward+@CMU.EDU>.
420 * Bernd (wiebelt@mathematik.hu-berlin.de)
422 * Here are the low-level functions
423 * - wiz_display_item()
424 * display an item's debug-info
425 * - wiz_create_itemtype()
426 * specify tval and sval (type and subtype of object)
428 * specify pval, +AC, +tohit, +todam
429 * Note that the wizard can leave this function anytime,
430 * thus accepting the default-values for the remaining values.
431 * pval comes first now, since it is most important.
432 * - wiz_reroll_item()
433 * apply some magic to the item or current_world_ptr->game_turn it into an artifact.
435 * Get some statistics about the rarity of an item:
436 * We create a lot of fake items and see if they are of the
437 * same type (tval and sval), then we compare pval and +AC.
438 * If the fake-item is better or equal it is counted.
439 * Note that cursed items that are better or equal (absolute values)
441 * HINT: This is *very* useful for balancing the game!
442 * - wiz_quantity_item()
443 * change the quantity of an item, but be sane about it.
445 * And now the high-level functions
446 * - do_cmd_wiz_play()
447 * play with an existing object
448 * - wiz_create_item()
449 * create a new object
451 * Note -- You do not have to specify "pval" and other item-properties
452 * directly. Just apply magic until you are satisfied with the item.
454 * Note -- For some items (such as wands, staffs, some rings, etc), you
455 * must apply magic, or you will get "broken" or "uncharged" objects.
457 * Note -- Redefining artifacts via "do_cmd_wiz_play()" may destroy
458 * the artifact. Be careful.
460 * Hack -- this function will allow you to create multiple artifacts.
461 * This "feature" may induce crashes or other nasty effects.
462 * Just display an item's properties (debug-info)
463 * Originally by David Reeve Sward <sward+@CMU.EDU>
464 * Verbose item flags by -Bernd-
466 static void wiz_display_item(object_type *o_ptr)
469 BIT_FLAGS flgs[TR_FLAG_SIZE];
471 object_flags(o_ptr, flgs);
473 /* Clear the screen */
474 for (i = 1; i <= 23; i++) prt("", i, j - 2);
476 prt_alloc(o_ptr->tval, o_ptr->sval, 1, 0);
479 object_desc(buf, o_ptr, OD_STORE);
483 prt(format("kind = %-5d level = %-4d tval = %-5d sval = %-5d",
484 o_ptr->k_idx, k_info[o_ptr->k_idx].level,
485 o_ptr->tval, o_ptr->sval), 4, j);
487 prt(format("number = %-3d wgt = %-6d ac = %-5d damage = %dd%d",
488 o_ptr->number, o_ptr->weight,
489 o_ptr->ac, o_ptr->dd, o_ptr->ds), 5, j);
491 prt(format("pval = %-5d toac = %-5d tohit = %-4d todam = %-4d",
492 o_ptr->pval, o_ptr->to_a, o_ptr->to_h, o_ptr->to_d), 6, j);
494 prt(format("name1 = %-4d name2 = %-4d cost = %ld",
495 o_ptr->name1, o_ptr->name2, (long)object_value_real(o_ptr)), 7, j);
497 prt(format("ident = %04x xtra1 = %-4d xtra2 = %-4d timeout = %-d",
498 o_ptr->ident, o_ptr->xtra1, o_ptr->xtra2, o_ptr->timeout), 8, j);
500 prt(format("xtra3 = %-4d xtra4 = %-4d xtra5 = %-4d cursed = %-d",
501 o_ptr->xtra3, o_ptr->xtra4, o_ptr->xtra5, o_ptr->curse_flags), 9, j);
503 prt("+------------FLAGS1------------+", 10, j);
504 prt("AFFECT........SLAY........BRAND.", 11, j);
505 prt(" mf cvae xsqpaefc", 12, j);
506 prt("siwdccsossidsahanvudotgddhuoclio", 13, j);
507 prt("tnieohtctrnipttmiinmrrnrrraiierl", 14, j);
508 prt("rtsxnarelcfgdkcpmldncltggpksdced", 15, j);
509 prt_binary(flgs[0], 16, j);
511 prt("+------------FLAGS2------------+", 17, j);
512 prt("SUST....IMMUN.RESIST............", 18, j);
513 prt(" reaefctrpsaefcpfldbc sn ", 19, j);
514 prt("siwdcciaclioheatcliooeialoshtncd", 20, j);
515 prt("tnieohdsierlrfraierliatrnnnrhehi", 21, j);
516 prt("rtsxnaeydcedwlatdcedsrekdfddrxss", 22, j);
517 prt_binary(flgs[1], 23, j);
519 prt("+------------FLAGS3------------+", 10, j+32);
520 prt("fe cnn t stdrmsiiii d ab ", 11, j+32);
521 prt("aa aoomywhs lleeieihgggg rtgl ", 12, j+32);
522 prt("uu utmacaih eielgggonnnnaaere ", 13, j+32);
523 prt("rr reanurdo vtieeehtrrrrcilas ", 14, j+32);
524 prt("aa algarnew ienpsntsaefctnevs ", 15, j+32);
525 prt_binary(flgs[2], 16, j+32);
527 prt("+------------FLAGS4------------+", 17, j+32);
528 prt("KILL....ESP......... ", 18, j+32);
529 prt("aeud tghaud tgdhegnu ", 19, j+32);
530 prt("nvneoriunneoriruvoon ", 20, j+32);
531 prt("iidmroamidmroagmionq ", 21, j+32);
532 prt("mlenclnmmenclnnnldlu ", 22, j+32);
533 prt_binary(flgs[3], 23, j+32);
538 * ベースアイテムの大項目IDの種別名をまとめる構造体 / A structure to hold a tval and its description
540 typedef struct tval_desc
542 int tval; /*!< 大項目のID */
543 concptr desc; /*!< 大項目名 */
547 * ベースアイテムの大項目IDの種別名定義 / A list of tvals and their textual names
549 static tval_desc tvals[] =
551 { TV_SWORD, "Sword" },
552 { TV_POLEARM, "Polearm" },
553 { TV_HAFTED, "Hafted Weapon" },
555 { TV_ARROW, "Arrows" },
556 { TV_BOLT, "Bolts" },
557 { TV_SHOT, "Shots" },
558 { TV_SHIELD, "Shield" },
559 { TV_CROWN, "Crown" },
561 { TV_GLOVES, "Gloves" },
562 { TV_BOOTS, "Boots" },
563 { TV_CLOAK, "Cloak" },
564 { TV_DRAG_ARMOR, "Dragon Scale Mail" },
565 { TV_HARD_ARMOR, "Hard Armor" },
566 { TV_SOFT_ARMOR, "Soft Armor" },
568 { TV_AMULET, "Amulet" },
570 { TV_POTION, "Potion" },
571 { TV_SCROLL, "Scroll" },
573 { TV_STAFF, "Staff" },
575 { TV_LIFE_BOOK, "Life Spellbook" },
576 { TV_SORCERY_BOOK, "Sorcery Spellbook" },
577 { TV_NATURE_BOOK, "Nature Spellbook" },
578 { TV_CHAOS_BOOK, "Chaos Spellbook" },
579 { TV_DEATH_BOOK, "Death Spellbook" },
580 { TV_TRUMP_BOOK, "Trump Spellbook" },
581 { TV_ARCANE_BOOK, "Arcane Spellbook" },
582 { TV_CRAFT_BOOK, "Craft Spellbook"},
583 { TV_DAEMON_BOOK, "Daemon Spellbook"},
584 { TV_CRUSADE_BOOK, "Crusade Spellbook"},
585 { TV_MUSIC_BOOK, "Music Spellbook" },
586 { TV_HISSATSU_BOOK, "Book of Kendo" },
587 { TV_HEX_BOOK, "Hex Spellbook" },
588 { TV_PARCHMENT, "Parchment" },
589 { TV_WHISTLE, "Whistle" },
590 { TV_SPIKE, "Spikes" },
591 { TV_DIGGING, "Digger" },
592 { TV_CHEST, "Chest" },
593 { TV_CAPTURE, "Capture Ball" },
594 { TV_CARD, "Express Card" },
595 { TV_FIGURINE, "Magical Figurine" },
596 { TV_STATUE, "Statue" },
597 { TV_CORPSE, "Corpse" },
599 { TV_FLASK, "Flask" },
601 { TV_SKELETON, "Skeleton" },
606 * @brief ベースアイテムのウィザード生成のために大項目IDと小項目IDを取得する /
607 * Specify tval and sval (type and subtype of object) originally
610 * by RAK, heavily modified by -Bernd-
611 * This function returns the k_idx of an object type, or zero if failed
612 * List up to 50 choices in three columns
614 static KIND_OBJECT_IDX wiz_create_itemtype(void)
619 OBJECT_TYPE_VALUE tval;
624 KIND_OBJECT_IDX choice[80];
630 /* Print all tval's and their descriptions */
631 for (num = 0; (num < 80) && tvals[num].tval; num++)
633 row = 2 + (num % 20);
634 col = 20 * (num / 20);
636 prt(format("[%c] %s", ch, tvals[num].desc), row, col);
639 /* Me need to know the maximal possible tval_index */
643 if (!get_com("Get what type of object? ", &ch, FALSE)) return (0);
646 for (num = 0; num < max_num; num++)
648 if (listsym[num] == ch) break;
651 /* Bail out if choice is illegal */
652 if ((num < 0) || (num >= max_num)) return (0);
654 /* Base object type chosen, fill in tval */
655 tval = tvals[num].tval;
656 tval_desc = tvals[num].desc;
659 /*** And now we go for k_idx ***/
662 /* We have to search the whole itemlist. */
663 for (num = 0, i = 1; (num < 80) && (i < max_k_idx); i++)
665 object_kind *k_ptr = &k_info[i];
667 /* Analyze matching items */
668 if (k_ptr->tval == tval)
671 row = 2 + (num % 20);
672 col = 20 * (num / 20);
676 /* Acquire the "name" of object "i" */
680 prt(format("[%c] %s", ch, buf), row, col);
682 /* Remember the object index */
687 /* Me need to know the maximal possible remembered object_index */
691 if (!get_com(format("What Kind of %s? ", tval_desc), &ch, FALSE)) return (0);
694 for (num = 0; num < max_num; num++)
696 if (listsym[num] == ch) break;
699 /* Bail out if choice is "illegal" */
700 if ((num < 0) || (num >= max_num)) return (0);
702 /* And return successful */
703 return (choice[num]);
708 * @briefアイテムの基礎能力値を調整する / Tweak an item
709 * @param o_ptr 調整するアイテムの参照ポインタ
712 static void wiz_tweak_item(object_type *o_ptr)
717 if (object_is_artifact(o_ptr)) return;
719 p = "Enter new 'pval' setting: ";
720 sprintf(tmp_val, "%d", o_ptr->pval);
721 if (!get_string(p, tmp_val, 5)) return;
722 o_ptr->pval = (s16b)atoi(tmp_val);
723 wiz_display_item(o_ptr);
725 p = "Enter new 'to_a' setting: ";
726 sprintf(tmp_val, "%d", o_ptr->to_a);
727 if (!get_string(p, tmp_val, 5)) return;
728 o_ptr->to_a = (s16b)atoi(tmp_val);
729 wiz_display_item(o_ptr);
731 p = "Enter new 'to_h' setting: ";
732 sprintf(tmp_val, "%d", o_ptr->to_h);
733 if (!get_string(p, tmp_val, 5)) return;
734 o_ptr->to_h = (s16b)atoi(tmp_val);
735 wiz_display_item(o_ptr);
737 p = "Enter new 'to_d' setting: ";
738 sprintf(tmp_val, "%d", (int)o_ptr->to_d);
739 if (!get_string(p, tmp_val, 5)) return;
740 o_ptr->to_d = (s16b)atoi(tmp_val);
741 wiz_display_item(o_ptr);
746 * @brief アイテムの質を選択して再生成する /
747 * Apply magic to an item or current_world_ptr->game_turn it into an artifact. -Bernd-
748 * @param o_ptr 再生成の対象となるアイテム情報の参照ポインタ
751 static void wiz_reroll_item(object_type *o_ptr)
756 bool changed = FALSE;
758 if (object_is_artifact(o_ptr)) return;
761 object_copy(q_ptr, o_ptr);
763 /* Main loop. Ask for magification and artifactification */
766 /* Display full item debug information */
767 wiz_display_item(q_ptr);
769 /* Ask wizard what to do. */
770 if (!get_com("[a]ccept, [w]orthless, [c]ursed, [n]ormal, [g]ood, [e]xcellent, [s]pecial? ", &ch, FALSE))
772 /* Preserve wizard-generated artifacts */
773 if (object_is_fixed_artifact(q_ptr))
775 a_info[q_ptr->name1].cur_num = 0;
783 /* Create/change it! */
784 if (ch == 'A' || ch == 'a')
790 /* Preserve wizard-generated artifacts */
791 if (object_is_fixed_artifact(q_ptr))
793 a_info[q_ptr->name1].cur_num = 0;
799 /* Apply bad magic, but first clear object */
802 object_prep(q_ptr, o_ptr->k_idx);
803 apply_magic(q_ptr, current_floor_ptr->dun_level, AM_NO_FIXED_ART | AM_GOOD | AM_GREAT | AM_CURSED);
806 /* Apply bad magic, but first clear object */
809 object_prep(q_ptr, o_ptr->k_idx);
810 apply_magic(q_ptr, current_floor_ptr->dun_level, AM_NO_FIXED_ART | AM_GOOD | AM_CURSED);
813 /* Apply normal magic, but first clear object */
816 object_prep(q_ptr, o_ptr->k_idx);
817 apply_magic(q_ptr, current_floor_ptr->dun_level, AM_NO_FIXED_ART);
820 /* Apply good magic, but first clear object */
823 object_prep(q_ptr, o_ptr->k_idx);
824 apply_magic(q_ptr, current_floor_ptr->dun_level, AM_NO_FIXED_ART | AM_GOOD);
827 /* Apply great magic, but first clear object */
830 object_prep(q_ptr, o_ptr->k_idx);
831 apply_magic(q_ptr, current_floor_ptr->dun_level, AM_NO_FIXED_ART | AM_GOOD | AM_GREAT);
834 /* Apply special magic, but first clear object */
837 object_prep(q_ptr, o_ptr->k_idx);
838 apply_magic(q_ptr, current_floor_ptr->dun_level, AM_GOOD | AM_GREAT | AM_SPECIAL);
840 /* Failed to create artifact; make a random one */
841 if (!object_is_artifact(q_ptr)) create_artifact(q_ptr, FALSE);
845 q_ptr->iy = o_ptr->iy;
846 q_ptr->ix = o_ptr->ix;
847 q_ptr->next_o_idx = o_ptr->next_o_idx;
848 q_ptr->marked = o_ptr->marked;
854 object_copy(o_ptr, q_ptr);
855 p_ptr->update |= (PU_BONUS);
856 p_ptr->update |= (PU_COMBINE | PU_REORDER);
857 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
864 * @brief 検査対象のアイテムを基準とした生成テストを行う /
865 * Try to create an item again. Output some statistics. -Bernd-
866 * @param o_ptr 生成テストの基準となるアイテム情報の参照ポインタ
868 * The statistics are correct now. We acquire a clean grid, and then
869 * repeatedly place an object in this grid, copying it into an item
870 * holder, and then deleting the object. We fiddle with the artifact
871 * counter flags to prevent weirdness. We use the items to collect
872 * statistics on item creation relative to the initial item.
874 static void wiz_statistics(object_type *o_ptr)
876 u32b i, matches, better, worse, other, correct;
878 u32b test_roll = 1000000;
888 concptr q = "Rolls: %ld Correct: %ld Matches: %ld Better: %ld Worse: %ld Other: %ld";
890 concptr p = "Enter number of items to roll: ";
894 /* Mega-Hack -- allow multiple artifacts */
895 if (object_is_fixed_artifact(o_ptr)) a_info[o_ptr->name1].cur_num = 0;
901 concptr pmt = "Roll for [n]ormal, [g]ood, or [e]xcellent treasure? ";
904 wiz_display_item(o_ptr);
907 if (!get_com(pmt, &ch, FALSE)) break;
909 if (ch == 'n' || ch == 'N')
914 else if (ch == 'g' || ch == 'G')
919 else if (ch == 'e' || ch == 'E')
921 mode = AM_GOOD | AM_GREAT;
922 quality = "excellent";
929 sprintf(tmp_val, "%ld", (long int)test_roll);
930 if (get_string(p, tmp_val, 10)) test_roll = atol(tmp_val);
931 test_roll = MAX(1, test_roll);
933 /* Let us know what we are doing */
934 msg_format("Creating a lot of %s items. Base level = %d.",
935 quality, current_floor_ptr->dun_level);
938 /* Set counters to zero */
939 correct = matches = better = worse = other = 0;
941 /* Let's rock and roll */
942 for (i = 0; i <= test_roll; i++)
944 /* Output every few rolls */
945 if ((i < 100) || (i % 100 == 0))
954 break; // stop rolling
958 prt(format(q, i, correct, matches, better, worse, other), 0, 0);
964 /* Create an object */
965 make_object(q_ptr, mode);
968 /* Mega-Hack -- allow multiple artifacts */
969 if (object_is_fixed_artifact(q_ptr)) a_info[q_ptr->name1].cur_num = 0;
972 /* Test for the same tval and sval. */
973 if ((o_ptr->tval) != (q_ptr->tval)) continue;
974 if ((o_ptr->sval) != (q_ptr->sval)) continue;
976 /* One more correct item */
979 /* Check for match */
980 if ((q_ptr->pval == o_ptr->pval) &&
981 (q_ptr->to_a == o_ptr->to_a) &&
982 (q_ptr->to_h == o_ptr->to_h) &&
983 (q_ptr->to_d == o_ptr->to_d) &&
984 (q_ptr->name1 == o_ptr->name1))
989 /* Check for better */
990 else if ((q_ptr->pval >= o_ptr->pval) &&
991 (q_ptr->to_a >= o_ptr->to_a) &&
992 (q_ptr->to_h >= o_ptr->to_h) &&
993 (q_ptr->to_d >= o_ptr->to_d))
998 /* Check for worse */
999 else if ((q_ptr->pval <= o_ptr->pval) &&
1000 (q_ptr->to_a <= o_ptr->to_a) &&
1001 (q_ptr->to_h <= o_ptr->to_h) &&
1002 (q_ptr->to_d <= o_ptr->to_d))
1007 /* Assume different */
1015 msg_format(q, i, correct, matches, better, worse, other);
1020 /* Hack -- Normally only make a single artifact */
1021 if (object_is_fixed_artifact(o_ptr)) a_info[o_ptr->name1].cur_num = 1;
1026 * @brief 検査対象のアイテムの数を変更する /
1027 * Change the quantity of a the item
1028 * @param o_ptr 変更するアイテム情報構造体の参照ポインタ
1031 static void wiz_quantity_item(object_type *o_ptr)
1033 int tmp_int, tmp_qnt;
1038 /* Never duplicate artifacts */
1039 if (object_is_artifact(o_ptr)) return;
1041 /* Store old quantity. -LM- */
1042 tmp_qnt = o_ptr->number;
1045 sprintf(tmp_val, "%d", (int)o_ptr->number);
1048 if (get_string("Quantity: ", tmp_val, 2))
1051 tmp_int = atoi(tmp_val);
1052 if (tmp_int < 1) tmp_int = 1;
1053 if (tmp_int > 99) tmp_int = 99;
1055 /* Accept modifications */
1056 o_ptr->number = (byte_hack)tmp_int;
1059 if (o_ptr->tval == TV_ROD)
1061 o_ptr->pval = o_ptr->pval * o_ptr->number / tmp_qnt;
1066 * @brief 青魔導師の魔法を全て習得済みにする /
1067 * debug command for blue mage
1070 static void do_cmd_wiz_blue_mage(void)
1074 BIT_FLAGS f4 = 0L, f5 = 0L, f6 = 0L;
1076 for (j = 1; j < A_MAX; j++)
1078 set_rf_masks(&f4, &f5, &f6, j);
1080 for (i = 0; i < 32; i++)
1082 if ((0x00000001 << i) & f4) p_ptr->magic_num2[i] = 1;
1086 if ((0x00000001 << (i - 32)) & f5) p_ptr->magic_num2[i] = 1;
1090 if ((0x00000001 << (i - 64)) & f6) p_ptr->magic_num2[i] = 1;
1097 * @brief アイテム検査のメインルーチン /
1098 * Play with an item. Options include:
1101 * - Output statistics (via wiz_roll_item)<br>
1102 * - Reroll item (via wiz_reroll_item)<br>
1103 * - Change properties (via wiz_tweak_item)<br>
1104 * - Change the number of items (via wiz_quantity_item)<br>
1106 static void do_cmd_wiz_play(void)
1116 q = "Play with which object? ";
1117 s = "You have nothing to play with.";
1119 o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
1123 /* The item was not changed */
1129 object_copy(q_ptr, o_ptr);
1135 /* Display the item */
1136 wiz_display_item(q_ptr);
1139 if (!get_com("[a]ccept [s]tatistics [r]eroll [t]weak [q]uantity? ", &ch, FALSE))
1145 if (ch == 'A' || ch == 'a')
1151 if (ch == 's' || ch == 'S')
1153 wiz_statistics(q_ptr);
1156 if (ch == 'r' || ch == 'r')
1158 wiz_reroll_item(q_ptr);
1161 if (ch == 't' || ch == 'T')
1163 wiz_tweak_item(q_ptr);
1166 if (ch == 'q' || ch == 'Q')
1168 wiz_quantity_item(q_ptr);
1178 msg_print("Changes accepted.");
1180 /* Recalcurate object's weight */
1183 p_ptr->total_weight += (q_ptr->weight * q_ptr->number)
1184 - (o_ptr->weight * o_ptr->number);
1188 object_copy(o_ptr, q_ptr);
1190 p_ptr->update |= (PU_BONUS);
1191 p_ptr->update |= (PU_COMBINE | PU_REORDER);
1193 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
1199 msg_print("Changes ignored.");
1205 * @brief 任意のベースアイテム生成のメインルーチン /
1206 * Wizard routine for creating objects -RAK-
1209 * Heavily modified to allow magification and artifactification -Bernd-
1211 * Note that wizards cannot create objects on top of other objects.
1213 * Hack -- this routine always makes a "dungeon object", and applies
1214 * magic to it, and attempts to decline cursed items.
1216 static void wiz_create_item(void)
1224 /* Get object base type */
1225 k_idx = wiz_create_itemtype();
1229 /* Return if failed */
1232 if (k_info[k_idx].gen_flags & TRG_INSTA_ART)
1237 for (i = 1; i < max_a_idx; i++)
1239 /* Ignore incorrect tval */
1240 if (a_info[i].tval != k_info[k_idx].tval) continue;
1242 /* Ignore incorrect sval */
1243 if (a_info[i].sval != k_info[k_idx].sval) continue;
1245 /* Create this artifact */
1246 (void)create_named_art(i, p_ptr->y, p_ptr->x);
1249 msg_print("Allocated(INSTA_ART).");
1255 object_prep(q_ptr, k_idx);
1257 apply_magic(q_ptr, current_floor_ptr->dun_level, AM_NO_FIXED_ART);
1259 /* Drop the object from heaven */
1260 (void)drop_near(q_ptr, -1, p_ptr->y, p_ptr->x);
1263 msg_print("Allocated.");
1268 * @brief プレイヤーを完全回復する /
1269 * Cure everything instantly
1272 static void do_cmd_wiz_cure_all(void)
1274 (void)life_stream(FALSE, FALSE);
1275 (void)restore_mana(TRUE);
1276 (void)set_food(PY_FOOD_MAX - 1);
1281 * @brief 任意のダンジョン及び階層に飛ぶ /
1285 static void do_cmd_wiz_jump(void)
1288 if (command_arg <= 0)
1292 DUNGEON_IDX tmp_dungeon_type;
1295 sprintf(ppp, "Jump which dungeon : ");
1298 sprintf(tmp_val, "%d", p_ptr->dungeon_idx);
1300 /* Ask for a level */
1301 if (!get_string(ppp, tmp_val, 2)) return;
1303 tmp_dungeon_type = (DUNGEON_IDX)atoi(tmp_val);
1304 if (!d_info[tmp_dungeon_type].maxdepth || (tmp_dungeon_type > max_d_idx)) tmp_dungeon_type = DUNGEON_ANGBAND;
1307 sprintf(ppp, "Jump to level (0, %d-%d): ",
1308 (int)d_info[tmp_dungeon_type].mindepth, (int)d_info[tmp_dungeon_type].maxdepth);
1311 sprintf(tmp_val, "%d", (int)current_floor_ptr->dun_level);
1313 /* Ask for a level */
1314 if (!get_string(ppp, tmp_val, 10)) return;
1316 /* Extract request */
1317 command_arg = (COMMAND_ARG)atoi(tmp_val);
1319 p_ptr->dungeon_idx = tmp_dungeon_type;
1321 if (command_arg < d_info[p_ptr->dungeon_idx].mindepth) command_arg = 0;
1322 if (command_arg > d_info[p_ptr->dungeon_idx].maxdepth) command_arg = (COMMAND_ARG)d_info[p_ptr->dungeon_idx].maxdepth;
1324 /* Accept request */
1325 msg_format("You jump to dungeon level %d.", command_arg);
1327 if (autosave_l) do_cmd_save_game(TRUE);
1330 current_floor_ptr->dun_level = command_arg;
1332 prepare_change_floor_mode(CFM_RAND_PLACE);
1334 if (!current_floor_ptr->dun_level) p_ptr->dungeon_idx = 0;
1335 p_ptr->inside_arena = FALSE;
1336 p_ptr->wild_mode = FALSE;
1338 leave_quest_check();
1340 if (record_stair) do_cmd_write_nikki(NIKKI_WIZ_TELE,0,NULL);
1342 p_ptr->inside_quest = 0;
1345 /* Prevent energy_need from being too lower than 0 */
1346 p_ptr->energy_need = 0;
1349 * Clear all saved floors
1350 * and create a first saved floor
1352 prepare_change_floor_mode(CFM_FIRST_FLOOR);
1353 p_ptr->leaving = TRUE;
1358 * @brief 全ベースアイテムを鑑定済みにする /
1359 * Become aware of a lot of objects
1362 static void do_cmd_wiz_learn(void)
1369 /* Scan every object */
1370 for (i = 1; i < max_k_idx; i++)
1372 object_kind *k_ptr = &k_info[i];
1374 /* Induce awareness */
1375 if (k_ptr->level <= command_arg)
1378 object_prep(q_ptr, i);
1379 object_aware(q_ptr);
1386 * @brief 現在のフロアに合ったモンスターをランダムに召喚する /
1387 * Summon some creatures
1391 static void do_cmd_wiz_summon(int num)
1394 for (i = 0; i < num; i++)
1396 (void)summon_specific(0, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
1403 * @brief モンスターを種族IDを指定して敵対的に召喚する /
1404 * Summon a creature of the specified type
1405 * @param r_idx モンスター種族ID
1408 * This function is rather dangerous
1410 static void do_cmd_wiz_named(MONRACE_IDX r_idx)
1412 (void)summon_named_creature(0, p_ptr->y, p_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
1417 * @brief モンスターを種族IDを指定してペット召喚する /
1418 * Summon a creature of the specified type
1419 * @param r_idx モンスター種族ID
1422 * This function is rather dangerous
1424 static void do_cmd_wiz_named_friendly(MONRACE_IDX r_idx)
1426 (void)summon_named_creature(0, p_ptr->y, p_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP | PM_FORCE_PET));
1432 * @brief プレイヤー近辺の全モンスターを消去する /
1433 * Hack -- Delete all nearby monsters
1436 static void do_cmd_wiz_zap(void)
1440 /* Genocide everyone nearby */
1441 for (i = 1; i < current_floor_ptr->m_max; i++)
1443 monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
1444 if (!monster_is_valid(m_ptr)) continue;
1446 /* Skip the mount */
1447 if (i == p_ptr->riding) continue;
1449 /* Delete nearby monsters */
1450 if (m_ptr->cdis <= MAX_SIGHT)
1452 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
1454 GAME_TEXT m_name[MAX_NLEN];
1456 monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
1457 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_WIZ_ZAP, m_name);
1460 delete_monster_idx(i);
1467 * @brief フロアに存在する全モンスターを消去する /
1468 * Hack -- Delete all monsters
1471 static void do_cmd_wiz_zap_all(void)
1475 /* Genocide everyone */
1476 for (i = 1; i < current_floor_ptr->m_max; i++)
1478 monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
1479 if (!monster_is_valid(m_ptr)) continue;
1481 /* Skip the mount */
1482 if (i == p_ptr->riding) continue;
1484 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
1486 GAME_TEXT m_name[MAX_NLEN];
1488 monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
1489 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_WIZ_ZAP, m_name);
1492 /* Delete this monster */
1493 delete_monster_idx(i);
1499 * @brief 指定された地点の地形IDを変更する /
1500 * Create desired feature
1503 static void do_cmd_wiz_create_feature(void)
1505 static int prev_feat = 0;
1506 static int prev_mimic = 0;
1508 feature_type *f_ptr;
1510 IDX tmp_feat, tmp_mimic;
1513 if (!tgt_pt(&x, &y)) return;
1515 g_ptr = ¤t_floor_ptr->grid_array[y][x];
1518 sprintf(tmp_val, "%d", prev_feat);
1521 if (!get_string(_("地形: ", "Feature: "), tmp_val, 3)) return;
1524 tmp_feat = (IDX)atoi(tmp_val);
1525 if (tmp_feat < 0) tmp_feat = 0;
1526 else if (tmp_feat >= max_f_idx) tmp_feat = max_f_idx - 1;
1529 sprintf(tmp_val, "%d", prev_mimic);
1532 if (!get_string(_("地形 (mimic): ", "Feature (mimic): "), tmp_val, 3)) return;
1535 tmp_mimic = (IDX)atoi(tmp_val);
1536 if (tmp_mimic < 0) tmp_mimic = 0;
1537 else if (tmp_mimic >= max_f_idx) tmp_mimic = max_f_idx - 1;
1539 cave_set_feat(y, x, tmp_feat);
1540 g_ptr->mimic = (s16b)tmp_mimic;
1542 f_ptr = &f_info[get_feat_mimic(g_ptr)];
1544 if (have_flag(f_ptr->flags, FF_GLYPH) ||
1545 have_flag(f_ptr->flags, FF_MINOR_GLYPH))
1546 g_ptr->info |= (CAVE_OBJECT);
1547 else if (have_flag(f_ptr->flags, FF_MIRROR))
1548 g_ptr->info |= (CAVE_GLOW | CAVE_OBJECT);
1552 p_ptr->update |= (PU_FLOW);
1554 prev_feat = tmp_feat;
1555 prev_mimic = tmp_mimic;
1560 #define NUM_O_BIT 32
1563 * @brief 現在のオプション設定をダンプ出力する /
1564 * Hack -- Dump option bits usage
1567 static void do_cmd_dump_options(void)
1574 /* Build the filename */
1575 path_build(buf, sizeof buf, ANGBAND_DIR_USER, "opt_info.txt");
1577 /* File type is "TEXT" */
1578 FILE_TYPE(FILE_TYPE_TEXT);
1581 fff = my_fopen(buf, "a");
1585 msg_format(_("ファイル %s を開けませんでした。", "Failed to open file %s."), buf);
1590 /* Allocate the "exist" array (2-dimension) */
1591 C_MAKE(exist, NUM_O_SET, int *);
1592 C_MAKE(*exist, NUM_O_BIT * NUM_O_SET, int);
1593 for (i = 1; i < NUM_O_SET; i++) exist[i] = *exist + i * NUM_O_BIT;
1595 /* Check for exist option bits */
1596 for (i = 0; option_info[i].o_desc; i++)
1598 const option_type *ot_ptr = &option_info[i];
1599 if (ot_ptr->o_var) exist[ot_ptr->o_set][ot_ptr->o_bit] = i + 1;
1602 fprintf(fff, "[Option bits usage on Hengband %d.%d.%d]\n\n",
1603 FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH);
1605 fputs("Set - Bit (Page) Option Name\n", fff);
1606 fputs("------------------------------------------------\n", fff);
1607 /* Dump option bits usage */
1608 for (i = 0; i < NUM_O_SET; i++)
1610 for (j = 0; j < NUM_O_BIT; j++)
1614 const option_type *ot_ptr = &option_info[exist[i][j] - 1];
1615 fprintf(fff, " %d - %02d (%4d) %s\n",
1616 i, j, ot_ptr->o_page, ot_ptr->o_text);
1620 fprintf(fff, " %d - %02d\n", i, j);
1626 /* Free the "exist" array (2-dimension) */
1627 C_KILL(*exist, NUM_O_BIT * NUM_O_SET, int);
1628 C_KILL(exist, NUM_O_SET, int *);
1631 msg_format(_("オプションbit使用状況をファイル %s に書き出しました。", "Option bits usage dump saved to file %s."), buf);
1635 #ifdef ALLOW_SPOILERS
1640 extern void do_cmd_spoilers(void);
1642 #endif /* ALLOW_SPOILERS */
1647 * Hack -- declare external function
1649 extern void do_cmd_debug(void);
1654 * @brief デバッグコマンドを選択する処理のメインルーチン /
1655 * Ask for and parse a "debug command"
1656 * The "command_arg" may have been set.
1659 void do_cmd_debug(void)
1664 /* Get a "debug command" */
1665 get_com("Debug Command: ", &cmd, FALSE);
1667 /* Analyze the command */
1677 #ifdef ALLOW_SPOILERS
1679 /* Hack -- Generate Spoilers */
1684 #endif /* ALLOW_SPOILERS */
1691 /* Cure all maladies */
1693 do_cmd_wiz_cure_all();
1696 /* Know alignment */
1698 msg_format("Your alignment is %d.", p_ptr->align);
1701 /* Teleport to target */
1707 update_gambling_monsters();
1710 /* Create any object */
1715 /* Create a named artifact */
1717 wiz_create_named_art();
1720 /* Detect everything */
1722 detect_all(DETECT_RAD_ALL * 3);
1725 /* Dimension_door */
1727 wiz_dimension_door();
1730 /* Edit character */
1732 do_cmd_wiz_change();
1735 /* Blue Mage Only */
1737 if (p_ptr->pclass == CLASS_BLUE_MAGE)
1739 do_cmd_wiz_blue_mage();
1743 /* View item info */
1745 identify_fully(FALSE);
1748 /* Create desired feature */
1750 do_cmd_wiz_create_feature();
1755 if (command_arg <= 0) command_arg = 1;
1756 acquirement(p_ptr->y, p_ptr->x, command_arg, FALSE, FALSE, TRUE);
1759 /* Hitpoint rerating */
1761 roll_hitdice(p_ptr, SPOP_DISPLAY_MES | SPOP_DEBUG);
1765 do_cmd_summon_horde();
1770 (void)ident_spell(FALSE);
1773 /* Go up or down in the dungeon */
1778 /* Self-Knowledge */
1783 /* Learn about objects */
1790 map_area(DETECT_RAD_ALL * 3);
1795 (void)gain_mutation(p_ptr, command_arg);
1800 (void)do_cmd_wiz_reset_class();
1803 /* Specific reward */
1805 (void)gain_level_reward(command_arg);
1808 /* Summon _friendly_ named monster */
1810 do_cmd_wiz_named_friendly(command_arg);
1813 /* Summon Named Monster */
1815 do_cmd_wiz_named(command_arg);
1818 /* Dump option bits usage */
1820 do_cmd_dump_options();
1823 /* Object playing routines */
1830 teleport_player(10, 0L);
1839 sprintf(ppp, "QuestID (0-%d):", max_q_idx - 1);
1840 sprintf(tmp_val, "%d", 0);
1842 if (!get_string(ppp, tmp_val, 3)) return;
1843 tmp_int = atoi(tmp_val);
1845 if(tmp_int < 0) break;
1846 if(tmp_int >= max_q_idx) break;
1848 p_ptr->inside_quest = (QUEST_IDX)tmp_int;
1849 process_dungeon_file("q_info.txt", 0, 0, 0, 0);
1850 quest[tmp_int].status = QUEST_STATUS_TAKEN;
1851 p_ptr->inside_quest = 0;
1855 /* Complete a Quest -KMW- */
1857 if(p_ptr->inside_quest)
1859 if (quest[p_ptr->inside_quest].status == QUEST_STATUS_TAKEN)
1861 complete_quest(p_ptr->inside_quest);
1867 msg_print("No current quest");
1872 /* Make every dungeon square "known" to test streamers -KMW- */
1874 for (y = 0; y < current_floor_ptr->height; y++)
1876 for (x = 0; x < current_floor_ptr->width; x++)
1878 current_floor_ptr->grid_array[y][x].info |= (CAVE_GLOW | CAVE_MARK);
1884 /* Summon Random Monster(s) */
1886 if (command_arg <= 0) command_arg = 1;
1887 do_cmd_wiz_summon(command_arg);
1890 /* Special(Random Artifact) Objects */
1892 if (command_arg <= 0) command_arg = 1;
1893 acquirement(p_ptr->y, p_ptr->x, command_arg, TRUE, TRUE, TRUE);
1898 teleport_player(100, 0L);
1901 /* Game Time Setting */
1907 /* Very Good Objects */
1909 if (command_arg <= 0) command_arg = 1;
1910 acquirement(p_ptr->y, p_ptr->x, command_arg, TRUE, FALSE, TRUE);
1913 /* Wizard Light the Level */
1915 wiz_lite((bool)(p_ptr->pclass == CLASS_NINJA));
1918 /* Increase Experience */
1920 gain_exp(command_arg ? command_arg : (p_ptr->exp + 1));
1923 /* Zap Monsters (Genocide) */
1928 /* Zap Monsters (Omnicide) */
1930 do_cmd_wiz_zap_all();
1933 /* Hack -- whatever I desire */
1938 /* For temporary test. */
1942 for(i = INVEN_TOTAL - 1; i >= 0; i--)
1944 if(p_ptr->inventory_list[i].k_idx) inven_drop(i, 999);
1951 do_cmd_wiz_reset_class();
1954 /* Not a Wizard Command */
1956 msg_print("That is not a valid debug command.");