From: deskull Date: Sat, 10 Nov 2012 23:55:47 +0000 (+0000) Subject: ウィザードモードの固定アーティファクト生成処理を修正。 X-Git-Tag: v2.1.2~237 X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=6fff81d35fc850c5bda23afe6e156c73cd015bd0 ウィザードモードの固定アーティファクト生成処理を修正。 --- diff --git a/src/wizard2.c b/src/wizard2.c index 31a7b2955..1d93ee8bf 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -118,8 +118,19 @@ static bool wiz_dimension_door(void) * Create the artifact of the specified number -- DAN * */ -static void wiz_create_named_art(int a_idx) +static void wiz_create_named_art(void) { + char tmp_val[80]; + int a_idx; + + /* Query */ + if (!get_string("Artifact ID:", tmp_val, 3)) return; + + /* Extract */ + a_idx = atoi(tmp_val); + if(a_idx < 0) a_idx = 0; + if(a_idx >= max_a_idx) a_idx = 0; + /* Create the artifact */ (void)create_named_art(a_idx, py, px); @@ -1928,7 +1939,7 @@ void do_cmd_debug(void) /* Create a named artifact */ case 'C': - wiz_create_named_art(command_arg); + wiz_create_named_art(); break; /* Detect everything */