spell.qsrc 29 KB

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