OSDN Git Service

自動破壊の自動登録で、アーティファクトとわかっているアイテムまでも登録してしまっていたのを修正。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 24 Oct 2003 05:12:47 +0000 (05:12 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 24 Oct 2003 05:12:47 +0000 (05:12 +0000)
src/autopick.c

index 9a358c2..559102b 100644 (file)
@@ -1854,6 +1854,28 @@ bool add_auto_register(object_type *o_ptr)
                return FALSE;
        }
 
+       /* Known to be an artifact? */
+       if ((object_known_p(o_ptr) &&
+            (artifact_p(o_ptr) || o_ptr->art_name)) ||
+           ((o_ptr->ident & IDENT_SENSE) &&
+            (o_ptr->feeling == FEEL_TERRIBLE || o_ptr->feeling == FEEL_SPECIAL)))
+       {
+               char o_name[MAX_NLEN];
+
+               /* Describe the object (with {terrible/special}) */
+               object_desc(o_name, o_ptr, TRUE, 3);
+
+               /* Message */
+#ifdef JP
+               msg_format("%s¤ÏÇ˲õÉÔǽ¤À¡£", o_name);
+#else
+               msg_format("You cannot auto-destroy %s.", o_name);
+#endif
+
+               /* Done */
+               return FALSE;
+       }
+
 
        if (!p_ptr->autopick_autoregister)
        {