Unlimited Power Event

Joined
Jun 7, 2008
Messages
6,149
Location
Just wonder...
I just wanted to let you know I've found a bug in the "Unlimited Power" event in AND2; I've seen the code is the same in C2C so I suppose the bug is present here too. When you choose to spend gold to give power to all of your cities (if you have enough gold), you get the power but gold isn't subtracted. I think a couple of lines were missing in the code. I've added them and it looks like it's working. The code is found inside CvRandomEventInterface.py


Code:
def TriggerUnlimitedPower2(argsList):
	kTriggeredData = argsList[1]
	player = gc.getPlayer(kTriggeredData.ePlayer)
	eventCity = player.getCity(kTriggeredData.iCityId)
[COLOR="Red"]	iRequireGold = (eventCity.area().getNumCities() * 100) # added by 45°
	player.changeGold(-iRequireGold) # added by 45°[/COLOR]
	eventCity.area().changeCleanPowerCount(player.getTeam(), 1)

Just my 2 cents. :)
 
:help: Did this get seen?

JosEPh
 
I don't know as I've not checked the SVN thread real close lately.

EDIT: Yes you did on the 13th. I just missed it is all.

So 45* fix was correct?

If so cool.

JosEPh :)
 
Back
Top Bottom