Mercurial > hg > batmud > ggrtf
view ggrtf-magical.tf @ 63:26d7a55f83e2 dev-0_5_2
Changed copyright texts
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 24 Sep 2005 17:51:56 +0000 |
parents | 27dc6eae5cd7 |
children | 0fc92cc675fc |
line wrap: on
line source
;; ;; GGRTF::Magical - TinyFugue module generic magical stuff & Mage & Channeller @ BatMUD ;; (C) Copyright 2004-2005 Ggr Pupunen ;; ;; This file (triggerset) is Free Software distributed under ;; GNU General Public License version 2. ;; ;; NOTICE! This file requires GGRTF (version 0.5.0 or later) to be loaded. ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Initializing and options ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /deftoggle -n"rmagic" -d"Report magic spells" /deftoggle -n"rresist" -d"Report blast resists" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Fails and fumbles ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Oh no! You feel energy TEAR from your soul and spread throughout the world! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Spellcasting and spell-status reporting ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /def -i msb = /if ({opt_rrounds}=~"on") /msr #%{spell_rleft}%;/endif ;; Start of spell /def -i -p9999 -ag -msimple -t"You start chanting." spell_start =\ /set spell_t=$[time()]%;\ /set cnt_casts=$[cnt_casts + 1]%;\ /set spell_rfirst=on%;\ /set spell_st=on%;\ /set spell_st2=off%;\ /set spell_hastes=0%;\ /set spell_ghastes=0%;\ /set spell_stype=%;\ /if ({opt_info}=~"on") @@cast info%;/endif%;\ /msq @{BCyellow} ---- SPELL START ---- @{n} (@{Cyellow}%{cnt_casts}@{n}) ;; Spell done /def -i -p9999 -ag -msimple -t"You are done with the chant." spell_end =\ /set cnt_trounds=$[cnt_trounds + spell_rcount]%;\ /set cnt_scasts=$[cnt_scasts + 1]%;\ /set spell_st=off%;\ /set spell_st2=on%;\ /set cast_info=%;\ /msq @{Cbggreen} ---- SPELL DONE ---- @{n} in [@{BCred}%{spell_rcount}@{n}] @{BCgreen}rounds!@{n} @{Cyellow}$[prgetstime(spell_t)]@{n} ;; Cast info /def -i -p9999 -ag -mregexp -t"^You are casting \'([a-z ]+)\'.$" spell_info1 =\ /set cast_info=SP%;/set cast_info_n=%{P1}%;/set cast_info_t=%;\ /if ({opt_rmagic}=~"on") @@emote is casting '%{P1}'%;/endif /def -i -p9999 -ag -mregexp -t"^You are casting \'([a-z ]+)\' at \'([A-Za-z ,.'-]+)\'.$" spell_info2 =\ /set cast_info=SP%;/set cast_info_n=%{P1}%;/set cast_info_t=%{P2}%;\ /if ({opt_rmagic}=~"on") @@emote is casting '%{P1}' at '%{P2}'%;/endif ;; Spell failed /def -i spell_fail =\ /if ({spell_st2}=~"on")\ /set cnt_scasts=$[cnt_scasts - 1]%;\ /set cnt_fcasts=$[cnt_fcasts + 1]%;\ /set spell_st2=off%;\ /endif ;; Spell fumbled /def -i spell_fumble =\ /if ({spell_st2}=~"on")\ /set cnt_scasts=$[cnt_scasts - 1]%;\ /set cnt_fucasts=$[cnt_fucasts + 1]%;\ /set spell_st2=off%;\ /endif /def -i -p9999 -aCred -mregexp -t"^You (fail miserably in your|stutter the magic words and fail the) spell.$" spell_fail1 =\ /spell_fail /def -i -p9999 -aCred -mregexp -t"^You .* (spell misfires|spell fizzles).$" spell_fail2 =\ /spell_fail /def -i -p9999 -aCred -mregexp -t"^You (falter and fumble the spell|stumble and lose your concentration.)" spell_fail3 =\ /spell_fail /def -i -p9999 -aCred -mregexp -t"^Your (spell just sputters|concentration fails and so does your spell|mind plays a trick with you and you fail in your spell|concentration drifts away as you think you feel a malignant aura)." spell_fail4 =\ /spell_fail /def -i -p9999 -aCred -msimple -t"Something touches you and spoils your concentration ruining the spell." spell_fail5 =\ /spell_fail /def -i -p9999 -aCred -msimple -t"The spell fails." spell_fail6 =\ /spell_fail ;; Spell interrupted /def -i spell_interrupt =\ /if ({spell_st}=~"on")\ /set cnt_icasts=$[cnt_icasts + 1]%;\ /set spell_st=off%;\ /set cast_info=%;\ /endif /def -i -p9999 -aCred -mregexp -t"^You( interrupt|r movement prevents you from casting| have insufficient strength to cast| do not have enough spell points to cast| lose your concentration and cannot cast) the spell.$" spell_interrupt1 =\ /spell_interrupt /def -i -p9999 -aCred -mregexp -t"^You (get hit SO HARD that you have to stop your spell|lose your concentration and stop your spell casting|massage your wounds and forget your spell).$" spell_interrupt2 =\ /spell_interrupt /def -i -p9999 -aCred -msimple -t"The ground shakes violently! EARTHQUAKE!" spell_interrupt3 =\ /spell_interrupt /def -i -p9999 -aCred -msimple -t"You interrupt the chant in order to start a new chant." spell_interrupt4 =\ /spell_interrupt ;; Spell rounds /def -i -p9999 -ag -mregexp -t"^([A-Z][a-z ]+): (#+)$" spell_status1 =\ /set spell_rleft=$[strlen({P2})]%;\ /echo -p @{Cyellow}%{P1}: %{P2}@{n} [@{BCgreen}%{spell_rleft}@{n}]%;\ /if ({spell_rfirst}=~"on")\ /set spell_rfirst=off%;\ /set spell_rcount=%{spell_rleft}%;\ /if ({battle_st}!~"on") /msb%;/endif%;\ /endif%;\ /if ({spell_rleft} <= 3) /msb%;/endif ;; Cast burden/slow /def -i -p9999 -aCgreen -msimple -t"Your heavy burden slows down your casting." spell_burden =\ /set spell_rleft=$[spell_rleft + 1]%;\ /set spell_rcount=$[spell_rcount + 1]%;\ /msb%;/if ({opt_rmagic}=~"on") @@emote slows down%;/endif ;; Cast haste /def -i -p9999 -aCgreen -msimple -t"You skillfully cast the spell with haste." spell_haste =\ /set spell_rleft=$[spell_rleft - 1]%;\ /set spell_rcount=$[spell_rcount - 1]%;\ /set cnt_hastes=$[cnt_hastes + 1]%;\ /msb%;/if ({opt_rmagic}=~"on") @@emote hastes%;/endif ;; Cast greater haste /def -i -p9999 -aCgreen -msimple -t"You skillfully cast the spell with greater haste." spell_ghaste =\ /set spell_rleft=$[spell_rleft - 2]%;\ /set spell_rcount=$[spell_rcount - 2]%;\ /set cnt_ghastes=$[cnt_ghastes + 1]%;\ /msb%;/if ({opt_rmagic}=~"on") @@emote ghastes%;/endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Miscellaneous ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /def -i -p9999 -aCgreen -msimple -t"You sizzle with magical energy." ent_sizzle =\ /if ({opt_rmagic}=~"on") @@emote vibrates noisily.%;/endif /def -i -p9999 -aCgreen -msimple -t"You surreptitiously conceal your spell casting." ent_conceal =\ /if ({opt_rmagic}=~"on") @@emote conceals ...%;/endif /def -i -p9999 -aCgreen -msimple -t"You feel your skills in handling elemental forces improve." ent_essence =\ /mse gains essence! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Battle targetting and resistances ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /def -i prgetresist = /let rstr=%;\ /if ({1}=~"channelball"|{1}=~"channelray"|{1}=~"golden arrow"|{1}=~"magic missile") /let rstr=mana%;\ /elseif ({1}=~"channelbolt"|{1}=~"electrocution"|{1}=~"lightning bolt"|{1}=~"chain lightning"|{1}=~"shocking grasp"|{1}=~"lightning storm"|{1}=~"blast lightning") /let rstr=elec%;\ /elseif ({1}=~"channelburn"|{1}=~"channelspray"|{1}=~"firebolt"|{1}=~"flame arrow") /let rstr=fire%;\ /elseif ({1}=~"mind blast"|{1}=~"psibolt"|{1}=~"psi blast"|{1}=~"mind disruption"|{1}=~"psychic crush") /let rstr=psi%;\ /endif%;/return rstr /def -i -p9999 -ag -mregexp -t"^You watch with selfpride as your ([a-z ]+) hits (.*)\.$" battle_spellhit =\ /echo -p @{BCcyan}You watch with selfpride as your@{n} @{Cred}%{P1}%{n} @{BCcyan}hits@{n} @{BCgreen}%{P2}@{n}.%;\ /set battle_sname=%{P1}%;/battle_settarget %{P2} /def -i represist =\ /let resist_name=%{-1}%;/let resist_str=???%;/let resist_val=???%;/let resist_col=@{Cwhite}%;\ /if ({1}=1) /let resist_str=screams%; /let resist_val=0%; /let resist_col=@{BCgreen}%;\ /elseif ({1}=2) /let resist_str=writhes%; /let resist_val=20%; /let resist_col=@{Cgreen}%;\ /elseif ({1}=3) /let resist_str=shudders%;/let resist_val=40%; /let resist_col=@{BCyellow}%;\ /elseif ({1}=4) /let resist_str=grunts%; /let resist_val=60%; /let resist_col=@{Cyellow}%;\ /elseif ({1}=5) /let resist_str=winces%; /let resist_val=80%; /let resist_col=@{Cred}%;\ /elseif ({1}=6) /let resist_str=shrugs%; /let resist_val=100%; /let resist_col=@{BCred}%;\ /endif%;\ /let resist_type=$[prgetresist(battle_sname)]%;\ /set battle_sname=%;\ /echo -p @{BCyellow}%{resist_name}@{n} %{resist_col}%{resist_str}@{n} @{BCcyan}%{resist_type}@{n} (@{BCwhite}%{resist_val}%%@{n} resist)%;\ /if ({opt_rresist}=~"on") \ /msr %{resist_val}%% %{resist_type} resist%;\ /endif ; /let resist_type=$[prexeconreturn({lst_spresists},{battle_sname})]%;\ /def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) screams in pain\.$" battle_resist1 = /represist 1 %{P1} /def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) writhes in agony\.$" battle_resist2 = /represist 2 %{P1} /def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) shudders from the force of the attack\.$" battle_resist3 = /represist 3 %{P1} /def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) grunts from the pain\.$" battle_resist4 = /represist 4 %{P1} /def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) winces a little from the pain\.$" battle_resist5 = /represist 5 %{P1} /def -i -p9999 -ag -mregexp -t"^([A-Za-z ,.'-]+) shrugs off the attack\.$" battle_resist6 = /represist 6 %{P1} ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Damage criticality ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /def -i -p9999 -aCgreen -msimple -t'You feel like your spell gained additional power.' ent_dcrit1 =\ /set cnt_damcrits=$[cnt_damcrits + 1]%;\ /set cnt_dcrit1=$[cnt_dcrit1 + 1]%;\ /mse dcrits (1) /def -i -p9999 -aCgreen -msimple -t'You feel like you managed to channel additional POWER to your spell.' ent_dcrit2 =\ /set cnt_damcrits=$[cnt_damcrits + 1]%;\ /set cnt_dcrit2=$[cnt_dcrit2 + 1]%;\ /mse dcrits (2) /def -i -p9999 -aCgreen -msimple -t'Your fingertips are surrounded with swirling ENERGY as you cast the spell.' ent_dcrit3 =\ /set cnt_damcrits=$[cnt_damcrits + 1]%;\ /set cnt_dcrit3=$[cnt_dcrit3 + 1]%;\ /mse dcrits (3) /def -i -p9999 -aCgreen -msimple -t'You feel connected to the very essence of magic.' ent_dcrit4 =\ /set cnt_damcrits=$[cnt_damcrits + 1]%;\ /set cnt_dcrit4=$[cnt_dcrit4 + 1]%;\ /mse is connected to very essence of magic! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Energy Aura ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Aura weakening /def -i -p9999 -aCred -msimple -t"Your aura is starting to weaken!" rec_auraweak =\ /set prot_eaura_weak=on%;/set prot_eaura_weak_t=$[time()]%;\ /status_update%;\ /msr Energy Aura WEAKENING! $[prgetstime(prot_eaura_t)] / $[prgetstime(prot_eaura_t2)] ;; Aura recharged /def -i -p9999 -aCred -mregexp -t"^(Not all is lost, however, you did just recharge your aura|You try your hardest but cannot focus enough energy|You try to focus more magic energy into your aura but get no useful result).$" rec_aurarecharged =\ /set prot_eaura_weak=off%;\ /set prot_eaura_t=$[time()]%;\ /status_update%;\ /msr Energy Aura Reloaded! ;; Aura off /def -i -p9999 -aCred -msimple -t"Your aura of glowing light fades to nothing." rec_aura0 =\ /set prot_eaura_weak=off%;\ /proff eaura ;; Aura changes /def -i -p9999 -aCred -msimple -t"You turn your aura down a step from red to gold." rec_aurach1 =\ /set prot_eaura=1%;/status_update /def -i -p9999 -aCred -msimple -t"You turn your aura down a step from blue to red." rec_aurach2 =\ /set prot_eaura=2%;/status_update ;; Aura on /def -i -p9999 -aCred -msimple -t"Suddenly a softly glowing aura of yellow light comes into being around you." rec_aura1 =\ /pron eaura [Yellow]%;\ /set prot_eaura=1%;\ /set prot_eaura_weak=off%;\ /status_update%;\ /set prot_eaura_t2=%{prot_eaura_t} /def -i -p9999 -aCred -msimple -t"With a burst of energy, your aura changes from soft yellow to bright red." rec_aura2 =\ /pron eaura [Red]%;\ /set prot_eaura=2%;\ /set prot_eaura_weak=off%;\ /status_update%;\ /set prot_eaura_t2=%{prot_eaura_t} /def -i -p9999 -aCred -msimple -t"Tendrils of lightning flit around you as your aura changes from flame red to" rec_aura3 =\ /pron eaura [Blue]%;\ /set prot_eaura=3%;\ /set prot_eaura_weak=off%;\ /status_update%;\ /set prot_eaura_t2=%{prot_eaura_t}