OSDN Git Service

[Refactor] ダンジョンのモンスター出現フィルターに出現数関連フラグ適用
authorSlimebreath6078 <slimebreath6078@yahoo.co.jp>
Thu, 14 Jul 2022 14:05:56 +0000 (23:05 +0900)
committerSlimebreath6078 <slimebreath6078@yahoo.co.jp>
Thu, 14 Jul 2022 14:13:34 +0000 (23:13 +0900)
src/monster/monster-util.cpp

index 052073a..65254b1 100644 (file)
@@ -137,6 +137,7 @@ static bool restrict_monster_to_dungeon(PlayerType *player_ptr, MonsterRaceId r_
             is_possible_monster_and(r_ptr->kind_flags, d_ptr->mon_kind_flags),
             is_possible_monster_and(r_ptr->wilderness_flags, d_ptr->mon_wilderness_flags),
             is_possible_monster_and(r_ptr->feature_flags, d_ptr->mon_feature_flags),
+            is_possible_monster_and(r_ptr->population_flags, d_ptr->mon_population_flags),
         };
 
         auto result = std::all_of(is_possible.begin(), is_possible.end(), [](const auto &v) { return v; });
@@ -159,6 +160,7 @@ static bool restrict_monster_to_dungeon(PlayerType *player_ptr, MonsterRaceId r_
             is_possible_monster_or(r_ptr->kind_flags, d_ptr->mon_kind_flags),
             is_possible_monster_or(r_ptr->wilderness_flags, d_ptr->mon_wilderness_flags),
             is_possible_monster_or(r_ptr->feature_flags, d_ptr->mon_feature_flags),
+            is_possible_monster_or(r_ptr->population_flags, d_ptr->mon_population_flags),
         };
 
         auto result = std::any_of(is_possible.begin(), is_possible.end(), [](const auto &v) { return v; });