-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcell.zil
2086 lines (2017 loc) · 44.1 KB
/
cell.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
;"***************************************************************************"
; "game : Arthur"
; "file : CELL.ZIL"
; "auth : $Author: DEB $"
; "date : $Date: 16 May 1989 1:23:12 $"
; "revs : $Revision: 1.104 $"
; "vers : 1.0"
;"---------------------------------------------------------------------------"
; "Cell puzzle"
; "Copyright (C) 1989 Infocom, Inc. All rights reserved."
;"***************************************************************************"
;"---------------------------------------------------------------------------"
; "RM-CELL"
;"---------------------------------------------------------------------------"
<ROOM RM-CELL
(LOC ROOMS)
(DESC "cell")
(FLAGS FL-INDOORS FL-LIGHTED)
(SYNONYM CELL DUNGEON)
(NORTH TO RM-HALL IF LG-CELL-DOOR IS OPEN)
(OUT PER RT-CELL-OUT)
(WEST PER RT-ENTER-HOLE)
(IN PER RT-ENTER-HOLE)
(SCORE <ORB <LSH 2 ,K-WISD-SHIFT> <LSH 2 ,K-QUEST-SHIFT>>)
(ADJACENT <TABLE (LENGTH BYTE) RM-HALL <>>)
(GLOBAL LG-CELL-DOOR LG-WALL RM-HALL RM-HOLE ;RM-BADGER-TUNNEL)
(ACTION RT-RM-CELL)
>
<ROUTINE RT-RM-CELL ("OPT" (CONTEXT <>) "AUX" N)
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<TELL "You ">
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL "are">
)
(<MC-CONTEXT? ,M-F-LOOK>
<TELL
"crawl through the hole in the wall and plop to the ground on the other side.
You find yourself"
>
)
(T
<TELL "find yourself">
)
>
<FSET ,LG-CELL-DOOR ,FL-SEEN>
<TELL
" in a dank, cramped cell far below Lot's castle. The room was originally
used by the Romans for food storage, but someone converted it into a miserable
dungeon by bolting chains to the clammy stone walls." CR CR
"There is a cell door of stout wood to the north"
>
<COND
(<NOT <FSET? ,TH-CELL-STONE ,FL-LOCKED>>
<TELL
", and a hole in the wall to the west where a stone has been pushed out"
>
)
>
<TELL ".">
<COND
(<FSET? ,CH-PRISONER ,FL-LOCKED>
<FSET ,CH-PRISONER ,FL-SEEN>
<TELL " " A ,CH-PRISONER " is chained to the wall.">
)
>
<COND
(<AND <IN? ,CH-CELL-GUARD ,RM-CELL>
<FSET? ,CH-CELL-GUARD ,FL-ASLEEP>
>
<TELL " " A ,CH-CELL-GUARD " is lying unconscious on the floor.">
)
>
<CRLF>
<RFALSE>
)
(<MC-CONTEXT? ,M-BEG>
<COND
(<VERB? YELL>
<COND
(<MC-FORM? ,K-FORM-ARTHUR>
<RT-CALL-GUARD>
)
>
)
(<AND <VERB? PUT-IN>
<MC-PRSI? ,LG-WALL>
<NOT <FSET? ,TH-CELL-STONE ,FL-LOCKED>>
>
<PERFORM ,PRSA ,PRSO ,RM-HOLE>
<RTRUE>
)
(<AND <VERB? WAIT>
<MC-PRSO? ,CH-CELL-GUARD>
>
<COND
(<SET N <RT-IS-QUEUED? ,RT-I-ALARM>>
<SET N <- .N GL-MOVES>>
)
(T
<SET N <- 182 <MOD ,GL-MOVES 180>>>
)
>
<COND
(<G? .N 0>
<SETG GL-MOVES <+ ,GL-MOVES <- .N 1>>>
<TELL ,K-TIME-PASSES-MSG CR>
)
>
)
>
)
(<MC-CONTEXT? ,M-ENTER>
<COND
(<AND <IN? ,CH-PRISONER ,RM-CELL>
<FSET? ,CH-PRISONER ,FL-LOCKED>
>
<SETG GL-PICTURE-NUM ,K-PIC-CELL-PRISONER>
)
(T
<SETG GL-PICTURE-NUM ,K-PIC-CELL>
)
>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTERED>
<COND
(<AND <IN? ,CH-PRISONER ,RM-CELL>
<NOT <FSET? ,CH-PRISONER ,FL-LOCKED>>
>
<RT-SET-PUPPY ,CH-PRISONER>
)
>
)
(.CONTEXT
<RFALSE>
)
(<VERB? OPEN>
<PERFORM ,PRSA ,LG-CELL-DOOR>
<RTRUE>
)
>
>
<ROUTINE RT-CELL-OUT ("OPT" (QUIET <>))
<COND
(.QUIET
<RETURN ,RM-HALL>
)
(<EQUAL? ,GL-HIDING ,LG-CELL-DOOR>
<SETG GL-HIDING <>>
<TELL The+verb ,WINNER "step" " out from behind" the ,LG-CELL-DOOR "." CR>
<RFALSE>
)
(<FSET? ,LG-CELL-DOOR ,FL-OPEN>
<RETURN ,RM-HALL>
)
(T
<THIS-IS-IT ,LG-CELL-DOOR>
<TELL The+verb ,LG-CELL-DOOR "are" "n't open.|">
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-BEHIND-DOOR"
;"---------------------------------------------------------------------------"
<OBJECT TH-BEHIND-DOOR
(LOC RM-CELL)
(DESC "behind the door")
(FLAGS FL-CONTAINER FL-NO-ARTICLE FL-NO-DESC FL-OPEN FL-SEARCH)
(SOUTH PER RT-LEAVE-DOOR)
(OUT PER RT-LEAVE-DOOR)
(GLOBAL LG-CELL-DOOR LG-WALL RM-CELL)
(CAPACITY K-CAP-MAX)
(ACTION RT-TH-BEHIND-DOOR)
>
<ROUTINE RT-TH-BEHIND-DOOR ("OPT" (CONTEXT <>) "AUX" L)
<COND
(<MC-CONTEXT? ,M-BEG>
<COND
; (<AND <VERB? TELL>
,P-CONT
>
<RFALSE>
)
(<AND <VERB? ATTACK BREAK>
<MC-PRSO? ,CH-CELL-GUARD>
<NOT <FSET? ,CH-CELL-GUARD ,FL-ASLEEP>>
>
<RFALSE>
)
(<AND <IN? ,CH-CELL-GUARD ,RM-CELL>
<NOT <FSET? ,CH-CELL-GUARD ,FL-ASLEEP>>
<UNHIDE-VERB?>
>
<RT-SEIZE-MSG ,CH-CELL-GUARD>
)
(<OR <AND
<VERB? PUT-IN>
<MC-PRSI? ,RM-CELL>
>
<AND
<VERB? THROW>
<IN? ,PRSI ,RM-CELL>
>
>
<COND
(<OR <PRE-PUT>
<NOT <IDROP>>
>
<RTRUE>
)
(T
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-INVT ,K-UPD-OBJS>>
<MOVE ,PRSO ,RM-CELL>
<TELL
The+verb ,WINNER "toss" the ,PRSO " into" the ,RM-CELL "." CR
>
)
>
)
(<TOUCH-VERB?>
<SET L <LOC ,CH-PLAYER>>
<COND
(,PRSO
<COND
(<OR <MC-PRSO? ,ROOMS>
<EQUAL? <LOC ,PRSO> ,GLOBAL-OBJECTS ,GENERIC-OBJECTS>
>
<>
)
(<NOT <RT-META-IN? ,PRSO .L>>
<COND
(<MC-PRSO? ,LG-CELL-DOOR>
<>
)
(T
<RT-CANT-REACH-MSG ,PRSO .L>
<RTRUE>
)
>
)
>
)
>
<COND
(,PRSI
<COND
(<OR <MC-PRSI? ,ROOMS>
<EQUAL? <LOC ,PRSI> ,GLOBAL-OBJECTS ,GENERIC-OBJECTS>
>
<RFALSE>
)
(<NOT <RT-META-IN? ,PRSI .L>>
<COND
(<MC-PRSI? ,LG-CELL-DOOR>
<RFALSE>
)
(T
<RT-CANT-REACH-MSG ,PRSI .L>
)
>
)
>
)
>
)
>
)
(<MC-CONTEXT? ,M-END>
<COND
(<AND <IN? ,CH-CELL-GUARD ,RM-CELL>
<NOT <FSET? ,CH-CELL-GUARD ,FL-ASLEEP>>
<VERB? TRANSFORM>
<NOT <MC-FORM? ,GL-OLD-FORM>>
<MC-FORM? ,K-FORM-ARTHUR>
>
<RT-SEIZE-MSG ,CH-CELL-GUARD>
)
>
)
>
>
<ROUTINE RT-BEHIND-DOOR ("OPT" (QUIET <>) "AUX" (HIDE <>))
<COND
(.QUIET
<RFALSE>
)
(<IN? ,WINNER ,TH-BEHIND-DOOR>
<RT-ALREADY-MSG ,WINNER "behind the cell door">
)
(T
<MOVE ,WINNER ,TH-BEHIND-DOOR>
<SETG GL-HIDING ,LG-CELL-DOOR>
<TELL "You flatten yourself up against the cold stone wall">
<COND
(<MC-FORM? ,K-FORM-ARTHUR>
<TELL ".">
)
(T
<TELL ", as much as" aform " can flatten itself.">
)
>
<CRLF>
)
>
<RFALSE>
>
<ROUTINE RT-LEAVE-DOOR ("OPT" (QUIET <>))
<COND
(.QUIET
<RETURN ,RM-CELL>
)
(<IN? ,WINNER ,TH-BEHIND-DOOR>
<SETG GL-HIDING <>>
<MOVE ,WINNER ,RM-CELL>
<TELL
The+verb ,WINNER "step" " out from behind" the ,LG-CELL-DOOR "." CR
>
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "CH-PRISONER"
;"---------------------------------------------------------------------------"
<OBJECT CH-PRISONER
(LOC RM-CELL)
(DESC "prisoner")
(FLAGS FL-ALIVE FL-LOCKED FL-OPEN FL-PERSON FL-SEARCH FL-NO-LIST)
(SYNONYM PRISONER MAN PERSON SMITH BLACKSMITH CRAFTSMAN CASSO)
(ADJECTIVE DIRTY TIRED CHAINED CAPTIVE)
(ACTION RT-CH-PRISONER)
(CONTFCN RT-CH-PRISONER)
>
; "CH-PRISONER flags:"
; " FL-AIR - Player has brought prisoner out of kitchen"
; " FL-BROKEN - Slave has made comment re xformation"
; " FL-LOCKED - Slave is chained to wall in cell"
<CONSTANT K-TAKE-SMITH-HELMET-MSG
" says, \"If I give it to you, someone might recognize me.\"|">
<ROUTINE RT-CH-PRISONER ("OPT" (CONTEXT <>))
<COND
(<AND <VERB? HELLO GOODBYE THANK>
<MC-CONTEXT? ,M-WINNER <>>
>
<COND
(<VERB? HELLO>
<TELL "\"Hello, enchanted one.\"" CR>
)
(<VERB? GOODBYE>
<TELL
"\"Please don't leave me here. They are sure to kill me.\"" CR
>
)
(<VERB? THANK>
<TELL
"\"I've done nothing to earn your thanks, sir. But you're welcome just the
same.\"|"
>
<COND
(<NOT <FSET? ,CH-PLAYER ,FL-AIR>>
<FSET ,CH-PLAYER ,FL-AIR>
<RT-SCORE-MSG 10 0 0 0>
)
>
<RTRUE>
)
>
)
(<MC-CONTEXT? ,M-WINNER>
<COND
(<AND <VERB? TELL-ABOUT>
<MC-PRSO? ,CH-PLAYER>
>
<RFALSE>
)
(<VERB? WHO WHAT>
<RFALSE>
)
(<AND <MC-HERE?
,RM-CELL
,RM-BOTTOM-OF-STAIRS
,RM-HALL
,RM-END-OF-HALL
,RM-SMALL-CHAMBER
>
<OR
<VERB? YELL>
<AND
<VERB? CALL>
<MC-PRSO? ,CH-CELL-GUARD ,CH-SOLDIERS>
>
>
>
<RT-CALL-GUARD>
)
(<AND <VERB? TAKE WEAR>
<MC-PRSO? ,TH-HELMET>
>
<RT-SMITH-HELMET-MSG>
)
(<AND <IN? ,TH-HELMET ,CH-PRISONER>
<VERB? GIVE GIVE-SWP>
<EQUAL? ,TH-HELMET ,PRSO ,PRSI>
<EQUAL? ,CH-PLAYER ,PRSO ,PRSI>
>
<TELL "The smith" ,K-TAKE-SMITH-HELMET-MSG>
)
(T
<TELL
"The man is so much in awe of you that he gets tongue-tied and can't answer.|"
>
<RFATAL>
)
>
)
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<COND
(<VERB? SHOW GIVE>
<COND
(<MC-PRSO? ,TH-MASTER-KEY>
<COND
(<FSET? ,CH-PRISONER ,FL-LOCKED>
<TELL
The ,CH-PRISONER " can't use" the ,TH-MASTER-KEY ". " His ,CH-PRISONER
" hands are shackled." CR
>
)
>
)
(<OR <MC-PRSO? ,TH-SHIELD ,TH-ARMOUR ,TH-BROKEN-DAGGER>
<AND
<MC-PRSO? ,PSEUDO-OBJECT>
<EQUAL? ,LAST-PSEUDO-LOC ,RM-ARMOURY>
>
>
<RT-SMITH-EVALUATE-MSG ,PRSO>
)
(<MC-PRSO? ,TH-HELMET>
<RT-SMITH-HELMET-MSG>
)
>
)
>
)
(<AND <VERB? TELL>
,P-CONT
>
; "Message and RFATAL if don't want prisoner to become winner"
<RFALSE>
)
(<VERB? ASK-ABOUT>
<COND
(<AND <MC-PRSI? ,TH-TIME>
<NOUN-USED? ,PRSI ,W?CHRISTMAS ,W?XMAS>
>
<TELL
"\"I really enjoying decking the halls, but I'm not too wild about the gay
apparel.\"" CR
>
)
(<OR <AND <MC-PRSI? ,GLOBAL-HERE> <MC-HERE? ,RM-CELL>>
<MC-PRSI? ,RM-CELL ,CH-SOLDIERS ,CH-CELL-GUARD
,LG-CELL-DOOR ,TH-TIME ,TH-MASTER-KEY
>
<NOUN-USED? ,PRSI ,W?FOOD>
>
<COND
(<NOT <FSET? ,CH-PRISONER ,FL-LOCKED>>
<TELL
"\"I was blindfolded when they arrested me. I cannot tell you anything
more.\"" CR
>
)
(T
<TELL
"\"A guard comes to look at me when the bells ring. Or if I shout, sometimes
he will come.\"" CR
>
)
>
)
(<MC-PRSI? ,CH-LOT ,TH-SWORD ,TH-EXCALIBUR>
<TELL
"\"King Lot came to me and asked me to fashion a sword in the likeness of the
famous sword in the stone. He told me it was to be a gift to the new High
King, whoever that may be. But when I completed it, he imprisoned me in this
cell.\"" CR
>
)
(<MC-PRSI? ,CH-PRISONER>
<TELL "\"I am but a humble craftsman.\"" CR>
)
(<MC-PRSI? ,RM-SMITHY>
<TELL
"\"It must have become abandoned since I was imprisoned.\"" CR
>
)
(<OR <MC-PRSI? ,TH-SHIELD ,TH-ARMOUR ,TH-BROKEN-DAGGER>
<AND
<MC-PRSI? ,PSEUDO-OBJECT>
<EQUAL? ,LAST-PSEUDO-LOC ,RM-ARMOURY>
>
>
<RT-SMITH-EVALUATE-MSG ,PRSI>
)
(<MC-PRSI? ,CH-MERLIN>
<TELL
"\"In the town, they say he has made a pact with the devil. But I have never
heard of him doing evil.\"" CR
>
)
(<MC-PRSI? ,TH-NAME>
<TELL "\"My name is Casso.\"" CR>
)
(<MC-PRSI? ,TH-MASTER>
<TELL "\"I have no master.\"" CR>
)
(<MC-PRSI? ,TH-CHAINS ,TH-PADLOCK>
<COND
(<FSET? ,CH-PRISONER ,FL-LOCKED>
<TELL
"His head droops in despair. \"Finest quality,\" he mumbles. \"Cannot be
broken.\"" CR
>
)
(T
<TELL
"The prisoner shudders and says, \"Now that you have freed me, I don't
even want to think about such things.\"" CR
>
)
>
)
(<MC-PRSI? ,TH-PUMICE>
<TELL
"\"I use pumice all the time. There's nothing like it to make an old weapon
look like new.\"" CR
>
)
(<MC-PRSI? ,TH-HELMET>
<TELL
"\"It's a perfect disguise. No one will recognize me.\"" CR
>
)
(T
<TELL "\"I know nothing about">
<COND
(<FSET? ,PRSI ,FL-PERSON>
<TELL him ,PRSI>
)
(T
<TELL " that">
)
>
<TELL ".\"" CR>
)
>
)
(<VERB? ASK-FOR>
<COND
(<AND <MC-PRSI? ,TH-HELMET>
<IN? ,TH-HELMET ,CH-PRISONER>
>
<TELL "The smith" ,K-TAKE-SMITH-HELMET-MSG>
)
>
)
(<VERB? EXAMINE>
<FSET ,CH-PRISONER ,FL-SEEN>
<COND
(<FSET? ,CH-PRISONER ,FL-LOCKED>
<TELL
"The prisoner's wrists are crossed and bound together by a chain. The chain is
fastened with a large padlock." CR
>
)
(T
<TELL
The+verb ,CH-PRISONER "look" " grateful that you have freed him, but worried
about how you will manage your escape from the castle." CR
>
)
>
)
(<VERB? RELEASE>
<COND
(<NOT <FSET? ,CH-PRISONER ,FL-LOCKED>>
<RFALSE>
)
(<IN? ,TH-MASTER-KEY ,WINNER>
<RT-FREE-PRISONER-MSG>
)
(T
<SETG CLOCK-WAIT T>
<RT-AUTHOR-MSG ,K-HOW-INTEND-MSG>
)
>
)
(<VERB? UNLOCK>
<COND
(<AND <FSET? ,CH-PRISONER ,FL-LOCKED>
<MC-PRSI? ,TH-MASTER-KEY>
>
<RT-FREE-PRISONER-MSG>
)
>
)
(<VERB? KNEEL>
<TELL "The prisoner bows in return." CR>
)
(<VERB? TALK-TO>
<TELL "The prisoner babbles a few incoherent words in response." CR>
)
(<VERB? ATTACK>
<COND
(<MC-FORM? ,K-FORM-ARTHUR>
<TELL "You launch an attack against the prisoner, but">
<COND
(<FSET? ,CH-PRISONER ,FL-LOCKED>
<TELL " even though he is chained,">
)
>
<TELL " you are no match for his superior strength. He">
<COND
(<FSET? ,CH-PRISONER ,FL-LOCKED>
<TELL " wraps a chain around your throat and">
)
>
<TELL " strangles you to death." CR>
<RT-END-OF-GAME>
)
>
)
>
>
<ROUTINE RT-FREE-PRISONER-MSG ()
<FCLEAR ,TH-CHAINS ,FL-LOCKED>
<FCLEAR ,TH-PADLOCK ,FL-LOCKED>
<FSET ,TH-CHAINS ,FL-OPEN>
<FSET ,TH-PADLOCK ,FL-OPEN>
<FCLEAR ,CH-PRISONER ,FL-LOCKED>
<RT-SET-PUPPY ,CH-PRISONER>
<SETG GL-PICTURE-NUM ,K-PIC-CELL>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<TELL
"You unlock the padlock. The prisoner struggles to his feet and looks
at you gratefully. \"Thank you, kind sir,\" he says. \"Let us escape from
here together.\"|"
>
<RT-SCORE-MSG 10 0 0 0>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RTRUE>
>
<ROUTINE RT-SMITH-EVALUATE-MSG (OBJ)
<COND
(<VISIBLE? .OBJ>
<TELL
"The smith eyes" the .OBJ " professionally and says, "
>
)
>
<COND
(<EQUAL? .OBJ ,PSEUDO-OBJECT>
<COND
(<NOUN-USED? ,PSEUDO-OBJECT ,W?SHIELD ,W?SHIELDS>
<TELL
"\"They're not top quality, but I suppose they're good enough for government
work.\"" CR
>
)
(T ;"Pikestaffs"
<TELL
"\"They're imported from Gaul. You can tell by the inferior workmanship along
the shafts.\"" CR
>
)
>
)
(<EQUAL? .OBJ ,TH-SHIELD>
<TELL
"\"It's a perfectly good shield. They just haven't taken very good care of
it.\"" CR
>
)
(<EQUAL? .OBJ ,TH-ARMOUR>
<TELL
"\"The chap it was made for must be awfully small - about your size, I'd
say.\"" CR
>
)
(<EQUAL? .OBJ ,TH-BROKEN-DAGGER>
<TELL
"\"It's beyond repair. Even I couldn't fix it.\"" CR
>
)
>
>
<ROUTINE RT-SMITH-HELMET-MSG ()
<MOVE ,TH-HELMET ,CH-PRISONER>
<FSET ,TH-HELMET ,FL-WORN>
<TELL
"The smith puts on the helmet. It covers enough of his face to make a
suitable disguise." CR
>
>
;"---------------------------------------------------------------------------"
; "TH-CELL-STONE"
;"---------------------------------------------------------------------------"
<OBJECT TH-CELL-STONE
(LOC RM-CELL)
(DESC "building stone")
(FLAGS FL-TAKEABLE FL-LOCKED FL-NO-DESC)
(SYNONYM STONE ROCK)
(ADJECTIVE OLD BUILDING)
(SIZE 5)
(GENERIC RT-GN-STONE)
(ACTION RT-TH-CELL-STONE)
>
; "TH-CELL-STONE flags:"
; " FL-LOCKED - Stone is in wall"
<ROUTINE RT-TH-CELL-STONE ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<RFALSE>
)
(<VERB? EXAMINE>
<FSET ,TH-CELL-STONE ,FL-SEEN>
<TELL
"It's an old building stone whose corners are rounded with age." CR
>
)
(<OR <VERB? TAKE>
<AND <VERB? MOVE> <VERB-WORD? ,W?PULL>>
>
<COND
(<AND <FSET? ,TH-CELL-STONE ,FL-LOCKED>
<MC-HERE? ,RM-CELL>
>
<COND
(<NOT <MC-FORM? ,K-FORM-ARTHUR>>
<RT-ANIMAL-CANT-MSG>
)
(<RT-DO-TAKE ,TH-CELL-STONE>
<FCLEAR ,TH-CELL-STONE ,FL-LOCKED>
<TELL "You pull the loose stone out of the wall.|">
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
<RTRUE>
)
>
)
>
)
(<VERB? MOVE EXTEND>
<COND
(<AND <MC-HERE? ,RM-CELL>
<FSET? ,TH-CELL-STONE ,FL-LOCKED>
>
<TELL
"You push on the stone, but you can't seem to move it from this side." CR
>
)
>
)
(<VERB? CLIMB-ON>
<RT-WASTE-OF-TIME-MSG>
)
(<VERB? PUT>
<COND
(<VERB-WORD? ,W?DROP ,W?THROW ,W?HURL>
<PERFORM ,V?BREAK ,PRSI ,PRSO>
<RTRUE>
)
>
)
>
>
;"---------------------------------------------------------------------------"
; "LG-CELL-DOOR"
;"---------------------------------------------------------------------------"
<OBJECT LG-CELL-DOOR
(LOC LOCAL-GLOBALS)
(DESC "cell door")
(FLAGS FL-AUTO-OPEN FL-DOOR FL-OPENABLE FL-LOCKED FL-NO-DESC)
(SYNONYM DOOR LOCK KEYHOLE)
(ADJECTIVE WOOD WOODEN CELL)
(ACTION RT-LG-CELL-DOOR)
>
<ROUTINE RT-LG-CELL-DOOR ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(<VERB? EXAMINE>
<FSET ,LG-CELL-DOOR ,FL-SEEN>
<TELL "It is a massive wooden door that is ">
<COND
(<FSET? ,LG-CELL-DOOR ,FL-OPEN>
<TELL "standing open">
)
(T
<TELL "firmly closed">
)
>
<TELL "." CR>
)
(<AND <VERB? HIDE-BEHIND>
<MC-HERE? ,RM-CELL>
>
<RT-BEHIND-DOOR>
<RTRUE>
)
(<VERB? ATTACK BREAK>
<TELL The ,WINNER " can't break down the door." CR>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-CHAINS"
;"---------------------------------------------------------------------------"
<OBJECT TH-CHAINS
(LOC RM-CELL)
(DESC "chains")
(FLAGS FL-LOCKED FL-OPENABLE FL-PLURAL FL-TRY-TAKE FL-NO-DESC)
(SYNONYM CHAIN CHAINS)
(ADJECTIVE IRON)
(OWNER CH-PRISONER)
(ACTION RT-TH-CHAINS)
>
<ROUTINE RT-TH-CHAINS ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(<VERB? TAKE MOVE>
<THIS-IS-IT ,LG-WALL>
<THIS-IS-IT ,TH-CHAINS>
<TELL The ,TH-CHAINS " are firmly attached to the wall." CR>
)
(<AND <VERB? OPEN>
<NOT <FSET? ,TH-CHAINS ,FL-LOCKED>>
<FSET? ,CH-PRISONER ,FL-LOCKED>
>
<RT-FREE-PRISONER-MSG>
)
(<VERB? EXAMINE>
<FSET ,TH-CHAINS ,FL-SEEN>
<THIS-IS-IT ,TH-CHAINS>
<TELL "The chains are forged of the strongest iron." CR>
)
(<VERB? BREAK ATTACK>
<THIS-IS-IT ,TH-CHAINS>
<TELL The ,WINNER " can't break the chains." CR>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-PADLOCK"
;"---------------------------------------------------------------------------"
<OBJECT TH-PADLOCK
(LOC RM-CELL)
(DESC "padlock")
(FLAGS FL-LOCKED FL-OPENABLE FL-TRY-TAKE FL-NO-DESC)
(SYNONYM LOCK PADLOCK KEYHOLE)
(ADJECTIVE PAD IRON)
(OWNER CH-PRISONER)
(ACTION RT-TH-PADLOCK)
>
<ROUTINE RT-TH-PADLOCK ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(<VERB? TAKE MOVE>
<FSET ,TH-PADLOCK ,FL-SEEN>
<THIS-IS-IT ,TH-CHAINS>
<THIS-IS-IT ,TH-PADLOCK>
<TELL The ,TH-PADLOCK " is firmly attached to" the ,TH-CHAINS "." CR>
)
(<AND <VERB? OPEN>
<NOT <FSET? ,TH-CHAINS ,FL-LOCKED>>
<FSET? ,CH-PRISONER ,FL-LOCKED>
>
<RT-FREE-PRISONER-MSG>
)
(<VERB? EXAMINE>
<FSET ,TH-CHAINS ,FL-SEEN>
<THIS-IS-IT ,TH-PADLOCK>
<TELL The ,TH-PADLOCK " is forged of the strongest iron." CR>
)
(<VERB? BREAK ATTACK>
<FSET ,TH-CHAINS ,FL-SEEN>
<THIS-IS-IT ,TH-PADLOCK>
<TELL The ,WINNER " can't break" the ,TH-PADLOCK "." CR>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-HELMET"
;"---------------------------------------------------------------------------"
<OBJECT TH-HELMET
(LOC CH-CELL-GUARD)
(DESC "helmet")
(FLAGS FL-NO-LIST FL-TAKEABLE FL-WORN)
(SYNONYM HELMET DENT)
(ADJECTIVE DENTED)
(OWNER CH-CELL-GUARD)
(ACTION RT-TH-HELMET)
>
; "TH-HELMET flags:"
; " FL-BROKEN = Helmet is dented."
<ROUTINE RT-TH-HELMET ("OPT" (CONTEXT <>) "AUX" L)
<COND
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<COND
(<VERB? PUT-IN EMPTY>
<RT-WASTE-OF-TIME-MSG>
)
>
)
(<AND <VERB? ATTACK BREAK>
<FSET? ,TH-HELMET ,FL-WORN>
<SET L <LOC ,TH-HELMET>>
<FSET? .L ,FL-PERSON>
>
<PERFORM ,PRSA .L ,PRSI>
)
(<VERB? WEAR>
<TELL "The helmet is much too big for you." CR>
)
(<VERB? EXAMINE>
<TELL "It's a rather large helmet">
<COND
(<FSET? ,TH-HELMET ,FL-BROKEN>
<TELL ", with a dent in it">
)
>