1
0

spell.qsrc 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  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] = 'glamour':
  284. if SuccessValue > 0:
  285. ! Add large bonus to appearance.
  286. pcs_apprncbase += 150
  287. ! Add Timer to remove Appearance bonus after 2 hours
  288. ! spellName = 'glamour'
  289. ! duration = 120
  290. ! CompCode = 'pcs_apprncbase -= 150' Remove bonus
  291. ! TickCode = '' Do nothing
  292. gs 'spellTimer', 'add', 'glamour', 120, 'pcs_apprncbase -= 150', ''
  293. '<b><font color = <<$SplTxtColGood>>>You feel gorgeous. People will love you.</font></b>'
  294. else
  295. '<b>The spell fizzles. Nothing seems to happen.</b>'
  296. end
  297. end
  298. if $ARGS[0] = 'alterself':
  299. if SuccessValue > 0:
  300. ! Stop Reputation accumulation.
  301. !TODO
  302. '<b><font color = <<$SplTxtColGood>>>Your feature change. Your own mother wouldn''t recognize you.</font></b>'
  303. else
  304. '<b>The spell fizzles. Nothing seems to happen.</b>'
  305. end
  306. end
  307. if $ARGS[0] = 'makeup':
  308. if SuccessValue > 0:
  309. ! Argument should be 3 digit string representing Makeup to apply
  310. $MakeupArg = $ARGS[2]
  311. if $MakeupArg = '': $MakeupArg = '210'
  312. ! Arg[0] = Makeup Amount (0-3)
  313. MakeupArg[0] = val(mid($MakeupArg,1,1))
  314. ! Arg[1] = Lip Balm application (0-1)
  315. MakeupArg[1] = val(mid($MakeupArg,2,1))
  316. ! Arg[2] = False lash Application (0-2)
  317. MakeupArg[2] = val(mid($MakeupArg,3,1))
  318. ! Brush hair
  319. pcs_hairbsh = 1
  320. ! Apply Makeup
  321. pcs_makeup = MakeupArg[0]
  322. ! Apply Lipbalm
  323. pcs_lipbalm += 8*MakeupArg[1]
  324. ! Apply False Lashes
  325. if MakeupArg[2] = 1 and pcs_lashes < 3:
  326. pcs_lashes = 3
  327. elseif MakeupArg[2] = 2 and pcs_lashes < 4:
  328. pcs_lashes = 4
  329. end
  330. killvar 'MakeupArg'
  331. killvar '$MakeupArg'
  332. '<b><font color = <<$SplTxtColGood>>>makeup is applied to your face.</font></b>'
  333. else
  334. '<b>The spell fizzles. Nothing seems to happen.</b>'
  335. end
  336. end
  337. if $ARGS[0] = 'cosmetica':
  338. if SuccessValue > 0:
  339. ! Take a Shower
  340. gs 'cum_cleanup'
  341. lactation['lactmess'] = 0
  342. pcs_sweat = 10
  343. ! Brush Teeth
  344. pcs_breath = 1
  345. ! Remove graffiti from self
  346. body_write = 0
  347. face_write = 0
  348. ! Enema
  349. klismaday = daystart
  350. klismaday1 = 1
  351. ! Brush hair
  352. pcs_hairbsh = 1
  353. ! Apply Makeup
  354. pcs_makeup = 3
  355. !if shave_menu = 0:nothing
  356. !if shave_menu = 1:legs and pussy
  357. !if shave_menu = 2:pussy only
  358. !if shave_menu = 3:legs only
  359. if shave_menu = 1 or shave_menu = 3:
  360. ! Shave Legs
  361. pcs_leghair = 0
  362. end
  363. if shave_menu = 1 or shave_menu = 2:
  364. ! Shave Pubes
  365. if pubestyle = 1:
  366. pcs_pubes = 1
  367. elseif (pubestyle >= 2 and pubestyle <= 9) or pubestyle >= 12:
  368. pcs_pubes = 16
  369. elseif pubestyle = 10 and pcs_pubes > 29:
  370. pcs_pubes = 26
  371. elseif pubestyle = 11 and pcs_pubes > 10:
  372. pcs_pubes = 0
  373. end
  374. end
  375. '<b><font color = <<$SplTxtColGood>>>You feel beautiful.</font></b>'
  376. else
  377. '<b>The spell fizzles. Nothing seems to happen.</b>'
  378. end
  379. end
  380. !!!!!!!!!!!!!!!!!
  381. !! Combat Spells
  382. !!!!!!!!!!!!!!!!!
  383. if $ARGS[0] = 'fog':
  384. if SuccessValue > 0:
  385. dynamic $spellFunc['UpdateAttrib'], 'fog', $TargetType, TargetNumber, '+', 10 * SuccessValue
  386. '<b><font color = <<$SplTxtColGood>>>A Fog materializes around, obscuring <<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> from enemies.</font></b>'
  387. else
  388. '<b>The spell fizzles. Nothing seems to happen.</b>'
  389. end
  390. end
  391. if $ARGS[0] = 'clone':
  392. if SuccessValue > 0:
  393. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '+', SuccessValue
  394. '<b><font color = <<$SplTxtColGood>>><<SuccessValue>> clone<<iif(SuccessValue>1,"s","")>> springs from <<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> confusing enemies.</font></b>'
  395. elseif SuccessValue < 0 and dyneval('result=<<$TargetType>>_clone[<<TargetNumber>>]') > 0:
  396. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '-', 1
  397. '<b><font color = <<$SplTxtColBad>>>The spell backfires! A <<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> clone disappears.</font></b>'
  398. else
  399. '<b>The spell fizzles. Nothing seems to happen.</b>'
  400. end
  401. end
  402. if $ARGS[0] = 'stun':
  403. if SuccessValue > 0:
  404. stunner = 1
  405. dynamic $spellFunc['UpdateAttrib'], 'stun', $TargetType, TargetNumber, '+', rand(2,5)+ SuccessValue
  406. '<b><font color = <<$SplTxtColGood>>><<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> is stunned.</font></b>'
  407. else
  408. '<b>The spell fizzles. Nothing seems to happen.</b>'
  409. end
  410. end
  411. if $ARGS[0] = 'weapon':
  412. !{if SuccessValue > 0:
  413. magweapbonus = weapbonus * 4 * SuccessValue
  414. '<b><font color = <<$SplTxtColGood>>>Your weapon now feels more powerful.</font></b>'
  415. elseif SuccessValue < 0:
  416. magweapbonus = weapbonus * -1
  417. '<b><font color = <<$SplTxtColBad>>>The spell backfires! Your weapon seems weaker.</font></b>'
  418. else
  419. '<b>The spell fizzles. Nothing seems to happen.</b>'
  420. end
  421. }
  422. "weapon"
  423. end
  424. if $ARGS[0] = 'wind':
  425. if SuccessValue = 2:
  426. dynamic $spellFunc['UpdateAttrib'], 'fog', $TargetType, TargetNumber, '=', 0
  427. '<b><font color = <<$SplTxtColGood>>>A wind blows through the area, eliminating the fog around <<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> from the battlefield.</font></b>'
  428. elseif SuccessValue = 1:
  429. dynamic $spellFunc['UpdateAttrib'], 'fog', $TargetType, TargetNumber, '=', 0
  430. dynamic $spellFunc['UpdateAttrib'], 'fog', $CasterType, CasterNumber, '=', 0
  431. '<b><font color = <<$SplTxtColGood>>>A wind blows through the area, eliminating all fog on the battlefield.</font></b>'
  432. elseif SuccessValue = -1:
  433. dynamic $spellFunc['UpdateAttrib'], 'fog', $CasterType, CasterNumber, '=', 0
  434. '<b><font color = <<$SplTxtColBad>>>A wind blows through the area, eliminating the fog around <<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> from the battlefield.</font></b>'
  435. else
  436. '<b>The spell fizzles. Nothing seems to happen.</b>'
  437. end
  438. end
  439. if $ARGS[0] = 'multiclone':
  440. if SuccessValue > 0:
  441. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '+', SuccessValue * 3
  442. '<b><font color = <<$SplTxtColGood>>><<SuccessValue * 3>> clone<<iif(SuccessValue>1,"s","")>> of <<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> springs forth, confusing the enemy.</font></b>'
  443. elseif SuccessValue < 0 and klon > 0:
  444. if dyneval('result=<<$TargetType>>_clone[<<TargetNumber>>]') < 3:
  445. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '=', 0
  446. else
  447. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '-', 3
  448. end
  449. '<b><font color = <<$SplTxtColBad>>>The spell backfires! Some clones of <<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> disappear.</font></b>'
  450. else
  451. '<b>The spell fizzles. Nothing seems to happen.</b>'
  452. end
  453. end
  454. if $ARGS[0] = 'energo':
  455. if SuccessValue > 0:
  456. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', SuccessValue * 100
  457. '<b><font color = <<$SplTxtColGood>>>An energy shield materializes around <<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>>, granting protection from enemies.</font></b>'
  458. else
  459. '<b>The spell fizzles. Nothing seems to happen.</b>'
  460. end
  461. end
  462. if $ARGS[0] = 'haste':
  463. if SuccessValue > 0:
  464. dynamic $spellFunc['UpdateAttrib'], 'init', $TargetType, TargetNumber, '+', SuccessValue * 120
  465. '<b><font color = <<$SplTxtColGood>>><<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> feels mind and body race though a sluggish world.</font></b>'
  466. else
  467. '<b>The spell fizzles. Nothing seems to happen.</b>'
  468. end
  469. end
  470. if $ARGS[0] = 'heal':
  471. if SuccessValue > 0:
  472. dynamic $spellFunc['UpdateAttrib'], 'health', $TargetType, TargetNumber, '+', SuccessValue * 400
  473. '<b><font color = <<$SplTxtColGood>>><<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>> surges with life, feeling much stronger.</font></b>'
  474. else
  475. '<b>The spell fizzles. Nothing seems to happen.</b>'
  476. end
  477. end
  478. if $ARGS[0] = 'hand':
  479. if SuccessValue > 0:
  480. TargetStren = dyneval('result=<<$TargetType>>_stren[<<TargetNumber>>]')
  481. TargetStrenDelta = TargetStren*20*SuccessValue/100
  482. TargetStrenBase = TargetStren*10
  483. dynamic $spellFunc['UpdateAttrib'], 'stren', $TargetType, TargetNumber, '=', RAND(TargetStrenBase - TargetStrenDelta,TargetStrenBase + TargetStrenDelta)
  484. '<b><font color = <<$SplTxtColGood>>>Power flows from the hands of <<dyneval($spellFunc["GetCombatantName"], $TargetType, TargetNumber)>>.</font></b>'
  485. killvar 'TargetStren'
  486. killvar 'TargetStrenDelta'
  487. killvar 'TargetStrenBase'
  488. else
  489. '<b>The spell fizzles. Nothing seems to happen.</b>'
  490. end
  491. end
  492. if $ARGS[0] = 'scaldingtouch':
  493. if SuccessValue > 0:
  494. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100 * SuccessValue
  495. '<b><font color = <<$SplTxtColGood>>>Flames spring from your hands.</font></b>'
  496. else
  497. '<b>The spell fizzles. Nothing seems to happen.</b>'
  498. end
  499. end
  500. if $ARGS[0] = 'burninghands':
  501. if SuccessValue > 0:
  502. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 250 * SuccessValue
  503. '<b><font color = <<$SplTxtColGood>>>A torrent of flames jets from your hands.</font></b>'
  504. else
  505. '<b>The spell fizzles. Nothing seems to happen.</b>'
  506. end
  507. end
  508. if $ARGS[0] = 'firebarrier':
  509. if SuccessValue > 0:
  510. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', SuccessValue * 200
  511. '<b><font color = <<$SplTxtColGood>>>A flaming barrier springs up between you and your opponents.</font></b>'
  512. else
  513. '<b>The spell fizzles. Nothing seems to happen.</b>'
  514. end
  515. end
  516. if $ARGS[0] = 'firestorm':
  517. if SuccessValue > 0:
  518. dynamic $spellFunc['ApplyDamageToAll'], $TargetType, (200 * SuccessValue)
  519. '<b><font color = <<$SplTxtColGood>>>Uncountable glowing embers streak down upon the foes of <<dyneval($spellFunc["GetCombatantName"], $CasterType, CasterNumber)>>.</font></b>'
  520. elseif SuccessValue < 0:
  521. dynamic $spellFunc['ApplyDamageToAll'], $TargetType, 200
  522. dynamic $spellFunc['ApplyDamageToAll'], $CasterType, 100
  523. '<b><font color = <<$SplTxtColBad>>>The spell backfires! Uncountable glowing embers streak down upon the battlefield, burning everyone.</font></b>'
  524. else
  525. '<b>The spell fizzles. Nothing seems to happen.</b>'
  526. end
  527. end
  528. if $ARGS[0] = 'flameshield':
  529. if SuccessValue > 0:
  530. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', SuccessValue * 250
  531. '<b><font color = <<$SplTxtColGood>>>A Shield made of flames interposes itself between <<dyneval($spellFunc["GetCombatantName"], $CasterType, CasterNumber)>> and the enemy.</font></b>'
  532. else
  533. '<b>The spell fizzles. Nothing seems to happen.</b>'
  534. end
  535. end
  536. if $ARGS[0] = 'shock':
  537. if SuccessValue > 0:
  538. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100 * SuccessValue
  539. '<b><font color = <<$SplTxtColGood>>>You build a static electric charge in your hand and zap your opponent.</font></b>'
  540. elseif SuccessValue < 0:
  541. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 50
  542. '<b><font color = <<$SplTxtColBad>>>The spell backfires! You manage to zap yourself with a static charge.</font></b>'
  543. else
  544. '<b>The spell fizzles. Nothing seems to happen.</b>'
  545. end
  546. end
  547. if $ARGS[0] = 'lightning':
  548. if SuccessValue > 0:
  549. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 200 * SuccessValue
  550. '<b><font color = <<$SplTxtColGood>>>You shoot a lightning bolt from your hand, zapping your opponent.</font></b>'
  551. elseif SuccessValue < 0:
  552. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 100
  553. '<b><font color = <<$SplTxtColBad>>>The spell backfires! You manage to zap yourself with lightning.</font></b>'
  554. else
  555. '<b>The spell fizzles. Nothing seems to happen.</b>'
  556. end
  557. end
  558. if $ARGS[0] = 'electricbarrier':
  559. if SuccessValue > 0:
  560. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', SuccessValue * 250
  561. '<b><font color = <<$SplTxtColGood>>>A wall of dancing lightning springs up around yourself.</font></b>'
  562. else
  563. '<b>The spell fizzles. Nothing seems to happen.</b>'
  564. end
  565. end
  566. if $ARGS[0] = '1000birds':
  567. if SuccessValue > 0:
  568. dynamic $spellFunc['ApplyDamageToAll'], $TargetType, (100 * SuccessValue)
  569. gs 'fight', 'applyDamage', $TargetType, TargetNumber, (100 * SuccessValue)
  570. '<b><font color = <<$SplTxtColGood>>>You shoot hundreds of small lightning bolts toward your enemy.</font></b>'
  571. elseif SuccessValue < 0:
  572. dynamic $spellFunc['ApplyDamageToAll'], $TargetType, 100
  573. dynamic $spellFunc['ApplyDamageToAll'], $CasterType, 100
  574. '<b><font color = <<$SplTxtColBad>>>The spell backfires! Hundreds of small lightning bolts curl toward the battlefield, shocking everyone.</font></b>'
  575. else
  576. '<b>The spell fizzles. Nothing seems to happen.</b>'
  577. end
  578. end
  579. if $ARGS[0] = 'dancingsphere':
  580. if SuccessValue > 0:
  581. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', SuccessValue * 500
  582. '<b><font color = <<$SplTxtColGood>>>A large field of lightning dances around you, blocking attacks.</font></b>'
  583. else
  584. '<b>The spell fizzles. Nothing seems to happen.</b>'
  585. end
  586. end
  587. if $ARGS[0] = 'quicksand':
  588. if SuccessValue > 0:
  589. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100 * SuccessValue
  590. '<b><font color = <<$SplTxtColGood>>>You trap your opponent in quicksand.</font></b>'
  591. elseif SuccessValue < 0:
  592. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100
  593. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 50
  594. '<b><font color = <<$SplTxtColBad>>>The spell backfires! You are both trapped in quicksand.</font></b>'
  595. else
  596. '<b>The spell fizzles. Nothing seems to happen.</b>'
  597. end
  598. end
  599. if $ARGS[0] = 'earthshield':
  600. if SuccessValue > 0:
  601. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', SuccessValue * 100 + 250
  602. '<b><font color = <<$SplTxtColGood>>>Tendrils of earth rise to defend you.</font></b>'
  603. else
  604. '<b>The spell fizzles. Nothing seems to happen.</b>'
  605. end
  606. end
  607. if $ARGS[0] = 'abyss':
  608. if SuccessValue > 0:
  609. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 250 * SuccessValue
  610. '<b><font color = <<$SplTxtColGood>>>The Earth opens up beneath your opponent''s feet, slamming shut damaging him and depriving him of the ability to move.</font></b>'
  611. elseif SuccessValue < 0:
  612. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 250
  613. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 200
  614. '<b><font color = <<$SplTxtColBad>>>The spell backfires! The Earth opens up beneath your opponent''s feet, slamming shut damaging him and depriving him of the ability to move. You are also caught.</font></b>'
  615. else
  616. '<b>The spell fizzles. Nothing seems to happen.</b>'
  617. end
  618. end
  619. if $ARGS[0] = 'earthguardian':
  620. if SuccessValue > 0:
  621. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', SuccessValue * 500
  622. '<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>'
  623. else
  624. '<b>The spell fizzles. Nothing seems to happen.</b>'
  625. end
  626. end
  627. if $ARGS[0] = 'sando':
  628. if SuccessValue > 0:
  629. gs 'fight', 'applyDamage', $TargetType, TargetNumber, (250 * SuccessValue)
  630. '<b><font color = <<$SplTxtColGood>>>Two huge plates of earth collapse together, crushing the enemy and depriving him of the ability to move.</font></b>'
  631. elseif SuccessValue < 0:
  632. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 50
  633. '<b><font color = <<$SplTxtColBad>>>The spell backfires! Two huge plates of earth collapse together with crushing force, but the enemy is missed and you are instead caught.</font></b>'
  634. else
  635. '<b>The spell fizzles. Nothing seems to happen.</b>'
  636. end
  637. end
  638. if $ARGS[0] = 'windgust':
  639. if SuccessValue > 0:
  640. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100 * SuccessValue
  641. '<b><font color = <<$SplTxtColGood>>>You create a gust of wind.</font></b>'
  642. if dyneval('result=<<$TargetType>>_clone[<<TargetNumber>>]') > 0:
  643. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '=', 0
  644. '<b><font color = <<$SplTxtColGood>>>Enemy clones are vaporized.</font></b>'
  645. end
  646. if dyneval('result=<<$TargetType>>_fog[<<TargetNumber>>]') > 0:
  647. dynamic $spellFunc['UpdateAttrib'], 'fog', $TargetType, TargetNumber, '=', 0
  648. '<b><font color = <<$SplTxtColGood>>>Enemy fog is torn to shreds by the wind.</font></b>'
  649. end
  650. else
  651. '<b>The spell fizzles. Nothing seems to happen.</b>'
  652. end
  653. end
  654. if $ARGS[0] = 'pressure':
  655. if SuccessValue > 0:
  656. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 200 * SuccessValue
  657. '<b><font color = <<$SplTxtColGood>>>You dramatically raise the air pressure.</font></b>'
  658. if dyneval('result=<<$TargetType>>_clone[<<TargetNumber>>]') > 0:
  659. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '=', 0
  660. '<b><font color = <<$SplTxtColGood>>>Enemy clones are vaporized.</font></b>'
  661. end
  662. if dyneval('result=<<$TargetType>>_fog[<<TargetNumber>>]') > 0:
  663. dynamic $spellFunc['UpdateAttrib'], 'fog', $TargetType, TargetNumber, '=', 0
  664. '<b><font color = <<$SplTxtColGood>>>Enemy fog is torn to shreds by the wind.</font></b>'
  665. end
  666. else
  667. '<b>The spell fizzles. Nothing seems to happen.</b>'
  668. end
  669. end
  670. if $ARGS[0] = 'vacuum':
  671. if SuccessValue > 0:
  672. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', SuccessValue * 250
  673. '<b><font color = <<$SplTxtColGood>>>A turbulent sphere of vacuum surrounds you, blocking incoming attacks. You now have <<defence>> protection units.</font></b>'
  674. else
  675. '<b>The spell fizzles. Nothing seems to happen.</b>'
  676. end
  677. end
  678. if $ARGS[0] = 'vacuumshells':
  679. if SuccessValue > 0:
  680. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 250 * SuccessValue
  681. '<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>'
  682. if dyneval('result=<<$TargetType>>_clone[<<TargetNumber>>]') > 0:
  683. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '=', 0
  684. '<b><font color = <<$SplTxtColGood>>>Enemy clones are vaporized.</font></b>'
  685. end
  686. if dyneval('result=<<$TargetType>>_fog[<<TargetNumber>>]') > 0:
  687. dynamic $spellFunc['UpdateAttrib'], 'fog', $TargetType, TargetNumber, '=', 0
  688. '<b><font color = <<$SplTxtColGood>>>Enemy fog is torn to shreds by the wind.</font></b>'
  689. end
  690. else
  691. '<b>The spell fizzles. Nothing seems to happen.</b>'
  692. end
  693. end
  694. if $ARGS[0] = 'devouringvacuum':
  695. if SuccessValue > 0:
  696. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '=', 0
  697. '<b><font color = <<$SplTxtColGood>>>A devouring vacuum sucks away your enemy''s defenses.</font></b>'
  698. else
  699. '<b>The spell fizzles. Nothing seems to happen.</b>'
  700. end
  701. end
  702. if $ARGS[0] = 'leechmana':
  703. if SuccessValue > 0:
  704. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 100
  705. damTipM = 1000
  706. dynamic $spellFunc['UpdateAttrib'], 'mana', $CasterType, CasterNumber, '+', 100
  707. '<b><font color = <<$SplTxtColGood>>>You leech mana from your enemy.</font></b>'
  708. elseif SuccessValue < 0:
  709. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 50
  710. '<b><font color = <<$SplTxtColBad>>>The spell backfires! Ouch!</font></b>'
  711. else
  712. '<b>The spell fizzles. Nothing seems to happen.</b>'
  713. end
  714. end
  715. if $ARGS[0] = 'flood':
  716. if SuccessValue > 0:
  717. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 200 * SuccessValue
  718. '<b><font color = <<$SplTxtColGood>>>A surge of water rises towards your enemy.</font></b>'
  719. elseif SuccessValue < 0:
  720. gs 'fight', 'applyDamage', $CasterType, CasterNumber, 100
  721. '<b><font color = <<$SplTxtColBad>>>The spell backfires! A surge of water rises towards your enemy, but misses and hits you.</font></b>'
  722. else
  723. '<b>The spell fizzles. Nothing seems to happen.</b>'
  724. end
  725. end
  726. if $ARGS[0] = 'blister':
  727. if SuccessValue > 0:
  728. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', 500
  729. '<b><font color = <<$SplTxtColGood>>>A protective sphere of water surrounds you.</font></b>'
  730. else
  731. '<b>The spell fizzles. Nothing seems to happen.</b>'
  732. end
  733. end
  734. if $ARGS[0] = 'sharkrockets':
  735. if SuccessValue > 0:
  736. gs 'fight', 'applyDamage', $TargetType, TargetNumber, 150 * SuccessValue
  737. '<b><font color = <<$SplTxtColGood>>>Blobs of water shaped like sharks fly towards your enemy, striking them.</font></b>'
  738. if dyneval('result=<<$TargetType>>_clone[<<TargetNumber>>]') > 0:
  739. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '=', 0
  740. '<b><font color = <<$SplTxtColGood>>>Enemy clones are vaporized.</font></b>'
  741. end
  742. else
  743. '<b>The spell fizzles. Nothing seems to happen.</b>'
  744. end
  745. end
  746. if $ARGS[0] = 'greatflood':
  747. if SuccessValue > 0:
  748. dynamic $spellFunc['UpdateAttrib'], 'shield', $TargetType, TargetNumber, '+', 1000
  749. '<b><font color = <<$SplTxtColGood>>>You have filled the whole neighborhood with water, protecting you and devouring enemy mana.</font></b>'
  750. if dyneval('result=<<$TargetType>>_clone[<<TargetNumber>>]') > 0:
  751. dynamic $spellFunc['UpdateAttrib'], 'clone', $TargetType, TargetNumber, '=', 0
  752. '<b><font color = <<$SplTxtColGood>>>Enemy clones are vaporized.</font></b>'
  753. end
  754. else
  755. '<b>The spell fizzles. Nothing seems to happen.</b>'
  756. end
  757. end
  758. killvar 'SuccessValue'
  759. killvar '$TargetType'
  760. killvar 'TargetNumber'
  761. killvar '$CasterType'
  762. killvar 'CasterNumber'
  763. --- spell ---------------------------------