1
0

spell.qsrc 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  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. !
  12. ! For Combat Spells:
  13. ! $ARGS[2] = Target Type ('opp','pcs')
  14. ! ARGS[3] = Target party member number
  15. ! ARGS[4] = Caster party member number
  16. SuccessValue = $ARGS[1]
  17. ! ARGS for Combat Spells if Applicable
  18. $TargetType = $ARGS[2]
  19. if $TargetType = 'pcs':
  20. $CasterType = 'opp'
  21. elseif $TargetType = 'opp':
  22. $CasterType = 'pcs'
  23. else
  24. $CasterType = 'pcs'
  25. $TargetType = 'pcs'
  26. end
  27. TargetNumber = ARGS[3]
  28. CasterNumber = ARGS[3]
  29. if $ARGS[0] = 'teleport':
  30. ! Do the stuff of a Teleport
  31. ! ARGS[1] = Success/Failure level
  32. ! ARGS[2] = the Target Location
  33. $NewLocation = $ARGS[2]
  34. :RandLocLoop
  35. $randomLoc = $tpLocations[rand(0,arrsize('$tpLocations') - 1)]
  36. if $randomLoc = $NewLocation or $randomLoc = $EntryPoint:
  37. jump 'RandLocLoop'
  38. end
  39. if SuccessValue > 0:
  40. *nl
  41. "The blur you see just outside the ring seems to shift."
  42. wait 1000
  43. if $treeCircArg[$NewLocation] = "":
  44. gt $treeCircLoc[$NewLocation]
  45. else
  46. gt $treeCircLoc[$NewLocation], $treeCircArg[$NewLocation]
  47. end
  48. elseif SuccessValue < 0:
  49. *nl
  50. "The blur you see just outside the ring seems to shift. Something did not go right!"
  51. wait 1000
  52. if $treeCircArg[$randomLoc] = "":
  53. gt $treeCircLoc[$randomLoc]
  54. else
  55. gt $treeCircLoc[$randomLoc], $treeCircArg[$randomLoc]
  56. end
  57. else
  58. 'You feel drained, but the energy fizzles out and nothing happens'
  59. end
  60. killvar '$randomLoc'
  61. killvar '$NewLocation'
  62. result = ""
  63. end
  64. if $ARGS[0] = 'regenerate':
  65. if SuccessValue > 0:
  66. ! How much health is gained per minute
  67. regenVal = 5 * SuccessValue
  68. ! Immediate health gain
  69. pcs_health += regenVal
  70. ! If Regenerate is already running, we only extend.
  71. regenArrIdx = arrpos('$spellTimeName','regenerate')
  72. if regenArrIdx > -1:
  73. ! if it''s found, then update only
  74. spellComplete[regenArrIdx] = totminut + 120
  75. $spellCompExec[regenArrIdx] = 'pcs_health += (5 * <<regenVal>>)'
  76. $spellTickExec[regenArrIdx] = 'pcs_health += <<regenVal>>'
  77. else
  78. ! Add Timer:
  79. ! spellName = 'regenerate'
  80. ! duration = 120
  81. ! CompCode = 'pcs_health += (5 * <<regenVal>>)'
  82. ! TickCode = 'pcs_health += <<regenVal>>'
  83. gs 'spellTimer', 'add', 'regenerate', 120, 'pcs_health += (5 * <<regenVal>>)', 'pcs_health += <<regenVal>>'
  84. end
  85. '<b><font color = green>Your body surges with life. You feel better already.</font></b>'
  86. killvar 'regenVal'
  87. killvar 'regenArrIdx'
  88. else
  89. '<b>The spell fizzles. Nothing seems to happen.</b>'
  90. end
  91. end
  92. if $ARGS[0] = 'painblock':
  93. if SuccessValue > 0:
  94. pain['killer'] = 1
  95. '<b><font color = green>Your pain recedes into a dull throb.</font></b>'
  96. else
  97. '<b>The spell fizzles. Nothing seems to happen.</b>'
  98. end
  99. end
  100. if $ARGS[0] = 'curedisease':
  101. if SuccessValue > 0:
  102. ! Cure Diseses
  103. dynamic $cheatmenu['std_cure']
  104. ! Cause pain where diseases burned out
  105. pain['head'] += 10
  106. pain['nose'] += 10
  107. pain['mouth'] += 10
  108. pain['lips'] += 10
  109. pain['throat'] += 10
  110. pain['asshole'] += 10
  111. pain['chest'] += 10
  112. pain['tummy'] += 10
  113. pain['urethra'] += 10
  114. pain['vaginal'] += 10
  115. ! You do not feel good
  116. pcs_mood -= 30
  117. '<b><font color = green>You burst into a high fever. You feel terrible, but you know you are now healthy.</font></b>'
  118. else
  119. '<b>The spell fizzles. Nothing seems to happen.</b>'
  120. end
  121. end
  122. if $ARGS[0] = 'curewounds':
  123. if SuccessValue > 0:
  124. ! Remove some pain
  125. gs 'medical_din','healthTreatment'
  126. gs 'medical_din','healthTreatment'
  127. '<b><font color = green>You feel yourself coursing with life. You feel better already.</font></b>'
  128. else
  129. '<b>The spell fizzles. Nothing seems to happen.</b>'
  130. end
  131. end
  132. if $ARGS[0] = 'curewounds2':
  133. if SuccessValue > 0:
  134. ! Remove all pain
  135. killvar 'pain'
  136. pcs_health = pcs_vital * 10 + pcs_stren * 5 + 1000
  137. '<b><font color = green>You feel yourself coursing with life. All pain is gone.</font></b>'
  138. else
  139. '<b>The spell fizzles. Nothing seems to happen.</b>'
  140. end
  141. end
  142. if $ARGS[0] = 'berserk':
  143. if SuccessValue > 0:
  144. spellArrIdx = arrpos('$spellTimeName','berserk')
  145. pain['killer'] = 1
  146. if spellArrIdx > -1:
  147. ! if it''s found, then update only
  148. spellComplete[spellArrIdx] = totminut + 120
  149. else
  150. ! Save current Health percentage, since changing these stats will change healthmax
  151. healthPercent = pcs_health * 100 / healthmax
  152. staminPercent = pcs_stam * 100 / stammax
  153. ! Boost Stats
  154. stren_lvl += 200
  155. stren_lvlst += 200
  156. stren_muta += 4
  157. agil_lvl += 200
  158. agil_lvlst += 200
  159. agil_muta += 4
  160. vital_lvl += 200
  161. vital_lvlst += 200
  162. vital_muta += 4
  163. !gs 'stat_sklattrib'
  164. ! Run stats to recalculate max health
  165. gs 'stat'
  166. ! Update health to be appropiate percentage of new healthmax
  167. pcs_health = (healthPercent * healthmax / 100) + 1
  168. pcs_stam = (staminPercent * stammax) + 1
  169. ! Add Timer to remove this effect after tiem period
  170. $berserkCode={
  171. ! Return Stats to normal
  172. stren_lvl -= 200
  173. stren_lvlst -= 200
  174. stren_muta -= 4
  175. agil_lvl -= 200
  176. agil_lvlst -= 200
  177. agil_muta -= 4
  178. vital_lvl -= 200
  179. vital_lvlst -= 200
  180. vital_muta -= 4
  181. }
  182. gs 'spellTimer', 'add', 'berserk', 120, $berserkCode, ''
  183. end
  184. '<b><font color = green>You feel a huge adrenalin surge. You begin looking for someone to battle.</font></b>'
  185. else
  186. '<b>The spell fizzles. Nothing seems to happen.</b>'
  187. end
  188. killvar 'spellArrIdx'
  189. killvar 'berserkCode'
  190. killvar 'healthPercent'
  191. killvar 'staminPercent'
  192. end
  193. if $ARGS[0] = 'shower':
  194. if SuccessValue > 0:
  195. ! Take a Shower
  196. gs 'cum_cleanup'
  197. lactation['lactmess'] = 0
  198. pcs_sweat = 10
  199. ! Brush Teeth
  200. pcs_breath = 1
  201. '<b><font color = green>You feel clean and refreshed.</font></b>'
  202. else
  203. '<b>The spell fizzles. Nothing seems to happen.</b>'
  204. end
  205. end
  206. if $ARGS[0] = 'makeup':
  207. if SuccessValue > 0:
  208. ! Argument should be 3 digit string representing Makeup to apply
  209. $MakeupArg = $ARGS[2]
  210. if $MakeupArg = '': $MakeupArg = '210'
  211. ! Arg[0] = Makeup Amount (0-3)
  212. MakeupArg[0] = val(mid($MakeupArg,1,1))
  213. ! Arg[1] = Lip Balm application (0-1)
  214. MakeupArg[1] = val(mid($MakeupArg,2,1))
  215. ! Arg[2] = False lash Application (0-2)
  216. MakeupArg[2] = val(mid($MakeupArg,3,1))
  217. ! Brush hair
  218. pcs_hairbsh = 1
  219. ! Apply Makeup
  220. pcs_makeup = MakeupArg[0]
  221. ! Apply Lipbalm
  222. pcs_lipbalm += 8*MakeupArg[1]
  223. ! Apply False Lashes
  224. if MakeupArg[2] = 1 and pcs_lashes < 3:
  225. pcs_lashes = 3
  226. elseif MakeupArg[2] = 2 and pcs_lashes < 4:
  227. pcs_lashes = 4
  228. end
  229. killvar 'MakeupArg'
  230. killvar '$MakeupArg'
  231. '<b><font color = green>makeup is applied to your face.</font></b>'
  232. else
  233. '<b>The spell fizzles. Nothing seems to happen.</b>'
  234. end
  235. end
  236. if $ARGS[0] = 'cosmetica':
  237. if SuccessValue > 0:
  238. ! Take a Shower
  239. gs 'cum_cleanup'
  240. lactation['lactmess'] = 0
  241. pcs_sweat = 10
  242. ! Brush Teeth
  243. pcs_breath = 1
  244. ! Remove graffiti from self
  245. body_write = 0
  246. face_write = 0
  247. ! Enema
  248. klismaday = daystart
  249. klismaday1 = 1
  250. ! Brush hair
  251. pcs_hairbsh = 1
  252. ! Apply Makeup
  253. pcs_makeup = 3
  254. !if shave_menu = 0:nothing
  255. !if shave_menu = 1:legs and pussy
  256. !if shave_menu = 2:pussy only
  257. !if shave_menu = 3:legs only
  258. if shave_menu = 1 or shave_menu = 3:
  259. ! Shave Legs
  260. pcs_leghair = 0
  261. end
  262. if shave_menu = 1 or shave_menu = 2:
  263. ! Shave Pubes
  264. if pubestyle = 1:
  265. pcs_pubes = 0
  266. elseif pubestyle >= 2 and pubestyle <= 7:
  267. pcs_pubes = 11
  268. elseif pubestyle = 8:
  269. pcs_pubes = 16
  270. elseif pubestyle = 9:
  271. pcs_pubes = 21
  272. elseif pubestyle = 10:
  273. pcs_pubes = 26
  274. end
  275. end
  276. '<b><font color = green>You feel beautiful.</font></b>'
  277. else
  278. '<b>The spell fizzles. Nothing seems to happen.</b>'
  279. end
  280. end
  281. if $ARGS[0] = 'reset':
  282. cla
  283. !Create mist
  284. 'Accumulated mana <<manaReset>> units.'
  285. act 'Absorb accumulated mana':
  286. cla
  287. *clr
  288. pcs_mana = pcs_mana + manaReset
  289. manaReset = 0
  290. xgt'fight','sta'
  291. end
  292. act 'Physical attacks':gt'boxing'
  293. if pcs_magik > 0:
  294. act 'Magic attacks':gt'magik'
  295. end
  296. end
  297. if $ARGS[0] = 'unmat':
  298. cla
  299. !Create mist
  300. '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.'
  301. 'Do not allow to pass through the materiality of the body is not getting any impact damage, while slightly reduced longevity spells.'
  302. if rikudo >= 3000:
  303. act 'Become a disembodied':
  304. cla
  305. *clr
  306. unmaterial = 31
  307. rikudo = rikudo + 3000
  308. manaReset = 0
  309. xgt'fight','sta'
  310. end
  311. elseif rikudo < 3000:
  312. 'You have too little power Rikudo for this spell.'
  313. end
  314. act 'Physical attacks':gt'boxing'
  315. if pcs_magik > 0:
  316. act 'Magic attacks':gt'magik'
  317. end
  318. end
  319. if $ARGS[0] = 'fog':
  320. ! tuman = the amount of fog around you making you harder to hit
  321. ! tumanV = the amount of fog around your opponent making him harder to hit
  322. if tumanV > 0:
  323. 'It is not possible to call your fog when an existing opponent is already fogged.'
  324. else
  325. if SuccessValue > 0:
  326. tuman += (10 * SuccessValue)
  327. '<b><font color = green>A Fog materializes around, obscuring you from your enemies.</font></b>'
  328. elseif SuccessValue < 0:
  329. tumanV += 10
  330. '<b><font color = red>The spell backfires! A Fog materializes around your enemy, obscuring him from your view.</font></b>'
  331. else
  332. '<b>The spell fizzles. Nothing seems to happen.</b>'
  333. end
  334. end
  335. end
  336. if $ARGS[0] = 'clone':
  337. ! klon = the number of clones that the enemy must destroy before hitting you
  338. if SuccessValue > 0:
  339. klon += SuccessValue
  340. '<b><font color = green><<SuccessValue>> clone<<iif(SuccessValue>1,"s","")>> of you springs from you confusing the enemy.</font></b>'
  341. elseif SuccessValue < 0 and klon > 0:
  342. klon -= 1
  343. '<b><font color = red>The spell backfires! One of your clones disappears.</font></b>'
  344. else
  345. '<b>The spell fizzles. Nothing seems to happen.</b>'
  346. end
  347. end
  348. if $ARGS[0] = 'stun':
  349. ! stunner = 1 stuns the enemy for 3-6 rounds
  350. if SuccessValue > 0:
  351. stunner = 1
  352. '<b><font color = green>Your enemy is stunned.</font></b>'
  353. else
  354. '<b>The spell fizzles. Nothing seems to happen.</b>'
  355. end
  356. xgt'atak','player'
  357. end
  358. if $ARGS[0] = 'weapon':
  359. if SuccessValue > 0:
  360. magweapbonus = weapbonus * 4 * SuccessValue
  361. '<b><font color = green>Your Weapon now feels more powerful.</font></b>'
  362. elseif SuccessValue < 0:
  363. magweapbonus = weapbonus * -1
  364. '<b><font color = red>The spell backfires! Your weapon seems weaker.</font></b>'
  365. else
  366. '<b>The spell fizzles. Nothing seems to happen.</b>'
  367. end
  368. xgt'atak','player'
  369. end
  370. if $ARGS[0] = 'wind':
  371. ! tuman = the amount of fog around you making you harder to hit
  372. ! tumanV = the amount of fog around your opponent making him harder to hit
  373. if SuccessValue = 2:
  374. tumanV = 0
  375. '<b><font color = green>A wind blows through the area eliminating your enemys fog from the battlefield.</font></b>'
  376. elseif SuccessValue = 1:
  377. tumanV = 0
  378. tuman = 0
  379. '<b><font color = green>A wind blows through the area eliminating all fog on the battlefield.</font></b>'
  380. elseif SuccessValue = -1:
  381. tuman = 0
  382. '<b><font color = red>A wind blows through the area eliminating your fog from the battlefield.</font></b>'
  383. else
  384. '<b>The spell fizzles. Nothing seems to happen.</b>'
  385. end
  386. end
  387. if $ARGS[0] = 'multiclone':
  388. ! klon = the number of clones that the enemy must destroy before hitting you
  389. if SuccessValue > 0:
  390. klon += SuccessValue * 3
  391. '<b><font color = green><<SuccessValue * 3>> clone<<iif(SuccessValue>1,"s","")>> of you springs from you confusing the enemy.</font></b>'
  392. elseif SuccessValue < 0 and klon > 0:
  393. if klon < 3:
  394. klon = 0
  395. else
  396. klon -= 3
  397. end
  398. '<b><font color = red>The spell backfires! Some of your clones disappear.</font></b>'
  399. else
  400. '<b>The spell fizzles. Nothing seems to happen.</b>'
  401. end
  402. end
  403. if $ARGS[0] = 'energo':
  404. ! defence = absorbs damage before health begins to be removed
  405. if SuccessValue > 0:
  406. dynamic '<<$CasterType>>_shield[<<CasterNumber>>] += (100 * SuccessValue)'
  407. '<b><font color = green>An energy shield materializes around you, protecting you from your enemies.</font></b>'
  408. elseif SuccessValue < 0:
  409. dynamic '<<$TargetType>>_shield[<<TargetNumber>>] += 100'
  410. '<b><font color = red>The spell backfires! An energy shield materializes around your enemy, protecting him from you.</font></b>'
  411. else
  412. '<b>The spell fizzles. Nothing seems to happen.</b>'
  413. end
  414. end
  415. if $ARGS[0] = 'haste':
  416. if SuccessValue > 0:
  417. initBonus += (120 * SuccessValue)
  418. '<b><font color = green>Your mind and body seem to race though a sluggish world.</font></b>'
  419. elseif SuccessValue < 0:
  420. initBonusV += 120
  421. '<b><font color = red>The spell backfires! Your enemy seems to move faster.</font></b>'
  422. else
  423. '<b>The spell fizzles. Nothing seems to happen.</b>'
  424. end
  425. end
  426. if $ARGS[0] = 'heal':
  427. if SuccessValue > 0:
  428. dynamic 'pcs_health += (400 * SuccessValue)'
  429. '<b><font color = green>Your body surges with life. You feel much stronger.</font></b>'
  430. else
  431. '<b>The spell fizzles. Nothing seems to happen.</b>'
  432. end
  433. end
  434. if $ARGS[0] = 'hand':
  435. if SuccessValue > 0:
  436. strenK = pcs_stren*20*SuccessValue/100
  437. magweapbonus = RAND(pcs_stren*10 - strenK,pcs_stren*10 + strenK)
  438. '<b><font color = green>Your hands now feel more powerful.</font></b>'
  439. elseif SuccessValue < 0:
  440. strenK = pcs_stren*20/100
  441. magweapbonus = 0 - RAND(pcs_stren*10 - strenK,pcs_stren*10 + strenK)
  442. '<b><font color = red>The spell backfires! Your hands seem weaker.</font></b>'
  443. else
  444. '<b>The spell fizzles. Nothing seems to happen.</b>'
  445. end
  446. xgt'atak','player'
  447. end
  448. if $ARGS[0] = 'scaldingtouch':
  449. if SuccessValue > 0:
  450. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 250 * SuccessValue
  451. '<b><font color = green>Flames spring from your hands.</font></b>'
  452. else
  453. '<b>The spell fizzles. Nothing seems to happen.</b>'
  454. end
  455. xgt'atakA','atak'
  456. end
  457. if $ARGS[0] = 'burninghands':
  458. if SuccessValue > 0:
  459. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 2500 * SuccessValue
  460. '<b><font color = green>A torrent of flames jets from your hands.</font></b>'
  461. else
  462. '<b>The spell fizzles. Nothing seems to happen.</b>'
  463. end
  464. xgt'atakA','atak'
  465. end
  466. if $ARGS[0] = 'firebarrier':
  467. if SuccessValue > 0:
  468. defence += (750 * SuccessValue)
  469. '<b><font color = green>A flaming barrier has sprung up between you and your opponent. You now have <<defence>> protection units.</font></b>'
  470. elseif SuccessValue < 0:
  471. defenceV += 750
  472. '<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>'
  473. else
  474. '<b>The spell fizzles. Nothing seems to happen.</b>'
  475. end
  476. end
  477. if $ARGS[0] = 'firestorm':
  478. if SuccessValue > 0:
  479. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 4250 + (2000 * SuccessValue)
  480. bonusSh = 100
  481. '<b><font color = green>Uncountable glowing embers steak down upon your foes.</font></b>'
  482. elseif SuccessValue < 0:
  483. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 2000
  484. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 200
  485. bonusSh = 100
  486. '<b><font color = red>The spell backfires! Uncountable glowing embers steak down upon the battlefield burning everyone.</font></b>'
  487. else
  488. '<b>The spell fizzles. Nothing seems to happen.</b>'
  489. end
  490. xgt'atakA','atak'
  491. end
  492. if $ARGS[0] = 'flameshield':
  493. if SuccessValue > 0:
  494. defence += (2500 * SuccessValue)
  495. '<b><font color = green>A Shield made of Flames interposes itself between you and your enemy. You now have <<defence>> protection units.</font></b>'
  496. elseif SuccessValue < 0:
  497. defenceV += 2500
  498. '<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>'
  499. else
  500. '<b>The spell fizzles. Nothing seems to happen.</b>'
  501. end
  502. end
  503. if $ARGS[0] = 'shock':
  504. if SuccessValue > 0:
  505. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 150 * SuccessValue
  506. eleSh = 1
  507. '<b><font color = green>You build a static electric charge in your hand and zap your opponent.</font></b>'
  508. elseif SuccessValue < 0:
  509. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 50
  510. '<b><font color = red>The spell backfires! You manage to zap yourself with a static charge.</font></b>'
  511. else
  512. '<b>The spell fizzles. Nothing seems to happen.</b>'
  513. end
  514. xgt'atakA','atak'
  515. end
  516. if $ARGS[0] = 'lightning':
  517. if SuccessValue > 0:
  518. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 1500 * SuccessValue
  519. eleSh = 1
  520. '<b><font color = green>You shoot a lightning bolt from your hand zapping your opponent.</font></b>'
  521. elseif SuccessValue < 0:
  522. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 300
  523. '<b><font color = red>The spell backfires! You manage to zap yourself with lightning.</font></b>'
  524. else
  525. '<b>The spell fizzles. Nothing seems to happen.</b>'
  526. end
  527. xgt'atakA','atak'
  528. end
  529. if $ARGS[0] = 'electricbarrier':
  530. if SuccessValue > 0:
  531. defence += (1500 * SuccessValue)
  532. '<b><font color = green>A wall of dancing lightning springs up around yourself. You now have <<defence>> protection units.</font></b>'
  533. elseif SuccessValue < 0:
  534. defenceV += 1500
  535. '<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>'
  536. else
  537. '<b>The spell fizzles. Nothing seems to happen.</b>'
  538. end
  539. end
  540. if $ARGS[0] = '1000birds':
  541. if SuccessValue > 0:
  542. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 2750 + (1000 * SuccessValue)
  543. bonusSh = 30
  544. eleSh = 1
  545. '<b><font color = green>You shoot hundreds of small lightning bolts toward your enemy.</font></b>'
  546. elseif SuccessValue < 0:
  547. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 2000
  548. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 200
  549. bonusSh = 30
  550. eleSh = 1
  551. '<b><font color = red>The spell backfires! Hundreds of small lightning bolts curl toward the battlefield shocking everyone.</font></b>'
  552. else
  553. '<b>The spell fizzles. Nothing seems to happen.</b>'
  554. end
  555. end
  556. if $ARGS[0] = 'dancingsphere':
  557. if SuccessValue > 0:
  558. defence += (5000 * SuccessValue)
  559. '<b><font color = green>A large field of lightning dances around you blocking attacks. You now have <<defence>> protection units.</font></b>'
  560. elseif SuccessValue < 0:
  561. defenceV += 5000
  562. '<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>'
  563. else
  564. '<b>The spell fizzles. Nothing seems to happen.</b>'
  565. end
  566. end
  567. if $ARGS[0] = 'quicksand':
  568. if SuccessValue > 0:
  569. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100 * SuccessValue
  570. eleSh = 5
  571. '<b><font color = green>You have trapped your opponent in quicksand.</font></b>'
  572. elseif SuccessValue < 0:
  573. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100
  574. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 50
  575. eleSh = 5
  576. '<b><font color = red>The spell backfires! You are both trapped in quicksand.</font></b>'
  577. else
  578. '<b>The spell fizzles. Nothing seems to happen.</b>'
  579. end
  580. xgt'atakA','atak'
  581. end
  582. if $ARGS[0] = 'earthshield':
  583. if SuccessValue > 0:
  584. defence += 1500 + (1000 * SuccessValue)
  585. defenceM += 2500
  586. defenceActPar = 1000
  587. defenceActParM = 1000
  588. defenceAct = 10
  589. defenceActM = 10
  590. '<b><font color = green>Tendrils of Earth rise to defend you. You now have <<defence>> protection units.</font></b>'
  591. elseif SuccessValue < 0:
  592. defenceV += 2500
  593. '<b><font color = red>The spell backfires! Tendrils of Earth rise to defend your enemy. Your enemy now has <<defence>> protection units.</font></b>'
  594. else
  595. '<b>The spell fizzles. Nothing seems to happen.</b>'
  596. end
  597. end
  598. if $ARGS[0] = 'abyss':
  599. if SuccessValue > 0:
  600. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 1500 * SuccessValue
  601. eleSh = 5
  602. '<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>'
  603. elseif SuccessValue < 0:
  604. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 1500
  605. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 200
  606. eleSh = 5
  607. '<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>'
  608. else
  609. '<b>The spell fizzles. Nothing seems to happen.</b>'
  610. end
  611. xgt'atakA','atak'
  612. end
  613. if $ARGS[0] = 'earthguardian':
  614. if SuccessValue > 0:
  615. defence += 5200 + (2000 * SuccessValue)
  616. defenceM += 6250
  617. defenceW += 6250
  618. defenceActPar = 1000
  619. defenceActParM = 1000
  620. defenceActParW = 1000
  621. defenceAct = 15
  622. defenceActM = 15
  623. defenceActW = 15
  624. defAtk = 15
  625. '<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>'
  626. elseif SuccessValue < 0:
  627. defenceV += 2500
  628. '<b><font color = red>The spell backfires! Tendrils of Earth rise to defend your enemy. Your enemy now has <<defence>> protection units.</font></b>'
  629. else
  630. '<b>The spell fizzles. Nothing seems to happen.</b>'
  631. end
  632. end
  633. if $ARGS[0] = 'sando':
  634. if SuccessValue > 0:
  635. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 3000 + (2000 * SuccessValue)
  636. bonusSh = 50
  637. eleSh = 5
  638. '<b><font color = green>Two huge plates of earth colapse together crushing the enemy and depriving him of the ability to move.</font></b>'
  639. elseif SuccessValue < 0:
  640. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 200
  641. '<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>'
  642. else
  643. '<b>The spell fizzles. Nothing seems to happen.</b>'
  644. end
  645. xgt'atakA','atak'
  646. end
  647. if $ARGS[0] = 'windgust':
  648. if SuccessValue > 0:
  649. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100 * SuccessValue
  650. bonusSh = 50
  651. '<b><font color = green>You have created a gust of wind.</font></b>'
  652. if klonV > 0:klonV = 0 & '<b><font color = green>Enemy clones are vaporized.</font></b>'
  653. if tumanV > 0:tumanV = 0 & '<b><font color = green>Enemy Fog is torn to shreds by the wind.</font></b>'
  654. elseif SuccessValue < 0:
  655. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 50
  656. '<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>'
  657. if klon > 0:klon = 0 & '<b><font color = green>Your clones are vaporized.</font></b>'
  658. if tuman > 0:tuman = 0 & '<b><font color = green>Your Fog is torn to shreds by the wind.</font></b>'
  659. else
  660. '<b>The spell fizzles. Nothing seems to happen.</b>'
  661. end
  662. xgt'atakA','atak'
  663. end
  664. if $ARGS[0] = 'pressure':
  665. if SuccessValue > 0:
  666. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 1000 * SuccessValue
  667. bonusSh = 100
  668. '<b><font color = green>You dramatically raised the air pressure.</font></b>'
  669. if klonV > 0:klonV = 0 & '<b><font color = green>Enemy clones are vaporized.</font></b>'
  670. if tumanV > 0:tumanV = 0 & '<b><font color = green>Enemy Fog is torn to shreds by the wind.</font></b>'
  671. elseif SuccessValue < 0:
  672. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 200
  673. '<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>'
  674. if klon > 0:klon = 0 & '<b><font color = green>Your clones are vaporized.</font></b>'
  675. if tuman > 0:tuman = 0 & '<b><font color = green>Your Fog is torn to shreds by the wind.</font></b>'
  676. else
  677. '<b>The spell fizzles. Nothing seems to happen.</b>'
  678. end
  679. xgt'atakA','atak'
  680. end
  681. if $ARGS[0] = 'vacuum':
  682. if SuccessValue > 0:
  683. defence += (1500 * SuccessValue)
  684. '<b><font color = green>A turbulent sphere of vacuum surrounds you blocking incoming attacks. You now have <<defence>> protection units.</font></b>'
  685. elseif SuccessValue < 0:
  686. defenceV += 1500
  687. '<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>'
  688. else
  689. '<b>The spell fizzles. Nothing seems to happen.</b>'
  690. end
  691. end
  692. if $ARGS[0] = 'vacuumshells':
  693. if SuccessValue > 0:
  694. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 2500 * SuccessValue
  695. bonusSh = 100
  696. '<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>'
  697. if klonV > 0:klonV = 0 & '<b><font color = green>Enemy clones are vaporized.</font></b>'
  698. if tumanV > 0:tumanV = 0 & '<b><font color = green>Enemy Fog is torn to shreds by the wind.</font></b>'
  699. elseif SuccessValue < 0:
  700. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 200
  701. '<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>'
  702. if klon > 0:klon = 0 & '<b><font color = green>Your clones are vaporized.</font></b>'
  703. if tuman > 0:tuman = 0 & '<b><font color = green>Your Fog is torn to shreds by the wind.</font></b>'
  704. else
  705. '<b>The spell fizzles. Nothing seems to happen.</b>'
  706. end
  707. xgt'atakA','atak'
  708. end
  709. if $ARGS[0] = 'devouringvacuum':
  710. if SuccessValue > 0:
  711. defenceV = 0
  712. defenceMV = 0
  713. defenceWV = 0
  714. defenceActParV = 0
  715. defenceActParMV = 0
  716. defenceActV = 0
  717. defenceActMV = 0
  718. defAtkMV = 0
  719. '<b><font color = green>A devouring vacuum sucks away your enemys defenses.</font></b>'
  720. elseif SuccessValue < 0:
  721. defence = 0
  722. defenceM = 0
  723. defenceW = 0
  724. defenceActPar = 0
  725. defenceActParM = 0
  726. defenceAct = 0
  727. defenceActM = 0
  728. defAtkM = 0
  729. '<b><font color = red>The spell backfires! A devouring vacuum sucks away your defenses.</font></b>'
  730. else
  731. '<b>The spell fizzles. Nothing seems to happen.</b>'
  732. end
  733. end
  734. if $ARGS[0] = 'leechmana':
  735. if SuccessValue > 0:
  736. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100
  737. damTipM = 1000
  738. '<b><font color = green>You leech mana from your enemy.</font></b>'
  739. elseif SuccessValue < 0:
  740. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 50
  741. '<b><font color = red>The spell backfires! Ouch!</font></b>'
  742. else
  743. '<b>The spell fizzles. Nothing seems to happen.</b>'
  744. end
  745. xgt'atakA','atak'
  746. end
  747. if $ARGS[0] = 'flood':
  748. if SuccessValue > 0:
  749. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 1000 * SuccessValue
  750. damTipM = 500
  751. '<b><font color = green>A surge of water rises towards your enemy.</font></b>'
  752. elseif SuccessValue < 0:
  753. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 100
  754. '<b><font color = red>The spell backfires! A surge of water rises towards your enemy, but missed and hits you.</font></b>'
  755. else
  756. '<b>The spell fizzles. Nothing seems to happen.</b>'
  757. end
  758. xgt'atakA','atak'
  759. end
  760. if $ARGS[0] = 'blister':
  761. if SuccessValue > 0:
  762. defence += 1500
  763. defenceM += 1500
  764. defenceW += 1500
  765. defenceActPar = 500
  766. defenceActParM = 500
  767. defenceAct = 10
  768. defenceActM = 10
  769. '<b><font color = green>A protective sphere of water surrounds you.</font></b>'
  770. elseif SuccessValue < 0:
  771. defenceV += 1500
  772. '<b><font color = red>The spell backfires! A protective sphere of water surrounds your enemy.</font></b>'
  773. else
  774. '<b>The spell fizzles. Nothing seems to happen.</b>'
  775. end
  776. end
  777. if $ARGS[0] = 'sharkrockets':
  778. if SuccessValue > 0:
  779. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 1500 * SuccessValue
  780. damTipM = 2500
  781. bonusSh = 50
  782. '<b><font color = green>Blobs of Water shaped like sharks fly towards your enemy stiking them.</font></b>'
  783. if klonV > 0:klonV = 0 & '<b><font color = green>Enemy clones are eliminated.</font></b>'
  784. elseif SuccessValue < 0:
  785. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 100
  786. '<b><font color = red>The spell backfires! Blobs of Water shaped like sharks fly towards your enemy, but missed and hits you.</font></b>'
  787. if klon > 0:klon = 0 & '<b><font color = green>Your clones are eliminated.</font></b>'
  788. else
  789. '<b>The spell fizzles. Nothing seems to happen.</b>'
  790. end
  791. xgt'atakA','atak'
  792. end
  793. if $ARGS[0] = 'greatflood':
  794. if SuccessValue > 0:
  795. defence += 5000
  796. defenceM += 5000
  797. defenceW += 5000
  798. defenceActPar = 500
  799. defenceActParM = 500
  800. defenceAct = 10
  801. defenceActM = 10
  802. defAtkM = 10
  803. '<b><font color = green>You have filled the whole neighborhood with water protecting you and devouring enemy mana.</font></b>'
  804. if klonV > 0:klonV = 0 & '<b><font color = green>Clones enemy disappeared.</font></b>'
  805. elseif SuccessValue < 0:
  806. defenceV += 1500
  807. '<b><font color = red>The spell backfires! A huge flood of water surrounds your enemy protecting him.</font></b>'
  808. if klon > 0:klon = 0 & '<b><font color = green>Clones enemy disappeared.</font></b>'
  809. else
  810. '<b>The spell fizzles. Nothing seems to happen.</b>'
  811. end
  812. end
  813. killvar 'SuccessValue'
  814. killvar '$TargetType'
  815. killvar 'TargetNumber'
  816. killvar '$CasterType'
  817. killvar 'CasterNumber'
  818. --- spell ---------------------------------