Mailbox
King
- Joined
- Oct 6, 2007
- Messages
- 888
Did you do that yet? I'm glad someone brought up the subject of the Evil Undead on the main forum, because I keep forgetting to post this:
Here's what I used to have the Scions get a few Reborn from city razing once they get Sorcery. Some other python, btw, would have already reduced the city's population to around 1/3.
Code:# scions start iReborn = gc.getInfoTypeForString('UNIT_REBORN') eTeam = gc.getTeam(pPlayer.getTeam()) if gc.getPlayer(city.getOwner()).getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_SCIONS'): if eTeam.isHasTech(gc.getInfoTypeForString('TECH_SORCERY')): for i in range((city.getPopulation() / 1) - 1): spawnUnit = pPlayer.initUnit(iReborn, city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH) # scions end
Oh wow, that's a million times better than what I was using. I was using code stolen from the infernal mane granting code and it was clunky and prone to bugging me. Thanks a ton!