forked from historicalsource/arthur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sword.zil
1291 lines (1245 loc) · 29 KB
/
sword.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 : SWORD.ZIL"
; "auth : $Author: DEB $"
; "date : $Date: 12 May 1989 0:42:46 $"
; "revs : $Revision: 1.101 $"
; "vers : 1.0"
;"---------------------------------------------------------------------------"
; "Sword/Ford/Black knight"
; "Copyright (C) 1989 Infocom, Inc. All rights reserved."
;"***************************************************************************"
<INCLUDE "PDEFS"> ; "Because PARSE-ACTION used in this file."
;"---------------------------------------------------------------------------"
; "TH-SWORD"
;"---------------------------------------------------------------------------"
<OBJECT TH-SWORD
(LOC TH-OAK-HOLE)
(DESC "sword")
(FLAGS FL-KNIFE FL-LOCKED FL-TAKEABLE FL-WEAPON)
(SYNONYM SWORD)
(SCORE <ORB <LSH 2 ,K-WISD-SHIFT> <LSH 1 ,K-QUEST-SHIFT>>)
(SIZE 10)
(GENERIC RT-GN-SWORD)
(ACTION RT-TH-SWORD)
>
; "TH-SWORD flags:"
; " FL-LOCKED - Slave has not told player about sword"
<ROUTINE RT-TH-SWORD ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<RFALSE>
)
(<VERB? EXAMINE>
<COND
(<IN? ,TH-SWORD ,TH-BOAR>
<FSET ,TH-SWORD ,FL-SEEN>
<FSET ,TH-BOAR ,FL-SEEN>
<TELL The ,TH-SWORD " is impaled in" the ,TH-BOAR "." CR>
)
>
)
>
>
<NEW-ADD-WORD "SWORDS" NOUN <VOC "SWORD"> ,PLURAL-FLAG>
<ROUTINE RT-GN-SWORD (TBL FINDER)
<COND
(<EQUAL? <PARSE-ACTION ,PARSE-RESULT> ,V?ASK-ABOUT>
<COND
(<EQUAL? <PARSE-OBJ1 ,PARSE-RESULT> ,CH-PRISONER>
<RETURN ,TH-SWORD>
)
(<EQUAL? <PARSE-OBJ1 ,PARSE-RESULT> ,CH-LOT>
<RETURN ,TH-LOT-SWORD>
)
(T
<RETURN ,TH-EXCALIBUR>
)
>
)
(<RT-META-IN? ,TH-STONE ,HERE>
<RETURN ,TH-EXCALIBUR>
)
(<INTBL? ,P-IT-OBJECT
<REST-TO-SLOT .TBL FIND-RES-OBJ1>
<FIND-RES-COUNT .TBL>
>
<RETURN ,P-IT-OBJECT>
)
(T
<RETURN ,TH-SWORD>
)
>
>
;"---------------------------------------------------------------------------"
; "RM-FORD"
;"---------------------------------------------------------------------------"
<ROOM RM-FORD
(LOC ROOMS)
(DESC "ford")
(FLAGS FL-LIGHTED FL-WATER)
(SYNONYM FORD)
(EAST PER RT-EXIT-FORD)
(WEST PER RT-EXIT-FORD)
(NORTH PER RT-RAPIDS-MSG)
(SOUTH PER RT-ENTER-RIVER)
(OUT PER RT-EXIT-FORD)
(UP PER RT-FLY-UP)
(GLOBAL LG-RIVER)
(ACTION RT-RM-FORD)
>
<ROUTINE RT-RM-FORD ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<COND
(<NOT <MC-CONTEXT? ,M-LOOK>>
<TELL "You enter the ford. ">
)
>
<TELL "You are" standing " in the middle of the river.">
<COND
(<MC-FORM? ,K-FORM-EEL ,K-FORM-TURTLE>
<TELL
"||Light filters down from the surface above, and strong rapids block
passage to the north.|"
>
)
(T
<TELL
" Looking south, you see that the land along the west bank is rich and
lush, while the land along the east bank is wasted and barren.|"
>
)
>
<RFALSE>
)
(<MC-CONTEXT? ,M-BEG>
<COND
(<AND <VERB? WALK>
<IN? ,CH-KRAKEN ,RM-FORD>
<FSET? ,CH-KRAKEN ,FL-LOCKED>
>
<TELL ,K-KRAKEN-HOLD-MSG>
)
>
)
(<MC-CONTEXT? ,M-ENTER>
<COND
(<MC-FORM? ,K-FORM-EEL>
<SETG GL-PICTURE-NUM ,K-PIC-UNDERWATER>
)
(T
<SETG GL-PICTURE-NUM ,K-PIC-FORD>
)
>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTERED>
<FCLEAR ,TH-CRYSTAL ,FL-LOCKED>
<COND
(<IN? ,TH-BAG ,CH-PLAYER>
<PUTB <GETPT ,TH-BAG ,P?SIZE> ,K-CAPACITY ,K-CAP-MAX>
)
>
)
(.CONTEXT
<RFALSE>
)
(<OR <VERB? THROW>
<AND
<VERB? PUT PUT-IN>
<OR
<MC-HERE? ,RM-FORD>
<VERB-WORD? ,W?THROW ,W?TOSS ,W?HURL ,W?CHUCK ,W?FLING ,W?PITCH ,W?HEAVE>
>
>
>
<COND
(<AND <MC-HERE? ,RM-WEST-OF-FORD>
<FSET? ,CH-BLACK-KNIGHT ,FL-ALIVE>
>
<COND
(<IDROP>
<THIS-IS-IT ,CH-BLACK-KNIGHT>
<TELL
The ,CH-BLACK-KNIGHT " snatches" the ,PRSO " out of the air and flings it
down onto the ground with a contemptuous laugh." CR
>
)
(T
<RTRUE>
)
>
)
(<MC-HERE? ,RM-EAST-OF-FORD ,RM-WEST-OF-FORD>
<COND
(<IDROP>
<COND
(<MC-PRSO? ,TH-APPLE>
<MOVE ,PRSO ,RM-SHALLOWS>
<TELL
The ,PRSO " quickly" verb ,PRSO "float" " down the river and out of sight." CR
>
)
(T
<RT-THROW-INTO-ROOM-MSG ,PRSO ,RM-FORD>
)
>
)
(T
<RTRUE>
)
>
)
(T
<NOT-HERE ,PRSI> ; "not close enough"
)
>
)
>
>
<ROUTINE RT-RAPIDS-MSG ("OPT" (QUIET <>))
<COND
(<NOT .QUIET>
<TELL "The current is too strong to go upriver.|">
)
>
<RFALSE>
>
<ROUTINE RT-EXIT-FORD ("OPT" (QUIET <>))
<COND
(.QUIET
<COND
(<MC-FORM? ,K-FORM-EEL>
<RFALSE>
)
(<EQUAL? ,P-WALK-DIR ,P?WEST>
<RETURN ,RM-WEST-OF-FORD>
)
(<EQUAL? ,P-WALK-DIR ,P?EAST>
<RETURN ,RM-EAST-OF-FORD>
)
>
)
(<MC-FORM? ,K-FORM-EEL>
<TELL "Eels can't survive out of water.|">
<RFALSE>
)
(<EQUAL? ,P-WALK-DIR ,P?OUT>
<V-WALK-AROUND>
<RFALSE>
)
(<EQUAL? ,P-WALK-DIR ,P?WEST>
<RETURN ,RM-WEST-OF-FORD>
)
(<EQUAL? ,P-WALK-DIR ,P?EAST>
<COND
(<AND <IN? ,TH-BRACELET ,CH-PLAYER>
<FSET? ,TH-BRACELET ,FL-WORN>
<NOT <MC-FORM? ,K-FORM-ARTHUR>>
>
<TELL
"As you climb out of" ,K-SHAPECHANGE-MSG " As your neck begins to expand to
it's normal size," the ,TH-BRACELET " begins to throttle you. You stagger
back into the water and quickly revert to your" formtype " form.|"
>
<RFALSE>
)
(T
<COND
(<NOT <MC-FORM? ,K-FORM-ARTHUR>>
<SETG GL-PLAYER-FORM ,K-FORM-ARTHUR>
<TELL "As you climb out of" ,K-SHAPECHANGE-MSG CR CR>
)
>
<RETURN ,RM-EAST-OF-FORD>
)
>
)
>
>
<ROUTINE RT-ENTER-RIVER ("OPT" (QUIET <>))
<COND
(<MC-FORM? ,K-FORM-EEL ,K-FORM-TURTLE>
<RETURN ,RM-RIVER-1>
)
(T
<COND
(<NOT .QUIET>
<TELL ,K-WOULD-DROWN-MSG>
)
>
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "RM-WEST-OF-FORD"
;"---------------------------------------------------------------------------"
<ROOM RM-WEST-OF-FORD
(LOC ROOMS)
(DESC "west of ford")
(FLAGS FL-LIGHTED)
(EAST PER RT-PASS-BLACK-KNIGHT)
(WEST TO RM-BOG)
(UP PER RT-FLY-UP)
(GLOBAL LG-RIVER RM-FORD RM-BOG)
(ACTION RT-RM-WEST-OF-FORD)
(THINGS <> SIGN RT-PS-SIGN)
>
<ROUTINE RT-RM-WEST-OF-FORD ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL "You are" standing " at the edge of a river.">
)
(T
<COND
(<EQUAL? ,OHERE ,RM-FORD>
<TELL "You climb up out of the river.">
)
(<EQUAL? ,OHERE ,RM-BOG>
<TELL
"You emerge safely from the bog, and come to a ford in a river."
>
)
(T
<TELL "You land next to a ford in a river.">
)
>
)
>
<TELL " To the west ">
<COND
(<EQUAL? ,OHERE ,RM-BOG>
<TELL "lies the path back into the">
)
(T
<TELL "is a sign that marks the edge of a treacherous peat">
)
>
<TELL " bog.">
<COND
(<FSET? ,CH-BLACK-KNIGHT ,FL-ALIVE>
<FSET ,CH-BLACK-KNIGHT ,FL-SEEN>
<FSET ,TH-BLACK-ARMOUR ,FL-SEEN>
<TELL
" Passage across the ford to the east is blocked by a fearsome looking
knight in black armour."
>
)
>
<CRLF>
<RFALSE>
)
(<MC-CONTEXT? ,M-BEG>
<SETG GL-BLACK-FIGHT <>>
)
(<MC-CONTEXT? ,M-END>
<COND
(<VERB? TRANSFORM>
<COND
(<NOT <MC-FORM? ,GL-OLD-FORM ,K-FORM-ARTHUR>>
<COND
(<FSET? ,CH-BLACK-KNIGHT ,FL-ALIVE>
<RT-RESET-BLACK-FIGHT>
<TELL
CR The ,CH-BLACK-KNIGHT " looks at you and sneers maliciously, \"How well it
suits you, creature of Merlin, to crawl into the skin of a lowly animal. You
are so far beneath contempt that I shall not even bother to kill you.\"" CR
>
)
>
)
>
)
>
)
(<MC-CONTEXT? ,M-ENTER>
<COND
(<FSET? ,CH-BLACK-KNIGHT ,FL-ALIVE>
<SETG GL-PICTURE-NUM ,K-PIC-BLACK-KNIGHT>
)
(T
<SETG GL-PICTURE-NUM ,K-PIC-EDGE-OF-BOG>
)
>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTERED>
<SETG GL-BOG-START ,HERE>
<SETG GL-BOG-POS ,K-BOG-NUM>
<COND
(<EQUAL? ,OHERE ,RM-BOG>
<COND
(<AND <FSET? ,RM-BOG ,FL-BROKEN>
<FSET? ,RM-BOG ,FL-LOCKED>
>
<FCLEAR ,RM-BOG ,FL-BROKEN>
<FCLEAR ,RM-BOG ,FL-LOCKED>
<RT-SCORE-MSG 0 2 3 2>
)
>
)
(<EQUAL? ,OHERE ,RM-FORD>
<COND
(<FSET? ,CH-BLACK-KNIGHT ,FL-ALIVE>
<THIS-IS-IT ,CH-BLACK-KNIGHT>
<TELL "|The Black Knight whirls around to face you." CR>
)
>
)
>
)
(<MC-CONTEXT? ,M-EXIT>
<COND
(<FSET? ,CH-BLACK-KNIGHT ,FL-ALIVE>
<RT-RESET-BLACK-FIGHT>
<TELL
The ,CH-BLACK-KNIGHT " calls after you as you leave, \"Coward! Go on - save
your precious skin. I expected nothing less from one of Merlin's whelps.\"||"
>
<RFALSE>
)
>
)
(.CONTEXT
<RFALSE>
)
>
>
<ROUTINE RT-PASS-BLACK-KNIGHT ("OPT" (QUIET <>))
<COND
(.QUIET
<RETURN ,RM-FORD>
)
(<MC-FORM? ,K-FORM-BADGER ,K-FORM-OWL ,K-FORM-SALAMANDER>
<TELL ,K-WOULD-DROWN-MSG>
<RFALSE>
)
(<OR <NOT <FSET? ,CH-BLACK-KNIGHT ,FL-ALIVE>>
<NOT <MC-FORM? ,K-FORM-ARTHUR>>
>
<RETURN ,RM-FORD>
)
(<RT-IS-QUEUED? ,RT-I-BLACK-FIGHT>
<TELL
The ,CH-BLACK-KNIGHT " blocks your path and deals you another mighty blow." CR
>
<RFALSE>
)
(T
<TELL
The ,CH-BLACK-KNIGHT " blocks your path, saying \"All who would cross this
ford must first fight with me. I am the defender of the land that lies
beyond.\"" CR
>
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "CH-BLACK-KNIGHT"
;"---------------------------------------------------------------------------"
<OBJECT CH-BLACK-KNIGHT
(LOC RM-WEST-OF-FORD)
(DESC "black knight")
(FLAGS FL-ALIVE FL-NO-DESC FL-OPEN FL-PERSON FL-SEARCH)
(SYNONYM KNIGHT MAN PERSON)
(ADJECTIVE BLACK)
(ACTION RT-CH-BLACK-KNIGHT)
>
<ROUTINE RT-CH-BLACK-KNIGHT ("OPT" (CONTEXT <>) (ART <>) (CAP? <>) "AUX" N)
<COND
(<AND <MC-CONTEXT? ,M-WINNER <>>
<VERB? HELLO GOODBYE THANK>
>
<COND
(<VERB? HELLO>
<TELL
"\"I offer no greetings to those who must die. All who would cross this ford
must first fight with me. I am the defender of the land that lies beyond.\"" CR
>
)
(<VERB? GOODBYE>
<TELL
"\"You do well to run. At least you escape with your life, if not your honour.\"" CR
>
)
(<VERB? THANK>
<TELL
"\"Keep your thanks to yourself. I have no use for your chivalrous
claptrap!\"" CR
>
<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>
)
(T
<TELL
"\"I will not waste my time in idle chatter. Prepare to defend thyself.\"" CR
>
)
>
)
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<RFALSE>
)
(<AND <VERB? TELL>
,P-CONT
>
; "Message and RFATAL if don't want knight to become winner"
<RFALSE>
)
(<VERB? ASK-ABOUT>
<COND
(<MC-PRSI? ,CH-BLACK-KNIGHT>
<TELL "\"I am the guardian of the land that lies beyond.\"" CR>
)
(<MC-PRSI? ,CH-DEMON ,TH-MASTER>
<TELL "\"He is my master. I do his bidding.\"" CR>
)
(<MC-PRSI? ,TH-BLACK-MEDALLION>
<TELL "\"It was given to me by my master.\"" CR>
)
(<MC-PRSI? ,CH-MERLIN>
<TELL
"\"An overrated parlour magician. He couldn't make a black cat disappear in a
dark room at midnight.\"" CR
>
)
(<MC-PRSI? ,CH-LOT>
<TELL "\"Not a bad fellow, once you get to know him.\"" CR>
)
(<MC-PRSI? ,TH-EXCALIBUR>
<TELL
"\"Bring it, if you can. I'm not afraid of it.\"" CR
>
)
(T
<TELL
"\"I will not waste my time in idle chatter. Prepare to defend thyself.\"" CR
>
)
>
)
(<VERB? ATTACK CUT>
<RT-ATTACK-KNIGHT ,CH-BLACK-KNIGHT>
)
(<VERB? EXAMINE>
<TELL "The knight towers above you">
<COND
(<IN? ,TH-BLACK-SWORD ,CH-BLACK-KNIGHT>
<TELL ", brandishing a huge sword">
)
>
<TELL
". He is encased from head to foot in jet-black armour, and from his neck
hangs a sinister medallion that glows a dull red." CR
>
)
(<VERB? CHALLENGE>
<THIS-IS-IT ,CH-BLACK-KNIGHT>
<TELL
"The Black Knight snorts in derision and says, \"Words - mere words. If you
want to fight, boy, then let's fight.\"" CR
>
)
>
>
<CONSTANT K-BLOOD-NUM <TABLE (BYTE LENGTH) 1 2 3>>
<CONSTANT K-FIGHT-NUM <TABLE (BYTE LENGTH) 1 2 3>>
<GLOBAL GL-BLACK-FIGHT <> <> BYTE>
<ROUTINE RT-ATTACK-KNIGHT ("OPT" (TARGET ,CH-BLACK-KNIGHT) "AUX" I M N PTR)
<RT-DEQUEUE ,RT-I-RESET-BLOOD>
<COND
(<NOT <MC-FORM? ,K-FORM-ARTHUR>>
<TELL
The ,CH-BLACK-KNIGHT " sidesteps your attack and looks at you in surprise." CR
>
)
(<NOT <MC-PRSI? ,TH-SWORD>>
<COND
(<L? ,GL-SC-EXP 66>
<TELL
The ,CH-BLACK-KNIGHT " ignores your feeble attack and jeers, \"Until you have
a decent weapon, boy, I won't even bother to kill you.\"" CR
>
)
(<NOT <IN? ,TH-BLACK-SWORD ,CH-BLACK-KNIGHT>>
<RT-QUEUE ,RT-I-BLACK-FIGHT <+ ,GL-MOVES 1>>
<MOVE ,TH-BLACK-SWORD ,CH-BLACK-KNIGHT>
<TELL
The ,CH-BLACK-KNIGHT " dodges your feeble attack and retrieves his weapon." CR
>
)
(T
<TELL
The ,CH-BLACK-KNIGHT " nimbly avoids your feeble maneuver while launching an
attack of his own. He feints a blow to your head, and then suddenly whirls
and deals you a fatal blow across your midsection.|"
>
<RT-END-OF-GAME>
)
>
)
(<L? ,GL-SC-EXP 25>
<TELL
The ,CH-BLACK-KNIGHT " easily fends off your clumsy attack and scoffs,
\"Begone, lad. I won't even fight a boy of such inexperience.\"" CR
>
)
(<L? ,GL-SC-EXP 53>
<MOVE ,TH-SWORD ,HERE>
<TELL
"You advance towards" the ,CH-BLACK-KNIGHT ", swinging your sword wildly. He
casually blocks your attack, and then whirls his blade in a tight circle. Your
sword flies out of your hand and lands on" the ,TH-GROUND " nearby. As you
bend to pick it up," the ,CH-BLACK-KNIGHT " slaps you on your backside with
the flat of his sword and sends you sprawling on" the ,TH-GROUND
".||He laughs while you pick yourself up, and then he jeers, \"Come back when you
have learned enough to hold onto your sword in a fight, boy.\"" CR
>
)
(<L? ,GL-SC-EXP 66>
<SETG GL-BLACK-FIGHT T>
<COND
(<NOT <RT-IS-QUEUED? ,RT-I-BLACK-FIGHT>>
<RT-QUEUE ,RT-I-BLACK-FIGHT <+ ,GL-MOVES 1>>
)
>
<COND
(<EQUAL? <GETB ,K-BLOOD-NUM 0> 0>
<TELL
"You muster all your remaining strength and swing the sword, but it is not
enough. The knight avoids the blow, and then administers the coup de grace
with a quick thrust to your heart.|"
>
<RT-END-OF-GAME>
)
(<MC-PROB? 50>
<SET N <RANDOM 4>>
<COND
(<EQUAL? .N 1>
<TELL
"The knight blocks your attack with his sword and counters with a blow of his
own, which misses you by inches!" CR
>
)
(<EQUAL? .N 2>
<TELL
"You deal the knight a glancing blow. He staggers for a moment, but then
recovers." CR
>
)
(<EQUAL? .N 3>
<TELL "The two blades meet with a mighty clash." CR>
)
(T
<TELL
"You lunge at the knight, but he steps aside at the last instant." CR
>
)
>
)
(T
<SET M <RANDOM <GETB ,K-BLOOD-NUM 0>>>
<SET N <GETB ,K-BLOOD-NUM .M>>
<COND
(<EQUAL? .N 1>
<TELL
"Your swing goes wild, and its momentum pulls you sideways for an instant.
The black knight takes advantage of the opening and cuts you on the shoulder." CR
>
)
(<EQUAL? .N 2>
<TELL
"You swing the sword with all your might, but the knight deflects the force of
the blow with his sword. Then he whirls and strikes at your head! The tip of
his blade grazes your forehead, and some blood starts to trickle down into
your eyes." CR
>
)
(T
<TELL
"A valiant effort, but the knight is too quick for you. He draws blood with a
low swipe at your leg." CR
>
)
>
<SET I <GETB ,K-BLOOD-NUM 0>>
<COND
(<G? .I .M>
<SET PTR <ZREST ,K-BLOOD-NUM .M>>
<COPYT <ZREST .PTR 1> .PTR <- .I .M>>
)
>
<DEC I>
<PUTB ,K-BLOOD-NUM 0 .I>
<COND
(<ZERO? .I>
<TELL
"|You are bleeding all over and your strength is fading quickly. You realize
that the black knight is still more experienced than you, and that to continue
fighting him would mean certain death." CR
>
)
>
<RTRUE>
)
>
)
(T
<SETG GL-BLACK-FIGHT T>
<COND
(<NOT <RT-IS-QUEUED? ,RT-I-BLACK-FIGHT>>
<RT-QUEUE ,RT-I-BLACK-FIGHT <+ ,GL-MOVES 1>>
)
>
<COND
(<IN? ,TH-BLACK-SWORD ,CH-BLACK-KNIGHT>
<COND
(<EQUAL? <GETB ,K-FIGHT-NUM 0> 0>
<RT-RESET-BLACK-FIGHT>
<RT-QUEUE ,RT-I-GET-SWORD <+ ,GL-MOVES 1>>
<MOVE ,TH-BLACK-SWORD ,HERE>
<TELL
"Your blade slices through the air and knocks the knight's sword from his
grasp! It falls to the ground, and he is momentarily disarmed!" CR
>
)
(T
<SET M <RANDOM <GETB ,K-FIGHT-NUM 0>>>
<SET N <GETB ,K-FIGHT-NUM .M>>
<COND
(<EQUAL? .N 1>
<TELL
"You deal the knight a stunning blow. He tries to parry, but the sheer force
of it knocks him back a few steps." CR
>
)
(<EQUAL? .N 2>
<TELL
"You lunge at the knight's head. He raises his sword to ward off the blow,
but suddenly you drop your aim. He tries to twist aside at the last minute,
but you still pierce his armour and graze his ribs." CR
>
)
(T
<TELL
"You whirl the blade with blinding speed, missing the knight by inches!" CR
>
)
>
<SET I <GETB ,K-FIGHT-NUM 0>>
<COND
(<G? .I .M>
<SET PTR <ZREST ,K-FIGHT-NUM .M>>
<COPYT <ZREST .PTR 1> .PTR <- .I .M>>
)
>
<DEC I>
<PUTB ,K-FIGHT-NUM 0 .I>
)
>
)
(<EQUAL? .TARGET ,TH-BLACK-MEDALLION>
<MOVE ,TH-BLACK-ARMOUR ,HERE>
<FCLEAR ,TH-BLACK-ARMOUR ,FL-WORN>
<FCLEAR ,TH-BLACK-ARMOUR ,FL-NO-DESC>
<REMOVE ,CH-BLACK-KNIGHT>
<REMOVE ,TH-BLACK-SWORD>
<FCLEAR ,CH-BLACK-KNIGHT ,FL-ALIVE>
<RT-DEQUEUE ,RT-I-BLACK-FIGHT>
<RT-DEQUEUE ,RT-I-GET-SWORD>
<TELL
"You sever the knight's source of power. " The ,TH-BLACK-MEDALLION " and
the knight's sword both incandesce into a fiery red, and then
they suddenly disappear in a thunderclap and a flash of lightning. "
The ,TH-BLACK-ARMOUR " teeters for a moment. Then it crumples to"
the ,TH-GROUND ", empty." CR
>
<RT-SCORE-MSG 0 4 7 4>
<SETG GL-PICTURE-NUM ,K-PIC-EDGE-OF-BOG>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RTRUE>
)
(T
<MOVE ,TH-BLACK-SWORD ,CH-BLACK-KNIGHT>
<TELL
"With amazing agility, the knight recovers his sword in time to block
your blow." CR
>
)
>
)
>
>
<ROUTINE RT-RESET-BLACK-FIGHT ("AUX" (I 0))
<COND
(<L? ,GL-SC-EXP 53>)
(<L? ,GL-SC-EXP 66>
<RT-DEQUEUE ,RT-I-BLACK-FIGHT>
<RT-QUEUE ,RT-I-RESET-BLOOD <+ ,GL-MOVES 20>>
)
(T
<RT-DEQUEUE ,RT-I-BLACK-FIGHT>
<RT-DEQUEUE ,RT-I-GET-SWORD>
<SET I 0>
<PUTB ,K-FIGHT-NUM 0 3>
<REPEAT ()
<COND
(<IGRTR? I 3>
<RETURN>
)
(T
<PUTB ,K-FIGHT-NUM .I .I>
)
>
>
)
>
<RTRUE>
>
<ROUTINE RT-I-RESET-BLOOD ("AUX" (I 0))
<PUTB ,K-BLOOD-NUM 0 3>
<REPEAT ()
<COND
(<IGRTR? I 3>
<RETURN>
)
(T
<PUTB ,K-BLOOD-NUM .I .I>
)
>
>
<RFALSE>
>
<ROUTINE RT-I-BLACK-FIGHT ()
<COND
(<IN? ,TH-BLACK-SWORD ,CH-BLACK-KNIGHT>
<COND
(<OR <NOT ,GL-BLACK-FIGHT>
<FSET? ,CH-PLAYER ,FL-ASLEEP>
>
<COND
(<OR <NOT <FSET? ,CH-PLAYER ,FL-ASLEEP>>
<G=? ,GL-SC-EXP 66>
>
<TELL
CR The ,CH-BLACK-KNIGHT " takes advantage of your inactivity to "
>
)
>
<COND
(<L? ,GL-SC-EXP 66>
<COND
(<NOT <FSET? ,CH-PLAYER ,FL-ASLEEP>>
<RT-QUEUE ,RT-I-RESET-BLOOD <+ ,GL-MOVES 20>>
<TELL "catch his breath." CR>
)
>
)
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<TELL "kill you.|">
<RT-END-OF-GAME>
)
(T
<TELL
"launch a suprise attack. He feints a blow to your head, and then suddenly
whirls and deals you a fatal blow across your midsection.|"
>
<RT-END-OF-GAME>
)
>
)
(T
<SETG GL-BLACK-FIGHT <>>
<RT-QUEUE ,RT-I-BLACK-FIGHT <+ ,GL-MOVES 1>>
)
>
)
>
>
<ROUTINE RT-I-GET-SWORD ()
<COND
(<NOT <IN? ,TH-BLACK-SWORD ,CH-BLACK-KNIGHT>>
<RT-QUEUE ,RT-I-BLACK-FIGHT <+ ,GL-MOVES 1>>
<MOVE ,TH-BLACK-SWORD ,CH-BLACK-KNIGHT>
<TELL CR The ,CH-BLACK-KNIGHT " picks up his sword." CR>
)
>
>
;<ROUTINE RT-GN-KNIGHT (TBL FINDER "AUX" PTR N (OBJ <>))
<SET PTR <REST-TO-SLOT .TBL FIND-RES-OBJ1>>
<SET N <FIND-RES-COUNT .TBL>>
<COND
(<INTBL? ,P-HIM-OBJECT .PTR .N>
<SET OBJ ,P-HIM-OBJECT>
)
(T
<REPEAT ((I .N) O)
<COND
(<DLESS? I 0>
<RETURN>
)
(<FSET? <SET O <ZGET .PTR 0>> ,FL-SEEN>
<COND
(.OBJ
<SET OBJ <>>
<RETURN>
)
(T
<SET OBJ .O>
)
>
)
>
<SET PTR <ZREST .PTR 2>>
>
)
>
<COND
(.OBJ
<TELL "[" The .OBJ "]" CR>
)
>
<RETURN .OBJ>
>
;"---------------------------------------------------------------------------"
; "TH-BLACK-ARMOUR"
;"---------------------------------------------------------------------------"
<OBJECT TH-BLACK-ARMOUR
(LOC CH-BLACK-KNIGHT)
(DESC "black armour")
(FLAGS FL-CLOTHING FL-COLLECTIVE FL-NO-DESC FL-PLURAL FL-TRY-TAKE FL-WORN)
(SYNONYM ARMOUR ARMOR)
(ADJECTIVE BLACK)
(OWNER CH-BLACK-KNIGHT)
(GENERIC RT-GN-ARMOUR)
(ACTION RT-TH-BLACK-ARMOUR)
>
<ROUTINE RT-TH-BLACK-ARMOUR ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<RFALSE>
)