OSDN Git Service

[Refactor] #2647 monster_is_valid() をオブジェクトメソッド「monster_type::is_valid()」にした
[hengbandforosx/hengbandosx.git] / src / system / monster-type-definition.cpp
index 69ff701..c9c5cfb 100644 (file)
@@ -55,3 +55,8 @@ bool monster_type::is_mimicry() const
 
     return r_ref.behavior_flags.has(MonsterBehaviorType::NEVER_MOVE) || monster_csleep_remaining(this);
 }
+
+bool monster_type::is_valid() const
+{
+    return MonsterRace(this->r_idx).is_valid();
+}