-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdiamond.zil
448 lines (412 loc) · 13 KB
/
diamond.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
"DIAMOND for
INFIDEL
(c) Copyright 1983 Infocom, Inc. All Rights Reserved.
"
;"DIAMOND AREA"
<ROOM ROOM-OF-NEPHTHYS
(IN ROOMS)
(DESC "Room of Nephthys")
(FLAGS RLANDBIT)
(LDESC
"You have entered the room of the protective goddess Nephthys. The walls here
are cut from pink granite, elaborately decorated with bright red carnelian and
pale yellow feldspar. Along the northeast wall are panels of beaten gold, and
midway up this wall, under the winged symbol of Nephthys, you can see some
hieroglyphs. To the southeast, an opening has been cut in the thick granite
wall.")
(SE TO A-PRIME)
(OUT TO A-PRIME)
(GLOBAL HIEROGLYPHS DOORWAY PICTURE-PANELS GEMS-2)
(ACTION SCORE-RMS)>
<OBJECT NEPHTH-JEWEL
(IN ROOM-OF-NEPHTHYS)
(FLAGS TAKEBIT)
(DESC "diamond cluster")
(VALUE 5)
(SIZE 2)
(FDESC
"A large diamond cluster, glittering in your light, sits on the floor directly
under the hieroglyphs.")
(SYNONYM CLUSTE)
(MAP 2)
(ADJECTIVE DIAMON)>
<OBJECT HERRING-JEWEL
(IN LANDING-ZERO)
(FLAGS TAKEBIT)
(DESC "golden cluster")
(SIZE 2)
(FDESC
"A large golden cluster sits on the floor.")
(SYNONYM CLUSTE)
(MAP 2)
(ADJECTIVE GOLDEN GOLD)>
<OBJECT SELKIS-JEWEL
(IN ROOM-OF-SELKIS)
(FLAGS TAKEBIT)
(VALUE 5)
(SIZE 2)
(DESC "ruby cluster")
(FDESC
"A beautiful ruby cluster, sparkling like fire, sits on the floor.")
(MAP 2)
(SYNONYM CLUSTE)
(ADJECTIVE RUBY)>
<OBJECT ISIS-JEWEL
(IN ROOM-OF-ISIS)
(FLAGS TAKEBIT VOWELBIT)
(VALUE 5)
(SIZE 2)
(DESC "emerald cluster")
(FDESC
"Lying on the ground is a brilliant, glowing emerald cluster.")
(MAP 2)
(SYNONYM CLUSTE)
(ADJECTIVE EMERAL)>
<OBJECT NEITH-JEWEL
(IN ROOM-OF-NEITH)
(FLAGS TAKEBIT VOWELBIT)
(DESC "opal cluster")
(FDESC
"An opal cluster, glistening with the light of a thousand fires, lies on the
floor.")
(SYNONYM CLUSTE)
(ADJECTIVE OPAL)
(VALUE 5)
(MAP 2)
(SIZE 2)>
<ROOM ROOM-OF-SELKIS
(IN ROOMS)
(FLAGS RLANDBIT)
(DESC "Room of Selkis")
(LDESC
"You are standing in a small room, that of the protective goddess Selkis.
There are red, blue and green patterns on the walls formed from small glazed
tiles that have been carefully arranged in order of shade. The darkest tiles
border the floor, and become lightest near the ceiling. On one wall,
inscribed in a beaten gold panel, is the symbol of Selkis, under which you can
see some hieroglyphic text. An opening through the southwest wall leads out
of this room.")
(SW TO B-PRIME)
(OUT TO B-PRIME)
(GLOBAL HIEROGLYPHS DOORWAY GEMS-2 PICTURE-PANELS)
(ACTION SCORE-RMS)>
<OBJECT TWINKLERS
(IN ROOM-OF-ISIS)
(FLAGS NDESCBIT DONTTAKE)
(DESC "quartz")
(SYNONYM LIGHTS QUARTZ CHIPS PATTER)
(ADJECTIVE THOUSA TINY)
(TEXT
"They twinkle in the light, making beautiful patterns.")>
<ROOM ROOM-OF-ISIS
(IN ROOMS)
(DESC "Room of Isis")
(FLAGS RLANDBIT)
(LDESC
"This is the room of the protective goddess Isis. You stand in amazement
in the center of the room as thousands of tiny lights twinkle around you.
With great surprise you realize that the light from your torch is being
reflected by the mirror-like surfaces of innumerable quartzite chips.
These are set artfully into red clay panels in the walls, and are surrounded
by shiny red jasper fragments. On the southwest wall, under the winged symbol
of Isis, some hieroglyphic text is inscribed in a gold panel. To the northeast
is an arched opening, and, looking through it, you can barely make out a
hallway.")
(NE TO D-PRIME)
(OUT TO D-PRIME)
(GLOBAL HIEROGLYPHS PICTURE-PANELS GEMS DOORWAY)
(ACTION SCORE-RMS)>
<ROOM ROOM-OF-NEITH
(IN ROOMS)
(DESC "Room of Neith")
(FLAGS RLANDBIT)
(LDESC
"You are standing in the room of the protective goddess Neith. This room
seems dark and mysterious with its decorations of inky-blue lapis lazuli
and jet-black obsidian. Gold scrollwork defines an area on one of the
walls, in the center of which is the symbol of Neith. Below this you can
see some hieroglyphs etched into a beaten gold panel. There is a door in
the northwest wall leading out of the room.")
(NW TO E-PRIME)
(OUT TO E-PRIME)
(GLOBAL HIEROGLYPHS PICTURE-PANELS PICTURES GEMS)
(ACTION SCORE-RMS)>
<OBJECT GEMS
(IN LOCAL-GLOBALS)
(DESC "gem")
(FLAGS NDESCBIT)
(SYNONYM LAZULI OBSIDI JASPER GEMS)
(ADJECTIVE LAPIS RED INKY- BLUE JET-B)
(TEXT
"The gems are quite remarkable, forming a delicate piece of art. To remove
any of them would be beyond thinking. Even for you.")>
<OBJECT GEMS-2
(IN LOCAL-GLOBALS)
(DESC "tile")
(FLAGS NDESCBIT)
(SYNONYM CARNEL FELDSP GEMS TILES)
(ADJECTIVE RED YELLOW BLUE GREEN BRIGHT)
(TEXT
"They are quite remarkable, forming a delicate piece of art. To remove
any of them would be beyond thinking. Even for you.")>
<ROUTINE SCORE-RMS (RARG)
<COND (<AND <EQUAL? .RARG ,M-ENTER>
<NOT <FSET? ,HERE ,TOUCHBIT>>>
<SETG SCORE <+ ,SCORE 25>>)>
<RFALSE>>
<ROOM LANDING-ZERO
(IN ROOMS)
(DESC "Circular Room")
(LDESC
"You are in a strange, round room which sits in the center of four hallways.
These hallways lead off to the northeast, southeast, southwest and northwest
like the spokes of a wheel. Above your head is a long tunnel which stretches up
and out of sight.")
(FLAGS RLANDBIT)
(NW TO A-PRIME)
(NE TO B-PRIME)
(SW TO D-PRIME)
(SE TO E-PRIME)
(UP TO CHAMBER-OF-RA IF ROPE-TIED ELSE
"There's no way to get back up there.")
(ACTION CIRCULAR-ROOM-FCN)>
<ROUTINE LOOK-DOWN-HALLS ()
<TELL "As you peer down the dimly-lit hallways, you ">
<COND (<NOT <STATUE-OPPOSITE?>>
<TELL "see that the doors in all four hallways are
balanced halfway open." CR>)
(ELSE
<TELL "notice that the door to the ">
<TELL ,HALL-DIR>
<TELL
" is closed, while the one in the opposite hallway is all the way open. The
other two are halfway open." CR>)>
<FSET ,ROPE ,NDESCBIT>>
<GLOBAL CIRCLE-SCORED <>>
<ROUTINE CIRCULAR-ROOM-FCN (RARG)
<COND (<EQUAL? .RARG ,M-ENTER>
<MOVE ,ROPE ,HERE>
<FCLEAR ,ROPE ,NDESCBIT>
<REMOVE ,ISIS-DOOR>
<REMOVE ,NEPHTH-DOOR>
<REMOVE ,NEITH-DOOR>
<REMOVE ,SELKIS-DOOR>
<COND (<NOT ,CIRCLE-SCORED>
<SETG SCORE <+ ,SCORE 30>>
<SETG CIRCLE-SCORED T>)>
<COND (<AND <NOT ,VERBOSE>
<FSET? ,HERE ,TOUCHBIT>>
<LOOK-DOWN-HALLS>
<CRLF>)>)
(<EQUAL? .RARG ,M-LOOK>
<FCLEAR ,ROPE ,NDESCBIT>
<TELL <GETP ,LANDING-ZERO ,P?LDESC> CR>
<DESCRIBE-ROPE-FCN ,M-OBJDESC>
<LOOK-DOWN-HALLS>)>>
<OBJECT HUGE-STATUE
(IN LANDING-ZERO)
(DESC "large statue")
(FDESC
"Sitting in the middle of the floor is a large statue, about two feet shorter
than you. It reminds you a little of Miss Ellingsworth.")
(FLAGS TAKEBIT TRYTAKEBIT)
(SIZE 281)
(SYNONYM STATUE)
(ADJECTIVE HUGE)
(ACTION HUGE-STATUE-FCN)
(TEXT
"It is carved out of dark gray basalt and its features resemble a woman at the
height of her beauty, most probably the ancient Queen. The statue itself must
weigh more than you do.")>
<OBJECT HEAD
(IN HUGE-STATUE)
(FLAGS INVISIBLE TAKEBIT)
(DESC "broken head")
(SYNONYM HEAD)
(SIZE 20)
(ADJECTIVE BROKEN)
(TEXT
"This head was once part of the magnificent statue of the Queen.")
(ACTION HEAD-FCN)>
<ROUTINE HEAD-FCN ()
<COND (<VERB? RAISE>
<PERFORM ,V?TAKE ,PRSO>
<RTRUE>)
(<VERB? SHAKE>
<TELL "It's as empty as yours." CR>
<RTRUE>)
(<VERB? CLIMB-ON>
<TELL "Next you'll be asking for tumbling lessons." CR>
<RTRUE>)>>
<ROUTINE HUGE-STATUE-FCN ()
<COND (<AND <VERB? MOVE TAKE PUSH PUSH-TO>
<FSET? ,HEAD ,INVISIBLE>>
<TELL
"The statue teeters, swaying and rocking back and forth, then falls over,
its top-heavy structure striking the floor with a dull, loud thud. As you
look over the damage, you see the head has separated from the statue." CR>
<MOVE ,HEAD ,HERE>
<FCLEAR ,HEAD ,INVISIBLE>
<FSET ,HUGE-STATUE ,TOUCHBIT>
<RTRUE>)
(<VERB? TAKE RAISE>
<TELL "It's far too heavy." CR>
<RTRUE>)
(<VERB? PUSH RAISE MOVE>
<TELL
"The statue rocks over and back on its back. Looks like it's headed nowhere
fast." CR>
<RTRUE>)
(<VERB? MUNG>
<COND (<FSET? ,HEAD ,INVISIBLE>
<PERFORM ,V?PUSH ,HUGE-STATUE>
<RTRUE>)
(T
<TELL
"Haven't you done enough damage to that beautiful relic?" CR>)>)
(<VERB? EXAMINE>
<COND (<FSET? ,HEAD ,INVISIBLE>
<RFALSE>)
(T
<TELL
"The statue lies on the floor, its head broken off. In this state, the statue
weighs a little less than you but it's still far too heavy to carry." CR>
<RTRUE>)>)>>
<ROOM A-PRIME
(IN ROOMS)
(FLAGS RLANDBIT)
(DESC "Northwest Hallway")
(LDESC
"You are standing in the middle of the Northwest Hallway. The walls here are
smooth and undecorated, carved out of granite. The hallway continues to the
northwest and to the southeast.")
(SE TO LANDING-ZERO)
(NW TO ROOM-OF-NEPHTHYS IF NEPHTH-DOOR IS OPEN ELSE
"There's no way to get through the stone door.")
(ACTION CLOSE-DEM-DOOAHS)>
<OBJECT NEPHTH-DOOR
(IN A-PRIME)
(FLAGS DOORBIT NDESCBIT)
(DESC "stone door")
(SYNONYM DOOR)
(ADJECTIVE STONE)
(ACTION STONE-DOOR-FCN)>
<ROUTINE STONE-DOOR-FCN ()
<COND (<VERB? OPEN RAISE>
<TELL "You can't. It's got to weigh 50 tons." CR>
<RTRUE>)>>
<ROOM B-PRIME
(IN ROOMS)
(FLAGS RLANDBIT)
(DESC "Northeast Hallway")
(LDESC
"You are standing midway down the long Northeast Hallway. The high walls
are undecorated, but bear the marks of the stonecarver's tool. The hallway
continues to the northeast and the southwest.")
(SW TO LANDING-ZERO)
(NE TO ROOM-OF-SELKIS IF SELKIS-DOOR IS OPEN ELSE
"There's no way to get through the stone door.")
(ACTION CLOSE-DEM-DOOAHS)>
<OBJECT SELKIS-DOOR
(FLAGS DOORBIT NDESCBIT)
(DESC "stone door")
(SYNONYM DOOR)
(ADJECTIVE STONE)
(ACTION STONE-DOOR-FCN)>
<ROOM D-PRIME
(IN ROOMS)
(FLAGS RLANDBIT)
(DESC "Southwest Hallway")
(LDESC
"You are midway down the Southwest Hallway. The walls of this narrow passage
are unadorned and smooth. The hallway continues to the southwest and the
northeast.")
(NE TO LANDING-ZERO)
(SW TO ROOM-OF-ISIS IF ISIS-DOOR IS OPEN ELSE
"There's no way to get through the stone door.")
(ACTION CLOSE-DEM-DOOAHS)>
<OBJECT ISIS-DOOR
(FLAGS DOORBIT NDESCBIT)
(DESC "stone door")
(SYNONYM DOOR)
(ADJECTIVE STONE)
(ACTION STONE-DOOR-FCN)>
<ROOM E-PRIME
(IN ROOMS)
(FLAGS RLANDBIT)
(DESC "Southeast Hallway")
(LDESC
"You are midway down the Southeast Hallway. This corridor is undecorated and
the walls are polished to a smooth lustre. The hallway continues to the
southeast and the northwest.")
(NW TO LANDING-ZERO)
(SE TO ROOM-OF-NEITH IF NEITH-DOOR IS OPEN ELSE
"There's no way to get through the stone door.")
(ACTION CLOSE-DEM-DOOAHS)>
<OBJECT NEITH-DOOR
(FLAGS DOORBIT NDESCBIT)
(DESC "stone door")
(SYNONYM DOOR)
(ADJECTIVE STONE)
(ACTION STONE-DOOR-FCN)>
<GLOBAL HALL-DIR <>>
<GLOBAL STATUE-CHK-TBL ;"starts @ 0, inc by 3"
<TABLE A-PRIME E-PRIME "southeast"
E-PRIME A-PRIME "northwest"
B-PRIME D-PRIME "southwest"
D-PRIME B-PRIME "northeast">>
<ROUTINE STATUE-OPPOSITE? ("AUX" (OFFS -3) H-CHK T-CHK (FLG <>))
<REPEAT ()
<SET OFFS <+ .OFFS 3>>
<COND (<G? .OFFS 9>
<RETURN>)
(T
<SET H-CHK <GET ,STATUE-CHK-TBL .OFFS>>
<SET T-CHK <GET ,STATUE-CHK-TBL <+ .OFFS 1>>>
<COND (<AND <EQUAL? ,HERE .H-CHK ,LANDING-ZERO>
<G? <WEIGHT .T-CHK> 300>>
<SET FLG T>
<SETG HALL-DIR <GET ,STATUE-CHK-TBL
<+ .OFFS 2>>>)>)>>
<RETURN .FLG>>
<GLOBAL KLUDGE-FLG <>>
<ROUTINE CLOSE-DEM-DOOAHS (RARG)
<COND (<EQUAL? .RARG ,M-ENTER>
<SET KLUDGE-FLG <>>
<COND (<STATUE-OPPOSITE?>
<COND (<EQUAL? ,HERE ,A-PRIME>
<FSET ,NEPHTH-DOOR ,OPENBIT>)
(<EQUAL? ,HERE ,B-PRIME>
<FSET ,SELKIS-DOOR ,OPENBIT>)
(<EQUAL? ,HERE ,D-PRIME>
<FSET ,ISIS-DOOR ,OPENBIT>)
(ELSE
<FSET ,NEITH-DOOR ,OPENBIT>)>)
(<G? <WEIGHT ,HERE> 300>
<RFALSE>)
(T <TELL
"As you enter the corridor, a huge stone door begins to slide down from the
ceiling closing off any further progress. The closer you come to the door, the
further down the door descends until, eventually, it is close to the floor.
When you turn around, you can barely see beyond the Circular Room where an
identical door has risen off the floor an equal amount." CR>
<CRLF>
<COND (<EQUAL? ,HERE ,A-PRIME ,E-PRIME>
<MOVE ,NEPHTH-DOOR ,A-PRIME>
<FCLEAR ,NEPHTH-DOOR ,OPENBIT>
<MOVE ,NEITH-DOOR ,E-PRIME>
<FCLEAR ,NEITH-DOOR ,OPENBIT>)
(<EQUAL? ,HERE ,B-PRIME ,D-PRIME>
<MOVE ,SELKIS-DOOR ,B-PRIME>
<MOVE ,ISIS-DOOR ,D-PRIME>
<FCLEAR ,SELKIS-DOOR ,OPENBIT>
<FCLEAR ,ISIS-DOOR ,OPENBIT>)>
<SET KLUDGE-FLG T>)>)
(<AND <EQUAL? .RARG ,M-END>
<STATUE-OPPOSITE?>
<NOT ,KLUDGE-FLG>>
<TELL
"The path before you remains open, the stone door having risen to the ceiling,
counterbalanced by the door in the opposite corridor." CR>
<SET KLUDGE-FLG T>
<RTRUE>)>>