OSDN Git Service

[Feature] #39581 広域マップでは変異による武器ドロップ処理が起こらないよう変更.当該処理を drop_weapons() に分離. / In wild...
[hengband/hengband.git] / src / wizard2.c
index 33d07b0..9c88427 100644 (file)
@@ -72,11 +72,12 @@ typedef struct debug_spell_command
        spell_functions command_function;
 } debug_spell_command;
 
-#define SPELL_MAX 2
+#define SPELL_MAX 3
 debug_spell_command debug_spell_commands_list[SPELL_MAX] =
 {
        { 2, "vanish dungeon", {.spell2 = { vanish_dungeon } } },
-       { 3, "true healing", {.spell3 = { true_healing } } }
+       { 3, "true healing", {.spell3 = { true_healing } } },
+       { 2, "drop weapons", {.spell2 = { drop_weapons } } }
 };
 
 /*!
@@ -88,7 +89,7 @@ static bool do_cmd_debug_spell(player_type *creature_ptr)
        char tmp_val[50] = "\0";
        int tmp_int;
 
-       if (!get_string("SPELL:", tmp_val, 32)) return FALSE;
+       if (!get_string("SPELL: ", tmp_val, 32)) return FALSE;
 
        for (int i = 0; i < SPELL_MAX; i++)
        {
@@ -98,18 +99,22 @@ static bool do_cmd_debug_spell(player_type *creature_ptr)
                {
                case 2:
                        (*(debug_spell_commands_list[i].command_function.spell2.spell_function))(creature_ptr);
+                       return TRUE;
                        break;
                case 3:
                        tmp_val[0] = '\0';
                        if (!get_string("POWER:", tmp_val, 32)) return FALSE;
                        tmp_int = atoi(tmp_val);
                        (*(debug_spell_commands_list[i].command_function.spell3.spell_function))(creature_ptr, tmp_int);
+                       return TRUE;
                        break;
                default:
                        break;
                }
        }
 
+       msg_format("Command not found.");
+
        return FALSE;
 }