OSDN Git Service

アーティファクト生成の巻物での対象アイテム選択時に, 未鑑定のエゴや
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 13 Jun 2003 15:02:21 +0000 (15:02 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 13 Jun 2003 15:02:21 +0000 (15:02 +0000)
アーティファクトは選べるようにして, 元からエゴやアーティファクトだっ
た場合に強化に失敗するコードが機能するようにした.

src/spells3.c

index bac8aab..c16c358 100644 (file)
@@ -2143,9 +2143,6 @@ bool item_tester_hook_weapon_armour(object_type *o_ptr)
  */
 static bool item_tester_hook_nameless_weapon_armour(object_type *o_ptr)
 {
-       if (o_ptr->name1 || o_ptr->art_name || o_ptr->name2 || o_ptr->xtra3)
-               return FALSE;
-
        switch (o_ptr->tval)
        {
                case TV_SWORD:
@@ -2165,12 +2162,14 @@ static bool item_tester_hook_nameless_weapon_armour(object_type *o_ptr)
                case TV_HELM:
                case TV_BOOTS:
                case TV_GLOVES:
-               {
-                       return (TRUE);
-               }
+                       if (o_ptr->name1 || o_ptr->art_name || o_ptr->name2 || o_ptr->xtra3)
+                       {
+                               if (object_known_p(o_ptr)) return FALSE;
+                       }
+                       return TRUE;
        }
 
-       return (FALSE);
+       return FALSE;
 }
 
 
@@ -2415,8 +2414,8 @@ bool artifact_scroll(void)
 
        /* Get an item */
 #ifdef JP
-q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò¶¯²½¤·¤Þ¤¹¤«? ";
-s = "¶¯²½¤Ç¤­¤ë¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
+       q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò¶¯²½¤·¤Þ¤¹¤«? ";
+       s = "¶¯²½¤Ç¤­¤ë¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
 #else
        q = "Enchant which item? ";
        s = "You have nothing to enchant.";
@@ -2442,7 +2441,7 @@ s = "
 
        /* Describe */
 #ifdef JP
-msg_format("%s ¤ÏâÁ¤¤¸÷¤òȯ¤·¤¿¡ª",o_name);
+       msg_format("%s ¤ÏâÁ¤¤¸÷¤òȯ¤·¤¿¡ª",o_name);
 #else
        msg_format("%s %s radiate%s a blinding light!",
                  ((item >= 0) ? "Your" : "The"), o_name,
@@ -2452,8 +2451,7 @@ msg_format("%s 
        if (o_ptr->name1 || o_ptr->art_name)
        {
 #ifdef JP
-msg_format("%s¤Ï´û¤ËÅÁÀâ¤Î¥¢¥¤¥Æ¥à¤Ç¤¹¡ª",
-    o_name  );
+               msg_format("%s¤Ï´û¤ËÅÁÀâ¤Î¥¢¥¤¥Æ¥à¤Ç¤¹¡ª", o_name  );
 #else
                msg_format("The %s %s already %s!",
                    o_name, ((o_ptr->number > 1) ? "are" : "is"),
@@ -2466,8 +2464,7 @@ msg_format("%s
        else if (o_ptr->name2)
        {
 #ifdef JP
-msg_format("%s¤Ï´û¤Ë̾¤Î¤¢¤ë¥¢¥¤¥Æ¥à¤Ç¤¹¡ª",
-    o_name );
+               msg_format("%s¤Ï´û¤Ë̾¤Î¤¢¤ë¥¢¥¤¥Æ¥à¤Ç¤¹¡ª", o_name );
 #else
                msg_format("The %s %s already %s!",
                    o_name, ((o_ptr->number > 1) ? "are" : "is"),
@@ -2480,8 +2477,7 @@ msg_format("%s
        else if (o_ptr->xtra3)
        {
 #ifdef JP
-msg_format("%s¤Ï´û¤Ë¶¯²½¤µ¤ì¤Æ¤¤¤Þ¤¹¡ª",
-    o_name );
+               msg_format("%s¤Ï´û¤Ë¶¯²½¤µ¤ì¤Æ¤¤¤Þ¤¹¡ª", o_name );
 #else
                msg_format("The %s %s already %s!",
                    o_name, ((o_ptr->number > 1) ? "are" : "is"),
@@ -2494,8 +2490,8 @@ msg_format("%s
                if (o_ptr->number > 1)
                {
 #ifdef JP
-msg_print("Ê£¿ô¤Î¥¢¥¤¥Æ¥à¤ËËâË¡¤ò¤«¤±¤ë¤À¤±¤Î¥¨¥Í¥ë¥®¡¼¤Ï¤¢¤ê¤Þ¤»¤ó¡ª");
-msg_format("%d ¸Ä¤Î%s¤¬²õ¤ì¤¿¡ª",(o_ptr->number)-1, o_name);
+                       msg_print("Ê£¿ô¤Î¥¢¥¤¥Æ¥à¤ËËâË¡¤ò¤«¤±¤ë¤À¤±¤Î¥¨¥Í¥ë¥®¡¼¤Ï¤¢¤ê¤Þ¤»¤ó¡ª");
+                       msg_format("%d ¸Ä¤Î%s¤¬²õ¤ì¤¿¡ª",(o_ptr->number)-1, o_name);
 #else
                        msg_print("Not enough enough energy to enchant more than one object!");
                        msg_format("%d of your %s %s destroyed!",(o_ptr->number)-1, o_name, (o_ptr->number>2?"were":"was"));
@@ -2521,7 +2517,7 @@ msg_format("%d 
 
                /* Message */
 #ifdef JP
-msg_print("¶¯²½¤Ë¼ºÇÔ¤·¤¿¡£");
+               msg_print("¶¯²½¤Ë¼ºÇÔ¤·¤¿¡£");
 #else
                msg_print("The enchantment failed.");
 #endif