Beispiel #1
0
/*
 * Ask for and parse a "debug command"
 *
 * The "p_ptr->command_arg" may have been set.
 */
void do_cmd_debug(void)
{
	int py = p_ptr->py;
	int px = p_ptr->px;

	struct keypress cmd;

	const monster_race *r_ptr;


	/* Get a "debug command" */
	if (!get_com("Debug Command: ", &cmd)) return;

	/* Analyze the command */
	switch (cmd.code)
	{
		/* Ignore */
		case ESCAPE:
		case ' ':
		case KC_ENTER:
		{
			break;
		}

#ifdef ALLOW_SPOILERS

		/* Hack -- Generate Spoilers */
		case '"':
		{
			do_cmd_spoilers();
			break;
		}

#endif


		/* Hack -- Help */
		case '?':
		{
			do_cmd_wiz_help();
			break;
		}

		/* Cure all maladies */
		case 'a':
		{
			do_cmd_wiz_cure_all();
			break;
		}

		/* Make the player powerful */
		case 'A':
		{
			do_cmd_wiz_advance();
			break;
		}
		
		/* Teleport to target */
		case 'b':
		{
			do_cmd_wiz_bamf();
			break;
		}

		/* Create any object */
		case 'c':
		{
			wiz_create_item();
			break;
		}

		/* Create an artifact */
		case 'C':
		{
			if (p_ptr->command_arg > 0)
			{
				wiz_create_artifact(p_ptr->command_arg);
			}
			else
			{
				char name[80] = "";
				int a_idx = -1;

				/* Avoid the prompt getting in the way */
				screen_save();

				/* Prompt */
				prt("Create which artifact? ", 0, 0);

				/* Get the name */
				if (askfor_aux(name, sizeof(name), NULL))
				{
					/* See if an a_idx was entered */
					a_idx = get_idx_from_name(name);
					
					/* If not, find the artifact with that name */
					if (a_idx < 1)
						a_idx = lookup_artifact_name(name); 
					
					/* Did we find a valid artifact? */
					if (a_idx != -1)
						wiz_create_artifact(a_idx);
					else
						msg("No artifact found.");
				}
				
				/* Reload the screen */
				screen_load();
			}
			break;
		}

		/* Detect everything */
		case 'd':
		{
			detect_all(TRUE);
			break;
		}
		
		/* Test for disconnected dungeon */
		case 'D':
		{
			disconnect_stats();
			break;
		}

		/* Edit character */
		case 'e':
		{
			do_cmd_wiz_change();
			break;
		}

		case 'f':
		{
			stats_collect();
			break;
		}

		/* Good Objects */
		case 'g':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1;
			acquirement(py, px, p_ptr->depth, p_ptr->command_arg, FALSE);
			break;
		}

		/* GF demo */
		case 'G':
		{
			wiz_gf_demo();
			break;
		}

		/* Hitpoint rerating */
		case 'h':
		{
			do_cmd_rerate();
			break;
		}

		/* Identify */
		case 'i':
		{
			(void)ident_spell();
			break;
		}

		/* Go up or down in the dungeon */
		case 'j':
		{
			do_cmd_wiz_jump();
			break;
		}

		/* Learn about objects */
		case 'l':
		{
			do_cmd_wiz_learn();
			break;
		}

		case 'L': do_cmd_keylog(); break;

		/* Magic Mapping */
		case 'm':
		{
			map_area();
			break;
		}

		/* Summon Named Monster */
		case 'n':
		{
			s16b r_idx = 0; 

			if (p_ptr->command_arg > 0)
			{
				r_idx = p_ptr->command_arg;
			}
			else
			{
				char name[80] = "";

				/* Avoid the prompt getting in the way */
				screen_save();

				/* Prompt */
				prt("Summon which monster? ", 0, 0);

				/* Get the name */
				if (askfor_aux(name, sizeof(name), NULL))
				{
					/* See if a r_idx was entered */
					r_idx = get_idx_from_name(name);
					
					/* If not, find the monster with that name */
					if (r_idx < 1)
						r_idx = lookup_monster(name); 
					
					p_ptr->redraw |= (PR_MAP | PR_MONLIST);

					/* Reload the screen */
					screen_load();
				}
			}

			if (r_idx > 0)
				do_cmd_wiz_named(r_idx, TRUE);
			else
				msg("No monster found.");
			
			break;
		}

		/* Object playing routines */
		case 'o':
		{
			do_cmd_wiz_play();
			break;
		}

		/* Phase Door */
		case 'p':
		{
			teleport_player(10);
			break;
		}

		/* Monster pit stats */
		case 'P':
		{
			pit_stats();
			break;
		}
		
		/* Query the dungeon */
		case 'q':
		{
			do_cmd_wiz_query();
			break;
		}

		/* Get full recall for a monster */
		case 'r':
		{
			s16b r_idx = 0; 

			if (p_ptr->command_arg > 0)
			{
				r_idx = p_ptr->command_arg;
			}
			else
			{
				struct keypress sym;
				const char *prompt =
					"Full recall for [a]ll monsters or [s]pecific monster? ";

				if (!get_com(prompt, &sym)) return;

				if (sym.code == 'a' || sym.code == 'A')
				{
					int i;
					for (i = 1; i < z_info->r_max; i++)
					{
						r_ptr = &r_info[i];
						cheat_monster_lore(r_ptr, &l_list[i]);
					}
					break;
				}
				else if (sym.code == 's' || sym.code == 'S')
				{
					char name[80] = "";
					
					/* Avoid the prompt getting in the way */
					screen_save();

					/* Prompt */
					prt("Which monster? ", 0, 0);

					/* Get the name */
					if (askfor_aux(name, sizeof(name), NULL))
					{
						/* See if a r_idx was entered */
						r_idx = get_idx_from_name(name);
						
						/* If not, find the monster with that name */
						if (r_idx < 1)
							r_idx = lookup_monster(name); 
					}
					
					/* Reload the screen */
					screen_load();
				}
				else
				{
					/* Assume user aborts */
					break;
				}
			}

			/* Did we find a valid monster? */
			if (r_idx > 0)
			{
				r_ptr = &r_info[r_idx];
				cheat_monster_lore(r_ptr, &l_list[r_idx]);
			}
			else
				msg("No monster found.");
	
			break;
		}

		/* Summon Random Monster(s) */
		case 's':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1;
			do_cmd_wiz_summon(p_ptr->command_arg);
			break;
		}
		
		/* Collect stats (S) */
		case 'S':
		{
			stats_collect();
			break;
		}

		/* Teleport */
		case 't':
		{
			teleport_player(100);
			break;
		}

		/* Create a trap */
		case 'T':
		{
			if (cave->feat[p_ptr->py][p_ptr->px] != FEAT_FLOOR) 
				msg("You can't place a trap there!");
			else if (p_ptr->depth == 0)
				msg("You can't place a trap in the town!");
			else
				cave_set_feat(cave, p_ptr->py, p_ptr->px, FEAT_INVIS);
			break;
		}

		/* Un-hide all monsters */
		case 'u':
		{
			detect_monsters_entire_level();
			break;
		}

		/* Very Good Objects */
		case 'v':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1;
			acquirement(py, px, p_ptr->depth, p_ptr->command_arg, TRUE);
			break;
		}

		case 'V':
		{
			wiz_test_kind(p_ptr->command_arg);
			break;
		}

		/* Wizard Light the Level */
		case 'w':
		{
			wiz_light(TRUE);
			break;
		}

		/* Wipe recall for a monster */
		case 'W':
		{
			s16b r_idx = 0; 

			if (p_ptr->command_arg > 0)
			{
				r_idx = p_ptr->command_arg;
			}
			else
			{
				struct keypress sym;
				const char *prompt =
					"Wipe recall for [a]ll monsters or [s]pecific monster? ";

				if (!get_com(prompt, &sym)) return;

				if (sym.code == 'a' || sym.code == 'A')
				{
					int i;
					for (i = 1; i < z_info->r_max; i++)
					{
						r_ptr = &r_info[i];
						wipe_monster_lore(r_ptr, &l_list[i]);
					}
					break;
				}
				else if (sym.code == 's' || sym.code == 'S')
				{
					char name[80] = "";
					
					/* Avoid the prompt getting in the way */
					screen_save();

					/* Prompt */
					prt("Which monster? ", 0, 0);

					/* Get the name */
					if (askfor_aux(name, sizeof(name), NULL))
					{
						/* See if a r_idx was entered */
						r_idx = get_idx_from_name(name);
						
						/* If not, find the monster with that name */
						if (r_idx < 1)
							r_idx = lookup_monster(name); 
					}
					
					/* Reload the screen */
					screen_load();
				}
				else
				{
					/* Assume user aborts */
					break;
				}
			}

			/* Did we find a valid monster? */
			if (r_idx > 0)
			{
				r_ptr = &r_info[r_idx];
				wipe_monster_lore(r_ptr, &l_list[r_idx]);
			}
			else
				msg("No monster found.");
	
			break;
		}

		/* Increase Experience */
		case 'x':
		{
			if (p_ptr->command_arg)
			{
				player_exp_gain(p_ptr, p_ptr->command_arg);
			}
			else
			{
				player_exp_gain(p_ptr, p_ptr->exp + 1);
			}
			break;
		}

		/* Zap Monsters (Banishment) */
		case 'z':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = MAX_SIGHT;
			do_cmd_wiz_zap(p_ptr->command_arg);
			break;
		}

		/* Hack */
		case '_':
		{
			do_cmd_wiz_hack_ben();
			break;
		}

		/* Oops */
		default:
		{
			msg("That is not a valid debug command.");
			break;
		}
	}
}
Beispiel #2
0
/*
 * Ask for and parse a "debug command"
 *
 * The "p_ptr->command_arg" may have been set.
 */
void do_cmd_debug(void)
{
	int py = p_ptr->py;
	int px = p_ptr->px;

	char cmd;


	/* Get a "debug command" */
	if (!get_com("Debug Command: ", &cmd)) return;

	/* Analyze the command */
	switch (cmd)
	{
		/* Ignore */
		case ESCAPE:
		case ' ':
		case '\n':
		case '\r':
		{
			break;
		}

#ifdef ALLOW_SPOILERS

		/* Hack -- Generate Spoilers */
		case '"':
		{
			do_cmd_spoilers();
			break;
		}

#endif


		/* Hack -- Help */
		case '?':
		{
			do_cmd_wiz_help();
			break;
		}

		/* Cure all maladies */
		case 'a':
		{
			do_cmd_wiz_cure_all();
			break;
		}

		/* Teleport to target */
		case 'b':
		{
			do_cmd_wiz_bamf();
			break;
		}

		/* Create any object */
		case 'c':
		{
			wiz_create_item();
			break;
		}

		/* Create an artifact */
		case 'C':
		{
			if (p_ptr->command_arg > 0)
			{
				wiz_create_artifact(p_ptr->command_arg);
			}
			else
			{
				char name[80] = "";
				int a_idx = -1;

				/* Avoid the prompt getting in the way */
				screen_save();

				/* Prompt */
				prt("Create which artifact? ", 0, 0);

				/* Get the name */
				if (askfor_aux(name, sizeof(name), NULL))
				{
					/* See if an a_idx was entered */
					a_idx = get_idx_from_name(name);
					
					/* If not, find the artifact with that name */
					if (a_idx < 1)
						a_idx = lookup_artifact_name(name); 
					
					/* Did we find a valid artifact? */
					if (a_idx != -1)
						wiz_create_artifact(a_idx);
				}
				
				/* Reload the screen */
				screen_load();
			}
			break;
		}

		/* Detect everything */
		case 'd':
		{
			detect_all(TRUE);
			break;
		}

		/* Edit character */
		case 'e':
		{
			do_cmd_wiz_change();
			break;
		}

		case 'f':
		{
			stats_collect();
			break;
		}

		/* Good Objects */
		case 'g':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1;
			acquirement(py, px, p_ptr->depth, p_ptr->command_arg, FALSE);
			break;
		}

		/* Hitpoint rerating */
		case 'h':
		{
			do_cmd_rerate();
			break;
		}

		/* Identify */
		case 'i':
		{
			(void)ident_spell();
			break;
		}

		/* Go up or down in the dungeon */
		case 'j':
		{
			do_cmd_wiz_jump();
			break;
		}

		/* Learn about objects */
		case 'l':
		{
			do_cmd_wiz_learn();
			break;
		}

		/* Magic Mapping */
		case 'm':
		{
			map_area();
			break;
		}

		/* Summon Named Monster */
		case 'n':
		{
			if (p_ptr->command_arg > 0)
			{
				do_cmd_wiz_named(p_ptr->command_arg, TRUE);
			}
			else
			{
				char name[80] = "";
				s16b r_idx;

				/* Avoid the prompt getting in the way */
				screen_save();

				/* Prompt */
				prt("Summon which monster? ", 0, 0);

				/* Get the name */
				if (askfor_aux(name, sizeof(name), NULL))
				{
					/* See if a r_idx was entered */
					r_idx = get_idx_from_name(name);
					
					/* If not, find the monster with that name */
					if (r_idx < 1)
						r_idx = lookup_monster(name); 
					
					/* Did we find a valid monster? */
					if (r_idx != -1)
						do_cmd_wiz_named(r_idx, TRUE);
				}

				p_ptr->redraw |= (PR_MAP | PR_MONLIST);

				/* Reload the screen */
				screen_load();
			}

			break;
		}

		/* Object playing routines */
		case 'o':
		{
			do_cmd_wiz_play();
			break;
		}

		/* Phase Door */
		case 'p':
		{
			teleport_player(10);
			break;
		}

		/* Query the dungeon */
		case 'q':
		{
			do_cmd_wiz_query();
			break;
		}

		/* Summon Random Monster(s) */
		case 's':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1;
			do_cmd_wiz_summon(p_ptr->command_arg);
			break;
		}

		/* Teleport */
		case 't':
		{
			teleport_player(100);
			break;
		}

		/* Create a trap */
		case 'T':
		{
			cave_set_feat(p_ptr->py, p_ptr->px, FEAT_INVIS);
			break;
		}

		/* Un-hide all monsters */
		case 'u':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 255;
			do_cmd_wiz_unhide(p_ptr->command_arg);
			break;
		}

		/* Very Good Objects */
		case 'v':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1;
			acquirement(py, px, p_ptr->depth, p_ptr->command_arg, TRUE);
			break;
		}

		case 'V':
		{
			wiz_test_kind(p_ptr->command_arg);
			break;
		}

		/* Wizard Light the Level */
		case 'w':
		{
			wiz_light();
			break;
		}

		/* Increase Experience */
		case 'x':
		{
			if (p_ptr->command_arg)
			{
				gain_exp(p_ptr->command_arg);
			}
			else
			{
				gain_exp(p_ptr->exp + 1);
			}
			break;
		}

		/* Zap Monsters (Banishment) */
		case 'z':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = MAX_SIGHT;
			do_cmd_wiz_zap(p_ptr->command_arg);
			break;
		}

		/* Hack */
		case '_':
		{
			do_cmd_wiz_hack_ben();
			break;
		}

		/* Oops */
		default:
		{
			msg_print("That is not a valid debug command.");
			break;
		}
	}
}
/*
 * Ask for and parse a "debug command"
 *
 * The "p_ptr->command_arg" may have been set.
 */
void do_cmd_debug(void)
{
	int py = p_ptr->py;
	int px = p_ptr->px;

	char cmd;


	/* Get a "debug command" */
	if (!get_com("Debug Command: ", &cmd)) return;

	/* Analyze the command */
	switch (cmd)
	{
		/* Ignore */
		case ESCAPE:
		case ' ':
		case '\n':
		case '\r':
		{
			break;
		}

#ifdef ALLOW_SPOILERS

		/* Hack -- Generate Spoilers */
		case '"':
		{
			do_cmd_spoilers();
			break;
		}

#endif


		/* Hack -- Help */
		case '?':
		{
			do_cmd_help();
			break;
		}

		/* Cure all maladies */
		case 'a':
		{
			do_cmd_wiz_cure_all();
			break;
		}

		/* Teleport to target */
		case 'b':
		{
			do_cmd_wiz_bamf();
			break;
		}

		/* Create any object */
		case 'c':
		{
			wiz_create_item();
			break;
		}

		/* Create an artifact */
		case 'C':
		{
			wiz_create_artifact(p_ptr->command_arg);
			break;
		}

		/* Detect everything */
		case 'd':
		{
			detect_all();
			break;
		}

		/* Edit character */
		case 'e':
		{
			do_cmd_wiz_change();
			break;
		}

		/* View item info */
		case 'f':
		{
			(void)identify_fully();
			break;
		}

		/* Good Objects */
		case 'g':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1;
			acquirement(py, px, p_ptr->command_arg, FALSE);
			break;
		}

		/* Hitpoint rerating */
		case 'h':
		{
			do_cmd_rerate();
			break;
		}

		/* Identify */
		case 'i':
		{
			(void)ident_spell();
			break;
		}

		/* Go up or down in the dungeon */
		case 'j':
		{
			do_cmd_wiz_jump();
			break;
		}

		/* Self-Knowledge */
		case 'k':
		{
			self_knowledge();
			break;
		}

		/* Learn about objects */
		case 'l':
		{
			do_cmd_wiz_learn();
			break;
		}

		/* Magic Mapping */
		case 'm':
		{
			map_area();
			break;
		}

		/* Summon Named Monster */
		case 'n':
		{
			do_cmd_wiz_named(p_ptr->command_arg, TRUE);
			break;
		}

		/* Object playing routines */
		case 'o':
		{
			do_cmd_wiz_play();
			break;
		}

		/* Phase Door */
		case 'p':
		{
			teleport_player(10);
			break;
		}

		/* Query the dungeon */
		case 'q':
		{
			do_cmd_wiz_query();
			break;
		}

		/* Summon Random Monster(s) */
		case 's':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1;
			do_cmd_wiz_summon(p_ptr->command_arg);
			break;
		}

		/* Teleport */
		case 't':
		{
			teleport_player(100);
			break;
		}

		/* Un-hide all monsters */
		case 'u':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 255;
			do_cmd_wiz_unhide(p_ptr->command_arg);
			break;
		}

		/* Very Good Objects */
		case 'v':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1;
			acquirement(py, px, p_ptr->command_arg, TRUE);
			break;
		}

		/* Wizard Light the Level */
		case 'w':
		{
			wiz_lite();
			break;
		}

		/* Increase Experience */
		case 'x':
		{
			if (p_ptr->command_arg)
			{
				gain_exp(p_ptr->command_arg);
			}
			else
			{
				gain_exp(p_ptr->exp + 1);
			}
			break;
		}

		/* Zap Monsters (Genocide) */
		case 'z':
		{
			if (p_ptr->command_arg <= 0) p_ptr->command_arg = MAX_SIGHT;
			do_cmd_wiz_zap(p_ptr->command_arg);
			break;
		}

		/* Oops */
		default:
		{
			msg_print("That is not a valid debug command.");
			break;
		}
	}
}
WizardModeDialog::WizardModeDialog(void)
{
    int row = 0;

    // Paranoia
    if (!p_ptr->playing) return;

    if (!p_ptr->is_wizard)
    {
        QString prompt = color_string(QString ("<b><big>You are about to use 'Wizard Mode' commands.</big></b><br><br>"), TERM_RED);
        prompt.append("Wizard Mode contains many powerful 'cheat' commands.  ");
        prompt.append("Your savefile will be marked as a wizard mode character and will not be scored.<br><br>");
        prompt.append("Really use Wizard Mode?");
        if (!get_check(prompt)) return;
        p_ptr->is_wizard = TRUE;
    }

    main_prompt = new QLabel(QString("<b><big>Please select a command</big></b><br>"));
    main_prompt->setAlignment(Qt::AlignCenter);

    QPointer<QVBoxLayout> vlay = new QVBoxLayout;

    vlay->addWidget(main_prompt);

    // Add the player related commands
    QPointer<QGridLayout> wizard_layout = new QGridLayout;

    player_section = new QLabel("<b>Player commands</b>");
    player_section->setAlignment(Qt::AlignCenter);
    wizard_layout->addWidget(player_section, row, 1);

    row++;

    // Add the "cure all" button
    QPointer<QPushButton> heal_button = new QPushButton("Heal Player");
    heal_button->setToolTip("Completely heal and restore the player.");
    connect(heal_button, SIGNAL(clicked()), this, SLOT(wiz_cure_all()));
    wizard_layout->addWidget(heal_button, row, 0);

    // Add the "know all" button
    QPointer<QPushButton> know_button = new QPushButton("Know All");
    know_button->setToolTip("Know everything about every feature, object, and monster in the game.");
    connect(know_button, SIGNAL(clicked()), this, SLOT(wiz_know_all()));
    wizard_layout->addWidget(know_button, row, 1);

    // Add the "jump" button
    QPointer<QPushButton> jump_button = new QPushButton("Jump To New Level");
    jump_button->setToolTip("Allow the player to instantly jump to any level in the dungeon.");
    connect(jump_button, SIGNAL(clicked()), this, SLOT(wiz_jump()));
    wizard_layout->addWidget(jump_button, row, 2);

    row++;

    // Add the "teleport_to_target" button
    QPointer<QPushButton> teleport_target_button = new QPushButton("Teleport To Targeted Spot");
    teleport_target_button->setToolTip("Teleports the player to a specified spot on the dungeon level.");
    connect(teleport_target_button, SIGNAL(clicked()), this, SLOT(wiz_teleport_to_target()));
    wizard_layout->addWidget(teleport_target_button, row, 0);

    // Add the "phase door" button
    QPointer<QPushButton> phase_door = new QPushButton("Phase Door");
    phase_door->setToolTip("Teleports the player to a random spot up to 10 squares away.");
    connect(phase_door, SIGNAL(clicked()), this, SLOT(wiz_phase_door()));
    wizard_layout->addWidget(phase_door, row, 1);

    // Add the "teleport" button
    QPointer<QPushButton> teleport = new QPushButton("Teleport");
    teleport->setToolTip("Teleports the player to a random spot up to 100 squares away.");
    connect(teleport, SIGNAL(clicked()), this, SLOT(wiz_teleport()));
    wizard_layout->addWidget(teleport, row, 2);

    row++;

    // Add the "edit character" button
    QPointer<QPushButton> edit_character = new QPushButton("Edit Character");
    edit_character->setToolTip("Edit character statistics, experience, gold, and fame.");
    connect(edit_character, SIGNAL(clicked()), this, SLOT(wiz_edit_character()));
    wizard_layout->addWidget(edit_character, row, 0);

    // Add the "know all" button
    QPointer<QPushButton> spoil_button = new QPushButton("Print Spoilers");
    spoil_button->setToolTip("Print out Spoilers for all Monsters, objects, artifacts, and terrain.");
    connect(spoil_button, SIGNAL(clicked()), this, SLOT(wiz_print_spoilers()));
    wizard_layout->addWidget(spoil_button, row, 1);

    row++;

    // Add the dungeon commands
    dungeon_section = new QLabel("<b>Dungeon commands</b>");
    dungeon_section->setAlignment(Qt::AlignCenter);
    wizard_layout->addWidget(dungeon_section, row, 1);

    row++;

    // Add the "summon" button
    QPointer<QPushButton> summon_button = new QPushButton("Summon Monster");
    summon_button->setToolTip("Summon one random monster.");
    connect(summon_button, SIGNAL(clicked()), this, SLOT(wiz_summon()));
    wizard_layout->addWidget(summon_button, row, 0);

    // Add the "banish" button
    QPointer<QPushButton> banish_button = new QPushButton("Banish Monsters");
    banish_button->setToolTip("Erase all monsters within 30 squares of player, except for uniques and quest monsters.");
    connect(banish_button, SIGNAL(clicked()), this, SLOT(wiz_banish()));
    wizard_layout->addWidget(banish_button, row, 1);

    // Add the "detect all monsters" button
    QPointer<QPushButton> display_mon_button = new QPushButton("Detect All Monsters");
    display_mon_button->setToolTip("Detect all monsters on the level.");
    connect(display_mon_button, SIGNAL(clicked()), this, SLOT(wiz_detect_all_monsters()));
    wizard_layout->addWidget(display_mon_button, row, 2);

    row++;

    // Add the "detection" button
    QPointer<QPushButton> detection = new QPushButton("Detection");
    detection->setToolTip("Cast the 'Detection' spell");
    connect(detection, SIGNAL(clicked()), this, SLOT(wiz_detection()));
    wizard_layout->addWidget(detection, row, 0);

    // Add the "magic mapping" button
    QPointer<QPushButton> magic_mapping = new QPushButton("Magic Mapping");
    magic_mapping->setToolTip("Cast the 'Magic Mapping' spell.");
    connect(magic_mapping, SIGNAL(clicked()), this, SLOT(wiz_magic_mapping()));
    wizard_layout->addWidget(magic_mapping, row, 1);

    // Add the "light dungeon" button
    QPointer<QPushButton> dungeon_light = new QPushButton("Light Dungeon");
    dungeon_light->setToolTip("Illuminate the entire dungeon level.");
    connect(dungeon_light, SIGNAL(clicked()), this, SLOT(wiz_level_light()));
    wizard_layout->addWidget(dungeon_light, row, 2);

    row++;

    // Add the "redraw dungeon" button
    QPointer<QPushButton> redraw_dungeon = new QPushButton("Redraw Dungeon");
    redraw_dungeon->setToolTip("Redraw a new dungeon level at the current depth.");
    connect(redraw_dungeon, SIGNAL(clicked()), this, SLOT(wiz_redraw_dungeon()));
    wizard_layout->addWidget(redraw_dungeon, row, 0);

    // Add the "make monster" button
    QPointer<QPushButton> make_monster = new QPushButton("Make Monster");
    make_monster->setToolTip("Attempt to make a monster of a specified monster race.");
    connect(make_monster, SIGNAL(clicked()), this, SLOT(wiz_create_monster()));
    wizard_layout->addWidget(make_monster, row, 1);

    // Add the "make feature" button
    QPointer<QPushButton> make_feature = new QPushButton("Make Feature");
    make_feature->setToolTip("Attempt to make a specified feature type.");
    connect(make_feature, SIGNAL(clicked()), this, SLOT(wiz_create_feature()));
    wizard_layout->addWidget(make_feature, row, 2);

    row++;

    // Add the object commands
    object_section = new QLabel("<b>Object commands</b>");
    object_section->setAlignment(Qt::AlignCenter);
    wizard_layout->addWidget(object_section, row, 1);

    row++;

    // Add the "mass create items" button
    QPointer<QPushButton> mass_create_items_button = new QPushButton("Create 25 Random Items");
    mass_create_items_button->setToolTip("Drop 25 randomly generated objects around the player.");
    connect(mass_create_items_button , SIGNAL(clicked()), this, SLOT(wiz_mass_create_items()));
    wizard_layout->addWidget(mass_create_items_button, row, 0);

    // Add the "create 1 random good item" button
    QPointer<QPushButton> create_good_item = new QPushButton("Create 1 Random Good Item");
    create_good_item->setToolTip("Drop one randomly created guaranteed good item by the player.");
    connect(create_good_item , SIGNAL(clicked()), this, SLOT(wiz_create_good_item()));
    wizard_layout->addWidget(create_good_item, row, 1);

    // Add the "create 1 random great item" button
    QPointer<QPushButton> create_great_item = new QPushButton("Create 1 Random Great Item");
    create_great_item->setToolTip("Drop one randomly created guaranteed great item by the player.");
    connect(create_great_item , SIGNAL(clicked()), this, SLOT(wiz_create_great_item()));
    wizard_layout->addWidget(create_great_item, row, 2);

    row++;

    // Add the "mass identify" button
    QPointer<QPushButton> mass_identify = new QPushButton("Mass Identify");
    mass_identify->setToolTip("Identify all objects the player has, as well as all objects within 5 squares.");
    connect(mass_identify, SIGNAL(clicked()), this, SLOT(wiz_mass_identify_items()));
    wizard_layout->addWidget(mass_identify, row, 0);

    // Add the "winner's kit" button
    QPointer<QPushButton> winners_kit = new QPushButton("Winner's kit");
    winners_kit->setToolTip("Create a set of artifacts suitable for winning the game.");
    connect(winners_kit, SIGNAL(clicked()), this, SLOT(wiz_winners_kit()));
    wizard_layout->addWidget(winners_kit, row, 1);

    // Add the "edit object" button
    QPointer<QPushButton> edit_object = new QPushButton("Edit Object");
    edit_object->setToolTip("Edit a non-artifact object.");
    connect(edit_object, SIGNAL(clicked()), this, SLOT(wiz_edit_object()));
    wizard_layout->addWidget(edit_object, row, 2);

    row++;

    // Add the "make artifact" button
    QPointer<QPushButton> create_artifact = new QPushButton("Create artifact");
    create_artifact->setToolTip("Create an artifact.");
    connect(create_artifact, SIGNAL(clicked()), this, SLOT(wiz_create_artifact()));
    wizard_layout->addWidget(create_artifact, row, 0);

    // Add the "make objecct" button
    QPointer<QPushButton> create_object = new QPushButton("Create object");
    create_object->setToolTip("Create a normal object.");
    connect(create_object, SIGNAL(clicked()), this, SLOT(wiz_create_object()));
    wizard_layout->addWidget(create_object, row, 1);

    vlay->addLayout(wizard_layout);

    buttons = new QDialogButtonBox(QDialogButtonBox::Cancel);
    connect(buttons, SIGNAL(rejected()), this, SLOT(close()));
    vlay->addStretch();
    vlay->addWidget(buttons);

    setLayout(vlay);
    setWindowTitle(tr("Wizard Mode Menu"));

    this->exec();
}