[MOD] Mana Flares and Unique Events Add-On

I think it's about time we start composing a song.

The Modder Song ( Come On Modders, Get Together Now! ) - ( also known as "Hey Modders, merge your mods already! )

Come on, modders now, modders now
Modders now, come on, modders now
Got to get together, modders now
Come on now, modders now, modders now
Modding all together now, modders now
Good for players playing mods now
Get together, be good modders now.

We have all got to be modders now
Players playing merged mods now
Modders now, modders now, merge now
Happy players playing mods now
Come on modders, let's be modders now
Happy players playing mods now
Come on, every modder, get together now.
 
Please don't cause a smug storm, I would rather like to keep the western half of the US alive ;)

________

Anyways, GIR this modmod looks really awesome. Could I use it in Rise of Darkness?
 
[...]
Anyways, GIR this modmod looks really awesome. Could I use it in Rise of Darkness?

I would be glad if some parts of this mod find there way into other mods :)
Of course you can use whatever you want.

Spoiler GIR02ManaFlares ( Part 1 / 6 ) :

GIR02ManaFlares:

Spoiler eventGIR02ManaFlares_CvRandomEventInterface.py :

Code:
## eventGIR02ManaFlares_CvRandomEventInterface.py
## MODULAR PYTHON FOR MANA FLARES MODULE
## by GIR
## Last Edited: 2011.01.17
##

from CvPythonExtensions import *
import GIR02ManaFlares

# globals
MF = GIR02ManaFlares.GIR02ManaFlares()

def getHelpFlareXNode(argsList):
	iHelp = 1
	szHelp = MF.doAndgetHelpFlareXNode( argsList, iHelp )
	return szHelp
def doFlareXNode(argsList):
	iHelp = 0
	MF.doAndgetHelpFlareXNode( argsList, iHelp )


Spoiler GIR02ManaFlares_CvEventManager.py :

Code:
## GIR02ManaFlares_CvEventManager.py
## MODULAR PYTHON FOR MANA FLARES MODULE
## by GIR
## Last Edited: 2011.01.18
##

from CvPythonExtensions import *
import GIR02ManaFlares

# globals
MF = GIR02ManaFlares.GIR02ManaFlares()

def onBeginGameTurn(self, argsList):
	'Called at the beginning of the end of each turn'
	gc 					= CyGlobalContext()
	git 				= gc.getInfoTypeForString
	chance 				= gc.getGame().getSorenRandNum(100, 'rand for Flare')	### 100 ^= random between 0 and 99
	getGameSpeedType 	= CyGame().getGameSpeedType()

	if getGameSpeedType 	== git('GAMESPEED_QUICK'):
		iFlareChanceAll 	= 5 #5%#
	elif getGameSpeedType 	== git('GAMESPEED_NORMAL'):
		iFlareChanceAll 	= 4 #4%#
	elif getGameSpeedType 	== git('GAMESPEED_EPIC'):
		iFlareChanceAll 	= 3 #3%#
	elif getGameSpeedType 	== git('GAMESPEED_MARATHON'):
		iFlareChanceAll 	= 2 #2%#
	else:
		iFlareChanceAll 	= 2 #2%#
	iFlareChanceAll 		= iFlareChanceAll - 1

#
#	if chance <= 99:	### test: Chance = 100% to get mana flare event
	if chance <= iFlareChanceAll:
		MF.onBeginGameTurnFlares()

def onUnitPillage(self, argsList):
	'Unit pillages a plot'
	pUnit, iImprovement, iRoute, iOwner = argsList
	pPlot 		= CyMap().plot(pUnit.getX(), pUnit.getY())
	lManaImp 	= MF.getlManaImp()
	if iImprovement in lManaImp:
		if pPlot.isOwned():
			gc 		= CyGlobalContext()
			pPlayer = gc.getPlayer(iOwner)
			bEvent 	= False
			MF.doFlareXNode( iImprovement, pPlayer, pPlot, bEvent )

 
Can I still use this with FF 051b?

don't know. didn't played ffh for month but in two weeks uni begins and i will have more time for modding and i will bring this modcomp up to date. (edit: and i cant test it now, no pc with ffh here)

additional things to do:
- make this mod modular
- add ini file to de/activate unique inprovements and flares
- add mercenary mod so you can hire units when you are on the same plot as the great circus or great colosseum
- fix one bug with the hidden nationality promotion (shadow flare event)​


Spoiler GIR02ManaFlares ( Part 2 / 6 ) :

Spoiler GIR02ManaFlares.py ( PART 1 / 5 ) :

Code:
## GIR02ManaFlares.py
## MODULAR PYTHON FOR MANA FLARES MODULE
## by GIR
## Last Edited: 2011.01.18
##

from CvPythonExtensions import *

# globals
gc 			= CyGlobalContext()
localText 	= CyTranslator()

class GIR02ManaFlares:

	def onBeginGameTurnFlares( self ):
		l_miPlots = []
		for i in range (CyMap().numPlots()):
			pPlot = CyMap().plotByIndex(i)
			if pPlot.isOwned():
				lManaImp = self.getlManaImp()
				iImprovement = pPlot.getImprovementType()
				if iImprovement in lManaImp:
					l_miPlots.append( pPlot )
		if len(l_miPlots) >= 1:
			cgc = CyGlobalContext()
			git = cgc.getInfoTypeForString
			iRand = CyGame().getSorenRandNum( len(l_miPlots), "Random pPlot")
			pPlot = l_miPlots[iRand]
			iX = pPlot.getX()
			iY = pPlot.getY()
			iPlayer = pPlot.getOwner()
			pPlayer = cgc.getPlayer(iPlayer)
			bEvent = True
			iImprovement = pPlot.getImprovementType()
			iEvent = git("EVENTTRIGGER_FLARE_X_NODE_ZE")
			triggerData = pPlayer.initTriggeredData(iEvent, true, -1, iX, iY, iPlayer, -1, -1, -1, -1, -1)
			self.doFlareXNode( iImprovement, pPlayer, pPlot, bEvent )

	def getlManaImpString( self ):
		lManaImpString = [ "AIR", "BODY", "CHAOS", "CREATION", "DEATH", "DIMENSIONAL", "EARTH", "ENCHANTMENT", "ENTROPY", "FIRE", "FORCE", "ICE", "LAW", "LIFE", "METAMAGIC", "MIND", "NATURE", "SHADOW", "SPIRIT", "SUN", "WATER", "REFINERY" ]
		return lManaImpString

	def getlManaImp( self ):
		lManaImp = []
		lManaImpString = self.getlManaImpString()
		for i in range(len(lManaImpString)):
			if lManaImpString[i] == "REFINERY":
				s_Improvement = "IMPROVEMENT_" + lManaImpString[i]
			else:
				s_Improvement = "IMPROVEMENT_MANA_" + lManaImpString[i]
			iImprovement = gc.getInfoTypeForString(s_Improvement)
			lManaImp = lManaImp + [ iImprovement ]
		return lManaImp

	def getlManaImpEventTxt( self ):
		lManaImpEventTxt = []
		lManaImpString = self.getlManaImpString()
		for i in range(len(lManaImpString)):
			s_ImpEText = str( "TXT_KEY_EVENT_FLARE_" + str(lManaImpString[i]) + "_NODE_ZE" )
			LText = localText.getText(s_ImpEText, ())
			lManaImpEventTxt = lManaImpEventTxt + [ LText ]
		return lManaImpEventTxt

	def doFlareXNode( self, iImprovement, pPlayer, pPlot, bEvent ):
		cgc = CyGlobalContext()
		git = cgc.getInfoTypeForString
		if iImprovement == git("IMPROVEMENT_MANA_AIR"):
			self.doFlareAirNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_BODY"):
			self.doFlareBodyNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_CHAOS"):
			self.doFlareChaosNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_CREATION"):
			self.doFlareCreationNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_DEATH"):
			self.doFlareDeathNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_DIMENSIONAL"):
			self.doFlareDimensionalNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_EARTH"):
			self.doFlareEarthNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_ENCHANTMENT"):
			self.doFlareEnchantmentNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_ENTROPY"):
			self.doFlareEntropyNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_FIRE"):
			self.doFlareFireNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_FORCE"):
			self.doFlareForceNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_ICE"):
			self.doFlareIceNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_LAW"):
			self.doFlareLawNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_LIFE"):
			self.doFlareLifeNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_METAMAGIC"):
			self.doFlareMetamagicNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_MIND"):
			self.doFlareMindNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_NATURE"):
			self.doFlareNatureNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_SHADOW"):
			self.doFlareShadowNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_SPIRIT"):
			self.doFlareSpiritNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_SUN"):
			self.doFlareSunNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_MANA_WATER"):
			self.doFlareWaterNodeZE( pPlayer, pPlot, bEvent )
		elif iImprovement == git("IMPROVEMENT_REFINERY"):
			self.doFlareRefineryNodeZE( pPlayer, pPlot, bEvent )

	def doAndgetHelpFlareXNode( self, argsList, iHelp ):
		kTriggeredData = argsList[1]
		iX = kTriggeredData.iPlotX
		iY = kTriggeredData.iPlotY
		pPlot = gc.getMap().plot(iX, iY)
		sText = ""
		iImprovement = pPlot.getImprovementType()
		if iImprovement != -1:
			lManaImp = self.getlManaImp()
			if iImprovement in lManaImp:
				lManaImpEventTxt = self.getlManaImpEventTxt()
				for i in range(len(lManaImp)):
					if iImprovement == lManaImp[i]:
						sText = lManaImpEventTxt[i]
						break
		if iHelp == 1:
			return sText
		elif iHelp == 0:
			if sText != "":
				iPlayer = kTriggeredData.ePlayer
			#	CyInterface().addMessage(iPlayer,True,-1,sText,'',0,"",ColorTypes(gc.getInfoTypeForString("COLOR_RED")),iX,iY,True,True)
			#	### log only ###

	def getEstEnd( self ):
		# ### GAMESPEED_QUICK = 480; GAMESPEED_NORMAL = 690; GAMESPEED_EPIC = 990; GAMESPEED_MARATHON = 1800
		base = 1000
		count = 4
		estiEnd = CyGame().getEstimateEndTurn()
		if ( estiEnd >= 1500 ):
			base = 1800
			count = 16
		elif ( estiEnd >= 750 ):
			base = 990
			count = 8
		elif ( estiEnd >= 500 ):
			base = 690
			count = 6
		elif ( estiEnd >= 330 ):
			base = 480
			count = 4
		elif ( estiEnd >= 10 ):
			base = 300
			count = 2
		argsListEst = base, count
		return argsListEst

	def getNearestCity_ZE( self, iX, iY, iPlayer, bOnlyOwnCities ):
		pCity = -1
		radius = 3
		for i in range(2):
			radius -= 1
			for iXLoop in range(iX - radius, iX + radius + 1, 1):
				for iYLoop in range(iY - radius, iY + radius + 1, 1):
					pPlot = CyMap().plot(iXLoop, iYLoop)
					if pPlot.isCity() == True:
						if bOnlyOwnCities == True:
							if pPlot.getOwner() == iPlayer:
								pCity = pPlot.getPlotCity()
						if bOnlyOwnCities == False:
							pCity = pPlot.getPlotCity()
		return pCity

	def findClearPlot(self, pUnit, plot, iRadius):	## von ffh2
		BestPlot = -1
		iBestPlot = 0
		if pUnit == -1:
			iX = plot.getX()
			iY = plot.getY()
			for iiX in range(iX-iRadius, iX+iRadius+1, 1):
				for iiY in range(iY-iRadius, iY+iRadius+1, 1):
					iCurrentPlot = 0
					pPlot = CyMap().plot(iiX,iiY)
					if pPlot.isNone() == False:
						if pPlot.getNumUnits() == 0:
							if (pPlot.isWater() == plot.isWater() and pPlot.isPeak() == False and pPlot.isCity() == False):
								iCurrentPlot = iCurrentPlot + 5
						if iCurrentPlot >= 1:
							iCurrentPlot = iCurrentPlot + CyGame().getSorenRandNum(5, "FindClearPlot")
							if iCurrentPlot >= iBestPlot:
								BestPlot = pPlot
								iBestPlot = iCurrentPlot
			return BestPlot
		iX = pUnit.getX()
		iY = pUnit.getY()
		for iiX in range(iX-iRadius, iX+iRadius+1, 1):
			for iiY in range(iY-iRadius, iY+iRadius+1, 1):
				iCurrentPlot = 0
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:
					if pPlot.getNumUnits() == 0:
						if pUnit.canMoveOrAttackInto(pPlot, False):
							iCurrentPlot = iCurrentPlot + 5
					for i in range(pPlot.getNumUnits()):
						if pPlot.getUnit(i).getOwner() == pUnit.getOwner():
							if pUnit.canMoveOrAttackInto(pPlot, False):
								iCurrentPlot = iCurrentPlot + 15
					if pPlot.isCity():
						if pPlot.getPlotCity().getOwner() == pUnit.getOwner():
							iCurrentPlot = iCurrentPlot + 50
					if (iX == iiX and iY == iiY):
						iCurrentPlot = 0
					if iCurrentPlot >= 1:
						iCurrentPlot = iCurrentPlot + CyGame().getSorenRandNum(5, "FindClearPlot")
						if iCurrentPlot >= iBestPlot:
							BestPlot = pPlot
							iBestPlot = iCurrentPlot
		return BestPlot

	def getRadiusZE( self, bEvent ):
		chance = gc.getGame().getSorenRandNum(100, 'rand for iRadius')
		if bEvent == False:
			if chance == 0:		#01%#
				iRadius = 2
			elif chance == 99:	#01%#
				iRadius = 3
			else:				#98%#
				iRadius = 1
		elif bEvent == True:
			if chance == 0:		#01%#
				iRadius = 1
			elif chance >= 98:	#02%#
				iRadius = 3
			else:				#97%#
				iRadius = 2
		return iRadius

	def canSetUnitZE( self, iPlayer, pPlot ):
		pPlot2 = -1
		if pPlot.isVisibleEnemyUnit(iPlayer) == False:
			pPlot2 = pPlot
		elif pPlot.isVisibleEnemyUnit(iPlayer) == True:
			pPlot2 = self.findClearPlot( -1, pPlot, 1 )
		return pPlot2

	def printMsg( self, iPromotion, iSpell, iFeature, iImprovement, iTerrain, pPlot, pPlayerNodeOwner, pUnit, iColorUnitOwner, iColorNodeOwner, szText ):
		if iPromotion != -1:
			szButton = gc.getPromotionInfo(iPromotion).getButton()
			if szText == -1:
				szBuffer = gc.getPromotionInfo(iPromotion).getDescription()
		elif iSpell != -1:
			szButton = gc.getSpellInfo(iSpell).getButton()
			if szText == -1:
				szBuffer = gc.getSpellInfo(iSpell).getDescription()
		elif iFeature != -1:
			szButton = gc.getFeatureInfo(iFeature).getButton()
			if szText == -1:
				szBuffer = gc.getFeatureInfo(iFeature).getDescription()
		elif iImprovement != -1:
			szButton = CyArtFileMgr().getImprovementArtInfo(gc.getImprovementInfo(iImprovement).getArtDefineTag()).getButton()
			if szText == -1:
				szBuffer = gc.getImprovementInfo(iImprovement).getDescription()
		elif iTerrain != -1:
			szButton = gc.getTerrainInfo(iTerrain).getButton()
			if szText == -1:
				szBuffer = gc.getTerrainInfo(iTerrain).getDescription()
		if szText == -1:
			szText = localText.getText("TXT_KEY_PRINT_MSG",(szBuffer,szBuffer))
			### msg: %s1 ### (log only)
		n = 1
		if pPlayerNodeOwner != -1 and pUnit != -1:
			if gc.getTeam(pPlayerNodeOwner.getTeam()).isAtWar(pUnit.getTeam()):
				if pPlot.isVisibleEnemyUnit(pPlayerNodeOwner.getID()):
					n = 2
		for i in range(n):
			if i == 0 and pUnit != -1:
				iPlayer = gc.getPlayer(pUnit.getOwner()).getID()
				iColor = iColorUnitOwner
			if i == 0 and pUnit == -1:
				iPlayer = pPlot.getOwner()
				iColor = iColorUnitOwner
			if i  == 1:
				iPlayer = pPlayerNodeOwner.getID()
				iColor = iColorNodeOwner
			CyInterface().addMessage(iPlayer,True,-1,szText,'',0,szButton,ColorTypes(iColor),pPlot.getX(),pPlot.getY(),True,True)

	def doMsgGoodAndBadZE ( self, pPlayerNodeOwner, pUnit, szButton, iColorUnitOwner, iColorNodeOwner, szText, iX, iY ):
		n = 1
		if gc.getTeam(pPlayerNodeOwner.getTeam()).isAtWar(pUnit.getTeam()):
			pPlot = CyMap().plot(iX,iY)
			if pPlot.isVisibleEnemyUnit(pPlayerNodeOwner.getID()):
				n = 2
		for i in range(n):
			if i == 0:
				iPlayer = gc.getPlayer(pUnit.getOwner()).getID()
				iColor = iColorUnitOwner
			elif i  == 1:
				iPlayer = pPlayerNodeOwner.getID()
				iColor = iColorNodeOwner
			CyInterface().addMessage(iPlayer,True,-1,szText,'',0,szButton,ColorTypes(iColor),iX,iY,True,True)

	def screenMsgZE( self, iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY ):
		pPlot = CyMap().plot(iX, iY)
		l_iN =      [
				gc.getInfoTypeForString("IMPROVEMENT_MANA_AIR"),
				gc.getInfoTypeForString("IMPROVEMENT_MANA_EARTH"),
				gc.getInfoTypeForString("IMPROVEMENT_MANA_ENCHANTMENT"),
				gc.getInfoTypeForString("IMPROVEMENT_MANA_ENTROPY")
				]
		szBuffer = gc.getImprovementInfo(i_itNode).getDescription()
		if iRadius == 3:
			pPlot.setImprovementType(-1)
			i_ctMsg2 = i_ctBadMsg
			szText = localText.getText("TXT_KEY_SCREEN_MSG_ZE_GAMETXT1",(szBuffer,szBuffer))
			### msg: Our channelers have lost control of a %s1. It flared up, affecting the surrounding area. The outbreak was so immense that the %s1 was destroied!
			if i_itNode in l_iN:
				szText = localText.getText("TXT_KEY_SCREEN_MSG_ZE_GAMETXT2",(szBuffer,szBuffer))
				### msg: Our channelers have lost control of an %s1. It flared up, affecting the surrounding area. The outbreak was so immense that the %s1 was destroied!
		elif iRadius != 3 and bEvent == True:
			i_ctMsg2 = i_ctNodeMsg
			szText = localText.getText("TXT_KEY_SCREEN_MSG_ZE_GAMETXT3",(szBuffer,szBuffer))
			### msg: Our channelers have lost control of an %s1. It flared up, affecting the surrounding area!
			if i_itNode in l_iN:
				szText = localText.getText("TXT_KEY_SCREEN_MSG_ZE_GAMETXT4",(szBuffer,szBuffer))
				### msg: Our channelers have lost control of an %s1. It flared up, affecting the surrounding area!
		else:
			i_ctMsg2 = i_ctBadMsg
			szText = localText.getText("TXT_KEY_SCREEN_MSG_ZE_GAMETXT5",(szBuffer,szBuffer))
			### msg: We lost control of a %s1. It flared up and affected the surrounding area!
			if i_itNode in l_iN:
				szText = localText.getText("TXT_KEY_SCREEN_MSG_ZE_GAMETXT6",(szBuffer,szBuffer))
				### msg: We lost control of an %s1. It flared up and affected the surrounding area!
		szNodeButton = CyArtFileMgr().getImprovementArtInfo(gc.getImprovementInfo(i_itNode).getArtDefineTag()).getButton()
		CyInterface().addMessage(iPlayer,True,15,szText,'',0,szNodeButton,ColorTypes(i_ctMsg2),iX,iY,True,True)

	def doEmpowerElementalZE( self, pPlayerNodeOwner, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iX, iY ):
		if not pUnit.isDelayedDeath():
			if pUnit.getDuration() > 0:
				chance = CyGame().getSorenRandNum( 10, "chance")
				if chance == 1 or bEvent == True:
					if pUnit.isHasPromotion(gc.getInfoTypeForString("PROMOTION_WEAK")) == True:
						pUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_WEAK"), false)
				iPromotion = -1
				lPromotions = [
							gc.getInfoTypeForString("PROMOTION_DANCE_OF_BLADES"),
							gc.getInfoTypeForString("PROMOTION_HASTED"),
							gc.getInfoTypeForString("PROMOTION_MORALE"),
							gc.getInfoTypeForString("PROMOTION_WARCRY"),
							gc.getInfoTypeForString("PROMOTION_EMPOWER1"),
							gc.getInfoTypeForString("PROMOTION_EMPOWER2"),
							gc.getInfoTypeForString("PROMOTION_EMPOWER3"),
							gc.getInfoTypeForString("PROMOTION_EMPOWER4"),
							]
				if bEvent == True:
					lPromotions.append( gc.getInfoTypeForString("PROMOTION_BLITZ") )
					lPromotions.append( gc.getInfoTypeForString("PROMOTION_MOBILITY1") )
					lPromotions.append( gc.getInfoTypeForString("PROMOTION_MOBILITY2") )
					lPromotions.append( gc.getInfoTypeForString("PROMOTION_MOBILITY1") )
					lPromotions.append( gc.getInfoTypeForString("PROMOTION_HEROIC_DEFENSE") )
					lPromotions.append( gc.getInfoTypeForString("PROMOTION_HEROIC_DEFENSE2") )
					lPromotions.append( gc.getInfoTypeForString("PROMOTION_HEROIC_STRENGTH") )
					lPromotions.append( gc.getInfoTypeForString("PROMOTION_HEROIC_STRENGTH2") )
					lPromotions.append( gc.getInfoTypeForString("PROMOTION_STRONG") )

				lPromotions.append( gc.getInfoTypeForString("PROMOTION_EMPOWER5") )
				for i in range(len(lPromotions)):
					if pUnit.isHasPromotion(lPromotions[i]) == False:
						pUnit.setHasPromotion(lPromotions[i], true)
						iPromotion = lPromotions[i]
				if iPromotion != -1:
					szText = localText.getText("TXT_KEY_DO_EMPOWER_ELEMENTAL_ZE_GAMETXT1",())
					### msg: Empowered ### (log only)
					szButton = gc.getPromotionInfo(iPromotion).getButton()
					self.doMsgGoodAndBadZE ( pPlayerNodeOwner, pUnit, szButton, i_ctNodeMsg, i_ctBadMsg, szText, iX, iY )

	def doEmpowerZE( self, pPlayerNodeOwner, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iX, iY ):
		iPromotion = -1
		lPromotions = [
					gc.getInfoTypeForString("PROMOTION_DANCE_OF_BLADES"),
					gc.getInfoTypeForString("PROMOTION_HASTED"),
					gc.getInfoTypeForString("PROMOTION_BLUR"),
					gc.getInfoTypeForString("PROMOTION_SHADOWWALK"),
					gc.getInfoTypeForString("PROMOTION_COURAGE"),
					gc.getInfoTypeForString("PROMOTION_LOYALTY"),
					gc.getInfoTypeForString("PROMOTION_REGENERATION"),
					gc.getInfoTypeForString("PROMOTION_MORALE"),
					gc.getInfoTypeForString("PROMOTION_BLESSED")
					]
		if bEvent == True:
			lPromotions.append( gc.getInfoTypeForString("PROMOTION_WARCRY") )
			lPromotions.append( gc.getInfoTypeForString("PROMOTION_EMPOWER1") )
		for i in range(len(lPromotions)):
			if pUnit.isHasPromotion(lPromotions[i]) == False:
				pUnit.setHasPromotion(lPromotions[i], true)
				iPromotion = lPromotions[i]
		if iPromotion != -1:
			szText = localText.getText("TXT_KEY_DO_EMPOWER_ZE_GAMETXT1",())
			### msg: Empowered ### (log only)
			szButton = gc.getPromotionInfo(iPromotion).getButton()
			self.doMsgGoodAndBadZE ( pPlayerNodeOwner, pUnit, szButton, i_ctNodeMsg, i_ctBadMsg, szText, iX, iY )

	def doPromotionZE( self, pPlayerNodeOwner, pUnit, iPromotion, iColor1, iColor2, iX, iY ):
		if pUnit.isHasPromotion(iPromotion) == False:
			pUnit.setHasPromotion(iPromotion, true)
			szButton = gc.getPromotionInfo(iPromotion).getButton()
			szBuffer = gc.getPromotionInfo(iPromotion).getDescription()
			szText = localText.getText("TXT_KEY_DO_PROMOTION_ZE_GAMETXT1",(szBuffer,szBuffer))
			### msg: %s ### (log only)
			self.doMsgGoodAndBadZE ( pPlayerNodeOwner, pUnit, szButton, iColor1, iColor2, szText, iX, iY )

	def doRemovePromotionZE( self, pPlayerNodeOwner, pUnit, iPromotion, iColor1, iColor2, iX, iY ):
		if pUnit.isHasPromotion(iPromotion) == True:
			pUnit.setHasPromotion(iPromotion, false)
			szButton = gc.getPromotionInfo(iPromotion).getButton()
			szBuffer = gc.getPromotionInfo(iPromotion).getDescription()
			szText = localText.getText("TXT_KEY_DO_REMOVE_PROMOTION_ZE_GAMETXT1",(szBuffer,szBuffer))
			### msg: %s ### (log only)
			self.doMsgGoodAndBadZE ( pPlayerNodeOwner, pUnit, szButton, iColor1, iColor2, szText, iX, iY )

	def doPromotionChanceZE( self, iChance, bEvent, pPlayerNodeOwner, pUnit, iPromotion, iColor1, iColor2, iX, iY ):
		if bEvent == -1:
			bEvent = False
		chance = CyGame().getSorenRandNum( 100, "chance")
		if (chance + 1) <= iChance or bEvent == True:
			self.doPromotionZE( pPlayerNodeOwner, pUnit, iPromotion, iColor1, iColor2, iX, iY )

	def doVitalize( self, pPlot, iColor ):
		i_stVitalize = gc.getInfoTypeForString("SPELL_VITALIZE")
		i_ttSnow = gc.getInfoTypeForString("TERRAIN_SNOW")
		i_ttTundra = gc.getInfoTypeForString("TERRAIN_TUNDRA")
		i_ttPlains = gc.getInfoTypeForString("TERRAIN_PLAINS")
		i_ttDesert = gc.getInfoTypeForString("TERRAIN_DESERT")
		i_ttMarsh = gc.getInfoTypeForString("TERRAIN_MARSH")
		i_ttGrass = gc.getInfoTypeForString("TERRAIN_GRASS")
		if(pPlot.getTerrainType() != i_ttGrass):
			if pPlot.isOwned():
				self.printMsg( -1, i_stVitalize, -1, -1, -1, pPlot, -1, -1, iColor, -1, -1 )
				### msg: %s1 ### (<--Vitalize) (log only)
		if(pPlot.getTerrainType() == i_ttSnow):
			pPlot.setTerrainType(i_ttTundra,True,True)
		elif(pPlot.getTerrainType() == i_ttTundra):
			pPlot.setTerrainType(i_ttPlains,True,True)
		elif(pPlot.getTerrainType() == i_ttDesert):
			pPlot.setTerrainType(i_ttPlains,True,True)
		elif(pPlot.getTerrainType() == i_ttPlains):
			pPlot.setTerrainType(i_ttGrass,True,True)
		elif(pPlot.getTerrainType() == i_ttMarsh):
			pPlot.setTerrainType(i_ttGrass,True,True)

	def doTrees( self, pPlot, iColor ):
		i_ftForestAncient = gc.getInfoTypeForString("FEATURE_FOREST_ANCIENT")
		i_ftForest = gc.getInfoTypeForString("FEATURE_FOREST")
		i_ftJungle = gc.getInfoTypeForString("FEATURE_JUNGLE")
		i_ftForestNew = gc.getInfoTypeForString("FEATURE_FOREST_NEW")
		i_ftForestBurnt = gc.getInfoTypeForString("FEATURE_FOREST_BURNT")
		i_ttSnow = gc.getInfoTypeForString("TERRAIN_SNOW")
		i_ttTundra = gc.getInfoTypeForString("TERRAIN_TUNDRA")
		i_ttDesert = gc.getInfoTypeForString("TERRAIN_DESERT")
		i_ttBurningSands = gc.getInfoTypeForString("TERRAIN_BURNING_SANDS")
		if pPlot.isCity() == False:
			if pPlot.isPeak() == False and pPlot.isWater() == False:
				if pPlot.getPlotCounter() < 10:
					iFeature = -1
					iType = 0
					if ( (pPlot.getImprovementType() == -1 and pPlot.getFeatureType() == -1) or pPlot.getFeatureType() == i_ftForestBurnt):
						if pPlot.getTerrainType() != i_ttDesert and pPlot.getTerrainType() != i_ttBurningSands:
							iFeature = i_ftForestNew
					elif (pPlot.getFeatureType() == i_ftForestNew):
						iType = CyGame().getSorenRandNum( 2, "iType")
						if pPlot.getTerrainType() == i_ttSnow or pPlot.getTerrainType() == i_ttTundra:
							iType = 2
						iFeature = i_ftForest
					elif (pPlot.getFeatureType() == i_ftForest or pPlot.getFeatureType() == i_ftJungle):
						iFeature = i_ftForestAncient
					if iFeature != -1:
						pPlot.setFeatureType(iFeature, iType)
						if pPlot.isOwned():
							self.printMsg( -1, -1, iFeature, -1, -1, pPlot, -1, -1, iColor, -1, -1 )
							### msg: %s1 ###

	def doConvertUnit( self, pPlayerNodeOwner, pPlayerUnitOwner, pUnitOld, iUnitNew, pPlot, szText, i_ctNodeMsg, i_ctBadMsg ):
		pNewUnit = pPlayerUnitOwner.initUnit(iUnitNew, pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
		if pUnitOld != -1:
			pNewUnit.convert(pUnitOld)
		if szText == -1:
			szBuffer = gc.getUnitInfo(iUnitNew).getDescription()
			szText = localText.getText("TXT_KEY_DO_CONVERT_UNIT_ZE_GAMETXT1",(szBuffer,szBuffer))
			### msg: %s ### (log only)
		szButton = gc.getUnitInfo(iUnitNew).getButton()
		self.doMsgGoodAndBadZE ( pPlayerNodeOwner, pNewUnit, szButton, i_ctNodeMsg, i_ctBadMsg, szText, pPlot.getX(), pPlot.getY() )

	def doBuildingZE( self, pPlot, iBuilding, iColor ):
		pCity = pPlot.getPlotCity()
		if pCity.getNumActiveBuilding(iBuilding) == False:
			pCity.setNumRealBuilding(iBuilding,1)
			szBuffer = gc.getBuildingInfo(iBuilding).getDescription()
			szText = localText.getText("TXT_KEY_DO_BUILDING_ZE_GAMETXT1",(szBuffer,szBuffer))
			CyInterface().addMessage(pPlot.getOwner(),True,-1,szText,'',0,CyArtFileMgr().getBuildingArtInfo(gc.getBuildingInfo(iBuilding).getArtDefineTag()).getButton(),ColorTypes(iColor),pPlot.getX(),pPlot.getY(),True,True)
			### msg: %s ### (log only)

	def doDestroyBuildingZE( self, pPlot, iColor ):
		pCity = pPlot.getPlotCity()
		i_btPalisade = gc.getInfoTypeForString("BUILDING_PALISADE")
		i_btWalls = gc.getInfoTypeForString("BUILDING_WALLS")
		bDestroy = false
		if pCity.getNumActiveBuilding(i_btWalls) == True:
			iBuilding = i_btWalls
			bDestroy = true
		elif pCity.getNumActiveBuilding(i_btPalisade) == True:
			iBuilding = i_btPalisade
			bDestroy = true
		if bDestroy == true:
			pCity.setNumRealBuilding(iBuilding,0)
			szBuffer = gc.getBuildingInfo(iBuilding).getDescription()
			szText = localText.getText("TXT_KEY_DO_DESTROY_BUILDING_ZE_GAMETXT1",(szBuffer,szBuffer))
			CyInterface().addMessage(pPlot.getOwner(),True,25,szText,'',0,CyArtFileMgr().getBuildingArtInfo(gc.getBuildingInfo(iBuilding).getArtDefineTag()).getButton(),ColorTypes(iColor),pPlot.getX(),pPlot.getY(),True,True)
			### msg: %s destroyed! ###

	def doHealZE( self, pPlayerNodeOwner, pUnit, iSpell, iColor1, iColor2, iX, iY, bEvent ):
		if pUnit.getDamage() == 0:
			pUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_MORALE"), true)
		elif pUnit.getDamage() > 0:
			iDmg = int(pUnit.getDamage() * 0.5)
			if bEvent == True:
				iDmg = 0
			pUnit.setDamage(iDmg, PlayerTypes.NO_PLAYER)
			iSpell2 = gc.getInfoTypeForString("SPELL_HEAL")
			szText = localText.getText("TXT_KEY_DO_HEAL_ZE_GAMETXT1",())
			### msg: Unit healed. ### (only log msg)
			if iSpell != -1:
				iSpell2 = iSpell
				szBuffer = gc.getSpellInfo(iSpell2).getDescription()
				szText = localText.getText("TXT_KEY_DO_PROMOTION_ZE_GAMETXT1",(szBuffer,szBuffer))
				### msg: %s1  ### (log only)
			szButton = gc.getSpellInfo(iSpell2).getButton()
			self.doMsgGoodAndBadZE ( pPlayerNodeOwner, pUnit, szButton, iColor1, iColor2, szText, iX, iY )

	def doDamageZE( self, pPlayerNodeOwner, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iX, iY ):
		pPlot = CyMap().plot(iX,iY)
		i_dtCold = gc.getInfoTypeForString("DAMAGE_COLD")
		i_dtDeath = gc.getInfoTypeForString("DAMAGE_DEATH")
		i_dtFire = gc.getInfoTypeForString("DAMAGE_FIRE")
		i_dtHoly = gc.getInfoTypeForString("DAMAGE_HOLY")
		i_dtLightning = gc.getInfoTypeForString("DAMAGE_LIGHTNING")
		i_dtPhysical = gc.getInfoTypeForString("DAMAGE_PHYSICAL")
		i_dtPoison = gc.getInfoTypeForString("DAMAGE_POISON")
		i_dtUnholy = gc.getInfoTypeForString("DAMAGE_UNHOLY")
		l_iDmgReduceImprovements = self.getDmgReduceImprovements()
		if i_DmgType == i_dtCold or i_DmgType == i_dtDeath or i_DmgType == i_dtHoly or i_DmgType == i_dtUnholy:
			if gc.getUnitInfo(pUnit.getUnitType()).getMoves() >= 2:
				pUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_SLOW"), true)
		iDmg = int((CyGame().getSorenRandNum(i_rDmg,"rand Dmg") + i_sDmg) * 0.5)
		if (pPlot.isCity() == False) and (not pPlot.getImprovementType() in l_iDmgReduceImprovements):
			iDmg = CyGame().getSorenRandNum(i_rDmg,"rand Dmg") + i_sDmg
		pUnit.doDamageNoCaster(iDmg, 95, i_DmgType, False)

		szText = localText.getText("TXT_KEY_DO_DAMAGE_ZE_GAMETXT1",())
		### msg: Unit damaged. ### (only log msg)
		n = 1
		if gc.getTeam(pPlayerNodeOwner.getTeam()).isAtWar(pUnit.getTeam()):
			if pPlot.isVisibleEnemyUnit(pPlayerNodeOwner.getID()):
				n = 2
		for i in range(n):
			if i == 0:
				iPlayer = gc.getPlayer(pUnit.getOwner()).getID()
				iColor = i_ctBadMsg
				iNoLog = 1
			elif i  == 1:
				iPlayer = pPlayerNodeOwner.getID()
				iColor = i_ctNodeMsg
				iNoLog = 0
			if i_DmgType == i_dtCold:
				CyInterface().addMessage(iPlayer,True,-1,szText,'',iNoLog,'Art/Interface/Buttons/cold.dds',ColorTypes(iColor),iX,iY,True,True)
			elif i_DmgType == i_dtDeath:
				CyInterface().addMessage(iPlayer,True,-1,szText,'',iNoLog,'Art/Interface/Buttons/death.dds',ColorTypes(iColor),iX,iY,True,True)
			elif i_DmgType == i_dtFire:
				CyInterface().addMessage(iPlayer,True,-1,szText,'',iNoLog,'Art/Interface/Buttons/fire.dds',ColorTypes(iColor),iX,iY,True,True)
			elif i_DmgType == i_dtHoly:
				CyInterface().addMessage(iPlayer,True,-1,szText,'',iNoLog,'Art/Interface/Buttons/holy.dds',ColorTypes(iColor),iX,iY,True,True)
			elif i_DmgType == i_dtLightning:
				CyInterface().addMessage(iPlayer,True,-1,szText,'',iNoLog,'Art/Interface/Buttons/lightning.dds',ColorTypes(iColor),iX,iY,True,True)
			elif i_DmgType == i_dtPhysical:
				CyInterface().addMessage(iPlayer,True,-1,szText,'',iNoLog,'Art/Interface/Buttons/physical.dds',ColorTypes(iColor),iX,iY,True,True)
			elif i_DmgType == i_dtPoison:
				CyInterface().addMessage(iPlayer,True,-1,szText,'',iNoLog,'Art/Interface/Buttons/poison.dds',ColorTypes(iColor),iX,iY,True,True)
			elif i_DmgType == i_dtUnholy:
				CyInterface().addMessage(iPlayer,True,-1,szText,'',iNoLog,'Art/Interface/Buttons/unholy.dds',ColorTypes(iColor),iX,iY,True,True)

	def getTempIllusion( self, iiX, iiY, iUnit, bEvent, l_sPromotions, l_sSpells ):
		pPlot = CyMap().plot(iiX,iiY)
		l_sPromotions += [ "HELD", "INVISIBLE", "FREE_UNIT", "CHANNELING1", "CHANNELING2", "CHANNELING3" ]
		l_iPromotions = []
		for i in range(len(l_sPromotions)):
			l_iPromotions += [ gc.getInfoTypeForString(str( "PROMOTION_" + str(l_sPromotions[i]) )) ]
		if iUnit == -1:
			iUnit = gc.getInfoTypeForString("UNIT_THADE")
		iPlayerCityOwner = pPlot.getOwner()
		pPlayerCityOwner = gc.getPlayer(iPlayerCityOwner)
		pNewUnit = pPlayerCityOwner.initUnit(iUnit, iiX, iiY, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
		for i in range(len(l_iPromotions)):
			pNewUnit.setHasPromotion(l_iPromotions[i], True)
		#pNewUnit.getStrBoost()
		pNewUnit.changeStrBoost(-pNewUnit.baseCombatStr())
		pNewUnit.getGroup().pushMission(MissionTypes.MISSION_FORTIFY, iiX, iiY, 0, False, False, MissionAITypes.MISSIONAI_GUARD_CITY, pNewUnit.plot(), pNewUnit)
		argsListEst = self.getEstEnd()
		count = argsListEst[1]		# ### 4,6,8,16
		if bEvent == False:
			count = 1 + int( count / 4 )
		pNewUnit.setDuration(count)
		pNewUnit.changeImmobileTimer(count)
		for i in range(len(l_iPromotions)):
			pNewUnit.setHasPromotion(l_iPromotions[i], True)
		if l_sSpells != -1:
			l_iSpells = []
			for i in range(len(l_sSpells)):
				l_iSpells += [ gc.getInfoTypeForString(str( "SPELL_" + str(l_sSpells[i]) )) ]
			for i in range(len(l_iSpells)):
				pNewUnit.cast(l_iSpells[i])
		pNewUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_ILLUSION"), True)
		pNewUnit.setName("Whisper of the Mana Flare")
		return pNewUnit




 
Yey! Modular Mana Flares. I'm playing Orbis at the moment, but I miss the simplicity of Modular mods in FF :( - so easy to make my own changes in Civ. I'm studying python so that I can make a WoW/Eberron mod based on FF. :)

I understand a few of the most basic python codes (mostly the functions and loops) but what I don't get is where to find the lists of basic commands like: getCy.* or the getUnitPlot - where can I see what these commands do? Is there a list for this?
 
There is an API for things like that.
I will post the link as soon as possible.
 
Waah! So that's it... I've been searching in the Python Community Forums :p
Makes sense that Civ have it's own python commands...how stupid of me.
 
not only civ, but also FFH. And the larger modmods like FF also add new python functions.
 
Update:
Small update: Now it's compatible with FF 051C(3) (see first post).
(No bugfixes or changes)



Spoiler GIR02ManaFlares ( Part 3 / 6 ) :

Spoiler GIR02ManaFlares.py ( PART 2 / 5 ) :

Code:
	def getDmgReduceImprovements( self ):
		l_sDmgReduceImprovements = [ "CASTLE", "CITADEL", "CITADEL_OF_LIGHT", "FORT", "GOBLIN_FORT", "TOWER", "MARNOK_HILLGIANT_STEADING", "DWARVEN_MINE", "DWARVEN_SETTLEMENT", "DWARVEN_HALL", "DWARVEN_FORTRESS", "GOBLIN_FORT_CLEARED" ]
		l_iDmgReduceImprovements = [ gc.getInfoTypeForString( "IMPROVEMENT_" + sDmgReduceImprovements ) for sDmgReduceImprovements in l_sDmgReduceImprovements ]
		return l_iDmgReduceImprovements

	def getAntiTeleImprovements( self ):
		l_sAntiTeleImprovements = [ "BROKEN_SEPULCHER", "BROKEN_SEPULCHER_EXPLORED", "CAGE", "CASTLE", "CITADEL", "CITADEL_OF_LIGHT", "FORT", "GOBLIN_FORT", "GUARDIAN", "RING_OF_CARCER", "TOWER", "MARNOK_HILLGIANT_STEADING", "DWARVEN_MINE", "DWARVEN_SETTLEMENT", "DWARVEN_HALL", "DWARVEN_FORTRESS", "TOWER_OF_EYES", "GOBLIN_FORT_CLEARED" ]
		l_iAntiTeleImprovements = [ gc.getInfoTypeForString( "IMPROVEMENT_" + sAntiTeleImprovements ) for sAntiTeleImprovements in l_sAntiTeleImprovements ]
		return l_iAntiTeleImprovements

	def isHasAntiTelePromotions( self, pUnit ):
		l_sAntiTelePromotions = [ "HELD", "AVATAR", "DRAGON" ]
		l_iAntiTelePromotions = [ gc.getInfoTypeForString( "PROMOTION_" + sAntiTelePromotions ) for sAntiTelePromotions in l_sAntiTelePromotions ]
		for i in range(len(l_iAntiTelePromotions)):
			if pUnit.isHasPromotion(l_iAntiTelePromotions[i]) == True:
				return True
		return False

	def getl_iLandTerrainType( self, b_isWater, b_isImpassable ):
		l_iLandTerrainType = []
		iLenlListElement = gc.getNumTerrainInfos()
		for iNumInfos in range(iLenlListElement):
			if gc.getTerrainInfo(iNumInfos).isWater() == b_isWater:
				if gc.getTerrainInfo(iNumInfos).isImpassable() == b_isImpassable:
					l_iLandTerrainType.append(iNumInfos)
		return l_iLandTerrainType

	def isHasSRPromotion( self, pUnit ):
		l_sSRPromotion = [ "AVATAR", "DRAGON", "ELEMENTAL", "GOLEM", "ILLUSION", "PUPPET" ]
		l_iSRPromotion = [ gc.getInfoTypeForString( "PROMOTION_" + sSRPromotion ) for sSRPromotion in l_sSRPromotion ]
		for i in range(len(l_iSRPromotion)):
			if pUnit.isHasPromotion(l_iSRPromotion[i]) == True:
				return True
		return False

	def isSRUnitCombat( self, pUnit ):
		l_sSRUnitCombat = [ "ARCHER", "MELEE", "MOUNTED", "RECON", "ADEPT", "ANIMAL", "BEAST", "DISCIPLE" ]
		l_iSRUnitCombat = [ gc.getInfoTypeForString( "UNITCOMBAT_" + sSRUnitCombat ) for sSRUnitCombat in l_sSRUnitCombat ]
		if pUnit.getUnitCombatType() in l_iSRUnitCombat:
			return True
		return False

	def doSpellChanceZE( self, iChanceNoEvent, iChanceEvent, bEvent, pUnit, iSpell ):
		iChance = iChanceEvent
		if bEvent == False or bEvent == -1:
			iChance = iChanceNoEvent
		chance = CyGame().getSorenRandNum( 100, "chance")
		if (chance + 1) <= iChance:
			pUnit.cast(iSpell)

# #########################################################
# ### 				Mana Flares: Start 					###
# #########################################################
	def doFlareAirNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString('EFFECT_SPELL1'),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_MAELSTROM",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_uctNaval = gc.getInfoTypeForString("UNITCOMBAT_NAVAL")
		i_utAirElemental = gc.getInfoTypeForString("UNIT_AIR_ELEMENTAL")
		i_utLightningElemental = gc.getInfoTypeForString("UNIT_LIGHTNING_ELEMENTAL")
		l_iAntiTeleImprovements = self.getAntiTeleImprovements()
		i_ptFairWinds = gc.getInfoTypeForString("PROMOTION_FAIR_WINDS")
		i_ptHasted = gc.getInfoTypeForString("PROMOTION_HASTED")
		i_stHastedZE = gc.getInfoTypeForString("SPELL_HASTE_ZE")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_BLUE")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_LIGHTNING")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_AIR")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		# ### Sammle Gewichtungsplots ###
		i_Gewichtung = -1
		l_iPlots0 = []
		l_iPlots1 = []
		l_Gewichtung = [
					0,0,0,0,0,
					0,1,1,1,0,
					0,1,2,1,0,
					0,1,1,1,0,
					0,0,0,0,0
							]
					###369
					###258
					###147

		for iXLoop in range(iX - 2, iX + 3, 1):
			for iYLoop in range(iY - 2, iY + 3, 1):
				i_Gewichtung += 1
				pLoopPlot = CyMap().plot(iXLoop, iYLoop)
				if pLoopPlot.isNone() == False:
					iPlot = iXLoop * 1000 + iYLoop
					if ( l_Gewichtung[i_Gewichtung] == 0 ):
						l_iPlots0.append( iPlot )
					elif ( l_Gewichtung[i_Gewichtung] == 1 ):
						l_iPlots1.append( iPlot )

		# ### Ring 0 --> Ring 1 --> Plot 2 ###
		iRing = -1
		while ( iRing < 2 ):
			iRing += 1
			i_Gewichtung = -1
			for iXLoop in range(iX - 2, iX + 3, 1):
				for iYLoop in range(iY - 2, iY + 3, 1):
					i_Gewichtung += 1
					pLoopPlot = CyMap().plot(iXLoop, iYLoop)
					if ( l_Gewichtung[i_Gewichtung] == iRing ):
						if pLoopPlot.isNone() == False:
							if pLoopPlot.isCity() == False:
								if not pLoopPlot.getImprovementType() in l_iAntiTeleImprovements:
									iNumUnits = pLoopPlot.getNumUnits()
									for i_nUnits in range(iNumUnits):
										# ### i in range() beginnt mit 0 --> zB i in range(2) --> ergibt 0, dann 1 ###
										pUnit = pLoopPlot.getUnit(iNumUnits - (1+i_nUnits))
										if self.isHasAntiTelePromotions( pUnit ) == False:
											iUnit = gc.getUnitInfo(pUnit.getUnitType())
											pPlayer2 = gc.getPlayer(pUnit.getOwner())
											iPlayer2 = pPlayer2.getID()
											l_MoglicherNeuerPlot = []
											for iiXLoop in range(iXLoop - 1, iXLoop + 2, 1):
												for iiYLoop in range(iYLoop - 1, iYLoop + 2, 1):
													pLoopPlot2 = CyMap().plot(iiXLoop, iiYLoop)
													if pLoopPlot2.isVisibleEnemyUnit(iPlayer2) == False:
														if (pLoopPlot2.isWater() == pLoopPlot.isWater() and pLoopPlot2.isPeak() == False and pLoopPlot2.isCity() == False):
															iLoopPlot2 = iiXLoop * 1000 + iiYLoop
															bNeuerPlot = False
															if iRing == 0:
																if not iLoopPlot2 in l_iPlots0:
																	if not iLoopPlot2 in l_iPlots1:
																		bNeuerPlot = True
															elif iRing == 1:
																if iLoopPlot2 in l_iPlots0:
																	bNeuerPlot = True
															elif iRing == 2:
																if iLoopPlot2 in l_iPlots1:
																	bNeuerPlot = True
															if bNeuerPlot == True:
																l_MoglicherNeuerPlot.append(pLoopPlot2)
											if len(l_MoglicherNeuerPlot) > 0:
												iRand = CyGame().getSorenRandNum( len(l_MoglicherNeuerPlot), "Random pPlot")
												pLoopPlot2 = l_MoglicherNeuerPlot[iRand]
												iiXLoop = pLoopPlot2.getX()
												iiYLoop = pLoopPlot2.getY()
												pUnit.setXY(iiXLoop, iiYLoop, true, true, true)
												szText = localText.getText("TXT_KEY_DOFLAREAIRNODEZE_GAMETXT5",())
												### msg: Unit blown away. ### (log only)
												CyInterface().addMessage(iPlayer2,True,-1,szText,'',0,'Art/Interface/Buttons/units/air elemental.dds',ColorTypes(i_ctNodeMsg),iiXLoop,iiYLoop,True,True)
												if pUnit.getUnitCombatType() == i_uctNaval:
													self.doPromotionZE( pPlayer, pUnit, i_ptFairWinds, i_ctNodeMsg, i_ctBadMsg, iiXLoop, iiYLoop )
													if bEvent == True:
														chance = CyGame().getSorenRandNum( 4, "chance")
														if chance > 0:
															pUnit.setHasPromotion(i_ptHasted, true)
															self.doSpellChanceZE( 100, 100, bEvent, pUnit, i_stHastedZE )
												if pUnit.getUnitType() == i_utAirElemental or pUnit.getUnitType() == i_utLightningElemental:
													self.doEmpowerElementalZE( pPlayer, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iiXLoop, iiYLoop )
													pUnit.setHasPromotion(i_ptFairWinds, true)
													self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiXLoop, iiYLoop, bEvent )
												if pUnit.getUnitType() != i_utAirElemental and pUnit.getUnitType() != i_utLightningElemental:
													i_rDmg = 0 + 2 * iRadius
													i_sDmg = iRing * 10
													self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiXLoop, iiYLoop )
												iRand = 100
												if bEvent == True:
													iRand = 15
												chance = CyGame().getSorenRandNum( iRand, "chance")
												if chance == 1:
													iPromotion = gc.getInfoTypeForString("PROMOTION_LIGHTNING_RESISTANCE")
													self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctNodeMsg, i_ctBadMsg, iiXLoop, iiYLoop )
												elif chance == 2:
													iPromotion = gc.getInfoTypeForString("PROMOTION_IMMUNE_LIGHTNING")
													self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctNodeMsg, i_ctBadMsg, iiXLoop, iiYLoop )

	def doFlareBodyNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_HASTE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ptSlow = gc.getInfoTypeForString("PROMOTION_SLOW")
		l_iPromotions = [
					gc.getInfoTypeForString("PROMOTION_DISEASED"),
					gc.getInfoTypeForString("PROMOTION_WITHERED"),
					gc.getInfoTypeForString("PROMOTION_POISONED"),
					i_ptSlow
					]
		i_ptHasted = gc.getInfoTypeForString("PROMOTION_HASTED")
		i_ptHastedZE = gc.getInfoTypeForString("PROMOTION_HASTED_ZE")
		i_stHastedZE = gc.getInfoTypeForString("SPELL_HASTE_ZE")
		i_ptRegeneration = gc.getInfoTypeForString("PROMOTION_REGENERATION")
		i_ptGolem = gc.getInfoTypeForString("PROMOTION_GOLEM")
		i_utFleshGolem = gc.getInfoTypeForString("UNIT_FLESH_GOLEM")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_RED_TEXT")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_BODY")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())

						if pUnit.isHasPromotion(i_ptGolem) == False or pUnit.getUnitType() == i_utFleshGolem:
							self.doPromotionChanceZE( 25, -1, pPlayer, pUnit, i_ptHasted, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doPromotionChanceZE( 25, bEvent, pPlayer, pUnit, i_ptRegeneration, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							if bEvent == True:
								self.doSpellChanceZE( -1, 75, bEvent, pUnit, i_stHastedZE )
							if bEvent == True:
								if pUnit.getUnitType() == i_utFleshGolem:
									self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
									self.doEmpowerZE( pPlayer, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

						if self.isSRUnitCombat( pUnit ) == True:
							if self.isHasSRPromotion( pUnit ) == False:
								self.doPromotionChanceZE( 50, bEvent, pPlayer, pUnit, i_ptHasted, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

								for ii in range(len(l_iPromotions)):
									if pUnit.isHasPromotion(l_iPromotions[ii]) == True:
										chance = CyGame().getSorenRandNum( 10, "remove Promotion")
										if chance <= 7 or bEvent == True or l_iPromotions[ii] == i_ptSlow:
											self.doRemovePromotionZE( pPlayer, pUnit, l_iPromotions[ii], i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
											### msg: %s1 removed. ### (log only)

	def doFlareChaosNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_HASTE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ttSnow = gc.getInfoTypeForString("TERRAIN_SNOW")
		i_ptMutated = gc.getInfoTypeForString("PROMOTION_MUTATED")
		i_ptDanceOfBlades = gc.getInfoTypeForString("PROMOTION_DANCE_OF_BLADES")
		i_ptPoisoned = gc.getInfoTypeForString("PROMOTION_POISONED")
		i_uctSiege = gc.getInfoTypeForString("UNITCOMBAT_SIEGE")
		i_uctNaval = gc.getInfoTypeForString("UNITCOMBAT_NAVAL")
		i_dtPoison = gc.getInfoTypeForString("DAMAGE_POISON")
		i_dtFire = gc.getInfoTypeForString("DAMAGE_FIRE")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_DARK_GREEN_TEXT")
		l_iPromotions = [
					gc.getInfoTypeForString("PROMOTION_BLESSED"),
					gc.getInfoTypeForString("PROMOTION_BLUR"),
					gc.getInfoTypeForString("PROMOTION_COURAGE"),
					gc.getInfoTypeForString("PROMOTION_CROWN_OF_BRILLANCE"),
					gc.getInfoTypeForString("PROMOTION_DANCE_OF_BLADES"),
					gc.getInfoTypeForString("PROMOTION_HASTED"),
					gc.getInfoTypeForString("PROMOTION_LOYALTY"),
					gc.getInfoTypeForString("PROMOTION_MORALE"),
					gc.getInfoTypeForString("PROMOTION_REGENERATION"),
					gc.getInfoTypeForString("PROMOTION_SHADOWWALK"),
					gc.getInfoTypeForString("PROMOTION_SHIELD_OF_FAITH"),
					gc.getInfoTypeForString("PROMOTION_VALOR"),
					gc.getInfoTypeForString("PROMOTION_WARCRY"),
					gc.getInfoTypeForString("PROMOTION_CHARMED"),
					gc.getInfoTypeForString("PROMOTION_FATIGUED"),
					gc.getInfoTypeForString("PROMOTION_POISONED"),
					gc.getInfoTypeForString("PROMOTION_RUSTED"),
					gc.getInfoTypeForString("PROMOTION_SLOW"),
					gc.getInfoTypeForString("PROMOTION_WITHERED"),
					gc.getInfoTypeForString("PROMOTION_DISEASED")
					]
		l_iDamageTypes = [ 
					i_dtFire,
					i_dtPoison,
					gc.getInfoTypeForString("DAMAGE_COLD"),
					gc.getInfoTypeForString("DAMAGE_DEATH"),
					gc.getInfoTypeForString("DAMAGE_HOLY"),
					gc.getInfoTypeForString("DAMAGE_LIGHTNING"), 
					gc.getInfoTypeForString("DAMAGE_PHYSICAL"),
					gc.getInfoTypeForString("DAMAGE_UNHOLY")
					]
		l_iTerrain = self.getl_iLandTerrainType( b_isWater = False, b_isImpassable = False )
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_CHAOS")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		i_Terrain = l_iTerrain[CyGame().getSorenRandNum( len(l_iTerrain), "terrain")]
		if pPlot.getTerrainType() != i_Terrain:
			pPlot.setTerrainType(i_Terrain,true,true)
			if gc.getTerrainInfo(i_Terrain).isHell() == True:
				if pPlot.getPlotCounter() < 50:
					pPlot.changePlotCounter(100)
			else:
				if pPlot.getPlotCounter() > 50:
					pPlot.changePlotCounter(-100)
			pPlot.rebuildGraphics()
			#pPlot.setTempTerrainType(i_Terrain, CyGame().getSorenRandNum(10, "timer") + 10)
			#pPlot.setTempTerrainTypeFM(i_Terrain, CyGame().getSorenRandNum(10, "timer") + 10, False, False)
			self.printMsg( -1, -1, -1, -1, i_Terrain, pPlot, pPlayer, -1, i_ctNodeMsg, -1, -1 )
			### msg: %s1 ### (log only)

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						i_rDmg = 3 + 3 * iRadius
						i_sDmg = 3 + 3 * iRadius
						i_DmgType = l_iDamageTypes[CyGame().getSorenRandNum( len(l_iDamageTypes), "rand DmgType")]
						if pUnit.getUnitCombatType() == i_uctNaval or pUnit.getUnitCombatType() == i_uctSiege:
							if i_DmgType == i_dtPoison:
								i_DmgType = i_dtFire
						self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if i_DmgType == i_dtPoison:
							pUnit.setHasPromotion(i_ptPoisoned, True)
						self.doPromotionZE( pPlayer, pUnit, i_ptDanceOfBlades, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.getUnitCombatType() != i_uctNaval or pUnit.getUnitCombatType() != i_uctSiege:
							iRand = 25
							if bEvent == True:
								iRand = 5
							chance = CyGame().getSorenRandNum( iRand, "Wonder")
							if chance == 0 or bEvent == True:
								chance = CyGame().getSorenRandNum( 5, "n")
								for ii in range(chance + 1):
									chance = CyGame().getSorenRandNum( len(l_iPromotions), "Promotion")
									self.doPromotionZE( pPlayer, pUnit, l_iPromotions[chance], i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
								iRand = -1
							if iRand != -1:
								self.doPromotionChanceZE( 15, bEvent, pPlayer, pUnit, i_ptMutated, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

	def doFlareCreationNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS2D_POSITIVE_DINK",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		l_iBonusLandA = [
				gc.getInfoTypeForString("BONUS_COW"),
				gc.getInfoTypeForString("BONUS_PIG"),
				gc.getInfoTypeForString("BONUS_BISON"),
				gc.getInfoTypeForString("BONUS_SHEEP")
				]
		l_iBonusLandB = [
				gc.getInfoTypeForString("BONUS_WHEAT"),
				gc.getInfoTypeForString("BONUS_RICE"),
				gc.getInfoTypeForString("BONUS_CORN")
				]
		l_iBonusSea = [
				gc.getInfoTypeForString("BONUS_CLAM"),
				gc.getInfoTypeForString("BONUS_CRAB"),
				gc.getInfoTypeForString("BONUS_FISH"),
				gc.getInfoTypeForString("BONUS_SHRIMP")
				]
		i_DmgType = gc.getInfoTypeForString("DAMAGE_PHYSICAL")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_DARK_GREEN")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_CREATION")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )
		iRadius += 1

		if bEvent == True:
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_FOOD, 1)
			CyInterface().addMessage(iPlayer,false,15,localText.getText("TXT_KEY_DOFLARECREATIONNODEZE_GAMETXT3",()),'',0,CyArtFileMgr().getImprovementArtInfo(gc.getImprovementInfo(i_itNode).getArtDefineTag()).getButton(),ColorTypes(i_ctNodeMsg),iX,iY,True,True)
			### msg: +1[ICON_FOOD] on this plot. ###

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						i_rDmg = 3 + 2 * iRadius
						i_sDmg = 3 + 2 * iRadius
						if bEvent == True:
							i_rDmg = 1
						self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

					if pPlot.isCity() == True:
						l_sPromotions = [ "CREATION1" ]
						self.getTempIllusion( iiX, iiY, -1, bEvent, l_sPromotions, -1 )

						pCity = pPlot.getPlotCity()
						i_stBirth = gc.getInfoTypeForString("SPELL_BIRTH")
						iBuilding = gc.getInfoTypeForString("BUILDING_GROWTH")
						self.doBuildingZE( pPlot, iBuilding, i_ctNodeMsg )
						if bEvent == True:
							iAddPop = 1
							pCity.changePopulation(iAddPop)
							CyInterface().addMessage(pPlot.getOwner(),false,15,localText.getText("TXT_KEY_DOFLARECREATIONNODEZE_GAMETXT1",( gc.getSpellInfo(i_stBirth).getDescription(), iAddPop, pCity.getName() )),'',0,gc.getSpellInfo(i_stBirth).getButton(),ColorTypes(i_ctNodeMsg),iiX,iiY,True,True)
							### msg: Due to %s1 we received +%d2 population in %s3. ###
						elif bEvent == False:
							chance = CyGame().getSorenRandNum( 4, "25% chance")
							if chance == 0:
								iOldFood = pCity.getFood()
								iAdditionalFood = int( iOldFood / 10 ) + 1	### 10%
								pCity.changeFood(iAdditionalFood)
								CyInterface().addMessage(pPlot.getOwner(),false,15,localText.getText("TXT_KEY_DOFLARECREATIONNODEZE_GAMETXT2",( gc.getSpellInfo(i_stBirth).getDescription(), iAdditionalFood, pCity.getName() )),'',0,gc.getSpellInfo(i_stBirth).getButton(),ColorTypes(i_ctNodeMsg),iiX,iiY,True,True)
								### msg: Due to %s1 we received +%d2[ICON_FOOD] in %s3. ###

					chance = CyGame().getSorenRandNum( 5, "20% chance")
					if bEvent == True or chance == 0:
						iOldBonus = pPlot.getBonusType(-1)
						if iOldBonus in l_iBonusLandA or iOldBonus in l_iBonusLandB or iOldBonus in l_iBonusSea:
							l_iBonus2 = []
							for irun in range(3):
								if irun == 0:
									l_iBonus = l_iBonusLandA
								elif irun == 1:
									l_iBonus = l_iBonusLandB
								elif irun == 2:
									l_iBonus = l_iBonusSea
								if iOldBonus in l_iBonus:
									for i in range(len(l_iBonus)):
										if iOldBonus != l_iBonus[i]:
											l_iBonus2.append(l_iBonus[i])
							if len(l_iBonus2) > 0:
								iRand = CyGame().getSorenRandNum( len(l_iBonus2), "Random iBonus")
								iBonus = l_iBonus2[iRand]
								pPlot.setBonusType(-1)
								pPlot.setBonusType(iBonus)
								if pPlot.isOwned():
									i_stFertility = gc.getInfoTypeForString("SPELL_FERTILITY")
									CyInterface().addMessage(pPlot.getOwner(),false,15,localText.getText("TXT_KEY_DOFLARECREATIONNODEZE_GAMETXT4",( gc.getSpellInfo(i_stFertility).getDescription(), gc.getBonusInfo(iOldBonus).getDescription(), gc.getBonusInfo(iBonus).getDescription() )),'',0,gc.getSpellInfo(i_stFertility).getButton(),ColorTypes(i_ctNodeMsg),iiX,iiY,True,True)
									### msg: %s1 affects the surrounding area and changes %s2 to %s3. ##

	def doFlareDeathNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString('EFFECT_SPELL1'),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_WRAITH",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_LIGHT_GREY")
		i_ptUndead = gc.getInfoTypeForString("PROMOTION_UNDEAD")
		i_ptStrong = gc.getInfoTypeForString("PROMOTION_STRONG")
		i_itCityRuins = gc.getInfoTypeForString("IMPROVEMENT_CITY_RUINS")
		i_itGraveyard = gc.getInfoTypeForString("IMPROVEMENT_GRAVEYARD")
		i_utSkeleton = gc.getInfoTypeForString("UNIT_SKELETON")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_DEATH")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_DEATH")
		szNodeButton = CyArtFileMgr().getImprovementArtInfo(gc.getImprovementInfo(i_itNode).getArtDefineTag()).getButton()
		if pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_GOOD'):
			i_ctMsg = i_ctBadMsg
		elif pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_EVIL'):
			i_ctMsg = i_ctNodeMsg
		else:
			i_ctMsg = i_ctNodeMsg
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					if pPlot.getImprovementType() == i_itGraveyard:
						pPlot2 = self.canSetUnitZE( iPlayer, pPlot )
						if pPlot2 != -1:
							iNewUnit = 1
							if bEvent == True:
								iNewUnit = iRadius
							pPlot.setImprovementType(-1)
							if bEvent == True:
								CyGame().changeGlobalCounter(iNewUnit)
							for i in range(iNewUnit):
								newUnit = pPlayer.initUnit(i_utSkeleton, pPlot2.getX(), pPlot2.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
								newUnit.finishMoves()
							szBuffer1 = gc.getUnitInfo(i_utSkeleton).getDescription()
							if iNewUnit == 1:
								szText = localText.getText("TXT_KEY_DOFLAREDEATHNODEZE_GAMETXT3",(szBuffer1,szBuffer1))
								### msg: The graveyard grants a free %s1. ### (only log msg)
							else:
								szText = localText.getText("TXT_KEY_DOFLAREDEATHNODEZE_GAMETXT4",(iNewUnit,szBuffer1))
								### msg: The graveyard grants %d1 free %s2 s. ### (only log msg)
							CyInterface().addMessage(iPlayer,True,-1,szText,'',0,szNodeButton,ColorTypes(i_ctNodeMsg),pPlot2.getX(),pPlot2.getY(),True,True)

					elif pPlot.getImprovementType() == i_itCityRuins:
						pPlot2 = self.canSetUnitZE( iPlayer, pPlot )
						if pPlot2 != -1:
							pPlot.setImprovementType(-1)
							CyGame().changeGlobalCounter(1)
							newUnit = pPlayer.initUnit(i_utSkeleton, pPlot2.getX(), pPlot2.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
							newUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_RUSTED"), True)
							newUnit.setDamage(90, PlayerTypes.NO_PLAYER)
							newUnit.finishMoves()
							if bEvent == False:
								newUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_WEAK"), True)
							szBuffer1 = gc.getUnitInfo(i_utSkeleton).getDescription()
							szText = localText.getText("TXT_KEY_DOFLAREDEATHNODEZE_GAMETXT5",(szBuffer1,szBuffer1))
							CyInterface().addMessage(iPlayer,True,-1,szText,'',0,szNodeButton,ColorTypes(i_ctNodeMsg),pPlot2.getX(),pPlot2.getY(),True,True)
							### msg: The city ruins grants a free %s1. ### (only log msg)

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.isAlive() == True:
							if iUnit.getMoves() >= 1:
								iRand = CyGame().getSorenRandNum( 2, "rand Slow")
								if iRand == 0:
									pUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_SLOW"), true)
							i_rDmg = 10 + 2 * iRadius
							i_sDmg =  8 + 2 * iRadius
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							if bEvent == True:
								self.doPromotionChanceZE( 2, -1, pPlayer, pUnit, i_ptUndead, i_ctMsg, i_ctBadMsg, iiX, iiY )
						elif pUnit.isHasPromotion(i_ptUndead):
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
							if bEvent == True:
								self.doPromotionChanceZE( 2, -1, pPlayer, pUnit, i_ptStrong, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

	def doFlareDimensionalNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL2"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_ESCAPE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_DmgType = gc.getInfoTypeForString("DAMAGE_LIGHTNING")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_CITY_BLUE")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_DIMENSIONAL")
		i_utThade = gc.getInfoTypeForString("UNIT_THADE")
		i_stEscape = gc.getInfoTypeForString("SPELL_ESCAPE")
		l_pUnits = []
		l_iAntiTeleImprovements = self.getAntiTeleImprovements()
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						if pUnit.getUnitType() != i_utThade:
							i_rDmg = 8 + 2 * iRadius
							i_sDmg = 6 + 2 * iRadius
							if bEvent == True:
								i_rDmg = 2 + 2 * iRadius
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

						if pUnit.getUnitType() == i_utThade and bEvent == True:
							self.doEmpowerElementalZE( pPlayer, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )

						if pPlot.isCity() == False:
							chance = CyGame().getSorenRandNum( 20, "5% chance")
							if chance == 0:
								if not pPlot.getImprovementType() in l_iAntiTeleImprovements:
									if self.isHasAntiTelePromotions( pUnit ) == False:
										l_pUnits.append(pUnit)

					if pPlot.isCity() == True:
						l_sPromotions = [ "DIMENSIONAL3" ]
						self.getTempIllusion( iiX, iiY, -1, bEvent, l_sPromotions, -1 )

						iBuilding = gc.getInfoTypeForString("BUILDING_DIMENSIONAL_GATE")
						self.doBuildingZE( pPlot, iBuilding, i_ctNodeMsg )

 
Cool! Is it now modular?

no, unfortunately i didnt had time. no bugfixes or changes in this version - just made it compatible with patch c...
maybe i will find some time at the we.



Spoiler GIR02ManaFlares ( Part 4 / 6 ) :

Spoiler GIR02ManaFlares.py ( PART 3 / 5 ) :

Code:
		if len(l_pUnits) > 0:
			for i in range(len(l_pUnits)):
				pUnit = l_pUnits[i]
				iPlayerUnitOwner = pUnit.getOwner()
				iUnit = pUnit.getUnitType()
				iX = pUnit.getX()
				iY = pUnit.getY()
				pNearestCity = self.getNearestCity_ZE( iX, iY, -1, False )

				chance = CyGame().getSorenRandNum( 4, "25% chance")
				if chance == 0:
					pUnit.cast(i_stEscape)
					if pNearestCity == -1:
						szText = localText.getText("TXT_KEY_DOFLAREDIMENSIONALNODEZE_GAMETXT1",(gc.getUnitInfo(iUnit).getDescription(),))
						### msg: A strange effect from a dimensional mana flare caused our %s1 to be teleported back to its capital. ###
					else:
						szText = localText.getText("TXT_KEY_DOFLAREDIMENSIONALNODEZE_GAMETXT2",(pNearestCity.getName(),gc.getUnitInfo(iUnit).getDescription()))
						### msg: A strange effect from a dimensional mana flare near %s1 caused our %s2 to be teleported back to its capital. ###
					CyInterface().addMessage(iPlayerUnitOwner,false,15,szText,'',0,gc.getSpellInfo(i_stEscape).getButton(),ColorTypes(i_ctBadMsg),iX,iY,True,True)

				else:		# ### 75% chance
					pPlot = CyMap().plot(iX,iY)
					pPlot2 = self.findClearPlot( pUnit, pPlot, 3 )
					if pPlot2 != -1:
						iX = pPlot2.getX()
						iY = pPlot2.getY()
						pUnit.setXY(iX, iY, false, true, true)
						if pNearestCity == -1:
							szText = localText.getText("TXT_KEY_DOFLAREDIMENSIONALNODEZE_GAMETXT3",(gc.getUnitInfo(iUnit).getDescription(),))
							### msg: A strange effect from a dimensional mana flare caused our %s1 to teleport on a new plot near to its former position. ###
						else:
							szText = localText.getText("TXT_KEY_DOFLAREDIMENSIONALNODEZE_GAMETXT4",(pNearestCity.getName(),gc.getUnitInfo(iUnit).getDescription()))
							### msg: A strange effect from a dimensional mana flare near %s1 caused our %s2 to teleport on a new plot near to its former position. ###
						CyInterface().addMessage(iPlayerUnitOwner,false,15,szText,'',0,gc.getSpellInfo(i_stEscape).getButton(),ColorTypes(i_ctBadMsg),iX,iY,True,True)

	def doFlareEarthNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_VOLCANO"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_EARTHQUAKE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_DmgType = gc.getInfoTypeForString("DAMAGE_PHYSICAL")
		i_ptStoneskin = gc.getInfoTypeForString("PROMOTION_STONESKIN")
		i_utEarthElemental = gc.getInfoTypeForString("UNIT_EARTH_ELEMENTAL")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_CITY_BROWN")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_EARTH")
		i_uctArcher = gc.getInfoTypeForString("UNITCOMBAT_ARCHER")
		i_uctMelee = gc.getInfoTypeForString("UNITCOMBAT_MELEE")
		i_uctMounted = gc.getInfoTypeForString("UNITCOMBAT_MOUNTED")
		i_uctRecon = gc.getInfoTypeForString("UNITCOMBAT_RECON")
		i_uctAdept = gc.getInfoTypeForString("UNITCOMBAT_ADEPT")
		i_uctAnimal = gc.getInfoTypeForString("UNITCOMBAT_ANIMAL")
		i_uctBeast = gc.getInfoTypeForString("UNITCOMBAT_BEAST")
		i_uctDisciple = gc.getInfoTypeForString("UNITCOMBAT_DISCIPLE")
		l_iUnitCT = [i_uctArcher,i_uctMelee,i_uctMounted,i_uctRecon,i_uctAdept,i_uctAnimal,i_uctBeast,i_uctDisciple]
		i_stBoosom2 = gc.getInfoTypeForString("SPELL_BOOSOM2")
		i_ReligionType = gc.getInfoTypeForString("RELIGION_RUNES_OF_KILMORPH")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		if bEvent == True:
			if pPlot.isHills() == False:
				pPlot.setPlotType(PlotTypes.PLOT_HILLS, True, True)
				if pPlot.isOwned() == True:
					CyInterface().addMessage(pPlot.getOwner(),false,15,localText.getText("TXT_KEY_DOFLAREEARTHNODEZE_GAMETXT1",()),'',0,gc.getSpellInfo(i_stBoosom2).getButton(),ColorTypes(i_ctNodeMsg),iX,iY,True,True)
					### msg: Due to an earth mana flare this plot type changed to hills. ###

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.getUnitType() != i_utEarthElemental:
							pUnit.setFortifyTurns(0)
							i_rDmg = 8 + 2 * iRadius
							i_sDmg = 8 + 2 * iRadius
							if pPlayer2.getStateReligion() == i_ReligionType:
								i_rDmg = int(i_rDmg * 0.5)
								i_sDmg = int(i_sDmg * 0.5)
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							pUnit.finishMoves()
						if pUnit.getUnitType() == i_utEarthElemental:
							self.doEmpowerElementalZE( pPlayer, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
						if pUnit.getUnitCombatType() in l_iUnitCT:
							if bEvent == True:
								self.doPromotionChanceZE( 25, -1, pPlayer, pUnit, i_ptStoneskin, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

					if pPlot.isCity() == True:
						l_sPromotions = [ "EARTH1" ]
						self.getTempIllusion( iiX, iiY, i_utEarthElemental, bEvent, l_sPromotions, -1 )

						iBuilding = gc.getInfoTypeForString("BUILDING_WALL_OF_STONE")
						self.doBuildingZE( pPlot, iBuilding, i_ctNodeMsg )

						chance = CyGame().getSorenRandNum( 50, "destroy building")
						if chance <= (2*iRadius):
							self.doDestroyBuildingZE( pPlot, i_ctBadMsg )

	def doFlareEnchantmentNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_ENCHANTED_BLADE"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_ENCHANTMENT",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_stRepair = gc.getInfoTypeForString("SPELL_REPAIR")
		i_ptGolem = gc.getInfoTypeForString("PROMOTION_GOLEM")
		i_uctSiege = gc.getInfoTypeForString("UNITCOMBAT_SIEGE")
		i_uctNaval = gc.getInfoTypeForString("UNITCOMBAT_NAVAL")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_CYAN")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_ENCHANTMENT")
		i_ptRusted = gc.getInfoTypeForString("PROMOTION_RUSTED")
		l_iPromotions = [
						gc.getInfoTypeForString("PROMOTION_ENCHANTED_BLADE"),
						gc.getInfoTypeForString("PROMOTION_FLAMING_ARROWS"),
						gc.getInfoTypeForString("PROMOTION_SPELLSTAFF")
					]
		l_iUnitCT = [
						gc.getInfoTypeForString("UNITCOMBAT_MELEE"),
						gc.getInfoTypeForString("UNITCOMBAT_ARCHER"),
						gc.getInfoTypeForString("UNITCOMBAT_ADEPT")
					]
		l_iDamageTypes = [ 
						gc.getInfoTypeForString("DAMAGE_COLD"), 
						gc.getInfoTypeForString("DAMAGE_FIRE"), 
						gc.getInfoTypeForString("DAMAGE_LIGHTNING"), 
						gc.getInfoTypeForString("DAMAGE_PHYSICAL"),
						gc.getInfoTypeForString("DAMAGE_POISON")
					]
		l_iImprovements = [ 
						gc.getInfoTypeForString("IMPROVEMENT_TOWER"), 
						gc.getInfoTypeForString("IMPROVEMENT_FORT"), 
						gc.getInfoTypeForString("IMPROVEMENT_CASTLE"), 
						gc.getInfoTypeForString("IMPROVEMENT_CITADEL") 
					]
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					iImprovement = pPlot.getImprovementType()
					if iImprovement in l_iImprovements:
						iTypeNew = -1
						### 33% chance to upgrade improvement / 33% chance to downgrade improvement (but not destroy tower)###
						chance = CyGame().getSorenRandNum( 3, "chance")
						for i in range(len(l_iImprovements)-1):
							if chance == 1:
								if iImprovement == l_iImprovements[i]:
									iTypeOld = l_iImprovements[i]
									iTypeNew = l_iImprovements[i+1]
									pPlot.setImprovementType(iTypeNew)
									iColor = i_ctNodeMsg
							elif chance == 2:
								if iImprovement == l_iImprovements[len(l_iImprovements)-i-1]:
									iTypeOld = l_iImprovements[len(l_iImprovements)-i-1]
									iTypeNew = l_iImprovements[len(l_iImprovements)-i-2]
									pPlot.setImprovementType(iTypeNew)
									iColor = i_ctBadMsg
						if iTypeNew != -1:
							if pPlot.isOwned():
								szButton = CyArtFileMgr().getImprovementArtInfo(gc.getImprovementInfo(iTypeNew).getArtDefineTag()).getButton()
								szBuffer1 = gc.getImprovementInfo(iTypeOld).getDescription()
								szBuffer2 = gc.getImprovementInfo(iTypeNew).getDescription()
								szText = localText.getText("TXT_KEY_DOFLAREENCHANTMENTNODEZE_GAMETXT4",(szBuffer1,szBuffer2))
								### msg: %s1 upgraded to %s2. ### (log only)
								if iColor == i_ctBadMsg:
									szText = localText.getText("TXT_KEY_DOFLAREENCHANTMENTNODEZE_GAMETXT5",(szBuffer1,szBuffer2))
									### msg: %s1 downgraded to %s2. ### (log only)
								CyInterface().addMessage(pPlot.getOwner(),True,-1,szText,'',0,szButton,ColorTypes(iColor),iiX,iiY,True,True)

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						chance = CyGame().getSorenRandNum( 4, "25% chance")
						if chance == 1:
							if pUnit.getUnitCombatType() != i_uctNaval and pUnit.getUnitCombatType() != i_uctSiege:
								if pUnit.isHasPromotion(i_ptGolem) == False:
									i_rDmg = 1 + 3 * iRadius
									i_sDmg = 1 + 3 * iRadius
									i_DmgType = l_iDamageTypes[CyGame().getSorenRandNum( len(l_iDamageTypes), "rand DmgType")]
									self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if bEvent == True:
							chance = CyGame().getSorenRandNum( 100, "chance to life")
							if chance == 0:
								if pUnit.isHasPromotion(i_ptGolem):
									pUnit.setHasPromotion(i_ptGolem, false)
									szText = localText.getText("TXT_KEY_DOFLAREENCHANTMENTNODEZE_GAMETXT3",())
									CyInterface().addMessage(iPlayer2,True,-1,szText,'',0,'Art/Interface/Buttons/spells/ressurection.dds',ColorTypes(i_ctNodeMsg),iiX,iiY,True,True)
									### msg: Unit Alive. ### (only log msg)
						if pUnit.getUnitCombatType() == i_uctNaval or pUnit.getUnitCombatType() == i_uctSiege or pUnit.isHasPromotion(i_ptGolem) == True:
							self.doHealZE( pPlayer, pUnit, i_stRepair, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
						chance = CyGame().getSorenRandNum( 2, "50% chance")
						if chance == 1 or bEvent == True:
							if pUnit.getUnitCombatType() in l_iUnitCT:
								for i__UnitCT in range(len(l_iUnitCT)):
									if pUnit.getUnitCombatType() == l_iUnitCT[i__UnitCT]:
										if pUnit.isHasPromotion(l_iPromotions[i__UnitCT]) == False:
											self.doPromotionZE( pPlayer, pUnit, l_iPromotions[i__UnitCT], i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
											### msg: %s1 ### (log only)
										elif pUnit.isHasPromotion(l_iPromotions[i__UnitCT]) == True:
											if bEvent == False:
												self.doRemovePromotionZE( pPlayer, pUnit, l_iPromotions[i__UnitCT], i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
												### msg: %s1 removed. ### (log only)
						chance = CyGame().getSorenRandNum( 10, "remove Rusted")
						if chance == 1 or bEvent == True:
							if pUnit.isHasPromotion(i_ptRusted) == True:
								self.doRemovePromotionZE( pPlayer, pUnit, i_ptRusted, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
								### msg: %s1 removed. ### (Rusted removed.) (log only)

	def doFlareEntropyNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString('EFFECT_SPELL1'),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_DEFILE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_PINK_TEXT")
		i_ptDemon = gc.getInfoTypeForString("PROMOTION_DEMON")
		i_ptAngel = gc.getInfoTypeForString("PROMOTION_ANGEL")
		i_ptStrong = gc.getInfoTypeForString("PROMOTION_STRONG")
		i_ptSlow = gc.getInfoTypeForString("PROMOTION_SLOW")
		i_ptRusted = gc.getInfoTypeForString("PROMOTION_RUSTED")
		i_ptWithered = gc.getInfoTypeForString("PROMOTION_WITHERED")
		i_uctArcher = gc.getInfoTypeForString("UNITCOMBAT_ARCHER")
		i_uctMelee = gc.getInfoTypeForString("UNITCOMBAT_MELEE")
		i_uctMounted = gc.getInfoTypeForString("UNITCOMBAT_MOUNTED")
		i_uctRecon = gc.getInfoTypeForString("UNITCOMBAT_RECON")
		i_uctAdept = gc.getInfoTypeForString("UNITCOMBAT_ADEPT")
		i_uctAnimal = gc.getInfoTypeForString("UNITCOMBAT_ANIMAL")
		i_uctBeast = gc.getInfoTypeForString("UNITCOMBAT_BEAST")
		i_uctDisciple = gc.getInfoTypeForString("UNITCOMBAT_DISCIPLE")
		l_iUnitCT = [
					i_uctArcher,
					i_uctMelee,
					i_uctMounted,
					i_uctRecon,
					i_uctAdept,
					i_uctAnimal,
					i_uctBeast,
					i_uctDisciple
				]
		i_ReligionType = gc.getInfoTypeForString("RELIGION_THE_ASHEN_VEIL")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_UNHOLY")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_ENTROPY")
		szNodeButton = CyArtFileMgr().getImprovementArtInfo(gc.getImprovementInfo(i_itNode).getArtDefineTag()).getButton()
		if pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_GOOD'):
			i_ctMsg = i_ctBadMsg
		elif pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_EVIL'):
			i_ctMsg = i_ctNodeMsg
		else:
			i_ctMsg = i_ctNodeMsg
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		if bEvent == True:
			CyGame().changeGlobalCounter(2)

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					if pPlot.getPlotCounter() < 10:
						if pPlot.isOwned():
							szText = localText.getText("TXT_KEY_DOFLAREENTROPYNODEZE_GAMETXT3",())
							CyInterface().addMessage(pPlot.getOwner(),True,-1,szText,'',0,szNodeButton,ColorTypes(i_ctMsg),iiX,iiY,True,True)
							### msg: Hell terrain created. ### (only log msg)
					pPlot.changePlotCounter(100)
					pPlot.rebuildGraphics()

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.isAlive() == True:
							i_rDmg = 16 + 2 * iRadius
							i_sDmg = 2 + 2 * iRadius
							if pPlayer2.getStateReligion() == i_ReligionType:
								i_rDmg = int(i_rDmg * 0.5)
								i_sDmg = int(i_sDmg * 0.5)
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							if bEvent == True:
								self.doPromotionChanceZE( 2, -1, pPlayer, pUnit, i_ptDemon, i_ctMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.isHasPromotion(i_ptAngel):
							if iUnit.getMoves() >= 1:
								self.doPromotionChanceZE( 50, -1, pPlayer, pUnit, i_ptSlow, i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
							i_rDmg = 16 + 2 * iRadius
							i_sDmg = 16 + 2 * iRadius
							if pPlayer2.getStateReligion() == i_ReligionType:
								i_rDmg = int(i_rDmg * 0.5)
								i_sDmg = int(i_sDmg * 0.5)
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.isHasPromotion(i_ptDemon):
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
							if bEvent == True:
								self.doPromotionChanceZE( 2, -1, pPlayer, pUnit, i_ptStrong, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.getUnitCombatType() in l_iUnitCT:
							self.doPromotionChanceZE( 50, bEvent, pPlayer, pUnit, i_ptWithered, i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
							if pUnit.getUnitCombatType() == i_uctArcher or pUnit.getUnitCombatType() == i_uctMelee or pUnit.getUnitCombatType() == i_uctMounted or pUnit.getUnitCombatType() == i_uctRecon:
								self.doPromotionChanceZE( 50, bEvent, pPlayer, pUnit, i_ptRusted, i_ctBadMsg, i_ctNodeMsg, iiX, iiY )

	def doFlareFireNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_ARTILLERY_SHELL_EXPLODE"),point)
		CyAudioGame().Play3DSound("AS3D_UN_GRENADE_EXPLODE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_utFireElemental = gc.getInfoTypeForString("UNIT_FIRE_ELEMENTAL")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_ORANGE")
		i_itSmoke = gc.getInfoTypeForString("IMPROVEMENT_SMOKE")
		i_ftFlames = gc.getInfoTypeForString("FEATURE_FLAMES")
		i_ftForest = gc.getInfoTypeForString("FEATURE_FOREST")
		i_ftJungle = gc.getInfoTypeForString("FEATURE_JUNGLE")
		i_ftForestNew = gc.getInfoTypeForString("FEATURE_FOREST_NEW")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_FIRE")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_FIRE")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					if pPlot.getFeatureType() == i_ftForest or pPlot.getFeatureType() == i_ftJungle or pPlot.getFeatureType() ==  i_ftForestNew:
						bValid = True
						iImprovement = pPlot.getImprovementType()
						if iImprovement != -1 :
							if gc.getImprovementInfo(iImprovement).isPermanent():
								bValid = False
						if bValid == True:
							chance = CyGame().getSorenRandNum( 3, "chance")
							if chance == 0:
								pPlot.setImprovementType(i_itSmoke)
								if pPlot.isOwned():
									self.printMsg( -1, -1, -1, i_itSmoke, -1, pPlot, pPlayer, -1, i_ctBadMsg, -1, -1 )
									### msg: %s1 ### (Smoke) (log only)
							elif chance == 1:
								if CyGame().getSorenRandNum(100, "Flames Spread") <= gc.getDefineINT("FLAMES_SPREAD_CHANCE"):
									pPlot.setFeatureType(i_ftFlames, 0)
									if pPlot.isOwned():
										self.printMsg( -1, -1, i_ftFlames, -1, -1, pPlot, pPlayer, -1, i_ctBadMsg, -1, -1 )
										### msg: %s1 ### (Fire) (log only)

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.getUnitType() != i_utFireElemental:
							i_rDmg = 8 + 2 * iRadius
							i_sDmg = 8 + 2 * iRadius
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.getUnitType() == i_utFireElemental:
							self.doEmpowerElementalZE( pPlayer, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
						iRand = 100
						if bEvent == True:
							iRand = 15
						chance = CyGame().getSorenRandNum( iRand, "chance")
						if chance == 1:
							iPromotion = gc.getInfoTypeForString("PROMOTION_VULNERABLE_TO_FIRE")
							self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
						elif chance == 2:
							iPromotion = gc.getInfoTypeForString("PROMOTION_FIRE_RESISTANCE")
							self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						elif chance == 3:
							iPromotion = gc.getInfoTypeForString("PROMOTION_IMMUNE_FIRE")
							self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

	def doFlareForceNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_HASTE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ptAccelerated = gc.getInfoTypeForString("PROMOTION_ACCELERATED")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_PHYSICAL")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_DARK_RED_TEXT")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_FORCE")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						i_rDmg = 4 + 3 * iRadius
						i_sDmg = 4 + 3 * iRadius
						if bEvent == True:
							i_rDmg = 2
						self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						self.doPromotionChanceZE( 50, bEvent, pPlayer, pUnit, i_ptAccelerated, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

					if pPlot.isCity() == True:
						l_sPromotions = [ "FORCE1", "FORCE2", "FORCE3" ]
						l_sSpells = [ "ACCELERATE" ]
						self.getTempIllusion( iiX, iiY, -1, bEvent, l_sPromotions, l_sSpells )

						iBuilding = gc.getInfoTypeForString("BUILDING_WALL_OF_FORCE")
						self.doBuildingZE( pPlot, iBuilding, i_ctNodeMsg )

						pCity = pPlot.getPlotCity()
						#iOldDefDmg = pCity.getDefenseDamage()
						iChange = int((100 - pCity.getDefenseDamage()) / 2) ### 50% vom rest
						pCity.changeDefenseDamage(iChange)
						iNewDefDmg = pCity.getDefenseDamage()
						iNewDefence = int( ( ( gc.getMAX_CITY_DEFENSE_DAMAGE() - iNewDefDmg ) * 100 ) / gc.getMAX_CITY_DEFENSE_DAMAGE() )
						# iNewDefence = int(100 - iNewDefDmg)
						# szTempBuffer = u" (%d%%)" %( ( ( gc.getMAX_CITY_DEFENSE_DAMAGE() - pHeadSelectedCity.getDefenseDamage() ) * 100 ) / gc.getMAX_CITY_DEFENSE_DAMAGE() )
						iColor = i_ctBadMsg
						CyInterface().addMessage(pPlot.getOwner(),false,15,localText.getText("TXT_KEY_DOFLAREFORCENODEZE_GAMETXT1",( pCity.getName(), iNewDefence )),'',0,CyArtFileMgr().getImprovementArtInfo(gc.getImprovementInfo(i_itNode).getArtDefineTag()).getButton(),ColorTypes(iColor),iiX,iiY,True,True)
						### msg: Due to a Force Mana Flare the city defence of %s1 is temporary reduced to %d2%% of its maximum. ###
						if pPlot.getOwner() != iPlayer:
							iColor = i_ctNodeMsg
							CyInterface().addMessage(iPlayer,false,15,localText.getText("TXT_KEY_DOFLAREFORCENODEZE_GAMETXT1",( pCity.getName(), iNewDefence )),'',0,CyArtFileMgr().getImprovementArtInfo(gc.getImprovementInfo(i_itNode).getArtDefineTag()).getButton(),ColorTypes(iColor),iiX,iiY,True,True)
							### msg: Due to a Force Mana Flare the city defence of %s1 is temporary reduced to %d2%% of its maximum. ###

	def doFlareIceNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_SPRING",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_Feature = gc.getInfoTypeForString("FEATURE_BLIZZARD")
		i_ptSlow = gc.getInfoTypeForString("PROMOTION_SLOW")
		i_utIceElemental = gc.getInfoTypeForString("UNIT_ICE_ELEMENTAL")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_CYAN")
		i_ttSnow = gc.getInfoTypeForString("TERRAIN_SNOW")
		i_ctIllians = gc.getInfoTypeForString("CIVILIZATION_ILLIANS")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_ICE")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_COLD")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		pPlot.setFeatureType(i_Feature, -1)
		if pPlot.isOwned():
			iColor = i_ctBadMsg
			if pPlayer.getCivilizationType() == i_ctIllians:
				iColor = i_ctNodeMsg
			self.printMsg( -1, -1, i_Feature, -1, -1, pPlot, -1, -1, iColor, -1, -1 )
			### msg: %s1 ###

		iRadius2 = iRadius - 1
		if iRadius2 == 0:
			iRadius2 = 1
		for iiX in range(iX-(iRadius2), iX+(1+iRadius2), 1):
			for iiY in range(iY-(iRadius2), iY+(1+iRadius2), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:
					if pPlot.isWater() == False:
						if pPlot.getTerrainType() != i_ttSnow:
							pPlot.setTempTerrainType(i_ttSnow, CyGame().getSorenRandNum(10, "timer") + 10)
							if pPlot.isOwned():
								iColor = i_ctBadMsg
								if pPlayer.getCivilizationType() == i_ctIllians:
									iColor = i_ctNodeMsg
								self.printMsg( -1, -1, -1, -1, i_ttSnow, pPlot, pPlayer, -1, iColor, -1, -1 )
								### msg: %s1 ### (<--Snow) (log only)

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						i_rDmg = 3 + 3 * iRadius
						i_sDmg = 3 + 3 * iRadius
						if pUnit.getUnitType() != i_utIceElemental:
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doPromotionZE( pPlayer, pUnit, i_ptSlow, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							pUnit.finishMoves()
						if pUnit.getUnitType() == i_utIceElemental:
							self.doEmpowerElementalZE( pPlayer, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )

 
Update:
FF version:
Changed Improved Roads naming to Imperial Roads and also changed the button art (now it uses the art from Orbis mod).
In addition to that this roads are more usefull as well (increased movement points).​

FFH2 version:
Made it compatible with version 0.41g.
(Also added the Imperial Roads like in my FF version.)


edit: lol, I can't believe FFH2 patch h is out... (i have the worst timing)
I will make a update tomorrow.


Spoiler GIR02ManaFlares ( Part 5 / 6 ) :

Spoiler GIR02ManaFlares.py ( PART 4 / 5 ) :

Code:
	def doFlareLawNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_FOUND_TEMPLE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_SELECTED_TEXT")
		l_iUnitCT = [
				gc.getInfoTypeForString("UNITCOMBAT_ARCHER"),
				gc.getInfoTypeForString("UNITCOMBAT_MELEE"),
				gc.getInfoTypeForString("UNITCOMBAT_MOUNTED"),
				gc.getInfoTypeForString("UNITCOMBAT_RECON"),
				gc.getInfoTypeForString("UNITCOMBAT_ADEPT"),
				gc.getInfoTypeForString("UNITCOMBAT_DISCIPLE"),
				gc.getInfoTypeForString("UNITCOMBAT_ANIMAL"),
				gc.getInfoTypeForString("UNITCOMBAT_BEAST")
				]
		i_ptBlessed = gc.getInfoTypeForString("PROMOTION_BLESSED")
		i_ptLoyalty = gc.getInfoTypeForString("PROMOTION_LOYALTY")
		i_ptValor = gc.getInfoTypeForString("PROMOTION_VALOR")
		i_ptEmpower1 = gc.getInfoTypeForString("PROMOTION_EMPOWER1")
		i_utEinherjar = gc.getInfoTypeForString("UNIT_EINHERJAR")
		i_ReligionType = gc.getInfoTypeForString("RELIGION_THE_ORDER")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_LAW")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_HOLY")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.getUnitCombatType() in l_iUnitCT:
							i_rDmg = 4 + 2 * iRadius
							i_sDmg = 4 + 2 * iRadius
							if pPlayer2.getStateReligion() == i_ReligionType:
								i_rDmg = int(i_rDmg * 0.25)
								i_sDmg = int(i_sDmg * 0.25)
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doPromotionChanceZE( 33, bEvent, pPlayer, pUnit, i_ptLoyalty, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doPromotionChanceZE( 4, bEvent, pPlayer, pUnit, i_ptValor, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							chance = CyGame().getSorenRandNum( 3, "chance")
							if chance == 1 or bEvent == True  or pPlayer2.getStateReligion() == i_ReligionType:
								self.doPromotionZE( pPlayer, pUnit, i_ptBlessed, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						chance = CyGame().getSorenRandNum( 2, "chance")
						if chance == 1 or bEvent == True:
							if pUnit.getUnitType() == i_utEinherjar:
								self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
								self.doPromotionZE( pPlayer, pUnit, i_ptEmpower1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

					if pPlot.isCity() == True:
						l_sPromotions = [ "LAW1", "DIVINE" ]
						l_sSpells = [ "LOYALTY" ]
						pNewUnit = self.getTempIllusion( iiX, iiY, i_utEinherjar, bEvent, l_sPromotions, l_sSpells )
						chance = CyGame().getSorenRandNum( 2, "50% chance")
						if bEvent == True or chance == 0:
							pNewUnit.setReligion(gc.getInfoTypeForString("RELIGION_THE_ORDER"))

						iBuilding = gc.getInfoTypeForString("BUILDING_UNYIELDING_ORDER")
						self.doBuildingZE( pPlot, iBuilding, i_ctNodeMsg )

	def doFlareLifeNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_SANCTIFY",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_itCityRuins = gc.getInfoTypeForString("IMPROVEMENT_CITY_RUINS")
		i_itGraveyard = gc.getInfoTypeForString("IMPROVEMENT_GRAVEYARD")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_CYAN_TEXT")
		i_ptDemon = gc.getInfoTypeForString("PROMOTION_DEMON")
		i_ptUndead = gc.getInfoTypeForString("PROMOTION_UNDEAD")
		i_ptSlow = gc.getInfoTypeForString("PROMOTION_SLOW")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_HOLY")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_LIFE")
		szSanctifyButton = gc.getSpellInfo(gc.getInfoTypeForString("SPELL_SANCTIFY")).getButton()
		if pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_GOOD'):
			i_ctMsg = i_ctNodeMsg
		elif pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_EVIL'):
			i_ctMsg = i_ctBadMsg
		else:
			i_ctMsg = i_ctNodeMsg
		iRadius = self.getRadiusZE( bEvent )	
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		if bEvent == True:
			CyGame().changeGlobalCounter(-2)

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					if pPlot.getPlotCounter() > 9:
						pPlot.changePlotCounter(-100)
						pPlot.rebuildGraphics()
						if pPlot.isOwned():
							CyInterface().addMessage(pPlot.getOwner(),True,-1,localText.getText("TXT_KEY_DOFLARELIFENODEZE_GAMETXT3",()),'',0,szSanctifyButton,ColorTypes(i_ctMsg),iiX,iiY,True,True)
							### msg: Hell terrain removed. ### (only log msg)

					if pPlot.getImprovementType() == i_itCityRuins:
						pPlot.setImprovementType(-1)
						CyGame().changeGlobalCounter(-2)
						#CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),pPlot.getPoint())
						CyInterface().addMessage(iPlayer,True,-1,localText.getText("TXT_KEY_DOFLARELIFENODEZE_GAMETXT4",()),'',0,szSanctifyButton,ColorTypes(i_ctMsg), iiX, iiY, True,True)
						### msg: City ruins sanctified. ### (only log msg)
				
					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.isAlive() == True:
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
						elif pUnit.isHasPromotion(i_ptDemon):
							i_rDmg = 0 + 2 * iRadius
							i_sDmg = 8 + 2 * iRadius
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						elif pUnit.isHasPromotion(i_ptUndead):
							if iUnit.getMoves() >= 1:
								self.doPromotionChanceZE( 50, -1, pPlayer, pUnit, i_ptSlow, i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
							i_rDmg = 10 + 2 * iRadius
							i_sDmg =  8 + 2 * iRadius
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if bEvent == True:
							if pUnit.isHasPromotion(i_ptDemon) or pUnit.isHasPromotion(i_ptUndead):
								chance = CyGame().getSorenRandNum( 50, "chance to life")
								if chance == 0:
									if pUnit.isHasPromotion(i_ptDemon):
										pUnit.setHasPromotion(i_ptDemon, false)
									if pUnit.isHasPromotion(i_ptUndead):
										pUnit.setHasPromotion(i_ptUndead, false)
									CyInterface().addMessage(iPlayer2,True,-1,localText.getText("TXT_KEY_DOFLARELIFENODEZE_GAMETXT12",()),'',0,'Art/Interface/Buttons/spells/ressurection.dds',ColorTypes(i_ctMsg), iiX, iiY, True,True)
									### msg: Unit Alive. ### (only log msg)

					if pPlot.getImprovementType() == i_itGraveyard:
						#CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),pPlot.getPoint())
						pPlot2 = self.canSetUnitZE( iPlayer, pPlot )
						if pPlot2 != -1:
							pPlot.setImprovementType(-1)
							CyGame().changeGlobalCounter(-2)
							if bEvent == True:
								liUnits = [ gc.getInfoTypeForString("UNIT_EINHERJAR"), gc.getInfoTypeForString("UNIT_CHAMPION") ]
								for i in range(len(liUnits)):
									newUnit = pPlayer.initUnit(liUnits[i], pPlot2.getX(), pPlot2.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
									newUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_SPIRIT_GUIDE"), True)
									newUnit.finishMoves()
								newUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_RUSTED"), True)
								newUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_WITHERED"), True)
								newUnit.setDamage(20, PlayerTypes.NO_PLAYER)
								szBuffer1 = gc.getUnitInfo(liUnits[0]).getDescription()
								szBuffer2 = gc.getUnitInfo(liUnits[1]).getDescription()
								CyInterface().addMessage(iPlayer,True,-1,localText.getText("TXT_KEY_DOFLARELIFENODEZE_GAMETXT11",(szBuffer1,szBuffer2)),'',0,szSanctifyButton,ColorTypes(i_ctNodeMsg),pPlot2.getX(),pPlot2.getY(),True,True)
								### msg: The graveyard grants a free %s1 and a %s2. ### (only log msg)
							else:
								i_utEinherjar = gc.getInfoTypeForString("UNIT_EINHERJAR")
								newUnit = pPlayer.initUnit(i_utEinherjar,pPlot2.getX(),pPlot2.getY(),UnitAITypes.NO_UNITAI,DirectionTypes.DIRECTION_SOUTH)
								szBuffer1 = gc.getUnitInfo(i_utEinherjar).getDescription()
								szText = localText.getText("TXT_KEY_DOFLARELIFENODEZE_GAMETXT13",(szBuffer1,szBuffer1))
								### msg: The graveyard grants a free %s1. ### (only log msg)
								CyInterface().addMessage(iPlayer,True,-1,szText,'',0,szSanctifyButton,ColorTypes(i_ctNodeMsg),pPlot2.getX(),pPlot2.getY(),True,True)
								#self.doConvertUnit( pPlayer, pPlayer, -1, i_utEinherjar, pPlot2, szText, i_ctNodeMsg, i_ctBadMsg )

	def doFlareMetamagicNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_DISPEL_MAGIC"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_DISPEL_MAGIC",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		l_iPromotionsGood = [
					gc.getInfoTypeForString("PROMOTION_BLESSED"),
					gc.getInfoTypeForString("PROMOTION_BLUR"),
					gc.getInfoTypeForString("PROMOTION_COURAGE"),
					gc.getInfoTypeForString("PROMOTION_CROWN_OF_BRILLANCE"),
					gc.getInfoTypeForString("PROMOTION_DANCE_OF_BLADES"),
					gc.getInfoTypeForString("PROMOTION_ENCHANTED_BLADE"),
					gc.getInfoTypeForString("PROMOTION_FAIR_WINDS"),
					gc.getInfoTypeForString("PROMOTION_FLAMING_ARROWS"),
					gc.getInfoTypeForString("PROMOTION_HASTED"),
					gc.getInfoTypeForString("PROMOTION_HIDDEN"),
					gc.getInfoTypeForString("PROMOTION_LOYALTY"),
					gc.getInfoTypeForString("PROMOTION_MORALE"),
					gc.getInfoTypeForString("PROMOTION_POISONED_BLADE"),
					gc.getInfoTypeForString("PROMOTION_REGENERATION"),
					gc.getInfoTypeForString("PROMOTION_SHADOWWALK"),
					gc.getInfoTypeForString("PROMOTION_SHIELD_OF_FAITH"),
					gc.getInfoTypeForString("PROMOTION_SPELLSTAFF"),
					gc.getInfoTypeForString("PROMOTION_STONESKIN"),
					gc.getInfoTypeForString("PROMOTION_VALOR"),
					gc.getInfoTypeForString("PROMOTION_WARCRY")
					]
		l_iPromotionsBad = [
					gc.getInfoTypeForString("PROMOTION_BURNING_BLOOD"),
					gc.getInfoTypeForString("PROMOTION_CHARMED"),
					gc.getInfoTypeForString("PROMOTION_ENRAGED"),
					gc.getInfoTypeForString("PROMOTION_FATIGUED"),
					gc.getInfoTypeForString("PROMOTION_POISONED"),
					gc.getInfoTypeForString("PROMOTION_RUSTED"),
					gc.getInfoTypeForString("PROMOTION_SLOW")
					]
		i_utEye = gc.getInfoTypeForString("UNIT_EYE")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_DARK_PINK_TEXT")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_METAMAGIC")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		if iRadius >= 2 or bEvent == True:
			pPlot2 = self.canSetUnitZE( iPlayer, pPlot )
			if pPlot2 != -1:
				iDuration = 2
				if bEvent == True:
					iDuration = 3
				i_ptInvisible = gc.getInfoTypeForString("PROMOTION_INVISIBLE")
				i_ptIllusion = gc.getInfoTypeForString("PROMOTION_ILLUSION")
				iX2 = pPlot2.getX()
				iY2 = pPlot2.getY()
				l_iX = [ -1, -1,  1, 1 ]
				l_iY = [ -1,  1, -1, 1 ]
				for iEye in range(len(l_iX)):
					pUnitEye = pPlayer.initUnit(i_utEye, iX2, iY2, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
					pUnitEye.setHasPromotion(i_ptInvisible, true)
					pUnitEye.setHasPromotion(i_ptIllusion, true)
					pUnitEye.getGroup().pushMission(MissionTypes.MISSION_RECON, iX2 + l_iX[iEye] , iY2 + l_iY[iEye], 0, False, False, MissionAITypes.NO_MISSIONAI, pUnitEye.plot(), pUnitEye)
					pUnitEye.setDuration(iDuration)
					pUnitEye.setName("Whisper of the Mana Flare")
					#pUnitEye.kill(True, 0)

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						for ii in range(len(l_iPromotionsGood)):
							if pUnit.isHasPromotion(l_iPromotionsGood[ii]) == True:
								chance = CyGame().getSorenRandNum( 2, "remove Promotion")
								if chance == 1 or bEvent == True:
									self.doRemovePromotionZE( pPlayer, pUnit, l_iPromotionsGood[ii], i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
									### msg: %s1 removed. ### (log only)
						for ii in range(len(l_iPromotionsBad)):
							if pUnit.isHasPromotion(l_iPromotionsBad[ii]) == True:
								chance = CyGame().getSorenRandNum( 2, "remove Promotion")
								if chance == 1 or bEvent == True:
									self.doRemovePromotionZE( pPlayer, pUnit, l_iPromotionsBad[ii], i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
									### msg: %s1 removed. ### (log only)

	def doFlareMindNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_FOUND_TEMPLE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_DARK_RED")
		i_ptCharmed = gc.getInfoTypeForString("PROMOTION_CHARMED")
		l_iUnitCT = [
				gc.getInfoTypeForString("UNITCOMBAT_ARCHER"),
				gc.getInfoTypeForString("UNITCOMBAT_MELEE"),
				gc.getInfoTypeForString("UNITCOMBAT_MOUNTED"),
				gc.getInfoTypeForString("UNITCOMBAT_RECON"),
				gc.getInfoTypeForString("UNITCOMBAT_ADEPT"),
				gc.getInfoTypeForString("UNITCOMBAT_DISCIPLE"),
				gc.getInfoTypeForString("UNITCOMBAT_ANIMAL"),
				gc.getInfoTypeForString("UNITCOMBAT_BEAST")
				]
		i_ptAvatar = gc.getInfoTypeForString("PROMOTION_AVATAR")
		i_ptDragon = gc.getInfoTypeForString("PROMOTION_DRAGON")
		i_ptHero = gc.getInfoTypeForString("PROMOTION_HERO")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_MIND")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.getUnitCombatType() in l_iUnitCT:
							chance = CyGame().getSorenRandNum( 3, "Charmed")
							if chance == 1 or bEvent == True:
								if pUnit.isHasPromotion(i_ptCharmed) == True:
									self.doRemovePromotionZE( pPlayer, pUnit, i_ptCharmed, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
									### msg: %s1 removed. ### (Charmed removed.) (log only)
								else:
									self.doPromotionZE( pPlayer, pUnit, i_ptCharmed, i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
									### msg: %s1 ### (log only)

						if iPlayer2 != iPlayer or bEvent == False:	### <-- (only affect NodeOwner units if bEvent == False)
							iRand = 100
							if bEvent == True:
								iRand = 25
							chance = CyGame().getSorenRandNum( iRand, "Domination")
							if chance == 0:
								if pPlot.isCity() == False:
									if pUnit.isAlive() == True:
										if pUnit.isHasPromotion(i_ptAvatar) == False and pUnit.isHasPromotion(i_ptDragon) == False and pUnit.isHasPromotion(i_ptHero) == False:
											pPlayerBarbarian = gc.getPlayer(gc.getBARBARIAN_PLAYER())
											iPlayerBarbarian = pPlayerBarbarian.getID()
											if iPlayer2 != iPlayerBarbarian:
												pPlot2 = self.canSetUnitZE( iPlayerBarbarian, pPlot )
												if pPlot2 != -1:
													iUnit = pUnit.getUnitType()
													pNewUnit = pPlayerBarbarian.initUnit( iUnit, pPlot2.getX(), pPlot2.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
													pNewUnit.convert(pUnit)
													pNewUnit.finishMoves()
													szButton = gc.getUnitInfo(iUnit).getButton()
													szBuffer = gc.getUnitInfo(iUnit).getDescription()
													szText = localText.getText("TXT_KEY_DOFLAREMINDNODEZE_GAMETXT3",(szBuffer,szBuffer))
													### msg: A %s1 got dominated by an evil spirit and turned against us!  ###
													CyInterface().addMessage(iPlayer2,True,25,szText,'',0,szButton,ColorTypes(i_ctBadMsg),pPlot2.getX(),pPlot2.getY(),True,True)
													if iPlayer2 != iPlayer:
														szText = localText.getText("TXT_KEY_PRINT_MSG",(szBuffer,szBuffer))
														CyInterface().addMessage(iPlayer,True,25,szText,'',0,szButton,ColorTypes(i_ctBadMsg),pPlot2.getX(),pPlot2.getY(),True,True)
														### msg: %s1 ###

					if pPlot.isCity() == True:
						l_sPromotions = [ "MIND1" ]
						self.getTempIllusion( iiX, iiY, -1, bEvent, l_sPromotions, -1 )

						iBuilding = gc.getInfoTypeForString("BUILDING_INSPIRATION")
						self.doBuildingZE( pPlot, iBuilding, i_ctNodeMsg )

	def doFlareNatureNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString('EFFECT_BLOOM'),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_BLOOM",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ftForest = gc.getInfoTypeForString("FEATURE_FOREST")
		i_stTreetopDefence = gc.getInfoTypeForString("SPELL_TREETOP_DEFENCE")
		i_ptPoisoned = gc.getInfoTypeForString("PROMOTION_POISONED")
		i_ptPoisonedBlade = gc.getInfoTypeForString("PROMOTION_POISONED_BLADE")
		i_utWolf = gc.getInfoTypeForString("UNIT_WOLF")
		i_utLion = gc.getInfoTypeForString("UNIT_LION")
		i_utGiantSpider = gc.getInfoTypeForString("UNIT_GIANT_SPIDER")
		i_utBabySpider = gc.getInfoTypeForString("UNIT_BABY_SPIDER")
		i_utWolfPack = gc.getInfoTypeForString("UNIT_WOLF_PACK")
		i_utLionPride = gc.getInfoTypeForString("UNIT_LION_PRIDE")
		i_utTreant = gc.getInfoTypeForString("UNIT_TREANT")
		i_utGuardianVines = gc.getInfoTypeForString("UNIT_GUARDIAN_VINES")
		i_uctArcher = gc.getInfoTypeForString("UNITCOMBAT_ARCHER")
		i_uctMelee = gc.getInfoTypeForString("UNITCOMBAT_MELEE")
		i_uctMounted = gc.getInfoTypeForString("UNITCOMBAT_MOUNTED")
		i_uctRecon = gc.getInfoTypeForString("UNITCOMBAT_RECON")
		i_uctAdept = gc.getInfoTypeForString("UNITCOMBAT_ADEPT")
		i_uctAnimal = gc.getInfoTypeForString("UNITCOMBAT_ANIMAL")
		i_uctBeast = gc.getInfoTypeForString("UNITCOMBAT_BEAST")
		i_uctDisciple = gc.getInfoTypeForString("UNITCOMBAT_DISCIPLE")
		l_iUnitCT = [i_uctArcher,i_uctMelee,i_uctMounted,i_uctRecon,i_uctAdept,i_uctDisciple]
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_DARK_DARK_GREEN_TEXT")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_NATURE")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_POISON")
		i_ReligionType = gc.getInfoTypeForString("RELIGION_FELLOWSHIP_OF_LEAVES")
		szSanctifyButton = gc.getSpellInfo(gc.getInfoTypeForString("SPELL_SANCTIFY")).getButton()
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )
		pPlot.setFeatureType(i_ftForest, 0)
		if bEvent == False:
			self.doVitalize( pPlot, i_ctNodeMsg )

		for iiX in range(iX - 1, iX + 2, 1):
			for iiY in range(iY - 1, iY + 2, 1):
				pPlot = CyMap().plot(iiX, iiY)
				if pPlot.isNone() == False:
					if bEvent == False:
						self.doTrees( pPlot, i_ctNodeMsg )
					if pPlot.getPlotCounter() <= 9:
						chance = CyGame().getSorenRandNum( 20, "Vitalize")
						if chance == 0 or bEvent == True:
							self.doVitalize( pPlot, i_ctNodeMsg )
					if pPlot.getPlotCounter() >= 10:
						pPlot.changePlotCounter(-100)
						pPlot.rebuildGraphics()
						if pPlot.isOwned():
							szText = localText.getText("TXT_KEY_DOFLARENATURENODEZE_GAMETXT3",())
							### msg: Hell terrain removed. ### (log only)
							CyInterface().addMessage(pPlot.getOwner(),True,-1,szText,'',0,szSanctifyButton,ColorTypes(i_ctNodeMsg),iiX,iiY,True,True)

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					if bEvent == True:
						self.doTrees( pPlot, i_ctNodeMsg )

					l_pUnitsUpgrade = []
					l_pPlotsUpgrade = []
					l_iUpgrade = []
					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.canFortify(pPlot) == True:
							pUnit.setFortifyTurns(5)
							self.printMsg( -1, i_stTreetopDefence, -1, -1, -1, pPlot, pPlayer, pUnit, i_ctNodeMsg, i_ctBadMsg, -1 )
							### msg: %s1 ### (<--Treetop Defence) (log only)
						if pUnit.getUnitCombatType() in l_iUnitCT:
							if pUnit.getUnitType() != i_utTreant:
								i_rDmg = 8 + 2 * iRadius
								i_sDmg = 8 + 2 * iRadius
								if pPlayer2.getStateReligion() == i_ReligionType:
									i_rDmg = int(i_rDmg * 0.5)
									i_sDmg = int(i_sDmg * 0.5)
								self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
								pUnit.setHasPromotion(i_ptPoisoned, True)
								if pUnit.getUnitCombatType() == i_uctRecon:
									self.doPromotionChanceZE( 50, -1, pPlayer, pUnit, i_ptPoisonedBlade, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						iRand = 100
						if bEvent == True:
							iRand = 15
						chance = CyGame().getSorenRandNum( iRand, "chance")
						if chance == 1:
							iPromotion = gc.getInfoTypeForString("PROMOTION_POISON_RESISTANCE")
							self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.getUnitCombatType() == i_uctAnimal or pUnit.getUnitCombatType() == i_uctBeast or pUnit.getUnitType() == i_utTreant:
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
							self.doEmpowerZE( pPlayer, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.getUnitType() == i_utGuardianVines:
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
							pUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_EMPOWER1"), True)
							pUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_EMPOWER2"), True)
							pUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_EMPOWER3"), True)
							pUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_EMPOWER4"), True)
							iPromotion = gc.getInfoTypeForString("PROMOTION_EMPOWER5")
							self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							### msg: %s1 ### (log only)
						chance = CyGame().getSorenRandNum( 20, "chance")
						if chance == 1 or bEvent == True:
							if pUnit.getUnitType() == i_utBabySpider:
								l_pUnitsUpgrade.append(pUnit)
								l_pPlotsUpgrade.append(pPlot)
								l_iUpgrade.append(i_utGiantSpider)
							if pUnit.getUnitType() == i_utLion:
								l_pUnitsUpgrade.append(pUnit)
								l_pPlotsUpgrade.append(pPlot)
								l_iUpgrade.append(i_utLionPride)
							if pUnit.getUnitType() == i_utWolf:
								l_pUnitsUpgrade.append(pUnit)
								l_pPlotsUpgrade.append(pPlot)
								l_iUpgrade.append(i_utWolfPack)
						if bEvent == True:
							if pUnit.getUnitType() == i_utGiantSpider:
								pPlot2 = self.canSetUnitZE( iPlayer2, pPlot )
								if pPlot2 != -1:
									l_pUnitsUpgrade.append(-1)
									l_pPlotsUpgrade.append(pPlot2)
									l_iUpgrade.append(i_utBabySpider)
							if pUnit.getUnitType() == i_utWolfPack:
								l_pUnitsUpgrade.append(-1)
								l_pPlotsUpgrade.append(pPlot)
								l_iUpgrade.append(i_utWolf)
							if pUnit.getUnitType() == i_utLionPride:
								l_pUnitsUpgrade.append(-1)
								l_pPlotsUpgrade.append(pPlot)
								l_iUpgrade.append(i_utLion)
					if len(l_pUnitsUpgrade) > 0:
						for iUp in range(len(l_pUnitsUpgrade)):
							self.doConvertUnit( pPlayer, pPlayer2, l_pUnitsUpgrade[iUp], l_iUpgrade[iUp], l_pPlotsUpgrade[iUp], -1, i_ctNodeMsg, i_ctBadMsg )

 
Update:
FF version: (save game compatible)
Now also animal units can "fight" in the Great Colosseum just for the entertainment sake. They will always die but provide additional happiness turns depending on the unit lvl. (In my last FF game I had so many bears I didn't know what to do with them so I added this feature.)

FFH2 version:
Made it compatible with version 0.41i.
(Also enabled animals to fight in the Great Colosseum.)


Spoiler GIR02ManaFlares ( Part 6 / 6 ) :

Spoiler GIR02ManaFlares.py ( PART 5 / 5 ) :

Code:
	def doFlareShadowNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_REVELATION",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		l_iUnitCT = [
				gc.getInfoTypeForString("UNITCOMBAT_ARCHER"),
				gc.getInfoTypeForString("UNITCOMBAT_MELEE"),
				gc.getInfoTypeForString("UNITCOMBAT_MOUNTED"),
				gc.getInfoTypeForString("UNITCOMBAT_RECON"),
				gc.getInfoTypeForString("UNITCOMBAT_ADEPT"),
				gc.getInfoTypeForString("UNITCOMBAT_DISCIPLE"),
				gc.getInfoTypeForString("UNITCOMBAT_ANIMAL"),
				gc.getInfoTypeForString("UNITCOMBAT_BEAST")
				]
		i_uctNaval = gc.getInfoTypeForString("UNITCOMBAT_NAVAL")
		i_utMistform = gc.getInfoTypeForString("UNIT_MISTFORM")
		i_ptBlur = gc.getInfoTypeForString("PROMOTION_BLUR")
		i_ptShadowWalk = gc.getInfoTypeForString("PROMOTION_SHADOWWALK")
		i_ptHiddenNationality = gc.getInfoTypeForString("PROMOTION_HIDDEN_NATIONALITY")
		i_ptInvisible = gc.getInfoTypeForString("PROMOTION_INVISIBLE")
		i_ptHidden = gc.getInfoTypeForString("PROMOTION_HIDDEN")
		i_ptPoisoned = gc.getInfoTypeForString("PROMOTION_POISONED")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_YIELD_PRODUCTION")
		i_ReligionType = gc.getInfoTypeForString("RELIGION_COUNCIL_OF_ESUS")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_POISON")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_SHADOW")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.getUnitCombatType() in l_iUnitCT or pUnit.getUnitCombatType() == i_uctNaval:
							self.doPromotionZE( pPlayer, pUnit, i_ptBlur, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							if pUnit.getUnitCombatType() != i_uctNaval:
								self.doPromotionChanceZE( 50, bEvent, pPlayer, pUnit, i_ptShadowWalk, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
								if pUnit.isAlive() == True:
									if pUnit.getUnitType() != i_utMistform:
										chance = CyGame().getSorenRandNum( 3, "33% chance")
										if chance == 1:
											i_rDmg = 2 + 3 * iRadius
											i_sDmg = 2 + 3 * iRadius
											if pPlayer2.getStateReligion() == i_ReligionType:
												i_rDmg = int(i_rDmg * 0.5)
												i_sDmg = int(i_sDmg * 0.5)
											self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
											pUnit.setHasPromotion(i_ptPoisoned, True)
						iRand = 100
						if bEvent == True:
							iRand = 15
						chance = CyGame().getSorenRandNum( iRand, "chance")
						if chance <= 1:
							self.doPromotionZE( pPlayer, pUnit, i_ptHiddenNationality, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						elif chance == 2:
							self.doPromotionZE( pPlayer, pUnit, i_ptInvisible, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						elif chance == 3 or chance == 4:
							self.doPromotionZE( pPlayer, pUnit, i_ptHidden, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

	def doFlareSpiritNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_HOPE",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ptSpiritGuide = gc.getInfoTypeForString("PROMOTION_SPIRIT_GUIDE")
		i_ptCourage = gc.getInfoTypeForString("PROMOTION_COURAGE")
		l_iUnitCT = [
				gc.getInfoTypeForString("UNITCOMBAT_ARCHER"),
				gc.getInfoTypeForString("UNITCOMBAT_MELEE"),
				gc.getInfoTypeForString("UNITCOMBAT_MOUNTED"),
				gc.getInfoTypeForString("UNITCOMBAT_RECON"),
				gc.getInfoTypeForString("UNITCOMBAT_ADEPT"),
				gc.getInfoTypeForString("UNITCOMBAT_DISCIPLE")
				]
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_LIGHT_YELLOW_TEXT")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_SPIRIT")
		szNodeButton = CyArtFileMgr().getImprovementArtInfo(gc.getImprovementInfo(i_itNode).getArtDefineTag()).getButton()
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		iRand = (36 - (3 * iRadius))
		chance = CyGame().getSorenRandNum( iRand, "chance Attitude change")
		if chance == 1 or bEvent == True:
			l_iiPlayer = []
			iAttitudeChange = 1
			iColor = i_ctNodeMsg
			if bEvent == False:
				iAttitudeChange = CyGame().getSorenRandNum( 2, "AttitudeChange")
				if iAttitudeChange == 0:
					iAttitudeChange = -1
					iColor = i_ctBadMsg
			for iiPlayer in range(gc.getMAX_PLAYERS()):
				if iiPlayer != iPlayer:
					ppPlayer = gc.getPlayer(iiPlayer)
					if ppPlayer.isAlive() == True:
						if ppPlayer.isBarbarian() == False:
							iiTeam = gc.getPlayer(iiPlayer).getTeam()
							eeTeam = gc.getTeam(iiTeam)
							if eeTeam.isHasMet(iPlayer):
								l_iiPlayer.append(iiPlayer)
			if len(l_iiPlayer) > 0:
				iRand = CyGame().getSorenRandNum( len(l_iiPlayer), "iiPlayer")
				iiPlayer = l_iiPlayer[iRand]
				ppPlayer = gc.getPlayer(iiPlayer)
				ppPlayer.AI_changeAttitudeExtra(iPlayer,iAttitudeChange)
				szBuffer = gc.getPlayer(iiPlayer).getCivilizationDescription(0)
				szText = localText.getText("TXT_KEY_DOFLARESPIRITNODEZE_GAMETXT3",(iAttitudeChange,szBuffer))
				### msg: %d1 attitude change with %s2! ###
				CyInterface().addMessage(iPlayer,True,15,szText,'',0,szNodeButton,ColorTypes(iColor),iX,iY,True,True)

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.getUnitCombatType() in l_iUnitCT:
							iRand = (30 - (3 * iRadius))
							if bEvent == True:
								iRand = 2
							chance = CyGame().getSorenRandNum( iRand, "chance SpiritGuide")
							if chance == 1:
								self.doPromotionZE( pPlayer, pUnit, i_ptSpiritGuide, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doPromotionChanceZE( 50, bEvent, pPlayer, pUnit, i_ptCourage, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

					if pPlot.isCity() == True:
						l_sPromotions = [ "SPIRIT2" ]
						self.getTempIllusion( iiX, iiY, -1, bEvent, l_sPromotions, -1 )

						iBuilding = gc.getInfoTypeForString("BUILDING_HOPE")
						self.doBuildingZE( pPlot, iBuilding, i_ctNodeMsg )

	def doFlareSunNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_REVELATION",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_Feature = gc.getInfoTypeForString("FEATURE_SCRUB")
		l_iUnitCT = [
				gc.getInfoTypeForString("UNITCOMBAT_ARCHER"),
				gc.getInfoTypeForString("UNITCOMBAT_MELEE"),
				gc.getInfoTypeForString("UNITCOMBAT_MOUNTED"),
				gc.getInfoTypeForString("UNITCOMBAT_RECON"),
				gc.getInfoTypeForString("UNITCOMBAT_ADEPT"),
				gc.getInfoTypeForString("UNITCOMBAT_DISCIPLE"),
				]
		i_utAurealis = gc.getInfoTypeForString("UNIT_AUREALIS")
		i_ptHiddenNationality = gc.getInfoTypeForString("PROMOTION_HIDDEN_NATIONALITY")
		i_ptInvisible = gc.getInfoTypeForString("PROMOTION_INVISIBLE")
		i_ptHidden = gc.getInfoTypeForString("PROMOTION_HIDDEN")
		l_iPromotions = [ i_ptHiddenNationality, i_ptInvisible, i_ptHidden ]
		i_ptIllusion = gc.getInfoTypeForString("PROMOTION_ILLUSION")
		i_ptSlow = gc.getInfoTypeForString("PROMOTION_SLOW")
		i_ptCrownOfBrillance = gc.getInfoTypeForString("PROMOTION_CROWN_OF_BRILLANCE")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_YIELD_COMMERCE")
		i_ttSnow = gc.getInfoTypeForString("TERRAIN_SNOW")
		i_ttTundra = gc.getInfoTypeForString("TERRAIN_TUNDRA")
		i_ttDesert = gc.getInfoTypeForString("TERRAIN_DESERT")
		i_ttPlains = gc.getInfoTypeForString("TERRAIN_PLAINS")
		i_ttMarsh = gc.getInfoTypeForString("TERRAIN_MARSH")
		i_ttBurningSands = gc.getInfoTypeForString("TERRAIN_BURNING_SANDS")
		i_ttFieldsOfPerdition = gc.getInfoTypeForString("TERRAIN_FIELDS_OF_PERDITION")
		i_ttShallows = gc.getInfoTypeForString("TERRAIN_SHALLOWS")
		i_stScorch = gc.getInfoTypeForString("SPELL_SCORCH")
		i_ReligionType = gc.getInfoTypeForString("RELIGION_THE_EMPYREAN")
		i_rtCouncilOfEsus = gc.getInfoTypeForString("RELIGION_COUNCIL_OF_ESUS")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_SUN")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_FIRE")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		pPlot.setFeatureType(i_Feature, -1)
		if pPlot.isOwned():
			iColor = i_ctBadMsg
			self.printMsg( -1, -1, i_Feature, -1, -1, pPlot, -1, -1, iColor, -1, -1 )
			### msg: %s1 ###

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					iChange = -1
					if pPlot.getTerrainType() == i_ttPlains:
						iChange = 1
						pPlot.setTerrainType(i_ttDesert,True,True)
					if pPlot.getTerrainType() == i_ttFieldsOfPerdition:
						iChange = 1
						pPlot.setTerrainType(i_ttBurningSands,True,True)
					if pPlot.getTerrainType() == i_ttSnow:
						iChange = 1
						pPlot.setTerrainType(i_ttTundra,True,True)
					if pPlot.getTerrainType() == i_ttMarsh:
						iChange = 1
						pPlot.setTerrainType(i_ttPlains,True,True)
					if pPlot.getTerrainType() == i_ttShallows:
						iChange = 1
						pPlot.setTerrainType(i_ttFieldsOfPerdition,True,True)
					if iChange != -1:
						if pPlot.isOwned():
							self.printMsg( -1, i_stScorch, -1, -1, -1, pPlot, -1, -1, i_ctBadMsg, -1, -1 )
							### msg: %s1 ### (<--Scorch) (log only)

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.isHasPromotion(i_ptIllusion) == True:
							chance = CyGame().getSorenRandNum( 100, "damage all illusions")
							if chance <= 95 or bEvent == True:
								self.doDamageZE( pPlayer, pUnit, 100, 100, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.getUnitType() != i_utAurealis:
							i_rDmg = 6 + 2 * iRadius
							i_sDmg = 4 + 2 * iRadius
							if pPlayer2.getStateReligion() == i_ReligionType:
								i_rDmg = int(i_rDmg * 0.5)
								i_sDmg = int(i_sDmg * 0.5)
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						iRand = 3
						if bEvent == True:
							iRand = 2
						chance = CyGame().getSorenRandNum( iRand, "chance for blinding light")	### dont know how to use blinding light with python :(
						if chance == 1:
							pUnit.finishMoves()
						if pPlayer2.getStateReligion() == i_rtCouncilOfEsus:
							self.doPromotionZE( pPlayer, pUnit, i_ptSlow, i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
						for ii in range(len(l_iPromotions)):
							if pUnit.isHasPromotion(l_iPromotions[ii]) == True:
								iRand = 15
								if l_iPromotions[ii] == i_ptInvisible:
									iRand = 60
								chance = CyGame().getSorenRandNum( iRand, "remove Promotion")
								if chance == 1 or bEvent == True:
									self.doRemovePromotionZE( pPlayer, pUnit, l_iPromotions[ii], i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
									### msg: %s1 removed. ### (log only)
						if pUnit.getUnitCombatType() in l_iUnitCT:
							iRand = 50
							if bEvent == True:
								iRand = 10
							chance = CyGame().getSorenRandNum( iRand, "CrownOfBrillance")
							if chance == 1:
								self.doPromotionZE( pPlayer, pUnit, i_ptCrownOfBrillance, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

	def doFlareWaterNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		eTeam = gc.getTeam(pPlayer.getTeam())
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString('EFFECT_SPRING'),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_SPRING",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_utWaterElemental = gc.getInfoTypeForString("UNIT_WATER_ELEMENTAL")
		i_utWorkBoat = gc.getInfoTypeForString("UNIT_WORKBOAT")
		i_uctNaval = gc.getInfoTypeForString("UNITCOMBAT_NAVAL")
		i_uctAnimal = gc.getInfoTypeForString("UNITCOMBAT_ANIMAL")
		i_uctBeast = gc.getInfoTypeForString("UNITCOMBAT_BEAST")
		i_ptSlow = gc.getInfoTypeForString("PROMOTION_SLOW")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_BLUE")
		i_ttDesert = gc.getInfoTypeForString("TERRAIN_DESERT")
		i_ttPlains = gc.getInfoTypeForString("TERRAIN_PLAINS")
		i_ttCoast = gc.getInfoTypeForString("TERRAIN_COAST")
		i_ttBurningSands = gc.getInfoTypeForString("TERRAIN_BURNING_SANDS")
		i_ttFieldsOfPerdition = gc.getInfoTypeForString("TERRAIN_FIELDS_OF_PERDITION")
		i_itSmoke = gc.getInfoTypeForString("IMPROVEMENT_SMOKE")
		i_ftFlames = gc.getInfoTypeForString("FEATURE_FLAMES")
		i_stSpring = gc.getInfoTypeForString("SPELL_SPRING")
		i_ReligionType = gc.getInfoTypeForString("RELIGION_OCTOPUS_OVERLORDS")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_MANA_WATER")
		i_DmgType = gc.getInfoTypeForString("DAMAGE_COLD")
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					iChange = -1
					if pPlot.getTerrainType() == i_ttDesert:
						iChange = 1
						pPlot.setTerrainType(i_ttPlains,True,True)
					if pPlot.getTerrainType() == i_ttBurningSands:
						iChange = 1
						pPlot.setTerrainType(i_ttFieldsOfPerdition,True,True)
					if pPlot.getFeatureType() == i_ftFlames:
						iChange = 1
						pPlot.setFeatureType(-1, -1)
					if pPlot.getImprovementType() == i_itSmoke:
						iChange = 1
						pPlot.setImprovementType(-1)
					if iChange != -1:
						if pPlot.isOwned():
							self.printMsg( -1, i_stSpring, -1, -1, -1, pPlot, -1, -1, i_ctNodeMsg, -1, -1 )
							### msg: %s1 ### (<--Spring) (log only)

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						iUnit = gc.getUnitInfo(pUnit.getUnitType())
						pPlayer2 = gc.getPlayer(pUnit.getOwner())
						iPlayer2 = pPlayer2.getID()
						if pUnit.getUnitType() != i_utWaterElemental:
							i_rDmg = 6 + 2 * iRadius
							i_sDmg = 4 + 2 * iRadius
							if pPlot.isRiverSide() == True:
								i_rDmg = i_rDmg * 2 + 2
							if pPlot.getTerrainType() == i_ttCoast:
								i_sDmg = i_sDmg * 2 + 2
							if pPlot.isWater() == True:
								if pUnit.getUnitCombatType() == i_uctAnimal or pUnit.getUnitCombatType() == i_uctBeast:
									i_rDmg = 6
									i_sDmg = 2
							if pPlayer2.getStateReligion() == i_ReligionType:
								i_rDmg = int(i_rDmg * 0.5)
								i_sDmg = int(i_sDmg * 0.5)
							self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_DmgType, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.getUnitType() == i_utWaterElemental:
							self.doEmpowerElementalZE( pPlayer, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
							self.doHealZE( pPlayer, pUnit, -1, i_ctNodeMsg, i_ctBadMsg, iiX, iiY, bEvent )
						iRand = 100
						if bEvent == True:
							iRand = 15
						chance = CyGame().getSorenRandNum( iRand, "chance")
						if chance == 1:
							iPromotion = gc.getInfoTypeForString("PROMOTION_COLD_RESISTANCE")
							self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
						elif chance == 2:
							iPromotion = gc.getInfoTypeForString("PROMOTION_IMMUNE_COLD")
							self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if bEvent == True:
							if pPlot.isWater() == False:
								chance = CyGame().getSorenRandNum( 100, "chance")
								if chance == 1:
									if pUnit.getUnitCombatType() != i_uctNaval or pUnit.getUnitCombatType() != gc.getInfoTypeForString("UNITCOMBAT_SIEGE"):
										iPromotion = gc.getInfoTypeForString("PROMOTION_WATER_WALKING")
										self.doPromotionZE( pPlayer, pUnit, iPromotion, i_ctBadMsg, i_ctNodeMsg, iiX, iiY )
						if pUnit.getUnitCombatType() == i_uctNaval or pUnit.getUnitType() == i_utWorkBoat:
							pUnit.finishMoves()
						chance = CyGame().getSorenRandNum( 20, "chance")
						if chance == 1 or bEvent == True:
							if pPlot.isWater() == True:
								if pUnit.getUnitCombatType() == i_uctAnimal or pUnit.getUnitCombatType() == i_uctBeast:
									if pUnit.isHasPromotion(gc.getInfoTypeForString("PROMOTION_FLYING")) == False:
										self.doEmpowerZE( pPlayer, pUnit, bEvent, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

	def doFlareRefineryNodeZE( self, pPlayer, pPlot, bEvent ):
		iPlayer = pPlayer.getID()
		point = pPlot.getPoint()
		CyEngine().triggerEffect(gc.getInfoTypeForString("EFFECT_SPELL1"),point)
		CyAudioGame().Play3DSound("AS3D_SPELL_MUTATION",point.x,point.y,point.z)
		iX = pPlot.getX()
		iY = pPlot.getY()
		i_ptMutated = gc.getInfoTypeForString("PROMOTION_MUTATED")
		i_ptPoisoned = gc.getInfoTypeForString("PROMOTION_POISONED")
		i_dtPoison = gc.getInfoTypeForString("DAMAGE_POISON")
		i_ctBadMsg = gc.getInfoTypeForString("COLOR_RED")
		i_ctNodeMsg = gc.getInfoTypeForString("COLOR_PLAYER_DARK_CYAN_TEXT")
		i_itNode = gc.getInfoTypeForString("IMPROVEMENT_REFINERY")
		i_ttWasteland = gc.getInfoTypeForString("TERRAIN_WASTELAND")
		l_pPlots = []
		argsListEst = self.getEstEnd()
		count = argsListEst[1] + 4		# ### count = argsListEst[1] ### <- 4,6,8,16
		countHalbe = int( count / 2 )
		if countHalbe <= 0:
			countHalbe = 1
		if bEvent == True:
			count = countHalbe
		iRadius = self.getRadiusZE( bEvent )
		self.screenMsgZE( iPlayer, iRadius, i_itNode, i_ctNodeMsg, i_ctBadMsg, bEvent, iX, iY )

		if pPlot.getTerrainType() != i_ttWasteland:
			pPlot.setTempTerrainType(i_ttWasteland, CyGame().getSorenRandNum(count, "timer") + count)
			if pPlot.isOwned() == True:
				CyInterface().addMessage(pPlot.getOwner(),false,15,localText.getText("TXT_KEY_DOFLAREREFINERYNODEZE_GAMETXT1",(gc.getTerrainInfo(i_ttWasteland).getDescription(),)),'',0,gc.getTerrainInfo(i_ttWasteland).getButton(),ColorTypes(i_ctBadMsg),iX,iY,True,True)
				### msg: Due to a refinery flare the refinery plot changed temporary to %s1. ###

		if bEvent == False:
			for iiX in range(iX - 1, iX + 2, 1):
				for iiY in range(iY - 1, iY + 2, 1):
					pPlot = CyMap().plot(iiX, iiY)
					if pPlot.isNone() == False:
						if pPlot.getTerrainType() != i_ttWasteland:
							if pPlot.isPeak() == False:
								if pPlot.isWater() == False:
									l_pPlots.append( pPlot )
			if len(l_pPlots) > 0:
				for i in range(len(l_pPlots)):
					chance = CyGame().getSorenRandNum( 2, "50% chance")
					if chance == 0:
						pPlot = l_pPlots[i]
						iRand = CyGame().getSorenRandNum( 2, "0,1") + 1
						pPlot.setTempTerrainType( i_ttWasteland, CyGame().getSorenRandNum(countHalbe, "timer") + iRand )
						if pPlot.isOwned() == True:
							CyInterface().addMessage(pPlot.getOwner(),false,15,localText.getText("TXT_KEY_DOFLAREREFINERYNODEZE_GAMETXT2",(gc.getTerrainInfo(i_ttWasteland).getDescription(),)),'',0,gc.getTerrainInfo(i_ttWasteland).getButton(),ColorTypes(i_ctBadMsg),pPlot.getX(),pPlot.getY(),True,True)
							### msg: Due to a refinery flare the this plot changed temporary to %s1. ###

		for iiX in range(iX-(iRadius), iX+(1+iRadius), 1):
			for iiY in range(iY-(iRadius), iY+(1+iRadius), 1):
				pPlot = CyMap().plot(iiX,iiY)
				if pPlot.isNone() == False:

					for i in range(pPlot.getNumUnits()):
						pUnit = pPlot.getUnit(i)
						i_rDmg = 5 + 3 * iRadius
						i_sDmg = 6 + 3 * iRadius
						if bEvent == True:
							i_rDmg = 1 + 1 * iRadius
						self.doDamageZE( pPlayer, pUnit, i_rDmg, i_sDmg, i_dtPoison, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if pUnit.isAlive() == True:
							self.doPromotionZE( pPlayer, pUnit, i_ptPoisoned, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )
						if self.isHasSRPromotion( pUnit ) == False:
							if self.isSRUnitCombat( pUnit ) == True:
								chance = 20
								if bEvent == True:
									chance = 40
								self.doPromotionChanceZE( chance, -1, pPlayer, pUnit, i_ptMutated, i_ctNodeMsg, i_ctBadMsg, iiX, iiY )

# #########################################################
# ### 				Mana Flares: Ende 					###
# #########################################################


#		iAdjustGameMainE1 = 1
#		iAdjustGameMainE2 = 2
#		iAdjustGameMainE3 = 3
#		iAdjustGameiiPlayer = 4
#		szText0815 = u"%d %d %d %d" % (iAdjustGameMainE1, iAdjustGameMainE2, iAdjustGameMainE3, iAdjustGameiiPlayer)
#		CyInterface().addMessage(0,True,15,szText0815,'',0,'',8,-1,-1,True,True)

 
Update:
FF version: (save game compatible)
Now also animal units can "fight" in the Great Colosseum just for the entertainment sake. They will always die but provide additional happiness turns depending on the unit lvl. (In my last FF game I had so many bears I didn't know what to do with them so I added this feature.)


Why not make the first bear/animal add a permanent +1 Happy to nearby cities (ala Bear Cage) and the subsequent bears/animals do what your propose?​
 
Why not make the first bear/animal add a permanent +1 Happy to nearby cities (ala Bear Cage) and the subsequent bears/animals do what your propose?

Didn't saw your post, sorry.
I wanted to make it like it was with the Flavian Amphitheatre. They "slaughter" animals just for fun so the happiness would only last for a short amount of time.


btw:

Update:
Now it's compatible with Rise from Erebus 1.12 (see first post).​
 
Top Bottom