-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathc2.zil
More file actions
1391 lines (1297 loc) · 39.5 KB
/
Copy pathc2.zil
File metadata and controls
1391 lines (1297 loc) · 39.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
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
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"C2 for
MAGE
(c) Copyright 1985 Infocom, Inc. All Rights Reserved."
"WATER"
<OBJECT WATER-CUBE
(IN MAGIC-BOX)
(DESC "cube")
(SYNONYM CUBE CUBES)
(ADJECTIVE BQ ;C2 SMALL FEATURELESS WHITE)
(NAME 0)
(TEXT "dolphins")
(FLAGS TAKEBIT)
(ACTION CUBE-F)
(DESCFCN CUBE-DESC)
(GENERIC GENERIC-CUBE-F)
(CUBE WATER-ROOM)>
<ROOM WATER-ROOM
(IN ROOMS)
(DESC "Water Room")
(CUBE WATER-CUBE)
(NORTH TO OUBLIETTE)
(EAST PER MAGIC-BOX-EXIT)
(SOUTH TO OCEAN-ROOM)
(ACTION WATER-ROOM-F)
(FLAGS RLANDBIT)
(GLOBAL WATER)
(THINGS
<PSEUDO (<> CORAL RANDOM-PSEUDO)
(DAMP MOSS RANDOM-PSEUDO)
(<> MUD RANDOM-PSEUDO)
(SHIMMERING FILM RANDOM-PSEUDO)
(<> BUBBLE RANDOM-PSEUDO)>)>
<ROUTINE WATER-ROOM-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"This is a damp, mossy room. Its floor is mud, and its walls and ceiling are
coral. In the gaps in the coral you can see a shimmering film which you
realize is actually the outer edge of a huge bubble of air enclosing you.
On the north, east and south sides of the room are curtains of bubbles."
CR>)
(<EQUAL? .RARG ,M-LEAVE>
<RECOVER-CUBE>)>>
"OCEAN PROBLEM -- SAVE LOST CUBE AND GET ONE FROM GROUPER"
<ROOM OCEAN-ROOM
(IN ROOMS)
(DESC "Mid-Ocean")
(ACTION OCEAN-ROOM-F)
(FLAGS RWATERBIT OUTSIDE ONBIT)
(GLOBAL WATER)>
<ROUTINE OCEAN-ROOM-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"You are swimming in mid-ocean.">
<CLEVER-CONTENTS ,HERE " Floating nearby" ,GROUPER>
<CRLF>)
(<EQUAL? .RARG ,M-ENTER>
<COND (<EQUAL? ,OHERE ,WATER-ROOM>
<MOVE ,GROUPER ,HERE>
<QUEUE I-GROUPER 2>
<QUEUE I-CUBE-SINKS 3>
<MOVE ,WATER-CUBE ,HERE>
<FSET ,WATER-CUBE ,NDESCBIT>
<TELL
"You step out of the room and drop precipitously into the Flathead Ocean,
making a terrific splash. " CTHE ,WATER-CUBE ", lost in the shock of the
fall, makes a smaller splash. It is a little less buoyant than you and
begins to sink slowly beneath the waves.">
<SOAK-PLAYER>
<CRLF>
<CRLF>)>)
(<EQUAL? .RARG ,M-BEG>
<FUN-IN-OCEAN>)
(<EQUAL? .RARG ,M-END>
<SOAK-IF-OPENED>)>>
<ROUTINE FUN-IN-OCEAN ()
<COND (<VERB? WALK SWIM>
<COND (<EQUAL? ,HERE ,LOST-IN-OCEAN>
<GOTO ,LOST-IN-OCEAN>)
(<EQUAL? ,P-WALK-DIR ,P?DOWN>
<COND (<EQUAL? ,CHANGED? ,GROUPER>
<YOU-SWIM>
<GOTO ,OCEAN-FLOOR>)
(ELSE
<HOLD-BREATH>)>)
(<EQUAL? ,P-WALK-DIR ,P?UP>
<TELL
"Only if you sprout wings first." CR>)
(ELSE
<GOTO ,LOST-IN-OCEAN>)>)
(<VERB? TAKE>
<COND (<EQUAL? ,CHANGED? ,GROUPER>
<TELL
"Your fins are not well designed to hold things." CR>)
(<G? ,P-MULT 1>
<TELL
"They were floating in opposite directions, and you get a chance
at only one of them." CR>
<RFATAL>)>)
(<AND <VERB? DROP> <HELD? ,PRSO>>
<QUEUE I-FLOTSAM 2>
<MOVE ,PRSO ,HERE>
<FSET ,PRSO ,NDESCBIT>
<SOAK-OBJ? ,PRSO>
<TELL CTHE ,PRSO>
<COND (<EQUAL? ,PRSO ,BOTTLE>
<TELL
" is now floating nearby">)
(ELSE
<TELL
" begins to sink beneath the waves">)>
<TELL ,PERIOD>)
(<AND <VERB? EAT>
<EQUAL? ,CHANGED? ,GROUPER>
<FSET? ,PRSO ,TAKEBIT>>
<SETG ATE-AS-GROUPER? T>
<REMOVE ,PRSO>
<TELL
"Opening your maw, you swallow "><THE-PRSO>)>>
<ROUTINE HOLD-BREATH ()
<TELL
"You take a deep breath and swim downward, but you can't hold it long enough
to reach the bottom." CR>>
<ROUTINE YOU-SWIM ()
<TELL "You swim ">
<COND (<EQUAL? ,HERE ,OCEAN-ROOM>
<TELL "downward">)
(ELSE <TELL "upward">)>
<COND (<IN? ,GROUPER ,HERE>
<COND (<EQUAL? ,HERE ,OCEAN-ROOM>
<MOVE ,GROUPER ,OCEAN-FLOOR>
<TELL ", followed">)
(ELSE <TELL ", watched">)>
<TELL " by the nervous grouper">)>
<TELL ,PERIOD CR>>
<ROOM LOST-IN-OCEAN
(IN ROOMS)
(DESC "Open Ocean")
(FLAGS RWATERBIT OUTSIDE ONBIT)
(ACTION LOST-IN-OCEAN-F)
(GLOBAL WATER)>
<ROUTINE LOST-IN-OCEAN-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"You are lost in the middle of the open ocean. There is no land in sight.">
<CLEVER-CONTENTS ,HERE " Floating nearby">
<CRLF>)
(<EQUAL? .RARG ,M-BEG>
<FUN-IN-OCEAN>)
(<EQUAL? .RARG ,M-END>
<SOAK-IF-OPENED>)>>
<ROOM OCEAN-FLOOR
(IN ROOMS)
(DESC "Ocean Floor")
(UP TO OCEAN-ROOM)
(ACTION OCEAN-FLOOR-F)
(FLAGS RWATERBIT ONBIT)
(GLOBAL WATER)>
<ROUTINE EMERGE-AND-DROWN ()
<COND (<NOT <EQUAL? ,CHANGED? ,GROUPER>>
<JIGS-UP
"You have reemerged beneath the water. There is no air here.
You drown.">)>>
<ROUTINE OCEAN-FLOOR-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"You are deep beneath the waves, near a small pile of rocks and broken
coral that make up the nest of a grouper." CR>)
(<EQUAL? .RARG ,M-ENTER>
<EMERGE-AND-DROWN>)
(<EQUAL? .RARG ,M-BEG>
<COND (<VERB? WALK SWIM>
<COND (<EQUAL? ,CHANGED? ,GROUPER>
<COND (<EQUAL? ,P-WALK-DIR ,P?UP>
<YOU-SWIM>
<GOTO ,OCEAN-ROOM>)
(<EQUAL? ,P-WALK-DIR ,P?DOWN>
<TELL
"You hit your nose against the sand." CR>)
(ELSE
<TELL
"You swim in circles for a while." CR>)>)
(<OR <NOT ,PRSO>
<EQUAL? ,PRSO ,P?UP>
<EQUAL? ,P-WALK-DIR ,P?UP>>
<TELL
"You swim upward, desperately trying to hold your breath until you
reach the surface. It's a losing battle. " ,YOU-CANT "hold it any
longer, take a breath, and it's pure, sweet air! You have reached the
surface." CR CR>
<GOTO ,OCEAN-ROOM>)
(ELSE
<TELL
"You swim about for a short distance." CR>)>)
(<VERB? DROP> <RFALSE>)
(<EQUAL? ,CHANGED? ,GROUPER>
<FUN-IN-OCEAN>)>)>>
<GLOBAL ATE-AS-GROUPER?:FLAG <>>
<OBJECT GROUPER-NEST
(IN OCEAN-FLOOR)
(DESC "grouper nest")
(SYNONYM NEST CORAL ROCKS PILE)
(ADJECTIVE GROUPER BROKEN PILE)
(FLAGS NDESCBIT OPENBIT CONTBIT SEARCHBIT TRYTAKEBIT)
(CAPACITY 20)>
<OBJECT BOTTLE
(IN OCEAN-ROOM)
(DESC "bottle")
(SYNONYM BOTTLE)
(ADJECTIVE FLOATING)
(FLAGS NDESCBIT TAKEBIT CONTBIT TRANSBIT SEARCHBIT)
(CAPACITY 6)
(ACTION BOTTLE-F)>
<ROUTINE BOTTLE-F ("AUX" F)
<COND (<VERB? FILL>
<COND (<NOT <IN? ,BOTTLE ,WINNER>>
<NOT-HOLDING ,BOTTLE>)
(<IN? ,LOCAL-WATER ,BOTTLE>
<TELL ,IT-IS-ALREADY "full" ,PERIOD>)
(<EQUAL? ,PRSI <> ,WATER>
<COND (<NOT <GLOBAL-IN? ,WATER ,HERE>>
<TELL "There's no water here." CR>
<RTRUE>)>
<MOVE ,LOCAL-WATER ,BOTTLE>
<TELL
CTHE ,BOTTLE " is now full of ">
<COND (<EQUAL? ,HERE
,OCEAN-ROOM
,OCEAN-FLOOR
,LOST-IN-OCEAN>
<FSET ,LOCAL-WATER ,RMUNGBIT>
<TELL "salt ">)
(ELSE
<FCLEAR ,LOCAL-WATER ,RMUNGBIT>)>
<TELL "water">
<COND (<NOT <FSET? ,BOTTLE ,OPENBIT>>
<TELL ", and it's closed again">)>
<COND (<SET F <SOAK-STUFF ,BOTTLE>>
<TELL
". The water has ruined something in the bottle">)>
<TELL ,PERIOD>)
(ELSE
<YOU-CANT-X-PRSI "fill the bottle with">)>)
(<AND <VERB? POUR>
<EQUAL? ,PRSO ,BOTTLE>
<IN? ,LOCAL-WATER ,BOTTLE>>
<REMOVE ,LOCAL-WATER>
<TELL
CTHE ,BOTTLE " is now empty of water." CR>)
(<VERB? LOOK-INSIDE OPEN>
<FCLEAR ,LISKON-SCROLL ,NDESCBIT>
<RFALSE>)>>
<OBJECT GROUPER
(IN OCEAN-ROOM)
(DESC "grouper")
(LDESC
"A large grouper swims nearby.")
(SYNONYM FISH GROUPER)
(ADJECTIVE LARGE)
(FLAGS PERSON THE)
(SIZE 100)
(ACTION GROUPER-F)>
<ROUTINE GROUPER-F ()
<COND (<EQUAL? ,WINNER ,GROUPER>
<END-QUOTE>
<TELL
"The grouper stares at you, goggle-eyed and interested, but wary." CR>)
(<VERB? EXAMINE>
<TELL
"The grouper is a large fish with an enormous mouth. This specimen
is large but not exceptional. It probably weighs about as much as you." CR>)
(<VERB? FOLLOW>
<COND (<AND <IN? ,GROUPER ,OCEAN-FLOOR>
<IN? ,PLAYER ,OCEAN-ROOM>>
<DO-WALK ,P?DOWN>)>)
(<VERB? WAVE-AT GIVE SHOW>
<TELL
"The grouper looks interested but is afraid to come close." CR>)
(<AND <VERB? LISKON>
<NOT <PRE-LISKON>>>
<REMOVE ,GROUPER>
<DEQUEUE I-GROUPER>
<DEQUEUE I-GROUPER-IN-NEST>
<TELL
"The grouper dwindles to the size of a sea bass. Startled and upset,
it swims rapidly away." CR>)
(<VERB? SNAVIG>
<SETG CHANGED? ,GROUPER>
<SETG ATE-AS-GROUPER? <>>
<QUEUE I-SNAVIG 12>
<TELL
"You change.">
<COND (<ROB ,PLAYER ,OCEAN-FLOOR>
<TELL " You can no longer carry anything.">)>
<TELL
" The grouper stares at you with fishy eyes like yours, twiddles
fins like yours, opens a huge mouth like yours, and flicking a
tail like yours, swims suspiciously around you." CR>)
(<VERB? ESPNIS>
<TELL
"As groupers rarely if ever sleep, this has no effect." CR>)
(<VERB? YOMIN>
<TELL
"The mind of a grouper is hard to focus on, but you get a vision of ">
<COND (<OR <IN? ,BREAD ,GROUPER>
<IN? ,FISH ,GROUPER>>
<TELL
"curiosity and expectation: is there any more food to be had?">)
(ELSE
<TELL
"hunger and curiosity. The last time the grouper saw something like
you, it was interesting.">)>
<CRLF>)
(<HOSTILE-VERB?>
<TELL
"The grouper is startled but returns after
a few moments, its curiosity unsated." CR>)>>
\
"OUBLIETTE PROBLEM - GET OUT ONE OF TWO WAYS!"
<ROOM OUBLIETTE
(IN ROOMS)
(DESC "Oubliette")
(DOWN PER OUBLIETTE-DOWN-EXIT)
(UP PER OUBLIETTE-UP-EXIT) ;"PRISON"
(ACTION OUBLIETTE-F)
(FLAGS RLANDBIT)
(GLOBAL TRAP-DOOR WATER)>
<GLOBAL WATER-FLAG:NUMBER 0> ;"how full is oubliette?"
<GLOBAL FREEZE-FLAG:NUMBER 0> ;"how much ice is there?"
<GLOBAL FREEZE-COUNT:NUMBER 0> ;"how near death from hypothermia?"
<ROUTINE OUBLIETTE-DOWN-EXIT ()
<COND (,SMALL-FLAG
<COND (,WATER-FLAG
<TELL "The channel is frozen over." CR>
<RFALSE>)
(ELSE ,IN-CHANNEL)>)
(,WATER-FLAG
<COND (<IN? ,WINNER ,ICEBERG>
<TELL ,YOU-HAVE-TO " get in the water first" ,PERIOD>)
(ELSE
<HOLD-BREATH>)>
<RFALSE>)
(ELSE
<TELL "You'd never fit." CR>
<RFALSE>)>>
<ROUTINE OUBLIETTE-UP-EXIT ()
<COND (<G? ,WATER-FLAG 3>
<COND (<FSET? ,TRAP-DOOR ,OPENBIT>
<COND (<IN? ,PLAYER ,ICEBERG>
<MOVE ,PLAYER ,HERE>
,PRISON)
(ELSE
<TELL
"You still can't quite reach the trap door opening. " ,YOU-CANT "get enough
momentum thrusting upward out of the water." CR>
<RFALSE>)>)
(ELSE
<THIS-IS-IT ,TRAP-DOOR>
<TELL-OPEN-CLOSED ,TRAP-DOOR>
<RFALSE>)>)
(ELSE
<COND (<G? ,WATER-FLAG 0>
<TELL
"The oubliette is only " <GET ,WATER-HEIGHTS ,WATER-FLAG> " full. ">)>
<TELL
CTHE ,TRAP-DOOR " is far over your head. ">
<CANT-REACH-IT>
<RFALSE>)>>
<ROUTINE OUBLIETTE-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"This is an oubliette. ">
<COND (<G? ,WATER-FLAG 0>
<TELL
"It is " <GET ,WATER-HEIGHTS ,WATER-FLAG> " full of icy water. Sheer walls
enclose it on all sides. In the ceiling is">)
(ELSE
<TELL
"Sheer walls rise for twenty feet above you and lean
inward to">)>
<TELL " a narrow opening">
<COND (<NOT <FSET? ,TRAP-DOOR ,OPENBIT>>
<TELL " covered with wooden planks">)>
<COND (<ZERO? ,WATER-FLAG>
<COND (<ZERO? ,FREEZE-FLAG>
<TELL ". A small but fast-flowing ">)
(<EQUAL? ,FREEZE-FLAG 1>
<TELL ". A partially frozen ">)
(ELSE
<TELL ". A completely frozen ">)>
<TELL
"channel of water runs along the bottom of the chamber between two pipes">)
(<L? ,WATER-FLAG 4>
<TELL ". The water level is ">
<COND (<QUEUED? I-OUBLIETTE-FILLS>
<TELL "rising">)
(ELSE <TELL "falling">)>)>
<TELL ,PERIOD>)
(<EQUAL? .RARG ,M-BEG>
<COND (<AND <VERB? PUT>
<ZERO? ,WATER-FLAG>
<EQUAL? ,PRSI ,WATER>>
<PERFORM ,PRSA ,PRSO ,OUBLIETTE-CHANNEL>
<RTRUE>)
(<AND <G? ,WATER-FLAG 0>
<OR <VERB? DROP THROW>
<AND <VERB? PUT>
<EQUAL? ,PRSI ,WATER>>>>
<COND (<IDROP>
<REMOVE ,PRSO>
<TELL "Splash! Dropped." CR>)
(ELSE <RTRUE>)>)
(<AND <G? ,WATER-FLAG 0>
<OR <EQUAL? ,PRSO
,INFLOW ,OUTFLOW ,OUBLIETTE-CHANNEL>
<EQUAL? ,PRSI
,INFLOW ,OUTFLOW ,OUBLIETTE-CHANNEL>>>
<TELL "It's under water!" CR>)
(<AND <VERB? THROUGH BOARD>
<EQUAL? ,PRSO ,WATER>>
<COND (<IN? ,PLAYER ,ICEBERG>
<PERFORM ,V?DISEMBARK ,ICEBERG>)
(<G? ,WATER-FLAG 0>
<TELL ,YOU-ARE ,PERIOD>)
(ELSE
<PERFORM ,PRSA ,OUBLIETTE-CHANNEL>)>
<RTRUE>)
(<AND <VERB? CLIMB-ON>
<EQUAL? ,PRSO ,TRAP-DOOR>>
<DO-WALK ,P?UP>
<RTRUE>)
(<AND <VERB? LEAP>
<EQUAL? ,PRSO ,WATER>
<IN? ,PLAYER ,ICEBERG>>
<PERFORM ,V?DISEMBARK>
<RTRUE>)>)
(<EQUAL? .RARG ,M-ENTER>
<COND (<G? ,WATER-FLAG 0>
<TELL "You ">
<COND (<EQUAL? ,OHERE ,WATER-ROOM>
<TELL "emerge in">)
(ELSE
<TELL "plunge into the">)>
<TELL
" freezing water and frantically swim to the surface.">
<SOAK-PLAYER>
<CRLF>
<CRLF>)>
<SETG FREEZE-COUNT 0>
<RFALSE>)
(<EQUAL? .RARG ,M-LEAVE>
<SETG FREEZE-COUNT 0>)
(<EQUAL? .RARG ,M-END>
<COND (<AND <G? ,WATER-FLAG 0>
<NOT <IN? ,PLAYER ,ICEBERG>>>
<SOAK-PLAYER T>
<SETG FREEZE-COUNT <+ ,FREEZE-COUNT 1>>
<COND (<EQUAL? ,FREEZE-COUNT 5>
<TELL CR
"Your body is becoming numb from the cold of the water." CR>)
(<EQUAL? ,FREEZE-COUNT 10>
<HYPOTHERMIA>)>)>)>>
<ROUTINE HYPOTHERMIA ()
<CRLF>
<JIGS-UP
"The nearly freezing water has overcome you. You die of
hypothermia.">>
<OBJECT ICEBERG
(DESC "ice floe")
(SYNONYM ICEFLOE FLOE ICEBERG BERG)
(ADJECTIVE ICE SMALL FLAT)
(ACTION ICEBERG-F)
(FLAGS AN VEHBIT OPENBIT CONTBIT SURFACEBIT)
(CAPACITY 200)>
<ROUTINE ICEBERG-F ("OPTIONAL" (RARG <>))
<COND (<EQUAL? .RARG ,M-BEG>
<COND (<OR <VERB? CLIMB-DOWN DISEMBARK>
<AND <VERB? LEAP>
<EQUAL? ,PRSO ,WATER>>>
<MOVE ,WINNER ,HERE>
<TELL
"You reenter the freezing water." CR>)>)
(<NOT .RARG>
<COND (<AND <VERB? BOARD SIT CLIMB-FOO CLIMB-ON STAND-ON>
<NOT <IN? ,WINNER ,ICEBERG>>>
<SETG FREEZE-COUNT 0>
<MOVE ,WINNER ,ICEBERG>
<TELL
"You scramble onto the ice floe." CR>)
(<VERB? RUB>
<TELL "It's cold." CR>)>)>>
<GLOBAL WATER-HEIGHTS:TABLE
<PLTABLE "one-quarter" "half" "three-quarters" "completely">>
<OBJECT INFLOW
(IN OUBLIETTE)
(DESC "inflow pipe")
(SYNONYM PIPE PIPES)
(ADJECTIVE INFLOW INPUT)
(FLAGS NDESCBIT AN)
(ACTION INFLOW-F)>
<ROUTINE TELL-ABOUT-PIPE ()
<TELL
CTHE ,PRSO " is ceramic, about a foot in diameter, and ">>
<ROUTINE INFLOW-F ()
<COND (<VERB? EXAMINE>
<TELL-ABOUT-PIPE>
<COND (<EQUAL? ,HERE ,OUBLIETTE ,IN-CHANNEL>
<TELL "is here
to let water into the channel, presumably for drinking and sanitary
purposes">)
(ELSE
<TELL "water is rushing through it">)>
<TELL ,PERIOD>)
(<AND <VERB? THROUGH BOARD>
,SMALL-FLAG>
<TELL
"The current is too swift." CR>)
(ELSE
<FLOW-HACKS>)>>
<ROUTINE FLOW-HACKS ()
<COND (<VERB? THROUGH BOARD>
<TELL
"It's much too small for you to fit." CR>)
(<VERB? LOOK-INSIDE>
<TELL
"It's dark and filled with rushing water, so you can't see much." CR>)
(<VERB? REACH-IN>
<TELL
"The pipe extends as far as you can reach." CR>)
(<AND <VERB? PUT>
<HELD? ,PRSO>>
<SWEPT-AWAY ,PRSO>)
(<AND <VERB? PLUG>
<HELD? ,PRSI>>
<SWEPT-AWAY ,PRSI>)>>
<OBJECT OUTFLOW
(IN OUBLIETTE)
(DESC "outflow pipe")
(SYNONYM PIPE PIPES)
(ADJECTIVE OUTFLOW OUTPUT)
(FLAGS NDESCBIT AN VEHBIT)
(ACTION OUTFLOW-F)>
<ROUTINE OUTFLOW-F ("AUX" OUB?)
<SET OUB? <EQUAL? ,HERE ,IN-CHANNEL ,OUBLIETTE>>
<COND (<VERB? EXAMINE>
<TELL-ABOUT-PIPE>
<COND (.OUB?
<TELL
"permits water in the channel to exit the oubliette">)
(ELSE
<TELL "has water flowing out of it">)>
<TELL ,PERIOD>)
(<AND <VERB? THROUGH BOARD>
,SMALL-FLAG>
<COND (<NOT <EQUAL? ,HERE ,OUBLIETTE ,RUINS-ROOM>>
<TELL
"It's almost inevitable, given the speed of the current." CR CR>)>
<GOTO <COND (.OUB? ,IN-PIPE)
(ELSE ,IN-SEWER)>>)
(ELSE <FLOW-HACKS>)>>
<ROOM IN-CHANNEL
(IN ROOMS)
(DESC "In Channel")
(UP TO OUBLIETTE)
(WEST TO IN-PIPE)
(EAST "The current is too strong." ;IN-PIPE-2)
(ACTION IN-CHANNEL-F)
(FLAGS RWATERBIT)
(GLOBAL WATER WATER-PIPE)>
<ROUTINE IN-CHANNEL-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"You are in a fast flowing stream of very cold water. " ,LONG-PIPE-DESC-2 CR>)
(<EQUAL? .RARG ,M-ENTER>
<FUN-IN-PIPE>)
(<EQUAL? .RARG ,M-END>
<SOAK-IF-OPENED>)>>
<ROUTINE SOAK-PLAYER ("OPTIONAL" (END? <>))
<COND (<SOAK-STUFF ,PLAYER>
<COND (<NOT .END?> <TELL " ">)>
<TELL
"Some of your possessions have been damaged by the water.">
<COND (.END? <CRLF>)>
<RTRUE>)>>
<ROUTINE SOAK-IF-OPENED ()
<COND (<AND <VERB? OPEN>
<SOAK-STUFF ,PRSO>>
<TELL
"Oh, no! Something has been damaged as water rushed into ">
<THE-PRSO>)>>
<OBJECT WATER-PIPE
(IN LOCAL-GLOBALS)
(DESC "pipe")
(SYNONYM PIPE CHANNEL)
(ADJECTIVE CERAMIC INFLOW OUTFLOW)
(FLAGS NDESCBIT VEHBIT)
(ACTION WATER-PIPE-F)>
<ROUTINE WATER-PIPE-F ()
<COND (<VERB? EXAMINE>
<TELL-ABOUT-PIPE>
<TELL "water flows from one end of it to the other.">
<COND (<EQUAL? ,HERE ,IN-PIPE-2>
<TELL " A chunk has broken out of the pipe here.">)>
<CRLF>)
(<AND <VERB? PUT>
<HELD? ,PRSO>
<EQUAL? ,PRSI ,WATER-PIPE>>
<SWEPT-AWAY ,PRSO>)
(<AND <VERB? PLUG>
<HELD? ,PRSI>>
<SWEPT-AWAY ,PRSI>)
(<VERB? THROUGH BOARD>
<TELL ,YOU-ARE>
<TELL ,PERIOD>)
(<VERB? DISEMBARK LEAVE>
<COND (<EQUAL? ,HERE ,IN-CHANNEL ,RUINED-PIPE>
<DO-WALK ,P?UP>
<RTRUE>)
(ELSE
<TELL "There is no way out here." CR>)>)>>
<ROUTINE SWEPT-AWAY (OBJ)
<REMOVE .OBJ>
<TELL
"It drops into the water and is swept away by the current." CR>>
<OBJECT OUBLIETTE-CHANNEL
(IN OUBLIETTE)
(DESC "channel")
(SYNONYM CHANNEL)
(ADJECTIVE CERAMIC)
(FLAGS NDESCBIT VEHBIT OPENBIT)
(ACTION CHANNEL-F)>
<ROUTINE CHANNEL-F ()
<COND (<VERB? EXAMINE>
<TELL-ABOUT-PIPE>
<COND (<EQUAL? ,PRSO ,OUBLIETTE-CHANNEL>
<TELL "water rushes
through it from an inflow pipe at one end to an outflow pipe at the
other">)
(ELSE
<TELL "smashed at the
top where a huge pillar destroyed the paving above it">)>
<TELL ,PERIOD>)
(<VERB? THROUGH BOARD>
<COND (,SMALL-FLAG
<GOTO <COND (<EQUAL? ,PRSO ,OUBLIETTE-CHANNEL>
,IN-CHANNEL)
(ELSE ,RUINED-PIPE)>>)
(ELSE
<TELL
"Trying to wet your tootsies, eh? Well, you dabble your feet in the water
for a while, but they get pretty cold, and water splashes on the floor." CR>)>)
(<AND <VERB? PUT> <HELD? ,PRSO>>
<SWEPT-AWAY ,PRSO>)
(<AND <VERB? PLUG> <HELD? ,PRSI>>
<SWEPT-AWAY ,PRSI>)
(<AND <VERB? CASKLY> <EQUAL? ,PRSO ,RUINS-CHANNEL>>
<TELL
"This channel was made as perfectly as the technology of the times allowed,
and even as a ruin, its essence is still perfect." CR>)>>
<ROOM IN-PIPE
(IN ROOMS)
(DESC "In Pipe")
(EAST "The current is too strong." ;IN-CHANNEL)
(WEST TO IN-PIPE-2)
(ACTION IN-PIPE-F)
(FLAGS RWATERBIT)
(GLOBAL WATER WATER-PIPE)
(THINGS <PSEUDO (MOSSY SLIME MOSS-PSEUDO)
(<> MOSS MOSS-PSEUDO)>)>
<ROUTINE MOSS-PSEUDO ()
<COND (<VERB? EXAMINE RUB>
<TELL "It's green and slimy." CR>)>>
<ROUTINE IN-PIPE-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL ,LONG-PIPE-DESC ,LONG-PIPE-DESC-2 CR>)
(<EQUAL? .RARG ,M-ENTER>
<FUN-IN-PIPE>)
(<EQUAL? .RARG ,M-END>
<SOAK-IF-OPENED>)>>
<ROOM IN-PIPE-2
(IN ROOMS)
(DESC "In Pipe")
(EAST "The current is too strong." ;IN-PIPE)
(WEST TO RUINED-PIPE)
(ACTION IN-PIPE-2-F)
(FLAGS RWATERBIT)
(GLOBAL WATER WATER-PIPE)
(THINGS <PSEUDO (MOSSY SLIME MOSS-PSEUDO)
(<> MOSS MOSS-PSEUDO)>)>
<GLOBAL LONG-PIPE-DESC:STRING
"You are inside a small ceramic pipe nearly filled with fast-flowing cold
water. The walls of the pipe are slippery and overgrown with mossy slime
wherever an irregularity shields the growth from the force of the water. ">
<GLOBAL LONG-PIPE-DESC-2:STRING
"Going east (against the current) would be nearly impossible. Going west
is almost unavoidable.">
<ROUTINE IN-PIPE-2-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL ,LONG-PIPE-DESC
"On the north side of the pipe is such an irregularity: a large chunk has
been knocked out of the pipe, and the slime and moss grows abundantly. ">
<COND (<IN? ,CHANGE-CUBE ,CHUNK>
<TELL
"Inside, covered with moss and slime, is something large, white, and
apparently cubical. ">)>
<TELL ,LONG-PIPE-DESC-2 CR>)
(<EQUAL? .RARG ,M-ENTER>
<FUN-IN-PIPE>)
(<EQUAL? .RARG ,M-END>
<SOAK-IF-OPENED>)>>
<OBJECT CHUNK
(IN IN-PIPE-2)
(DESC "crack")
(SYNONYM CRACK CHUNK)
(ADJECTIVE MOSSY SLIMY)
(FLAGS NDESCBIT OPENBIT CONTBIT TRANSBIT SEARCHBIT)
(ACTION CHUNK-F)>
<ROUTINE CHUNK-F ()
<COND (<VERB? EXAMINE>
<TELL
"A weak spot in the pipe has broken away here, making a smallish crack that
has filled with slime and moss.">
<COND (<IN? ,CHANGE-CUBE ,CHUNK>
<TELL
" There is a large white object partially obscured by the growth. It
is held in the crack by the force of the current.">)>
<CRLF>)
(<VERB? REACH-IN RUB>
<TELL "You reach into the crack and touch ">
<COND (<IN? ,CHANGE-CUBE ,CHUNK>
<TELL
"the cube. Don't you want to take it, too?">)
(ELSE <TELL "moss.">)>
<CRLF>)
(<VERB? THROUGH BOARD>
<TELL
"It's too small to enter. It's large enough to reach into, though." CR>)
(<AND <VERB? PUT> <EQUAL? ,PRSI ,CHUNK>>
<COND (<FIRST? ,PRSI>
<TELL ,NO-ROOM CR>)
(<GETPT ,PRSO ,P?NAME>
<REMOVE ,PRSO>
<TELL
"You put " THE ,PRSO " in the crack, but the moss won't hold it in any
longer, and the current carries it away before you can retrieve it." CR>)>)>>
<ROOM RUINED-PIPE
(IN ROOMS)
(DESC "Ruined Pipe")
(EAST "The current is too strong." ;IN-PIPE-2)
(WEST TO IN-SEWER)
(UP TO RUINS-ROOM)
(OUT TO RUINS-ROOM)
(ACTION RUINED-PIPE-F)
(FLAGS RWATERBIT)
(GLOBAL WATER WATER-PIPE)>
<ROUTINE RUINED-PIPE-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"The pipe here is smashed from the top where a huge pillar has toppled
over onto it. Cyclopean ruins are all around you. The cracks and fissures
in the pipe might make it possible to climb out here. The water is fast
and loud around you." CR>)
(<EQUAL? .RARG ,M-ENTER>
<FUN-IN-PIPE>)
(<EQUAL? .RARG ,M-END>
<SOAK-IF-OPENED>)>>
<ROUTINE FUN-IN-PIPE ()
<QUEUE I-DOWNSTREAM 3>
<COND (<EQUAL? ,OHERE ,OUBLIETTE ,RUINS-ROOM>
<TELL "You enter the cold, fast-flowing water.">
<SOAK-PLAYER>
<CRLF>
<CRLF>)>>
<ROOM IN-SEWER
(IN ROOMS)
(DESC "In Pipe")
(EAST "The current is too strong." ;RUINED-PIPE)
(ACTION IN-SEWER-F)
(FLAGS RWATERBIT)
(GLOBAL WATER WATER-PIPE)>
<ROUTINE IN-SEWER-F (RARG)
<COND (<EQUAL? .RARG ,M-ENTER>
<JIGS-UP
"The water swirls down the pipe, its angle of descent increasing until
it tumbles over a precipice. You are buffeted back and forth, flipping
over, headfirst one second, feetfirst the next. At last, dizzy and
confused, you are dashed against the rocks at the bottom of the cistern.">)>>
<ROOM PRISON
(IN ROOMS)
(DESC "Dungeon")
(DOWN PER PRISON-DOWN-EXIT ;OUBLIETTE)
(UP TO GUARD-TOWER)
(EAST TO CELL-HALL-EAST)
(ACTION PRISON-F)
(FLAGS RLANDBIT)
(GLOBAL TRAP-DOOR EAST-WALL)
(THINGS <PSEUDO (<> SLIME MOSS-PSEUDO)
(<> MOSS MOSS-PSEUDO)
(<> FUNGUS MOSS-PSEUDO)>)>
<ROUTINE PRISON-DOWN-EXIT ()
<COND (<FSET? ,TRAP-DOOR ,OPENBIT>
<COND (,WATER-FLAG ,OUBLIETTE)
(ELSE
<JIGS-UP
"You fall to your death on the stones below.">
<RFALSE>)>)
(ELSE
<TELL-OPEN-CLOSED ,TRAP-DOOR>
<RFALSE>)>>
<ROUTINE PRISON-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"This is a dark, dank, forgotten dungeon. It is overgrown with moss, fungus,
and slime. The floor is slippery. At your feet ">
<COND (<FSET? ,TRAP-DOOR ,OPENBIT>
<TELL "an open trap door leads down into blackness.">)
(ELSE
<TELL "is a closed trap door.">)>
<TELL
" A corridor leads east and stairs lead up." CR>)>>
<OBJECT TRAP-DOOR
(IN LOCAL-GLOBALS)
(DESC "trap door")
(SYNONYM DOOR OPENING)
(ADJECTIVE TRAP OAK NARROW)
(FLAGS DOORBIT)
(ACTION TRAP-DOOR-F)>
<ROUTINE TRAP-DOOR-F ()
<COND (<VERB? EXAMINE>
<TELL
"This is a sturdy oak trap door, but it is obviously rarely used, as it
is covered with mold, cobwebs, and dirt. ">
<TELL-OPEN-CLOSED ,TRAP-DOOR>)
(<VERB? OPEN CLOSE>
<COND (<NOT <EQUAL? ,HERE ,OUBLIETTE>> <RFALSE>)
(<OR <L? ,WATER-FLAG 4>
<NOT <IN? ,PLAYER ,ICEBERG>>>
<CANT-REACH-IT>)
(ELSE
<OPEN-CLOSE>)>)
(<AND <VERB? REZROV> <NOT <FSET? ,TRAP-DOOR ,OPENBIT>>>
<FSET ,TRAP-DOOR ,OPENBIT>
<TELL
"The trap door creaks open upon rusty hinges." CR>)
(<VERB? THROUGH BOARD>
<DO-WALK <COND (<EQUAL? ,HERE ,PRISON>
,P?DOWN)
(ELSE ,P?UP)>>)>>
<ROOM CELL-HALL-EAST
(IN ROOMS)
(DESC "Dungeon East End")
(LDESC
"The hall ends at a blank wall, but a cell lies to the north. There
is no door on the cell.")
(WEST TO PRISON)
(NORTH TO CELL-EAST)
(FLAGS RLANDBIT)
(THINGS <PSEUDO (<> CELL CELL-PSEUDO)>)>
<ROOM CELL-EAST
(IN ROOMS)
(DESC "Dungeon Cell")
(LDESC
"This was once a very luxurious cell, obviously for the imprisonment of a
highborn or powerful person. Its rich hangings are now rotten rags; its
furniture is smashed to kindling, except for one massive oak cabinet.
The cell door has been blown away by an explosion, or perhaps a \"rezrov\"
spell.")
(SOUTH TO CELL-HALL-EAST)
(FLAGS RLANDBIT)
(THINGS <PSEUDO (<> CELL CELL-PSEUDO)
(ROTTEN RAGS PLURAL-PSEUDO)
(RICH HANGINGS PLURAL-PSEUDO)>)>
<OBJECT CABINET
(IN CELL-EAST)
(DESC "massive cabinet")
(SYNONYM CABINET BUREAU)
(ADJECTIVE MASSIVE LARGE HUGE OAK)
(FLAGS NDESCBIT CONTBIT VEHBIT LOCKED)
(CAPACITY 20)
(ACTION CABINET-F)>
<OBJECT PAST-CABINET
(IN PAST-CELL-EAST)
(DESC "massive cabinet")
(SYNONYM CABINET BUREAU)
(ADJECTIVE MASSIVE LARGE HUGE OAK)
(FLAGS NDESCBIT CONTBIT VEHBIT LOCKED)
(CAPACITY 20)
(ACTION CABINET-F)>
<ROUTINE CABINET-F ("OPTIONAL" (RARG <>) "AUX" L)
<COND (<EQUAL? .RARG ,M-BEG>
<SET L <LOC ,WINNER>>
<COND (<AND <VERB? LOOK>
<NOT <FSET? .L ,OPENBIT>>>
<TELL-OPEN-CLOSED .L>)
(<VERB? WALK>
<TELL
,YOU-HAVE-TO " get out of the " 'CABINET " first" ,PERIOD>)
(<AND <VERB? DISEMBARK>
<NOT <FSET? .L ,OPENBIT>>>
<TELL-OPEN-CLOSED .L>)
(<AND <VERB? OPEN>
<EQUAL? ,PRSO ,CABINET ,PAST-CABINET>
<NOT <FSET? ,PRSO ,OPENBIT>>>
<FSET ,PRSO ,OPENBIT>
<TELL "Opened." CR>)>)
(<NOT .RARG>
<COND (<VERB? EXAMINE>
<TELL
"This massive cabinet fills most of one wall. It's made of oak and looks ">
<COND (<EQUAL? ,HERE ,CELL-EAST>
<TELL
"better preserved than anything else in the room. Its lock is corroded and
unusable. ">)
(ELSE
<TELL
"quite sturdy. It has a strong lock. ">)>
<TELL-OPEN-CLOSED ,PRSO>)
(<VERB? BOARD>
<COND (<NOT <FSET? ,PRSO ,OPENBIT>>
<TELL-OPEN-CLOSED ,PRSO>)
(<NOT ,SHRINK-FLAG>
<TELL
"You're too big. It isn't very deep." CR>)>)
(<VERB? HIDE>
<TELL ,NO-ROOM CR>)
(<AND <VERB? OPEN>
<FSET? ,PRSO ,LOCKED>>
<TELL
"The cabinet is locked." CR>)
(<AND <VERB? LOCK UNLOCK>