Yudishtira
Spiritual/Creative
I'm not getting any attitude changes from the Lotus Temple. Can anyone see anything wrong with the code?
As you know I'm moderately to highly clueless vis a vis Python, but I did wonder why it is checking the player attitude, while incrementing the team attitude.
ETA: Checking now whether it's even called BUILDING_LOTUS...
ETA2: Umm no it isn't so that's one problem found!
Code:
## Lotus Start ##
if iBuildingType == gc.getInfoTypeForString( 'BUILDING_LOTUS' ):
pPlayer = gc.getPlayer(pCity.plot().getOwner())
pPID = pPlayer.getID()
iTeam = pPlayer.getTeam()
for iPlayer2 in range(gc.getMAX_CIV_PLAYERS()):
pPlayer2 = gc.getPlayer(iPlayer2)
if (pPlayer2.isAlive()==True) and (pPlayer2.isBarbarian()==False):
if pPlayer2.AI_getAttitude(pPID) < 2:
for i in range (1,200,1):
pPlayer2.AI_changeAttitudeExtra(iTeam, +1)
if pPlayer2.AI_getAttitude(pPID) == 2:
break
## Lotus End ##
As you know I'm moderately to highly clueless vis a vis Python, but I did wonder why it is checking the player attitude, while incrementing the team attitude.
ETA: Checking now whether it's even called BUILDING_LOTUS...
ETA2: Umm no it isn't so that's one problem found!