From 8413ccb3df463baf7127336cb87a148d1094bced Mon Sep 17 00:00:00 2001 From: nothere Date: Tue, 16 Dec 2003 05:12:14 +0000 Subject: [PATCH] =?utf8?q?=E3=82=A2=E3=83=BC=E3=83=86=E3=82=A3=E3=83=95?= =?utf8?q?=E3=82=A1=E3=82=AF=E3=83=88=E7=94=9F=E6=88=90=E6=99=82=E3=81=AB?= =?utf8?q?=E6=96=87=E5=AD=97=E5=88=97=E3=82=92=E5=85=A5=E3=82=8C=E3=81=9A?= =?utf8?q?=E3=81=ABEnter=E3=82=92=E6=8A=BC=E3=81=97=E3=81=9F=E5=A0=B4?= =?utf8?q?=E5=90=88=E3=81=AFESC=E3=82=92=E6=8A=BC=E3=81=97=20=E3=81=A6?= =?utf8?q?=E3=82=AD=E3=83=A3=E3=83=B3=E3=82=BB=E3=83=AB=E3=81=97=E3=81=9F?= =?utf8?q?=E6=99=82=E5=90=8C=E6=A7=98=E3=81=AB=E3=83=A9=E3=83=B3=E3=83=80?= =?utf8?q?=E3=83=A0=E9=8A=98=E3=81=AB=E3=81=AA=E3=82=8B=E3=82=88=E3=81=86?= =?utf8?q?=E3=81=AB=E5=A4=89=E6=9B=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/artifact.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/artifact.c b/src/artifact.c index 0c7e6e778..13dbafee4 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1901,7 +1901,8 @@ bool create_artifact(object_type *o_ptr, bool a_scroll) if (a_scroll) { - char dummy_name[80]; + char dummy_name[80] = ""; + /* Identify it fully */ object_aware(o_ptr); object_known(o_ptr); @@ -1909,38 +1910,33 @@ bool create_artifact(object_type *o_ptr, bool a_scroll) /* Mark the item as fully known */ o_ptr->ident |= (IDENT_MENTAL); - strcpy(dummy_name, ""); (void)screen_object(o_ptr, TRUE); #ifdef JP - if (!(get_string("¤³¤Î¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤ò²¿¤È̾ÉÕ¤±¤Þ¤¹¤«¡©", dummy_name, 80))) + if (get_string("¤³¤Î¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤ò²¿¤È̾ÉÕ¤±¤Þ¤¹¤«¡©", dummy_name, sizeof dummy_name) && dummy_name[0]) #else - if (!(get_string("What do you want to call the artifact? ", dummy_name, 80))) + if (get_string("What do you want to call the artifact? ", dummy_name, sizeof dummy_name) && dummy_name[0]) #endif - - { - get_random_name(new_name, object_is_armour(o_ptr), power_level); - } - else { #ifdef JP strcpy(new_name, "¡Ô"); #else strcpy(new_name, "'"); #endif - strcat(new_name, dummy_name); #ifdef JP strcat(new_name, "¡Õ¤È¤¤¤¦Ì¾¤Î"); #else strcat(new_name, "'"); #endif - + } + else + { + get_random_name(new_name, object_is_armour(o_ptr), power_level); } chg_virtue(V_INDIVIDUALISM, 2); chg_virtue(V_ENCHANT, 5); - } else { @@ -1949,20 +1945,13 @@ bool create_artifact(object_type *o_ptr, bool a_scroll) if (cheat_xtra) { - if (artifact_bias) #ifdef JP -msg_format("±¿¤ÎÊФä¿¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È: %d¡£", artifact_bias); + if (artifact_bias) msg_format("±¿¤ÎÊФä¿¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È: %d¡£", artifact_bias); + else msg_print("¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Ë±¿¤ÎÊФê¤Ê¤·¡£"); #else - msg_format("Biased artifact: %d.", artifact_bias); + if (artifact_bias) msg_format("Biased artifact: %d.", artifact_bias); + else msg_print("No bias in artifact."); #endif - - else -#ifdef JP -msg_print("¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Ë±¿¤ÎÊФê¤Ê¤·¡£"); -#else - msg_print("No bias in artifact."); -#endif - } /* Save the inscription */ -- 2.11.0