From f663fd1206971d6a3b76f7992a7e1eff6f5b2ff8 Mon Sep 17 00:00:00 2001 From: Slimebreath6078 Date: Sun, 28 Jan 2024 18:37:47 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20ESCORT=20=E3=82=92=E6=96=B0?= =?utf8?q?=E5=AE=9A=E7=BE=A9=E3=81=AB=E5=90=88=E3=82=8F=E3=81=9B=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/lore/monster-lore.cpp | 4 ++-- src/monster-floor/monster-generator.cpp | 2 +- src/view/display-lore.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lore/monster-lore.cpp b/src/lore/monster-lore.cpp index a7ceffc40..4a5e3f18a 100644 --- a/src/lore/monster-lore.cpp +++ b/src/lore/monster-lore.cpp @@ -52,8 +52,8 @@ static void set_flags1(lore_type *lore_ptr) lore_ptr->misc_flags.set(MonsterMiscType::HAS_FRIENDS); } - if (lore_ptr->r_ptr->flags1 & RF1_ESCORT) { - lore_ptr->flags1 |= (RF1_ESCORT); + if (lore_ptr->r_ptr->misc_flags.has(MonsterMiscType::ESCORT)) { + lore_ptr->misc_flags.set(MonsterMiscType::ESCORT); } if (lore_ptr->r_ptr->flags1 & RF1_ESCORTS) { diff --git a/src/monster-floor/monster-generator.cpp b/src/monster-floor/monster-generator.cpp index 81b14b88b..cd5c9717e 100644 --- a/src/monster-floor/monster-generator.cpp +++ b/src/monster-floor/monster-generator.cpp @@ -334,7 +334,7 @@ bool place_specific_monster(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, (void)place_monster_group(player_ptr, who, y, x, r_idx, mode); } - if (!(r_ptr->flags1 & (RF1_ESCORT))) { + if (r_ptr->misc_flags.has_not(MonsterMiscType::ESCORT)) { return true; } diff --git a/src/view/display-lore.cpp b/src/view/display-lore.cpp index 5e5c7b344..69cf20cba 100644 --- a/src/view/display-lore.cpp +++ b/src/view/display-lore.cpp @@ -530,7 +530,7 @@ static void display_monster_escort_contents(lore_type *lore_ptr) } hooked_roff(_("護衛の構成は", "These escorts")); - if ((lore_ptr->flags1 & RF1_ESCORT) || (lore_ptr->flags1 & RF1_ESCORTS)) { + if (lore_ptr->misc_flags.has(MonsterMiscType::ESCORT) || (lore_ptr->flags1 & RF1_ESCORTS)) { 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->flags1 & RF1_ESCORT) || (lore_ptr->flags1 & RF1_ESCORTS) || lore_ptr->reinforce) { + if (lore_ptr->misc_flags.has(MonsterMiscType::ESCORT) || (lore_ptr->flags1 & RF1_ESCORTS) || 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)) { -- 2.11.0