OSDN Git Service

匠魔法 "武器属性付与" の詠唱にはどちらかの手に武器が必要とした. また,
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 19 Sep 2003 14:30:07 +0000 (14:30 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 19 Sep 2003 14:30:07 +0000 (14:30 +0000)
武器を外すと効果が切れるようにした.

src/effects.c
src/object2.c
src/spellstips.h

index 8b272ed..c842898 100644 (file)
@@ -5770,6 +5770,16 @@ bool choose_ele_attack(void)
 
        char choice;
 
+       if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+       {
+#ifdef JP
+               msg_format("Éð´ï¤ò»ý¤¿¤Ê¤¤¤ÈËâË¡·õ¤Ï»È¤¨¤Ê¤¤¡£");
+#else
+               msg_format("You cannot use temporary branding with no weapon.");
+#endif
+               return FALSE;
+       }
+
        /* Save screen */
        screen_save();
 
index 08664fc..7eec5e7 100644 (file)
@@ -5471,6 +5471,19 @@ void inven_item_increase(int item, int num)
 
                /* Window stuff */
                p_ptr->window |= (PW_INVEN | PW_EQUIP);
+
+               /* Hack -- Clear temporary elemental brands if player takes off weapons */
+               if (!o_ptr->number && p_ptr->ele_attack)
+               {
+                       if ((item == INVEN_RARM) || (item == INVEN_LARM))
+                       {
+                               if (!buki_motteruka(INVEN_RARM + INVEN_LARM - item))
+                               {
+                                       /* Clear all temporary elemental brands */
+                                       set_ele_attack(0, 0);
+                               }
+                       }
+               }
        }
 }
 
index 0745483..88b0141 100644 (file)
@@ -284,7 +284,7 @@ static cptr spell_tips[VALID_REALM][32] =
                "¸½ºß¤Î¼«Ê¬¤Î¾õÂÖ¤ò´°Á´¤ËÃΤ롣",
                "¼Ù°­¤Ê¥â¥ó¥¹¥¿¡¼¤Î¹¶·â¤òËɤ°¥Ð¥ê¥¢¤òÄ¥¤ë¡£",
                "ÆÇ¡¢Û¯Û°¾õÂÖ¡¢Éé½ý¤òÁ´²÷¤µ¤»¡¢¸¸³Ð¤òľ¤¹¡£",
-               "°ìÄê»þ´Ö¡¢Éð´ï¤ËÎ䵤¡¢±ê¡¢ÅÅ·â¡¢»À¡¢ÆǤΤ¤¤º¤ì¤«¤Î°À­¤ò¤Ä¤±¤ë¡£",
+               "°ìÄê»þ´Ö¡¢Éð´ï¤ËÎ䵤¡¢±ê¡¢ÅÅ·â¡¢»À¡¢ÆǤΤ¤¤º¤ì¤«¤Î°À­¤ò¤Ä¤±¤ë¡£Éð´ï¤ò»ý¤¿¤Ê¤¤¤È»È¤¨¤Ê¤¤¡£",
 
                "°ìÄê»þ´Ö¡¢¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤòÆÀ¤ë¡£",
                "°ìÄê»þ´Ö¡¢AC¤ò¾å¾º¤µ¤»¤ë¡£",
@@ -743,7 +743,7 @@ static cptr spell_tips[VALID_REALM][32] =
                "Gives you useful info regarding your current resistances, the powers of your weapon and maximum limits of your stats.",
                "Gives aura which protect you from evil monster's physical attack.",
                "Heals poison, stun, cut and hallucination completely.",
-               "Makes current weapon some elemental branded.",
+               "Makes current weapon some elemental branded. You must wield weapons.",
 
                "Gives telepathy for a while.",
                "Gives bonus to AC for a while.",