OSDN Git Service

鍛冶師コマンドに関する修正と変更.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 23 Jun 2003 14:52:03 +0000 (14:52 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 23 Jun 2003 14:52:03 +0000 (14:52 +0000)
* 負のpvalのアイテムにpval能力のエッセンスを付加すると, 逆にエッセン
  スを得ていたバグを修正.
* 追加攻撃のエッセンス付加時に必要なエッセンスが表示されないバグを修
  正.
* 負のpval能力のアイテムにエッセンスを付加する場合はpval==0の場合と同
  様に数値指定入力とし, 負の値を修復するためには普通に強化するのと同
  等のエッセンスを消費するものとした.
* 負のpvalの武器に追加攻撃のエッセンスを付加した場合は1-pval倍の追加
  攻撃のエッセンスを消費するように変更.

src/object2.c

index 9e8e7f6..6f33425 100644 (file)
@@ -7957,11 +7957,11 @@ static void add_essence(int mode)
 #ifdef JP
                msg_print("¤½¤Î¥¢¥¤¥Æ¥à¤Ï¤³¤ì°Ê¾å²þÎɤǤ­¤Ê¤¤¡£");
 #else
-               msg_print("This item is no more able to be improved");
+               msg_print("This item is no more able to be improved.");
 #endif
                return;
        }
-       
+
        object_desc(o_name, o_ptr, FALSE, 0);
 
        use_essence = es_ptr->value;
@@ -8000,15 +8000,23 @@ static void add_essence(int mode)
                                        if (!get_check("The magic number of this weapon will become 1. Are you sure? ")) return;
 #endif
                                }
+
+                               /* Hack -- Negative pval takes more essence */
+                               use_essence *= 1 - ((o_ptr->pval >= 0) ? 0 : o_ptr->pval);
                                o_ptr->pval = 1;
+#ifdef JP
+                               msg_format("¥¨¥Ã¥»¥ó¥¹¤ò%d¸Ä»ÈÍѤ·¤Þ¤¹¡£", use_essence);
+#else
+                               msg_format("It will take %d essences.", use_essence);
+#endif
                        }
-                       else if (o_ptr->pval)
+                       else if (o_ptr->pval > 0)
                        {
                                use_essence *= o_ptr->pval;
 #ifdef JP
-                               msg_format("¥¨¥Ã¥»¥ó¥¹¤ò%d¸Ä»ÈÍѤ·¤Þ¤¹¡£",use_essence);
+                               msg_format("¥¨¥Ã¥»¥ó¥¹¤ò%d¸Ä»ÈÍѤ·¤Þ¤¹¡£", use_essence);
 #else
-                               msg_format("It will take %d essences.",use_essence);
+                               msg_format("It will take %d essences.", use_essence);
 #endif
                        }
                        else
@@ -8018,7 +8026,7 @@ static void add_essence(int mode)
                                int pval;
                                int limit = MIN(5, p_ptr->magic_num1[es_ptr->essence]/es_ptr->value);
 
-
+                               if (o_ptr->pval < 0) limit -= o_ptr->pval;
 #ifdef JP
                                sprintf(tmp, "¤¤¤¯¤ÄÉղä·¤Þ¤¹¤«¡© (1-%d): ", limit);
 #else
@@ -8030,14 +8038,15 @@ static void add_essence(int mode)
                                pval = atoi(tmp_val);
                                if (pval > limit) pval = limit;
                                else if (pval < 1) pval = 1;
-                               o_ptr->pval = pval;
+                               o_ptr->pval += pval;
                                use_essence *= pval;
 #ifdef JP
-                               msg_format("¥¨¥Ã¥»¥ó¥¹¤ò%d¸Ä»ÈÍѤ·¤Þ¤¹¡£",use_essence);
+                               msg_format("¥¨¥Ã¥»¥ó¥¹¤ò%d¸Ä»ÈÍѤ·¤Þ¤¹¡£", use_essence);
 #else
-                               msg_format("It will take %d essences.",use_essence);
+                               msg_format("It will take %d essences.", use_essence);
 #endif
                        }
+
                        if (p_ptr->magic_num1[es_ptr->essence] < use_essence)
                        {
 #ifdef JP
@@ -8295,7 +8304,7 @@ static void erase_essence(void)
 #ifdef JP
        msg_print("¥¨¥Ã¥»¥ó¥¹¤ò¼è¤êµî¤Ã¤¿¡£");
 #else
-       msg_print("You removed all essence you have added");
+       msg_print("You removed all essence you have added.");
 #endif
 
        /* Combine the pack */