annotate gm-hcbat.tf @ 1655:356c3c26aee6

Get rid of ISO-8859-1 in copyrights.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 28 Sep 2021 02:24:25 +0300
parents 113c9a66eaf1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 ;;
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 ;; GgrTF::HC - Hardcore BatMUD support module
1655
356c3c26aee6 Get rid of ISO-8859-1 in copyrights.
Matti Hamalainen <ccr@tnsp.org>
parents: 1454
diff changeset
3 ;; (C) Copyright 2005-2009 Matti Hamalainen (Ggr)
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 ;;
1454
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
6 ;;
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
7 ;; This program is free software; you can redistribute it and/or
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
8 ;; modify it under the terms of the GNU General Public License
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
9 ;; version 2 as published by the Free Software Foundation.
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 ;;
1454
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
11 ;; This program is distributed in the hope that it will be useful,
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
14 ;; file "COPYING.txt" for more details.
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
15 ;;
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
16 ;; You should have received a copy of the GNU General Public License
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
17 ;; along with this program; if not, write to the Free Software
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
18 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
19 ;; MA 02110-1301 USA.
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
20 ;;
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
21 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
22 ;;
113c9a66eaf1 Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents: 1266
diff changeset
23 ;; NOTICE! This file requires GgrTF (version 0.6.15 or later) to be loaded.
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 ;;
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 /loaded GgrTF:HC
1035
c10f8a59a2e3 Use module depencies for checking required parent modules.
Matti Hamalainen <ccr@tnsp.org>
parents: 894
diff changeset
26 /test prdefmodule("HC")
c10f8a59a2e3 Use module depencies for checking required parent modules.
Matti Hamalainen <ccr@tnsp.org>
parents: 894
diff changeset
27
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 ;; Helper functions, etc.
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 /def msq = /echo -p @{BCred}HC@{n}: %*
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 /def msr = /if (opt_verbose=~"on") @@party say %*%;/else /msq %*%;/endif
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 /def msp = /if (opt_verbose=~"on") @@party say %*%;/else /msq %*%;/endif
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 /def mse = /if (opt_verbose=~"on") @@party say emote %*%;/else /msq %*%;/endif
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 /def msb = @@party say %*
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 /def dig_grave = @dig grave
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
40 /def eat_corpse = @get corpse;eat corpse
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 /def get_corpse = @get corpse
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
44 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1180
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
45 ;; HCBat-specific short score handling
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
46 /def -i prgetqd =\
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
47 /return "@{$[prgetnlite({1},{2})]}%{1}@{n}/%{2} $[prgetdiff({1},{3})]"
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
48
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
49 /def -i -F -p9999 -mregexp -t"^H:(-?[0-9]+)/(-?[0-9]+) S:(-?[0-9]+)/(-?[0-9]+) E:(-?[0-9]+)/(-?[0-9]+) \$:(-?[0-9]+) exp:(-?[0-9]+)$" gstatus_sc =\
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
50 /if (opt_gagsc=~"on")\
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
51 /substitute -ag%;\
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
52 /else \
1208
a0afc8bc8529 Fix hcbat module hp/sp/ep diff etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 1180
diff changeset
53 /mss H:$[prgetqd({P1},{P2},status_oldhp)] S:$[prgetqd({P3},{P4},status_oldsp)] E:$[prgetqd({P5},{P6},status_oldep)] \$:%{P7} $[prgetdiff({P7},status_money)] exp:%{P8} $[prgetdiff({P8},status_exp)]%;\
1180
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
54 /endif%;\
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
55 /test gstatus_scupd({P1},{P2},{P3},{P4},{P5},{P6},{P7},{P8})
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
56
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
57
d577aba90f8b Move some hcbat-specific stuff to HCBat module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
58 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59 ;; Lite skills/spells you can train with current exp
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 /def -i -F -p9999 -mregexp -t"^\| ([A-Z][A-Za-z ]+) +\| +([0-9]+) \| +([0-9]+) \| +([0-9]+) \|$" glite_trainexp =\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 /if ({P4} <= status_qexp)\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 /let _tcs=Cgreen%;\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63 /else \
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 /let _tcs=n%;\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 /endif%;\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66 /substitute -p | @{%{_tcs}}%{P1}@{n} | @{%{_tcs}}$[pad({P2},3)]@{n} | @{%{_tcs}}$[pad({P3},3)]@{n} | @{%{_tcs}}$[pad({P4},8)]@{n} |
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
69 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70 ;; Looting and burning (for barb-module hcbat compat)
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 /def lootburn =\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 /set burn_st=1%;\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 /msr Burning corpses!%;\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 @@light torch%;\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 @@use looting and burning%;\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 /repeat -3 1 /gburn_drop
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
77
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
78
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
79 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
80 ;; Unstun (NS)
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
81
1266
7910e501e680 Use /gdef instead of /def where appropriate.
Matti Hamalainen <ccr@tnsp.org>
parents: 1208
diff changeset
82 /gdef -i -F -aCgreen -mregexp -t"^[A-Z][A-Za-z]+\'s chanting appears to do absolutely nothing.$" rec_unstun_on =\
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
83 /gprot_on unstun%;/set prot_unstun_w=0
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
84
1266
7910e501e680 Use /gdef instead of /def where appropriate.
Matti Hamalainen <ccr@tnsp.org>
parents: 1208
diff changeset
85 /gdef -i -F -aCgreen -msimple -t"You are STUNNED." rec_stun_start =\
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
86 /set stun_st=on
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
87
1266
7910e501e680 Use /gdef instead of /def where appropriate.
Matti Hamalainen <ccr@tnsp.org>
parents: 1208
diff changeset
88 /gdef -i -F -aCgreen -mregexp -t"\.\.\.BUT you break it off" rec_stun_mano =\
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
89 /set stun_st=off
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
90
1266
7910e501e680 Use /gdef instead of /def where appropriate.
Matti Hamalainen <ccr@tnsp.org>
parents: 1208
diff changeset
91 /gdef -i -F -aCgreen -mregexp -t" paralyzes you with its mind\.$" rec_paralyzed_start =\
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
92 /gspell_interrupt%;/gskill_interrupt%;/set stun_st=on%;/gprot_off unstun
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
93
1266
7910e501e680 Use /gdef instead of /def where appropriate.
Matti Hamalainen <ccr@tnsp.org>
parents: 1208
diff changeset
94 /gdef -i -F -aCgreen -msimple -t"You are no longer stunned." rec_stun_end =\
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
95 /set stun_st=off%;/msr No longer stunned
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
96
1266
7910e501e680 Use /gdef instead of /def where appropriate.
Matti Hamalainen <ccr@tnsp.org>
parents: 1208
diff changeset
97 /gdef -i -F -aCgreen -msimple -t"It doesn't hurt as much as it normally does!" rec_unstun_off =\
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
98 /gprot_off unstun
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
99
1266
7910e501e680 Use /gdef instead of /def where appropriate.
Matti Hamalainen <ccr@tnsp.org>
parents: 1208
diff changeset
100 /gdef -i -F -aCgreen -msimple -t"It doesn't hurt at all!" rec_unstun_notall =\
894
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
101 /gspell_interrupt%;/gskill_interrupt%;\
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
102 /set prot_unstun_w=$[prot_unstun_w+1]%;\
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
103 /msr Unstun weakened [#%{prot_unstun_w}]%;\
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
104 /gstatus_update
0cecc23b3fc4 Add HC-specific unstun handling, may not work correctly yet; Additional few simple fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 882
diff changeset
105