DrPepper836
Warlord
- Joined
- Oct 29, 2007
- Messages
- 134
I'm working on a version of plague that will make the population become to if the bad health gets to be 8 above the good health. It won't work though... I've tried some minor variations that don't work either. Note: What I didn't add is in red.
Code:
[COLOR="Red"]def onEndPlayerTurn(self, argsList):
'Called at the end of a players turn'
iGameTurn, iPlayer = argsList[/COLOR]
'Plague'
if (iPlayer.isAlive()):
cityNumber = iPlayer.GetNumCities();
i = 1
while i <= cityNumber:
'get the city'
city = iPlayer.getCity(i)
'check unhealthyness'
if((city.badHealth(false) - city.goodHealth()) >= 8):
'set population'
city.setPopulation(2)
i = i + 1
[COLOR="Red"]if (gc.getGame().getElapsedGameTurns() == 1):
if (gc.getPlayer(iPlayer).isHuman()):
if (gc.getPlayer(iPlayer).canRevolution(0)):
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_CHANGECIVIC)
popupInfo.addPopup(iPlayer)
CvAdvisorUtils.resetAdvisorNags()
CvAdvisorUtils.endTurnFeats(iPlayer)[/COLOR]