bool ma_requirements::is_valid_weapon( const item &i ) const { for( auto flag : req_flags ) { if (!i.has_flag(flag)) { return false; } } for( const auto &pr : min_damage ) { if( i.damage_melee( pr.first ) < pr.second ) { return false; } } return true; }
bool deals_melee_damage( const item &it ) const { return it.damage_melee( DT_BASH ) || it.damage_melee( DT_CUT ) || it.damage_melee( DT_STAB ); }