OSDN Git Service

[Refactor] #2734 Habu氏のコメントに従い、不要な判定を1つ削除し、FixedArtifactId::NONE を引数に取っていたものをis_fixed...
authorHourier <66951241+Hourier@users.noreply.github.com>
Sat, 29 Oct 2022 05:28:49 +0000 (14:28 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Sat, 29 Oct 2022 06:43:42 +0000 (15:43 +0900)
src/monster-floor/special-death-switcher.cpp
src/wizard/wizard-item-modifier.cpp

index 7033c9a..96c6724 100644 (file)
@@ -376,7 +376,7 @@ static void on_dead_random_artifact(PlayerType *player_ptr, monster_death_type *
             break;
         }
 
-        if (!q_ptr->is_specific_artifact(FixedArtifactId::NONE) && q_ptr->is_ego()) {
+        if (q_ptr->is_ego()) {
             continue;
         }
 
index 8c6a2af..7fca362 100644 (file)
@@ -1059,12 +1059,10 @@ WishResultType do_cmd_wishing(PlayerType *player_ptr, int prob, bool allow_art,
 
         if (wish_randart) {
             if (must || ok_art) {
-                bool is_fixed_artifact;
                 do {
                     o_ptr->prep(k_idx);
                     ItemMagicApplier(player_ptr, o_ptr, k_ptr->level, AM_SPECIAL | AM_NO_FIXED_ART).execute();
-                    is_fixed_artifact = !o_ptr->is_specific_artifact(FixedArtifactId::NONE);
-                } while (!o_ptr->art_name || is_fixed_artifact || o_ptr->is_ego() || o_ptr->is_cursed());
+                } while (!o_ptr->art_name || o_ptr->is_ego() || o_ptr->is_cursed());
 
                 if (o_ptr->art_name) {
                     drop_near(player_ptr, o_ptr, -1, player_ptr->y, player_ptr->x);
@@ -1088,8 +1086,7 @@ WishResultType do_cmd_wishing(PlayerType *player_ptr, int prob, bool allow_art,
                     for (i = 0; i < max_roll; i++) {
                         o_ptr->prep(k_idx);
                         ItemMagicApplier(player_ptr, o_ptr, k_ptr->level, AM_GREAT | AM_NO_FIXED_ART).execute();
-                        const auto is_fixed_artifact = !o_ptr->is_specific_artifact(FixedArtifactId::NONE);
-                        if (is_fixed_artifact || o_ptr->art_name) {
+                        if (o_ptr->art_name) {
                             continue;
                         }