def turnChecker(self, iTurn):
if (game.getVichyHappened() == 0):
if (self.getFrenchAxisCities() > self.numFrenchCitiesFall):
self.EVichy()
def EVichy(self):
# Send off to do Vichy France and notify player
gc.getPlayer(self.pFranceID).doVichyFrance(6, 26, 26, 6)
popup = PyPopup.PyPopup(-1)
szTitle = localText.getText("TXT_KEY_WW2_VICHY_TITLE", ())
szText = localText.getText("TXT_KEY_WW2_VICHY_TEXT", ())
popup.setHeaderString(szTitle)
popup.addSeparator()
popup.setBodyString(szText)
popup.launch()
self.pGermanyTeam.addTeam(gc.getPlayer(self.pVichyID).getTeam())
game.setVichyHappened(2)
def getFrenchAxisCities(self):
iCount = 0
if (self.cParis.getOwner() == self.pGermanyID or self.cParis.getOwner() == self.pItalyID):
iCount = iCount + 1
if (self.cNantes.getOwner() == self.pGermanyID or self.cNantes.getOwner() == self.pItalyID):
iCount = iCount + 1
if (self.cParis.getOwner() == self.pFranceID):
iCount = 0;
return iCount
def initValues(self):
# Variables
self.Map = 99
self.cLyon = gc.getMap().plot( 50, 18 ).getPlotCity()
self.cMarsyli = gc.getMap().plot( 49, 16 ).getPlotCity()
self.cAlgier = gc.getMap().plot( 49, 6 ).getPlotCity()
self.cTunis = gc.getMap().plot( 52, 5 ).getPlotCity()
self.cOran = gc.getMap().plot( 47, 6 ).getPlotCity()
self.cRabat = gc.getMap().plot( 43, 6 ).getPlotCity()
self.cBaszczar = gc.getMap().plot( 46, 3 ).getPlotCity()
self.cMarrakesz = gc.getMap().plot( 40, 4 ).getPlotCity()
self.cParis = gc.getMap().plot( 50, 20 ).getPlotCity()
self.cNantes = gc.getMap().plot( 47, 19 ).getPlotCity()
self.numFrenchCitiesFall = 1
self.pVichyID = 26
self.pVichyTeam = gc.getTeam(gc.getPlayer(self.pVichyID).getTeam())
self.pGermanyID = 0
self.cBerlin = gc.getMap().plot( 69, 36 ).getPlotCity()
self.pItalyID = 6
self.cRome = gc.getMap().plot( 68, 20 ).getPlotCity()
self.pFranceID = 2
self.pEnglandID = 1
self.pGermanyTeam = gc.getTeam(gc.getPlayer(self.pGermanyID).getTeam())
self.pItalyTeam = gc.getTeam(gc.getPlayer(self.pItalyID).getTeam())
def getMap(self):
return self.Map