I am trying to make a total war situation at 50 turns of play, where everybody is forced to suddenly be at war with one another.
I have written this into the CvEventManager.py
It doesn't work, could someone with a bit of python exp tell me what I am doing wrong here?
I have written this into the CvEventManager.py
Code:
def onBeginPlayerTurn(self, argsList):
'Called at the beginning of a players turn'
iGameTurn, iPlayer = argsList
if (iGameTurn==50):
team=gc.getTeam(gc.getPlayer(iPlayer).getTeam())
if (team.isAlive()):
for i in range(gc.getMAX_PLAYERS()):
team2=gc.getTeam(gc.getPlayer(i).getTeam())
if (i!=iPlayer and team2.isAlive()):
team.declareWar(team2,false);