engine/actions/source/RangedCombatApplicabilityChecker.cpp
// If a ranged weapon (sling, bow, etc) has been equipped, it is useless
// unless ammunition has also been equipped.
If a ranged weapon (sling, bow, etc) has been equipped, it is useless
unless ammunition has also been equipped.
If a ranged weapon ( sling bow etc ) has been equipped it is useless unless ammunition has also been equipped .
bool RangedCombatApplicabilityChecker::is_ranged_weapon_and_ammunition_equipped(CreaturePtr creature)
{
  if (creature)
  {
    Equipment& equipment = creature->get_equipment();    
    ItemPtr ammunition = equipment.get_item(EquipmentWornLocation::EQUIPMENT_WORN_AMMUNITION);
    return (ammunition != nullptr);
  }
  return false;
}
bool RangedCombatApplicabilityChecker :: is_ranged_weapon_and_ammunition_equipped ( CreaturePtr creature ) { if ( creature ) { Equipment & equipment = creature -> get_equipment ( ) ; ItemPtr ammunition = equipment . get_item ( EquipmentWornLocation :: EQUIPMENT_WORN_AMMUNITION ) ; return ( ammunition != nullptr ) ; } return false ; }
If a ranged weapon (sling, bow, etc) has been equipped, it is useless
unless ammunition has also been equipped.
If a ranged weapon ( sling bow etc ) has been equipped it is useless unless ammunition has also been equipped .