message: Fix prevalent religion so that no religion is returned if there are no religions in the area
diff: @@ -1279,11 +1279,24 @@ def getOwnerStateReligion(city, iPlayer):
  return -1
  -def getPrevalentReligion(area, iStateReligionPlayer=None):
  +def calculateReligionWeight(iReligion, area, iStateReligionPlayer):
  cities = area.cities()
  + iWeight = religionCities = cities.religion(iReligion).count()
  +
  + if iStateReligionPlayer is not None:
  + iWeight += cities.where(lambda city: getOwnerStateReligion(city, iStateReligionPlayer) == iReligion).count()
  +
  + return iWeight
  +
  +
  +def getPrevalentReligion(area, iStateReligionPlayer=None):
  lReligions = [iReligion for iReligion in range(iNumReligions) if not infos.religion(iReligion).isLocal()]
  + found = find_max(lReligions, lambda iReligion: calculateReligionWeight(iReligion, area, iStateReligionPlayer))
  - return find_max(lReligions, lambda iReligion: cities.religion(iReligion).count() + cities.where(lambda city: iStateReligionPlayer is not None and getOwnerStateReligion(city, iStateReligionPlayer) == iReligion).count()).result
  + if found.value > 0:
  + return found.result
  +
  + return -1
  def isCurrentCapital(iPlayer, *names):
  