merijn_v1
Black Belt
Add the isHasReligion() line and it should work.
Code:
if iNewReligion == gc.getInfoTypeForString("RELIGION_XXXX"):
for pCity in PyPlayer(iCiv).getCityList():
city = pCity.GetCy()
if city.isHasReligion(iNewReligion):
iBuilding = gc.getInfoTypeForString("BUILDING_WALLS")
if not city.isHasBuilding(iBuilding):
city.setNumRealBuilding(iBuilding, 1)