-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathcastle.zil
4823 lines (4407 loc) · 138 KB
/
castle.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
"CASTLE for
ZORK ZERO
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<BEGIN-SEGMENT CASTLE>
<ROOM GREAT-HALL
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Great Hall")
(LDESC
"This is the huge central chamber of Dimwit's castle. The ceiling was
lowered at some point in the past, which helped reduce the frequency of
storm clouds forming in the upper regions of the hall. Arched openings
lead off in the four cardinal directions. A wide stair leads up to the
balcony, and an equally wide but ominously dark stair leads downward.")
(NORTH TO ENTRANCE-HALL)
(SOUTH TO AUDIENCE-CHAMBER)
(EAST TO COURTYARD)
(WEST TO FORMAL-GARDEN)
(UP TO BALCONY)
(DOWN PER LOWER-HALL-ENTER-F)
(FLAGS RLANDBIT ONBIT)
(GLOBAL STAIRS BANNER)
(MAP-LOC <PTABLE MAIN-MAP-NUM MAP-GEN-Y-4 MAP-GEN-X-5>)>
<ROUTINE LOWER-HALL-ENTER-F ("OPTIONAL" (RARG <>)) ;"called by NEXT-ROOM?"
<COND (<OR <FSET? ,OUTER-GATE ,OPENBIT>
,TIME-STOPPED>
<COND (<NOT .RARG>
<RETURN-FROM-MAP>
<TELL
"Near the bottom of the flight, the steps are blocked by
newly-fallen rubble!" CR>)>
<RFALSE>)
(T
,LOWER-HALL)>>
<OBJECT CALENDAR
(DESC "calendar")
(LDESC "A calendar for 883 GUE is lying here.")
(SYNONYM CALENDAR)
(FLAGS READBIT TAKEBIT)
(SIZE 3)
(TEXT
"[This is the \"Lives of the Twelve Flatheads Calendar\" which you can find
in your Zork Zero package.]")>
<OBJECT CALENDAR-ITEMS ;"vocab. for items in calendar pics but not in game"
(LOC GENERIC-OBJECTS)
(DESC "it")
(SYNONYM POISON AX AXE COBRA SKULL KNIFE DAGGER TROPHY
STICK BALL HELMET EPAULET EPAULETTE MEDAL TEMPLATE PENCIL
TRIANGLE CRAYON COMPASS ELEPHANT VOLCANO BRUSH AVOCADO INKWELL
RAVEN STAMP CIGAR BURNER CELERY MATCH BOWTIE)
(ADJECTIVE HOCKEY RUBBER BUNSEN)>
<OBJECT LOCKET-MOOSE
(LOC GENERIC-OBJECTS)
(DESC "it")
(SYNONYM LOCKET MOOSE)>
<OBJECT PROCLAMATION
(DESC "proclamation")
(FDESC "A proclamation hangs on the wall.")
(OWNER WALL)
(SYNONYM PROCLAMATION DECREE)
(FLAGS READBIT TAKEBIT BURNBIT TRYTAKEBIT)
(SIZE 2)
(TEXT
"\"The one who can stop the Curse of Megaboz, and save the land from
destruction, shall be rewarded with half the wealth of the Empire.|
(signed) Wurb Flathead|
King of Quendor|
Protector of the Empire|
Ruler of all the Known Lands\"")
(ACTION PROCLAMATION-F)>
;<BEGIN-SEGMENT 0>
<ROUTINE PROCLAMATION-F ()
<COND (<AND <VERB? TAKE>
<FSET? ,PROCLAMATION ,TRYTAKEBIT>>
<COND (<EQUAL? <ITAKE T> ,M-FATAL>
<RTRUE>)
(T
<PUTP ,PROCLAMATION ,P?ACTION <>>
<PUTP ,PROCLAMATION ,P?OWNER <>>
<FCLEAR ,PROCLAMATION ,TRYTAKEBIT>
<TELL "You rip the decree from the wall." CR>)>)>>
;<END-SEGMENT>
;<BEGIN-SEGMENT CASTLE>
<ROOM ENTRANCE-HALL
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Entrance Hall")
(NORTH TO INNER-BAILEY IF PORTCULLIS IS OPEN ELSE
"The closed portcullis covers the doorway.")
(SOUTH TO GREAT-HALL)
(EAST TO BANQUET-HALL)
(WEST TO PARLOR)
(FLAGS RLANDBIT ONBIT)
(GLOBAL PORTCULLIS)
(RIDDLE
"Some say I fly, but I'm not a bird; I'm often wasted, or so I've heard.
Though I go on endlessly, there's never enough of me! What am I?\"")
(MAP-LOC <PTABLE MAIN-MAP-NUM MAP-GEN-Y-3 MAP-GEN-X-5>)
(ACTION ENTRANCE-HALL-F)>
<ROUTINE ENTRANCE-HALL-F ("OPT" (RARG <>))
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"This is where visitors enter the castle proper, through the wide
doorway to the north. ">
<COND (<NOT <FSET? ,PORTCULLIS ,OPENBIT>>
<TELL
"The doorway is currently blocked by a sturdy portcullis. ">)>
<TELL
"Oddly, there is a doorbell on the inside of the doorway. Other doorways
lead east, west, and south.">)
(<AND <EQUAL? .RARG ,M-END>
<IN? ,JESTER ,HERE>
<NOT <FSET? ,PORTCULLIS ,OPENBIT>>>
<SETUP-ORPHAN "answer">)>>
<OBJECT TIME-OBJECT
(LOC GLOBAL-OBJECTS)
(DESC "time")
(SYNONYM TIME)
(FLAGS NARTICLEBIT)>
<OBJECT DOORBELL
(LOC ENTRANCE-HALL)
(DESC "doorbell")
(SYNONYM DOORBELL BELL)
(ADJECTIVE DOOR)
(FLAGS NDESCBIT)
(GENERIC G-HAT-F) ;"jester's hat has synonym BELL"
(ACTION DOORBELL-F)>
<ROUTINE DOORBELL-F ()
<COND (<VERB? PUSH TOUCH>
<TELL "\"Ding, dong!\"" CR>
<COND (<NOT <IN? ,JESTER ,HERE>>
<SETG DO-J T>
<I-JESTER T>)>
<RTRUE>)>>
<OBJECT PORTCULLIS
(LOC LOCAL-GLOBALS)
(DESC "portcullis")
(SYNONYM PORTCULLIS)
(ADJECTIVE STURDY HEAVY IRON)
(FLAGS DOORBIT)
(ACTION PORTCULLIS-F)>
<ROUTINE PORTCULLIS-F ()
<COND (<VERB? EXAMINE>
<TELL
"The portcullis, which is a heavy iron latticework used to block this
entrance doorway, is ">
<OPEN-CLOSED ,PORTCULLIS>
<TELL ,PERIOD-CR>)
(<AND <VERB? OPEN>
<NOT <FSET? ,PORTCULLIS ,OPENBIT>>>
<TELL
"You try to lift the portcullis, but with no effect (aside from nearly
breaking your back)." CR>)
(<AND <VERB? CLOSE>
<FSET? ,PORTCULLIS ,OPENBIT>>
<TELL ,WONT-BUDGE>)>>
<END-SEGMENT>
<BEGIN-SEGMENT VILLAGE>
<OBJECT MOAT
(LOC LOCAL-GLOBALS)
(DESC "moat")
(SYNONYM MOAT)
(FLAGS WATERBIT)
(ACTION MOAT-F)>
<ROUTINE MOAT-F ()
<COND (<AND <TOUCHING? ,MOAT>
<EQUAL? ,HERE ,PARAPET ,UPPER-BARBICAN>>
<CANT-REACH ,MOAT>)>>
<ROOM INNER-BAILEY
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Inner Bailey")
(LDESC
"You are on a narrow grassy strip between the castle (which can be entered
to the south) and the moat. A young elm grows by the side of the moat. A
causeway leads out into the moat to the northwest.")
(SOUTH TO ENTRANCE-HALL IF PORTCULLIS IS OPEN)
(NW TO CAUSEWAY)
(FLAGS RLANDBIT OUTSIDEBIT ONBIT)
(SYNONYM BAILEY)
(ADJECTIVE INNER)
(GLOBAL PORTCULLIS MOAT CAUSEWAY)
(MAP-LOC <PTABLE VILLAGE-MAP-NUM MAP-GEN-Y-7 MAP-GEN-X-6>)
(ICON INNER-BAILEY-ICON)
(ACTION INNER-BAILEY-F)>
<ROUTINE INNER-BAILEY-F ("OPT" (RARG <>))
<COND (<AND ,DEMO-VERSION? <EQUAL? .RARG ,M-END>>
<END-DEMO>)>>
<BEGIN-SEGMENT 0>
<OBJECT WORM
(LOC INNER-BAILEY)
(DESC "worm")
(FDESC "A common earthworm is wriggling through the grass.")
(SYNONYM WORM EARTHWORM PIECE RUBBER)
(ADJECTIVE COMMON)
(FLAGS TAKEBIT ANIMATEDBIT)
(INANIMATE-DESC "piece of rubber")
(WAND-TEXT "Instantly, the worm stops wriggling.")
(ANIMATE-ROUTINE I-W-WORM)
(SIZE 1)
(ACTION WORM-F)>
<ROUTINE WORM-F ()
<COND (<VERB? EAT>
<COND (<EQUAL? ,TURNED-INTO ,ROOSTER>
<GOOD-MEAL ,WORM>)
(T
<TELL "Yukko!" CR>)>)
(<AND <VERB? RESEARCH>
<NOUN-USED? ,WORM ,W?WORM ,W?EARTHWORM>>
<TELL "\"A low form of ground-dwelling animal life.\"" CR>)>>
<ROUTINE I-W-WORM ("AUX" (L <LOC ,WORM>))
<FSET ,WORM ,ANIMATEDBIT>
<COND (<IN? ,WORM ,LAKE-BOTTOM>
<REMOVE ,WORM>)
(<EQUAL? <META-LOC ,WORM> ,HERE>
<RETURN-FROM-MAP>
<TELL " The worm ">
<COND (<AND <NOT <EQUAL? .L ,PROTAGONIST ,HERE>>
<NOT <FSET? .L ,DROPBIT>>>
<MOVE ,WORM ,HERE>
<FSET .L ,OPENBIT>
<TELL "wriggles out of" T .L>)
(T
<TELL "has resumed wriggling">)>
<TELL ,PERIOD-CR>)
(T
<MOVE ,WORM <META-LOC ,WORM>>
<RFALSE>)>>
<END-SEGMENT>
<BEGIN-SEGMENT VILLAGE>
<OBJECT SMALL-ELM
(LOC INNER-BAILEY)
(DESC "small elm tree")
(SYNONYM TREE ELM)
(ADJECTIVE YOUNG SMALL ELM)
(FLAGS NDESCBIT PLANTBIT)
(ACTION TREE-F)>
<ROUTINE TREE-F ("OPTIONAL" (ARG <>))
<COND (<EQUAL? .ARG ,M-WINNER>
<PLANT-STUNNED>)
(<VERB? GET-NEAR>
<TELL "You are now standing at the base of the tree." CR>)
(<AND <VERB? LISTEN>
,PLANT-TALKER>
<COND (<PRSO? ,MIGHTY-ELM>
<TELL
"The mighty elm rumbles in a voice that bespeaks great age and weariness. It
seems to be pining for its simple, happier, younger days. Most particularly,
it seems to be fondly recalling a playful squirrel named \"Rosebud.\"" CR>)
(<PRSO? ,SMALL-ELM>
<TELL
"The little elm's roots have, apparently, just reached down to a particularly
yummy patch of decayed mulch, and the young elm is humming rhapsodically about
the yumminess of the minerals therein." CR>)
(T
<TELL
"The two elms are exchanging off-color jokes, most of which seem to involve
various methods of pollen transfer." CR>)>)
(<VERB? CLIMB CLIMB-UP>
<COND (<PRSO? ,SMALL-ELM>
<TELL
"Your weight is too much for this little tree." CR>)
(T
<TELL ,POORLY-CONFIGURED>)>)
(<AND <VERB? LISTEN>
,PLANT-TALKER>
<TELL
"The tree's speech is very childlike and difficult to understand, but it
seems to be fantasizing about the day when it will be tall enough to see
over the castle walls." CR>)
(<VERB? MEASURE>
<TELL "You can">
<COND (<PRSO? ,MIGHTY-ELM>
<TELL "'t come close to getting">)
(T
<COND (<PRSO? ,SMALL-ELM>
<TELL " easily">)
(T
<TELL " just barely">)>
<TELL " get">)>
<TELL " your arms around the tree." CR>)>>
<ROOM CAUSEWAY
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Causeway")
(LDESC
"You are on a peninsula of dirt and gravel which extends into the moat from
the southeast. A tall barbican towers over the end of the causeway, to the
northwest.")
(SE TO INNER-BAILEY)
(NW TO BARBICAN)
(FLAGS RLANDBIT OUTSIDEBIT ONBIT)
(SYNONYM CAUSEWAY)
(GLOBAL MOAT BARBICAN)
(MAP-LOC <PTABLE VILLAGE-MAP-NUM MAP-GEN-Y-6 MAP-GEN-X-5>)
(ICON CAUSEWAY-ICON)>
<ROOM BARBICAN
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Barbican")
(NW TO DRAWBRIDGE IF DRAWBRIDGE IS OPEN)
(SE TO CAUSEWAY)
(UP TO UPPER-BARBICAN)
(FLAGS RLANDBIT ONBIT)
(SYNONYM BARBICAN TOWER GATE-TOWER)
(ADJECTIVE TALL LOWER)
(GLOBAL MOAT DRAWBRIDGE FIXED-LADDER UPPER-BARBICAN)
(MAP-LOC <PTABLE VILLAGE-MAP-NUM MAP-GEN-Y-5 MAP-GEN-X-4>)
(ICON BARBICAN-ICON)
(ACTION BARBICAN-F)>
<ROUTINE BARBICAN-F ("OPT" (RARG <>))
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"This dimly lit room is the bottom level of the gate-tower which guards the
castle's drawbridge. It lies at the tip of a peninsula into the moat; the rest
of the peninsula is to the southeast. A drawbridge to the northwest is ">
<OPEN-CLOSED ,DRAWBRIDGE>
<TELL ", and a ladder leads to an upper level.">)>>
<ROOM UPPER-BARBICAN
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Upper Barbican")
(LDESC
"This upper level is key to defending the outer perimeter of the castle, with
its commanding view of the causeway, moat and baileys. The floor is filled
with \"murder holes\" for dropping heavy cannonballs onto unwanted visitors
who penetrate as far as the barbican's lower level, just below. A large cast
iron wheel is mounted in the center of the room. The only exit is a ladder
leading down.")
(DOWN TO BARBICAN)
(FLAGS RLANDBIT ONBIT)
(SYNONYM BARBICAN TOWER)
(ADJECTIVE UPPER)
(GLOBAL FIXED-LADDER MOAT)
(MAP-LOC <PTABLE VILLAGE-MAP-NUM MAP-GEN-Y-4 MAP-GEN-X-4>)
(ICON UPPER-BARBICAN-ICON)>
<BEGIN-SEGMENT 0>
<OBJECT CANNONBALL
(LOC UPPER-BARBICAN)
(DESC "cannonball")
(SYNONYM CANNONBALL BALL)
(ADJECTIVE HEAVY)
(FLAGS TAKEBIT)
(SIZE 50)
(ACTION CANNONBALL-F)>
<ROUTINE CANNONBALL-F ()
<COND (<AND <VERB? PUT-ON>
<EQUAL? ,P-PRSA-WORD ,W?DROP>
<PRSO? ,CANNONBALL>>
<MOVE ,CANNONBALL ,HERE>
<COND (<FSET? ,PRSI ,PARTBIT>
<TELL "Ouch!!!" CR>)
(<G? <GETP ,PRSI ,P?SIZE> 10>
<TELL "This has no effect." CR>)
(T
<TELL "Miraculously," T ,PRSI " survives." CR>)>)>>
<END-SEGMENT>
<BEGIN-SEGMENT VILLAGE>
<OBJECT MURDER-HOLE
(LOC UPPER-BARBICAN)
(DESC "murder hole")
(SYNONYM HOLE)
(ADJECTIVE MURDER)
(FLAGS NDESCBIT)
(ACTION MURDER-HOLE-F)>
<ROUTINE MURDER-HOLE-F ("AUX" TAKER)
<COND (<VERB? LOOK-INSIDE>
<TELL "You can just make out the barbican below." CR>)
(<VERB? REACH-IN>
<TELL ,NOTHING-IN-REACH>)
(<AND <VERB? PUT PUT-THROUGH>
<PRSI? ,MURDER-HOLE>>
<COND (<AND <PRSO? ,CANNONBALL>
<VISIBLE? ,CANDLE>
<FSET? ,CANDLE ,ONBIT>>
<COND (<NOT <ULTIMATELY-IN? ,CANDLE>>
<MOVE ,CANDLE ,PROTAGONIST>)>
<TELL
"As you drop the cannonball through the murder hole, you hear a sickening
\"splat,\" followed by a woman's scream!|
\"Emily, what is it!\"|
\"It's Victor -- he's been murdered!\"|
\"I'll summon the Inspector! Ah, here he is now!\" You hear whispered
questions and answers from the room below, followed by footsteps on the
stairs. The jester enters, wearing a trenchcoat and smoking a large pipe.|
\"I'm afraid I'm going to have to order Sgt. Duffy to place you under
arrest, sir.\" You grow dizzy with confusion, and your surroundings swirl
wildly about you" ,ELLIPSIS>
<GOTO ,DUNGEON>)
(T
<TELL "You hear a \"thunk\" from down below." CR>)>
<COND (<OR <SET TAKER <FIND-IN ,BARBICAN ,WHITEBIT>>
<SET TAKER <FIND-IN ,BARBICAN ,BLACKBIT>>>
<MOVE ,PRSO .TAKER>
<COND (<PRSO? ,PIGEON>
<MOVE-TO-PERCH .TAKER>)>)
(T
<MOVE ,PRSO ,BARBICAN>)>
<RTRUE>)>>
<OBJECT WHEEL
(LOC UPPER-BARBICAN)
(DESC "wheel")
(SYNONYM WHEEL)
(ADJECTIVE LARGE CAST IRON)
(FLAGS NDESCBIT)
(ACTION WHEEL-F)>
<ROUTINE WHEEL-F ()
<COND (<VERB? SET SET-DIR>
<COND (<FSET? ,DRAWBRIDGE ,OPENBIT>
<FCLEAR ,DRAWBRIDGE ,OPENBIT>)
(T
<FSET ,DRAWBRIDGE ,OPENBIT>)>
<FSET ,BARBICAN ,REDESCBIT>
<TELL "You hear a clattering clanking noise from below." CR>
<ROB ,DRAWBRIDGE ,BARBICAN>
<RTRUE>)>>
<ROOM DRAWBRIDGE
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Drawbridge")
(SE TO BARBICAN)
(NW TO OUTER-BAILEY)
(FLAGS RLANDBIT ONBIT OUTSIDEBIT)
(SYNONYM BRIDGE DRAWBRIDGE)
(ADJECTIVE DRAW STURDY WOODEN)
(GLOBAL DRAWBRIDGE MOAT)
(MAP-LOC <PTABLE VILLAGE-MAP-NUM MAP-GEN-Y-4 MAP-GEN-X-3>)
(ICON DRAWBRIDGE-ICON)
(ACTION DRAWBRIDGE-F)>
<ROUTINE DRAWBRIDGE-F ("OPTIONAL" RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"You are standing on a sturdy wooden drawbridge across a moat. ">
<COND (<NOT ,TIME-STOPPED>
<TELL
"The surface of the moat roils from the thrashing of countless
ravenous beasts. ">)>
<TELL
"The drawbridge runs from a tall barbican at the southeast to a wide meadow
at the northwest.">)
(.RARG
<RFALSE>)
(<VERB? EXAMINE>
<TELL "The drawbridge is ">
<OPEN-CLOSED ,DRAWBRIDGE>
<TELL ,PERIOD-CR>)
(<OR <AND <VERB? OPEN LOWER>
<NOT <FSET? ,DRAWBRIDGE ,OPENBIT>>>
<AND <VERB? CLOSE RAISE>
<FSET? ,DRAWBRIDGE ,OPENBIT>>>
<TELL "There's no apparent way to do that." CR>)>>
<END-SEGMENT>
\
<BEGIN-SEGMENT CASTLE>
<ROOM PARLOR
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Parlor")
(LDESC
"This is where many of Dimwit's guests would come and sit after dinner,
for wine, conversation, and any other whim that might pop into Dimwit's
head. There are doorways to the east, west and south.")
(EAST TO ENTRANCE-HALL)
(SOUTH TO FORMAL-GARDEN)
(WEST TO TORCH-ROOM)
(FLAGS RLANDBIT ONBIT)
(SYNONYM PARLOR)
(MAP-LOC <PTABLE MAIN-MAP-NUM MAP-GEN-Y-3 MAP-GEN-X-4>)
(ICON PARLOR-ICON)
(ACTION PARLOR-F)>
<ROUTINE PARLOR-F ("OPT" (RARG <>))
<COND (<EQUAL? .RARG ,M-ENTER> ;"spenseweed shared with Lake Bottom"
<MOVE ,SPENSEWEED ,FISH-TANK>
<FCLEAR ,SPENSEWEED ,NDESCBIT>)>>
<OBJECT FISH-TANK
(LOC PARLOR)
(DESC "fish tank")
(SYNONYM TANK AQUARIUM)
(ADJECTIVE FISH)
(CAPACITY 50)
(FLAGS CONTBIT SEARCHBIT OPENBIT TRYTAKEBIT WATERBIT)
(ACTION FISH-TANK-F)>
<GLOBAL DESCRIBED-TANK-AS-LARGE <>>
<GLOBAL DESCRIBED-TANK-AS-SMALL <>>
<ROUTINE FISH-TANK-F ()
<COND (<AND <VERB? TAKE>
<PRSO? ,FISH-TANK>>
<COND (,DESCRIBED-TANK-AS-SMALL
<TELL
"The fish tank is much too large to carry! [Okay, I was exaggerating
when I called the tank \"itsy-bitsy.\"]" CR>)
(T
<SETG DESCRIBED-TANK-AS-LARGE T>
<TELL
"This tank is bigger than a lot of swimming pools!" CR>)>)
(<AND <PRSO? ,FOX ,ROOSTER ,FLAMINGO>
<FSET? ,PRSO ,ANIMATEDBIT>>
<TELL
"The " D ,PRSO " raises such a fuss that it becomes impossible." CR>)>>
<OBJECT SPENSEWEED
(OWNER SPENSEWEED)
(LOC FISH-TANK)
(DESC "clump of spenseweed")
(SYNONYM CLUMP SPENSEWEED WEED)
(ADJECTIVE SPENSE)
(FLAGS TRYTAKEBIT PLANTBIT)
(RESEARCH
"\"A deep-rooting underwater plant. Once established, it can usually only be
removed by using certain spells of wilting. The misconception that spenseweed
is a common roadside weed has been perpetuated by grossly inaccurate entries
in the last several editions of THE LORE AND LEGENDS OF QUENDOR.\"")
(ACTION SPENSEWEED-F)>
<ROUTINE SPENSEWEED-F ("OPTIONAL" (ARG <>))
<COND (<EQUAL? .ARG ,M-WINNER>
<PLANT-STUNNED>)
(<AND <IN? ,PROTAGONIST ,DB>
<TOUCHING? ,SPENSEWEED>>
<CANT-REACH ,SPENSEWEED>)
(<AND <VERB? TAKE DIG>
<PRSO? ,SPENSEWEED>>
<TELL ,DEEPLY-ROOTED>)
(<AND <VERB? LISTEN>
,PLANT-TALKER>
<TELL
"It's difficult to interpret the gurgly voice of the spenseweed, but it seems
to be fretting about the possibility of plant-eating fish being introduced into
the aquarium." CR>)>>
<BEGIN-SEGMENT 0>
<OBJECT LOBSTER
(LOC FISH-TANK)
(DESC "lobster")
(SYNONYM LOBSTER NUTCRACKER CRACKER)
(ADJECTIVE NUT)
(FLAGS TRYTAKEBIT TAKEBIT ANIMATEDBIT)
(INANIMATE-DESC "nutcracker")
(WAND-TEXT
"The lobster stops moving. Frozen as it is, with pincers outstretched, it looks
like nothing less than a large nutcracker. In fact, it IS a nutcracker!")
(ANIMATE-ROUTINE I-W-LOBSTER)
(ACTION LOBSTER-F)>
<ROUTINE LOBSTER-F ()
<COND (<AND <VERB? RESEARCH>
<NOUN-USED? ,LOBSTER ,W?LOBSTER>>
<PRINT "\"A common aquarium pet.\"">
<CRLF>)
(<AND <VERB? TAKE>
<FSET? ,LOBSTER ,ANIMATEDBIT>>
<COND (,TIME-STOPPED
<QUEUE I-LOBSTER-PINCH -1>
<RFALSE>)
(<FSET? ,GLOVE ,WORNBIT>
<QUEUE I-LOBSTER-PINCH 2>
<MOVE ,LOBSTER ,PROTAGONIST>
<TELL
"Your gloved hand moves with blazing speed, lifting the lobster and
avoiding its snapping pincers." CR>)
(T
<TELL
"The lobster snaps its pincers at you. You snatch your hand away
just in time." CR>)>)
(<AND <VERB? KILL MUNG>
<PRSI? ,CANNONBALL ,HAMMER>>
<TELL
"You pulverize the lobster into invisible jelly. Heartless; but then again,
I understand there are a large group of people who release boiling these
creatures alive." CR>)
(<AND <VERB? EAT>
<FSET? ,LOBSTER ,ANIMATEDBIT>>
<TELL
"1) It's not cooked. 2) It would probably bite your nose off if you tried. 3)
You don't have any tableware. 4) You don't have any melted butter. 5) It isn't
kosher." CR>)>>
<ROUTINE I-W-LOBSTER ()
<COND (,TIME-STOPPED
<QUEUE I-W-LOBSTER 3>
<RFALSE>)>
<FSET ,LOBSTER ,ANIMATEDBIT>
<COND (<IN? ,LOBSTER ,LAKE-BOTTOM>
<REMOVE ,LOBSTER>)
(<AND <IN? ,LOBSTER ,PROTAGONIST>
<NOT <IN? ,LOBSTER ,WALDO>>>
<RETURN-FROM-MAP>
<TELL
" Youch! The nutcracker just pinched you! As you drop it, you realize that it
has turned back into a lobster.">
<COND (<EQUAL? ,HERE ,HANGING-FROM-ROOTS ,UNDER-THE-WORLD>
<REMOVE ,LOBSTER>
<TELL " The poor creature plunges into the void.">)
(T
<MOVE ,LOBSTER ,HERE>)>
<CRLF>)
(<VISIBLE? ,LOBSTER>
<RETURN-FROM-MAP>
<TELL
" You notice the nutcracker waving its pincers. It seems that the
nutcracker is once again a lobster." CR>)
(T
<RFALSE>)>>
<ROUTINE I-LOBSTER-PINCH ()
<COND (,TIME-STOPPED
<RFALSE>)
(<NOT <FSET? ,LOBSTER ,ANIMATEDBIT>>
<RFALSE>)>
<DEQUEUE I-LOBSTER-PINCH>
<COND (<AND <ULTIMATELY-IN? ,LOBSTER>
<NOT <IN? ,LOBSTER ,WALDO>>>
<RETURN-FROM-MAP>
<TELL
" Youch! The lobster gives you a painful nip, and you drop it
like a hot potato.">
<COND (<EQUAL? ,HERE ,HANGING-FROM-ROOTS ,UNDER-THE-WORLD>
<REMOVE ,LOBSTER>
<TELL " The poor creature plunges into the void.">)
(T
<MOVE ,LOBSTER ,HERE>)>
<CRLF>)
(T
<RFALSE>)>>
<OBJECT STARFISH
(LOC FISH-TANK)
(DESC "starfish")
(PLURAL "starfish")
(SYNONYM STARFISH FISH STAR)
(ADJECTIVE STAR)
(FLAGS TAKEBIT ANIMATEDBIT)
(INANIMATE-DESC "star")
(WAND-TEXT
"The starfish, as still as it was before, becomes even more still.")
(ANIMATE-ROUTINE I-W-STARFISH)
(ACTION STARFISH-F)>
<ROUTINE STARFISH-F ()
<COND (<AND <VERB? RESEARCH>
<NOUN-USED? ,STARFISH ,W?STARFISH>>
<PRINT "\"A common aquarium pet.\"">
<CRLF>)>>
<ROUTINE I-W-STARFISH ()
<COND (,TIME-STOPPED
<QUEUE I-W-STARFISH 3>
<RFALSE>)>
<FSET ,STARFISH ,ANIMATEDBIT>
<COND (<IN? ,STARFISH ,LAKE-BOTTOM>
<REMOVE ,STARFISH>)
(<VISIBLE? ,STARFISH>
<RETURN-FROM-MAP>
<TELL
" With the tiniest wiggle, the star gives evidence that it is once again
a starfish." CR>)
(T
<RFALSE>)>>
<END-SEGMENT>
<BEGIN-SEGMENT CASTLE>
<ROOM TORCH-ROOM
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Torch Room")
(LDESC
"This is a small room for the storage of torches. The torches kept here
are generally short-lived, for the purpose of brief forays into the
darker regions of the castle. To the east is the lone exit.")
(EAST TO PARLOR)
(OUT TO PARLOR)
(FLAGS RLANDBIT ONBIT)
(MAP-LOC <PTABLE MAIN-MAP-NUM MAP-GEN-Y-3 MAP-GEN-X-3>)
(ICON TORCH-ROOM-ICON)>
<BEGIN-SEGMENT 0>
<OBJECT BICKERING-TORCH
(LOC TORCH-ROOM)
(DESC "bickering torch")
(PLURAL "torches")
(SYNONYM TORCH TORCHES)
(ADJECTIVE BICKERING)
(FLAGS TAKEBIT TRYTAKEBIT)
(ACTION BICKERING-TORCH-F)>
<ROUTINE BICKERING-TORCH-F ()
<COND (<VERB? TAKE>
<QUEUE I-BICKERING-TORCH -1>
<RFALSE>)
(<VERB? EXAMINE ON BURN>
<BURNED-OUT ,BICKERING-TORCH>)>>
<ROUTINE BURNED-OUT (OBJ)
<TELL "The " D .OBJ " has burned out and cannot be rekindled." CR>>
<ROUTINE I-BICKERING-TORCH ()
<COND (,TIME-STOPPED
<RFALSE>)
(<NOT <ULTIMATELY-IN? ,BICKERING-TORCH>>
<DEQUEUE I-BICKERING-TORCH>
<RFALSE>)
(<AND <PROB 30>
<NOT <EQUAL? ,CURRENT-SPLIT ,MAP-TOP-LEFT-LOC>>>
<TELL
" The bickering torch says, \"" <PICK-ONE ,BITCHES> "\"" CR>)
(T
<RFALSE>)>>
<CONSTANT BITCHES
<LTABLE
0
"All the other torches were picking on me."
"Everyone likes the flickering torch better than me."
"I saw the guttering torch wasting oil!"
"How come I didn't get made out of top-quality wood like
the other torches?"
"The muttering torch was talking about burning down the castle.">>
<OBJECT FLICKERING-TORCH
(LOC TORCH-ROOM)
(SDESC "flickering torch")
(PLURAL "torches")
(SYNONYM TORCH TORCHES)
(ADJECTIVE FLICKERING)
(FLAGS TAKEBIT TRYTAKEBIT FLAMEBIT ONBIT)
(ACTION FLICKERING-TORCH-F)>
<ROUTINE FLICKERING-TORCH-F ()
<COND (<AND <VERB? TAKE>
<FSET? ,FLICKERING-TORCH ,ONBIT>
<EQUAL? ,FLICKERING-TORCH-COUNT 0>>
<SETG FLICKERING-TORCH-COUNT <+ <RANDOM 3> 9>>
<QUEUE I-FLICKERING-TORCH -1>
<RFALSE>)
(<AND <VERB? OFF>
<FSET? ,FLICKERING-TORCH ,ONBIT>>
<FCLEAR ,FLICKERING-TORCH ,ONBIT>
<FCLEAR ,FLICKERING-TORCH ,FLAMEBIT>
<DEQUEUE I-FLICKERING-TORCH>
<TELL "\"Pffft.\"" CR>
<NOW-DARK?>)
(<AND <VERB? EXAMINE ON OFF BURN>
<NOT <FSET? ,FLICKERING-TORCH ,ONBIT>>>
<BURNED-OUT ,FLICKERING-TORCH>)>>
<GLOBAL FLICKERING-TORCH-COUNT 0>
<ROUTINE I-FLICKERING-TORCH ()
<SETG FLICKERING-TORCH-COUNT <- ,FLICKERING-TORCH-COUNT 1>>
<COND (<NOT <FSET? ,FLICKERING-TORCH ,ONBIT>> ;"e.g. dunked in water"
<PUTP ,FLICKERING-TORCH ,P?SDESC "formerly flickering torch">
<DEQUEUE I-FLICKERING-TORCH>
<RFALSE>)
(<EQUAL? ,FLICKERING-TORCH-COUNT 0>
<PUTP ,FLICKERING-TORCH ,P?SDESC "formerly flickering torch">
<FCLEAR ,FLICKERING-TORCH ,ONBIT>
<FCLEAR ,FLICKERING-TORCH ,FLAMEBIT>
<DEQUEUE I-FLICKERING-TORCH>)>
<COND (<NOT <VISIBLE? ,FLICKERING-TORCH>>
<RFALSE>)
(<NOT <FSET? ,FLICKERING-TORCH ,ONBIT>>
<RETURN-FROM-MAP>
<IN-THE-SKY "flick">)
(<PROB 40>
<RETURN-FROM-MAP>
<TELL
" The flame of the flickering torch dances wildly on the
brink of extinction." CR>)
(T
<RFALSE>)>>
<ROUTINE IN-THE-SKY (STRING)
<TELL
" The " .STRING "ering torch gives its last " .STRING "er before going to
that great Torch Room in the sky." CR>
<NOW-DARK?>>
<OBJECT MUTTERING-TORCH
(LOC TORCH-ROOM)
(DESC "muttering torch")
(PLURAL "torches")
(SYNONYM TORCH TORCHES)
(ADJECTIVE MUTTERING)
(FLAGS TAKEBIT TRYTAKEBIT)
(ACTION MUTTERING-TORCH-F)>
<ROUTINE MUTTERING-TORCH-F ()
<COND (<VERB? TAKE>
<QUEUE I-MUTTERING-TORCH -1>
<RFALSE>)
(<VERB? EXAMINE ON BURN>
<BURNED-OUT ,MUTTERING-TORCH>)>>
<ROUTINE I-MUTTERING-TORCH ()
<COND (,TIME-STOPPED
<RFALSE>)
(<NOT <ULTIMATELY-IN? ,MUTTERING-TORCH>>
<DEQUEUE I-MUTTERING-TORCH>
<RFALSE>)
(<AND <PROB 30>
<NOT <EQUAL? ,CURRENT-SPLIT ,MAP-TOP-LEFT-LOC>>>
<TELL
" The muttering torch mutters something about "
<PICK-ONE ,MUTTERS> ,PERIOD-CR>)
(T
<RFALSE>)>>
<CONSTANT MUTTERS
<LTABLE
0
"human palm odors"
"the unfairness of existence as a torch"
"being held too tightly"
"the callous discarding of burned-out torches"
"the uncomfortableness of most sconces">>
<OBJECT GUTTERING-TORCH
(LOC TORCH-ROOM)
(SDESC "guttering torch")
(PLURAL "torches")
(SYNONYM TORCH TORCHES)
(ADJECTIVE GUTTERING)
(FLAGS TAKEBIT TRYTAKEBIT ONBIT FLAMEBIT)
(ACTION GUTTERING-TORCH-F)>
<ROUTINE GUTTERING-TORCH-F ()
<COND (<AND <VERB? TAKE>
<FSET? ,GUTTERING-TORCH ,ONBIT>
<EQUAL? ,GUTTERING-TORCH-COUNT 0>>
<SETG GUTTERING-TORCH-COUNT <+ <RANDOM 3> 9>>
<QUEUE I-GUTTERING-TORCH -1>
<RFALSE>)
(<AND <VERB? OFF>
<FSET? ,GUTTERING-TORCH ,ONBIT>>
<FCLEAR ,GUTTERING-TORCH ,ONBIT>
<FCLEAR ,GUTTERING-TORCH ,FLAMEBIT>
<DEQUEUE I-GUTTERING-TORCH>
<TELL "\"Pffft.\"" CR>
<NOW-DARK?>)
(<AND <VERB? EXAMINE ON OFF BURN>
<NOT <FSET? ,GUTTERING-TORCH ,ONBIT>>>
<BURNED-OUT ,GUTTERING-TORCH>)>>
<GLOBAL GUTTERING-TORCH-COUNT 0>
<ROUTINE I-GUTTERING-TORCH ()
<SETG GUTTERING-TORCH-COUNT <- ,GUTTERING-TORCH-COUNT 1>>
<COND (<NOT <FSET? ,GUTTERING-TORCH ,ONBIT>> ;"e.g. dunked in water"
<PUTP ,GUTTERING-TORCH ,P?SDESC "formerly guttering torch">
<DEQUEUE I-GUTTERING-TORCH>
<RFALSE>)
(<EQUAL? ,GUTTERING-TORCH-COUNT 0>
<PUTP ,GUTTERING-TORCH ,P?SDESC "formerly guttering torch">
<FCLEAR ,GUTTERING-TORCH ,ONBIT>
<FCLEAR ,GUTTERING-TORCH ,FLAMEBIT>
<DEQUEUE I-GUTTERING-TORCH>)>
<COND (<NOT <VISIBLE? ,GUTTERING-TORCH>>
<RFALSE>)
(<NOT <FSET? ,GUTTERING-TORCH ,ONBIT>>
<RETURN-FROM-MAP>
<IN-THE-SKY "gutt">)
(<PROB 40>
<RETURN-FROM-MAP>
<TELL
" The guttering torch sputters on the verge of burning out, but
then decides to keep burning for at least another minute." CR>)
(T
<RFALSE>)>>
<END-SEGMENT>
<BEGIN-SEGMENT CASTLE>
<ROOM FORMAL-GARDEN
(LOC ROOMS)
(REGION "Flatheadia")
(DESC "Formal Garden")
(LDESC
"Dimwit designed this garden to match a fairy tale he enjoyed as a child,
and subsequent kings added their own touches, creating a hugely confusing
maze of flowers and shrubbery and statuary and trees and fountains and pools
and bridges and gazebos. Now somewhat overgrown, the garden is seemingly
endless, but you recall that the primary exits lie to the north, east, and
southwest.")
(NORTH TO PARLOR)
(EAST TO GREAT-HALL)
(SW TO WEST-HALL)
(FLAGS RLANDBIT ONBIT OUTSIDEBIT)
(SYNONYM GARDEN)
(ADJECTIVE FORMAL)
(MAP-LOC <PTABLE MAIN-MAP-NUM MAP-GEN-Y-4 MAP-GEN-X-4>)
(ICON FORMAL-GARDEN-ICON)
(THINGS <> FLOWER GARDEN-FLOWER-PS)>
<ROUTINE GARDEN-FLOWER-PS ()
<COND (<VERB? PICK>
<TELL "Ouch! Thorns!" CR>)
(<VERB? EXAMINE>
<TELL "Breathtakingly beautiful." CR>)
(<AND <VERB? LISTEN>
,PLANT-TALKER>
<PERFORM-PRSA ,FLORA>)>>
<OBJECT FLORA
(LOC FORMAL-GARDEN)
(DESC "flora")
(SYNONYM SHRUB SHRUBS SHRUBBERY TREE FLORA PLANT PLANTS)
(FLAGS PLANTBIT NDESCBIT NARTICLEBIT PLURALBIT)
(ACTION FLORA-F)>
<ROUTINE FLORA-F ("OPTIONAL" (ARG <>))
<COND (<EQUAL? .ARG ,M-WINNER>
<PLANT-STUNNED>)
(<VERB? EXAMINE>
<TELL "Breathtakingly beautiful." CR>)
(<AND <VERB? LISTEN>
,PLANT-TALKER>
<TELL
"The many shrub and trees and flowers create a cacophony of plant-talk
that makes it impossible to understand any of it!" CR>)>>
<BEGIN-SEGMENT 0>
<OBJECT FLAMINGO
(LOC FORMAL-GARDEN)
(DESC "flamingo")
(FDESC
"You spot a flash of pink amongst the flora. It's a flamingo!")
(SYNONYM FLAMINGO BIRD ORNAMENT)
(ADJECTIVE LAWN)
(FLAGS TRYTAKEBIT TAKEBIT ANIMATEDBIT)
(INANIMATE-DESC "lawn ornament")
(WAND-TEXT "The flamingo becomes motionless.")
(ANIMATE-ROUTINE I-W-FLAMINGO)
(SIZE 10)
(ACTION FLAMINGO-F)>
<ROUTINE FLAMINGO-F ("OPT" (ARG <>))
<COND (<NOT <FSET? ,FLAMINGO ,ANIMATEDBIT>>
<RFALSE>)
(<AND <VERB? RESEARCH>