Sorry to bother this forum yet again but hopefully one of you can help me with this dilemma. I want a trait to double the amount of wealth received for capturing a city but the relevant procedure doesn't have any arguments that identify the conqueror. Can anyone think of some solution to achieve this?
Here's the procedure, currently it checks the trait of the conquered player not the conqueror:
Alternately, is it possible to call doCityCaptureGold a second time from onCityAcquired so that you achieve the same effect by getting two lots of capture gold?
Here's the procedure, currently it checks the trait of the conquered player not the conqueror:
Code:
def doCityCaptureGold(self, argsList):
"controls the gold result of capturing a city"
pOldCity = argsList[0]
iCaptureGold = 0
iCaptureGold += gc.getDefineINT("BASE_CAPTURE_GOLD")
iCaptureGold += (pOldCity.getPopulation() * gc.getDefineINT("CAPTURE_GOLD_PER_POPULATION"))
iCaptureGold += CyGame().getSorenRandNum(gc.getDefineINT("CAPTURE_GOLD_RAND1"), "Capture Gold 1")
iCaptureGold += CyGame().getSorenRandNum(gc.getDefineINT("CAPTURE_GOLD_RAND2"), "Capture Gold 2")
if (gc.getDefineINT("CAPTURE_GOLD_MAX_TURNS") > 0):
iCaptureGold *= cyIntRange((CyGame().getGameTurn() - pOldCity.getGameTurnAcquired()), 0, gc.getDefineINT("CAPTURE_GOLD_MAX_TURNS"))
iCaptureGold /= gc.getDefineINT("CAPTURE_GOLD_MAX_TURNS")
### BEGIN Increased Capture Gold
pPlayer = gc.getPlayer(pOldCity.getOwner())
iTraitAGG = gc.getInfoTypeForString('TRAIT_AGGRESSIVE')
if pPlayer.hasTrait(iTraitAGG):
iCaptureGold = iCaptureGold * 2
### END Increased Capture Gold
return iCaptureGold
Alternately, is it possible to call doCityCaptureGold a second time from onCityAcquired so that you achieve the same effect by getting two lots of capture gold?