OAC-アルタイル/メタトロン自動昇格

  • タグ:
  • タグはありません
	## Altair – Upgrade Metatoron
		for iLoopPlayer in xrange(gc.getMAX_CIV_PLAYERS()):
			pLoopPlayer = gc.getPlayer(iLoopPlayer)
			if pLoopPlayer.getCivilizationType() == gc.getInfoTypeForString(‘CIVILIZATION_ALTAIR’) and pLoopPlayer.getNumCities() > 0:
				iLoopTeam = pLoopPlayer.getTeam()
				if iLoopTeam == iTeam:

					if iTechType == gc.getInfoTypeForString(‘TECH_BRONZE_WORKING’):
						for pUnit in PyPlayer(iLoopPlayer).getUnitList():
							if pUnit.getUnitType() == gc.getInfoTypeForString(‘UNIT_METATORON1’):
								pNewUnit = pLoopPlayer.initUnit(gc.getInfoTypeForString(‘UNIT_METATORON2’), pUnit.getX(), pUnit.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
								pNewUnit.convert(pUnit)
					if iTechType == gc.getInfoTypeForString(‘TECH_MITHRIL_WORKING’):
						for pUnit in PyPlayer(iLoopPlayer).getUnitList():
							if pUnit.getUnitType() == gc.getInfoTypeForString(‘UNIT_METATORON2’):
								pNewUnit = pLoopPlayer.initUnit(gc.getInfoTypeForString(‘UNIT_METATORON3’), pUnit.getX(), pUnit.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
								pNewUnit.convert(pUnit)
								pNewUnit.setHasPromotion(gc.getInfoTypeForString(‘PROMOTION_ELDER_DRAGON’), False)
					if iTechType == gc.getInfoTypeForString(‘TECH_DIVINE_ESSENCE’):
						for pUnit in PyPlayer(iLoopPlayer).getUnitList():
							if pUnit.getUnitType() == gc.getInfoTypeForString(‘UNIT_METATORON3’):
								pNewUnit = pLoopPlayer.initUnit(gc.getInfoTypeForString(‘UNIT_METATORON4’), pUnit.getX(), pUnit.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
								pNewUnit.convert(pUnit)
								pNewUnit.setHasPromotion(gc.getInfoTypeForString(‘PROMOTION_GREATER_DRAGON’), False)