-
Notifications
You must be signed in to change notification settings - Fork 1
/
volcano.zil
681 lines (625 loc) · 18.2 KB
/
volcano.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
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
"VOLCANO for
Mini-Zork II: The Wizard of Frobozz
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<GLOBAL BALLOON-TIED <>>
<GLOBAL BALLOON-INFLATED <>>
<GLOBAL LABEL-REVEALED <>>
<ROOM VOLCANO-BOTTOM
(IN ROOMS)
(DESC "Volcano Bottom")
(LDESC
"You are at the base of a dormant volcano. High above, light enters the
cone of the volcano. The only exit is east.")
(EAST TO ICE-ROOM)
(FLAGS RLANDBIT NONLANDBIT)>
<OBJECT RUBY
(IN VOLCANO-BOTTOM)
(DESC "ruby")
(LDESC "On the floor lies a moby ruby.")
(SYNONYM RUBY TREASURE)
(ADJECTIVE MOBY)
(VALUE 15)
(FLAGS TAKEBIT)>
<GLOBAL BALLOON-LOC VOLCANO-BOTTOM> ;"balloon location"
<OBJECT BALLOON
(IN VOLCANO-BOTTOM)
(DESC "basket")
(SYNONYM BALLOON BASKET)
(ADJECTIVE WICKER)
(CAPACITY 100)
(SIZE 70)
(FLAGS VEHBIT OPENBIT)
(DESCFCN BALLOON-F)
(ACTION BALLOON-F)>
<ROUTINE BALLOON-F ("OPTIONAL" (RARG <>) "AUX" M RC)
<COND (<EQUAL? .RARG ,M-LOOK>
<COND (,BALLOON-INFLATED
<TELL "The cloth bag is inflated and ">
<COND (<FSET? ,RECEPTACLE ,OPENBIT>
<TELL
A ,BALLOON-INFLATED " is burning in the">)
(T
<TELL "smoke leaks out of the closed">)>
<TELL " receptacle">)
(T
<TELL
"The cloth bag is draped over the side of the basket. In the middle of the
basket is a metal receptacle which is ">
<COND (<FSET? ,RECEPTACLE ,OPENBIT>
<TELL "open">
<SET RC <FIRST? ,RECEPTACLE>>
<COND (.RC
<TELL ". " CA .RC " is ">
<COND (<EQUAL? ,BALLOON-INFLATED .RC>
<TELL "burning">)
(T
<TELL "nestled">)>
<TELL " inside">)>)
(T
<TELL "closed">)>)>
<TELL ". A braided wire ">
<COND (,BALLOON-TIED
<TELL "connects the balloon to the hook">)
(T
<TELL "dangles from the basket">)>
<TELL ,PERIOD-CR>)
(<EQUAL? .RARG ,M-OBJDESC>
<TELL
"There is a large heavy wicker basket here. A huge cloth bag is
attached to the basket and ">
<COND (,BALLOON-INFLATED
<TELL "inflated">)
(T
<TELL "and draped over the side">)>
<TELL
". A metal receptacle is fastened to the center of the basket">
<COND (,BALLOON-INFLATED
<COND (<FSET? ,RECEPTACLE ,OPENBIT>
<TELL
". In it is a burning " D ,BALLOON-INFLATED>)
(T
<TELL ". Smoke leaks from its closed lid">)>)>
<TELL ". A piece of braided wire ">
<COND (,BALLOON-TIED
<TELL
"tied to the hook holds the balloon in place." CR>)
(T
<TELL "dangles from the basket." CR>)>)
(<EQUAL? .RARG ,M-BEG>
<COND (<VERB? WALK>
<COND (<SET M <GETPT ,HERE ,PRSO>>
<COND (,BALLOON-TIED
<TELL "You are tied to the ledge." CR>
<RTRUE>)
(T
<COND (<EQUAL? <PTSIZE .M> ,UEXIT>
<SETG BALLOON-LOC
<GETB .M ,REXIT>>)>
<ENABLE <QUEUE I-BALLOON 3>>
<RFALSE>)>)
(T
<TELL
"You can't control the balloon this way." CR>
<RTRUE>)>)>)
(<ZERO? .RARG>
<COND (<VERB? INFLATE>
<TELL
"It takes more than words to inflate a balloon." CR>)>)>>
<ROUTINE I-BALLOON ()
<COND (<AND <FSET? ,RECEPTACLE ,OPENBIT>
,BALLOON-INFLATED>
<RISE-AND-SHINE>)
(<EQUAL? ,HERE ,NARROW-LEDGE ,WIDE-LEDGE>
<RISE-AND-SHINE>)
(T
<DECLINE-AND-FALL>)>>
<ROUTINE BALLOON-BURN ()
<TELL "The " D ,PRSO " burns inside the receptacle." CR>
<ENABLE <QUEUE I-BURNUP <* <GETP ,PRSO ,P?SIZE> 20>>>
<FSET ,PRSO ,FLAMEBIT>
<FSET ,PRSO ,ONBIT>
<FCLEAR ,PRSO ,TAKEBIT>
<FCLEAR ,PRSO ,READBIT>
<COND (,BALLOON-INFLATED
<RTRUE>)
(T
<TELL "The cloth bag inflates as it fills with hot air." CR>
<COND (<NOT ,LABEL-REVEALED>
<MOVE ,BALLOON-LABEL ,BALLOON>
<TELL "A label drops from the bag into the basket." CR>)>
<SETG LABEL-REVEALED T>
<SETG BALLOON-INFLATED ,PRSO>
<ENABLE <QUEUE I-BALLOON 3>>)>>
<ROUTINE PUT-BALLOON (THERE STR)
<COND (<EQUAL? ,HERE ,NARROW-LEDGE ,WIDE-LEDGE ,VOLCANO-BOTTOM>
<TELL "You watch as the balloon slowly " .STR CR>)>
<MOVE ,BALLOON .THERE>
<SETG BALLOON-LOC .THERE>>
<ROUTINE RISE-AND-SHINE ("AUX" (IN <IN? ,WINNER ,BALLOON>) R)
<ENABLE <QUEUE I-BALLOON 3>>
<COND (<EQUAL? ,BALLOON-LOC ,VOLCANO-BY-WIDE-LEDGE>
<DISABLE <INT I-BURNUP>>
<DISABLE <INT I-BALLOON>>
<REMOVE ,BALLOON>
<COND (.IN
<JIGS-UP
"The balloon floats majestically out of the volcano, revealing a breathtaking
view of a forest clearing with a white house. High winds carry you into the
snow-capped (and jagged) cliffs of the Flathead Mountains!">)
(<EQUAL? ,HERE ,NARROW-LEDGE ,WIDE-LEDGE ,VOLCANO-BOTTOM>
<TELL
"You watch the balloon drift over the rim and away on the wind." CR>)>
<SETG BALLOON-LOC ,VOLCANO-BOTTOM>)
(<SET R <GETP ,BALLOON-LOC ,P?BALLOON-UP>>
<COND (.IN
<TELL "The balloon ascends." CR CR>
<SETG BALLOON-LOC .R>
<GOTO .R>)
(T
<PUT-BALLOON .R "ascends.">)>)
(<SET R <GETP ,BALLOON-LOC ,P?BALLOON-FLOAT>>
<COND (.IN
<TELL "The balloon leaves the ledge." CR CR>
<SETG BALLOON-LOC .R>
<GOTO .R>)
(T
<PUT-BALLOON .R
"floats, ascending due to its light load.">
<FSET ,RECEPTACLE ,OPENBIT>)>)
(.IN
<SETG BALLOON-LOC ,VOLCANO-CORE>
<TELL "The balloon rises slowly from the ground." CR CR>
<GOTO ,VOLCANO-CORE>)
(T
<PUT-BALLOON ,VOLCANO-CORE "lifts off.">)>>
<ROUTINE DECLINE-AND-FALL ("AUX" (IN <IN? ,WINNER ,BALLOON>) R)
<ENABLE <QUEUE I-BALLOON 3>>
<COND (<EQUAL? ,BALLOON-LOC ,VOLCANO-CORE>
<COND (.IN
<SETG BALLOON-LOC ,VOLCANO-BOTTOM>
<COND (,BALLOON-INFLATED
<TELL "The balloon has landed." CR CR>
<GOTO ,VOLCANO-BOTTOM>)
(T
<REMOVE ,BALLOON>
<MOVE ,ADVENTURER ,HERE>
<DISABLE <INT I-BALLOON>>
<TELL
"The balloon smashes into dust against the volcano floor.
You, miraculously, survive." CR CR>
<GOTO ,VOLCANO-BOTTOM>)>)
(T
<PUT-BALLOON ,VOLCANO-BOTTOM "lands.">)>)
(<SET R <GETP ,BALLOON-LOC ,P?BALLOON-DOWN>>
<COND (.IN
<TELL "The balloon descends." CR CR>
<SETG BALLOON-LOC .R>
<GOTO .R>)
(T
<PUT-BALLOON .R "descends.">)>)>>
<ROUTINE I-BURNUP ("AUX" (OBJ <FIRST? ,RECEPTACLE>))
<COND (<EQUAL? ,HERE ,BALLOON-LOC>
<TELL
"The " D .OBJ " has now burned out, and the cloth bag starts to deflate." CR>)>
<REMOVE .OBJ>
<SETG BALLOON-INFLATED <>>
<RTRUE>>
<OBJECT BALLOON-LABEL
(DESC "blue label")
(LDESC "There is a blue label here.")
(SYNONYM LABEL)
(ADJECTIVE BLUE)
(FLAGS READBIT TAKEBIT BURNBIT)
(SIZE 1)
(TEXT
"\"FROBOZZ MAGIC BALLOON COMPANY! Hello, Aviator!|
|
To land your balloon, say LAND. Otherwise, you're on your own! (No warranty
expressed or implied.)\"")>
<OBJECT BRAIDED-WIRE
(IN BALLOON)
(DESC "braided wire")
(SYNONYM ROPE WIRE)
(ADJECTIVE BRAIDED)
(FLAGS NDESCBIT)
(ACTION BRAIDED-WIRE-F)>
<ROUTINE BRAIDED-WIRE-F ()
<COND (<AND <VERB? TIE>
<EQUAL? ,PRSO ,BRAIDED-WIRE>
<EQUAL? ,PRSI ,HOOK>>
<DISABLE <INT I-BALLOON>>
<TELL "The balloon is ">
<COND (,BALLOON-TIED
<TELL "already ">)>
<TELL "fastened to the hook." CR>
<SETG BALLOON-TIED T>)
(<AND <VERB? UNTIE>
<EQUAL? ,PRSO ,BRAIDED-WIRE>>
<TELL "The wire is no">
<COND (,BALLOON-TIED
<ENABLE <QUEUE I-BALLOON 3>>
<SETG BALLOON-TIED <>>
<TELL "w unhooked." CR>)
(T
<TELL "t tied to anything." CR>)>)
(T
<BCONTENTS>)>>
<OBJECT CLOTH-BAG
(IN BALLOON)
(DESC "cloth bag")
(SYNONYM BAG)
(ADJECTIVE CLOTH)
(FLAGS NDESCBIT)
(ACTION BCONTENTS)>
<OBJECT RECEPTACLE
(IN BALLOON)
(DESC "receptacle")
(SYNONYM RECEPTACLE)
(ADJECTIVE METAL)
(CAPACITY 6)
(FLAGS CONTBIT SEARCHBIT NDESCBIT)
(CONTFCN RECEPTACLE-CONT)
(ACTION RECEPTACLE-F)>
<ROUTINE RECEPTACLE-F ("AUX" OBJ)
<COND (<VERB? EXAMINE>
<TELL "The receptacle is ">
<COND (<FSET? ,PRSO ,OPENBIT>
<TELL "open." CR>)
(T
<TELL "closed." CR>)>)
(<AND <VERB? LOOK-INSIDE>
<SET OBJ <FIRST? ,PRSO>>
<FIRST? ,PRSO>>
<FCLEAR .OBJ ,NDESCBIT>
<V-LOOK-INSIDE>
<FSET .OBJ ,NDESCBIT>)
(<AND <VERB? OPEN>
<NOT <FSET? ,PRSO ,OPENBIT>>
,BALLOON-INFLATED
<FIRST? ,PRSO>>
<FSET ,PRSO ,OPENBIT>
<TELL
"Opening it reveals a burning " D ,BALLOON-INFLATED ,PERIOD-CR>)
(<AND <VERB? PUT>
<PRSI? ,RECEPTACLE>>
<COND (<FIRST? ,PRSI>
<TELL "The receptacle is already occupied." CR>)
(T
<FSET ,PRSO ,NDESCBIT>
<RFALSE>)>)
(T
<BCONTENTS>)>>
<ROUTINE RECEPTACLE-CONT ()
<COND (<AND <VERB? TAKE>
<PRSO? ,BALLOON-INFLATED>>
<TELL
"You don't really want to hold a burning " D ,PRSO ,PERIOD-CR>)>>
<ROUTINE BCONTENTS ()
<COND (<VERB? TAKE>
<TELL
"The " D ,PRSO " is an integral part of the basket and cannot be removed.">
<COND (<EQUAL? ,PRSO ,BRAIDED-WIRE>
<TELL " It might be tied, though.">)>
<CRLF>)
(<AND <EQUAL? ,PRSO ,CLOTH-BAG>
<VERB? LOOK-INSIDE OPEN>>
<COND (<VERB? OPEN>
<TELL
"The bag is enormous. You can't open it by hand." CR>)
(T
<TELL "It seems empty." CR>)>)
(<VERB? FIND EXAMINE>
<TELL
"The " D ,PRSO " is part of the basket. It may be manipulated
within the basket but cannot be removed." CR>)>>
<ROOM VOLCANO-CORE
(IN ROOMS)
(DESC "Volcano Core")
(LDESC
"You are about one hundred feet above the bottom of the volcano.")
(VALUE 10)
(BALLOON-UP VOLCANO-BY-SMALL-LEDGE)
(FLAGS NONLANDBIT)>
<ROOM VOLCANO-BY-SMALL-LEDGE
(IN ROOMS)
(DESC "Volcano By Small Ledge")
(EAST TO NARROW-LEDGE)
(LAND TO NARROW-LEDGE)
(FLAGS NONLANDBIT)
(BALLOON-UP VOLCANO-BY-WIDE-LEDGE)
(BALLOON-DOWN VOLCANO-CORE)
(ACTION VOLCANO-BY-LEDGE-F)>
<ROOM VOLCANO-BY-WIDE-LEDGE
(IN ROOMS)
(DESC "Volcano By Wide Ledge")
(LAND TO WIDE-LEDGE)
(WEST TO WIDE-LEDGE)
(FLAGS NONLANDBIT)
(BALLOON-DOWN VOLCANO-BY-SMALL-LEDGE)
(ACTION VOLCANO-BY-LEDGE-F)>
<ROUTINE VOLCANO-BY-LEDGE-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL "You are about ">
<COND (<EQUAL? ,HERE ,VOLCANO-BY-SMALL-LEDGE>
<TELL "15">)
(T
<TELL "20">)>
<TELL "0 feet up, ">
<COND (<EQUAL? ,HERE ,VOLCANO-BY-WIDE-LEDGE>
<TELL "very ">)>
<TELL "near the rim of the volcano. To the ">
<COND (<EQUAL? ,HERE ,VOLCANO-BY-SMALL-LEDGE>
<TELL "east is a narrow">)
(T
<TELL "west is a wide">)>
<TELL " ledge." CR>)>>
<ROOM NARROW-LEDGE
(IN ROOMS)
(DESC "Narrow Ledge")
(DOWN "I wouldn't jump from here.")
(SOUTH TO LIBRARY)
(IN TO LIBRARY)
(FLAGS RLANDBIT NONLANDBIT)
(GLOBAL HOOK)
(BALLOON-FLOAT VOLCANO-BY-SMALL-LEDGE)
(ACTION LEDGE-F)>
<OBJECT COIN
(IN NARROW-LEDGE)
(DESC "priceless zorkmid")
(FDESC
"On the floor is a priceless gold zorkmid (a valuable collector's item).")
(SYNONYM COIN ZORKMID GOLD TREASURE)
(ADJECTIVE GOLD PRICELESS)
(FLAGS READBIT TAKEBIT)
(SIZE 10)
(VALUE 20)
(TEXT
"This octagonal coin reads \"1000 Zorkmids\" and \"In Frobs We Trust\".")>
<ROOM LIBRARY
(IN ROOMS)
(DESC "Library")
(LDESC
"This must have been a large library, probably for the royal family. All
of the shelves have been gnawed to pieces by unfriendly gnomes. To the
north is an exit.")
(NORTH TO NARROW-LEDGE)
(OUT TO NARROW-LEDGE)
(FLAGS RLANDBIT)>
<OBJECT BLUE-BOOK
(IN LIBRARY)
(DESC "blue book")
(FDESC "In one corner sits a blue book.")
(SYNONYM BOOK BOOKS)
(ADJECTIVE BLUE)
(CAPACITY 2)
(SIZE 10)
(TEXT "This book is written in an unfamiliar tongue.")
(FLAGS READBIT TAKEBIT TRYTAKEBIT CONTBIT BURNBIT)
(ACTION RANDOM-BOOK-F)>
<OBJECT WHITE-BOOK
(IN LIBRARY)
(DESC "white book")
(FDESC "Beside the purple book is a white one.")
(SYNONYM BOOK BOOKS)
(ADJECTIVE WHITE)
(CAPACITY 2)
(FLAGS READBIT TAKEBIT TRYTAKEBIT CONTBIT BURNBIT)
(TEXT
"The book details the use of the so-called \"magic wand\". Apparently, these
work by pointing them at the object to be ensorcelled, and then chanting the
appropriate magic word. (Amazing how credulous these ancients were.)")
(ACTION RANDOM-BOOK-F)>
<ROUTINE RANDOM-BOOK-F ()
<COND (<VERB? TAKE MOVE PUT OPEN>
<FSET ,WHITE-BOOK ,TOUCHBIT>
<FSET ,PURPLE-BOOK ,TOUCHBIT>
<FSET ,BLUE-BOOK ,TOUCHBIT>
<RFALSE>)>>
<OBJECT PURPLE-BOOK
(IN LIBRARY)
(DESC "purple book")
(FDESC "Lying in the dust, covered with mold, is a purple book.")
(SYNONYM BOOK BOOKS)
(ADJECTIVE PURPLE)
(CAPACITY 2)
(SIZE 10)
(FLAGS READBIT TAKEBIT TRYTAKEBIT CONTBIT SEARCHBIT BURNBIT)
(TEXT "This book is written in an unfamiliar tongue.")
(ACTION PURPLE-BOOK-F)>
<ROUTINE PURPLE-BOOK-F ()
<COND (<AND <VERB? READ>
<IN? ,STAMP ,PURPLE-BOOK>
<NOT <FSET? ,PURPLE-BOOK ,OPENBIT>>>
<V-READ>
<PERFORM ,V?OPEN ,PURPLE-BOOK>
<RTRUE>)
(T
<RANDOM-BOOK-F>)>>
<OBJECT STAMP
(IN PURPLE-BOOK)
(DESC "Flathead stamp")
(SYNONYM STAMP TREASURE)
(ADJECTIVE FLATHEAD)
(SIZE 1)
(VALUE 10)
(FLAGS READBIT TAKEBIT BURNBIT)
(TEXT
"This three zorkmid stamp portrays Lord Dimwit Flathead the Excessive.")>
<OBJECT HOOK
(IN LOCAL-GLOBALS)
(DESC "hook")
(SYNONYM HOOK)
(ADJECTIVE SMALL)>
<ROUTINE LEDGE-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL "You are on a ">
<COND (<EQUAL? ,HERE ,NARROW-LEDGE>
<TELL "small">)
(T
<TELL "large">)>
<TELL
" ledge high in the volcano. There is a small opening to the south">
<COND (<AND <NOT ,DUSTY-ROOM-FLAG>
<EQUAL? ,HERE ,WIDE-LEDGE>>
<TELL " which is blocked by rubble">)>
<TELL ". Imbedded in the rock is a small hook." CR>)>>
<ROOM WIDE-LEDGE
(IN ROOMS)
(DESC "Wide Ledge")
(DOWN "It's a long way down.")
(SOUTH TO DUSTY-ROOM IF DUSTY-ROOM-FLAG ELSE
"The opening is blocked by rubble.")
(IN TO DUSTY-ROOM IF DUSTY-ROOM-FLAG ELSE
"The opening is blocked by rubble.")
(FLAGS RLANDBIT NONLANDBIT)
(GLOBAL HOOK)
(BALLOON-FLOAT VOLCANO-BY-WIDE-LEDGE)
(ACTION LEDGE-F)>
<ROOM DUSTY-ROOM
(IN ROOMS)
(DESC "Dusty Room")
(NORTH TO WIDE-LEDGE)
(OUT TO WIDE-LEDGE)
(FLAGS RLANDBIT ONBIT)
(ACTION DUSTY-ROOM-F)>
<ROUTINE DUSTY-ROOM-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"You are in a featureless room with an exit on the north side. Imbedded in the
far wall is a rusty box">
<COND (<NOT <FSET? ,SAFE ,OPENBIT>>
<TELL
". An oblong hole has been chipped out of the front of it">)
(T
<TELL " whose door has been blown off">)>
<TELL ,PERIOD-CR>)>>
<OBJECT SAFE
(IN DUSTY-ROOM)
(DESC "box")
(SYNONYM SAFE BOX)
(ADJECTIVE STEEL RUSTY)
(FLAGS CONTBIT NDESCBIT)
(CAPACITY 15)
(ACTION SAFE-F)>
<ROUTINE SAFE-F ()
<COND (<AND <VERB? TAKE>
<EQUAL? ,PRSO ,SAFE>>
<TELL "The box is imbedded in the wall." CR>)
(<AND <VERB? OPEN CLOSE>
<FSET? ,SAFE ,OPENBIT>>
<TELL "The box has no door!" CR>)
(<VERB? OPEN>
<TELL "The box is rusted shut." CR>)
(<VERB? CLOSE>
<TELL "The box isn't open!" CR>)>>
<OBJECT SAFE-HOLE
(IN DUSTY-ROOM)
(DESC "hole")
(SYNONYM SLOT HOLE)
(CAPACITY 10)
(FLAGS OPENBIT NDESCBIT)
(TEXT
"The hole was someone's failed attempt to chip their way into the box.")>
<OBJECT CARD
(IN SAFE)
(DESC "card")
(LDESC "There is a card with writing on it here.")
(SYNONYM CARD NOTE)
(SIZE 1)
(FLAGS READBIT TAKEBIT BURNBIT)
(TEXT
"Warning: This room was constructed near weak rock strata. Detonation
of explosives here is strictly prohibited!")>
<OBJECT CROWN
(IN SAFE)
(DESC "gaudy crown")
(FDESC
"The excessively gaudy crown of Lord Dimwit Flathead sits in the safe.")
(LDESC "Lord Dimwit's crown is here.")
(SYNONYM CROWN TREASURE)
(ADJECTIVE GAUDY)
(SIZE 10)
(VALUE 20)
(FLAGS TAKEBIT)>
;"bomb"
<OBJECT BRICK
(IN STONE-BRIDGE)
(DESC "brick")
(LDESC "There is a square brick here which feels like clay.")
(SYNONYM BRICK)
(ADJECTIVE SQUARE CLAY)
(FLAGS TAKEBIT BURNBIT OPENBIT SEARCHBIT)
(CAPACITY 2)
(SIZE 9)
(ACTION BRICK-F)>
<ROUTINE BRICK-F ()
<COND (<VERB? BURN>
<REMOVE ,BRICK>
<JIGS-UP ,OTHER-PROPERTIES>)>>
<OBJECT FUSE
(IN RIDDLE-ROOM)
(DESC "black string")
(LDESC "There is a coil of black, braided string here.")
(SYNONYM FUSE STRING COIL)
(ADJECTIVE BLACK THIN)
(SIZE 1)
(FLAGS TAKEBIT TRYTAKEBIT BURNBIT)
(ACTION FUSE-F)>
<ROUTINE FUSE-F ()
<COND (<OR <VERB? BURN>
<AND <VERB? LAMP-ON>
<IN? ,MATCH ,WINNER>
<FSET? ,MATCH ,ONBIT>>>
<TELL "The string starts to burn." CR>
<ENABLE <QUEUE I-FUSE 2>>)>>
<ROUTINE I-FUSE ("AUX" BRICK-ROOM F)
<COND (<IN? ,FUSE ,BRICK>
<COND (<NOT <SET BRICK-ROOM <META-LOC ,BRICK>>>
<RFALSE>)>
<FSET .BRICK-ROOM ,RMUNGBIT>
<FCLEAR .BRICK-ROOM ,TOUCHBIT>
<COND (<EQUAL? .BRICK-ROOM ,HERE>
<JIGS-UP ,OTHER-PROPERTIES>)
(T
<COND (<IN? ,BRICK ,SAFE-HOLE>
<FSET ,SAFE-HOLE ,INVISIBLE>
<FSET ,SAFE ,OPENBIT>
<FCLEAR ,DUSTY-ROOM ,TOUCHBIT>
<ENABLE <QUEUE I-SAFE 5>>)>
<TELL "There is an explosion nearby." CR>
<COND (<SET F <FIRST? .BRICK-ROOM>>
<REPEAT ()
<COND (<FSET? .F ,TAKEBIT>
<FSET .F ,INVISIBLE>)>
<COND (<NOT <SET F <NEXT? .F>>>
<RETURN>)>>)>)>
<REMOVE ,BRICK>)
(<EQUAL? <LOC ,FUSE> ,WINNER ,HERE>
<TELL "The string burns into nothingness." CR>)>
<REMOVE ,FUSE>>
<ROUTINE BOMB? (O)
<COND (<AND <EQUAL? .O ,BRICK>
<IN? ,FUSE ,BRICK>
<NOT <0? <GET <INT I-FUSE> ,C-ENABLED?>>>>
<RTRUE>)
(T
<RFALSE>)>>
;<OBJECT EXPLOSION
(DESC "debris from an explosion")
(LDESC
"The room is cluttered with debris from an explosion. The walls seem ready
to collapse.")
(SYNONYM KREBF)>
<GLOBAL OTHER-PROPERTIES
"Now you've done it. It seems that the brick is an explosive and you have been
blown to bits.">
<GLOBAL DUSTY-ROOM-FLAG T>
<ROUTINE I-SAFE ()
<SETG DUSTY-ROOM-FLAG <>>
<COND (<EQUAL? ,HERE ,DUSTY-ROOM>
<JIGS-UP
"The room trembles and 5000 tons of rock fall on you.">)
(<NOT ,DEAD>
<TELL
"Probably as a result of that recent explosion, an ominous rumbling
indicates that a nearby room has collapsed." CR>)>>