spell.qsrc 31 KB

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