OSDN Git Service

[Refactor] ESCORTS を新定義に合わせた
authorSlimebreath6078 <slimebreath6078@yahoo.co.jp>
Sun, 28 Jan 2024 09:58:16 +0000 (18:58 +0900)
committerSlimebreath6078 <slimebreath6078@yahoo.co.jp>
Sat, 3 Feb 2024 09:11:52 +0000 (18:11 +0900)
src/lore/monster-lore.cpp
src/monster-floor/monster-generator.cpp
src/view/display-lore.cpp

index 4a5e3f1..22f078e 100644 (file)
@@ -56,8 +56,8 @@ static void set_flags1(lore_type *lore_ptr)
         lore_ptr->misc_flags.set(MonsterMiscType::ESCORT);
     }
 
-    if (lore_ptr->r_ptr->flags1 & RF1_ESCORTS) {
-        lore_ptr->flags1 |= (RF1_ESCORTS);
+    if (lore_ptr->r_ptr->misc_flags.has(MonsterMiscType::MORE_ESCORT)) {
+        lore_ptr->misc_flags.set(MonsterMiscType::MORE_ESCORT);
     }
 }
 
index cd5c971..d4ac4a4 100644 (file)
@@ -354,7 +354,7 @@ bool place_specific_monster(PlayerType *player_ptr, MONSTER_IDX who, POSITION y,
         }
 
         (void)place_monster_one(player_ptr, place_monster_m_idx, ny, nx, z, mode);
-        if (monraces_info[z].misc_flags.has(MonsterMiscType::HAS_FRIENDS) || (r_ptr->flags1 & RF1_ESCORTS)) {
+        if (monraces_info[z].misc_flags.has(MonsterMiscType::HAS_FRIENDS) || r_ptr->misc_flags.has(MonsterMiscType::MORE_ESCORT)) {
             (void)place_monster_group(player_ptr, place_monster_m_idx, ny, nx, z, mode);
         }
     }
index 69cf20c..295d124 100644 (file)
@@ -530,7 +530,7 @@ static void display_monster_escort_contents(lore_type *lore_ptr)
     }
 
     hooked_roff(_("護衛の構成は", "These escorts"));
-    if (lore_ptr->misc_flags.has(MonsterMiscType::ESCORT) || (lore_ptr->flags1 & RF1_ESCORTS)) {
+    if (lore_ptr->misc_flags.has(MonsterMiscType::ESCORT) || lore_ptr->misc_flags.has(MonsterMiscType::MORE_ESCORT)) {
         hooked_roff(_("少なくとも", " at the least"));
     }
 
@@ -578,7 +578,7 @@ static void display_monster_escort_contents(lore_type *lore_ptr)
 
 void display_monster_collective(lore_type *lore_ptr)
 {
-    if (lore_ptr->misc_flags.has(MonsterMiscType::ESCORT) || (lore_ptr->flags1 & RF1_ESCORTS) || lore_ptr->reinforce) {
+    if (lore_ptr->misc_flags.has(MonsterMiscType::ESCORT) || lore_ptr->misc_flags.has(MonsterMiscType::MORE_ESCORT) || lore_ptr->reinforce) {
         hooked_roff(format(_("%s^は通常護衛を伴って現れる。", "%s^ usually appears with escorts.  "), Who::who(lore_ptr->msex)));
         display_monster_escort_contents(lore_ptr);
     } else if (lore_ptr->misc_flags.has(MonsterMiscType::HAS_FRIENDS)) {