spellList.qsrc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. #spellList
  2. ! Information pertaining to PC for each spell
  3. ! spellKnown['spellname'] = 1 if the spell is known by the player
  4. ! spellLearn['spellname'] = 0-100, percentage of study that has occured to learn this spell. 100+ will learn it.
  5. !
  6. ! MetaData for Each Spell
  7. ! spellMana['spellname'] = Mana cost to cast this spell
  8. ! spellTime['spellname'] = How much time will pass in the casting of the spell
  9. ! spellDiff['spellname'] = Difficulty to learn and cast this spell
  10. ! $spellName['spellname'] = Pretty name for the spell
  11. ! $psellDesc['spellname'] = Description of what the spell does.
  12. ! $spellReq['spellname'] = Prerequisite Spell needed to learn this spell
  13. ! $spellOptDesc['spellname'] = name of an array of Option Descriptions for this spell
  14. ! $spellOptVal['spellname'] = name of an array of values to pass for Spell Options
  15. !
  16. ! There are also defined lists of spells grouped together
  17. ! $combatSpells = Spells that can be used in Combat
  18. ! $nonComSpells = Non-Combat Spells, ones that can be executed in any location.
  19. ! ---
  20. ! $basicSpells = basic spells that are taught by Tatiana
  21. ! $healSpells = Healing Spells
  22. ! $beautySpells = Beauty Spells
  23. ! $librarySpells = Spelsl Researchable in the Library
  24. ! $fireSpells = Fire-based spells
  25. ! $electSpells = Electricity based spells
  26. ! $earthSpells = Earth magic spells
  27. ! $airSpells = Air based spells
  28. ! $waterSpells = Water based spells
  29. !
  30. ! To create a new spell...
  31. ! 1) fill out the meta-data as listed above, this describes stats abotu the spell, cost, difficulty, desc, etc.
  32. ! 2) Typically, a spell will be in one of $combatSpells or $nonComSpells (this picks how the spell is executed
  33. ! by the user), andcalso in one other of the lists ($basicSpells, $fireSpells, etc.), which picks where you
  34. ! learn the spells.
  35. ! 3) Then create a matching section in the "spell" location for it. This function in "spell" describes what the
  36. ! spell actually does in game mechanics
  37. !teleport
  38. spellMana['teleport'] = 1000
  39. spellTime['teleport'] = 20
  40. spellDiff['teleport'] = 20
  41. $spellName['teleport'] = "Teleport"
  42. $spellDesc['teleport'] = "You can move from one Fairy Circle to another."
  43. !regenerate
  44. spellMana['regenerate'] = 500
  45. spellTime['regenerate'] = 1
  46. spellDiff['regenerate'] = 5
  47. $spellName['regenerate'] = "Regenerate"
  48. $spellDesc['regenerate'] = "Slowly regain health over time."
  49. !curedisease
  50. spellMana['curedisease'] = 10000
  51. spellTime['curedisease'] = 30
  52. spellDiff['curedisease'] = 25
  53. $spellName['curedisease'] = "Cure Disease"
  54. $spellDesc['curedisease'] = "Your body will burn itself free of any diseases you may have."
  55. !curewounds
  56. spellMana['curewounds'] = 10000
  57. spellTime['curewounds'] = 30
  58. spellDiff['curewounds'] = 25
  59. $spellName['curewounds'] = "Cure Wounds"
  60. $spellDesc['curewounds'] = "You feel your bodys wounds begin to heal."
  61. !curewounds2
  62. spellMana['curewounds2'] = 100000
  63. spellTime['curewounds2'] = 60
  64. spellDiff['curewounds2'] = 75
  65. $spellName['curewounds2'] = "Greater Cure Wounds"
  66. $spellDesc['curewounds2'] = "You feel your body heal to perfection."
  67. $spellReq['curewounds2'] = 'curewounds'
  68. !painblock
  69. spellMana['painblock'] = 1000
  70. spellTime['painblock'] = 1
  71. spellDiff['painblock'] = 8
  72. $spellName['painblock'] = "Pain Block"
  73. $spellDesc['painblock'] = "Block your pain for some time."
  74. !berserk
  75. spellMana['berserk'] = 5000
  76. spellTime['berserk'] = 1
  77. spellDiff['berserk'] = 30
  78. $spellName['berserk'] = "Berserker Rage"
  79. $spellDesc['berserk'] = "Enrage yourself with supernatural strength, speed, and endurance."
  80. !shower
  81. spellMana['shower'] = 500
  82. spellTime['shower'] = 1
  83. spellDiff['shower'] = 1
  84. $spellName['shower'] = "Shower"
  85. $spellDesc['shower'] = "Clean and refresh yourself as if you have taken a shower."
  86. !makeup
  87. spellMana['makeup'] = 100
  88. spellTime['makeup'] = 5
  89. spellDiff['makeup'] = 15
  90. $spellName['makeup'] = "Makeup"
  91. $spellDesc['makeup'] = "Apply Makeup to yourself magically."
  92. $spellOptDesc['makeup'] = '$MakeupSet'
  93. $spellOptVal['makeup'] = '$MakeupSetVal'
  94. if $routine1+$routine2+$routine3+$routine4 = '':
  95. killvar '$MakeupSet'
  96. killvar '$MakeupSetVal'
  97. $MakeupSet[0] = 'No Makeup'
  98. $MakeupSetVal[0] = '000'
  99. $MakeupSet[1] = 'Light Makeup'
  100. $makeupSetVal[1] = '110'
  101. $MakeupSet[2] = 'Vibrant Makeup'
  102. $makeupSetVal[2] = '210'
  103. $MakeupSet[3] = 'Heavy Makeup'
  104. $makeupSetVal[3] = '310'
  105. else
  106. killvar '$MakeupSet'
  107. killvar '$MakeupSetVal'
  108. $MakeupSet[0] = 'No Makeup'
  109. $MakeupSetVal[0] = '000'
  110. i=1
  111. if $routine1 ! '':
  112. $MakeupSet[i] = $routine1custname
  113. $MakeupSetVal[i] = $routine1
  114. i += 1
  115. end
  116. if $routine2 ! '':
  117. $MakeupSet[i] = $routine2custname
  118. $MakeupSetVal[i] = $routine2
  119. i += 1
  120. end
  121. if $routine3 ! '':
  122. $MakeupSet[i] = $routine3custname
  123. $MakeupSetVal[i] = $routine3
  124. i += 1
  125. end
  126. if $routine4 ! '':
  127. $MakeupSet[i] = $routine4custname
  128. $MakeupSetVal[i] = $routine4
  129. i += 1
  130. end
  131. killvar 'i'
  132. end
  133. !cosmetica
  134. spellMana['cosmetica'] = 10000
  135. spellTime['cosmetica'] = 5
  136. spellDiff['cosmetica'] = 50
  137. $spellName['cosmetica'] = "Cosmetica"
  138. $spellDesc['cosmetica'] = "Clean and tidy yourself, completely beautifying yourself; hair, makeup, grooming of all kinds."
  139. $spellReq['cosmetica'] = 'makeup'
  140. !glamour
  141. spellMana['glamour'] = 500
  142. spellTime['glamour'] = 1
  143. spellDiff['glamour'] = 30
  144. $spellName['glamour'] = "Glamour"
  145. $spellDesc['glamour'] = "Change your appearance."
  146. !bodymod
  147. spellMana['bodymod'] = 40
  148. spellTime['bodymod'] = 30
  149. spellDiff['bodymod'] = 0
  150. $spellName['bodymod'] = "Body Modification"
  151. $spellDesc['bodymod'] = "Change your appearance."
  152. !fog
  153. spellMana['fog'] = 10
  154. spellTime['fog'] = 0
  155. spellDiff['fog'] = 1
  156. $spellName['fog'] = "Fog"
  157. $spellDesc['fog'] = "Create a fog on the battlefield, obscuring the view of the enemy."
  158. !clone
  159. spellMana['clone'] = 15
  160. spellTime['clone'] = 0
  161. spellDiff['clone'] = 1
  162. $spellName['clone'] = "Create Clone"
  163. $spellDesc['clone'] = "You can create an exact clone of yourself, and slip out of sight of the enemy."
  164. !stun
  165. spellMana['stun'] = 20
  166. spellTime['stun'] = 0
  167. spellDiff['stun'] = 2
  168. $spellName['stun'] = "Stun"
  169. $spellDesc['stun'] = "Paralyze the enemy with a touch."
  170. !weapon
  171. spellMana['weapon'] = 20
  172. spellTime['weapon'] = 0
  173. spellDiff['weapon'] = 0
  174. $spellName['weapon'] = "Empower Weapon"
  175. $spellDesc['weapon'] = "Magically power a weapon causing greater damage."
  176. !wind
  177. spellMana['wind'] = 40
  178. spellTime['wind'] = 0
  179. spellDiff['wind'] = 2
  180. $spellName['wind'] = "Gust of Wind"
  181. $spellDesc['wind'] = "Summon a gust of wind that will clear away fog."
  182. !multiclone
  183. spellMana['multiclone'] = 45
  184. spellTime['multiclone'] = 0
  185. spellDiff['multiclone'] = 2
  186. $spellName['multiclone'] = "Multi-Clone"
  187. $spellDesc['multiclone'] = "Summon three clones of yourself and slip out of the enemys sight."
  188. $spellReq['multiclone'] = 'clone'
  189. !energo
  190. spellMana['energo'] = 50
  191. spellTime['energo'] = 0
  192. spellDiff['energo'] = 3
  193. $spellName['energo'] = "Energy Shield"
  194. $spellDesc['energo'] = "Create an energy shield to absorb incoming damage. You gain 100 defense."
  195. !haste
  196. spellMana['haste'] = 60
  197. spellTime['haste'] = 0
  198. spellDiff['haste'] = 3
  199. $spellName['haste'] = "Haste"
  200. $spellDesc['haste'] = "Hasten your passage through time to gain reaction speed to seize the initiative."
  201. !heal
  202. spellMana['heal'] = 400
  203. spellTime['heal'] = 0
  204. spellDiff['heal'] = 4
  205. $spellName['heal'] = "Heal"
  206. $spellDesc['heal'] = "Exchange mana for health, healing your wounds and fortifying your body."
  207. !hand
  208. spellMana['hand'] = 100
  209. spellTime['hand'] = 0
  210. spellDiff['hand'] = 0
  211. $spellName['hand'] = "Quivering Palm"
  212. $spellDesc['hand'] = "Add energy from your mana to your hand for a devistating strike."
  213. !scaldingtouch
  214. spellMana['scaldingtouch'] = 10
  215. spellTime['scaldingtouch'] = 0
  216. spellDiff['scaldingtouch'] = 6
  217. $spellName['scaldingtouch'] = "Scalding Touch"
  218. $spellDesc['scaldingtouch'] = "Flames spring from your hands."
  219. !burninghands
  220. spellMana['burninghands'] = 100
  221. spellTime['burninghands'] = 0
  222. spellDiff['burninghands'] = 7
  223. $spellName['burninghands'] = "Burning Hands"
  224. $spellDesc['burninghands'] = "A torrent of flames jets from your hands."
  225. $spellReq['burninghands'] = 'scaldingtouch'
  226. !firebarrier
  227. spellMana['firebarrier'] = 150
  228. spellTime['firebarrier'] = 0
  229. spellDiff['firebarrier'] = 8
  230. $spellName['firebarrier'] = "Fire Barrier"
  231. $spellDesc['firebarrier'] = "You are shielded by a wall of flames. Adds 750 defense."
  232. !firestorm
  233. spellMana['firestorm'] = 250
  234. spellTime['firestorm'] = 0
  235. spellDiff['firestorm'] = 9
  236. $spellName['firestorm'] = "Fire Storm"
  237. $spellDesc['firestorm'] = "Super heated embers rain down upon your enemies."
  238. !flameshield
  239. spellMana['flameshield'] = 500
  240. spellTime['flameshield'] = 0
  241. spellDiff['flameshield'] = 10
  242. $spellName['flameshield'] = "Flame Shield"
  243. $spellDesc['flameshield'] = "A Shield made of Flames interposes itself between you and your enemy, absorbing 2500 damage to defend you."
  244. !shock
  245. spellMana['shock'] = 10
  246. spellTime['shock'] = 0
  247. spellDiff['shock'] = 6
  248. $spellName['shock'] = "Electric Shock"
  249. $spellDesc['shock'] = "An electric spark shoots from your hand."
  250. !lightning
  251. spellMana['lightning'] = 100
  252. spellTime['lightning'] = 0
  253. spellDiff['lightning'] = 7
  254. $spellName['lightning'] = "Lightning"
  255. $spellDesc['lightning'] = "A lightning bolt shoots from your hand."
  256. !electricbarrier
  257. spellMana['electricbarrier'] = 150
  258. spellTime['electricbarrier'] = 0
  259. spellDiff['electricbarrier'] = 8
  260. $spellName['electricbarrier'] = "Electric Barrier"
  261. $spellDesc['electricbarrier'] = "A static electric field blocks incoming attacks from reaching you."
  262. !1000birds
  263. spellMana['1000birds'] = 250
  264. spellTime['1000birds'] = 0
  265. spellDiff['1000birds'] = 9
  266. $spellName['1000birds'] = "Dance of a Thousand Birds"
  267. $spellDesc['1000birds'] = "The air is filled with small lightning bolts leaping through the air with shrieks."
  268. $spellReq['1000birds'] = 'lightning'
  269. !dancingsphere
  270. spellMana['dancingsphere'] = 500
  271. spellTime['dancingsphere'] = 0
  272. spellDiff['dancingsphere'] = 10
  273. $spellName['dancingsphere'] = "Dancing Sphere"
  274. $spellDesc['dancingsphere'] = "Lightning dances around you blocking attacks coming toward you."
  275. !quicksand
  276. spellMana['quicksand'] = 10
  277. spellTime['quicksand'] = 0
  278. spellDiff['quicksand'] = 6
  279. $spellName['quicksand'] = "Quicksand"
  280. $spellDesc['quicksand'] = "Opponent is caught in a quicksand trap."
  281. !earthshield
  282. spellMana['earthshield'] = 100
  283. spellTime['earthshield'] = 0
  284. spellDiff['earthshield'] = 7
  285. $spellName['earthshield'] = "Earth Shield"
  286. $spellDesc['earthshield'] = "Tendrils of earth reach up to defend you. Some of the damage it absorbs is captured as mana and given to you."
  287. !abyss
  288. spellMana['abyss'] = 150
  289. spellTime['abyss'] = 0
  290. spellDiff['abyss'] = 8
  291. $spellName['abyss'] = "Abyss"
  292. $spellDesc['abyss'] = "The Earth opens up beneath your opponents feet, slamming shut damaging him and depriving him of the ability to move."
  293. !earthguardian
  294. spellMana['earthguardian'] = 250
  295. spellTime['earthguardian'] = 0
  296. spellDiff['earthguardian'] = 9
  297. $spellName['earthguardian'] = "Earth Guardian"
  298. $spellDesc['earthguardian'] = "The Earth itself comes alive defending you from attacks. It draws from the power of the land to regenerate itself every round."
  299. !sando
  300. spellMana['sando'] = 500
  301. spellTime['sando'] = 0
  302. spellDiff['sando'] = 10
  303. $spellName['sando'] = "Sando"
  304. $spellDesc['sando'] = "Two huge plates of earth colapse together crushing the enemy and depriving him of the ability to move."
  305. !windgust
  306. spellMana['windgust'] = 10
  307. spellTime['windgust'] = 0
  308. spellDiff['windgust'] = 6
  309. $spellName['windgust'] = "Wind Gust"
  310. $spellDesc['windgust'] = "a huge gust of wind rips past you killing clones and removing fog."
  311. !pressure
  312. spellMana['pressure'] = 100
  313. spellTime['pressure'] = 0
  314. spellDiff['pressure'] = 7
  315. $spellName['pressure'] = "Horrific Pressure"
  316. $spellDesc['pressure'] = "Enormous air pressure surrounds your enemy causing damage as well as killing clones and removing fog."
  317. !vacuum
  318. spellMana['vacuum'] = 150
  319. spellTime['vacuum'] = 0
  320. spellDiff['vacuum'] = 8
  321. $spellName['vacuum'] = "Vacuum Sphere"
  322. $spellDesc['vacuum'] = "A turbulent sphere of vacuum surrounds you blocking incoming attacks."
  323. !vacuumshells
  324. spellMana['vacuumshells'] = 250
  325. spellTime['vacuumshells'] = 0
  326. spellDiff['vacuumshells'] = 9
  327. $spellName['vacuumshells'] = "Vacuum Shells"
  328. $spellDesc['vacuumshells'] = "Turbulent spheres of vacuum bombard your enemy destroying clones and removing fog."
  329. !devouringvacuum
  330. spellMana['devouringvacuum'] = 500
  331. spellTime['devouringvacuum'] = 0
  332. spellDiff['devouringvacuum'] = 10
  333. $spellName['devouringvacuum'] = "Devouring Vacuum"
  334. $spellDesc['devouringvacuum'] = "A devouring vacuum sucks away your enemys defensive shields."
  335. !leechmana
  336. spellMana['leechmana'] = 10
  337. spellTime['leechmana'] = 0
  338. spellDiff['leechmana'] = 6
  339. $spellName['leechmana'] = "Leech Mana"
  340. $spellDesc['leechmana'] = "Inflict 100 damage and absorb 100 mana from your foe."
  341. !flood
  342. spellMana['flood'] = 100
  343. spellTime['flood'] = 0
  344. spellDiff['flood'] = 7
  345. $spellName['flood'] = "Flood"
  346. $spellDesc['flood'] = "Inflict 1000 damage and absorb 500 mana from your foe."
  347. !blister
  348. spellMana['blister'] = 150
  349. spellTime['blister'] = 0
  350. spellDiff['blister'] = 8
  351. $spellName['blister'] = "Blister"
  352. $spellDesc['blister'] = "Create a protective sphere of water. Some of the damage absorbed is converted into mana for you."
  353. !sharkrockets
  354. spellMana['sharkrockets'] = 250
  355. spellTime['sharkrockets'] = 0
  356. spellDiff['sharkrockets'] = 9
  357. $spellName['sharkrockets'] = "Shark Rockets"
  358. $spellDesc['sharkrockets'] = "Blobs of Water shaped like sharks fly towards your enemy stiking them for 1500 damage and abosorbing 2500 mana for you. Clones are destroyed"
  359. !greatflood
  360. spellMana['greatflood'] = 500
  361. spellTime['greatflood'] = 0
  362. spellDiff['greatflood'] = 10
  363. $spellName['greatflood'] = "Great Flood"
  364. $spellDesc['greatflood'] = "A huge flood of water fills the area absorbing mana from the enemy and giving you additional protection."
  365. ! List Combat Spells for use in fight scenerios
  366. $combatSpells[0] = 'fog'
  367. $combatSpells[1] = 'clone'
  368. $combatSpells[2] = 'stun'
  369. $combatSpells[3] = 'weapon'
  370. $combatSpells[4] = 'wind'
  371. $combatSpells[5] = 'multiclone'
  372. $combatSpells[6] = 'energo'
  373. $combatSpells[7] = 'haste'
  374. $combatSpells[8] = 'heal'
  375. $combatSpells[9] = 'hand'
  376. $combatSpells[10] = 'scaldingtouch'
  377. $combatSpells[11] = 'burninghands'
  378. $combatSpells[12] = 'firebarrier'
  379. $combatSpells[13] = 'firestorm'
  380. $combatSpells[14] = 'flameshield'
  381. $combatSpells[15] = 'shock'
  382. $combatSpells[16] = 'lightning'
  383. $combatSpells[17] = 'electricbarrier'
  384. $combatSpells[18] = '1000birds'
  385. $combatSpells[19] = 'dancingsphere'
  386. $combatSpells[20] = 'quicksand'
  387. $combatSpells[21] = 'earthshield'
  388. $combatSpells[22] = 'abyss'
  389. $combatSpells[23] = 'earthguardian'
  390. $combatSpells[24] = 'sando'
  391. $combatSpells[25] = 'windgust'
  392. $combatSpells[26] = 'pressure'
  393. $combatSpells[27] = 'vacuum'
  394. $combatSpells[28] = 'vacuumshells'
  395. $combatSpells[29] = 'devouringvacuum'
  396. $combatSpells[30] = 'leechmana'
  397. $combatSpells[31] = 'flood'
  398. $combatSpells[32] = 'blister'
  399. $combatSpells[33] = 'sharkrockets'
  400. $combatSpells[34] = 'greatflood'
  401. ! List of Non-Combat Spells for use in Menu
  402. $nonComSpells[0] = 'heal'
  403. $nonComSpells[1] = 'regenerate'
  404. $nonComSpells[2] = 'curedisease'
  405. $nonComSpells[3] = 'curewounds'
  406. $nonComSpells[4] = 'curewounds2'
  407. $nonComSpells[5] = 'painblock'
  408. $nonComSpells[6] = 'berserk'
  409. $nonComSpells[7] = 'shower'
  410. $nonComSpells[8] = 'makeup'
  411. $nonComSpells[9] = 'cosmetica'
  412. ! Basic Spells
  413. $basicSpells[0] = 'fog'
  414. $basicSpells[1] = 'clone'
  415. $basicSpells[2] = 'stun'
  416. $basicSpells[3] = 'wind'
  417. $basicSpells[4] = 'multiclone'
  418. $basicSpells[5] = 'energo'
  419. $basicSpells[6] = 'haste'
  420. $basicSpells[7] = 'berserk'
  421. !Healing Spells
  422. $healSpells[0] = 'painblock'
  423. $healSpells[1] = 'curewounds'
  424. $healSpells[2] = 'curewounds2'
  425. $healSpells[3] = 'curedisease'
  426. $healSpells[4] = 'heal'
  427. $healSpells[5] = 'regenerate'
  428. ! Beauty Spells
  429. $beautySpells[0] = 'shower'
  430. $beautySpells[1] = 'makeup'
  431. $beautySpells[2] = 'cosmetica'
  432. ! Researchable Spells
  433. $librarySpells[0] = 'painblock'
  434. $librarySpells[1] = 'shower'
  435. $librarySpells[2] = 'makeup'
  436. $librarySpells[3] = 'cosmetica'
  437. ! Elemental Spell Groups
  438. $fireSpells[0] = 'scaldingtouch'
  439. $fireSpells[1] = 'burninghands'
  440. $fireSpells[2] = 'firebarrier'
  441. $fireSpells[3] = 'firestorm'
  442. $fireSpells[4] = 'flameshield'
  443. $electSpells[0] = 'shock'
  444. $electSpells[1] = 'lightning'
  445. $electSpells[2] = 'electricbarrier'
  446. $electSpells[3] = '1000birds'
  447. $electSpells[4] = 'dancingsphere'
  448. $earthSpells[0] = 'quicksand'
  449. $earthSpells[1] = 'earthshield'
  450. $earthSpells[2] = 'abyss'
  451. $earthSpells[3] = 'earthguardian'
  452. $earthSpells[4] = 'sando'
  453. $airSpells[0] = 'windgust'
  454. $airSpells[1] = 'pressure'
  455. $airSpells[2] = 'vacuum'
  456. $airSpells[3] = 'vacuumshells'
  457. $airSpells[4] = 'devouringvacuum'
  458. $waterSpells[0] = 'leechmana'
  459. $waterSpells[1] = 'flood'
  460. $waterSpells[2] = 'blister'
  461. $waterSpells[3] = 'sharkrockets'
  462. $waterSpells[4] = 'greatflood'
  463. if $ARGS[0] = 'teacherActions':
  464. ! Make Actions for learning spells
  465. ! $ARGS[1] = the name of the array of spells
  466. ! $ARGS[2] = Exit Location
  467. ! $ARGS[3] = Arg for exit location
  468. ! Example:
  469. ! gs 'spellList', 'teacherActions', '$fireSpells', 'kakuzu', 'mansion1'
  470. $ThisArrayName = $ARGS[1]
  471. $ExitLocation = $ARGS[2]
  472. $ExitLocation2 = $ARGS[3]
  473. ThisArraySize = dyneval("result=arrsize('<<$ThisArrayName>>')")
  474. i = 0
  475. :LearnSpellLoop
  476. $ThisSpellName = dyneval("$result = <<$ThisArrayName>>[<<i>>]")
  477. spellDifficulty = $spellDiff[$ThisSpellName]
  478. if spellDifficulty = 0: spellDifficulty = 1
  479. if i < ThisArraySize:
  480. if pcs_magik >= spellDifficulty and spellKnown[$ThisSpellName] = 0 and ($spellReq[$ThisSpellName] = '' or spellKnown[$spellReq[$ThisSpellName]]):
  481. dynamic "act 'Learn <<$spellName[$ThisSpellName]>> (1:00)':
  482. cla
  483. if pcs_mana >= 1000:
  484. pcs_mana -= 1000
  485. minut += 60
  486. spellLearn['<<$ThisSpellName>>'] += rand(1, 100/<<spellDifficulty>>)
  487. if spellLearn['<<$ThisSpellName>>'] < 100:
  488. 'You diligently study the spell for an hour, but could not grasp it.'
  489. else
  490. spellKnown['<<$ThisSpellName>>'] = 1
  491. 'Finally you are able to grasp and learn the spell.'
  492. *nl
  493. '<<$spellName[$ThisSpellName]>>: <<$spellDesc[$ThisSpellName]>>'
  494. end
  495. else
  496. *pl ""You don't have enough mana to learn this spell.""
  497. end
  498. act 'Move away':gt '<<$ExitLocation>>', '<<$ExitLocation2>>'
  499. end"
  500. end
  501. i += 1
  502. jump 'LearnSpellLoop'
  503. end
  504. killvar 'i'
  505. killvar '$ThisSpellName'
  506. killvar 'ThisArraySize'
  507. killvar '$ThisArrayName'
  508. killvar '$ExitLocation'
  509. killvar '$ExitLocation2'
  510. killvar 'spellDifficulty'
  511. end
  512. --- spellList ---------------------------------