[B][COLOR=RoyalBlue]def[/COLOR] [COLOR=SeaGreen]AI_chooseTech[/COLOR][COLOR=Purple]([/COLOR][/B]self,argsList[B][COLOR=Purple])[/COLOR][/B]:[INDENT] ePlayer = argsList[0]
bFree = argsList[1]
pPlayer = gc.getPlayer(ePlayer)
eTeam = gc.getTeam(pPlayer.getTeam())
iTech = -1
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_LUCHUIRP'):
iTech = gc.getInfoTypeForString('TECH_CONSTRUCTION')
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_LJOSALFAR'):
iTech = gc.getInfoTypeForString('TECH_WAY_OF_THE_FORESTS')
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_KHAZAD'):
iTech = gc.getInfoTypeForString('TECH_WAY_OF_THE_EARTHMOTHER')
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_LANUN'):
iTech = gc.getInfoTypeForString('TECH_SAILING')
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_HIPPUS'):
iTech = gc.getInfoTypeForString('TECH_HORSEBACK_RIDING')
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_BALSERAPHS'):
iTech = gc.getInfoTypeForString('TECH_FESTIVALS')
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_CALABIM'):
iTech = gc.getInfoTypeForString('TECH_FEUDALISM')
if eTeam.isHasTech(gc.getInfoTypeForString('TECH_KNOWLEDGE_OF_THE_ETHER')):
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_AMURITES'):
iTech = gc.getInfoTypeForString('TECH_SORCERY')
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_SHEAIM'):
iTech = gc.getInfoTypeForString('TECH_SUMMONING')
if eTeam.isHasTech(gc.getInfoTypeForString('TECH_EXPLORATION')) == False:
iTech = gc.getInfoTypeForString('TECH_EXPLORATION')
if eTeam.isHasTech(gc.getInfoTypeForString('TECH_PHILOSOPHY')):
if pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_EVIL'):
bValid = true
for iTeam2 in range(gc.getMAX_PLAYERS()):
eTeam2 = gc.getTeam(iTeam2)
if eTeam2.isAlive():
if eTeam2.isHasTech(gc.getInfoTypeForString('TECH_CORRUPTION_OF_SPIRIT')):
bValid = false
if bValid == true:
iTech = gc.getInfoTypeForString('TECH_CORRUPTION_OF_SPIRIT')
if eTeam.isHasTech(gc.getInfoTypeForString('TECH_PHILOSOPHY')):
if pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_GOOD'):
bValid = true
for iTeam2 in range(gc.getMAX_TEAMS()):
eTeam2 = gc.getTeam(iTeam2)
if eTeam2.isAlive():
if eTeam2.isHasTech(gc.getInfoTypeForString('TECH_ORDERS_FROM_HEAVEN')):
bValid = false
if bValid == true:
iTech = gc.getInfoTypeForString('TECH_ORDERS_FROM_HEAVEN')
if pPlayer.getStateReligion() == gc.getInfoTypeForString('RELIGION_THE_ASHEN_VEIL'):
bValid = true
for iTeam2 in range(gc.getMAX_TEAMS()):
eTeam2 = gc.getTeam(iTeam2)
if eTeam2.isAlive():
if eTeam2.isHasTech(gc.getInfoTypeForString('TECH_INFERNAL_PACT')):
bValid = false
if bValid == true:
iTech = gc.getInfoTypeForString('TECH_INFERNAL_PACT')
if iTech != -1:
if eTeam.isHasTech(iTech) == False:
return iTech
[/INDENT][INDENT] return TechTypes.NO_TECH
[/INDENT]