elif ( iPlayer == con.iPoland and pPoland.isAlive() ):
if (iGameTurn == con.i1600AD and self.getGoal(iPoland,0) == -1 ): #Really 1600
if (self.checkOwnedCoastalArea(iPoland, (tBaltic[0],tBaltic[1]), (tBaltic[2],tBaltic[3]), 1)):
if (self.checkOwnedCoastalArea(iPoland, (tBlackSea[0],tBlackSea[1]), (tBlackSea[2],tBlackSea[3]), 1)):
self.setGoal(iPoland, 0, 1)
else:
self.setGoal(iPoland, 0, 0)
else:
self.setGoal(iPoland, 0, 0)
#Really 1500 to 1520
if ((iGameTurn >= con.i1500AD) and (iGameTurn <= con.i1520AD) and self.getGoal(iPoland,1) == -1 ):
iAgriculturePolish = pPoland.calculateTotalYield(YieldTypes.YIELD_FOOD)
bFood = True
for iPlayer in range( iNumMajorPlayers ):
pPlayer = gc.getPlayer( iPlayer )
iAgriculture = pPlayer.calculateTotalYield(YieldTypes.YIELD_FOOD)
if iAgriculture > iAgriculturePolish:
bFood = False
if (bFood):
self.setGoal(iPoland, 1, 1)
if ((iGameTurn > con.i1520AD) and self.getGoal(iPoland,1) == -1):
self.setGoal(iPoland, 1, 0)
#See onBuildingBuilt for 3rd goal
# Sedna17: Polish UHV changed again
elif ( iPlayer == iPoland ):
if ( pPoland.isAlive() ):
if ( self.getGoal( iPoland, 2 ) == -1 ):
lBuildingList = [con.iCatholicCathedral,con.iOrthodoxCathedral,con.iProtestantCathedral,con.iJewishQuarter]
if ( iBuilding in lBuildingList):
iNumCities = pPoland.getNumCities()
lBuildingCounter = [0,0,0,0]
lBuildingGoal = [3,3,2,2]
for iCity in range(iNumCities):
pCity = pPoland.getCity(iCity)
for index,building in enumerate(lBuildingList):
if (pCity.hasBuilding(building)):
lBuildingCounter[index] += 1
bBuildingGoal = True
for count,goal in zip(lBuildingCounter,lBuildingGoal):
if count < goal:
bBuildingGoal = False
if bBuildingGoal:
self.setGoal( iPoland, 2, 1 )