X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fwizard2.c;h=6447a8140226bdcabf3533aba6b3aa471cdd70a5;hb=188c10b7dbb06a2056389287c0bee57fca88cbaf;hp=de188940ade2d144d9f649e6fe35781ff6f9cc68;hpb=653d8976ecfd907669425dd405ef613db7458fc3;p=hengband%2Fhengband.git diff --git a/src/wizard2.c b/src/wizard2.c index de188940a..6447a8140 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -111,6 +111,36 @@ static bool wiz_dimension_door(void) /*! + * @brief プレイ日数を変更する / Set gametime. + * @return 実際に変更を行ったらTRUEを返す + */ +static bool set_gametime(void) +{ + int tmp_int = 0; + char ppp[80], tmp_val[40]; + + /* Prompt */ + sprintf(ppp, "Dungeon Turn (0-%d): ", dungeon_turn_limit); + + /* Default */ + sprintf(tmp_val, "%d", dungeon_turn); + + /* Query */ + if (!get_string(ppp, tmp_val, 10)) return (FALSE); + + /* Extract */ + tmp_int = atoi(tmp_val); + + /* Verify */ + if (tmp_int >= dungeon_turn_limit) tmp_int = dungeon_turn_limit - 1; + else if (tmp_int < 0) tmp_int = 0; + dungeon_turn = turn = tmp_int; + return (TRUE); + +} + + +/*! * @brief 指定されたIDの固定アーティファクトを生成する / Create the artifact of the specified number * @return なし */ @@ -1908,10 +1938,9 @@ extern void do_cmd_debug(void); */ void do_cmd_debug(void) { - int x, y, i; + int x, y; char cmd; - /* Get a "debug command" */ get_com("Debug Command: ", &cmd, FALSE); @@ -2129,6 +2158,12 @@ void do_cmd_debug(void) teleport_player(100, 0L); break; + /* Game Time Setting */ + case 'T': + set_gametime(); + break; + + /* Very Good Objects */ case 'v': if (command_arg <= 0) command_arg = 1;