<data>
	<actors>
		<!-- -->
		<!-- SUMMONS -->
		<!-- -->
		<!-- familiar -->
		<actorTemplate r_name="'familiarAdditionalTemplate'"
										 r_displayName="text.monsterNameFamiliar"
										 r_graphic="{'monsterFamiliar.png'}"
										 shareLife="0"
										 r_behavior="'behaviorOffensiveFollowerWithStair'"
										 level="1">
			<item r_name="'slam'" r_template="'monsterWeaponTemplate'"/>
			<event r_name="'shareLife'" r_template="'mainEventTemplate'" r_enabled="shareLife&&exists(creator)" r_eventTarget="'creator.hitPoints'" r_targetType="'attribute'">
				<effect r_name="'TransfertLife'" r_template="{'mainTargetEffectTemplate','controllerEffect'}"
								r_enabled="(w_oldValue>w_newValue)&&(creator.maxHitPoints>2*creator.hitPoints)" 
								r_className="'CctlEffectLaunchAction'"
								r_newActor="'self'"
								r_newTarget="'creator'"
								r_newActionType="'power'"
								r_newActionName="'TransfertLife'"
								r_delayRequest="0"
								r_params="{{'isFree',1}}"/>
			</event>
			<power r_template="'TransfertLife'"/>
			<modifier r_name="'Unicity'" r_template="'mainModifierTemplate'" r_enabled="exists(creator)" r_modifierTarget="'creator.powers.SummonFamiliar.action.r_canExecute'" r_modifiedValue="0"/>
		</actorTemplate>
		<actor r_name="'Familiar'" r_template="{'elementalMonsterTemplate','priestMonster','summonedMonsterAdditionalTemplate','familiarAdditionalTemplate'}"/>
		<actor r_name="'UndeadFamiliar'" r_template="{'undeadMonsterTemplate','priestMonster','summonedMonsterAdditionalTemplate','familiarAdditionalTemplate'}"
						 r_graphic="{'monsterDeathFamiliar.png'}">
			<item r_name="'slam'" weaponIgnoreArmor="1"/>
		</actor>
		<!-- Wisp -->
		<actorTemplate 	r_name="'Wisp'" r_template="{'undeadMonsterTemplate','priestMonster','summonedMonsterAdditionalTemplate'}"
										isFlying="1"
										r_autoAttacks="{'smite','incineration','standardCloseCombat'}"
										Evocation="level+1"
										Holy="1"
										Fire="1"
										r_displayName="text.monsterNameWisp"
										r_graphic="{'wisp.png'}"
										level="1">
			<modifier r_name="'immunities'" r_template="'mainModifierTemplate'" r_modifierTarget="'immunities'" r_modifiedValue="$0+{'Grounded'}"/>
			<item r_name="'slam'" r_template="'monsterWeaponTemplate'"/>
			<power r_name="'smite'" r_template="{'Smite','powerMonsterTemplate'}"/>
			<power r_name="'incineration'" r_template="{'Incineration','powerMonsterTemplate'}"/>
		</actorTemplate>
		<!-- Angel -->
		<actorTemplate 	r_name="'angelTemplate'" r_template="{'angelMonsterTemplate','priestMonster'}"
										additionalPowers="{'healing'}"
										Transmutation="level+1"
										Holy="1"
										isFlying="1">
			<item r_name="'fireSword'" r_template="'monsterWeaponTemplate'"/>
			<power r_name="'healing'" r_template="{'HealTemplate','powerMonsterTemplate'}"
						 r_displayName="text.powerNameHealing"
						 powerHealBonus="10+2*Transmutation+5*Holy"
						 powerRange="1"
						 powerFatigueCost="0">
				<action r_name="'use'">
					<modifier r_name="'targetLifeCheck'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_canTarget'" r_modifiedValue="$0&&(target.maxHitPoints>target.hitPoints)"/>
				</action>
			</power>
		</actorTemplate>
		<actor r_name="'Angel'" r_template="'angelTemplate'"
						 r_displayName="text.monsterNameAngel"
						 r_graphic="{'angel'}"
						 level="8"/>
		<actor r_name="'summonedAngel'" r_template="{'Angel','summonedMonsterAdditionalTemplate'}"/>						 
		<!-- Demon -->
		<actorTemplate 	r_name="'demonTemplate'" r_template="{'demonMonsterTemplate','priestMonster'}"
										r_autoAttacks="{'standardCloseCombat','fireBolt'}"
										Evocation="level+1">
			<item r_name="'fireSword'" r_template="'monsterWeaponTemplate'"/>
			<power r_name="'fireBolt'" r_template="{'FireBolt','powerMonsterTemplate'}"
						 basePowerHitBonus="5"
						 basePowerDamage="20"/>
		</actorTemplate>
		<actor r_name="'LordOfThePit'" r_template="'demonTemplate'"
						 r_displayName="text.monsterNameLordOfThePit"
						 r_graphic="{'demon'}"
						 level="8"/>
		<actor r_name="'summonedLordOfThePit'" r_template="{'LordOfThePit','summonedMonsterAdditionalTemplate'}"/>

		<!-- Elemental -->
		<actorTemplate r_name="'elementalTemplate'" r_template="'elementalMonsterTemplate'">
			<item r_name="'slam'" r_template="'monsterWeaponTemplate'"/>
		</actorTemplate>
		<actor 	r_name="'AirElemental'" r_template="{'elementalTemplate','rogueMonster'}"
							moveTimeCostMultiplier="0.6"
							isFlying="1"
						 	r_displayName="text.monsterNameAirElemental"
						 	r_graphic="{'AirElemental'}"
						 	level="5">
			<modifier r_name="'immunities'" r_template="'mainModifierTemplate'" r_modifierTarget="'immunities'" r_modifiedValue="$0+{'Grounded'}"/>
		</actor>
		<actor 	r_name="'EarthElemental'" r_template="{'elementalTemplate','warriorMonster'}"
						 	r_displayName="text.monsterNameEarthElemental"
						 	r_graphic="{'EarthElemental'}"
						 	level="5">
			<modifier r_name="'armor'" r_template="'mainModifierTemplate'" r_modifierTarget="'NaturalArmor'" r_modifiedValue="$0*1.2"/> 
		</actor>
		<actor 	r_name="'FireElemental'" r_template="{'elementalTemplate','rogueMonster'}"
						 	r_displayName="text.monsterNameFireElemental"
						 	r_graphic="{'FireElemental'}"
						 	level="5">
			<power r_name="'BurnStrike'" r_template="'weaponProcAllWeaponsTemplate'"
						 r_displayName="text.powerNameBurningStrike"
						 powerDuration="100"
						 powerTickCount="5"
						 actionLogMethod="'logDebuffEffect'"
						 powerRecastRule="'replace'"
						 procEffectTemplate="'burnEffect'"
						 burnDamage="1+level/2" />
		</actor>
		<actor 	r_name="'WaterElemental'" r_template="{'elementalTemplate','priestMonster'}"
						 	r_displayName="text.monsterNameWaterElemental"
						 	r_graphic="{'WaterElemental'}"
						 	level="5"
							customDamageAbsorption="1+level/2"/>
		<actor r_name="'summonedAirElemental'" r_template="{'AirElemental','summonedMonsterAdditionalTemplate'}"/>
		<actor r_name="'summonedEarthElemental'" r_template="{'EarthElemental','summonedMonsterAdditionalTemplate'}"/>
		<actor r_name="'summonedFireElemental'" r_template="{'FireElemental','summonedMonsterAdditionalTemplate'}"/>
		<actor r_name="'summonedWaterElemental'" r_template="{'WaterElemental','summonedMonsterAdditionalTemplate'}"/>
		
		<!-- -->
		<!-- NPCS -->
		<!-- -->
		<!-- Princess & children -->
		<actor r_name="'friendlyNPCTemplate'" r_template="'mainMonsterTemplate'"
						 r_behavior="'behaviorFriendlyNpc'"
						 r_xpValue="0"
						 r_faction="2"
						 r_hostileFaction="{0,0,0,0,0}"
						 r_allyFaction="{1,0,0,0,0}"
						 toBeSaved="1"
						 mainNPC="1">
		</actor>
		<actor r_name="'Princess'" r_template="'friendlyNPCTemplate'"
						 r_displayName="text.monsterNamePrincess"
						 r_graphic="{'princess.png'}"
						 Dodge="0"
						 NaturalArmor="0"
						 maxHitPoints="10"
						 toBeSaved="0"
						 bossIsDead="0">
			<event r_name="'onBossDeath'" r_template="'mainEventTemplate'" r_enabled="exists(world)&&exists(world.currentDungeon)" r_eventTarget="'world.currentDungeon.conditionVictory'" r_targetType="'attribute'">
				<effect r_name="'switchVictoryCondition'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="!bossIsDead&&world.currentDungeon.conditionVictory" r_effect="all({world.currentDungeon.conditionVictory=0,bossIsDead=1,toBeSaved=1})"/>
			</event>
			<event r_name="'destruction'">
				<effect r_name="'destruction'">
					<effect r_name="'killPrincess'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="gameParameters.princessAlive=0"/>
				</effect>
			</event>
		</actor>
		<actor r_name="'Kid'" r_template="'friendlyNPCTemplate'"
						 r_displayName="text.monsterNameChild"
						 r_graphic="{'kid.png'}"
						 Dodge="0"
						 NaturalArmor="0"
						 maxHitPoints="10"
						 mainNPC="0">
			<event r_name="'destruction'">
				<effect r_name="'destruction'">
					<effect r_name="'killKid'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="--gameParameters.childrenAlive"/>
				</effect>
			</event>
			<event r_name="'onPrincessDie'" r_template="'mainEventTemplate'" r_eventTarget="'gameParameters.princessAlive'" r_targetType="'attribute'">
				<effect r_name="'messageRitualStartingDay'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="isDead=1"/>
			</event>
		</actor>

		<actor r_name="'Merchant'" r_template="'friendlyNPCTemplate'"
						 r_displayName="text.monsterNameMerchant"
						 r_graphic="{'merchant.png'}"
						 Dodge="0"
						 NaturalArmor="0"
						 maxHitPoints="500"
						 lootPower="min(dungeonDepth+1,6)">
			<event r_name="'onExitByStair'" r_template="'mainEventTemplate'" r_enabled="exists(world)&&exists(world.currentDungeon)" r_eventTarget="'world.currentDungeon.conditionVictory'" r_targetType="'attribute'">
				<effect r_name="'thanks'" r_template="'logThanksForHelp'"/>
				<effect r_name="'gift'" r_template="{'mainSelfEffectTemplate','controllerEffect'}"
								r_className="'CctlEffectCreation'"
								rw_xTarget="w_xCoord"
								rw_yTarget="w_yCoord"
								r_creationType="'activable'"
								r_creationName="'merchantLoot'"
								r_params="{}"/>
			</event>
		</actor>
	</actors>
</data>