--- deliantra/server/include/object.h 2010/01/16 13:41:37 1.224 +++ deliantra/server/include/object.h 2010/01/30 23:30:26 1.225 @@ -520,6 +520,8 @@ && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } MTH bool is_range () const { return type == BOW || type == ROD || type == WAND || type == HORN; } + MTH bool is_dragon () const; + MTH bool has_active_speed () const { return speed >= MIN_ACTIVE_SPEED; } // temporary: wether the object can be saved in a map file @@ -817,6 +819,13 @@ static void postpone_arch_ref (arch_ptr &ref, const_utf8_string other_arch); /* postpone other_arch reference */ }; +// returns whether the objetc is a dragon player, which are often specialcased +inline bool +object::is_dragon () const +{ + return arch->race == shstr_dragon && is_player (); +} + inline void object_freezer::put (const keyword_string k, archetype *v) {