this->misc_flags = (this->r_ptr->misc_flags & this->r_ptr->r_misc_flags);
}
+bool lore_type::has_reinforce() const
+{
+ return this->r_ptr->has_reinforce();
+}
+
/*!
* @brief モンスターの思い出メッセージをあらかじめ指定された関数ポインタに基づき出力する
* @param str 出力文字列
bool sin = false;
#endif
- bool has_reinforce = false;
bool know_everything = false;
bool old = false;
int count = 0;
EnumClassFlagGroup<MonsterBrightnessType> brightness_flags;
EnumClassFlagGroup<MonsterSpecialType> special_flags;
EnumClassFlagGroup<MonsterMiscType> misc_flags;
+
+ bool has_reinforce() const;
};
using hook_c_roff_pf = void (*)(TERM_COLOR attr, std::string_view str);
{
lore_type tmp_lore(r_idx, mode);
lore_type *lore_ptr = &tmp_lore;
- const auto end = lore_ptr->r_ptr->reinforces.end();
- const auto it_reinforce = std::find_if(
- lore_ptr->r_ptr->reinforces.begin(), end,
- [](const auto &reinforce) { return reinforce.is_valid(); });
- lore_ptr->has_reinforce = it_reinforce != end;
-
if (cheat_know || (mode == MONSTER_LORE_RESEARCH) || (mode == MONSTER_LORE_DEBUG)) {
lore_ptr->know_everything = true;
}
return format(fmt, horror_message.data(), description.data());
}
+bool MonsterRaceInfo::has_reinforce() const
+{
+ const auto end = this->reinforces.end();
+ const auto it = std::find_if(this->reinforces.begin(), end,
+ [](const auto &reinforce) { return reinforce.is_valid(); });
+ return it != end;
+}
+
std::optional<std::string> MonsterRaceInfo::probe_lore()
{
auto n = false;
int calc_figurine_value() const;
int calc_capture_value() const;
std::string build_eldritch_horror_message(std::string_view description) const;
+ bool has_reinforce() const;
std::optional<std::string> probe_lore();
void make_lore_treasure(int num_item, int num_drop);
static void display_monster_escort_contents(lore_type *lore_ptr)
{
- if (!lore_ptr->has_reinforce) {
+ if (!lore_ptr->has_reinforce()) {
return;
}
void display_monster_collective(lore_type *lore_ptr)
{
- if (lore_ptr->misc_flags.has(MonsterMiscType::ESCORT) || lore_ptr->misc_flags.has(MonsterMiscType::MORE_ESCORT) || lore_ptr->has_reinforce) {
+ if (lore_ptr->misc_flags.has(MonsterMiscType::ESCORT) || lore_ptr->misc_flags.has(MonsterMiscType::MORE_ESCORT) || lore_ptr->has_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)) {