changeset 542:680c1c5e91ec

Made prgetspelltype() "static"
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 27 Oct 2006 21:56:59 +0000
parents 9b316c981d99
children 166a101fbaa2
files ggrtf-magical.tf
diffstat 1 files changed, 19 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ggrtf-magical.tf	Fri Oct 27 21:53:43 2006 +0000
+++ b/ggrtf-magical.tf	Fri Oct 27 21:56:59 2006 +0000
@@ -65,7 +65,7 @@
 ;; Spell names per type (for blast damage analysis and reporting)
 /set gspell_type_mana=aneurysm|banish demons|cause critical wounds|cause light wounds|cause serious wounds|channelball|channelray|cleanse heathen|dispel evil|dispel good|dispel undead|drain enemy|earthquake|energy vortex|flames of righteousness|golden arrow|harm body|hemorrhage|holy bolt|holy hand|holy wind|levin bolt|magic eruption|magic missile|magic wave|saintly touch|star light|summon greater spores|summon lesser spores|wither flesh|word of apocalypse|word of blasting|word of destruction|word of genocide|word of oblivion|word of slaughter|word of spite
 /set gspell_type_elec=blast lightning|chain lightning|channelbolt|electrocution|forked lightning|lightning bolt|lightning storm|rune of warding|shocking grasp
-/set gspell_type_fire=channelburn|channelspray|con fioco|fire blast|firebolt|flame arrow|gem fire|lava blast|lava storm|meteor blast|meteor swarm|
+/set gspell_type_fire=channelburn|channelspray|con fioco|fire blast|firebolt|flame arrow|gem fire|lava blast|lava storm|meteor blast|meteor swarm
 
 /set gspell_type_asphyx=black hole|blast vacuum|chaos bolt|strangulation|suffocation|vacuum ball|vacuumbolt|vacuum globe
 /set gspell_type_poison=killing cloud|poison blast|poison spray|power blast|summon carnal spores|thorn spray|venom strike
@@ -240,6 +240,13 @@
 	/set cnt_ghastes=$[cnt_ghastes+1]%;\
 	/mrrounds%;/mrmagic ghastes
 
+;; Cast quick lips
+/def -i -p9999 -aCgreen -msimple -t"ASDFZ." gspell_qlips1 =\
+	/set spell_rleft=$[spell_rleft-2]%;\
+	/set spell_rcount=$[spell_rcount-2]%;\
+	/set cnt_qlips1=$[cnt_qlips1+1]%;\
+	/mrrounds%;/mrmagic ghastes
+
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Battle targetting and resistances
@@ -258,17 +265,17 @@
 ;   invalid input to it, thus a wizard (or player descs etc) could achieve
 ;   such effect.
 ;
-/def -i prgetspelltype =\
-	/if (regmatch(strcat("^(",gspell_type_mana,")$"),{1})) /return "mana"%;\
-	/elseif (regmatch(strcat("^(",gspell_type_elec,")$"),{1})) /return "elec"%;\
-	/elseif (regmatch(strcat("^(",gspell_type_fire,")$"),{1})) /return "fire"%;\
-	/elseif (regmatch(strcat("^(",gspell_type_asphyx,")$"),{1})) /return "asphyx"%;\
-	/elseif (regmatch(strcat("^(",gspell_type_poison,")$"),{1})) /return "poison"%;\
-	/elseif (regmatch(strcat("^(",gspell_type_cold,")$"),{1})) /return "cold"%;\
-	/elseif (regmatch(strcat("^(",gspell_type_acid,")$"),{1})) /return "acid"%;\
-	/elseif (regmatch(strcat("^(",gspell_type_psi,")$"),{1})) /return "psi"%;\
-	/elseif (regmatch(strcat("^(",gspell_type_phys,")$"),{1})) /return "phys"%;\
-	/else /return "???"%;/endif
+/eval /def -i prgetspelltype =\
+	/if (regmatch("^(%{gspell_type_mana})$$",{1})) /return "mana"%%;\
+	/elseif (regmatch("^(%{gspell_type_elec})$$",{1})) /return "elec"%%;\
+	/elseif (regmatch("^(%{gspell_type_fire})$$",{1})) /return "fire"%%;\
+	/elseif (regmatch("^(%{gspell_type_asphyx})$$",{1})) /return "asphyx"%%;\
+	/elseif (regmatch("^(%{gspell_type_poison})$$",{1})) /return "poison"%%;\
+	/elseif (regmatch("^(%{gspell_type_cold})$$",{1})) /return "cold"%%;\
+	/elseif (regmatch("^(%{gspell_type_acid})$$",{1})) /return "acid"%%;\
+	/elseif (regmatch("^(%{gspell_type_psi})$$",{1})) /return "psi"%%;\
+	/elseif (regmatch("^(%{gspell_type_phys})$$",{1})) /return "phys"%%;\
+	/else /return "???"%%;/endif
 
 /def -i prspellhit=\
 	/set resist_spell=%{1}%;/test gbattle_target({2})%;\