Esempio n. 1
0
bool ma_requirements::is_valid_weapon(item& i) {  
  for (std::set<std::string>::iterator it = req_flags.begin();
      it != req_flags.end(); ++it) {
    std::string flag = *it;
    if (!i.has_flag(flag)) return false;
  }
  bool valid = i.damage_bash() >= min_bashing_damage 
      && i.damage_cut() >= min_cutting_damage;

  return valid;
}
Esempio n. 2
0
bool ma_requirements::is_valid_weapon(item &i)
{
    for( auto flag : req_flags ) {

        if (!i.has_flag(flag)) {
            return false;
        }
    }
    bool valid = i.damage_bash() >= min_bashing_damage
                 && i.damage_cut() >= min_cutting_damage;

    return valid;
}