changeset 706:43e7e89f47c8

Added support for new style 'Resist Dispel'; Fixed a bug with 'Blurred Image' and 'Displacement' and similar prots with exactly same "up" message, but different prereqs.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 17 Jan 2008 18:38:16 +0000
parents 34ac94969585
children de1ff40be569
files ggrtf.tf
diffstat 1 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ggrtf.tf	Thu Jan 17 18:01:41 2008 +0000
+++ b/ggrtf.tf	Thu Jan 17 18:38:16 2008 +0000
@@ -1,8 +1,8 @@
 ;;
-;; GgrTF v0.6.2.3-svn - TinyFugue script for BatMUD
+;; GgrTF v0.6.3-svn - TinyFugue script for BatMUD
 ;; (C) Copyright 2004-2008 Matti Hämäläinen (Ggr Pupunen)
 ;;
-/set ggrtf_ver=0.6.2.3-svn
+/set ggrtf_ver=0.6.3-svn
 ;;
 ;; This triggerset is Free Software distributed under
 ;; GNU General Public License version 2.
@@ -981,7 +981,7 @@
 
 
 ;; Clear a given list of prot prerequisites
-/def -i prclearprotpreqs =\
+/def -i prclearpreqs =\
 	/while ({#})\
 		/set prot_%{1}_p=0%;\
 		/shift%;\
@@ -1049,13 +1049,13 @@
 		/let qact2= (sticky)%%;/set prot_%{opt_i}_st=1%%;%;\
 		/if (opt_P) \
 			/def -i -p9999 -F -aCyellow -mregexp -t"^([A-Z][a-z]+) utters? the magic words '%{opt_A}'\$" rec_%{opt_i}_A=\
-				/set prot_%{opt_i}_p=1%;\
+				/prclearpreqs %%{lst_cprots}%%;/set prot_%{opt_i}_p=1%;\
 			/test prdefconju(opt_i, opt_i, "You see a %{opt_d} shield fade into existance around you.", qact1)%;\
 			/test prdefconju(opt_i, "%{opt_i}_st", "You see an extra %{opt_d} shield fade into existance around you.", qact2)%;\
 			/let opt_d=Your %{opt_d} shield fades out.%;\
 		/else \
 			/def -i -p9999 -F -aCyellow -mregexp -t"^([A-Z][a-z]+) utters? the magic words '%{opt_A}'\$" rec_%{opt_i}_A=\
-				/prclearprotpreqs %%{lst_cprots}%%;/set prot_%{opt_i}_p=1%;\
+				/prclearpreqs %%{lst_cprots}%%;/set prot_%{opt_i}_p=1%;\
 			/test prdefconju(opt_i, opt_i, "You sense a powerful protective aura around you.", qact1)%;\
 			/test prdefconju(opt_i, "%{opt_i}_st", "You sense an extra powerful protective aura around you.", qact2)%;\
 			/let opt_d=A %{opt_d} flash momentarily surrounds you and then vanishes.%;\
@@ -1067,9 +1067,9 @@
 		/if (opt_u=~"" | opt_d=~"") /break%;/endif%;\
 		/if (opt_r) /let _qmatch=regexp%;/else /let _qmatch=simple%;/endif%;\
 		/let pstr=0%;\
-		/if (opt_A!~"") /let pstr=1%;/def -i -p9999 -F -aCyellow -mregexp -t'%{opt_A}' rec_%{opt_i}_A=/set prot_%{opt_i}_p=1%;/endif%;\
-		/if (opt_B!~"") /let pstr=2%;/def -i -p9999 -F -aCyellow -mregexp -t'%{opt_B}' rec_%{opt_i}_B=/if (prot_%{opt_i}_p == 1) /set prot_%{opt_i}_p=2%%;/endif%;/endif%;\
-		/if (opt_C!~"") /let pstr=3%;/def -i -p9999 -F -aCyellow -mregexp -t'%{opt_C}' rec_%{opt_i}_C=/if (prot_%{opt_i}_p == 2) /set prot_%{opt_i}_p=3%%;/endif%;/endif%;\
+		/if (opt_A!~"") /let pstr=1%;/def -i -p9999 -F -aCyellow -mregexp -t'%{opt_A}' rec_%{opt_i}_A=/prclearpreqs %%{lst_prots}%%;/set prot_%{opt_i}_p=1%;/endif%;\
+		/if (opt_B!~"") /let pstr=2%;/def -i -p9999 -F -aCyellow -mregexp -t'%{opt_B}' rec_%{opt_i}_B=/if (prot_%{opt_i}_p == 1) /prclearpreqs %%{lst_prots}%%;/set prot_%{opt_i}_p=2%%;/endif%;/endif%;\
+		/if (opt_C!~"") /let pstr=3%;/def -i -p9999 -F -aCyellow -mregexp -t'%{opt_C}' rec_%{opt_i}_C=/if (prot_%{opt_i}_p == 2) /prclearpreqs %%{lst_prots}%%;/set prot_%{opt_i}_p=3%%;/endif%;/endif%;\
 		/if (pstr > 0)\
 			/def -i -p9999 -F -aCgreen -m%{_qmatch} -t'%{opt_u}' rec_%{opt_i}_on=/if (prot_%{opt_i}_p==%{pstr})/pron %{opt_i}%%;/endif%%;/set prot_%{opt_i}_p=0%;\
 		/else \
@@ -1118,14 +1118,15 @@
 	/eval /set qtval_c=$$[prot_%{1} - 1]%;\
 	/set prot_%{1}=%{qtval_c}%;\
 	/eval /set qtval_l=$$[prot_%{1}_l]%;\
+	/if (qtval_l=~"") /gerror No such prot '%{1}' defined!%;/break%;/endif%;\
 	/eval /set qtval_s=$$[prot_%{1}_stack]%;\
 	/eval /set qtval_t=$$[prot_%{1}_t]%;\
 	/eval /set qtval_h=$$[prot_%{1}_renew]%;\
 	/eval /set qtval_q=$$[prot_%{1}_q]%;\
-	/if (qtval_l=~"") /gerror No such prot '%{1}' defined!%;/break%;/endif%;\
 	/if (qtval_c < 0 & qtval_q) \
 		/gwarning '%{1}' (%{qtval_l}) count %{qtval_c} at /proff!%;\
 		/set prot_%{1}=0%;\
+		/set prot_%{1}_st=0%;\
 		/msr %{qtval_l} OFF!%;\
 		/break%;\
 	/endif%;\
@@ -1133,6 +1134,7 @@
 		/msr %{qtval_l} Weakened! [#%{qtval_c}] $[prgetstime(qtval_t)]%;\
 	/else \
 		/set prot_%{1}=0%;\
+		/set prot_%{1}_st=0%;\
 		/if (!qtval_q & qtval_c < 0)\
 			/msr %{qtval_l} OFF!%;\
 		/else \
@@ -1204,6 +1206,7 @@
 		/if (qtval)\
 			/eval /set qtval_n=$$[prot_%{1}_n]%;\
 			/set prot_%{1}=0%;\
+			/set prot_%{1}_st=0%;\
 			/if (gripstr!~"") \
 				/set gripstr=%{gripstr}, %{qtval_n}%;\
 			/else \
@@ -1353,6 +1356,7 @@
 /prdefprot -i"iwill"	-n"IWill"	-l"Iron Will" -u"You feel protected from being stunned." -d"You feel no longer protected from being stunned."
 /prdefprot -i"rentr"	-n"REntrop"	-l"Resist Entropy" -u"You feel your life force expanding." -d"You feel your hair is getting grayer."
 /prdefprot -i"rdisint"	-n"RDisInt"	-l"Resist Disintegrate" -u"You feel very firm." -d"You feel somewhat weaker."
+/prdefprot -i"rdisp"	-n"RDisp"	-l"Resist Dispel" -u"You feel extra sticky for protection." -d"You feel less sticky."
 
 ;; ---- Conjurer::Minor Typeprots ----
 /prdefprot -i"c_phys"	-n"FAbs"	-l"Force Absorption"	-p -A"ztonez des deckers" -d"skin brown"