OSDN Git Service

[Fix] #40013 monster_death() 中の固定アーティファクトドロップ処理が、配列の最後しか反映されない不具合を修正. / Fix the bug...
authordeskull <deskull@users.sourceforge.jp>
Mon, 10 Feb 2020 16:13:00 +0000 (01:13 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 10 Feb 2020 16:13:00 +0000 (01:13 +0900)
src/monster1.c

index f7fbf5d..bedde77 100644 (file)
@@ -2608,21 +2608,20 @@ void monster_death(player_type *player_ptr, MONSTER_IDX m_idx, bool drop_item)
                        if (!r_ptr->artifact_id[i]) break;
                        a_idx = r_ptr->artifact_id[i];
                        chance = r_ptr->artifact_percent[i];
-               }
-
-               if ((a_idx > 0) && ((randint0(100) < chance) || current_world_ptr->wizard))
-               {
-                       artifact_type *a_ptr = &a_info[a_idx];
-                       if (!a_ptr->cur_num)
+                       if (randint0(100) < chance || current_world_ptr->wizard)
                        {
-                               if (create_named_art(player_ptr, a_idx, y, x))
-                               {
-                                       a_ptr->cur_num = 1;
-                                       if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
-                               }
-                               else if (!preserve_mode)
+                               artifact_type *a_ptr = &a_info[a_idx];
+                               if (!a_ptr->cur_num)
                                {
-                                       a_ptr->cur_num = 1;
+                                       if (create_named_art(player_ptr, a_idx, y, x))
+                                       {
+                                               a_ptr->cur_num = 1;
+                                               if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
+                                       }
+                                       else if (!preserve_mode)
+                                       {
+                                               a_ptr->cur_num = 1;
+                                       }
                                }
                        }
                }