:: spellList
<<set $here = 'spellList'>>
<<set $ARGS = $location_var[$here]>>
<!-- ! Information pertaining to PC for each spell-->
<!-- !	spellKnown['spellname'] = 1 if the spell is known by the player-->
<!-- !	spellLearn['spellname'] = 0-100, percentage of study that has occured to learn this spell. 100+ will learn it.-->
<!-- !	spellListAvail['spellListArrayName'] = Number of spells that teacher will teach in the list-->
<!-- !-->
<!-- ! MetaData for Each Spell-->
<!-- !	spellMana['spellname'] = Mana cost to cast this spell-->
<!-- !	spellTime['spellname'] = How much time will pass in the casting of the spell-->
<!-- !	spellDiff['spellname'] = Difficulty to learn and cast this spell-->
<!-- !	$spellName['spellname'] = Pretty name for the spell-->
<!-- !	$spellDesc['spellname'] = Description of what the spell does.-->
<!-- !	$spellTarget['spellname'] = Intended Target of Spell (e.g.: 'self', 'team', 'enemy').-->
<!-- !	$spellReq['spellname'] = Prerequisite Spell needed to learn this spell-->
<!-- !	$spellOptDesc['spellname'] = name of an array of Option Descriptions for this spell-->
<!-- !	$spellOptVal['spellname'] = name of an array of values to pass for Spell Options-->
<!-- !-->
<!-- ! There are also defined lists of spells grouped together-->
<!-- !	$combatSpells = Spells that can be used in Combat-->
<!-- !	$nonComSpells = Non-Combat Spells, ones that can be executed in any location.-->
<!-- !	----->
<!-- !	$basicSpells = basic spells that are taught by Tatiana-->
<!-- !	$healSpells = Healing Spells-->
<!-- !	$beautySpells = Beauty Spells-->
<!-- !	$librarySpells = Spells Researchable in the Library-->
<!-- !	$fireSpells = Fire-based spells-->
<!-- !	$electSpells = Electricity based spells-->
<!-- !	$earthSpells = Earth magic spells-->
<!-- !	$airSpells = Air based spells-->
<!-- !	$waterSpells = Water based spells-->
<!-- !-->
<!-- ! To create a new spell...-->
<!-- !	1) fill out the meta-data as listed above, this describes stats abotu the spell, cost, difficulty, desc, etc.-->
<!-- !	2) Typically, a spell will be in one of $combatSpells or $nonComSpells (this picks how the spell is executed-->
<!-- !		by the user), andcalso in one other of the lists ($basicSpells, $fireSpells, etc.), which picks where you-->
<!-- !		learn the spells.-->
<!-- !	3) Then create a matching section in the "spell" location for it.  This function in "spell" describes what the-->
<!-- !		spell actually does in game mechanics-->
<!-- !teleport-->
<<setinit $spellMana['teleport'] = 1000>>
<<setinit $spellTime['teleport'] = 20>>
<<setinit $spellDiff['teleport'] = 20>>
<<setinit $spellName['teleport'] = 'Teleport'>>
<<setinit $spellDesc['teleport'] = 'You can move from one Fairy Circle to another.'>>
<<setinit $spellTarget['teleport'] = 'self'>>
<<setinit $spellOptDesc['teleport'] = '$treeCircName'>>
<<setinit $spellOptVal['teleport'] = '$tpLocations'>>
<!-- !regenerate-->
<<setinit $spellMana['regenerate'] = 500>>
<<setinit $spellTime['regenerate'] = 1>>
<<setinit $spellDiff['regenerate'] = 5>>
<<setinit $spellName['regenerate'] = 'Regenerate'>>
<<setinit $spellDesc['regenerate'] = 'Slowly regain health over time.'>>
<<setinit $spellTarget['regenerate'] = 'self'>>
<!-- !curedisease-->
<<setinit $spellMana['curedisease'] = 1000>>
<<setinit $spellTime['curedisease'] = 30>>
<<setinit $spellDiff['curedisease'] = 25>>
<<setinit $spellName['curedisease'] = 'Cure Disease'>>
<<setinit $spellDesc['curedisease'] = 'Your body will burn itself free of any diseases you may have.'>>
<<setinit $spellTarget['teleport'] = 'self'>>
<!-- !curewounds-->
<<setinit $spellMana['curewounds'] = 1000>>
<<setinit $spellTime['curewounds'] = 30>>
<<setinit $spellDiff['curewounds'] = 25>>
<<setinit $spellName['curewounds'] = 'Cure Wounds'>>
<<setinit $spellDesc['curewounds'] = 'You feel your body`s wounds begin to heal.'>>
<<setinit $spellTarget['curewounds'] = 'team'>>
<!-- !curewounds2-->
<<setinit $spellMana['curewounds2'] = 10000>>
<<setinit $spellTime['curewounds2'] = 60>>
<<setinit $spellDiff['curewounds2'] = 75>>
<<setinit $spellName['curewounds2'] = 'Greater Cure Wounds'>>
<<setinit $spellDesc['curewounds2'] = 'You feel your body heal to perfection.'>>
<<setinit $spellReq['curewounds2'] = 'curewounds'>>
<<setinit $spellTarget['curewounds2'] = 'team'>>
<!-- !painblock-->
<<setinit $spellMana['painblock'] = 1000>>
<<setinit $spellTime['painblock'] = 1>>
<<setinit $spellDiff['painblock'] = 8>>
<<setinit $spellName['painblock'] = 'Pain Block'>>
<<setinit $spellDesc['painblock'] = 'Block your pain for some time.'>>
<<setinit $spellTarget['painblock'] = 'self'>>
<!-- !berserk-->
<<setinit $spellMana['berserk'] = 5000>>
<<setinit $spellTime['berserk'] = 1>>
<<setinit $spellDiff['berserk'] = 30>>
<<setinit $spellName['berserk'] = 'Berserker Rage'>>
<<setinit $spellDesc['berserk'] = 'Enrage yourself with supernatural strength, speed, and endurance.'>>
<<setinit $spellTarget['berserk'] = 'self'>>
<!-- !shower-->
<<setinit $spellMana['shower'] = 500>>
<<setinit $spellTime['shower'] = 1>>
<<setinit $spellDiff['shower'] = 1>>
<<setinit $spellName['shower'] = 'Shower'>>
<<setinit $spellDesc['shower'] = 'Clean and refresh yourself as if you have taken a shower.'>>
<<setinit $spellTarget['shower'] = 'self'>>
<!-- !makeup-->
<<setinit $spellMana['makeup'] = 100>>
<<setinit $spellTime['makeup'] = 5>>
<<setinit $spellDiff['makeup'] = 15>>
<<setinit $spellName['makeup'] = 'Makeup'>>
<<setinit $spellDesc['makeup'] = 'Apply Makeup to yourself magically.'>>
<<setinit $spellTarget['makeup'] = 'self'>>
<<setinit $spellOptDesc['makeup'] = '$MakeupSet'>>
<<setinit $spellOptVal['makeup'] = '$MakeupSetVal'>>
<<if $routine1 + $routine2 + $routine3 + $routine4 == ''>>
	<<set $MakeupSet to null>>
	<<set $MakeupSetVal to null>>
	<<setinit $MakeupSet[0] = 'No Makeup'>>
	<<setinit $MakeupSetVal[0] = '000'>>
	<<setinit $MakeupSet[1] = 'Light Makeup'>>
	<<setinit $makeupSetVal[1] = '110'>>
	<<setinit $MakeupSet[2] = 'Vibrant Makeup'>>
	<<setinit $makeupSetVal[2] = '210'>>
	<<setinit $MakeupSet[3] = 'Heavy Makeup'>>
	<<setinit $makeupSetVal[3] = '310'>>
	<<setinit $MakeupSet[4] = 'Bimbo Makeup'>>
	<<setinit $makeupSetVal[4] = '510'>>
<<else>>
	<<set $MakeupSet to null>>
	<<set $MakeupSetVal to null>>
	<<setinit $MakeupSet[0] = 'No Makeup'>>
	<<setinit $MakeupSetVal[0] = '000'>>
	<<set $i = 1>>
	<<if $routine1 != ''>>
		<<setinit $MakeupSet[$i] = $routine1custname>>
		<<setinit $MakeupSetVal[$i] = $routine1>>
		<<set $i += 1>>
	<</if>>
	<<if $routine2 != ''>>
		<<setinit $MakeupSet[$i] = $routine2custname>>
		<<setinit $MakeupSetVal[$i] = $routine2>>
		<<set $i += 1>>
	<</if>>
	<<if $routine3 != ''>>
		<<setinit $MakeupSet[$i] = $routine3custname>>
		<<setinit $MakeupSetVal[$i] = $routine3>>
		<<set $i += 1>>
	<</if>>
	<<if $routine4 != ''>>
		<<setinit $MakeupSet[$i] = $routine4custname>>
		<<setinit $MakeupSetVal[$i] = $routine4>>
		<<set $i += 1>>
	<</if>>
	<<set $i to null>>
<</if>>
<!-- !cosmetica-->
<<setinit $spellMana['cosmetica'] = 1000>>
<<setinit $spellTime['cosmetica'] = 5>>
<<setinit $spellDiff['cosmetica'] = 50>>
<<setinit $spellName['cosmetica'] = 'Cosmetica'>>
<<setinit $spellDesc['cosmetica'] = 'Clean and tidy yourself, completely beautifying yourself; hair, makeup, grooming of all kinds.'>>
<<setinit $spellTarget['cosmetica'] = 'self'>>
<<setinit $spellReq['cosmetica'] = 'makeup'>>
<!-- !glamour-->
<<setinit $spellMana['glamour'] = 500>>
<<setinit $spellTime['glamour'] = 1>>
<<setinit $spellDiff['glamour'] = 30>>
<<setinit $spellName['glamour'] = 'Glamour'>>
<<setinit $spellTarget['glamour'] = 'self'>>
<<setinit $spellDesc['glamour'] = 'Become undefinably beautiful. Your eyes sparkle just so. Your hair has a perfect luster. Your curves are undefinably perfect.'>>
<!-- !glamour-->
<<setinit $spellMana['alterself'] = 500>>
<<setinit $spellTime['alterself'] = 1>>
<<setinit $spellDiff['alterself'] = 30>>
<<setinit $spellName['alterself'] = 'Alter Self'>>
<<setinit $spellTarget['alterself'] = 'self'>>
<<setinit $spellDesc['alterself'] = 'Change your appearance to that of some other person.'>>
<!-- !bodymod-->
<<setinit $spellMana['bodymod'] = 40>>
<<setinit $spellTime['bodymod'] = 30>>
<<setinit $spellDiff['bodymod'] = 0>>
<<setinit $spellName['bodymod'] = 'Body Modification'>>
<<setinit $spellDesc['bodymod'] = 'Change your appearance.'>>
<<setinit $spellTarget['bodymod'] = 'self'>>
<!-- !fog-->
<<setinit $spellMana['fog'] = 10>>
<<setinit $spellTime['fog'] = 0>>
<<setinit $spellDiff['fog'] = 1>>
<<setinit $spellName['fog'] = 'Fog'>>
<<setinit $spellDesc['fog'] = 'Create a fog on the battlefield, obscuring the view of the enemy.'>>
<<setinit $spellTarget['fog'] = 'self'>>
<!-- !clone-->
<<setinit $spellMana['clone'] = 15>>
<<setinit $spellTime['clone'] = 0>>
<<setinit $spellDiff['clone'] = 1>>
<<setinit $spellName['clone'] = 'Create Clone'>>
<<setinit $spellDesc['clone'] = 'You can create an exact clone of yourself and slip out of sight of the enemy.'>>
<<setinit $spellTarget['clone'] = 'self'>>
<!-- !stun-->
<<setinit $spellMana['stun'] = 200>>
<<setinit $spellTime['stun'] = 0>>
<<setinit $spellDiff['stun'] = 50>>
<<setinit $spellName['stun'] = 'Stun'>>
<<setinit $spellDesc['stun'] = 'Paralyze the enemy with a touch.'>>
<<setinit $spellTarget['stun'] = 'enemy'>>
<!-- !weapon-->
<<setinit $spellMana['weapon'] = 20>>
<<setinit $spellTime['weapon'] = 0>>
<<setinit $spellDiff['weapon'] = 0>>
<<setinit $spellName['weapon'] = 'Empower Weapon'>>
<<setinit $spellDesc['weapon'] = 'Magically empower a weapon, causing it to deal greater damage.'>>
<<setinit $spellTarget['weapon'] = 'self'>>
<!-- !wind-->
<<setinit $spellMana['wind'] = 40>>
<<setinit $spellTime['wind'] = 0>>
<<setinit $spellDiff['wind'] = 2>>
<<setinit $spellName['wind'] = 'Gust of Wind'>>
<<setinit $spellDesc['wind'] = 'Summon a gust of wind that will clear away fog.'>>
<<setinit $spellTarget['wind'] = 'enemy'>>
<!-- !multiclone-->
<<setinit $spellMana['multiclone'] = 45>>
<<setinit $spellTime['multiclone'] = 0>>
<<setinit $spellDiff['multiclone'] = 2>>
<<setinit $spellName['multiclone'] = 'Multi-Clone'>>
<<setinit $spellDesc['multiclone'] = 'Summon three clones of yourself and slip out of the enemy`s sight.'>>
<<setinit $spellReq['multiclone'] = 'clone'>>
<<setinit $spellTarget['multiclone'] = 'self'>>
<!-- !energo-->
<<setinit $spellMana['energo'] = 50>>
<<setinit $spellTime['energo'] = 0>>
<<setinit $spellDiff['energo'] = 3>>
<<setinit $spellName['energo'] = 'Energy Shield'>>
<<setinit $spellDesc['energo'] = 'Create an energy shield to absorb incoming damage. You gain 100 defense.'>>
<<setinit $spellTarget['energo'] = 'self'>>
<!-- !haste-->
<<setinit $spellMana['haste'] = 60>>
<<setinit $spellTime['haste'] = 0>>
<<setinit $spellDiff['haste'] = 3>>
<<setinit $spellName['haste'] = 'Haste'>>
<<setinit $spellDesc['haste'] = 'Hasten your passage through time to gain reaction speed to seize the initiative.'>>
<<setinit $spellTarget['haste'] = 'self'>>
<!-- !heal-->
<<setinit $spellMana['heal'] = 400>>
<<setinit $spellTime['heal'] = 0>>
<<setinit $spellDiff['heal'] = 4>>
<<setinit $spellName['heal'] = 'Heal'>>
<<setinit $spellDesc['heal'] = 'Exchange mana for health, healing your wounds and fortifying your body.'>>
<<setinit $spellTarget['heal'] = 'team'>>
<!-- !hand-->
<<setinit $spellMana['hand'] = 100>>
<<setinit $spellTime['hand'] = 0>>
<<setinit $spellDiff['hand'] = 0>>
<<setinit $spellName['hand'] = 'Quivering Palm'>>
<<setinit $spellDesc['hand'] = 'Add energy from your mana to your hand for a devastating strike.'>>
<<setinit $spellTarget['wind'] = 'enemy'>>
<!-- !scaldingtouch-->
<<setinit $spellMana['scaldingtouch'] = 10>>
<<setinit $spellTime['scaldingtouch'] = 0>>
<<setinit $spellDiff['scaldingtouch'] = 6>>
<<setinit $spellName['scaldingtouch'] = 'Scalding Touch'>>
<<setinit $spellDesc['scaldingtouch'] = 'Flames spring from your hands.'>>
<<setinit $spellTarget['scaldingtouch'] = 'enemy'>>
<!-- !burninghands-->
<<setinit $spellMana['burninghands'] = 100>>
<<setinit $spellTime['burninghands'] = 0>>
<<setinit $spellDiff['burninghands'] = 7>>
<<setinit $spellName['burninghands'] = 'Burning Hands'>>
<<setinit $spellDesc['burninghands'] = 'A torrent of flames jets from your hands.'>>
<<setinit $spellReq['burninghands'] = 'scaldingtouch'>>
<<setinit $spellTarget['burninghands'] = 'enemy'>>
<!-- !firebarrier-->
<<setinit $spellMana['firebarrier'] = 150>>
<<setinit $spellTime['firebarrier'] = 0>>
<<setinit $spellDiff['firebarrier'] = 8>>
<<setinit $spellName['firebarrier'] = 'Fire Barrier'>>
<<setinit $spellDesc['firebarrier'] = 'You are shielded by a wall of flames. Adds 750 defense.'>>
<<setinit $spellTarget['firebarrier'] = 'self'>>
<!-- !firestorm-->
<<setinit $spellMana['firestorm'] = 250>>
<<setinit $spellTime['firestorm'] = 0>>
<<setinit $spellDiff['firestorm'] = 9>>
<<setinit $spellName['firestorm'] = 'Fire Storm'>>
<<setinit $spellDesc['firestorm'] = 'Superheated embers rain down upon your enemies.'>>
<<setinit $spellTarget['firestorm'] = 'enemy'>>
<!-- !flameshield-->
<<setinit $spellMana['flameshield'] = 500>>
<<setinit $spellTime['flameshield'] = 0>>
<<setinit $spellDiff['flameshield'] = 10>>
<<setinit $spellName['flameshield'] = 'Flame Shield'>>
<<setinit $spellDesc['flameshield'] = 'A Shield made of flames interposes itself between you and your enemy, absorbing 2500 damage to defend you.'>>
<<setinit $spellTarget['flameshield'] = 'self'>>
<!-- !shock-->
<<setinit $spellMana['shock'] = 10>>
<<setinit $spellTime['shock'] = 0>>
<<setinit $spellDiff['shock'] = 6>>
<<setinit $spellName['shock'] = 'Electric Shock'>>
<<setinit $spellDesc['shock'] = 'An electric spark shoots from your hand.'>>
<<setinit $spellTarget['shock'] = 'enemy'>>
<!-- !lightning-->
<<setinit $spellMana['lightning'] = 100>>
<<setinit $spellTime['lightning'] = 0>>
<<setinit $spellDiff['lightning'] = 7>>
<<setinit $spellName['lightning'] = 'Lightning'>>
<<setinit $spellDesc['lightning'] = 'A lightning bolt shoots from your hand.'>>
<<setinit $spellTarget['lightning'] = 'enemy'>>
<!-- !electricbarrier-->
<<setinit $spellMana['electricbarrier'] = 150>>
<<setinit $spellTime['electricbarrier'] = 0>>
<<setinit $spellDiff['electricbarrier'] = 8>>
<<setinit $spellName['electricbarrier'] = 'Electric Barrier'>>
<<setinit $spellDesc['electricbarrier'] = 'A static electric field blocks incoming attacks from reaching you.'>>
<<setinit $spellTarget['electricbarrier'] = 'self'>>
<!-- !1000birds-->
<<setinit $spellMana['1000birds'] = 250>>
<<setinit $spellTime['1000birds'] = 0>>
<<setinit $spellDiff['1000birds'] = 9>>
<<setinit $spellName['1000birds'] = 'Dance of a Thousand Birds'>>
<<setinit $spellDesc['1000birds'] = 'The air is filled with small lightning bolts leaping through the air with shrieks.'>>
<<setinit $spellReq['1000birds'] = 'lightning'>>
<<setinit $spellTarget['1000birds'] = 'enemy'>>
<!-- !dancingsphere-->
<<setinit $spellMana['dancingsphere'] = 500>>
<<setinit $spellTime['dancingsphere'] = 0>>
<<setinit $spellDiff['dancingsphere'] = 10>>
<<setinit $spellName['dancingsphere'] = 'Dancing Sphere'>>
<<setinit $spellDesc['dancingsphere'] = 'Lightning dances around you, blocking attacks coming toward you.'>>
<<setinit $spellTarget['dancingsphere'] = 'self'>>
<!-- !quicksand-->
<<setinit $spellMana['quicksand'] = 10>>
<<setinit $spellTime['quicksand'] = 0>>
<<setinit $spellDiff['quicksand'] = 6>>
<<setinit $spellName['quicksand'] = 'Quicksand'>>
<<setinit $spellDesc['quicksand'] = 'Your opponent is caught in a quicksand trap.'>>
<<setinit $spellTarget['quicksand'] = 'enemy'>>
<!-- !earthshield-->
<<setinit $spellMana['earthshield'] = 100>>
<<setinit $spellTime['earthshield'] = 0>>
<<setinit $spellDiff['earthshield'] = 7>>
<<setinit $spellName['earthshield'] = 'Earth Shield'>>
<<setinit $spellDesc['earthshield'] = 'Tendrils of earth reach up to defend you. Some of the damage it absorbs is captured as mana and given to you.'>>
<<setinit $spellTarget['earthshield'] = 'self'>>
<!-- !abyss-->
<<setinit $spellMana['abyss'] = 150>>
<<setinit $spellTime['abyss'] = 0>>
<<setinit $spellDiff['abyss'] = 8>>
<<setinit $spellName['abyss'] = 'Abyss'>>
<<setinit $spellDesc['abyss'] = 'The Earth opens up beneath your opponent`s feet, slamming shut damaging him and depriving him of the ability to move.'>>
<<setinit $spellTarget['abyss'] = 'enemy'>>
<!-- !earthguardian-->
<<setinit $spellMana['earthguardian'] = 250>>
<<setinit $spellTime['earthguardian'] = 0>>
<<setinit $spellDiff['earthguardian'] = 9>>
<<setinit $spellName['earthguardian'] = 'Earth Guardian'>>
<<setinit $spellDesc['earthguardian'] = 'The Earth itself comes alive defending you from attacks. It draws from the power of the land to regenerate itself every round.'>>
<<setinit $spellTarget['earthguardian'] = 'self'>>
<!-- !sando-->
<<setinit $spellMana['sando'] = 500>>
<<setinit $spellTime['sando'] = 0>>
<<setinit $spellDiff['sando'] = 10>>
<<setinit $spellName['sando'] = 'Sando'>>
<<setinit $spellDesc['sando'] = 'Two huge plates of earth collapse together, crushing the enemy and depriving him of the ability to move.'>>
<<setinit $spellTarget['sando'] = 'enemy'>>
<!-- !windgust-->
<<setinit $spellMana['windgust'] = 10>>
<<setinit $spellTime['windgust'] = 0>>
<<setinit $spellDiff['windgust'] = 6>>
<<setinit $spellName['windgust'] = 'Wind Gust'>>
<<setinit $spellDesc['windgust'] = 'a huge gust of wind rips past you, killing clones and removing fog.'>>
<<setinit $spellTarget['windgust'] = 'enemy'>>
<!-- !pressure-->
<<setinit $spellMana['pressure'] = 100>>
<<setinit $spellTime['pressure'] = 0>>
<<setinit $spellDiff['pressure'] = 7>>
<<setinit $spellName['pressure'] = 'Horrific Pressure'>>
<<setinit $spellDesc['pressure'] = 'Enormous air pressure surrounds your enemy, causing damage as well as killing clones and removing fog.'>>
<<setinit $spellTarget['pressure'] = 'enemy'>>
<!-- !vacuum-->
<<setinit $spellMana['vacuum'] = 150>>
<<setinit $spellTime['vacuum'] = 0>>
<<setinit $spellDiff['vacuum'] = 8>>
<<setinit $spellName['vacuum'] = 'Vacuum Sphere'>>
<<setinit $spellDesc['vacuum'] = 'A turbulent sphere of vacuum surrounds you, blocking incoming attacks.'>>
<<setinit $spellTarget['vacuum'] = 'self'>>
<!-- !vacuumshells-->
<<setinit $spellMana['vacuumshells'] = 250>>
<<setinit $spellTime['vacuumshells'] = 0>>
<<setinit $spellDiff['vacuumshells'] = 9>>
<<setinit $spellName['vacuumshells'] = 'Vacuum Shells'>>
<<setinit $spellDesc['vacuumshells'] = 'Turbulent spheres of vacuum bombard your enemy, destroying clones and removing fog.'>>
<<setinit $spellTarget['vacuumshells'] = 'enemy'>>
<!-- !devouringvacuum-->
<<setinit $spellMana['devouringvacuum'] = 500>>
<<setinit $spellTime['devouringvacuum'] = 0>>
<<setinit $spellDiff['devouringvacuum'] = 10>>
<<setinit $spellName['devouringvacuum'] = 'Devouring Vacuum'>>
<<setinit $spellDesc['devouringvacuum'] = 'A devouring vacuum sucks away your enemy`s defensive shields.'>>
<<setinit $spellTarget['devouringvacuum'] = 'enemy'>>
<!-- !leechmana-->
<<setinit $spellMana['leechmana'] = 10>>
<<setinit $spellTime['leechmana'] = 0>>
<<setinit $spellDiff['leechmana'] = 6>>
<<setinit $spellName['leechmana'] = 'Leech Mana'>>
<<setinit $spellDesc['leechmana'] = 'Inflict 100 damage and absorb 100 mana from your foe.'>>
<<setinit $spellTarget['leechmana'] = 'enemy'>>
<!-- !flood-->
<<setinit $spellMana['flood'] = 100>>
<<setinit $spellTime['flood'] = 0>>
<<setinit $spellDiff['flood'] = 7>>
<<setinit $spellName['flood'] = 'Flood'>>
<<setinit $spellDesc['flood'] = 'Inflict 1000 damage and absorb 500 mana from your foe.'>>
<<setinit $spellTarget['flood'] = 'enemy'>>
<!-- !blister-->
<<setinit $spellMana['blister'] = 150>>
<<setinit $spellTime['blister'] = 0>>
<<setinit $spellDiff['blister'] = 8>>
<<setinit $spellName['blister'] = 'Blister'>>
<<setinit $spellDesc['blister'] = 'Create a protective sphere of water. Some of the damage absorbed is converted into mana for you.'>>
<<setinit $spellTarget['blister'] = 'enemy'>>
<!-- !sharkrockets-->
<<setinit $spellMana['sharkrockets'] = 250>>
<<setinit $spellTime['sharkrockets'] = 0>>
<<setinit $spellDiff['sharkrockets'] = 9>>
<<setinit $spellName['sharkrockets'] = 'Shark Rockets'>>
<<setinit $spellDesc['sharkrockets'] = 'Blobs of Water shaped like sharks fly towards your enemies, striking them for 1500 damage and absorbing 2500 mana for you. Clones are destroyed.'>>
<<setinit $spellTarget['sharkrockets'] = 'enemy'>>
<!-- !greatflood-->
<<setinit $spellMana['greatflood'] = 500>>
<<setinit $spellTime['greatflood'] = 0>>
<<setinit $spellDiff['greatflood'] = 10>>
<<setinit $spellName['greatflood'] = 'Great Flood'>>
<<setinit $spellDesc['greatflood'] = 'A huge flood of water fills the area, absorbing mana from the enemy and giving you additional protection.'>>
<<setinit $spellTarget['greatflood'] = 'enemy'>>
<!-- !--------------------------------------------------------------------------------------------->
<!-- ! Pick Execution points for the spells-->
<!-- ! List Combat Spells for use in fight scenerios-->
<<setinit $combatSpells[0] = 'fog'>>
<<setinit $combatSpells[1] = 'clone'>>
<<setinit $combatSpells[2] = 'stun'>>
<<setinit $combatSpells[3] = 'weapon'>>
<<setinit $combatSpells[4] = 'wind'>>
<<setinit $combatSpells[5] = 'multiclone'>>
<<setinit $combatSpells[6] = 'energo'>>
<<setinit $combatSpells[7] = 'haste'>>
<<setinit $combatSpells[8] = 'heal'>>
<<setinit $combatSpells[9] = 'hand'>>
<<setinit $combatSpells[10] = 'scaldingtouch'>>
<<setinit $combatSpells[11] = 'burninghands'>>
<<setinit $combatSpells[12] = 'firebarrier'>>
<<setinit $combatSpells[13] = 'firestorm'>>
<<setinit $combatSpells[14] = 'flameshield'>>
<<setinit $combatSpells[15] = 'shock'>>
<<setinit $combatSpells[16] = 'lightning'>>
<<setinit $combatSpells[17] = 'electricbarrier'>>
<<setinit $combatSpells[18] = '1000birds'>>
<<setinit $combatSpells[19] = 'dancingsphere'>>
<<setinit $combatSpells[20] = 'quicksand'>>
<<setinit $combatSpells[21] = 'earthshield'>>
<<setinit $combatSpells[22] = 'abyss'>>
<<setinit $combatSpells[23] = 'earthguardian'>>
<<setinit $combatSpells[24] = 'sando'>>
<<setinit $combatSpells[25] = 'windgust'>>
<<setinit $combatSpells[26] = 'pressure'>>
<<setinit $combatSpells[27] = 'vacuum'>>
<<setinit $combatSpells[28] = 'vacuumshells'>>
<<setinit $combatSpells[29] = 'devouringvacuum'>>
<<setinit $combatSpells[30] = 'leechmana'>>
<<setinit $combatSpells[31] = 'flood'>>
<<setinit $combatSpells[32] = 'blister'>>
<<setinit $combatSpells[33] = 'sharkrockets'>>
<<setinit $combatSpells[34] = 'greatflood'>>
<!-- ! List of Non-Combat Spells for use in Menu-->
<<setinit $nonComSpells[0] = 'heal'>>
<<setinit $nonComSpells[1] = 'regenerate'>>
<<setinit $nonComSpells[2] = 'curedisease'>>
<<setinit $nonComSpells[3] = 'curewounds'>>
<<setinit $nonComSpells[4] = 'curewounds2'>>
<<setinit $nonComSpells[5] = 'painblock'>>
<<setinit $nonComSpells[6] = 'berserk'>>
<<setinit $nonComSpells[7] = 'shower'>>
<<setinit $nonComSpells[8] = 'makeup'>>
<<setinit $nonComSpells[9] = 'cosmetica'>>
<<setinit $nonComSpells[10] = 'glamour'>>
<!-- !$nonComSpells[11] = 'alterself'-->
<!-- !--------------------------------------------------------------------------------------->
<!-- ! Pick Learning Location for Spells-->
<!-- ! Basic Spells-->
<<setinit $basicSpells[0] = 'fog'>>
<<setinit $basicSpells[1] = 'clone'>>
<<setinit $basicSpells[2] = 'stun'>>
<<setinit $basicSpells[3] = 'wind'>>
<<setinit $basicSpells[4] = 'multiclone'>>
<<setinit $basicSpells[5] = 'energo'>>
<<setinit $basicSpells[6] = 'haste'>>
<<setinit $basicSpells[7] = 'berserk'>>
<!-- !Healing Spells-->
<<setinit $healSpells[0] = 'painblock'>>
<<setinit $healSpells[1] = 'curewounds'>>
<<setinit $healSpells[2] = 'curewounds2'>>
<<setinit $healSpells[3] = 'curedisease'>>
<<setinit $healSpells[4] = 'heal'>>
<<setinit $healSpells[5] = 'regenerate'>>
<!-- ! Beauty Spells-->
<<setinit $beautySpells[0] = 'shower'>>
<<setinit $beautySpells[1] = 'makeup'>>
<<setinit $beautySpells[2] = 'cosmetica'>>
<!-- ! Researchable Spells-->
<<setinit $librarySpells[0] = 'painblock'>>
<<setinit $librarySpells[1] = 'shower'>>
<<setinit $librarySpells[2] = 'makeup'>>
<<setinit $librarySpells[3] = 'cosmetica'>>
<<setinit $librarySpells[4] = 'glamour'>>
<!-- !$librarySpells[5] = 'alterself'-->
<!-- ! Elemental Spell Groups-->
<<setinit $fireSpells[0] = 'scaldingtouch'>>
<<setinit $fireSpells[1] = 'burninghands'>>
<<setinit $fireSpells[2] = 'firebarrier'>>
<<setinit $fireSpells[3] = 'firestorm'>>
<<setinit $fireSpells[4] = 'flameshield'>>
<<setinit $electSpells[0] = 'shock'>>
<<setinit $electSpells[1] = 'lightning'>>
<<setinit $electSpells[2] = 'electricbarrier'>>
<<setinit $electSpells[3] = '1000birds'>>
<<setinit $electSpells[4] = 'dancingsphere'>>
<<setinit $earthSpells[0] = 'quicksand'>>
<<setinit $earthSpells[1] = 'earthshield'>>
<<setinit $earthSpells[2] = 'abyss'>>
<<setinit $earthSpells[3] = 'earthguardian'>>
<<setinit $earthSpells[4] = 'sando'>>
<<setinit $airSpells[0] = 'windgust'>>
<<setinit $airSpells[1] = 'pressure'>>
<<setinit $airSpells[2] = 'vacuum'>>
<<setinit $airSpells[3] = 'vacuumshells'>>
<<setinit $airSpells[4] = 'devouringvacuum'>>
<<setinit $waterSpells[0] = 'leechmana'>>
<<setinit $waterSpells[1] = 'flood'>>
<<setinit $waterSpells[2] = 'blister'>>
<<setinit $waterSpells[3] = 'sharkrockets'>>
<<setinit $waterSpells[4] = 'greatflood'>>
<!-- !! Spell Sets for Combat algorithms-->
<!-- !Healing Spells-->
<<setinit $comHealSpells[0] = 'heal'>>
<!-- !Shield Spells-->
<<setinit $comShldSpells[0] = 'flameshield'>>
<<setinit $comShldSpells[1] = 'firebarrier'>>
<<setinit $comShldSpells[2] = 'dancingsphere'>>
<<setinit $comShldSpells[3] = 'electricbarrier'>>
<<setinit $comShldSpells[4] = 'earthguardian'>>
<<setinit $comShldSpells[5] = 'earthshield'>>
<<setinit $comShldSpells[6] = 'vacuum'>>
<<setinit $comShldSpells[7] = 'blister'>>
<<setinit $comShldSpells[8] = 'energo'>>
<!-- !Buff Spells-->
<<setinitpush "$comBuffSpells" 'haste'>>
<<setinitpush "$comBuffSpells" 'hand'>>
<!-- !Attack Spells-->
<<setinit $comAtkSpells[0] = 'firestorm'>>
<<setinit $comAtkSpells[1] = 'burninghands'>>
<<setinit $comAtkSpells[2] = 'scaldingtouch'>>
<<setinit $comAtkSpells[3] = '1000birds'>>
<<setinit $comAtkSpells[4] = 'lightning'>>
<<setinit $comAtkSpells[5] = 'shock'>>
<<setinit $comAtkSpells[6] = 'sando'>>
<<setinit $comAtkSpells[7] = 'abyss'>>
<<setinit $comAtkSpells[8] = 'devouringvacuum'>>
<<setinit $comAtkSpells[9] = 'vacuumshells'>>
<<setinit $comAtkSpells[10] = 'quicksand'>>
<<setinit $comAtkSpells[11] = 'pressure'>>
<<setinit $comAtkSpells[12] = 'windgust'>>
<<setinit $comAtkSpells[13] = 'greatflood'>>
<<setinit $comAtkSpells[14] = 'sharkrockets'>>
<<setinit $comAtkSpells[15] = 'flood'>>
<<setinit $comAtkSpells[16] = 'leechmana'>>
<<setinit $comAtkSpells[17] = 'stun'>>
<<setinit $comAtkSpells[18] = 'weapon'>>
<!-- !--------------------------------------------------------------------------------------------->
<!-- ! Helper procedure to build Action bar for Learning Spells.-->
<<if $location_var[$here][0] == 'teacherActions'>>
	<!-- ! Make Actions for learning spells-->
	<!-- !	$ARGS[1] = the name of the array of spells-->
	<!-- !	$ARGS[2] = Exit Location-->
	<!-- !	$ARGS[3] = Arg for exit location-->
	<!-- ! Example:-->
	<!-- !	gs 'spellList', 'teacherActions', '$fireSpells', 'kakuzu', 'mansion1'-->
	<<set $ThisArrayName = $replace($ARGS[1],'$')>>
	<<set $ExitLocation = $location_var[$here][2]>>
	<<set $ExitLocation2 = $location_var[$here][3]>>
	<<set $ThisArraySize = dyneval("result=arrsize('$<<$ThisArrayName>>')")>>
	<<set $MaxAvailable = $spellListAvail[$ThisArrayName]>>
	<<set $i = 0>>
	<<warn 'JUMP MARKER ENCOUNTERED: :LearnSpellLoop'>>
	<!-- FAILED TO CONVERT
		$ThisSpellName = dyneval("$result = $<<$ThisArrayName>>[<<i>>]")
	-----
		<<set $ThisSpellName = dyneval("$result = $<<$ThisArrayName>>[ERROR: FAILED TO CONVERT LITERAL: """<<i>>"""]")>>

	-->
	<<warn "CONVERSION ERROR 5e42da35c710bb6b9dd8a9ecec9f80ba">>
	<<set $spellDifficulty = Max(spellDiff[$ThisSpellName],1)>>
	<<if $i < $ThisArraySize and $i < $MaxAvailable>>
		<<if getvar("$spellKnown["+$ThisSpellName+"]") == 0 and ($spellReq[$ThisSpellName] == '' or $spellKnown[$spellReq[$ThisSpellName]] == 1)>>
			<<if $pcs_magik >= $spellDifficulty>>
				<!-- FAILED TO CONVERT
					dynamic "act 'Practice <<$spellName[$ThisSpellName]>> (1:00) (Magic level  <<pcs_magik>> / Level required <<spellDifficulty>>)':	gt 'spellList', 'act learn', '<<$ThisSpellName>>','<<$ExitLocation>>','<<$ExitLocation2>>'"
				-----
					ERROR: FAILED TO CONVERT LITERAL: """dynamic "act 'Practice $spellName[$ThisSpellName] (1:00) (Magic level  <<pcs_magik>>""" / ERROR: FAILED TO CONVERT LITERAL: """Level required <<spellDifficulty>>)':	gt 'spellList'""" , 'act learn' , '$ThisSpellName' , '$ExitLocation' , '$ExitLocation2'"

				-->
				<<warn "CONVERSION ERROR bdc7c72a300b4744f44534a459d4a073">>
			<<else>>
				<!-- FAILED TO CONVERT
					act '<font color="red">Practice <<$spellName[$ThisSpellName]>> (Magic level  <<pcs_magik>> / Level required <<spellDifficulty>>)</font>': '<br><font color="red">Your Magic level isn''t high enough to develop this spell.</font>'
				-----
					<<actCLA '<font color="red">Practice $spellName['+$ThisSpellName]+' (Magic level  pcs_magik / Level required spellDifficulty)</font>'>>
					<<set ERROR: FAILED TO CONVERT LITERAL: """'<br><font color""" = ERROR: FAILED TO CONVERT LITERAL: """"red">Your Magic level isn''t high enough to develop this spell.<""" / ERROR: FAILED TO CONVERT LITERAL: """font>'""">>
				<</actCLA>>

				-->
				<<warn "CONVERSION ERROR 5dfa46a0fe2d50d29e4ac5673986a21d">>
			<</if>>
		<</if>>
		<<set $i += 1>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump LearnSpellLoop'>>
	<</if>>
	<<set $i to null>>
	<<set $ThisArraySize to null>>
	<<set $MaxAvailable to null>>
	<<set $ThisArrayName to null>>
<</if>>
<<if $location_var[$here][0] == 'act learn'>>
	<<set $ThisSpellName = $location_var[$here][1]>>
	<<set $ExitLocation = $location_var[$here][2]>>
	<<set $ExitLocation2 = $location_var[$here][3]>>
	<<set $spellDifficulty = Max(spellDiff[$ThisSpellName],1)>>
	<<if getvar("$pcs_mana") >= 1000>>
		<<set $pcs_mana -= 1000>>
		<<set $time.minutes += 60>>
		<!-- !Added "* (pcs_splcstng/spellDifficulty)" - if Sveta already mastered Spellcasting skill, learning new spells should be easier, and the opposite-->
		<<if ($pcs_splcstng / $spellDifficulty) > 0>>
			<<setinit $spellLearn[$ThisSpellName] += rand(1, 100/spellDifficulty) * ($pcs_splcstng / $spellDifficulty)>>
		<<else>>
			<<setinit $spellLearn[$ThisSpellName] += rand(1, 100/spellDifficulty)>>
		<</if>>
		<<if getvar("$spellLearn["+$ThisSpellName+"]") < 100>>
			You diligently study the spell for an hour, but cannot grasp it.
		<<else>>
			<<setinit $spellKnown[$ThisSpellName] = 1>>
			Finally, you are able to grasp and learn the spell.
			<<$spellName[$ThisSpellName]>>: <<$spellDesc[$ThisSpellName]>>
		<</if>>
	<<else>>
		 * pl 'You don't have enough mana to learn this spell.'
	<</if>>
	<<actCLA 'Move away'>>
		<<gt $ExitLocation $ExitLocation2>>
	<</actCLA>>
<</if>>
<<if $location_var[$here][0] == 'numAvailableSpells'>>
	<!-- ! Function that returns if the number of spells left to learn from this spell list-->
	<!-- !	$ARGS[1] = spelllist arrayname-->
	<!-- ! Example:-->
	<!-- !	if setup.func('spellList','numAvailableSpells','librarySpells') > 0: !do stuff to earn next spell-->
	<<set $ThisArrayName = $replace($ARGS[1],'$')>>
	<<set $ThisArraySize = dyneval("result=arrsize('$<<$ThisArrayName>>') - spellListAvail[$$ThisArrayName]")>>
	<<set $result = $ThisArraySize>>
	<<set $ThisArraySize to null>>
	<<set $ThisArrayName to null>>
<</if>>
<<if $location_var[$here][0] == 'addAvailableSpells'>>
	<!-- ! Increases Spell Available to be taught by this instructor by a given amount, default 1-->
	<!-- !	$ARGS[1] = spelllist arrayname-->
	<!-- !	 ARGS[2] = number of spells to add to avaiable list for learning-->
	<!-- ! Example:-->
	<!-- !	!This adds one more spell to the list of library spells-->
	<!-- !	gs 'spellList','addAvailableSpells','librarySpells'-->
	<!-- !	!This adds 3 more spells-->
	<!-- !	gs 'spellList','addAvailableSpells','librarySpells', 3-->
	<<set $ThisArrayName = $replace($ARGS[1],'$')>>
	<<set $ThisNumToAdd = $ARGS[2]>>
	<<if getvar("$ThisNumToAdd") == 0>>
		<<set $ThisNumToAdd = 1>>
	<</if>>
	<<set $ThisArraySize = dyneval("result=arrsize('$<<$ThisArrayName>>')")>>
	<<if $ThisArraySize - $ThisNumToAdd - getvar("$spellListAvail["+$ThisArrayName+"]") < 0>>
		<!-- ! This mean that we are trying to add more spells than are avaiable in the list-->
		<<setinit $spellListAvail[$ThisArrayName] = $ThisArraySize>>
	<<else>>
		<!-- ! Else we just add the requested number-->
		<<setinit $spellListAvail[$ThisArrayName] += $ThisNumToAdd>>
	<</if>>
	<<set $ThisNumToAdd to null>>
	<<set $ThisArraySize to null>>
	<<set $ThisArrayName to null>>
<</if>>
