1
0

spell.qsrc 21 KB

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