def onGameStart(self, argsList):
'Called at the start of the game'
if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START)):
for iPlayer in range(gc.getMAX_PLAYERS()):
player = gc.getPlayer(iPlayer)
if (player.isAlive() and player.isHuman()):
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
popupInfo.setText(u"showDawnOfMan")
popupInfo.addPopup(iPlayer)
else:
CyInterface().setSoundSelectionReady(true)
if gc.getGame().isPbem():
for iPlayer in range(gc.getMAX_PLAYERS()):
player = gc.getPlayer(iPlayer)
if (player.isAlive() and player.isHuman()):
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_DETAILS)
popupInfo.setOption1(true)
popupInfo.addPopup(iPlayer)
## Limited Religions Start ##
if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_PICK_RELIGION):
CyGame().setOption(gc.getInfoTypeForString("GAMEOPTION_LIMITED_RELIGIONS"), False)
## Limited Religions End ##
## Real Always War Start ##
if not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ALWAYS_WAR):
CyGame().setOption(gc.getInfoTypeForString("GAMEOPTION_REAL_ALWAYS_WAR"), False)
if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ALWAYS_WAR):
if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_REAL_ALWAYS_WAR):
for i in xrange(gc.getMAX_CIV_TEAMS()):
FirstTeam = gc.getTeam(i)
if FirstTeam.isHuman():continue
for j in xrange(gc.getMAX_CIV_TEAMS()):
SecondTeam = gc.getTeam(j)
if SecondTeam.isHuman():continue
if i==j:continue
FirstTeam.declareWar(j,False,WarPlanTypes.WARPLAN_TOTAL)
FirstTeam.setPermanentWarPeace(j,True)
SecondTeam.declareWar(i,False,WarPlanTypes.WARPLAN_TOTAL)
SecondTeam.setPermanentWarPeace(i,True)
## Real Always War End ##
for iPlayerLoop in xrange(gc.getMAX_CIV_PLAYERS()):
pPlayer = gc.getPlayer(iPlayerLoop)
iPlayer = pPlayer.getID()
pTeam = gc.getTeam(pPlayer.getTeam())
iTrait = gc.getInfoTypeForString("TRAIT_SPIRITUAL")
if pPlayer.isAlive():
## NO STARTING TECHS START ##
if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and gc.getGame().isOption(GameOptionTypes.GAMEOPTION_NO_STARTING_TECHS)):
iTech1 = gc.getInfoTypeForString("TECH_FISHING")
iTech2 = gc.getInfoTypeForString("TECH_THE_WHEEL")
iTech3 = gc.getInfoTypeForString("TECH_AGRICULTURE")
iTech4 = gc.getInfoTypeForString("TECH_HUNTING")
iTech5 = gc.getInfoTypeForString("TECH_MINING")
pTeam.setHasTech(iTech1, false, iPlayer, false, false)
pTeam.setHasTech(iTech2, false, iPlayer, false, false)
pTeam.setHasTech(iTech3, false, iPlayer, false, false)
pTeam.setHasTech(iTech4, false, iPlayer, false, false)
pTeam.setHasTech(iTech5, false, iPlayer, false, false)
## NO STARTING TECHS END ##
## Spiritual Trait Start ##
if pPlayer.hasTrait(iTrait):
iTech = gc.getInfoTypeForString("TECH_MYSTICISM")
pTeam.setHasTech(iTech, true, iPlayer, false, false)
## Spiritual Trait End ##
CvAdvisorUtils.resetNoLiberateCities()