Repository navigation
Expand file tree
/
Copy pathdevelopersTesting.t
More file actions
244 lines (208 loc) · 5.5 KB
/
Copy pathdevelopersTesting.t
File metadata and controls
244 lines (208 loc) · 5.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
#charset "us-ascii"
#include <adv3.h>
#include <en_us.h>
#ifdef __DEBUG
#define dbgNoun(x) vocabWords = x
#else
#define dbgNoun(x)
#endif
versionInfo: GameID
IFID = 'bfb43744-7f25-4149-99f0-d7d22305281d'
name = 'Basic Lib'
byline = 'by Th31AndOnly '
htmlByline = 'by <a href="mailto:your-email@host.com">
Th31AndOnly </a>'
version = '1'
authorEmail = 'Th31AndOnly <your-email@host.com>'
desc = '#!'
htmlDesc = '#!'
;
gameMain: GameMainDef
initialPlayerChar = me
;
me : Actor
location = startRoom
;
newRoom : Room 'New Room' 'the new room'
"It's new!"
north = startRoom
dbgNoun('New Room')
;
startRoom: Room 'Start Room'
"This is the starting room. "
north = newRoom
northDirLoc = 'north'
dbgNoun('Start Room')
;
+ table : Table, Heavy 'old first table' 'first table'
"It's a mohogany table."
;
++ pen : Thing 'pen' 'pen'
"A fountain pen."
subLocation = &subSurface
;
+ cabinet : Cabinet, Fixture 'cabinet' 'cabinet'
"Cabinet."
;
++ flowerpot : Thing 'flowerpot' 'flowerpot'
"It's very pretty."
subLocation = &subUnderside
;
+ tallTable : TallTable, Heavy 'tall table' 'tall table'
"Ornate and grand, it's high in the room."
;
++ book : Thing 'book' 'book'
"Ooh, it's Gordon Korman's new book!"
subLocation = &subRear
;
+ useless : Table 'useless table' 'useless table'
"It's terrible and useless."
isListed = true
;
+ box : GeneralBox 'cardboard box' 'cardboard box'
"It's not even made out of cards, and don't get me started on the fact that
you can't surf on this thing."
allowOn(obj) { return true; }
allowUnder(obj) { return obj == flowerpot; }
;
+ sofa : Sofa 'sofa' 'sofa'
"It's a sofa."
;
+ bob : Person
desc = "It's finally Bob!"
name = 'bob'
isProperName = true
isHim = true
vocabWords = 'bob'
obeyCommand(fromActor, action)
{
if(action.baseActionClass is in (SitOnAction, GetOffOfAction))
return true;
else
return inherited(fromActor, action);
}
;
+ bobette : Person
desc = "It's finally Bobette!"
name = 'bobette'
isProperName = true
isHer = true
vocabWords = 'bobette'
obeyCommand(fromActor, action)
{
if(action.baseActionClass is in (SitOnAction, GetOffOfAction))
return true;
else
return inherited(fromActor, action);
}
;
+ boberella : Person
desc = "It's finally Boberella!"
name = 'boberella'
isProperName = true
isIt = true
vocabWords = 'boberella'
obeyCommand(fromActor, action)
{
if(action.baseActionClass is in (SitOnAction, GetOffOfAction))
return true;
else
return inherited(fromActor, action);
}
;
+ thing : Thing 'thing' 'thing'
desc = "<<(cube.self_).desc>>"
;
+ cube : Transformable, Thing 'cube' 'cube'
"It's a <<script3.run('cube')>>. <<script1.end()>>"
dobjFor(Examine) {
action() { inherited(); self.transform(); }
}
referenceObj = sphere
;
+ pyramid : Transformable, Thing 'pyramid' 'pyramid'
"Weird... It seems to shift as you look at it..."
dobjFor(Examine) {
action() { inherited(); self.transform(); }
}
referenceObj = triangle
;
+ glassObject : Breakable, Thing 'glass object' 'glass object'
"It's very fragile -- better not drop it."
dobjFor(Drop) {
action() {
makeBroken(!broken);
if(!broken) {
setMethod(&desc, {: "Crazy!"});
updateStandardDesc();
}
inherited();
}
}
;
+ ice : Burnable, Thing 'ice cube' 'ice cube'
"ICE!"
melted = nil
dobjFor(Burn) {
verify() { }
action() {
if(!burnt)
makeBurnt(true);
else
melt();
}
}
;
triangle : Transformable, Thing 'triangle' 'triangle'
"Weird... It seems to shift as you look at it..."
dobjFor(Examine) {
action() { inherited(); self.transform(); }
}
referenceObj = pyramid
;
sphere : Thing 'sphere' 'sphere'
"It's a sphere. <<script2.run(script2.targetActor, nil)>>"
;
script1 : RunningScript
run(isDaemon) {
"Hey!";
return 'Hey!';
}
runEvery = 3
;
/*
* You can make it like a Fuse by using end()
*/
script2 : ActorScript
run(actor, isDaemon) {
if(isDaemon)
actor.name = 'not bob';
else
actor.name = 'not not bob';
end();
}
targetActor = bob
runEvery = 2
;
script3 : RunningScript
/*
* It's perfectly legal to pass custom parameters into it, as long as you
* prevent the daemon from running it. Or else it would try to run it with
* the wrong params and you'd get errors/faulty code. Use a seperate
* script object to pass whatever params you choose into it.
*/
run(customParam) {
return customParam;
}
/* This prevents a Daemon from automatically running it. */
runEvery = nil
;
/*
* They can be as simple as this, though note you can't reference it without a
* variable. Is a bit annoying, so I commented it out.
*/
//RunningScript
// run(isDaemon) {
// "I'm being run by a RunningScript!";
// }
//;