Samhain not buildable by AI at start of game?

My code was this:
Code:
		for iPlayer in range(gc.getMAX_PLAYERS()):
			pTargetPlayer = gc.getPlayer(iPlayer)
			if pTargetPlayer.isAlive():		
				for pyCity in PyPlayer(iPlayer).getCityList():
					pTargetCity = pyCity.GetCy()
					if pTargetCity.isCapital():
						#if iGameTurn == 3:
							#cf.addUnit(gc.getInfoTypeForString('UNIT_HUNTER'))
							if not pTargetPlayer.isHuman():
								if pTargetPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_ILLIANS'):
									#if pTargetCity.canCreate(gc.getInfoTypeForString('PROJECT_SAMHAIN'), True, True):
										pTargetCity.pushOrder(OrderTypes.ORDER_CREATE, gc.getInfoTypeForString('PROJECT_SAMHAIN'), -1, False, False, False, True)
										pTargetCity.setProduction(400)
										return 1

I used the barbarian hunter to debug (putting it in various places) - it shows if a certain point in the program is reached.

Evidence that Samhain is not creatable at start of game by AI:

1) If I used the canCreate line then the program never goes beyond that line.
2) Samhain is only in the current build queue if I make the 4th boolean True (which is the boolean that forces its production even if it is illegal). Otherwise Samhain is not able to be built.
 
Back
Top Bottom