OSDN Git Service

[Refactor] FRIENDSを新定義に合わせた
[hengbandforosx/hengbandosx.git] / src / floor / floor-events.cpp
index 98f88a8..e570d40 100644 (file)
@@ -100,7 +100,7 @@ void night_falls(PlayerType *player_ptr)
         for (auto x = 0; x < floor.width; x++) {
             const Pos2D pos(y, x);
             auto &grid = floor.get_grid(pos);
-            auto &terrain = terrains_info[grid.get_feat_mimic()];
+            const auto &terrain = grid.get_terrain_mimic();
             using Tc = TerrainCharacteristics;
             if (grid.is_mirror() || terrain.flags.has(Tc::QUEST_ENTER) || terrain.flags.has(Tc::ENTRANCE)) {
                 continue;
@@ -158,7 +158,7 @@ static byte get_dungeon_feeling(PlayerType *player_ptr)
             delta += (r_ptr->level - floor_ptr->dun_level) * base;
         }
 
-        if (r_ptr->flags1 & RF1_FRIENDS) {
+        if (r_ptr->misc_flags.has(MonsterMiscType::HAS_FRIENDS)) {
             if (5 <= get_monster_crowd_number(floor_ptr, i)) {
                 delta += 1;
             }
@@ -337,7 +337,7 @@ void glow_deep_lava_and_bldg(PlayerType *player_ptr)
     for (auto y = 0; y < floor.height; y++) {
         for (auto x = 0; x < floor.width; x++) {
             const auto &grid = floor.get_grid({ y, x });
-            if (terrains_info[grid.get_feat_mimic()].flags.has_not(TerrainCharacteristics::GLOW)) {
+            if (grid.get_terrain_mimic().flags.has_not(TerrainCharacteristics::GLOW)) {
                 continue;
             }