spell.qsrc 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887
  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 = iif(isnum($ARGS[1]),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. end
  146. if $ARGS[0] = 'regenerate':
  147. if SuccessValue > 0:
  148. ! How much health is gained per minute
  149. regenVal = 5 * SuccessValue
  150. ! Immediate health gain
  151. pcs_health += regenVal
  152. ! If Regenerate is already running, we only extend.
  153. regenArrIdx = arrpos('$spellTimeName','regenerate')
  154. if regenArrIdx > -1:
  155. ! if it''s found, then update only
  156. spellComplete[regenArrIdx] = totminut + 120
  157. $spellCompExec[regenArrIdx] = 'pcs_health += (5 * <<regenVal>>)'
  158. $spellTickExec[regenArrIdx] = 'pcs_health += <<regenVal>>'
  159. else
  160. ! Add Timer:
  161. ! spellName = 'regenerate'
  162. ! duration = 120
  163. ! CompCode = 'pcs_health += (5 * <<regenVal>>)'
  164. ! TickCode = 'pcs_health += <<regenVal>>'
  165. gs 'spellTimer', 'add', 'regenerate', 120, 'pcs_health += (5 * <<regenVal>>)', 'pcs_health += <<regenVal>>'
  166. end
  167. msg '<b><font color = <<$SplTxtColGood>>>Your body surges with life. You feel better already.</font></b>'
  168. killvar 'regenVal'
  169. killvar 'regenArrIdx'
  170. gs 'stat'
  171. else
  172. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  173. end
  174. end
  175. if $ARGS[0] = 'painblock':
  176. if SuccessValue > 0:
  177. pain['killer'] = 1
  178. msg '<b><font color = <<$SplTxtColGood>>>Your pain recedes into a dull throb.</font></b>'
  179. gs 'stat'
  180. else
  181. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  182. end
  183. end
  184. if $ARGS[0] = 'curedisease':
  185. if SuccessValue > 0:
  186. ! Cure Diseses
  187. dynamic $cheatmenu['std_cure']
  188. ! Cause pain where diseases burned out
  189. pain['head'] += 10
  190. pain['nose'] += 10
  191. pain['mouth'] += 10
  192. pain['lips'] += 10
  193. pain['throat'] += 10
  194. pain['asshole'] += 10
  195. pain['chest'] += 10
  196. pain['tummy'] += 10
  197. pain['urethra'] += 10
  198. pain['vaginal'] += 10
  199. ! You do not feel good
  200. pcs_mood -= 30
  201. msg '<b><font color = <<$SplTxtColGood>>>You burst into a high fever. You feel terrible, but you know you are now healthy.</font></b>'
  202. gs 'stat'
  203. else
  204. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  205. end
  206. end
  207. if $ARGS[0] = 'curewounds':
  208. if SuccessValue > 0:
  209. ! Remove some pain
  210. gs 'medical_din','healthTreatment'
  211. gs 'medical_din','healthTreatment'
  212. msg '<b><font color = <<$SplTxtColGood>>>You feel yourself coursing with life. You feel better already.</font></b>'
  213. gs 'stat'
  214. else
  215. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  216. end
  217. end
  218. if $ARGS[0] = 'curewounds2':
  219. if SuccessValue > 0:
  220. ! Remove all pain
  221. killvar 'pain'
  222. killvar 'vgape'
  223. killvar 'agape'
  224. killvar 'spanked'
  225. killvar 'spankedtime'
  226. pcs_health = pcs_vital * 10 + pcs_stren * 5 + 1000
  227. msg '<b><font color = <<$SplTxtColGood>>>You feel yourself coursing with life. All pain is gone.</font></b>'
  228. gs 'stat'
  229. else
  230. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  231. end
  232. end
  233. if $ARGS[0] = 'berserk':
  234. if SuccessValue > 0:
  235. spellArrIdx = arrpos('$spellTimeName','berserk')
  236. pain['killer'] = 1
  237. if spellArrIdx > -1:
  238. ! if it''s found, then update only
  239. spellComplete[spellArrIdx] = totminut + 120
  240. else
  241. ! Save current Health percentage, since changing these stats will change healthmax
  242. healthPercent = pcs_health * 100 / healthmax
  243. staminPercent = pcs_stam * 100 / stammax
  244. ! Boost Stats
  245. stren_lvl += 200
  246. stren_lvlst += 200
  247. stren_muta += 4
  248. agil_lvl += 200
  249. agil_lvlst += 200
  250. agil_muta += 4
  251. vital_lvl += 200
  252. vital_lvlst += 200
  253. vital_muta += 4
  254. !gs 'stat_sklattrib'
  255. ! Run stats to recalculate max health
  256. gs 'stat'
  257. ! Update health to be appropiate percentage of new healthmax
  258. pcs_health = (healthPercent * healthmax / 100) + 1
  259. pcs_stam = (staminPercent * stammax) + 1
  260. ! Add Timer to remove this effect after tiem period
  261. $berserkCode={
  262. ! Return Stats to normal
  263. stren_lvl -= 200
  264. stren_lvlst -= 200
  265. stren_muta -= 4
  266. agil_lvl -= 200
  267. agil_lvlst -= 200
  268. agil_muta -= 4
  269. vital_lvl -= 200
  270. vital_lvlst -= 200
  271. vital_muta -= 4
  272. }
  273. gs 'spellTimer', 'add', 'berserk', 120, $berserkCode, ''
  274. end
  275. msg '<b><font color = <<$SplTxtColGood>>>You feel a huge adrenalin surge. You begin looking for someone to battle.</font></b>'
  276. gs 'stat'
  277. else
  278. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  279. end
  280. killvar 'spellArrIdx'
  281. killvar 'berserkCode'
  282. killvar 'healthPercent'
  283. killvar 'staminPercent'
  284. end
  285. if $ARGS[0] = 'shower':
  286. if SuccessValue > 0:
  287. ! Take a Shower
  288. if hypnoAddict = 0:
  289. cumspclnt = 1
  290. else
  291. cumspclnt = 18
  292. end
  293. gs 'cum_cleanup'
  294. ! Remove graffiti from self
  295. body_write = 0
  296. face_write = 0
  297. lactation['lactmess'] = 0
  298. pcs_sweat = 10
  299. ! Brush Teeth
  300. pcs_breath = 1
  301. msg '<b><font color = <<$SplTxtColGood>>>You feel clean and refreshed.</font></b>'
  302. gs 'stat'
  303. else
  304. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  305. end
  306. end
  307. if $ARGS[0] = 'glamour':
  308. if SuccessValue > 0:
  309. ! Add large bonus to appearance.
  310. pcs_apprncbase += 150
  311. ! Add Timer to remove Appearance bonus after 2 hours
  312. ! spellName = 'glamour'
  313. ! duration = 120
  314. ! CompCode = 'pcs_apprncbase -= 150' Remove bonus
  315. ! TickCode = '' Do nothing
  316. gs 'spellTimer', 'add', 'glamour', 120, 'pcs_apprncbase -= 150', ''
  317. msg '<b><font color = <<$SplTxtColGood>>>You feel gorgeous. People will love you.</font></b>'
  318. gs 'stat'
  319. else
  320. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  321. end
  322. end
  323. if $ARGS[0] = 'alterself':
  324. if SuccessValue > 0:
  325. ! Stop Reputation accumulation.
  326. !TODO
  327. msg '<b><font color = <<$SplTxtColGood>>>Your features change. Your own mother wouldn''t recognize you.</font></b>'
  328. gs 'stat'
  329. else
  330. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  331. end
  332. end
  333. if $ARGS[0] = 'makeup':
  334. if SuccessValue > 0:
  335. ! Argument should be 3 digit string representing Makeup to apply
  336. $MakeupArg = $ARGS[2]
  337. if $MakeupArg = '': $MakeupArg = '210'
  338. ! Arg[0] = Makeup Amount (0-4)
  339. MakeupArg[0] = val(mid($MakeupArg,1,1))
  340. ! Arg[1] = Lip Balm application (0-1)
  341. MakeupArg[1] = val(mid($MakeupArg,2,1))
  342. ! Arg[2] = False lash Application (0-2)
  343. MakeupArg[2] = val(mid($MakeupArg,3,1))
  344. ! Brush hair
  345. pcs_hairbsh = 1
  346. ! Apply Makeup the +1 to avoid ruined makeup
  347. pcs_makeup = MakeupArg[0] + 1
  348. ! Apply Lipbalm
  349. pcs_lipbalm += 8*MakeupArg[1]
  350. ! Apply False Lashes
  351. if MakeupArg[2] = 1 and pcs_lashes < 3:
  352. pcs_lashes = 3
  353. elseif MakeupArg[2] = 2 and pcs_lashes < 4:
  354. pcs_lashes = 4
  355. end
  356. killvar 'MakeupArg'
  357. killvar '$MakeupArg'
  358. msg '<b><font color = <<$SplTxtColGood>>>Makeup is applied to your face.</font></b>'
  359. gs 'stat'
  360. else
  361. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  362. end
  363. end
  364. if $ARGS[0] = 'cosmetica':
  365. if SuccessValue > 0:
  366. ! Take a Shower
  367. if hypnoAddict = 0:
  368. cumspclnt = 1
  369. else
  370. cumspclnt = 18
  371. end
  372. gs 'cum_cleanup'
  373. lactation['lactmess'] = 0
  374. pcs_sweat = 10
  375. ! Brush Teeth
  376. pcs_breath = 1
  377. ! Remove graffiti from self
  378. body_write = 0
  379. face_write = 0
  380. ! Enema
  381. klismaday = daystart
  382. klismaday1 = 1
  383. ! Brush hair
  384. pcs_hairbsh = 1
  385. ! Apply Makeup
  386. pcs_makeup = 3
  387. !if shave_menu = 0:nothing
  388. !if shave_menu = 1:legs and pussy
  389. !if shave_menu = 2:pussy only
  390. !if shave_menu = 3:legs only
  391. if shave_menu = 1 or shave_menu = 3:
  392. ! Shave Legs
  393. pcs_leghair = 0
  394. end
  395. if shave_menu = 1 or shave_menu = 2:
  396. ! Shave Pubes
  397. if pubestyle = 1:
  398. pcs_pubes = 1
  399. elseif (pubestyle >= 2 and pubestyle <= 9) or pubestyle >= 12:
  400. pcs_pubes = 16
  401. elseif pubestyle = 10 and pcs_pubes > 29:
  402. pcs_pubes = 26
  403. elseif pubestyle = 11 and pcs_pubes > 10:
  404. pcs_pubes = 0
  405. end
  406. end
  407. msg '<b><font color = <<$SplTxtColGood>>>You feel beautiful.</font></b>'
  408. gs 'stat'
  409. else
  410. msg '<b><font color="red">The spell fizzles. Nothing seems to happen.</b>'
  411. end
  412. end
  413. if $ARGS[0] = 'penisenvy':
  414. '<center><img <<$set_imgh>> src="images/pc/magic/cast_spell.jpg"></center>'
  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 focus your energy and cast the spell Penis Envy, you see the swirl of magical energies, you know no one else can see it. Slowly the magical energies stop swirling and enter into the dildo attached to your strapon harness. You feel the strapon harness meld into your body, while you feel the dildo twitch, and then suddenly you can feel it as if you really had a dick of your own and it feels wonderful.</font></b>'
  425. else
  426. msg '<b><font color="red">You focus your energy and cast the spell Penis Envy, you see the swirl of magical energies, you know no one else can see it. Slowly the magical energies stop swirling and start to enter into the dildo attached to your strapon harness. Just as it seems it is about to work, the energies begin to crackle and fizzle, instead of fully enter the dildo the magical energies dissipate. 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 ---------------------------------