-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathtown.zil
569 lines (537 loc) · 12.8 KB
/
town.zil
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
;"***************************************************************************"
; "game : Arthur"
; "file : TOWN.ZIL"
; "auth : $Author: RAB $"
; "date : $Date: 15 May 1989 16:20:06 $"
; "revs : $Revision: 1.41 $"
; "vers : 1.0"
;"---------------------------------------------------------------------------"
; "Town stuff"
; "Copyright (C) 1989 Infocom, Inc. All rights reserved."
;"***************************************************************************"
;"---------------------------------------------------------------------------"
; "RM-TOWN-GATE"
;"---------------------------------------------------------------------------"
<ROOM RM-TOWN-GATE
(LOC ROOMS)
(DESC "outside town gate")
(FLAGS FL-LIGHTED)
(EAST TO RM-VILLAGE-GREEN)
(NORTH TO RM-FORK-IN-ROAD)
(SW TO RM-MEADOW)
(IN TO RM-VILLAGE-GREEN)
(UP PER RT-FLY-UP)
(GLOBAL LG-TOWN-GATE LG-TOWN LG-WALL RM-MEADOW RM-FORK-IN-ROAD RM-VILLAGE-GREEN)
(ACTION RT-RM-TOWN-GATE)
(THINGS
(THATCH THATCHED WATTLE)
(HUTS HOUSES HUT HOUSE BUILDING BUILDINGS WINDOWS WINDOW) RT-PS-HUTS
)
>
<ROUTINE RT-RM-TOWN-GATE ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL "You are now" standing " just outside">
)
(T
<COND
(<EQUAL? ,OHERE ,RM-VILLAGE-GREEN>
<TELL "You leave the town and pause outside">
)
(<EQUAL? ,OHERE ,RM-FORK-IN-ROAD>
<TELL
"The road takes you southward. Soon you are" walking " alongside the
wall of the town, and you pause outside"
>
)
(T
<TELL "You" walk " to the northeast until you come to">
)
>
)
>
<FSET ,LG-TOWN-GATE ,FL-SEEN>
<FSET ,RM-MEADOW ,FL-SEEN>
<TELL
" the town gate, which lies to the east. A road leads to the north, and to
the southwest is a meadow.|"
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-TOWN-GATE>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(.CONTEXT
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "LG-TOWN-GATE"
;"---------------------------------------------------------------------------"
<OBJECT LG-TOWN-GATE
(LOC LOCAL-GLOBALS)
(DESC "town gate")
(SYNONYM GATE)
(ADJECTIVE TOWN VILLAGE)
(ACTION RT-LG-TOWN-GATE)
>
<ROUTINE RT-LG-TOWN-GATE ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(<NOT <EVERYWHERE-VERB? <COND (,NOW-PRSI 2) (T 1)>>>
<TELL
"The old Roman wall has fallen into disrepair and there is no longer an
actual gate here - merely a gap in the wall where it used to be." CR
>
)
>
>
<ROUTINE RT-PS-HUTS ("OPT" (CONTEXT <>) (ART <>) (CAP? <>))
<FSET ,PSEUDO-OBJECT ,FL-PLURAL>
<FCLEAR ,PSEUDO-OBJECT ,FL-VOWEL>
<COND
(<MC-CONTEXT? ,M-OBJDESC>
<COND
(.ART
<PRINT-ARTICLE ,PSEUDO-OBJECT .ART .CAP?>
)
>
<COND
(<EQUAL? .ART <> ,K-ART-THE ,K-ART-A ,K-ART-ANY>
<COND
(.ART
<TELL " ">
)
>
<TELL "houses">
)
>
)
(.CONTEXT
<RFALSE>
)
(<VERB? EXAMINE>
<THIS-IS-IT ,PSEUDO-OBJECT>
<TELL
"The houses are little more than huts made of wattle and thatch." CR
>
)
(<VERB? ENTER LOOK-IN LOOK-THRU>
<THIS-IS-IT ,PSEUDO-OBJECT>
<TELL
"Closer investigation reveals that the houses are even less interesting than
when seen from a distance." CR
>
)
>
>
;"---------------------------------------------------------------------------"
; "RM-VILLAGE-GREEN"
;"---------------------------------------------------------------------------"
<ROOM RM-VILLAGE-GREEN
(LOC ROOMS)
(DESC "village green")
(FLAGS FL-LIGHTED)
(SYNONYM GREEN)
(ADJECTIVE VILLAGE)
(EAST TO RM-TOWN-SQUARE)
(WEST TO RM-TOWN-GATE)
(OUT TO RM-TOWN-GATE)
(UP PER RT-FLY-UP)
(GLOBAL LG-TOWN-GATE LG-WALL RM-TOWN-SQUARE)
(ACTION RT-RM-VILLAGE-GREEN)
(THINGS
(THATCH THATCHED WATTLE)
(HUTS HOUSES HUT HOUSE BUILDING BUILDINGS WINDOWS WINDOW) RT-PS-HUTS
)
>
<ROUTINE RT-RM-VILLAGE-GREEN ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<TELL "You ">
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL "are" standing " on">
)
(T
<TELL "enter">
)
>
<FSET ,LG-TOWN-GATE ,FL-SEEN>
<FSET ,TH-OAK ,FL-SEEN>
<TELL
" the village green, which is a common area just inside the town's western
defences. The old Roman wall is crumbling into disrepair here, and there is a
gaping hole where the west gate used to be. The town square lies to the east,
and an ancient oak dominates the center of the green, towering over its roots
like an aging druid over a group of prostrated initiates.|"
>
<RFALSE>
)
(<MC-CONTEXT? ,M-BEG>
<COND
(<AND <VERB? DIG>
<MC-PRSO? <> ,ROOMS ,TH-GROUND ,TH-OAK>
>
<COND
(<MC-FORM? ,K-FORM-BADGER>
<COND
(<FSET? ,TH-SWORD ,FL-LOCKED>
<TELL
"There are so many places to dig here, you wouldn't know where to begin." CR
>
)
(<IN? ,TH-OAK-HOLE ,RM-VILLAGE-GREEN>
<TELL The ,WINNER " can't dig any deeper." CR>
)
(T
<MOVE ,TH-OAK-HOLE ,RM-VILLAGE-GREEN>
<THIS-IS-IT ,TH-SWORD>
<TELL
"Dirt starts to fly all around you as your claws dig at a furious pace. Soon
you have dug a nice hole between the roots of the tree. You see a sword
glinting at the bottom of the hole." CR
>
)
>
)
>
)
>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-VILLAGE-GREEN>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(.CONTEXT
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-OAK"
;"---------------------------------------------------------------------------"
<OBJECT TH-OAK
(LOC RM-VILLAGE-GREEN)
(DESC "oak")
(FLAGS FL-NO-DESC)
(SYNONYM OAK TREE ROOTS BRANCH BRANCHES)
(ADJECTIVE OAK ANCIENT)
(GENERIC RT-GN-TREE)
(ACTION RT-TH-OAK)
>
<ROUTINE RT-TH-OAK ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(<VERB? EXAMINE>
<FSET ,TH-OAK ,FL-SEEN>
<COND
(<NOUN-USED? ,TH-OAK ,W?ROOTS>
<TELL
"The gnarled roots clutch the earth like an old man's fingers." CR
>
)
(T
<TELL "It's a majestic old tree with huge gnarled roots." CR>
)
>
)
(<VERB? CLIMB-UP CLIMB-ON>
<TELL
"You clamber up the tree for a quick look around. Unfortunately, you find
nothing of interest, and quickly return to the ground." CR
>
)
(<VERB? LOOK-UNDER>
<SETG CLOCK-WAIT T>
<RT-AUTHOR-MSG ,K-HOW-INTEND-MSG>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-OAK-HOLE"
;"---------------------------------------------------------------------------"
<OBJECT TH-OAK-HOLE
(DESC "hole")
(FLAGS FL-CONTAINER FL-OPEN FL-SEARCH)
(SYNONYM HOLE ;DIRT)
(CAPACITY 50)
(ACTION RT-TH-OAK-HOLE)
>
<ROUTINE RT-TH-OAK-HOLE ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(<VERB? EXAMINE LOOK-IN>
<COND
(<EQUAL? <FIRST? ,TH-OAK-HOLE> ,TH-SWORD>
<COND
(<NOT <NEXT? ,TH-SWORD>>
<THIS-IS-IT ,TH-SWORD>
<TELL
"There is a sword gleaming at the bottom of the hole." CR
>
)
>
)
>
)
(<VERB? ENTER>
<COND
(<MC-FORM? ,K-FORM-ARTHUR>
<TELL The+verb ,WINNER "are" " too big to fit in" the ,TH-OAK-HOLE "." CR>
)
(T
<TELL
"You crawl into the hole and have a quick look around. "
>
<COND
(<SEE-ANYTHING-IN? ,TH-OAK-HOLE>
<TELL "You find">
<PRINT-CONTENTS ,TH-OAK-HOLE>
<TELL " in the hole, and then">
)
(T
<TELL "Finding nothing of interest, you">
)
>
<TELL " crawl out again." CR>
)
>
)
>
>
;"---------------------------------------------------------------------------"
; "RM-SMITHY"
;"---------------------------------------------------------------------------"
<ROOM RM-SMITHY
(LOC ROOMS)
(DESC "smithy")
(FLAGS FL-LIGHTED)
(SYNONYM SMITHY)
(NORTH TO RM-CASTLE-GATE)
(DOWN PER RT-ENTER-HOLE)
(IN PER RT-ENTER-HOLE)
(UP PER RT-FLY-UP)
(GLOBAL LG-WALL LG-CASTLE RM-HOLE)
(ACTION RT-RM-SMITHY)
(THINGS
<> (BUSH BUSHES SHRUB PLANT) RT-PS-BUSH
)
>
<ROUTINE RT-RM-SMITHY ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL "You are" standing " outside">
)
(<EQUAL? ,OHERE ,RM-CASTLE-GATE>
<TELL "You" walk " southward alongside">
)
(<EQUAL? ,OHERE ,RM-HOLE>
<TELL "You" walk " upwards, and soon find yourself next to">)
(T
<TELL "You land near">)
>
<FSET ,TH-SMITH-HEARTH ,FL-SEEN>
<TELL
" the castle wall. Set into the ground is the stone hearth of the village
smithy. There is a bush growing next to the wall, and under it appears to be
a hole.|"
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-SMITHY>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTERED>
<COND
(<AND <FSET? ,CH-CELL-GUARD ,FL-ASLEEP>
<FSET? ,TH-SWORD ,FL-LOCKED>
>
<MOVE ,CH-MERLIN ,HERE>
<TELL CR ,K-MERLIN-PRISONER-MSG CR>
<RT-END-OF-GAME>
)
>
)
(.CONTEXT
<RFALSE>
)
>
>
<ROUTINE RT-PS-BUSH ("OPT" (CONTEXT <>) (ART <>) (CAP? <>))
<FCLEAR ,PSEUDO-OBJECT ,FL-PLURAL>
<FCLEAR ,PSEUDO-OBJECT ,FL-VOWEL>
<COND
(<MC-CONTEXT? ,M-OBJDESC>
<COND
(.ART
<PRINT-ARTICLE ,PSEUDO-OBJECT .ART .CAP?>
)
>
<COND
(<EQUAL? .ART <> ,K-ART-THE ,K-ART-A ,K-ART-ANY>
<COND
(.ART
<TELL " ">
)
>
<TELL "bush">
)
>
)
(.CONTEXT
<RFALSE>
)
(<VERB? LOOK-UNDER EXAMINE>
<THIS-IS-IT ,PSEUDO-OBJECT>
<TELL
"It's just a small bush nestled up against the castle wall. Below it, you
see a hole." CR>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-SMITH-HEARTH"
;"---------------------------------------------------------------------------"
<OBJECT TH-SMITH-HEARTH
(LOC RM-SMITHY)
(FLAGS FL-NO-DESC FL-SURFACE FL-TRY-TAKE)
(DESC "hearth")
(SYNONYM SLAB HEARTH STONE)
(ADJECTIVE STONE SMITHY)
(OWNER CH-PRISONER)
(CAPACITY 50)
(GENERIC RT-GN-STONE)
(ACTION RT-TH-SMITH-HEARTH)
>
<ROUTINE RT-TH-SMITH-HEARTH ("OPT" (CONTEXT <>))
<COND
(<VERB? EXAMINE>
<FSET ,TH-SMITH-HEARTH ,FL-SEEN>
<TELL
"It is a simple stone slab set into the ground. It looks as if it hasn't
been used for several days." CR
>
)
(<VERB? RAISE MOVE TAKE>
<TELL "You cannot move the hearth." CR>
)
>
>
;"---------------------------------------------------------------------------"
; "LG-TOWN"
;"---------------------------------------------------------------------------"
<OBJECT LG-TOWN
(LOC LOCAL-GLOBALS)
(DESC "town")
(SYNONYM TOWN)
(ACTION RT-LG-TOWN)
>
<ROUTINE RT-LG-TOWN ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(<VERB? ENTER>
<COND
(<MC-HERE? ,RM-TOWN-GATE>
<RT-DO-WALK ,P?EAST>
)
(<MC-HERE? ,RM-PARADE-AREA ,RM-CASTLE-GATE>
<RT-DO-WALK ,P?WEST>
)
>
)
(<VERB? EXIT>
<COND
(<MC-HERE? ,RM-TOWN-GATE>
<RT-DO-WALK ,P?WEST>
)
>
)
(<VERB? EXAMINE>
<FSET ,LG-TOWN ,FL-SEEN>
<TELL "It is a small town that grew up around the Roman fort." CR>
)
>
>
;"---------------------------------------------------------------------------"
; "RM-ABOVE-TOWN"
;"---------------------------------------------------------------------------"
<ROOM RM-ABOVE-TOWN
(LOC ROOMS)
(DESC "above the town")
(FLAGS FL-AIR FL-LIGHTED)
(DOWN PER RT-FLY-DOWN)
(EAST TO RM-ABOVE-CASTLE)
(WEST TO RM-ABOVE-MEADOW)
(NORTH TO RM-ABOVE-MOOR)
(SW TO RM-ABOVE-FIELD)
(NE TO RM-ABOVE-BOG)
(NW TO RM-ABOVE-EDGE-OF-WOODS)
(UP SORRY K-NO-HIGHER-MSG)
(GLOBAL RM-TOWN-SQUARE RM-VILLAGE-GREEN RM-CHURCHYARD RM-CHURCH RM-TAVERN LG-TOWN)
(ACTION RT-RM-ABOVE-TOWN)
>
<ROUTINE RT-RM-ABOVE-TOWN ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<FSET ,RM-MOOR ,FL-SEEN>
<FSET ,RM-BOG ,FL-SEEN>
<FSET ,RM-MEADOW ,FL-SEEN>
<FSET ,RM-FIELD-OF-HONOUR ,FL-SEEN>
<FSET ,LG-CASTLE ,FL-SEEN>
<TELL
"You are hovering over the town. Way off to the north you can see the moor,
and east of that you see a large patch of fog. A flick of your wings would
take you westward to the meadow, or southwestward to the Field of Honour. In
the distance to the northwest lies the edge of the forest. If you flew east,
you would be over the castle.|"
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-AIR-SCENE>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(.CONTEXT
<RFALSE>
)
>
>
;"***************************************************************************"
; "end of file"
;"***************************************************************************"