spell.qsrc 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  1. # spell
  2. ! This Location contains the meat of what each spell does to the PC, NPCs, and the environment. Mana costs are handled elsewhere.
  3. ! This location should not be called directly. Should only be called through the "castSpell" location.
  4. ! $ARGS[0] = the name of the spell being cast
  5. ! $ARGS[1] = Spell Success value
  6. ! 2 = Critical Success -> You can make something extra specail happen
  7. ! 1 = Success -> Normal spell effects
  8. ! 0 = Failure -> Spell doesn''t work, probably just fizzles out
  9. ! -1 = Critical Failure -> Spell backfires. Something bad (not terrible) should happen
  10. ! $ARGS[n >= 2] = Any extra parameters needed by the spell
  11. SuccessValue = $ARGS[1]
  12. if $ARGS[0] = 'teleport':
  13. ! Do the stuff of a Teleport
  14. ! ARGS[1] = Success/Failure level
  15. ! ARGS[2] = the Target Location
  16. $NewLocation = $ARGS[2]
  17. :RandLocLoop
  18. $randomLoc = $tpLocations[rand(0,arrsize($tpLocations) - 1)]
  19. if $randomLoc = $NewLocation or $randomLoc = $EntryPoint:
  20. jump 'RandLocLoop'
  21. end
  22. if SuccessValue > 0:
  23. *nl
  24. "The blur you see just outside the ring seems to shift."
  25. wait 1000
  26. if $treeCircArg[$NewLocation] = "":
  27. gt $treeCircLoc[$NewLocation]
  28. else
  29. gt $treeCircLoc[$NewLocation], $treeCircArg[$NewLocation]
  30. end
  31. elseif SuccessValue < 0:
  32. *nl
  33. "The blur you see just outside the ring seems to shift. Something did not go right!"
  34. wait 1000
  35. if $treeCircArg[$randomLoc] = "":
  36. gt $treeCircLoc[$randomLoc]
  37. else
  38. gt $treeCircLoc[$randomLoc], $treeCircArg[$randomLoc]
  39. end
  40. else
  41. 'You feel drained, but the energy fizzles out and nothing happens'
  42. end
  43. killvar '$randomLoc'
  44. killvar '$NewLocation'
  45. result = ""
  46. end
  47. if $ARGS[0] = 'regenerate':
  48. if SuccessValue > 0:
  49. ! How much health is gained per minute
  50. regenVal = 5 * SuccessValue
  51. ! Immediate health gain
  52. pcs_health += regenVal
  53. ! If Regenerate is already running, we only extend.
  54. regenArrIdx = arrpos('$spellTimeName','regenerate')
  55. if regenArrIdx > -1:
  56. ! if it''s found, then update only
  57. spellComplete[regenArrIdx] = totminut + 120
  58. $spellCompExec[regenArrIdx] = 'pcs_health += (5 * <<regenVal>>)'
  59. $spellTickExec[regenArrIdx] = 'pcs_health += <<regenVal>>'
  60. else
  61. ! Add Timer:
  62. ! spellName = 'regenerate'
  63. ! duration = 120
  64. ! CompCode = 'pcs_health += (5 * <<regenVal>>)'
  65. ! TickCode = 'pcs_health += <<regenVal>>'
  66. gs 'spellTimer', 'add', 'regenerate', 120, 'pcs_health += (5 * <<regenVal>>)', 'pcs_health += <<regenVal>>'
  67. end
  68. '<b><font color = green>Your body surges with life. You feel better already.</font></b>'
  69. killvar 'regenVal'
  70. else
  71. '<b>The spell fizzles. Nothing seems to happen.</b>'
  72. end
  73. end
  74. if $ARGS[0] = 'painblock':
  75. if SuccessValue > 0:
  76. pain['killer'] += 1
  77. '<b><font color = green>Your pain recedes into a dull throb.</font></b>'
  78. else
  79. '<b>The spell fizzles. Nothing seems to happen.</b>'
  80. end
  81. end
  82. if $ARGS[0] = 'reset':
  83. cla
  84. !Create mist
  85. 'Accumulated mana <<manaReset>> units.'
  86. act 'Absorb accumulated mana':
  87. cla
  88. *clr
  89. pcs_mana = pcs_mana + manaReset
  90. manaReset = 0
  91. xgt'fight','sta'
  92. end
  93. act 'Physical attacks':gt'boxing'
  94. if pcs_magik > 0:
  95. act 'Magic attacks':gt'magik'
  96. end
  97. end
  98. if $ARGS[0] = 'unmat':
  99. cla
  100. !Create mist
  101. 'You can become incorporeal at 30 moves, in exchange for 3000 Forces units Rikudo. This part of the power will be lost to you forever when you cast.'
  102. 'Do not allow to pass through the materiality of the body is not getting any impact damage, while slightly reduced longevity spells.'
  103. if rikudo >= 3000:
  104. act 'Become a disembodied':
  105. cla
  106. *clr
  107. unmaterial = 31
  108. rikudo = rikudo + 3000
  109. manaReset = 0
  110. xgt'fight','sta'
  111. end
  112. elseif rikudo < 3000:
  113. 'You have too little power Rikudo for this spell.'
  114. end
  115. act 'Physical attacks':gt'boxing'
  116. if pcs_magik > 0:
  117. act 'Magic attacks':gt'magik'
  118. end
  119. end
  120. if $ARGS[0] = 'fog':
  121. ! tuman = the amount of fog around you making you harder to hit
  122. ! tumanV = the amount of fog around your opponent making him harder to hit
  123. if tumanV > 0:
  124. 'It is not possible to call your fog when an existing opponent is already fogged.'
  125. else
  126. if SuccessValue > 0:
  127. tuman += (10 * SuccessValue)
  128. '<b><font color = green>A Fog materializes around, obscuring you from your enemies.</font></b>'
  129. elseif SuccessValue < 0:
  130. tumanV += 10
  131. '<b><font color = red>The spell backfires! A Fog materializes around your enemy, obscuring him from your view.</font></b>'
  132. else
  133. '<b>The spell fizzles. Nothing seems to happen.</b>'
  134. end
  135. end
  136. end
  137. if $ARGS[0] = 'clone':
  138. ! klon = the number of clones that the enemy must destroy before hitting you
  139. if SuccessValue > 0:
  140. klon += SuccessValue
  141. '<b><font color = green><<SuccessValue>> clone<<iif(SuccessValue>1,"s","")>> of you springs from you confusing the enemy.</font></b>'
  142. elseif SuccessValue < 0 and klon > 0:
  143. klon -= 1
  144. '<b><font color = red>The spell backfires! One of your clones disappears.</font></b>'
  145. else
  146. '<b>The spell fizzles. Nothing seems to happen.</b>'
  147. end
  148. end
  149. if $ARGS[0] = 'stun':
  150. ! stunner = 1 stuns the enemy for 3-6 rounds
  151. if SuccessValue > 0:
  152. stunner = 1
  153. '<b><font color = green>Your enemy is stunned.</font></b>'
  154. else
  155. '<b>The spell fizzles. Nothing seems to happen.</b>'
  156. end
  157. xgt'atak','player'
  158. end
  159. if $ARGS[0] = 'weapon':
  160. if SuccessValue > 0:
  161. magweapbonus = weapbonus * 4 * SuccessValue
  162. '<b><font color = green>Your Weapon now feels more powerful.</font></b>'
  163. elseif SuccessValue < 0:
  164. magweapbonus = weapbonus * -1
  165. '<b><font color = red>The spell backfires! Your weapon seems weaker.</font></b>'
  166. else
  167. '<b>The spell fizzles. Nothing seems to happen.</b>'
  168. end
  169. xgt'atak','player'
  170. end
  171. if $ARGS[0] = 'wind':
  172. ! tuman = the amount of fog around you making you harder to hit
  173. ! tumanV = the amount of fog around your opponent making him harder to hit
  174. if SuccessValue = 2:
  175. tumanV = 0
  176. '<b><font color = green>A wind blows through the area eliminating your enemys fog from the battlefield.</font></b>'
  177. elseif SuccessValue = 1:
  178. tumanV = 0
  179. tuman = 0
  180. '<b><font color = green>A wind blows through the area eliminating all fog on the battlefield.</font></b>'
  181. elseif SuccessValue = -1:
  182. tuman = 0
  183. '<b><font color = red>A wind blows through the area eliminating your fog from the battlefield.</font></b>'
  184. else
  185. '<b>The spell fizzles. Nothing seems to happen.</b>'
  186. end
  187. end
  188. if $ARGS[0] = 'multiclone':
  189. ! klon = the number of clones that the enemy must destroy before hitting you
  190. if SuccessValue > 0:
  191. klon += SuccessValue * 3
  192. '<b><font color = green><<SuccessValue * 3>> clone<<iif(SuccessValue>1,"s","")>> of you springs from you confusing the enemy.</font></b>'
  193. elseif SuccessValue < 0 and klon > 0:
  194. if klon < 3:
  195. klon = 0
  196. else
  197. klon -= 3
  198. end
  199. '<b><font color = red>The spell backfires! Some of your clones disappear.</font></b>'
  200. else
  201. '<b>The spell fizzles. Nothing seems to happen.</b>'
  202. end
  203. end
  204. if $ARGS[0] = 'energo':
  205. ! defence = absorbs damage before health begins to be removed
  206. if SuccessValue > 0:
  207. defence += (100 * SuccessValue)
  208. '<b><font color = green>An energy shield materializes around you, protecting you from your enemies.</font></b>'
  209. elseif SuccessValue < 0:
  210. defenceV += 100
  211. '<b><font color = red>The spell backfires! An energy shield materializes around your enemy, protecting him from you.</font></b>'
  212. else
  213. '<b>The spell fizzles. Nothing seems to happen.</b>'
  214. end
  215. end
  216. if $ARGS[0] = 'haste':
  217. if SuccessValue > 0:
  218. initBonus += (120 * SuccessValue)
  219. '<b><font color = green>Your mind and body seem to race though a sluggish world.</font></b>'
  220. elseif SuccessValue < 0:
  221. initBonusV += 120
  222. '<b><font color = red>The spell backfires! Your enemy seems to move faster.</font></b>'
  223. else
  224. '<b>The spell fizzles. Nothing seems to happen.</b>'
  225. end
  226. end
  227. if $ARGS[0] = 'heal':
  228. if SuccessValue > 0:
  229. pcs_health += (400 * SuccessValue)
  230. '<b><font color = green>Your body surges with life. You feel much stronger.</font></b>'
  231. else
  232. '<b>The spell fizzles. Nothing seems to happen.</b>'
  233. end
  234. end
  235. if $ARGS[0] = 'hand':
  236. if SuccessValue > 0:
  237. strenK = pcs_stren*20*SuccessValue/100
  238. magweapbonus = RAND(pcs_stren*10 - strenK,pcs_stren*10 + strenK)
  239. '<b><font color = green>Your hands now feel more powerful.</font></b>'
  240. elseif SuccessValue < 0:
  241. strenK = pcs_stren*20/100
  242. magweapbonus = 0 - RAND(pcs_stren*10 - strenK,pcs_stren*10 + strenK)
  243. '<b><font color = red>The spell backfires! Your hands seem weaker.</font></b>'
  244. else
  245. '<b>The spell fizzles. Nothing seems to happen.</b>'
  246. end
  247. xgt'atak','player'
  248. end
  249. if $ARGS[0] = 'scaldingtouch':
  250. if SuccessValue > 0:
  251. damTip = 250 * SuccessValue
  252. '<b><font color = green>Flames spring from your hands.</font></b>'
  253. else
  254. '<b>The spell fizzles. Nothing seems to happen.</b>'
  255. end
  256. xgt'atakA','atak'
  257. end
  258. if $ARGS[0] = 'burninghands':
  259. if SuccessValue > 0:
  260. damTip = 2500 * SuccessValue
  261. '<b><font color = green>A torrent of flames jets from your hands.</font></b>'
  262. else
  263. '<b>The spell fizzles. Nothing seems to happen.</b>'
  264. end
  265. xgt'atakA','atak'
  266. end
  267. if $ARGS[0] = 'firebarrier':
  268. if SuccessValue > 0:
  269. defence += (750 * SuccessValue)
  270. '<b><font color = green>A flaming barrier has sprung up between you and your opponent. You now have <<defence>> protection units.</font></b>'
  271. elseif SuccessValue < 0:
  272. defenceV += 750
  273. '<b><font color = red>The spell backfires! A flaming barrier has sprung up between you and your opponent. Your enemy now has <<defence>> protection units.</font></b>'
  274. else
  275. '<b>The spell fizzles. Nothing seems to happen.</b>'
  276. end
  277. end
  278. if $ARGS[0] = 'firestorm':
  279. if SuccessValue > 0:
  280. damTip = 4250 + (2000 * SuccessValue)
  281. bonusSh = 100
  282. '<b><font color = green>Uncountable glowing embers steak down upon your foes.</font></b>'
  283. elseif SuccessValue < 0:
  284. damTip = 2000
  285. pcs_health -= 200
  286. bonusSh = 100
  287. '<b><font color = red>The spell backfires! Uncountable glowing embers steak down upon the battlefield burning everyone.</font></b>'
  288. else
  289. '<b>The spell fizzles. Nothing seems to happen.</b>'
  290. end
  291. xgt'atakA','atak'
  292. end
  293. if $ARGS[0] = 'flameshield':
  294. if SuccessValue > 0:
  295. defence += (2500 * SuccessValue)
  296. '<b><font color = green>A Shield made of Flames interposes itself between you and your enemy. You now have <<defence>> protection units.</font></b>'
  297. elseif SuccessValue < 0:
  298. defenceV += 2500
  299. '<b><font color = red>The spell backfires! A Shield made of Flames interposes itself between you and your enemy. Your enemy now has <<defence>> protection units.</font></b>'
  300. else
  301. '<b>The spell fizzles. Nothing seems to happen.</b>'
  302. end
  303. end
  304. if $ARGS[0] = 'shock':
  305. if SuccessValue > 0:
  306. damTip = (150 * SuccessValue)
  307. eleSh = 1
  308. '<b><font color = green>You build a static electric charge in your hand and zap your opponent.</font></b>'
  309. elseif SuccessValue < 0:
  310. pcs_health -= 50
  311. '<b><font color = red>The spell backfires! You manage to zap yourself with a static charge.</font></b>'
  312. else
  313. '<b>The spell fizzles. Nothing seems to happen.</b>'
  314. end
  315. xgt'atakA','atak'
  316. end
  317. if $ARGS[0] = 'lightning':
  318. if SuccessValue > 0:
  319. damTip = (1500 * SuccessValue)
  320. eleSh = 1
  321. '<b><font color = green>You shoot a lightning bolt from your hand zapping your opponent.</font></b>'
  322. elseif SuccessValue < 0:
  323. pcs_health -= 300
  324. '<b><font color = red>The spell backfires! You manage to zap yourself with lightning.</font></b>'
  325. else
  326. '<b>The spell fizzles. Nothing seems to happen.</b>'
  327. end
  328. xgt'atakA','atak'
  329. end
  330. if $ARGS[0] = 'electricbarrier':
  331. if SuccessValue > 0:
  332. defence += (1500 * SuccessValue)
  333. '<b><font color = green>A wall of dancing lightning springs up around yourself. You now have <<defence>> protection units.</font></b>'
  334. elseif SuccessValue < 0:
  335. defenceV += 1500
  336. '<b><font color = red>The spell backfires! A wall of dancing lightning springs up around your enemy. Your enemy now has <<defence>> protection units.</font></b>'
  337. else
  338. '<b>The spell fizzles. Nothing seems to happen.</b>'
  339. end
  340. end
  341. if $ARGS[0] = '1000birds':
  342. if SuccessValue > 0:
  343. damTip = 2750 + (1000 * SuccessValue)
  344. bonusSh = 30
  345. eleSh = 1
  346. '<b><font color = green>You shoot hundreds of small lightning bolts toward your enemy.</font></b>'
  347. elseif SuccessValue < 0:
  348. damTip = 2000
  349. pcs_health -= 200
  350. bonusSh = 30
  351. eleSh = 1
  352. '<b><font color = red>The spell backfires! Hundreds of small lightning bolts curl toward the battlefield shocking everyone.</font></b>'
  353. else
  354. '<b>The spell fizzles. Nothing seems to happen.</b>'
  355. end
  356. end
  357. if $ARGS[0] = 'dancingsphere':
  358. if SuccessValue > 0:
  359. defence += (5000 * SuccessValue)
  360. '<b><font color = green>A large field of lightning dances around you blocking attacks. You now have <<defence>> protection units.</font></b>'
  361. elseif SuccessValue < 0:
  362. defenceV += 5000
  363. '<b><font color = red>The spell backfires! A large field of lightning dances around you blocking attacks. Your enemy now has <<defence>> protection units.</font></b>'
  364. else
  365. '<b>The spell fizzles. Nothing seems to happen.</b>'
  366. end
  367. end
  368. if $ARGS[0] = 'quicksand':
  369. if SuccessValue > 0:
  370. damTip = 100 * SuccessValue
  371. eleSh = 5
  372. '<b><font color = green>You have trapped your opponent in quicksand.</font></b>'
  373. elseif SuccessValue < 0:
  374. damTip = 100
  375. pcs_health -= 50
  376. eleSh = 5
  377. '<b><font color = red>The spell backfires! You are both trapped in quicksand.</font></b>'
  378. else
  379. '<b>The spell fizzles. Nothing seems to happen.</b>'
  380. end
  381. xgt'atakA','atak'
  382. end
  383. if $ARGS[0] = 'earthshield':
  384. if SuccessValue > 0:
  385. defence += 1500 + (1000 * SuccessValue)
  386. defenceM += 2500
  387. defenceActPar = 1000
  388. defenceActParM = 1000
  389. defenceAct = 10
  390. defenceActM = 10
  391. '<b><font color = green>Tendrils of Earth rise to defend you. You now have <<defence>> protection units.</font></b>'
  392. elseif SuccessValue < 0:
  393. defenceV += 2500
  394. '<b><font color = red>The spell backfires! Tendrils of Earth rise to defend your enemy. Your enemy now has <<defence>> protection units.</font></b>'
  395. else
  396. '<b>The spell fizzles. Nothing seems to happen.</b>'
  397. end
  398. end
  399. if $ARGS[0] = 'abyss':
  400. if SuccessValue > 0:
  401. damTip = 1500 * SuccessValue
  402. eleSh = 5
  403. '<b><font color = green>The Earth opens up beneath your opponents feet, slamming shut damaging him and depriving him of the ability to move.</font></b>'
  404. elseif SuccessValue < 0:
  405. damTip = 1500
  406. pcs_health -= 200
  407. eleSh = 5
  408. '<b><font color = red>The spell backfires! The Earth opens up beneath your opponents feet, slamming shut damaging him and depriving him of the ability to move. You are also caught.</font></b>'
  409. else
  410. '<b>The spell fizzles. Nothing seems to happen.</b>'
  411. end
  412. xgt'atakA','atak'
  413. end
  414. if $ARGS[0] = 'earthguardian':
  415. if SuccessValue > 0:
  416. defence += 5200 + (2000 * SuccessValue)
  417. defenceM += 6250
  418. defenceW += 6250
  419. defenceActPar = 1000
  420. defenceActParM = 1000
  421. defenceActParW = 1000
  422. defenceAct = 15
  423. defenceActM = 15
  424. defenceActW = 15
  425. defAtk = 15
  426. '<b><font color = green>The Earth itself comes alive defending you from attacks. It draws from the power of the land to regenerate itself every round. You now have <<defence>> protection units.</font></b>'
  427. elseif SuccessValue < 0:
  428. defenceV += 2500
  429. '<b><font color = red>The spell backfires! Tendrils of Earth rise to defend your enemy. Your enemy now has <<defence>> protection units.</font></b>'
  430. else
  431. '<b>The spell fizzles. Nothing seems to happen.</b>'
  432. end
  433. end
  434. if $ARGS[0] = 'sando':
  435. if SuccessValue > 0:
  436. damTip = 3000 + (2000 * SuccessValue)
  437. bonusSh = 50
  438. eleSh = 5
  439. '<b><font color = green>Two huge plates of earth colapse together crushing the enemy and depriving him of the ability to move.</font></b>'
  440. elseif SuccessValue < 0:
  441. pcs_health -= 200
  442. '<b><font color = red>The spell backfires! Two huge plates of earth colapse together with crushing force, but the enemy is missed and you are instead caught.</font></b>'
  443. else
  444. '<b>The spell fizzles. Nothing seems to happen.</b>'
  445. end
  446. xgt'atakA','atak'
  447. end
  448. if $ARGS[0] = 'windgust':
  449. if SuccessValue > 0:
  450. damTip = 100 * SuccessValue
  451. bonusSh = 50
  452. '<b><font color = green>You have created a gust of wind.</font></b>'
  453. if klonV > 0:klonV = 0 & '<b><font color = green>Enemy clones are vaporized.</font></b>'
  454. if tumanV > 0:tumanV = 0 & '<b><font color = green>Enemy Fog is torn to shreds by the wind.</font></b>'
  455. elseif SuccessValue < 0:
  456. pcs_health -= 50
  457. '<b><font color = red>The spell backfires! You have created a gust of wind, but the enemy is missed and you are instead caught.</font></b>'
  458. if klon > 0:klon = 0 & '<b><font color = green>Your clones are vaporized.</font></b>'
  459. if tuman > 0:tuman = 0 & '<b><font color = green>Your Fog is torn to shreds by the wind.</font></b>'
  460. else
  461. '<b>The spell fizzles. Nothing seems to happen.</b>'
  462. end
  463. xgt'atakA','atak'
  464. end
  465. if $ARGS[0] = 'pressure':
  466. if SuccessValue > 0:
  467. damTip = 1000 * SuccessValue
  468. bonusSh = 100
  469. '<b><font color = green>You dramatically raised the air pressure.</font></b>'
  470. if klonV > 0:klonV = 0 & '<b><font color = green>Enemy clones are vaporized.</font></b>'
  471. if tumanV > 0:tumanV = 0 & '<b><font color = green>Enemy Fog is torn to shreds by the wind.</font></b>'
  472. elseif SuccessValue < 0:
  473. pcs_health -= 200
  474. '<b><font color = red>The spell backfires! You dramatically raised the air pressure, but the enemy is missed and you are instead caught.</font></b>'
  475. if klon > 0:klon = 0 & '<b><font color = green>Your clones are vaporized.</font></b>'
  476. if tuman > 0:tuman = 0 & '<b><font color = green>Your Fog is torn to shreds by the wind.</font></b>'
  477. else
  478. '<b>The spell fizzles. Nothing seems to happen.</b>'
  479. end
  480. xgt'atakA','atak'
  481. end
  482. if $ARGS[0] = 'vacuum':
  483. if SuccessValue > 0:
  484. defence += (1500 * SuccessValue)
  485. '<b><font color = green>A turbulent sphere of vacuum surrounds you blocking incoming attacks. You now have <<defence>> protection units.</font></b>'
  486. elseif SuccessValue < 0:
  487. defenceV += 1500
  488. '<b><font color = red>The spell backfires! A turbulent sphere of vacuum surrounds your enemy blocking your attacks. Your enemy now has <<defence>> protection units.</font></b>'
  489. else
  490. '<b>The spell fizzles. Nothing seems to happen.</b>'
  491. end
  492. end
  493. if $ARGS[0] = 'vacuumshells':
  494. if SuccessValue > 0:
  495. damTip = 2500 * SuccessValue
  496. bonusSh = 100
  497. '<b><font color = green>Turbulent spheres of vacuum bombard your enemy. The air is full of whistling sounds as the spheres fly by at high speeds over the battlefield.</font></b>'
  498. if klonV > 0:klonV = 0 & '<b><font color = green>Enemy clones are vaporized.</font></b>'
  499. if tumanV > 0:tumanV = 0 & '<b><font color = green>Enemy Fog is torn to shreds by the wind.</font></b>'
  500. elseif SuccessValue < 0:
  501. pcs_health -= 200
  502. '<b><font color = red>The spell backfires! Turbulent spheres of vacuum bombard your enemy. The air is full of whistling sounds as the spheres fly by at high speeds over the battlefield, but the enemy is missed and you are instead caught.</font></b>'
  503. if klon > 0:klon = 0 & '<b><font color = green>Your clones are vaporized.</font></b>'
  504. if tuman > 0:tuman = 0 & '<b><font color = green>Your Fog is torn to shreds by the wind.</font></b>'
  505. else
  506. '<b>The spell fizzles. Nothing seems to happen.</b>'
  507. end
  508. xgt'atakA','atak'
  509. end
  510. if $ARGS[0] = 'devouringvacuum':
  511. if SuccessValue > 0:
  512. defenceV = 0
  513. defenceMV = 0
  514. defenceWV = 0
  515. defenceActParV = 0
  516. defenceActParMV = 0
  517. defenceActV = 0
  518. defenceActMV = 0
  519. defAtkMV = 0
  520. '<b><font color = green>A devouring vacuum sucks away your enemys defenses.</font></b>'
  521. elseif SuccessValue < 0:
  522. defence = 0
  523. defenceM = 0
  524. defenceW = 0
  525. defenceActPar = 0
  526. defenceActParM = 0
  527. defenceAct = 0
  528. defenceActM = 0
  529. defAtkM = 0
  530. '<b><font color = red>The spell backfires! A devouring vacuum sucks away your defenses.</font></b>'
  531. else
  532. '<b>The spell fizzles. Nothing seems to happen.</b>'
  533. end
  534. end
  535. if $ARGS[0] = 'leechmana':
  536. if SuccessValue > 0:
  537. damTip = 100 * SuccessValue
  538. damTipM = 1000
  539. '<b><font color = green>You leech mana from your enemy.</font></b>'
  540. elseif SuccessValue < 0:
  541. pcs_health -= 50
  542. '<b><font color = red>The spell backfires! Ouch!</font></b>'
  543. else
  544. '<b>The spell fizzles. Nothing seems to happen.</b>'
  545. end
  546. xgt'atakA','atak'
  547. end
  548. if $ARGS[0] = 'flood':
  549. if SuccessValue > 0:
  550. damTip = 1000 * SuccessValue
  551. damTipM = 500
  552. '<b><font color = green>A surge of water rises towards your enemy.</font></b>'
  553. elseif SuccessValue < 0:
  554. pcs_health -= 100
  555. '<b><font color = red>The spell backfires! A surge of water rises towards your enemy, but missed and hits you.</font></b>'
  556. else
  557. '<b>The spell fizzles. Nothing seems to happen.</b>'
  558. end
  559. xgt'atakA','atak'
  560. end
  561. if $ARGS[0] = 'blister':
  562. if SuccessValue > 0:
  563. defence += 1500
  564. defenceM += 1500
  565. defenceW += 1500
  566. defenceActPar = 500
  567. defenceActParM = 500
  568. defenceAct = 10
  569. defenceActM = 10
  570. '<b><font color = green>A protective sphere of water surrounds you.</font></b>'
  571. elseif SuccessValue < 0:
  572. defenceV += 1500
  573. '<b><font color = red>The spell backfires! A protective sphere of water surrounds your enemy.</font></b>'
  574. else
  575. '<b>The spell fizzles. Nothing seems to happen.</b>'
  576. end
  577. end
  578. if $ARGS[0] = 'sharkrockets':
  579. if SuccessValue > 0:
  580. damTip = 1500 * SuccessValue
  581. damTipM = 2500
  582. bonusSh = 50
  583. '<b><font color = green>Blobs of Water shaped like sharks fly towards your enemy stiking them.</font></b>'
  584. if klonV > 0:klonV = 0 & '<b><font color = green>Enemy clones are eliminated.</font></b>'
  585. elseif SuccessValue < 0:
  586. pcs_health -= 100
  587. '<b><font color = red>The spell backfires! Blobs of Water shaped like sharks fly towards your enemy, but missed and hits you.</font></b>'
  588. if klon > 0:klon = 0 & '<b><font color = green>Your clones are eliminated.</font></b>'
  589. else
  590. '<b>The spell fizzles. Nothing seems to happen.</b>'
  591. end
  592. xgt'atakA','atak'
  593. end
  594. if $ARGS[0] = 'greatflood':
  595. if SuccessValue > 0:
  596. defence += 5000
  597. defenceM += 5000
  598. defenceW += 5000
  599. defenceActPar = 500
  600. defenceActParM = 500
  601. defenceAct = 10
  602. defenceActM = 10
  603. defAtkM = 10
  604. '<b><font color = green>You have filled the whole neighborhood with water protecting you and devouring enemy mana.</font></b>'
  605. if klonV > 0:klonV = 0 & '<b><font color = green>Clones enemy disappeared.</font></b>'
  606. elseif SuccessValue < 0:
  607. defenceV += 1500
  608. '<b><font color = red>The spell backfires! A huge flood of water surrounds your enemy protecting him.</font></b>'
  609. if klon > 0:klon = 0 & '<b><font color = green>Clones enemy disappeared.</font></b>'
  610. else
  611. '<b>The spell fizzles. Nothing seems to happen.</b>'
  612. end
  613. end
  614. killvar 'SuccessValue'
  615. --- spell ---------------------------------