<data>
	<powers>
<!-- -->
<!-- TEMPLATES -->
<!-- -->
		<powerTemplate r_name="'spellTemplate'"
									 mainSkillName="'Magic'"
									 minSkill="0"
									 affinityList="affinityList=flatten(arraysToArray(createArray($0[1],$0[0]),affinity))"
									 affinity="{}"
									 affinityOK="((length(affinity)==0)||(arrayToValue($0&&$1,arraysToArray(arrayToValue(attributeByName($0)>=$1,$0),affinity))))&&((skillName=='')||(attributeByName(skillName)>=minSkill))"
									 added="0">
			<modifier r_name="'enabled'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_enabled'" r_modifiedValue="$0&&affinityOK"/>
			<modifier r_name="'powerFatigueCost'" r_template="'mainModifierTemplate'" r_modifierTarget="'powerFatigueCost'" r_modifiedValue="max($0+spellCostModifier,($0>0)?1:0)"/>
			<modifier r_name="'buffExhaustionReduction'" r_template="'mainModifierTemplate'" r_enabled="(powerRange==0)&&exists(buffExhaustionReduction)" r_modifierTarget="'buffExhaustionReduction'" r_modifiedValue="$0*selfSpellSustainModifier"/>
			<modifier r_name="'tooltip'" r_template="'mainModifierTemplate'" r_modifierTarget="'tooltip'" r_modifiedValue="affinityOK?$0:(relocate(text.tooltipRaiseAffinities)+'\n'+$0)"/>
			<action r_name="'use'">
				<modifier r_name="'canExecute'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_canExecute'" r_modifiedValue="$0&&!silenced"/>
				<effect r_name="'mainEffect'">
					<effect r_name="'magicSpellSound'" r_template="{'mainSelfEffectTemplate','controllerEffect'}" r_className="'CctlEffectSound'" r_soundName="'magic.mp3'" r_recastTimer="0.3"/>
					<effect r_name="'magicSpellEffect'" r_template="'directSpellEffectGraphicTemplate'"/>
					<effect r_name="'anim'" r_template="'mainGraphicEffectTemplate'" r_enabled="isAnimated" r_type="'LaunchAnimation'" r_graphicTarget="actorName" r_animationName="'magic'" r_freezeDelay="3"/>
				</effect>
				<effect r_name="'cannotCastWhileSilenced'" r_template="'logCannotCastWhileSilenced'" r_enabled="!costPaid&&canPay&&silenced"/>
			</action>
			<event r_name="'learnedEvent'" r_template="'mainEventTemplate'" r_eventTarget="'w_learned'" r_targetType="'attribute'">
				<effect r_name="'notification'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}"
								r_enabled="!added&&affinityOK"
								r_effect="gameParameters.notifications+=simplifyArray({simplifyArray({text.newSpell+': '+r_displayName,r_graphic,'magic',-1})})"/>
				<effect r_name="'spellEnabled'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="affinityOK" r_effect="added=1"/>
			</event>
			<eventTemplate r_name="'affinityEventTemplate'" r_template="'mainEventTemplate'" r_enabled="w_learned&&(length(affinity)>affinityIndex)" r_eventTarget="affinity[affinityIndex][0]" r_targetType="'attribute'" affinityIndex="0">
				<effect r_name="'notification'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}"
								r_enabled="affinityOK&&!added"
								r_effect="gameParameters.notifications+=simplifyArray({simplifyArray({text.newSpell+': '+r_displayName,r_graphic,'magic',-1})})"/>
				<effect r_name="'spellEnabled'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="affinityOK&&!added" r_effect="all({added=1,character.addActionToCharacter(action)})"/>
			</eventTemplate>
			<event r_name="'affinity0Event'" r_template="'affinityEventTemplate'" affinityIndex="0"/>
			<event r_name="'affinity1Event'" r_template="'affinityEventTemplate'" affinityIndex="1"/>
			<event r_name="'affinity2Event'" r_template="'affinityEventTemplate'" affinityIndex="2"/>
			<event r_name="'affinity3Event'" r_template="'affinityEventTemplate'" affinityIndex="3"/>
			<eventTemplate r_name="'affinityBonusEventTemplate'" r_template="'mainEventTemplate'" r_enabled="w_learned&&(length(affinity)>affinityIndex)" r_eventTarget="affinity[affinityIndex][0]+'Bonus'" r_targetType="'attribute'" affinityIndex="0">
				<effect r_name="'notification'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}"
								r_enabled="affinityOK&&!added"
								r_effect="gameParameters.notifications+=simplifyArray({simplifyArray({text.newSpell+': '+r_displayName,r_graphic,'magic',-1})})"/>
				<effect r_name="'spellEnabled'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="affinityOK&&!added" r_effect="all({added=1,character.addActionToCharacter(action)})"/>
			</eventTemplate>
			<event r_name="'affinityBonus0Event'" r_template="'affinityBonusEventTemplate'" affinityIndex="0"/>
			<event r_name="'affinityBonus1Event'" r_template="'affinityBonusEventTemplate'" affinityIndex="1"/>
			<event r_name="'affinityBonus2Event'" r_template="'affinityBonusEventTemplate'" affinityIndex="2"/>
			<event r_name="'skillEventTemplate'" r_template="'mainEventTemplate'" r_enabled="w_learned" r_eventTarget="skillName" r_targetType="'attribute'">
				<effect r_name="'notification'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}"
								r_enabled="affinityOK&&!added"
								r_effect="gameParameters.notifications+=simplifyArray({simplifyArray({text.newSpell+': '+r_displayName,r_graphic,'magic',-1})})"/>
				<effect r_name="'spellEnabled'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="affinityOK&&!added" r_effect="all({added=1,character.addActionToCharacter(action)})"/>
			</event>
		</powerTemplate>
		
		<!-- Skill Template -->
		<powerTemplate r_name="'conjurationSpellTemplate'" r_template="'spellTemplate'" skillName="'Conjuration'">
			<modifier r_name="'conjurationSpellDurationModifier'" r_template="'mainModifierTemplate'" r_enabled="exists(powerDuration)" r_modifierTarget="'powerDuration'" r_modifiedValue="$0*conjurationSpellDurationModifier"/> 
		</powerTemplate>
		<powerTemplate r_name="'enchantmentSpellTemplate'" r_template="'spellTemplate'" skillName="'Enchantment'">
			<modifier r_name="'enchantmentDuration'" r_template="'mainModifierTemplate'" r_enabled="exists(powerDuration)" r_modifierTarget="'powerDuration'" r_modifiedValue="$0*enchantSpellDurationModifier"/>
		</powerTemplate>
		<powerTemplate r_name="'enchantmentMentalSpellTemplate'" r_template="'enchantmentSpellTemplate'">
			<action r_name="'use'">
				<modifier r_name="'canTargetUndead'" r_template="'mainModifierTemplate'" r_enabled="!undeadEnchantment" r_modifierTarget="'r_canTarget'" r_modifiedValue="$0&&(!exists(target)||!contains(target.encounterTags,'undead'))"/>
		 	</action>
		</powerTemplate>
		<powerTemplate r_name="'evocationSpellTemplate'" r_template="'spellTemplate'" skillName="'Evocation'"/>
		<powerTemplate r_name="'transmutationSpellTemplate'" r_template="'spellTemplate'" skillName="'Transmutation'"/>
		
		<!-- Area Spell Template -->
		<power r_name="'spellBlastInterface'"
					 powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
					 zoneEffectGraphic="'ToBeReplaced'"
					 blastEffectTemplate="'ToBeReplaced'"
					 powerRange="1">
			<action r_name="'use'"
							canTargetGround="1"
							r_targetingType="'standard'"
							canTargetFaction="(actor.r_hostileFaction)[target.r_faction]">
				<effect r_name="'mainEffect'"
								xDirection="0"
						 		yDirection="0">
					<effect r_name="'direction'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({xDirection=(targetSquare.w_xCoord>actor.w_xCoord)?1:((actor.w_xCoord>targetSquare.w_xCoord)?(-1):0),yDirection=(targetSquare.w_yCoord>actor.w_yCoord)?1:((actor.w_yCoord>targetSquare.w_yCoord)?(-1):0)})"/>
					<effect r_name="'strikeMH'" r_template="{'mainTargetEffectTemplate','controllerEffect'}" r_enabled="slashAndBlast&&exists(target)&&exists(mainhand)&&exists(mainhand.action)&&mainhand.action.r_enabled" r_className="'CctlEffectLaunchAction'" r_newActor="'actor'" r_newTarget="'target'" r_newActionType="'equippedItem'" r_newActionName="'mainhand'" r_delayRequest="0" r_params="{{'isFree',1}}"/>
					<effect r_name="'blastMainEffect'" r_template="{'mainSquareEffectTemplate','controllerEffect'}"
									r_className="'CctlEffectLaunchAreaEffect'"
									r_area="{'cone',targetSquare.w_xCoord,targetSquare.w_yCoord,easyOrientation8(actor.square.w_xCoord, actor.square.w_yCoord,targetSquare.w_xCoord,targetSquare.w_yCoord),3+blastRangeModifier}"
									r_areaTargetingType="'direct'">
						<effect r_name="'zoneEffectGraphic'" r_template="'zoneEffectGraphicTemplate'"/>
						<effect r_name="'blastEffect'" r_template="blastEffectTemplate"
										r_enabled="exists(target)"/>
					</effect>
				</effect>
			</action>
		</power>
		
		<!-- summon templates -->
		<power r_name="'summonMonsterTemplate'" r_template="{'activePowerTemplate','spellTemplate'}"
					 powerEffectTemplate="{'mainSquareEffectTemplate','controllerEffect'}"
					 r_displayName="text.powerSummonMonster"
					 powerRange="1"
					 powerDuration="0"
					 monsterName="''"
					 summonedMonsterLevel="-1"
					 summoningBaseParams="((summonedMonsterLevel>0)?{{'level',summonedMonsterLevel},{'effectiveLevel',summonedMonsterLevel}}:{})+{{'maxHitPoints',$0*summonSpellMaxHitPointModifier},{'MonsterWeaponSkill',$0+summonSpellHitModifier},{'Dodge',$0+summonSpellDefenseModifier},{'customCloseCombatDamageBonus',$0+summonSpellDamageModifier},{'customRangedDamageBonus',$0+summonSpellDamageModifier},{'NaturalArmor',$0+summonSpellArmorModifier},{'dyingTime',(powerDuration>0)?rw_currentTime+powerDuration:0}}"
					 undeadBaseParams="{{'maxHitPoints',$0*undeadSummonMaxHitPoints},{'NaturalArmor',$0+undeadSummonArmor}}">
			<action r_name="'use'" r_canTarget="(targetSquare.r_moveMask&7)==0" canBeInAutoAttack="0">
				<effect r_name="'mainEffect'"
								r_enabled="costPaid"
								r_className="'CctlEffectCreation'"
								r_creationType="'monster'"
								r_creationName="monsterName"
								r_params="summoningBaseParams">
				</effect>
		 		<effect r_name="'log'" r_template="'logPower'" r_enabled="costPaid"/>
			</action>
		</power>
		
		<!-- missile templates -->
		<power r_name="'missileTemplate'" r_template="'mainPowerSpellAttackDamage'"
					 missileGraphic="'slimeballBlue.png'"
					 missilePowerName="r_name">
			<action r_name="'use'"
							missileDelay="0">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'reboundEffect'" r_template="{'mainTargetEffectTemplate','controllerEffect'}"
										r_enabled="missileRebound"
										r_className="'CctlEffectLaunchAction'"
										r_newActor="'actor'"
										r_newTarget="'nearestActor'"
										r_viewRange="-1"
										r_nearestFrom="'target'"
										r_nearestRange="2"
										r_nearestTargetingType="'standard'"
										r_nearestActorRelation="'enemy'"
										r_newActionType="'power'"
										r_newActionName="missilePowerName"
										r_delayRequest="0"
										r_params="{{'isFree',1},{'missileRebound',0},simplifyArray({'missileXStart',targetSquare.w_xCoord}),simplifyArray({'missileYStart',targetSquare.w_yCoord}),simplifyArray({'missileDelay',2*actor.square.distanceTo(targetSquare)}),{'r_targetingType','all'},{'r_range',99}}"/>
					</effect>
				</effect>
			</action>
		</power>
		
<!-- -->
<!-- CONJURATION -->
<!-- -->
		<power r_name="'SummonFamiliar'" r_template="{'summonMonsterTemplate','conjurationSpellTemplate'}"
					 r_graphic="'SummonFamiliar.png'"
					 r_displayName="text.powerNameSummonFamiliar"
					 affinity="{}"
					 powerFatigueCost="20"
					 powerTooltip="text.powerTooltipSummonFamiliar"
					 undeadFamiliar="0"
					 monsterName="undeadFamiliar?'UndeadFamiliar':'Familiar'"
					 summonedMonsterLevel="1+floor(Conjuration/2)+summonSpellLevelBonus">
			<action r_name="'use'">
				<effect r_name="'mainEffect'" r_params="summoningBaseParams+(undeadFamiliar?undeadBaseParams:{})+{{'shareLife',familiarShareLife}}"/>
			</action>
		</power>
		<power r_name="'MageArmor'" r_template="{'mainPowerWithBuffTemplate','conjurationSpellTemplate'}"
					 r_displayName="text.powerNameMageArmor"
					 r_graphic="'MageArmor.png'"
					 affinity="{{'Air',1}}"
					 armorBonus="Conjuration/3+Air"
					 defenseBonus="Conjuration/3+Air"
					 buffExhaustionReduction="10"
					 powerTooltip="text.powerTooltipMageArmor">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'Defense'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.Defense'" r_modifiedValue="$0+defenseBonus"/>
						<modifier r_name="'Armor'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.Armor'" r_modifiedValue="$0+armorBonus"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'RaiseSkeleton'" r_template="{'summonMonsterTemplate','conjurationSpellTemplate'}"
					 r_displayName="text.powerNameRaiseSkeleton"
					 r_graphic="'RaiseSkeleton.png'"
					 affinity="{{'Death',1}}"
					 powerFatigueCost="15"
					 powerDuration="1000+100*Conjuration"
					 powerTooltip="text.powerTooltipRaiseSkeleton"
					 monsterName="'summonedSkeleton'"
					 summonedMonsterLevel="1+floor(Conjuration/4)+summonSpellLevelBonus/2"
					 recastCount="Death-1">
			<action r_name="'use'">
				<effect r_name="'mainEffect'" r_params="summoningBaseParams+undeadBaseParams"/>
				<effect r_name="'recast'" r_template="{'mainSelfEffectTemplate','controllerEffect'}"
								r_enabled="costPaid&&(recastCount>0)"
								r_className="'CctlEffectLaunchAction'"
								r_newActor="'actor'"
								r_newTarget="'nearestSquare'"
								r_viewRange="1"
								r_nearestFrom="'actor'"
								r_nearestRange="1"
								r_nearestTargetingType="'standardFree'"
								r_newActionType="'power'"
								r_newActionName="'RaiseSkeleton'"
								r_delayRequest="0"
								r_params="{{'isFree',1},simplifyArray({'recastCount',recastCount-1}),{'r_targetingType','all'},{'r_range',99}}"/>
			</action>
		</power>
		<power r_name="'CallWinds'" r_template="{'activePowerTemplate','powerAttackValueInterface','spellBlastInterface','conjurationSpellTemplate'}"
					 r_displayName="text.powerNameCallWinds"
					 r_graphic="'CallWinds.png'"
					 powerTooltip="text.powerTooltipCallWinds"
					 affinity="{{'Air',2}}"
					 powerDefenseName="text.defenseSpellDefense"
					 zoneEffectGraphic="'windAreaEffect'"
					 blastEffectTemplate="'powerSpellAttackEffect'"
					 powerHitEffectTemplate="'pushEffect'"
					 onMissEffectTemplate="'standardMissTemplate'"
					 basePowerHitBonus="10+Air"
					 powerFatigueCost="5">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'blastMainEffect'">
						<effect r_name="'blastEffect'">
							<effect r_name="'hitEffect'"
											recursivePush="1"
											pushXDirection="xDirection"
											pushYDirection="yDirection">
							</effect>
						</effect>
					</effect>
				</effect>
			</action>
		</power>							 
		<power r_name="'SummonGhost'" r_template="{'summonMonsterTemplate','conjurationSpellTemplate'}"
					 affinity="{{'Death',2}}"
					 r_displayName="text.powerNameSummonGhost"
					 r_graphic="'SummonGhost.png'"
					 powerFatigueCost="20"
					 powerDuration="1000+100*Conjuration"
					 powerTooltip="text.powerTooltipSummonGhost"
					 monsterName="'summonedGhost'"
					 summonedMonsterLevel="2+floor(Conjuration/2)+summonSpellLevelBonus">
			<action r_name="'use'">
				<effect r_name="'mainEffect'" r_params="summoningBaseParams+undeadBaseParams"/>
			</action>
		</power>
		<power r_name="'SummonElemental'" r_template="{'summonMonsterTemplate','conjurationSpellTemplate'}"
					 affinity="{{'Air',0},{'Earth',0},{'Fire',0},{'Water',0}}"
					 r_displayName="text.powerNameSummonElemental"
					 r_graphic="'SummonElemental.png'"
					 powerFatigueCost="20"
					 powerDuration="1000+100*Conjuration"
					 powerTooltip="text.powerTooltipSummonElemental"
					 monsterName="(createArray(Air,'summonedAirElemental')+createArray(Earth,'summonedEarthElemental')+createArray(Fire,'summonedFireElemental')+createArray(Water,'summonedWaterElemental'))[1D(Air+Earth+Fire+Water)-1]"
					 summonedMonsterLevel="2+floor(Conjuration/2)+summonSpellLevelBonus">
			<modifier r_name="'affinityOK'" r_template="'mainModifierTemplate'" r_modifierTarget="'affinityOK'" r_modifiedValue="$0&&((Air+Earth+Fire+Water)>0)"/>
		</power>
		<power r_name="'SummonWisp'" r_template="{'summonMonsterTemplate','conjurationSpellTemplate'}"
					 affinity="{{'Holy',1},{'Death',1}}"
					 r_displayName="text.powerNameSummonWisp"
					 r_graphic="'SummonWisp.png'"
					 powerFatigueCost="20"
					 powerDuration="1000+100*Conjuration"
					 powerTooltip="text.powerTooltipSummonWisp"
					 monsterName="'Wisp'"
					 summonedMonsterLevel="2+floor(Conjuration/2)+summonSpellLevelBonus"/>
		
		<power r_name="'WallOfFire'" r_template="{'activePowerTemplate','conjurationSpellTemplate'}"
					 affinity="{{'Fire',2}}"
					 powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
					 r_displayName="text.powerNameWallOfFire"
					 r_graphic="'WallOfFire.png'"
					 powerFatigueCost="10"
					 powerRange="5"
					 powerTooltip="text.powerTooltipWallOfFire">
			<action r_name="'use'"
							canTargetGround="1"
							canTargetFaction="(actor.r_hostileFaction)[target.r_faction]"
							r_targetingType="'line8Direct'"
							canBeInAutoAttack="0">
				<effect r_name="'mainEffect'"
								xDirection="(targetSquare.w_yCoord==actor.w_yCoord)?0:1"
								yDirection="(targetSquare.w_xCoord==actor.w_xCoord)?0:(((targetSquare.w_xCoord-actor.w_xCoord)*(targetSquare.w_yCoord-actor.w_yCoord)>0)?-1:1)"
								lineExtend="3">
					<effect r_name="'halfLineEffect1'" r_template="{'mainSquareEffectTemplate','controllerEffect'}"
									r_className="'CctlEffectLaunchAreaEffect'"
									r_area="{'line',targetSquare.w_xCoord,targetSquare.w_yCoord,targetSquare.w_xCoord+xDirection*lineExtend,targetSquare.w_yCoord+yDirection*lineExtend}"
									r_areaTargetingType="'direct'">
						<effect r_name="'creationEffect'"
										r_className="'CctlEffectCreation'"
										r_creationType="'activable'"
										r_creationName="'fireCloud'"
										r_params="{}"/>
					</effect>
					<effect r_name="'halfLineEffect2'" r_template="{'mainSquareEffectTemplate','controllerEffect'}"
									r_className="'CctlEffectLaunchAreaEffect'"
									r_area="{'line',targetSquare.w_xCoord-xDirection,targetSquare.w_yCoord-yDirection,targetSquare.w_xCoord-xDirection*lineExtend,targetSquare.w_yCoord-yDirection*lineExtend}"
									r_areaTargetingType="'direct'">
						<effect r_name="'creationEffect'"
										r_className="'CctlEffectCreation'"
										r_creationType="'activable'"
										r_creationName="'fireCloud'"
										r_params="{}"/>
					</effect>
				</effect>
				<effect r_name="'log'" r_template="'logPower'" r_enabled="costPaid"/>
			</action>
		</power>
		<power r_name="'Drowning'" r_template="{'mainPowerPhysicalAttackDamage','conjurationSpellTemplate'}"
					 affinity="{{'Water',2}}"
					 r_displayName="text.powerNameDrowning"
					 r_graphic="'Drowning.png'"
					 directSpellEffectGraphic="'iceAreaEffect'"
					 basePowerHitBonus="Water"
					 powerRange="7"
					 powerFatigueCost="15"
					 basePowerDamage="10+3*Water"
					 powerDuration="1D3*100"
					 powerRecastRule="'replace'"
					 powerTooltip="text.powerTooltipDrowning">
			<action r_name="'use'">
				<modifier r_name="'canTargetLiving'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_canTarget'" r_modifiedValue="$0&&contains(target.encounterTags,'living')"/>
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'stun'" r_template="'mentalStunAttack'" r_enabled="!target.isDead"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'SummonAngel'" r_template="{'summonMonsterTemplate','conjurationSpellTemplate'}"
					 affinity="{{'Holy',3}}"
					 r_displayName="text.powerNameSummonAngel"
					 r_graphic="'SummonAngel.png'"
					 powerFatigueCost="30"
					 powerExhaustionCost="2"
					 powerDuration="2000+200*Conjuration"
					 powerTooltip="text.powerTooltipSummonAngel"
					 monsterName="'summonedAngel'"
					 summonedMonsterLevel="Holy+floor(Conjuration/2)+floor(Magic/4)+summonSpellLevelBonus"/>
		<power r_name="'SummonLordOfThePit'" r_template="{'summonMonsterTemplate','conjurationSpellTemplate'}"
					 affinity="{{'Death',2},{'Fire',1},{'Earth',1}}"
					 r_displayName="text.powerNameSummonLordOfThePit"
					 r_graphic="'SummonLordOfThePit.png'"
					 powerFatigueCost="30"
					 powerExhaustionCost="1"
					 powerDuration="2000+200*Conjuration"
					 powerTooltip="text.powerTooltipSummonLordOfThePit"
					 monsterName="'summonedLordOfThePit'"
					 summonedMonsterLevel="2+Death+floor(Conjuration/2)+floor(Magic/4)+summonSpellLevelBonus"/>
		<power r_name="'Quicksand'" r_template="{'activePowerTemplate','conjurationSpellTemplate'}"
					 affinity="{{'Earth',2}}"
					 powerEffectTemplate="{'mainSquareEffectTemplate','controllerEffect'}"
					 r_displayName="text.powerNameQuicksand"
					 r_graphic="'SummonQuicksand.png'"
					 powerFatigueCost="15"
					 powerRange="6"
					 powerTooltip="text.powerTooltipQuicksand">
			<action r_name="'use'"
							canTargetGround="1"
							canTargetFaction="(actor.r_hostileFaction)[target.r_faction]"
							r_targetingType="'direct'"
							canBeInAutoAttack="0">
				<effect r_name="'mainEffect'"
								r_className="'CctlEffectLaunchAreaEffect'"
								r_area="{'circle',targetSquare.w_xCoord,targetSquare.w_yCoord,0,1}"
								r_areaTargetingType="'direct'">
					<effect r_name="'creationEffect'"
									r_className="'CctlEffectCreation'"
									r_creationType="'activable'"
									r_creationName="'quicksand'"
									r_params="{}"/>
				</effect>
				<effect r_name="'log'" r_template="'logPower'" r_enabled="costPaid"/>
			</action>
		</power>
		
<!-- -->
<!-- ENCHANTMENT -->
<!-- -->
		<power r_name="'Confusion'" r_template="{'mainMentalDebuffPowerTemplate','enchantmentMentalSpellTemplate'}"
					 r_displayName="text.powerNameConfusion"
					 r_graphic="'Confusion.png'"
					 affinity="{{'Holy',1}}"
					 powerHitEffectTemplate="'confuseEffect'"
					 basePowerHitBonus="5+Holy"
					 powerRange="4"
					 powerFatigueCost="5"
					 powerDuration="2D3*100"
					 powerRecastRule="'fail'"
					 powerTooltip="text.powerTooltipConfusion"/>
		<power r_name="'MindFreeze'" r_template="{'mainMentalDebuffPowerTemplate','enchantmentMentalSpellTemplate'}"
					 r_displayName="text.powerNameMindFreeze"
					 r_graphic="'MindFreeze.png'"
					 affinity="{{'Water',1}}"
					 powerHitEffectTemplate="'mesmerizeEffect'"
					 basePowerHitBonus="5+Water"
					 powerRange="4"
					 powerFatigueCost="5"
					 powerDuration="(Water+1)D3*100"
					 powerRecastRule="'fail'"
					 powerTooltip="text.powerTooltipMindFreeze"/>
		<power r_name="'EarthAttraction'" r_template="{'mainPhysicalDebuffPowerTemplate','enchantmentSpellTemplate'}"
					 r_displayName="text.powerNameEarthAttraction"
					 r_graphic="'EarthAttraction.png'"
					 affinity="{{'Earth',1}}"
					 powerHitEffectTemplate="{'mainTargetEffectTemplate','multiEffect'}"
					 basePowerHitBonus="5+Earth"
					 powerRange="7"
					 powerFatigueCost="5"
					 powerDuration="(5+5*Earth)*100"
					 powerRecastRule="'replace'"
					 powerTooltip="text.powerTooltipEarthAttraction">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'log'" r_template="'logPowerAttack'"/>
						<effect r_name="'slow'" r_template="'slowEffect'" slowValue="1.25+0.25*Earth" actionLogMethod="'logDebuffEffect'"/>
						<effect r_name="'daze'" r_template="'dazeEffect'" dazeValue="1.25+0.25*Earth" actionLogMethod="'logDebuffEffect'"/>
						<effect r_name="'grounded'" r_template="'groundedEffect'" actionLogMethod="'logDebuffEffect'"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'Fury'" r_template="{'mainMentalDebuffPowerTemplate','enchantmentMentalSpellTemplate'}"
					 r_displayName="text.powerNameFury"
					 affinity="{{'Fire',1}}"
					 r_graphic="'Fury.png'"
					 powerHitEffectTemplate="'furyEffect'"
					 basePowerHitBonus="5+Fire"
					 powerRange="4"
					 powerFatigueCost="10"
					 powerDuration="(Fire+1)D3*100"
					 powerRecastRule="'fail'"
					 powerTooltip="text.powerTooltipFury"/>
		<power r_name="'Curse'" r_template="{'mainMentalDebuffPowerTemplate','enchantmentMentalSpellTemplate'}"
					 r_displayName="text.powerNameCurse"
					 affinity="{{'Death',1}}"
					 r_graphic="'Curse.png'"
					 powerHitEffectTemplate="'curseEffect'"
					 basePowerHitBonus="5+Death"
					 powerRange="4"
					 powerFatigueCost="5"
					 powerDuration="(5+5*Death)*100"
					 powerRecastRule="'fail'"
					 powerTooltip="text.powerTooltipCurse"
					 powerCurseValue="2+Death"/>
		<power r_name="'HypnoticBlast'" r_template="{'activePowerTemplate','powerAttackValueInterface','spellBlastInterface','enchantmentMentalSpellTemplate'}"
					 affinity="{{'Air',2}}"
					 r_displayName="text.powerNameHypnoticBlast"
					 r_graphic="'HypnoticBlast.png'"
					 powerTooltip="text.powerTooltipHypnoticBlast"
					 zoneEffectGraphic="'windAreaEffect'"
					 blastEffectTemplate="{'mainTargetEffectTemplate','multiEffect'}"
					 powerDefenseName="text.defenseMentalResistance"
					 basePowerHitBonus="5+Air"
					 powerFatigueCost="10"
					 powerDuration="100"
					 baseDuration="powerDuration"
					 powerRecastRule="'fail'">
			<action r_name="'use'" canTargetFaction="(actor.r_hostileFaction)[target.r_faction]">
				<effect r_name="'mainEffect'">
					<effect r_name="'blastMainEffect'">
						<effect r_name="'blastEffect'" effectIndex="0">
							<effect r_name="'chooseEffect'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="effectIndex=1D3"/>
							<effect r_name="'blind'" r_template="'mentalBlindAttack'" r_enabled="1==effectIndex">
								<effect r_name="'hitEffect'" blindValue="2+2*Air" powerDuration="2D10*baseDuration"/>
							</effect>
							<effect r_name="'confuse'" r_template="'mentalConfuseAttack'" r_enabled="2==effectIndex">
								<effect r_name="'hitEffect'" powerDuration="(Air)D3*baseDuration"/>
							</effect>
							<effect r_name="'mesmerize'" r_template="'mentalMesmerizeAttack'" r_enabled="3==effectIndex">
								<effect r_name="'hitEffect'" powerDuration="(1+Air)D3*baseDuration"/>
							</effect>
						</effect>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'MindOfSteel'" r_template="{'mainPowerWithBuffTemplate','enchantmentSpellTemplate'}"
					 r_displayName="text.powerNameMindOfSteel"
					 r_graphic="'MindOfSteel.png'"
					 affinity="{{'Earth',1}}"
					 defenseBonus="2+floor(Enchantment/3)+3*Earth"
					 buffExhaustionReduction="10"
					 powerTooltip="text.powerTooltipMindOfSteel">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'MentalResistance'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.MentalResistance'" r_modifiedValue="$0+defenseBonus"/>
						<modifier r_name="'Immunities'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.immunities'" r_modifiedValue="$0+{'Confuse','Shaken','Charm','Fury','Mesmerize'}"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'Illumination'" r_template="{'mainMentalDebuffPowerTemplate','enchantmentMentalSpellTemplate'}"
					 r_displayName="text.powerNameIllumination"
					 affinity="{{'Holy',2}}"
					 r_graphic="'Illumination.png'"
					 powerHitEffectTemplate="{'mainTargetEffectTemplate','multiEffect'}"
					 basePowerHitBonus="5+Holy"
					 powerRange="5"
					 powerFatigueCost="10"
					 powerDuration="(5+5*Holy)*100"
					 powerRecastRule="'fail'"
					 powerTooltip="text.powerTooltipIllumination">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'log'" r_template="'logPowerAttack'"/>
						<effect r_name="'blind'" r_template="'blindEffect'" blindValue="1.25+0.25*Earth" actionLogMethod="'logDebuffEffect'"/>
						<effect r_name="'charm'" r_template="'mentalCharmAttack'" r_enabled="1D2==1" powerDuration="(2+Holy)*100"/>
					</effect>
				</effect>
			</action>
		</power>
					 
		<power r_name="'Fear'" r_template="{'activePowerTemplate','powerAttackValueInterface','enchantmentMentalSpellTemplate'}"
					 r_displayName="text.powerNameFear"
					 r_graphic="'Fear.png'"
					 affinity="{{'Death',2}}"
					 powerTooltip="text.powerTooltipFear"
					 powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
					 powerDefenseName="text.defenseMentalResistance"
					 basePowerHitBonus="5+Death"
					 powerRange="0"
					 powerDuration="2D10*100"
					 powerConfuseDuration="(2D3-1)*100"
					 powerFatigueCost="10"
					 powerRecastRule="'fail'">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'shakenAndConfuseEffect'" r_template="{'mainSquareEffectTemplate','controllerEffect'}"
									r_className="'CctlEffectLaunchAreaEffect'"
									r_area="{'circle',targetSquare.w_xCoord,targetSquare.w_yCoord,1,1}"
									r_areaTargetingType="'direct'">
						<effect r_name="'debuffEffect'" r_template="'mentalShakenAttack'">
							<effect r_name="'hitEffect'">
								<effect r_name="'startEffect'">
									<effect r_name="'confuseEffect'" r_template="'mentalConfuseAttack'"
													powerDuration="powerConfuseDuration"/>
								</effect>
							</effect>
						</effect>
						<effect r_name="'zoneEffectGraphic'" r_template="'zoneEffectGraphicTemplate'"
										zoneEffectGraphic="'deathAreaEffect'"/>
					</effect>
					<effect r_name="'shakenAEEffect'" r_template="{'mainSquareEffectTemplate','controllerEffect'}"
									r_className="'CctlEffectLaunchAreaEffect'"
									r_area="{'circle',targetSquare.w_xCoord,targetSquare.w_yCoord,2,4}"
									r_areaTargetingType="'direct'">
						<effect r_name="'shakenEffect'" r_template="'mentalShakenAttack'"/>
						<effect r_name="'zoneEffectGraphic'" r_template="'zoneEffectGraphicTemplate'"
										zoneEffectGraphic="'deathAreaEffect'"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'MindBurn'" r_template="{'mainPowerMentalAttackDamage','enchantmentMentalSpellTemplate'}"
					 affinity="{{'Air',1},{'Fire',1}}"
					 r_displayName="text.powerNameMindBurn"
					 r_graphic="'MindBurn.png'"
					 directSpellEffectGraphic="'fireAreaEffect'"
					 basePowerHitBonus="0+Air+Fire"
					 powerRange="4"
					 powerFatigueCost="5"
					 basePowerDamage="5+3*Air+3*Fire"
					 powerTooltip="text.powerTooltipMindBurn"/>
		<power r_name="'Paralyze'" r_template="{'mainMentalDebuffPowerTemplate','enchantmentMentalSpellTemplate'}"
					 r_displayName="text.powerNameParalyze"
					 affinity="{}"
					 r_graphic="'Paralyze.png'"
					 powerHitEffectTemplate="'stunEffect'"
					 basePowerHitBonus="5+Enchantment/2"
					 powerRange="1"
					 powerFatigueCost="10"
					 powerDuration="(3D4)*100"
					 powerRecastRule="'fail'"
					 powerTooltip="text.powerTooltipParalyze"/>

		<power r_name="'Guiding'" r_template="{'mainPowerWithBuffTemplate','enchantmentSpellTemplate'}"
					 affinity="{{'Holy',1}}"
					 r_displayName="text.powerNameGuiding"
					 r_graphic="'Guiding.png'"
					 powerTooltip="text.powerTooltipGuiding">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'ObjectiveVisibility'" r_template="'mainEffectModifier'" r_modifierTarget="'gameParameters.objectiveVisibility'" r_modifiedValue="1"/>
					</effect>
				</effect>
			</action>
		</power>
		
<!-- -->
<!-- EVOCATION -->
<!-- -->
		<power r_name="'MagicMissile'" r_template="{'missileTemplate','evocationSpellTemplate'}"
					 r_displayName="text.powerNameMagicMissile"
					 r_graphic="'MagicMissile.png'"
					 affinity="{}"
					 missileGraphic="'slimeballBlue.png'"
					 basePowerHitBonus="5"
					 basePowerDamage="3+min(Magic,10)"
					 powerRange="7"
					 powerFatigueCost="5"
					 powerTooltip="text.powerTooltipMagicMissile"/>
		<power r_name="'Fireball'" r_template="{'activePowerTemplate','powerAttackDamageValueInterface','evocationSpellTemplate'}"
					 powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
					 powerHitEffectTemplate="'powerStrikeDamageEffect'"
					 powerDefenseName="text.defenseSpellDefense"
					 actionLogMethod="'logStrikePowerWithDamage'"
					 r_displayName="text.powerNameFireball"
					 r_graphic="'Fireball.png'"
					 affinity="{{'Fire',2}}"
					 missileGraphic="'slimeballRed.png'"
					 basePowerHitBonus="Fire"
					 basePowerDamage="10+3*Fire"
					 powerRange="6"
					 powerFatigueCost="10"
					 powerTooltip="text.powerTooltipFireball">
			<action r_name="'use'"
							canTargetGround="1"
							canTargetFaction="(actor.r_hostileFaction)[target.r_faction]">
				<effect r_name="'mainEffect'" distanceToTarget="0">
					<effect r_name="'distanceToTarget'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="distanceToTarget=actor.square.distanceTo(targetSquare)"/>
					<effect r_name="'explosionEffect'" r_template="{'mainSquareEffectTemplate','controllerEffect'}"
									r_className="'CctlEffectLaunchAreaEffect'"
									r_area="{'circle',targetSquare.w_xCoord,targetSquare.w_yCoord,0,1}"
									r_areaTargetingType="'direct'">
						<effect r_name="'powerEffect'" r_template="'powerSpellAttackEffect'">
							<effect r_name="'hitEffect'">
								<effect r_template="'fireMarkEffect'"/>
							</effect>
						</effect>
						<effect r_name="'zoneEffectGraphic'" r_template="'zoneEffectGraphicTemplate'" zoneEffectGraphic="'fireAreaEffect'" delay="2*distanceToTarget"/>
					</effect>
					<effect r_name="'missileGraphic'" r_template="'missileGraphicTemplate'"/>
				</effect>
			</action>
		</power>
		<power r_name="'Smite'" r_template="{'mainPowerPhysicalAttackDamage','evocationSpellTemplate'}"
					 r_displayName="text.powerNameSmite"
					 r_graphic="'Smite.png'"
					 directSpellEffectGraphic="'holyAreaEffect'"
					 affinity="{{'Holy',1}}"
					 basePowerHitBonus="5+Holy"
					 basePowerDamage="10+5*Holy"
					 powerRange="6"
					 powerFatigueCost="5"
					 powerTooltip="text.powerTooltipSmite">
			<action r_name="'use'"
							r_targetingType="'direct'">
				<modifier r_name="'undeadTargeting'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_canTarget'" r_modifiedValue="$0&&contains(target.encounterTags,'unholy')"/>
			</action>
		</power>
		<power r_name="'ColdBlast'" r_template="{'activePowerTemplate','powerAttackDamageValueInterface','spellBlastInterface','evocationSpellTemplate'}"
					 r_displayName="text.powerNameColdBlast"
					 r_graphic="'ColdBlast.png'"
					 powerTooltip="text.powerTooltipColdBlast"
					 affinity="{{'Air',1},{'Water',1}}"
					 zoneEffectGraphic="'iceAreaEffect'"
					 blastEffectTemplate="'powerSpellAttackEffect'"
					 powerHitEffectTemplate="'powerStrikeDamageEffect'"
					 actionLogMethod="'logStrikePowerWithDamage'"
					 powerDefenseName="text.defenseSpellDefense"
					 basePowerHitBonus="5+Air+Water"
					 basePowerDamage="10+3*Air+3*Water"
					 powerFatigueCost="10"/>
		<power r_name="'FireBreath'" r_template="{'activePowerTemplate','powerAttackDamageValueInterface','spellBlastInterface','evocationSpellTemplate'}"
					 r_displayName="text.powerNameFireBreath"
					 r_graphic="'FireBreath.png'"
					 powerTooltip="text.powerTooltipFireBreath"
					 affinity="{{'Fire',1}}"
					 zoneEffectGraphic="'fireAreaEffect'"
					 blastEffectTemplate="'powerSpellAttackEffect'"
					 powerHitEffectTemplate="'powerStrikeDamageEffect'"
					 actionLogMethod="'logStrikePowerWithDamage'"
					 powerDefenseName="text.defenseSpellDefense"
					 basePowerHitBonus="5+Fire"
					 basePowerDamage="10+3*Fire"
					 powerFatigueCost="10"/>
		<power r_name="'IronMissile'" r_template="{'missileTemplate','evocationSpellTemplate'}"
					 r_displayName="text.powerNameIronMissile"
					 r_graphic="'IronMissile.png'"
					 affinity="{{'Earth',1}}"
					 missileGraphic="'slimeballYellow.png'"
					 basePowerHitBonus="Earth"
					 basePowerDamage="15+5*Earth"
					 powerRange="3"
					 powerFatigueCost="5"
					 powerTooltip="text.powerTooltipIronMissile"/>
		<power r_name="'MagmaMissile'" r_template="{'missileTemplate','evocationSpellTemplate'}"
					 r_displayName="text.powerNameMagmaMissile"
					 r_graphic="'MagmaMissile.png'"
					 affinity="{{'Fire',2},{'Earth',1}}"
					 missileGraphic="'slimeballRed.png'"
					 basePowerHitBonus="Fire+Earth"
					 basePowerDamage="20+5*Earth+2*Fire"
					 powerRange="5"
					 powerFatigueCost="10"
					 powerTickCount="5"
					 powerDuration="100"
					 powerTooltip="text.powerTooltipMagmaMissile">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'burn'" r_template="'burnEffect'" recastRule="'resetTickIndex'" burnDamage="3*Fire" actionLogMethod="'logDebuffEffect'"/>
						<effect r_template="'fireMarkEffect'"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'Slime'" r_template="{'missileTemplate','evocationSpellTemplate'}"
					 r_displayName="text.powerNameSlime"
					 r_graphic="'Slime.png'"
					 affinity="{{'Water',2}}"
					 missileGraphic="'slimeballBlue.png'"
					 basePowerHitBonus="Water"
					 basePowerDamage="10+4*Water"
					 powerRange="7"
					 powerFatigueCost="5"
					 powerDuration="400+200*1D(Water)"
					 powerRecastRule="'replace'"
					 powerTooltip="text.powerTooltipSlime">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'slow'" r_template="'physicalSlowAttack'">
							<effect r_name="'hitEffect'" slowValue="1+0.25*Water"/>
						</effect>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'LightningBolt'" r_template="{'activePowerTemplate','powerAttackDamageValueInterface','evocationSpellTemplate'}"
					 affinity="{{'Air',2}}"
					 powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
					 powerHitEffectTemplate="'powerStrikeDamageEffect'"
					 powerDefenseName="text.defenseSpellDefense"
					 actionLogMethod="'logStrikePowerWithDamage'"
					 r_displayName="text.powerNameLightningBolt"
					 r_graphic="'LightningBolt.png'"
					 basePowerHitBonus="Air"
					 basePowerDamage="10+3*Air"
					 powerRange="7"
					 powerFatigueCost="10"
					 powerTooltip="text.powerTooltipLightningBolt">
			<action r_name="'use'"
							canTargetGround="1"
							canTargetFaction="(actor.r_hostileFaction)[target.r_faction]"
							r_targetingType="'line8Direct'"
							xDirection="(targetSquare.w_xCoord>actor.w_xCoord)?1:((actor.w_xCoord>targetSquare.w_xCoord)?-1:0)"
							yDirection="(targetSquare.w_yCoord>actor.w_yCoord)?1:((actor.w_yCoord>targetSquare.w_yCoord)?-1:0)">
				<effect r_name="'mainEffect'">
					<effect r_name="'log'" r_template="'logPower'"/>
					<effect r_name="'strikeInLine'" r_template="{'mainSquareEffectTemplate','controllerEffect'}"
									r_className="'CctlEffectLaunchAreaEffect'"
									r_area="{'line',actor.w_xCoord+xDirection,actor.w_yCoord+yDirection,actor.w_xCoord+xDirection*powerRange,actor.w_yCoord+yDirection*powerRange}"
									r_areaTargetingType="'direct'">
						<effect r_name="'zoneEffectGraphic'" r_template="'zoneEffectGraphicTemplate'"
										zoneEffectGraphic="'windAreaEffect'"/>
						<effect r_name="'powerEffect'" r_template="'powerSpellAttackEffect'">
							<effect r_name="'hitEffect'" attackIgnoreArmor="1"/>
						</effect>
					</effect>
				</effect>
			</action>
		</power>					 
		<power r_name="'DeathNova'" r_template="{'activePowerTemplate','powerAttackDamageValueInterface','evocationSpellTemplate'}"
					 r_displayName="text.powerNameDeathNova"
					 r_graphic="'DeathNova.png'"
					 powerTooltip="text.powerTooltipDeathNova"
					 affinity="{{'Death',2}}"
					 powerEffectTemplate="{'mainSquareEffectTemplate','controllerEffect'}"
					 powerHitEffectTemplate="'powerPhysicalDamageEffect'"
					 powerDefenseName="'Physical Resitance'"
					 basePowerHitBonus="Death"
					 basePowerDamage="15+3*Death"
					 powerRange="0"
					 powerFatigueCost="20">
			<action r_name="'use'">
				<effect r_name="'mainEffect'"
								r_className="'CctlEffectLaunchAreaEffect'"
								r_area="{'circle',targetSquare.w_xCoord,targetSquare.w_yCoord,0,7}"
								r_areaTargetingType="'direct'">
					<effect r_name="'powerEffect'" r_template="'powerPhysicalAttackEffect'"
									r_enabled="exists(target)&&!target.isDead&&contains(target.encounterTags,'living')"/>
					<effect r_name="'zoneEffectGraphic'" r_template="'zoneEffectGraphicTemplate'"
									zoneEffectGraphic="'deathAreaEffect'"/>
				</effect>
			</action>
		</power>					 
		<power r_name="'IceStorm'" r_template="{'activePowerTemplate','powerAttackDamageValueInterface','evocationSpellTemplate'}"
					 powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
					 powerHitEffectTemplate="'powerStrikeDamageEffect'"
					 powerDefenseName="text.defenseSpellDefense"
					 actionLogMethod="'logStrikePowerWithDamage'"
					 r_displayName="text.powerNameIceStorm"
					 r_graphic="'IceStorm.png'"
					 affinity="{{'Water',2}}"
					 missileGraphic="'slimeballRed.png'"
					 basePowerHitBonus="5+Water"
					 basePowerDamage="20+3*Water"
					 powerRange="4"
					 powerFatigueCost="20"
					 powerTooltip="text.powerTooltipIceStorm">
			<action r_name="'use'"
							canTargetGround="1"
							canTargetFaction="(actor.r_hostileFaction)[target.r_faction]"
							r_targetingType="'direct'">
				<effect r_name="'mainEffect'">
					<effect r_name="'log'" r_template="'logWinterIsComing'"/>
					<effect r_name="'explosionEffect'" r_template="{'mainSquareEffectTemplate','controllerEffect'}"
									r_className="'CctlEffectLaunchAreaEffect'"
									r_area="{'circle',targetSquare.w_xCoord,targetSquare.w_yCoord,0,2}"
									r_areaTargetingType="'direct'">
						<effect r_name="'powerEffect'" r_template="'powerSpellAttackEffect'"/>
						<effect r_name="'zoneEffectGraphic'" r_template="'zoneEffectGraphicTemplate'" zoneEffectGraphic="'iceAreaEffect'" delay="0" />
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'Disease'" r_template="{'mainPhysicalDebuffPowerTemplate','evocationSpellTemplate'}"
					 r_displayName="text.powerNameDisease"
					 r_graphic="'Disease.png'"
					 affinity="{{'Death',1},{'Water',1}}"
					 powerHitEffectTemplate="'diseaseEffect'"
					 basePowerHitBonus="Water+Death"
					 diseaseDamage="4+Water+Death"
					 powerRange="7"
					 powerFatigueCost="25"
					 powerTickCount="10"
					 powerDuration="100"
					 powerRecastRule="'addTickCount'"
					 powerTooltip="text.powerTooltipDisease">
			<action r_name="'use'">
				<modifier r_name="'immunityTargeting'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_canTarget'" r_modifiedValue="$0&&!contains(target.immunities,'Disease')"/>
			</action>
		</power>
		
<!-- -->
<!-- TRANSMUTATION -->
<!-- -->
		<power r_name="'HealTemplate'" r_template="{'activePowerTemplate','transmutationSpellTemplate'}"
					 powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
					 actionLogMethod="'logPowerWithHeal'"
					 constitutionBuff="0">
			<action r_name="'use'"
							r_minRange="0"
							canTargetFaction="(actor.r_allyFaction)[target.r_faction]">
				<effect r_name="'mainEffect'">
			 		<effect r_name="'constitutionBuff'" r_template="{'mainTargetEffectTemplate','mainBuffEffectTemplate'}"
			 						r_enabled="constitutionBuff!=0"
			 						r_effectName="text.powerNameLayOnHands"
									actionLogMethod="'logTargetBuffEffect'"
									r_tickDuration="2500"
									recastRule="'resetDuration'">
						<modifier r_name="'Constitution'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.Constitution'" r_modifiedValue="$0+constitutionBuff"/>
					</effect>
					<effect r_name="'HealingEffect'" r_template="{'mainSelfEffectTemplate','standardHealTemplate'}"
									healBonus="powerHealBonus"/>
				</effect>
			</action>
		</power>
		<power r_name="'Healing'" r_template="'HealTemplate'"
					 r_displayName="text.powerNameHealing"
					 r_graphic="'Heal.png'"
					 directSpellEffectGraphic="'holyAreaEffect'"
					 affinity="{{'Holy',1}}"
					 powerHealBonus="10+2*Transmutation+5*Holy"
					 powerRange="0"
					 powerFatigueCost="10"
					 powerExhaustionCost="1"
					 powerTooltip="text.powerTooltipHealing"/>
		<power r_name="'StoneSkin'" r_template="{'mainPowerWithBuffTemplate','transmutationSpellTemplate'}"
					 powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
					 r_displayName="text.powerNameStoneSkin"
					 r_graphic="'StoneSkin.png'"
					 affinity="{{'Earth',1}}"
					 armorBonus="Transmutation/2+1.5*Earth"
					 buffExhaustionReduction="10"
					 powerTooltip="text.powerTooltipStoneSkin">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'Armor'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.Armor'" r_modifiedValue="$0+armorBonus"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'Incineration'" r_template="{'mainPowerPhysicalAttackDamage','transmutationSpellTemplate'}"
					 affinity="{{'Fire',1}}"
					 r_displayName="text.powerNameIncineration"
					 r_graphic="'Incineration.png'"
					 directSpellEffectGraphic="'fireAreaEffect'"
					 basePowerHitBonus="Fire"
					 powerRange="4"
					 powerFatigueCost="5"
					 basePowerDamage="5+3*Fire"
					 powerTooltip="text.powerTooltipIncineration">
			<action r_name="'use'"
							r_targetingType="'direct'"/>
		</power>
		<power r_name="'EarthMight'" r_template="{'mainPowerWithBuffTemplate','transmutationSpellTemplate'}"
					 r_displayName="text.powerNameEarthMight"
					 r_graphic="'EarthMight.png'"
					 affinity="{{'Earth',1}}"
					 statBonus="Transmutation/2+Earth"
					 buffExhaustionReduction="10"
					 powerTooltip="text.powerTooltipEarthMight">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'Strength'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.Strength'" r_modifiedValue="$0+statBonus"/>
						<modifier r_name="'Constitution'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.Constitution'" r_modifiedValue="$0+statBonus"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'Daze'" r_template="{'mainPhysicalDebuffPowerTemplate','transmutationSpellTemplate'}"
					 r_displayName="text.powerNameDaze"
					 r_graphic="'Slow.png'"
					 affinity="{{'Water',1}}"
					 powerHitEffectTemplate="'dazeEffect'"
					 basePowerHitBonus="5+Water"
					 powerRange="4"
					 powerFatigueCost="5"
					 powerDuration="3D5*100"
					 powerRecastRule="'replace'"
					 powerDazeValue="1+0.5*Water"
					 powerTooltip="text.powerTooltipDaze"/>
		<power r_name="'Fly'" r_template="{'mainPowerWithBuffTemplate','transmutationSpellTemplate'}"
					 powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
					 r_displayName="text.powerNameFly"
					 r_graphic="'Fly.png'"
					 affinity="{{'Air',2}}"
					 buffExhaustionReduction="5"
					 powerTooltip="text.powerTooltipFly">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'isFlying'" r_template="'mainEffectModifier'" r_modifierTarget="'isFlying'" r_modifiedValue="($0==0)?1:(($0==1)?2:$0)"/>
					</effect>
				</effect>
			</action>
		</power>					 
		<power r_name="'GaseousForm'" r_template="{'mainPowerWithBuffTemplate','transmutationSpellTemplate'}"
					 r_displayName="text.powerNameGaseousForm"
					 r_graphic="'GaseousForm.png'"
					 affinity="{{'Air',1},{'Water',1}}"
					 absorptionBonus="Transmutation/3+Water+Air"
					 buffExhaustionReduction="20"
					 powerTooltip="text.powerTooltipGaseousForm">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'customDamageAbsorption'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.customDamageAbsorption'" r_modifiedValue="$0+absorptionBonus"/>
						<modifier r_name="'Immunities'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.immunities'" r_modifiedValue="$0+{'Slow','Root','Burn'}"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'Haste'" r_template="{'mainPowerWithBuffTemplate','transmutationSpellTemplate'}"
					 r_displayName="text.powerNameHaste"
					 r_graphic="'Haste.png'"
					 affinity="{{'Air',2}}"
					 moveSpeedBonus="1/(1+Transmutation/20+Air/8)"
					 actionSpeedBonus="1/(1+Transmutation/30+Air/12)"
					 powerDuration="2000"
					 powerExhaustionCost="2"
					 powerTooltip="text.powerTooltipHaste">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'moveTimeCostMultiplier'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.moveTimeCostMultiplier'" r_modifiedValue="$0*moveSpeedBonus"/>
						<modifier r_name="'actionTimeCostMultiplier'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.actionTimeCostMultiplier'" r_modifiedValue="$0*actionSpeedBonus"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'FreezingDeath'" r_template="{'mainPowerPhysicalAttackDamage','transmutationSpellTemplate'}"
					 affinity="{{'Death',1},{'Water',2}}"
					 r_displayName="text.powerNameFreezingDeath"
					 r_graphic="'FreezingDeath.png'"
					 directSpellEffectGraphic="'iceAreaEffect'"
					 basePowerHitBonus="Death+Water"
					 powerRange="7"
					 powerFatigueCost="15"
					 basePowerDamage="10+3*Death+2*Water"
					 powerDuration="(Water)D5*100"
					 powerRecastRule="'resetTickIndex'"
					 powerDazeValue="1+0.25*Water"
					 powerTooltip="text.powerTooltipFreezingDeath">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'daze'" r_template="'dazeEffect'" actionLogMethod="'logDebuffEffect'"/> 
					</effect>
					<effect r_name="'missEffect'">
						<effect r_name="'daze'" r_template="'dazeEffect'" powerDuration="(Water)D3*100" actionLogMethod="'logDebuffEffect'"/> 
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'Rejuvenation'" r_template="'HealTemplate'"
					 r_displayName="text.powerNameRejuvenation"
					 r_graphic="'Rejuvenation.png'"
					 directSpellEffectGraphic="'holyAreaEffect'"
					 affinity="{{'Holy',3}}"
					 powerHealBonus="10+2*Transmutation+5*Holy"
					 powerRange="0"
					 powerFatigueCost="20"
					 powerExhaustionCost="2"
					 powerTooltip="text.powerTooltipRejuvenation">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
			 		<effect r_name="'HealingOverTime'" r_template="{'mainTargetEffectTemplate','mainBuffEffectTemplate'}"
			 						r_effectName="r_displayName"
									r_tickCount="10"
									recastRule="'resetTickIndex'"
									actionLogMethod="'logTargetBuffEffect'">
					 	<effect r_name="'tickEffect'">
						 	<effect r_name="'heal'" r_template="'standardHealTemplate'"
											actionLogMethod="'logEffectWithHeal'"
											healBonus="round(powerHealBonus/5)"
											roll="0"/>
					 	</effect>
				 	</effect>
				</effect>
			</action>
		</power>
		<power r_name="'IronBody'" r_template="{'mainPowerWithBuffTemplate','transmutationSpellTemplate'}"
					 r_displayName="text.powerNameIronBody"
					 r_graphic="'IronBody.png'"
					 affinity="{{'Earth',3}}"
					 armorBonus="Transmutation+3*Earth"
					 resistanceBonus="Transmutation/2+2*Earth"
					 powerDuration="2000"
					 powerExhaustionCost="1"
					 powerTooltip="text.powerTooltipIronBody">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'Armor'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.Armor'" r_modifiedValue="$0+armorBonus"/>
						<modifier r_name="'PhysicalResistance'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.PhysicalResistance'" r_modifiedValue="$0+resistanceBonus"/>
						<modifier r_name="'Immunities'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.immunities'" r_modifiedValue="$0+{'Slow','Root','Burn','Poison','Cripple','Stun'}"/>
					</effect>
				</effect>
			</action>
		</power>
		<power r_name="'WaterDance'" r_template="{'mainPowerWithBuffTemplate','transmutationSpellTemplate'}"
					 r_displayName="text.powerNameWaterDance"
					 r_graphic="'WaterDancing.png'"
					 affinity="{{'Water',1}}"
					 buffExhaustionReduction="10"
					 powerTooltip="text.powerTooltipWaterDance"
					 weaponAjustement="exists(mainhand)?{{'twohands',0.5},{'mainhand',0.8},{'onehand',1}}[mainhand.slot]:1"
					 shieldAjustement="exists(offhand)&&exists(offhand.shieldPrerequisite)?(1-(offhand.shieldPrerequisite-2)/12):1"
					 armorAjustement="exists(armor)&&exists(armor.dodgeBonusReduction)?armor.dodgeBonusReduction:1"
					 defenseBonus="(2+Transmutation/4+1.5*Water)*weaponAjustement*shieldAjustement*armorAjustement">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'buffEffect'">
						<modifier r_name="'defense'" r_template="'mainEffectModifier'" r_enabled="w_launched&&affinityOK" r_modifierTarget="'target.Defense'" r_modifiedValue="$0+defenseBonus"/>
					</effect>
				</effect>
			</action>
		</power>
		
	</powers>
</data>