<data>
	<powers>
	<!-- MAGE -->
		<power	r_name="'MagicAffinity'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNameMagicAffinity"
						r_graphic="'MagicAffinity.png'"
						powerValue="packages.Mage.classLevel/2"
						powerTooltip="text.powerTooltipMagicAffinity">
			<modifier r_name="'spellCostModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'spellCostModifier'" r_modifiedValue="$0-powerValue"/>
		</power>
		<power	r_name="'MageHand'" r_template="'activePowerTemplate'"
						powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
						r_displayName="text.powerNameMageHand"
						r_graphic="'MageHand.png'"
						powerFatigueCost="0"
						powerRange="r_viewRange"
						powerTooltip="text.powerTooltipMageHand">
			<action r_name="'use'" r_canTarget="targetSquare.canActivate('standard')||targetSquare.canActivate('r_loot')||targetSquare.canActivate('moveActivate')"
							timeCost="0"
							r_targetingType="'wallDirect'"
							canBeInAutoAttack="0">
				<effect r_name="'mainEffect'">
					<effect r_name="'log'" r_template="'logPower'"/>
					<effect r_name="'activateStandard'" r_template="{'mainActorEffectTemplate','controllerEffect'}" r_className="'CctlEffectLaunchAction'" r_newActor="'actor'" r_newTarget="'activable'" r_newActionType="'activable'" r_activableCategory="'standard'" r_delayRequest="0" r_params="{{'r_range',r_viewRange},{'r_targetingType','wallDirect'}}"/>
					<effect r_name="'activateLoot'" r_template="{'mainActorEffectTemplate','controllerEffect'}" r_className="'CctlEffectLaunchAction'" r_newActor="'actor'" r_newTarget="'activable'" r_newActionType="'activable'" r_activableCategory="'r_loot'" r_delayRequest="0" r_params="{{'r_range',r_viewRange},{'r_targetingType','wallDirect'}}"/>
					<effect r_name="'activateMove'" r_template="{'mainActorEffectTemplate','controllerEffect'}" r_className="'CctlEffectLaunchAction'" r_newActor="'actor'" r_newTarget="'activable'" r_newActionType="'activable'" r_activableCategory="'moveActivate'" r_delayRequest="0" r_params="{{'r_range',r_viewRange},{'r_targetingType','wallDirect'}}"/>
				</effect>
			</action>
		</power>
		<power	r_name="'ArcaneBoost'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNameArcaneBoost"
						r_graphic="'ArcaneBoost.png'"
						powerTooltip="text.powerTooltipArcaneBoost">
		</power>
		<power	r_name="'ArcaneFocus'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNameArcaneFocus"
						r_graphic="'ExtendSpell.png'"
						powerTooltip="text.powerTooltipArcaneFocus">
			<modifier r_name="'selfSpellSustainModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'selfSpellSustainModifier'" r_modifiedValue="$0*0.75"/>
		</power>
		<power	r_name="'PowerBlast'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNamePowerBlast"
						r_graphic="'PowerBlast.png'"
						powerTooltip="text.powerTooltipPowerBlast">
			<modifier r_name="'blastRangeModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'blastRangeModifier'" r_modifiedValue="$0+1"/>
		</power>
		<power 	r_name="'Teleportation'" r_template="'activePowerTemplate'"
						powerEffectTemplate="{'mainSelfEffectTemplate','multiEffect'}"
						r_displayName="text.powerNameTeleportation"
						r_graphic="'Teleportation.png'"
						powerRange="r_viewRange"
						powerFatigueCost="40"
						powerTooltip="text.powerTooltipTeleportation">
			<action r_name="'use'"
							r_targetingType="'direct'"
							r_canTarget="(targetSquare.r_moveMask&r_moveMask)==0"
							timeCost="100"
							canBeInAutoAttack="0">
				<effect r_name="'mainEffect'">
					<effect r_name="'log'" r_template="'logPower'"/>
					<effect r_name="'Teleportation'" r_template="{'mainSelfEffectTemplate','controllerEffect'}"
									r_className="'CctlEffectTeleportation'"
									r_targetLevelIndex="w_levelIndex"
									rw_xTarget="targetSquare.w_xCoord"
									rw_yTarget="targetSquare.w_yCoord"
									r_walkSimulation="0"
									w_crossedSquare="0"/>
				</effect>
			</action>
		</power>
		<power	r_name="'Rebound'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNameRebound"
						r_graphic="'Rebound.png'"
						powerTooltip="text.powerTooltipRebound">
			<modifier r_name="'missileReboundModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'missileRebound'" r_modifiedValue="1"/>
		</power>
		<power r_name="'TimeStop'" r_template="'mainBuffPowerTemplate'"
					 r_displayName="text.powerNameTimeStop"
					 r_graphic="'TimeStop.png'"
					 powerDuration="0"
					 powerFatigueCost="0"
					 powerExhaustionCost="2"
					 powerTooltip="text.powerTooltipTimeStop">
			<action r_name="'use'"
							timeCost="0">
				<effect r_name="'mainEffect'" effectTags="{'TimeStop'}">
					<modifier r_name="'moveTimeCostMultiplier'" r_template="'mainEffectModifier'" r_modifierTarget="'moveTimeCostMultiplier'" r_modifiedValue="0"/>
					<modifier r_name="'restCost'" r_template="'mainEffectModifier'" r_modifierTarget="'powers.endTurn.action.timeCost'" r_modifiedValue="0"/>
					<event r_name="'TimeStopBreak'" r_template="'mainEventTemplate'" r_enabled="w_launched" r_eventTarget="'heroes.@0.rw_currentTime'" r_targetType="'attribute'">
						<effect r_name="'removeTimeStop'" r_template="{'mainSelfEffectTemplate','controllerEffect'}"
										r_enabled="w_newValue!=w_oldValue"
										r_className="'CctlEffectRemoveDurable'"
										r_condition="contains(targetEffect.effectTags,'TimeStop')"/>
					</event>
					<event r_name="'TimeStopBreakOnDungeon'" r_template="'mainEventTemplate'" r_enabled="w_launched" r_eventTarget="'w_isInDungeon'" r_targetType="'attribute'">
						<effect r_name="'removeTimeStop'" r_template="{'mainSelfEffectTemplate','controllerEffect'}"
										r_className="'CctlEffectRemoveDurable'"
										r_condition="contains(targetEffect.effectTags,'TimeStop')"/>
					</event>
					<event r_name="'TimeStopBreakOnLevel'" r_template="'mainEventTemplate'" r_enabled="w_launched" r_eventTarget="'w_levelIndex'" r_targetType="'attribute'">
						<effect r_name="'removeTimeStop'" r_template="{'mainSelfEffectTemplate','controllerEffect'}"
										r_enabled="w_levelIndex>=0"
										r_className="'CctlEffectRemoveDurable'"
										r_condition="contains(targetEffect.effectTags,'TimeStop')"/>
					</event>
				</effect>
			</action>
		</power>
		
	<!-- ENCHANTER -->
		<power	r_name="'ExtendEnchantment'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNameExtendEnchantment"
						r_graphic="'ExtendEnchantment.png'"
						powerTooltip="text.powerTooltipExtendEnchantment">
			<modifier r_name="'enchantSpellDurationModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'enchantSpellDurationModifier'" r_modifiedValue="$0+packages.Enchanter.classLevel/10"/>
		</power>
		<power r_name="'Subversion'" r_template="{'mainMentalDebuffPowerTemplate','enchantmentSpellTemplate'}"
					 r_displayName="text.powerNameSubversion"
					 r_graphic="'Subversion.png'"
					 powerHitEffectTemplate="'charmEffect'"
					 basePowerHitBonus="0"
					 powerRange="5"
					 powerFatigueCost="10"
					 powerDuration="-1"
					 powerRecastRule="'replace'"
					 powerTooltip="text.powerTooltipSubversion"
					 added="1">
			<action r_name="'use'">
				<modifier r_name="'canTargetSummon'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_canTarget'" r_modifiedValue="$0&&contains(target.encounterTags,'summon')"/>
			</action>
		</power>
		<power	r_name="'UndeadManipulation'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNameUndeadManipulation"
						r_graphic="'UndeadManipulation.png'"
						powerTooltip="text.powerTooltipUndeadManipulation">
			<modifier r_name="'undeadEnchantment'" r_template="'mainPowerModifier'" r_modifierTarget="'undeadEnchantment'" r_modifiedValue="1"/> 
		</power>
		<power	r_name="'PeaceOfMind'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNamePeaceOfMind"
						r_graphic="'PeaceOfMind.png'"
						powerTooltip="text.powerTooltipPeaceOfMind">
			<modifier r_name="'customCloseCombatHitBonus'" r_template="'mainPowerModifier'" r_modifierTarget="'customCloseCombatHitBonus'" r_modifiedValue="$0+1"/> 
			<modifier r_name="'customRangedHitBonus'" r_template="'mainPowerModifier'" r_modifierTarget="'customRangedHitBonus'" r_modifiedValue="$0+1"/> 
			<modifier r_name="'Defense'" r_template="'mainPowerModifier'" r_modifierTarget="'Defense'" r_modifiedValue="$0+1"/> 
			<modifier r_name="'MentalResistance'" r_template="'mainPowerModifier'" r_modifierTarget="'MentalResistance'" r_modifiedValue="$0+1"/> 
			<modifier r_name="'PhysicalResistance'" r_template="'mainPowerModifier'" r_modifierTarget="'PhysicalResistance'" r_modifiedValue="$0+1"/> 
		</power>
		<power r_name="'Charm'" r_template="{'mainMentalDebuffPowerTemplate','enchantmentSpellTemplate'}"
					 r_displayName="text.powerNameCharm"
					 r_graphic="'Charm.png'"
					 powerHitEffectTemplate="'charmEffect'"
					 basePowerHitBonus="0"
					 powerRange="3"
					 powerFatigueCost="10"
					 powerDuration="(10+5D2)*100"
					 powerRecastRule="'fail'"
					 powerTooltip="text.powerTooltipCharm"
					 added="1">
			<action r_name="'use'">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<modifier r_name="'cannotCharmAgain'" r_template="'mainEffectModifier'" r_modifierTarget="'actor.powers.Charm.action.r_enabled'" r_modifiedValue="0"/>
					</effect>
				</effect>
			</action>
		</power>
		
	<!-- SUMMONER -->
		<power	r_name="'EnhanceConjuration'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNameEnhanceConjuration"
						r_graphic="'EnhanceConjuration.png'"
						powerTooltip="text.powerTooltipEnhanceConjuration">
			<modifier r_name="'conjurationSpellDurationModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'conjurationSpellDurationModifier'" r_modifiedValue="$0+0.1*packages.Summoner.classLevel"/> 
			<modifier r_name="'summonSpellMaxHitPointModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'summonSpellMaxHitPointModifier'" r_modifiedValue="$0+0.1*packages.Summoner.classLevel"/> 
			<modifier r_name="'summonSpellLevelBonus'" r_template="'mainPowerModifier'" r_modifierTarget="'summonSpellLevelBonus'" r_modifiedValue="$0+max(0,world.lastDungeonDepth-10)"/> 
		</power>
		<power r_name="'Banish'" r_template="{'activePowerTemplate','powerAttackValueInterface','conjurationSpellTemplate'}"
					 powerEffectTemplate="{'mainSquareEffectTemplate','controllerEffect'}"
					 powerHitEffectTemplate="'powerPhysicalDamageEffect'"
					 r_displayName="text.powerNameBanish"
					 r_graphic="'Banish.png'"
					 powerRange="0"
					 powerFatigueCost="10"
					 powerDefenseName="text.defensePhysicalResistance"
					 powerDamage="30+2*Conjuration"
					 powerTooltip="text.powerTooltipBanish"
					 added="1">
			<action r_name="'use'">
				<effect r_name="'mainEffect'"
								r_className="'CctlEffectLaunchAreaEffect'"
								r_area="{'circle',targetSquare.w_xCoord,targetSquare.w_yCoord,1,7}"
								r_areaTargetingType="'direct'">
					<effect r_name="'powerEffect'" r_template="'powerPhysicalAttackEffect'"
									actionLogMethod="'logPowerWithDamage'">
					 	<modifier r_name="'canTargetSummon'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_enabled'" r_modifiedValue="$0&&exists(target)&&contains(target.encounterTags,'summon')&&(target.creator!=actor)"/>
					</effect>
				</effect>
			</action>
		</power>
		<power	r_name="'ShareLife'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNameShareLife"
						r_graphic="'ShareLife.png'"
						powerTooltip="text.powerTooltipShareLife">
			<modifier r_name="'familiarShareLife'" r_template="'mainPowerModifier'" r_modifierTarget="'familiarShareLife'" r_modifiedValue="1"/> 
		</power>
		<power r_name="'HealSummon'" r_template="'activePowerTemplate'"
					 powerEffectTemplate="{'mainTargetEffectTemplate','standardHealTemplate'}"
					 r_displayName="text.powerNameHealSummon"
					 r_graphic="'HealSummon.png'"
					 powerHealBonus="20"
					 powerRange="5"
					 powerFatigueCost="5"
					 powerTooltip="text.powerTooltipHealSummon"
					 actionLogMethod="'logPowerWithHeal'">
			<action r_name="'use'" canTargetFaction="(actor.r_allyFaction)[target.r_faction]">
				<modifier r_name="'canTargetSummon'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_canTarget'" r_modifiedValue="$0&&contains(target.encounterTags,'summon')"/>
				<effect r_name="'mainEffect'"
								healBonus="powerHealBonus">
					<effect r_name="'prolong'" r_template="'evaluationEffect'" r_enabled="target.dyingTime>0" r_effect="target.dyingTime+=(2D2*100)"/>
			 	</effect>
			</action>
		</power>
		<power	r_name="'AugmentSummoning'" r_template="'mainPowerTemplate'"
						r_displayName="text.powerNameAugmentSummoning"
						r_graphic="'AugmentSummoning.png'"
						powerTooltip="text.powerTooltipAugmentSummoning">
			<modifier r_name="'summonSpellHitModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'summonSpellHitModifier'" r_modifiedValue="2"/> 
			<modifier r_name="'summonSpellDefenseModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'summonSpellDefenseModifier'" r_modifiedValue="2"/> 
			<modifier r_name="'summonSpellDamageModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'summonSpellDamageModifier'" r_modifiedValue="2"/> 
			<modifier r_name="'summonSpellArmorModifier'" r_template="'mainPowerModifier'" r_modifierTarget="'summonSpellArmorModifier'" r_modifiedValue="2"/> 
		</power>
	</powers>
</data>