OSDN Git Service

[Fix] +2以上の追加攻撃の鍛冶ができてしまう
authorHabu <habu1010+github@gmail.com>
Tue, 14 Sep 2021 21:38:39 +0000 (06:38 +0900)
committerHabu <habu1010+github@gmail.com>
Tue, 14 Sep 2021 21:41:16 +0000 (06:41 +0900)
リファクタリング時にpvalの判定の位置を誤ったため、追加攻撃の
エッセンスを付与する時に個数を選べるようになってしまっていた。
そもそも数値の制限が必要かどうかをインターフェース処理側で
行っている設計がおかしいがそれは今後の課題とし、ひとまず
追加攻撃を付与する時はpvalが1に制限されるようにする。

src/mind/mind-weaponsmith.cpp

index f8fe4a4..b286fbc 100644 (file)
@@ -471,8 +471,8 @@ static void add_essence(player_type *player_ptr, SmithCategory mode)
         if (o_ptr->pval < 0) {
             msg_print(_("このアイテムの能力修正を強化することはできない。", "You cannot increase magic number of this item."));
             return;
-        } else if (effect_flags.has(TR_BLOWS) && o_ptr->pval > 1) {
-            if (!get_check(_("修正値は1になります。よろしいですか?", "The magic number of this weapon will become 1. Are you sure? "))) {
+        } else if (effect_flags.has(TR_BLOWS)) {
+            if ((o_ptr->pval > 1) && !get_check(_("修正値は1になります。よろしいですか?", "The magic number of this weapon will become 1. Are you sure? "))) {
                 return;
             }
             o_ptr->pval = 1;