-
Notifications
You must be signed in to change notification settings - Fork 27
/
lake.zil
2231 lines (2059 loc) · 64.3 KB
/
lake.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
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
"LAKE for
ZORK ZERO
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<BEGIN-SEGMENT LAKE>
<ROOM WEST-SHORE
(LOC ROOMS)
(DESC "West Shore")
(REGION "Flatheadia")
(EAST SORRY "These waters are known for their hungry denizens.")
(WEST TO ROYAL-ZOO)
(FLAGS RLANDBIT ONBIT UNDERGROUNDBIT)
(GLOBAL LAKE-FLATHEAD STAIRS)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-5 MAP-GEN-X-3>)
(ICON WEST-SHORE-ICON)
(ACTION WEST-SHORE-F)>
<ROUTINE WEST-SHORE-F ("OPT" (RARG <>))
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"What's a castle without a lake? Dimwit loved lakes, but hated to go outside,
so he had one constructed in his extensive cellars. Once a lovely lake, teeming
with life, its waters have grown stagnant. The scummy surface stretches off to
the east, and a tunnel leads west.">)>>
<OBJECT WEST-DOCK
(LOC WEST-SHORE)
(DESC "yellow dock")
(SYNONYM DOCK)
(ADJECTIVE YELLOW WEST)
(CAPACITY 200)
(FLAGS NDESCBIT VEHBIT DROPBIT OPENBIT SEARCHBIT CONTBIT SURFACEBIT)
(ACTION DOCK-F)>
<ROOM NORTH-SHORE
(LOC ROOMS)
(DESC "North Shore")
(REGION "Flatheadia")
(SOUTH SORRY "These waters are known for their hungry denizens.")
(NORTH TO PHIL-HALL)
(NE TO THEATRE)
(FLAGS RLANDBIT ONBIT UNDERGROUNDBIT)
(GLOBAL LAKE-FLATHEAD STAIRS)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-4 MAP-GEN-X-4>)
(ICON NORTH-SHORE-ICON)
(ACTION NORTH-SHORE-F)>
<ROUTINE NORTH-SHORE-F ("OPT" (RARG <>))
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"Stretching off to the south is an impressive sight: a large lake, completely
contained within the castle. A red dock protrudes into the lake">
<COND (<IN? ,YACHT ,HERE>
<TELL ,YACHT-MOORED>)>
<TELL ". Tunnels lead north and northeast.">)>>
<OBJECT NORTH-DOCK
(LOC NORTH-SHORE)
(DESC "red dock")
(SYNONYM DOCK)
(ADJECTIVE RED NORTH)
(CAPACITY 200)
(FLAGS NDESCBIT VEHBIT DROPBIT OPENBIT SEARCHBIT CONTBIT SURFACEBIT)
(ACTION DOCK-F)>
<ROOM EAST-SHORE
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "East Shore")
(WEST SORRY "These waters are known for their hungry denizens.")
(EAST TO BASE-OF-MOUNTAIN)
(FLAGS RLANDBIT ONBIT UNDERGROUNDBIT)
(GLOBAL LAKE-FLATHEAD STAIRS G-U-MOUNTAIN)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-5 MAP-GEN-X-5>)
(ICON EAST-SHORE-ICON)
(ACTION EAST-SHORE-F)>
<ROUTINE EAST-SHORE-F ("OPT" (RARG <>))
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"A narrow beach lies between the lake, to the west, and a tall mountain,
to the east. It's hard to remember that you're still within the castle.
A blue dock juts out into the lake">
<COND (<IN? ,YACHT ,HERE>
<TELL ,YACHT-MOORED>)>
<TELL ".">)>>
<OBJECT EAST-DOCK
(LOC EAST-SHORE)
(DESC "blue dock")
(SYNONYM DOCK)
(ADJECTIVE BLUE EAST)
(CAPACITY 200)
(FLAGS NDESCBIT VEHBIT DROPBIT OPENBIT SEARCHBIT CONTBIT SURFACEBIT)
(ACTION DOCK-F)>
<ROOM SOUTH-SHORE
(LOC ROOMS)
(DESC "South Shore")
(REGION "Flatheadia")
(NORTH SORRY "These waters are known for their hungry denizens.")
(SOUTH TO EDGE-OF-DESERT)
(WEST TO STREAM)
(FLAGS RLANDBIT ONBIT UNDERGROUNDBIT)
(GLOBAL LAKE-FLATHEAD STAIRS)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-6 MAP-GEN-X-4>)
(ICON SOUTH-SHORE-ICON)
(ACTION SOUTH-SHORE-F)>
<ROUTINE SOUTH-SHORE-F ("OPT" (RARG <>))
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"The sandy beach on the south side of the lake is very wide -- in fact, it
simply blends into a wide desert to the south. To the north, a green dock
extends into the lake">
<COND (<IN? ,YACHT ,HERE>
<TELL ,YACHT-MOORED>)>
<TELL ". The shore curves around toward the west.">)
(<AND <EQUAL? .RARG ,M-END>
<IN? ,PROTAGONIST ,CAMEL>
<NOT <FSET? ,CAMEL ,TOUCHBIT>>
,CAMEL-THIRSTY>
<FSET ,CAMEL ,TOUCHBIT>
<RETURN-FROM-MAP>
<TELL
" The camel takes one look at the scummy water and wheezes mournfully through
parched lips." CR>)>>
<OBJECT SOUTH-DOCK
(LOC SOUTH-SHORE)
(DESC "green dock")
(SYNONYM DOCK)
(ADJECTIVE GREEN SOUTH)
(CAPACITY 200)
(FLAGS NDESCBIT VEHBIT DROPBIT OPENBIT SEARCHBIT CONTBIT SURFACEBIT)
(ACTION DOCK-F)>
<ROUTINE DOCK-F ("OPTIONAL" (VARG <>))
<COND (<AND <VERB? ENTER>
<IN? ,BEDBUG ,HERE>
<NOT ,TIME-STOPPED>>
<DO-WALK ,P?NORTH>)>>
<OBJECT YACHT
(LOC WEST-SHORE)
(DESC "royal yacht")
(LDESC
"The royal yacht sits by the dock, bobbing gently in the swell of the lake.")
(SYNONYM YACHT BOAT)
(ADJECTIVE ROYAL)
(CAPACITY 200)
(FLAGS VEHBIT DROPBIT OPENBIT SEARCHBIT CONTBIT SURFACEBIT)
(ACTION YACHT-F)>
<ROUTINE YACHT-F ("OPTIONAL" (VARG <>))
<COND (.VARG
<COND (<NOT <EQUAL? .VARG ,M-ENTER>>
<RFALSE>)
(<FSET? ,PRSO ,TOUCHBIT>
<SETG COMPASS-CHANGED T>
<RFALSE>)
(T
<SETG COMPASS-CHANGED T>
<TELL
" The controls seem worthy of closer
examination. A gangway leads belowdecks." CR>)>)
(<AND <VERB? ENTER>
<IN? ,PROTAGONIST ,HERE>>
<TELL "You can only board the yacht from the dock." CR>)
(<VERB? EXIT>
<COND (<EQUAL? ,HERE ,LAKE-FLATHEAD>
<PERFORM ,V?ENTER ,LAKE-FLATHEAD>
<RTRUE>)>
<MOVE ,PROTAGONIST
<COND (<EQUAL? ,HERE ,WEST-SHORE> ,WEST-DOCK)
(<EQUAL? ,HERE ,NORTH-SHORE> ,NORTH-DOCK)
(<EQUAL? ,HERE ,EAST-SHORE> ,EAST-DOCK)
(T ,SOUTH-DOCK)>>
<SETG OLD-HERE <>>
<SETG COMPASS-CHANGED T>
<TELL "You step off the boat, onto the dock." CR>
<COND (<EQUAL? ,VERBOSITY 1>
<CRLF> <SAY-HERE> <CRLF>)
(<EQUAL? ,VERBOSITY 2>
<CRLF> <V-LOOK>)>
<RTRUE>)
(<VERB? SINK>
<SETG AWAITING-REPLY 1>
<QUEUE I-REPLY 2>
<TELL "You have a torpedo, maybe?" CR>)
(<AND <VERB? SET>
<EQUAL? ,P-PRSA-WORD ,W?STEER>>
<TELL "There's no wheel." CR>)
(<AND <VERB? THROW-FROM>
<PRSI? ,YACHT>>
<PERFORM ,V?PUT ,PRSO ,WATER>
<RTRUE>)>>
<OBJECT YACHT-CONTROLS
(LOC YACHT)
(DESC "controls")
(SYNONYM CONTROL CONTROLS ROSE COMPASS)
(ADJECTIVE COMPASS)
(FLAGS NDESCBIT NARTICLEBIT PLURALBIT)
(ACTION YACHT-CONTROLS-F)>
<ROUTINE YACHT-CONTROLS-F ()
<COND (<VERB? EXAMINE>
<TELL
"The controls are quite simple, consisting of a small brass plaque and an
ornate compass rose. There are buttons on the four cardinal points of the
rose: a red button at the north point, blue at the east, green south, and
yellow west. A fifth button, white, is at the center of the rose." CR>)>>
<OBJECT YACHT-PLAQUE
(LOC YACHT)
(DESC "brass plaque")
(SYNONYM PLAQUE)
(ADJECTIVE SMALL BRASS)
(FLAGS READBIT NDESCBIT)
(TEXT "\"Made by the Frobozz Magic Royal Yacht Company.\"")>
<OBJECT RED-BUTTON
(LOC YACHT)
(DESC "red button")
(SYNONYM BUTTON)
(ADJECTIVE RED)
(FLAGS NDESCBIT)
(ACTION YACHT-BUTTON-F)>
<OBJECT BLUE-BUTTON
(LOC YACHT)
(DESC "blue button")
(SYNONYM BUTTON)
(ADJECTIVE BLUE)
(FLAGS NDESCBIT)
(ACTION YACHT-BUTTON-F)>
<OBJECT GREEN-BUTTON
(LOC YACHT)
(DESC "green button")
(SYNONYM BUTTON)
(ADJECTIVE GREEN)
(FLAGS NDESCBIT)
(ACTION YACHT-BUTTON-F)>
<OBJECT YELLOW-BUTTON
(LOC YACHT)
(DESC "yellow button")
(SYNONYM BUTTON)
(ADJECTIVE YELLOW)
(FLAGS NDESCBIT)
(ACTION YACHT-BUTTON-F)>
<OBJECT WHITE-BUTTON
(LOC YACHT)
(DESC "white button")
(SYNONYM BUTTON)
(ADJECTIVE WHITE FIFTH CENTER MIDDLE)
(FLAGS NDESCBIT)
(ACTION YACHT-BUTTON-F)>
<ROUTINE YACHT-BUTTON-F ()
<COND (<VERB? PUSH>
<COND (<OR <FSET? ,OUTER-GATE ,OPENBIT>
,TIME-STOPPED>
<TELL ,NOTHING-HAPPENS>)
(<NOT <FSET? ,SEAMANS-CAP ,WORNBIT>>
<TELL
"You meet an invisible resistance. A peal of laughter from behind turns out
to be the jester. \"The button may seem like a demon, telling landlubber from
seaman; but the truth's not so queer -- you need nautical gear!\"">
<J-EXITS>)
(<PRSO? ,WHITE-BUTTON>
<COND (<EQUAL? ,HERE ,LAKE-FLATHEAD>
<DEQUEUE I-YACHT>
<TELL ,NOTHING-HAPPENS>)
(T
<SETG YACHT-DESTINATION ,LAKE-FLATHEAD>
<I-YACHT T>)>)
(<NOT <IN? ,DB ,HOLD>>
<TELL
"A message flashes: \"Warning -- diving bell lowered!\"" CR>)
(<PRSO? ,RED-BUTTON>
<COND (<EQUAL? ,HERE ,NORTH-SHORE>
<TELL ,NOTHING-HAPPENS>)
(T
<SETG YACHT-DESTINATION ,NORTH-SHORE>
<I-YACHT T>)>)
(<PRSO? ,GREEN-BUTTON>
<COND (<EQUAL? ,HERE ,SOUTH-SHORE>
<TELL ,NOTHING-HAPPENS>)
(T
<SETG YACHT-DESTINATION ,SOUTH-SHORE>
<I-YACHT T>)>)
(<PRSO? ,BLUE-BUTTON>
<COND (<EQUAL? ,HERE ,EAST-SHORE>
<TELL ,NOTHING-HAPPENS>)
(T
<SETG YACHT-DESTINATION ,EAST-SHORE>
<I-YACHT T>)>)
(T
<COND (<EQUAL? ,HERE ,WEST-SHORE>
<TELL ,NOTHING-HAPPENS>)
(T
<SETG YACHT-DESTINATION ,WEST-SHORE>
<I-YACHT T>)>)>
<RTRUE>)>>
<GLOBAL YACHT-DESTINATION <>>
<ROUTINE I-YACHT ("OPTIONAL" (CALLED-BY-BUTTON-F <>))
<COND (.CALLED-BY-BUTTON-F
<QUEUE I-YACHT 2>
<COND (<AND <EQUAL? ,HERE ,LAKE-FLATHEAD>
<NOT <EQUAL? ,YACHT-DESTINATION ,LAKE-FLATHEAD>>>
<TELL
"The boat heads for the " D ,YACHT-DESTINATION ,PERIOD-CR>)
(T
<TELL
"The yacht moves away from the dock, toward the middle of the lake." CR CR>)>)>
<COND (<IN? ,YACHT ,LAKE-FLATHEAD>
<MOVE ,YACHT ,YACHT-DESTINATION>
<RETURN-FROM-MAP>
<COND (<IN? ,PROTAGONIST ,YACHT> ;"not in Hold"
<TELL
" The yacht reaches the " D ,YACHT-DESTINATION " and docks magically." CR CR>
<GOTO ,YACHT>)>)
(T
<MOVE ,YACHT ,LAKE-FLATHEAD>
<COND (<IN? ,PROTAGONIST ,YACHT> ;"not in Hold"
<RETURN-FROM-MAP>
<GOTO ,YACHT>
<TELL " The boat reaches the middle of the lake">
<COND (<EQUAL? ,YACHT-DESTINATION ,LAKE-FLATHEAD>
<TELL ", slows, and stops">)
(T
<TELL
" and heads straight for the dock on the " D ,YACHT-DESTINATION>)>
<TELL ,PERIOD-CR>)>)>
<COND (<IN? ,YACHT ,YACHT-DESTINATION>
<DEQUEUE I-YACHT>)>
<RTRUE>>
<ROOM HOLD
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Hold")
(LDESC
"You are in a cabin under the deck of the royal yacht. A steep gangway leads
upward.")
(UP PER YACHT-ENTER-F)
(IN PER DB-ENTER-F)
(FLAGS RLANDBIT UNDERGROUNDBIT)
(GLOBAL STAIRS)
(SYNONYM HOLD)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-5 MAP-GEN-X-1>)
(ICON HOLD-ICON)>
<ROUTINE YACHT-ENTER-F ("OPTIONAL" (RARG <>)) ;"called by NEXT-ROOM?"
<COND (.RARG
<RFALSE>)>
<GOTO ,YACHT>
<RFALSE>>
<ROUTINE DB-ENTER-F ("OPTIONAL" (RARG <>)) ;"called by NEXT-ROOM?"
<COND (.RARG
<RFALSE>)
(<FSET? ,DB ,OPENBIT>
<PERFORM ,V?ENTER ,DB>)
(T
<RETURN-FROM-MAP>
<THIS-IS-IT ,DB>
<DO-FIRST "open the bathysphere">)>
<RFALSE>>
<OBJECT DB
(LOC HOLD)
(DESC "bathysphere")
(SYNONYM SPHERE BATHYSPHERE DOOR HATCH BELL)
(ADJECTIVE DIVING)
(CAPACITY 200)
(FLAGS VEHBIT INBIT DROPBIT CONTBIT SEARCHBIT TRANSBIT)
(ACTION DB-F)>
<GLOBAL DB-CONTROLS-DESCRIBED <>>
<ROUTINE DB-F ("OPTIONAL" (VARG <>))
<COND (<AND .VARG
<NOT <EQUAL? .VARG ,M-ENTER>>>
<RFALSE>)
(.VARG
<COND (,DB-CONTROLS-DESCRIBED
<RFALSE>)
(T
<SETG DB-CONTROLS-DESCRIBED T>
<TELL " ">
<PERFORM ,V?EXAMINE ,DB>
<RTRUE>)>)
(<VERB? EXAMINE>
<COND (<IN? ,PROTAGONIST ,DB>
<TELL "This is a cramped diving bell. The door is ">
<OPEN-CLOSED ,DB>
<TELL
". A brass plaque is mounted next to a small porthole. You may want to
examine the controls." CR>)
(T
<TELL "The diving bell is ">
<OPEN-CLOSED ,DB>
<TELL
". Mounted on the outside of it is a claw-like waldo." CR>)>)
(<AND <VERB? ENTER>
<NOT <IN? ,PROTAGONIST ,DB>>
<NOT <FSET? ,DB ,OPENBIT>>>
<DO-WALK ,P?IN>)
(<AND <VERB? EXIT>
<IN? ,PROTAGONIST ,DB>>
<COND (,HAND-IN-WALDO
<DO-FIRST "remove your hand from the waldo">)
(<NOT <FSET? ,DB ,OPENBIT>>
<THIS-IS-IT ,DB>
<DO-FIRST "open the bathysphere">)
(<IN? ,RUBY ,WALDO>
<FCLEAR ,RUBY ,TRYTAKEBIT>
<RFALSE>)>)
(<VERB? RAISE LOWER>
<COND (<IN? ,PROTAGONIST ,DB>
<TELL ,YOULL-HAVE-TO "use the controls." CR>)
(T
<TELL "You can't do that from out here." CR>)>)
(<AND <VERB? OPEN>
<NOT <EQUAL? ,HERE ,HOLD>>>
<JIGS-UP "Having thus flooded the bathysphere, you drown.">)>>
<OBJECT DB-CONTROLS
(LOC DB)
(DESC "controls")
(SYNONYM CONTROL CONTROLS)
(FLAGS NDESCBIT NARTICLEBIT PLURALBIT)
(GENERIC G-DB-HOLE-F)
(ACTION DB-CONTROLS-F)>
<ROUTINE DB-CONTROLS-F ()
<COND (<VERB? EXAMINE>
<TELL
"The controls seem simple enough: an up-down lever, an exterior light,
and a hand-hole for controlling the exterior waldo." CR>)>>
<OBJECT DB-PLAQUE
(LOC DB)
(DESC "brass plaque")
(SYNONYM PLAQUE)
(ADJECTIVE SMALL BRASS)
(FLAGS READBIT NDESCBIT)
(TEXT
"\"A product of the Frobozz Magic Bathysphere Company, designed by
Jacques Yves Flathead.\"")>
<ROUTINE G-DB-HOLE-F (TBL F)
<COND (<EQUAL? <FIND-NOUN .F> ,W?CONTROL>
;"confusion is between hand-hole and controls"
,DB-CONTROLS)
(T ;"confusion is between hand-hole and porthole"
,HAND-HOLE)>>
<OBJECT PORTHOLE
(LOC DB)
(DESC "porthole")
(SYNONYM PORTHOLE PORT HOLE)
(ADJECTIVE PORT)
(FLAGS NDESCBIT)
(GENERIC G-DB-HOLE-F)
(ACTION PORTHOLE-F)>
<ROUTINE PORTHOLE-F ()
<COND (<VERB? LOOK-INSIDE>
<V-LOOK>)>>
<OBJECT RUBY
(LOC LAKE-BOTTOM)
(DESC "moby ruby")
(PLURAL "rubies")
(FDESC "A ruby of incredible size and beauty is buried in the sand.")
(SYNONYM RUBY JEWEL)
(ADJECTIVE RED MOBY LARGE BEAUTIFUL)
(FLAGS TRYTAKEBIT TAKEBIT READBIT)
(VALUE 25)
(SIZE 3)
(TEXT "This ruby must surely be the largest jewel in the land.")>
<OBJECT EXTERIOR-LIGHT
(LOC DB)
(DESC "exterior light")
(SYNONYM LIGHT LIGHTS)
(ADJECTIVE EXTERIOR)
(FLAGS LIGHTBIT NDESCBIT VOWELBIT)>
<OBJECT WALDO
(LOC HOLD)
(DESC "waldo")
(SYNONYM WALDO)
(ADJECTIVE EXTERIOR)
(FLAGS NDESCBIT CONTBIT SEARCHBIT OPENBIT)
(ACTION WALDO-F)>
<ROUTINE WALDO-F ()
<COND (<AND <NOT <FSET? ,EXTERIOR-LIGHT ,ONBIT>>
<NOT <EQUAL? ,HERE ,HOLD>>
<HANDLE ,WALDO>>
<CANT-SEE ,WALDO>)
(<AND <VERB? REACH-IN>
<IN? ,PROTAGONIST ,DB>>
<PERFORM ,V?REACH-IN ,HAND-HOLE>
<RTRUE>)
(<VERB? DROP> ;"IDROP lets it pass if your hand is in the hole"
<TELL
"Although you can manipulate the waldo, you aren't holding it. [If you want
to remove your hand, try REMOVE HAND.]" CR>)
(<VERB? PUT>
<MOVE ,PRSO ,HERE>
<TELL
,YOU-CANT "budge the waldo's claw, so" T ,PRSO " falls right out." CR>)
(<VERB? OPEN CLOSE>
<COND (,HAND-IN-WALDO
<COND (<FIRST? ,WALDO>
<COND (<VERB? OPEN>
<PERFORM ,V?DROP <FIRST? ,WALDO>>
<RTRUE>)
(T
<TELL
"The waldo IS closed! It's holding" AR <FIRST? ,WALDO>>)>)
(T
<TELL
"The claws of the waldo open and close." CR>)>)
(T
<TELL "The claws of the waldo won't budge." CR>)>)
(<AND <VERB? TAKE-WITH>
<PRSI? ,WALDO>>
<COND (<PRSO? ,DB ,WALDO>
<IMPOSSIBLES>)
(,HAND-IN-WALDO
<SETG PRSI <>>
<PERFORM ,V?TAKE ,PRSO>
<RTRUE>)
(T
<TELL "Your hand isn't in the hand-hole!" CR>)>)>>
<GLOBAL HAND-IN-WALDO <>>
<OBJECT HAND-HOLE
(LOC DB)
(DESC "hand-hole")
(SYNONYM HOLE HAND-HOLE CONTROL)
(ADJECTIVE HAND WALDO)
(FLAGS NDESCBIT)
(GENERIC G-DB-HOLE-F)
(ACTION HAND-HOLE-F)>
<ROUTINE HAND-HOLE-F ()
<COND (<NOT <IN? ,PROTAGONIST ,DB>>
<CANT-REACH ,HAND-HOLE>)
(<VERB? REACH-IN>
<TELL "Your hand is ">
<COND (,HAND-IN-WALDO
<TELL "already in the hand-hole!" CR>)
(T
<SETG HAND-IN-WALDO T>
<TELL "now in the hand-hole">
<COND (<NOT <FSET? ,WALDO ,TOUCHBIT>>
<FSET ,WALDO ,TOUCHBIT>
<TELL
". The waldo feels like an extension of your own hand.
You flex your fingers a few times">
<COND (<OR <FSET? ,EXTERIOR-LIGHT ,ONBIT>
<EQUAL? ,HERE ,HOLD>>
<TELL
", and through the viewport, you see the waldo flex correspondingly">)>)>
<TELL ,PERIOD-CR>)>)
(<VERB? LOOK-INSIDE>
<COND (,HAND-IN-WALDO
<TELL "Your hand is in the hole." CR>)
(T
<TELL ,ONLY-BLACKNESS>)>)>>
<ROUTINE WALDO-TAKE ()
<COND (<PRSI? ,WALDO>
<COND (<EQUAL? ,P-PRSA-WORD ,W?REMOVE>
<PERFORM ,V?DROP ,PRSO>
<RTRUE>)
(T
<CANT-REACH ,PRSO>)>)
(<FIRST? ,WALDO>
<TELL
"There's already" A <FIRST? ,WALDO> " in the waldo." CR>)
(<AND <EQUAL? ,HERE ,LAKE-BOTTOM>
<NOT <IN? ,SQUID-REPELLENT ,LAKE-BOTTOM>>>
<TELL
"Before the waldo can grab" T ,PRSO ", a baby squid swims into view and
snatches" T ,PRSO ". The squid playfully squirts black ink toward the
porthole, and by the time the view clears, the squid is gone">
<COND (<FSET? ,PRSO ,TAKEBIT>
<TELL
" and" T ,PRSO " is lying right where it was before">)>
<TELL ,PERIOD-CR>)
(<FSET? ,PRSO ,TAKEBIT>
<MOVE ,PRSO ,WALDO>
<FSET ,PRSO ,TOUCHBIT>
<TELL "You pick up" T ,PRSO " in the waldo." CR>)
(<PRSO? ,SPENSEWEED>
<TELL ,DEEPLY-ROOTED>)
(<PRSO? ,JESTER ,J-HAT ,J-POCKET ,J-SHOE>
<TELL
"Your attempt ends up giving the jester a pinch with the waldo. \"Please!\" he
exclaims. \"I'm not that sort of jester!\"" CR>)
(T
<YUKS>)>>
<OBJECT LEVER
(LOC DB)
(DESC "up-down lever")
(SYNONYM LEVER)
(ADJECTIVE UP-DOWN)
(FLAGS NDESCBIT VOWELBIT)
(ACTION LEVER-F)>
<GLOBAL DB-DIRECTION 0> ;"1 = ascending, -1 = descending"
<GLOBAL DB-DEPTH 0>
<GLOBAL PIECE-DROWNED 0>
<ROUTINE LEVER-F ("AUX" X)
<COND (<VERB? EXAMINE>
<TELL "The lever is in the ">
<COND (<EQUAL? ,DB-DIRECTION 1>
<TELL "up">)
(<EQUAL? ,DB-DIRECTION -1>
<TELL "down">)
(T
<TELL "neutral">)>
<TELL " position">
<COND (<EQUAL? ,DB-DIRECTION 0>
<TELL ", from which it can be raised or lowered." CR>)
(T
<TELL ,PERIOD-CR>)>)
(<VERB? RAISE>
<COND (<EQUAL? ,DB-DIRECTION 1>
<TELL "The lever is already raised." CR>)
(<EQUAL? ,HERE ,HOLD>
<TELL ,NOTHING-HAPPENS>)
(T
<SETG DB-DIRECTION 1>
<QUEUE I-DB 2>
<TELL "The bathysphere ascends.">
<COND (<EQUAL? ,HERE ,LAKE-BOTTOM>
<SETG DB-DEPTH 4>
<MOVE ,DB ,UNDERWATER>
<MOVE ,WALDO ,UNDERWATER>
<GLANCE>)
(T
<CRLF>)>)>)
(<VERB? LOWER>
<COND (<EQUAL? ,DB-DIRECTION -1>
<TELL "The lever is already lowered." CR>)
(<OR <EQUAL? ,DB-DEPTH 4>
<NOT <IN? ,YACHT ,LAKE-FLATHEAD>>>
<TELL ,NOTHING-HAPPENS>)
(<AND <SET X <FIRST? ,WALDO>>
<EQUAL? .X ,FOX ,FLAMINGO ,ROOSTER ,SNAKE>>
<TELL "You'd drown the poor ">
<PRINTD .X>
<TELL "!" CR>)
(<FSET? ,DB ,OPENBIT>
<JIGS-UP
"The bathysphere descends, filling with water through its open door.
As you are not a fish, this is fatal.">)
(T
<SETG DB-DIRECTION -1>
<QUEUE I-DB 2>
<TELL
"The bathysphere descends into the waters of the lake">
<COND (<SET X <FIND-IN ,WALDO ,FLAMEBIT>>
<FCLEAR .X ,ONBIT>
<FCLEAR .X ,FLAMEBIT>
<COND (<VISIBLE? .X>
<TELL ", extinguishing" T .X>)>)>
<TELL ".">
<COND (<EQUAL? ,HERE ,HOLD>
<SETG DB-DEPTH 0>
<MOVE ,DB ,UNDERWATER>
<MOVE ,WALDO ,UNDERWATER>
<GLANCE>)
(T
<CRLF>)>)>)>>
<ROUTINE GLANCE ()
<TELL " You glance out the porthole" ,ELLIPSIS>
<GOTO ,DB>>
<ROUTINE I-DB ()
<QUEUE I-DB -1>
<SETG DB-DEPTH <- ,DB-DEPTH ,DB-DIRECTION>>
<COND (<IN? ,PROTAGONIST ,DB>
<RETURN-FROM-MAP>
<TELL " The bathysphere ">)>
<COND (<L? ,DB-DEPTH 1>
<DEQUEUE I-DB>
<SETG DB-DIRECTION 0>
<MOVE ,DB ,HOLD>
<MOVE ,WALDO ,HOLD>
<COND (<IN? ,PROTAGONIST ,DB>
<TELL "rises into the yacht's hold and stops.">
<GLANCE>)
(<EQUAL? ,HERE ,HOLD>
<RETURN-FROM-MAP>
<TELL " A diving bell rises into the Hold." CR>)
(T
<RFALSE>)>)
(<G? ,DB-DEPTH 3>
<DEQUEUE I-DB>
<SETG DB-DIRECTION 0>
<MOVE ,DB ,LAKE-BOTTOM>
<MOVE ,WALDO ,LAKE-BOTTOM>
<COND (<IN? ,PROTAGONIST ,DB>
<TELL "bumps against the bottom of the lake.">
<GLANCE>)
(T
<RFALSE>)>)
(<NOT <IN? ,PROTAGONIST ,DB>>
<RFALSE>)
(T
<TELL "continues to ">
<COND (<EQUAL? ,DB-DIRECTION -1>
<TELL "de">)
(<EQUAL? ,DB-DIRECTION 1>
<TELL "a">)>
<TELL "scend." CR>
<COND (<G? ,PIECE-DROWNED 0>
<COND (<PROB ,PIECE-DROWNED>
<SETG PIECE-DROWNED 1>
<TELL
" The drowned carcass of a chess piece drifts momentarily through the
beam of the exterior light." CR>)
(T
<SETG PIECE-DROWNED <+ ,PIECE-DROWNED 10>>)>)>)>
<RTRUE>>
<ROOM LAKE-FLATHEAD
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Lake Flathead")
(LDESC
"You are in the center of a once-handsome lake, lit from the roof high
overhead. On the distant shores, you can spot docks in all four
cardinal directions.")
(FLAGS RLANDBIT ONBIT UNDERGROUNDBIT NARTICLEBIT WATERBIT)
(SYNONYM LAKE FLATHEAD)
(ADJECTIVE FLATHEAD LAKE PLACID CLEAR CRYSTAL)
(VALUE 18)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-5 MAP-GEN-X-4>)
(GLOBAL STAIRS)
(ICON LAKE-FLATHEAD-ICON)
(RESEARCH
"\"This large and handsome lake lies entirely within the royal castle at
Flatheadia.\"")
(ACTION LAKE-FLATHEAD-F)>
<ROUTINE LAKE-FLATHEAD-F ("OPTIONAL" (RARG <>))
<COND (.RARG
<RFALSE>)
(<VERB? DRINK DRINK-FROM ENTER LOOK-UNDER REACH-IN>
<PERFORM-PRSA ,WATER ,PRSI>)
(<AND <VERB? FILL PUT>
<PRSI? ,GLOBAL-HERE>>
<PERFORM-PRSA ,PRSO ,WATER>)
(<VERB? EXAMINE LOOK-INSIDE>
<TELL "The water is scummy and murky." CR>)>>
<ROOM UNDERWATER
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Underwater")
(LDESC
"Here, between the surface and floor of Lake Flathead, the water is somewhat
clearer.")
;(UP SORRY "Use the bathysphere controls.")
;(DOWN SORRY "Use the bathysphere controls.")
(FLAGS RLANDBIT UNDERGROUNDBIT)
(GLOBAL LAKE-FLATHEAD)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-6 MAP-GEN-X-1>)
(ICON UNDERWATER-ICON)>
<ROOM LAKE-BOTTOM
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Lake Bottom")
(LDESC
"You have reached the sandy bottom at the deepest point of Lake Flathead.
Beautiful freshwater fish swim among slowly waving spenseweeds.")
;(UP SORRY "Use the bathysphere controls.")
(FLAGS RLANDBIT UNDERGROUNDBIT)
(GLOBAL LAKE-FLATHEAD)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-7 MAP-GEN-X-1>)
(ICON LAKE-BOTTOM-ICON)
(ACTION LAKE-BOTTOM-F)>
<ROUTINE LAKE-BOTTOM-F ("OPT" (RARG <>))
<COND (<EQUAL? .RARG ,M-ENTER>
<MOVE ,SPENSEWEED ,HERE>
<FSET ,SPENSEWEED ,NDESCBIT>)
(<AND <EQUAL? .RARG ,M-END>
<IN? ,WORM ,WALDO>>
<REMOVE ,WORM>
<RETURN-FROM-MAP>
<TELL
" A fish snatches the worm from the waldo and swims away with it." CR>)>>
<OBJECT LAKE-BOTTOM-FISH
(LOC LAKE-BOTTOM)
(DESC "freshwater fish")
(SYNONYM FISH)
(ADJECTIVE BEAUTIFUL FRESHWATER)
(FLAGS NDESCBIT)
(ACTION LAKE-BOTTOM-FISH-F)>
<ROUTINE LAKE-BOTTOM-FISH-F ()
<COND (<TOUCHING? ,LAKE-BOTTOM-FISH>
<CANT-REACH ,LAKE-BOTTOM-FISH>)>>
<ROOM BASE-OF-MOUNTAIN
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Base of Mountain")
(LDESC
"In a rare moment of restraint, Dimwit scaled back his plans for putting
an entire mountain range in the castle, settling for merely a single mountain.
A difficult trail leads east up the mountain; easier paths head north, west,
and south.")
(NORTH TO STABLE)
(SOUTH TO G-U-WOODS)
(WEST TO EAST-SHORE)
(EAST PER G-U-MOUNTAIN-ENTER-F)
(UP PER G-U-MOUNTAIN-ENTER-F)
(FLAGS RLANDBIT ONBIT UNDERGROUNDBIT)
(GLOBAL G-U-MOUNTAIN)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-5 MAP-GEN-X-6>)
(ICON BASE-OF-MT-ICON)>
<ROUTINE G-U-MOUNTAIN-ENTER-F ("OPTIONAL" (RARG <>)) ;"called by NEXT-ROOM?"
<COND (<IN? ,PROTAGONIST ,CAMEL>
<COND (<NOT .RARG>
<RETURN-FROM-MAP>
<TELL
"Like most camels, this one isn't very good at mountain climbing." CR>)>
<RFALSE>)
(T
,G-U-MOUNTAIN)>>
<ROOM STABLE
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Stable")
(LDESC
"The stalls here once held thousands of royal mounts. The only exit is south.")
(SOUTH TO BASE-OF-MOUNTAIN)
(OUT TO BASE-OF-MOUNTAIN)
(FLAGS RLANDBIT UNDERGROUNDBIT)
(SYNONYM STABLE)
(MAP-LOC <PTABLE LAKE-MAP-NUM MAP-GEN-Y-4 MAP-GEN-X-6>)
(ICON STABLE-ICON)
(THINGS <> STALL STALL-PS)
(ACTION STABLE-F)>
<ROUTINE STABLE-F ("OPT" (RARG <>))
<COND (<AND <EQUAL? .RARG ,M-ENTER>
<NOT <FSET? ,STABLE ,TOUCHBIT>>>
<QUEUE I-ROOSTER -1>)>>
<ROUTINE STALL-PS ()
<COND (<VERB? EXAMINE ENTER>
<TELL "The stalls are all empty." CR>)>>
<OBJECT SADDLE
(LOC STABLE)
(DESC "saddle")
(FDESC
"A well-worn unicorn saddle, of military style, is hanging at the far
end of the stable.")
(SYNONYM SADDLE)
(ADJECTIVE WELL-WORN UNICORN MILITARY)
(FLAGS TAKEBIT MAGICBIT READBIT)
(SIZE 15)
(VALUE 12)
(TEXT "You can barely make out the name \"Wilma.\"")
(ACTION SADDLE-F)>
<BEGIN-SEGMENT 0>
<ROUTINE SADDLE-F ()
<COND (<AND <VERB? PUT-ON>
<PRSO? ,SADDLE>>
<TELL
"You'd be kicked out of riding school -- imagine, trying to saddle"
A ,PRSI "!" CR>)>>
<OBJECT ROOSTER
(LOC STABLE)
(DESC "rooster")
(FDESC
"There's not a horse in sight. However, there is a rooster here, strutting
back and forth between the stalls.")
(SYNONYM ROOSTER BIRD VANE)
(ADJECTIVE WEATHER)
(FLAGS TAKEBIT TRYTAKEBIT ANIMATEDBIT)
(INANIMATE-DESC "weather vane")
(WAND-TEXT
"The rooster stops moving and takes on the complexion of wrought iron.")
(ANIMATE-ROUTINE I-W-ROOSTER)
(SIZE 10)
(ACTION ROOSTER-F)>
<ROUTINE ROOSTER-F ()
<COND (<AND <VERB? RESEARCH>
<NOUN-USED? ,ROOSTER ,W?ROOSTER>>
<TELL "\"A common barnyard animal.\"" CR>)
(<NOT <FSET? ,ROOSTER ,ANIMATEDBIT>>
<RFALSE>)
(<VERB? EAT>
<COND (<EQUAL? ,TURNED-INTO ,FOX>
<GOOD-MEAL ,ROOSTER>)
(T
<TELL
"Unfortunately, you have no training in the butchering and culinary
techniques involved in turning live poultry into edible meals." CR>)>)
(<VERB? EXAMINE>
<TELL
"It is a handsome, mature rooster, with a full red comb." CR>)
(<VERB? TOUCH>
<TELL "The bird pecks at your hand." CR>)
(<AND <VERB? TAKE>
<FSET? ,ROOSTER ,ANIMATEDBIT>>
<COND (<EQUAL? <ITAKE T> ,M-FATAL>
<RTRUE>)
(T
<MOVE ,ROOSTER ,PROTAGONIST>
<TELL
"The bird flaps angrily, but you manage to pick it up." CR>)>)
(<AND <VERB? GIVE>
<PRSO? ,WORM>>
<REMOVE ,WORM>
<TELL
"The bird sucks down the worm and crows happily." CR>)
(<AND <VERB? FEED>
<ULTIMATELY-IN? ,WORM>>
<WOULDNT-MIND ,ROOSTER ,WORM>)>>
<ROUTINE I-W-ROOSTER ("AUX" (L <LOC ,ROOSTER>))
<FSET ,ROOSTER ,ANIMATEDBIT>
<COND (<IN? ,ROOSTER ,LAKE-BOTTOM>
<REMOVE ,ROOSTER>)
(<EQUAL? <META-LOC ,ROOSTER> ,HERE>
<RETURN-FROM-MAP>
<TELL
" The air is split by a loud \"Cock-a-doodle-doo!\" as the weather
vane once again becomes a rooster">
<COND (<AND <NOT <EQUAL? .L ,PROTAGONIST ,HERE>>
<NOT <FSET? .L ,DROPBIT>>>
<MOVE ,ROOSTER ,HERE>
<FSET .L ,OPENBIT>
<TELL " and pops out of" T .L>)>
<TELL ,PERIOD-CR>)
(T
<MOVE ,ROOSTER <META-LOC ,ROOSTER>>
<RFALSE>)>>
<GLOBAL ROOSTER-PROB 100>
<GLOBAL ROOSTER-BURP <>>
<ROUTINE I-ROOSTER ("AUX" L)
<COND (<NOT <FSET? ,ROOSTER ,ANIMATEDBIT>>
<RFALSE>)
(<NOT <VISIBLE? ,ROOSTER>>
<COND (<AND <SET L <LOC ,ROOSTER>>
<EQUAL? .L <LOC ,WORM>>
<FSET? ,WORM ,ANIMATEDBIT>
<NOT <FSET? .L ,ACTORBIT>>>
<SETG ROOSTER-BURP T>
<REMOVE ,WORM>)>
<RFALSE>)
(,ROOSTER-BURP
<SETG ROOSTER-BURP <>>
<RETURN-FROM-MAP>
<TELL " The rooster fails to hide a satisfied burp." CR>)
(<OR <NOT <VISIBLE? ,WORM>>
<NOT <FSET? ,WORM ,ANIMATEDBIT>>>
<RFALSE>)
(<PROB ,ROOSTER-PROB>