<data>
	<effects>
		<!-- EXPERIENCE EFFECTS -->
		<effectTemplate r_name="'attributeRaise'" r_template="{'mainSelfEffectTemplate','multiEffect'}" r_enabled="selectedHero.Experience>=raiseCost" effectiveRaiseCost="0" raiseCost="fibonacci(selectedHero.baseValueByName(valueName)+1)*20">
			<effect r_name="'raiseCostComputing'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="effectiveRaiseCost=raiseCost"/>
			<effect r_name="'attributeRaise'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.attributeByName(valueName)++"/>
			<effect r_name="'log'" r_template="'logSpendXPAttribute'"/>
			<effect r_name="'xpCost'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.Experience-=effectiveRaiseCost"/>
		</effectTemplate>
		<effectTemplate r_name="'skillRaise'" r_template="{'mainSelfEffectTemplate','multiEffect'}" r_enabled="selectedHero.Experience>=raiseCost" effectiveRaiseCost="0" raiseCost="fibonacci(selectedHero.baseValueByName(valueName)+1)*10">
			<effect r_name="'raiseCostComputing'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="effectiveRaiseCost=raiseCost"/>
			<effect r_name="'skillRaise'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.attributeByName(valueName)++"/>
			<effect r_name="'log'" r_template="'logSpendXPSkill'"/>
			<effect r_name="'xpCost'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.Experience-=effectiveRaiseCost"/>
		</effectTemplate>
		<effectTemplate r_name="'affinityRaise'" r_template="{'mainSelfEffectTemplate','multiEffect'}" r_enabled="selectedHero.Experience>=raiseCost" effectiveRaiseCost="0" raiseCost="fibonacci(baseValue(selectedHero.Air)+baseValue(selectedHero.Death)+baseValue(selectedHero.Earth)+baseValue(selectedHero.Fire)+baseValue(selectedHero.Holy)+baseValue(selectedHero.Water)+1)*1000">
			<effect r_name="'raiseCostComputing'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="effectiveRaiseCost=raiseCost"/>
			<effect r_name="'affinityRaise'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.attributeByName(valueName)++"/>
			<effect r_name="'log'" r_template="'logSpendXPAffinity'"/>
			<effect r_name="'xpCost'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.Experience-=effectiveRaiseCost"/>
		</effectTemplate>
		<effectTemplate r_name="'affinityRaiseArcane'" r_template="{'mainSelfEffectTemplate','multiEffect'}" r_enabled="selectedHero.ArcanePoint>=raiseCost" effectiveRaiseCost="0" raiseCost="1">
			<effect r_name="'raiseCostComputing'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="effectiveRaiseCost=raiseCost"/>
			<effect r_name="'affinityRaise'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.attributeByName(valueName+'Bonus')++"/>
			<effect r_name="'affinityTouch'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.attributeByName(valueName)+=0"/> <!-- touch the affinity to auto-equip spells -->
			<effect r_name="'log'" r_template="'logSpendArcanePoint'"/>
			<effect r_name="'ArcanePointCost'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.ArcanePoint--"/>
		</effectTemplate>
		<effectTemplate r_name="'classRaise'" r_template="{'mainSelfEffectTemplate','multiEffect'}"
										r_enabled="(characterClassName!='')&&(selectedHero.Experience>=raiseCost)&&selectedHero.packages.(attributeByName(characterClassName)).canBeUpgrade"
										characterClassName="''"
										effectiveRaiseCost="0"
										raiseCost="selectedHero.totalClassLevel*50">
			<effect r_name="'raiseCostComputing'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="effectiveRaiseCost=raiseCost"/>
			<effect r_name="'classRaise'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.packages.(attributeByName(characterClassName)).classLevel++"/>
			<effect r_name="'log'" r_template="'logClassLevelUP'"/>
			<effect r_name="'ExperienceCost'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="selectedHero.Experience-=effectiveRaiseCost"/>
			<effect r_name="'notification'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}"
							newPower="(selectedHero.packages.(attributeByName(characterClassName)).recursivePowerList)[selectedHero.packages.(attributeByName(characterClassName)).classLevel-1]"
							r_effect="gameParameters.notifications+=simplifyArray({simplifyArray({text.(attributeByName('class'+characterClassName))+' '+text.level+' '+selectedHero.packages.(attributeByName(characterClassName)).classLevel+' !',selectedHero.packages.(attributeByName(characterClassName)).r_graphic,'class',selectedHero.packages.(attributeByName(characterClassName)).classLevel-1}),simplifyArray({text.newPower+': '+newPower.r_displayName,newPower.r_graphic,'class',selectedHero.packages.(attributeByName(characterClassName)).classLevel-1})})"/>
		</effectTemplate>
		
		<!-- HERO CREATION -->
		<effectTemplate r_name="'createHeroTemplate'" r_template="{'mainSelfEffectTemplate','multiEffect'}" baseHeroTemplate="'Hero'">
			<effect r_name="'createHero'" r_template="'mainSelfEffectTemplate'" r_type="'NewHero'" r_heroLibraryName="baseHeroTemplate" r_stuffPackages="gameParameters.stuffPackages" r_heroRank="0"/>
			<effect r_name="'levelHero'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="heroes.@0.packages.(attributeByName(gameParameters.class)).classLevel++"/>
		</effectTemplate>
		<effectTemplate r_name="'createHeroCheatTemplate'" r_template="'createHeroTemplate'" baseHeroTemplate="'HeroCheat'"/>
		<effect r_name="'enterDungeonTemplate'" r_template="{'mainSelfEffectTemplate','multiEffect'}">
			<effect r_name="'launchDungeon'" r_template="'mainWorldEffectTemplate'" r_type="'LaunchDungeon'"/>
			<effect r_name="'enterDungeonRefresh'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({gameParameters.combatLog=simplifyArray({relocate(text.youEnterDungeon)}),world.currentDungeon.conditionVictory=0,world.currentDungeon.stairVictory=0,world.lastDungeonDepth=world.currentDungeon.dungeonDepth})"/>
		</effect>
	</effects>
</data>