platyping
Sleeping Dragon
Code:
def onCityAcquiredAndKept(self, argsList):
'City Acquired and Kept'
iOwner,pCity = argsList
## Test ##
pPlayer1 = gc.getPlayer(pCity.getOwner())
pPlayer2 = gc.getPlayer(iOwner)
pPlayer2.changeGoldenAgeTurns(8)
pPlayer1.changeGoldenAgeTurns(5)
## Test ##
CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
Some simple tests:
1) AI takes AI City
2) Human takes AI City
3) AI takes Human City
Results:
1) iOwner is always human NOT previous owner as Jamie stated.
Even when AI takes another AI City, GA(8) is triggered for human.
2) pCity.getOwner() always refer to the new owner correctly.
3) onCityAcquiredAndKept is only triggered for Conquer by Force.
Not triggered by Trade, useless function.
what is the point in that?!
now I can now define my own for my mod. That was productive. Anyway, looking in the SDK the python event is triggered within the method CvPlayer::aquireCity(), but it passes into it getID() which will get the CvPlayer instance's ID. ie: it should work fine so I have no clue why it doesn't work properly 

