mechaerik
Tuturuu!
hello, all. What I am trying to accomlish is modify Baldyrs Rebels modcomp so that instead of spawning Barbarian units, it spawns units of the dead civ.
The error results in the red line; the log states that the int object does not have attribute "isAlive".
I tried using iOriginalOwner.getCivilizationType().isAlive(), but it returned that it didnt have the attribute getCivilizationType. So Im confused now. I feel like its something simple that Im missing.
Spoiler :
Code:
def checkCity(cyCity) :
bDisorder = cyCity.isDisorder()
iHappy = cyCity.happyLevel()
iUnhappy = cyCity.unhappyLevel(0)
bNeverLost = cyCity.isNeverLost()
iForeigners = cyCity.getCulturePercentAnger()
iOriginalOwner = cyCity.getOriginalOwner()
iCurrentOwner = cyCity.getOwner()
if( bDisorder == True or ((iHappy*2) < iUnhappy) ) :
if( bNeverLost == False ) :
if not( iOriginalOwner == iCurrentOwner ) :
[COLOR="Red"]if not( iOriginalOwner.isAlive() ) :[/COLOR]
iRandNum = cyGame.getSorenRandNum(100, "rebels")
if( iRandNum <= iRebelsProb) :
return True
return False
The error results in the red line; the log states that the int object does not have attribute "isAlive".
I tried using iOriginalOwner.getCivilizationType().isAlive(), but it returned that it didnt have the attribute getCivilizationType. So Im confused now. I feel like its something simple that Im missing.