-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathgood.zil
1509 lines (1383 loc) · 44.4 KB
/
good.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
"GOOD for
BORDER ZONE
(c) Copyright 1987 Infocom, Inc. All Rights Reserved."
;"Scenario-related routines"
<ROUTINE I-120-SECONDS ()
<COND (<NOT <IN? ,RIPPED-CLOTHES ,WOUNDED-LEFT-ARM>>
<COND (<L? <SETG HEALTH <- ,HEALTH 1>> 1>
<JIGS-UP
"You pass out from loss of blood.">)
(T
<HLIGHT ,H-BOLD>
<TELL CR <GET ,HEALTH-TBL </ ,HEALTH 2>>>
<HLIGHT ,H-NORMAL>
<CRLF>)>)>>
<GLOBAL 30-TIMER 0>
<ROUTINE I-30-SECONDS ("AUX" TMP HF (OC <LOC ,CAR>))
<SETG 30-TIMER <+ ,30-TIMER 1>>
<COND (<ZERO? <MOD ,30-TIMER 4>>
<I-120-SECONDS>)>
<COND (<L? <SETG WOOD-TIMER <- ,WOOD-TIMER 1>> 0>
<RUN-WOOD-SEQUENCE>)
(<NOT <ZERO? ,CAR-SEQUENCE>>
<RUN-CAR-SEQUENCE>)
(,CAR-ON-ROAD?
<SET TMP <GET ,RESTED-ROAD-TBL 0>>
<COND (<ZERO? .TMP> <REMOVE ,CAR>)
(T <MOVE ,CAR .TMP>)>
<SETG RESTED-ROAD-TBL <REST ,RESTED-ROAD-TBL 2>>
<COND (<ZERO? .TMP>
<COND (<EQUAL? ,HERE ,B8 ,C8 ,D8>
<BOLDTELL
"You watch as the automobile speeds into the tunnel and disappears.">)>
<SETG CAR-ON-ROAD? <>>)
(<EQUAL? ,HERE .TMP>
<HLIGHT ,H-BOLD>
<CRLF>
<CAR-NEARLY-HITS>
<RTRUE>)
(<AND <EQUAL? .TMP ,ROAD-END> <NOT ,SEQUENCE-RUN?>>
<SETG SEQUENCE-RUN? T>
<SETG CAR-SEQUENCE 1>
<RUN-CAR-SEQUENCE>)
(<EQUAL? .OC ,ROOMS> T)
(<AND <EQUAL? .TMP ,D6>
,SEQUENCE-RUN?
<EQUAL? ,HERE ,NORTH-HUT ,C5>>
<BOLDTELL
"You watch as the car makes a three-point turn, then heads back down the
road to the south.">)
(T
<GONE-TO-THE-DOGS? <HOW-FAR .OC ,HERE T>
<HOW-FAR .TMP ,HERE T>
,CAR>)>)>>
<GLOBAL HEALTH 10>
<GLOBAL WARMTH 10>
<GLOBAL BEEN-AT-HUT? <>>
<GLOBAL CUT-VIGILANCE <>>
<ROUTINE GONE-TO-THE-DOGS? (DL NDL "OPTIONAL" (BOGEY ,DOGS) (BMOVE T)
"AUX" (N <>) (S <>) (E <>) (W <>)
T1 T2 (F <>))
<COND (.BMOVE <HLIGHT ,H-BOLD>)>
<COND (<G? <SET T1 <GETP ,HERE ,P?NS>>
<SET T2 <GETP <LOC .BOGEY> ,P?NS>>>
<SET N T>)
(<L? .T1 .T2>
<SET S T>)>
<COND (<G? <SET T1 <GETP ,HERE ,P?EW>>
<SET T2 <GETP <LOC .BOGEY> ,P?EW>>>
<SET W T>)
(<L? .T1 .T2>
<SET E T>)>
<COND (<G? .DL 3> ;"Weren't nearby"
<COND (<L? .NDL 4> ;"Are now"
<CRLF>
<TELL "You can hear " A .BOGEY " off to the ">
<FSET .BOGEY ,PENBIT>
<SET F T>)
(T
<COND (.BMOVE <HLIGHT ,H-NORMAL>)>
<RTRUE>)>)
(<OR <L? .NDL .DL> <ZERO? .NDL>> ;"Closer"
<COND (<EQUAL? .NDL 2>
<CRLF>
<COND (<EQUAL? .BOGEY ,DOGS>
<TELL
"The sound of barking dogs echoes into the night. They">
<COND (<FSET? .BOGEY ,PENBIT>
<COND (<NOT .BMOVE> <TELL " are">)
(T <TELL "'ve moved">)>
<TELL " closer now, perhaps not">)
(T
<FSET .BOGEY ,PENBIT>
<TELL " can't be">)>)
(<FSET? ,HERE ,ROADBIT>
<COND (<FSET? .BOGEY ,PENBIT>
<TELL "The">)
(T
<FSET .BOGEY ,PENBIT>
<TELL "An">)>
<TELL
" automobile comes into view, moving slowly; it's no">)
(<NOT <FSET? .BOGEY ,PENBIT>>
<FSET .BOGEY ,PENBIT>
<TELL
"You can hear an automobile engine close by; it can't be">)
(T
<TELL
"The automobile's engine sounds closer now; it can't be">)>
<TELL " more than a few hundred yards to the ">
<SET F T>)
(<EQUAL? .NDL 1>
<COND (<EQUAL? .BOGEY ,DOGS>
<CRLF>
<TELL
"The sound of the dogs is much louder now, and you can hear the shouting
voices of the guards they accompany. They can't be more than a hundred yards
to the ">
<SET F T>)
(<FSET? ,HERE ,ROADBIT>
<COND (<EQUAL? ,HERE
<GET ,RESTED-ROAD-TBL 0>>
<TELL CR
"The automobile is bearing down on you now, though it doesn't seem as if
the driver has taken notice. He's no more than a hundred yards away.">)
(T
<TELL CR
"The automobile is only a hundred yards from you, but it is moving away.
It will soon be out of sight.">)>)
(T
<TELL CR
"The automobile is much closer now, perhaps no more than one hundred
yards to the ">
<SET F T>)>)
(T
<TELL CR
"The sound of the dogs seems to come from all around you. They can't be
more than fifty yards away.">)>)
(<EQUAL? .NDL .DL>
<COND (<EQUAL? .BOGEY ,DOGS>
<COND (<AND .BMOVE
<EQUAL? <GETP <SET T1 <LOC ,DOGS>> ,P?EW>
4>
<EQUAL? <GETP .T1 ,P?NS> 5>>
<TELL CR
"The dogs sound just a little bit closer and they still">)
(.BMOVE
<TELL CR
"The dogs are no closer, but now they">)
(T
<TELL
"You've moved such that the dogs now">)>
<TELL " seem to be off to the ">)
(T
<TELL CR
"From the sound of it, the car is now off to the ">)>
<SET F T>)
(<G? .NDL 3>
<COND (.BMOVE <CRLF>)>
<COND (<EQUAL? .BOGEY ,DOGS>
<TELL
"To your relief, the sound of the dogs has faded into the distance.">)
(T
<TELL
"The sounds of the automobile fade into the night air.">)>)
(T
<COND (<EQUAL? .BOGEY ,DOGS>
<COND (.BMOVE
<TELL CR
"The sounds of the dogs seem">)
(T
<TELL
"You've moved such that the barking seems">)>
<TELL " farther away and to the ">)
(T
<TELL CR
"The automobile sounds farther away and to the ">)>
<SET F T>)>
<COND (.F
<COND (.N <TELL "north">)
(.S <TELL "south">)>
<COND (.E <TELL "east">)
(.W <TELL "west">)>
<TELL ".">
<COND (<AND <EQUAL? .BOGEY ,DOGS> ,LOST-SCENT>
<TELL
" The dogs' barking is more shrill now than when you first heard it.">)>)>
<COND (.BMOVE <HLIGHT ,H-NORMAL> <CRLF>)
(T
<CRLF>
<CRLF>)>
<RTRUE>>
<GLOBAL HEALTH-TBL
<PTABLE "You are on your last legs now, and have trouble moving around. Even the most simple of actions is complicated, and you realize that your mission will soon end in failure. If you're lucky, maybe they'll find you before you die here."
"You've gotten to the point where you must stop and rest briefly after every few dozen steps. Unless you stop the blood loss soon, you will collapse."
"The weakness has taken a toll on your physical abilities; movement is slower and less sure."
"You are definitely weaker now, and it is starting to affect you significantly."
"You're starting to feel a little weak and confused; it occurs to you that you won't last very long unless you stop the bleeding from your wounded left arm."
>>
<OBJECT GLOBAL-TOURNIQUET
(LOC GLOBAL-OBJECTS)
(DESC "tourniquet")
(SYNONYM TOURNIQUET)
(SCENARIO 2)
(ACTION GLOBAL-TOURNIQUET-F)>
<ROUTINE GLOBAL-TOURNIQUET-F ()
<COND (<AND <VERB? MAKE> ,PRSI <NOT ,CLOTHES-RIPPED>>
<COND (<EQUAL? ,PRSI ,CLOTHES>
<PERFORM ,V?RIP ,CLOTHES>
<RTRUE>)
(T
<TELL
"You won't have any luck making a tourniquet out of that." CR>)>)
(<VERB? MAKE>
<TELL
"That's easy enough to say; the question is really how you can make one." CR>)
(<VERB? FIND>
<TELL
"It's unlikely that you'll just run into one. You'd do better to make
one." CR>)>>
<OBJECT RIPPED-CLOTHES
(DESC "piece of ripped fabric")
(SYNONYM FABRIC TOURNIQUET PIECE RAG SCRAP)
(ADJECTIVE RIPPED TORN)
(FLAGS TAKEBIT)
(SCENARIO 2)
(ACTION RIPPED-CLOTHES-F)>
<ROUTINE RIPPED-CLOTHES-F ()
<COND (<VERB? TIE>
<TELL
"Tying it to that won't do you any good." CR>)
(<VERB? MAKE>
<TELL
"You've already made a tourniquet, of sorts. Now you've just got to
use it to stop the bleeding." CR>)
(<AND <IN? ,RIPPED-CLOTHES ,WOUNDED-LEFT-ARM>
<VERB? TAKE TAKE-OFF UNTIE>>
<TELL
"That would only cause you to start bleeding again." CR>)
(<AND <IN? ,RIPPED-CLOTHES ,RIGHT-ARM>
<VERB? TAKE-OFF UNTIE>>
<PERFORM ,V?TAKE ,PRSO>
<RTRUE>)>>
<OBJECT BODY-PARTS
(LOC GLOBAL-OBJECTS)
(DESC "body part")
(SYNONYM LEG FOOT HEAD EYE NOSE)
(ADJECTIVE MY LEFT RIGHT)
(ACTION BODY-PARTS-F)>
<ROUTINE BODY-PARTS-F ()
<COND (<AND <VERB? PUT-ON> <EQUAL? ,PRSI ,BODY-PARTS>>
<TELL
"You couldn't hide anything there." CR>)
(T
<TELL
"There's no reason to refer to that part of your body." CR>)>>
<OBJECT LEFT-ARM
(DESC "your left arm")
(SYNONYM ARM)
(ADJECTIVE MY LEFT)
(FLAGS NDESCBIT NARTICLEBIT WORNBIT NOTHEBIT NOABIT OPENBIT
SEARCHBIT SURFACEBIT)
(ACTION ARM-F)>
<OBJECT WOUNDED-LEFT-ARM
(DESC "your left arm")
(SYNONYM ARM WOUND BLOOD)
(ADJECTIVE MY LEFT BLEEDING BLOODY INJURED HURT WOUNDED)
(FLAGS NDESCBIT NARTICLEBIT WORNBIT SEARCHBIT SURFACEBIT
NOTHEBIT NOABIT OPENBIT)
(ACTION ARM-F)>
<OBJECT RIGHT-ARM
(LOC PROTAGONIST)
(DESC "your right arm")
(SYNONYM ARM)
(ADJECTIVE MY RIGHT)
(FLAGS NDESCBIT NARTICLEBIT WORNBIT SEARCHBIT SURFACEBIT
NOTHEBIT NOABIT OPENBIT)
(ACTION ARM-F)>
<ROUTINE ARM-F ()
<COND (<AND <VERB? TIE PUT PUT-ON> <EQUAL? ,PRSO ,CLOTHES>>
<COND (<IN? ,RIPPED-CLOTHES ,WINNER>
<PERFORM ,PRSA ,RIPPED-CLOTHES ,PRSI>
<RTRUE>)>
<TELL
"With " THE ,PRSO " intact, it's hard to see how you can tie it around
your arm." CR>)
(<AND <VERB? TIE PUT PUT-ON>
<EQUAL? ,PRSO ,RIPPED-CLOTHES>
<NOT <IN? ,PRSO ,PRSI>>>
<MOVE ,PRSO ,PRSI>
<TELL
"You make a tourniquet of the torn piece of clothing and put it over ">
<COND (<EQUAL? ,PRSI ,WOUNDED-LEFT-ARM>
<TELL "your bleeding left arm.">)
(T
<TELL THE ,PRSI ".">)>
<COND (<EQUAL? ,PRSI ,WOUNDED-LEFT-ARM>
<TELL " Blood oozes from the wound into the cloth,
but the major bleeding appears to be stopped.">)>
<CRLF>)
(<VERB? TIE PUT-ON>
<TELL
"What a strange thing to want to do!" CR>)
(<AND <VERB? EXAMINE LOOK-INSIDE>
<EQUAL? ,PRSO ,WOUNDED-LEFT-ARM>>
<COND (<IN? ,RIPPED-CLOTHES ,WOUNDED-LEFT-ARM>
<TELL
"It hurts like hell, and blood oozes from around the tourniquet, but
it's not bleeding badly." CR>)
(T
<TELL
"It looks pretty bad. The bullet has apparently damaged an artery in your
upper arm, and the bleeding is continuous." CR>)>)
(<AND <VERB? OFF OFF-2>
<EQUAL? ,PRSO ,WOUNDED-LEFT-ARM>>
<TELL
"That appears to be your problem." CR>)
(<VERB? EXAMINE LOOK-INSIDE>
<TELL
"There's nothing wrong with it">
<COND (<IN? ,RIPPED-CLOTHES ,PRSO>
<TELL ", so it's something of a mystery why you've
got a tourniquet around it">)>
<TELL ,PERIOD-CR>)
(<AND <VERB? HOLD>
<EQUAL? ,PRSO ,WOUNDED-LEFT-ARM>>
<TELL
"That won't stop the bleeding. You'll have to do better." CR>)
(<VERB? REMOVE TAKE-OFF>
<TELL
"Wishing won't make it so." CR>)>>
<OBJECT CLOTHES
(LOC PROTAGONIST)
(DESC "your everyday clothes")
(SYNONYM CLOTHES SOCKS SHIRT PANTS CLOTHING)
(ADJECTIVE MY EVERYDAY)
(FLAGS NARTICLEBIT WEARBIT WORNBIT NOTHEBIT NOABIT)
(ACTION CLOTHES-F)>
<GLOBAL CLOTHES-RIPPED <>>
<ROUTINE CLOTHES-F ()
<COND (<VERB? TAKE-OFF>
<TELL
"It is hardly appropriate, forgetting even the weather." CR>)
(<VERB? LOOK-INSIDE>
<TELL
"There's nothing in your clothes that can help you." CR>)
(<VERB? EXAMINE>
<TELL
"Your clothes are ordinary businessman fare">
<COND (,CLOTHES-RIPPED
<TELL
", with the exception of the large tear you created in making your
tourniquet">)>
<TELL ,PERIOD-CR>)
(<VERB? RIP>
<COND (,CLOTHES-RIPPED
<TELL
"You've done enough damage to your wardrobe already." CR>)
(T
<TELL
"You rip a piece of " D ,PRSO " and now hold a scrap of it in your hand." CR>
<MOVE ,RIPPED-CLOTHES ,WINNER>
<THIS-IS-IT ,RIPPED-CLOTHES>
<SETG CLOTHES-RIPPED T>)>)>>
<ROUTINE I-200-SECONDS ()
<COND (<L? ,CLOCK-TIME 401> <RTRUE>)>
<COND (<AND <NOT <FSET? ,HERE ,HUTBIT>>
<OR <NOT <IN? ,PARKA ,PROTAGONIST>>
<NOT <FSET? ,PARKA ,WORNBIT>>>>
<COND (<L? <SETG WARMTH <- ,WARMTH 1>> 1>
<CRLF>
<JIGS-UP
"Finally, you pass out from the cold, and you are fortunate enough not to
have frozen to death before the border patrol finds you.">)
(T
<HLIGHT ,H-BOLD>
<TELL CR <GET ,WARMTH-TBL </ ,WARMTH 2>>>
<COND (<AND <NOT ,BEEN-AT-HUT?>
<NOT <EQUAL? ,HERE ,INSIDE-SHED>>>
<TELL
" You look up at the sky and notice the smoke rising into
the sky to the ">
<TELL-DIRECTION ,HERE ,D5>
<TELL ".
Perhaps where there's smoke there will be warmth.">)>
<HLIGHT ,H-NORMAL>
<CRLF>)>)
(<L? ,WARMTH 9>
<SETG WARMTH <+ ,WARMTH 2>>
<BOLDTELL "You're feeling a lot warmer now.">)>>
<GLOBAL WARMTH-TBL
<PTABLE "You're shaking uncontrollably from the cold. It won't be long before you are competely incapacitated."
"You're shivering badly. If you don't find some warmth soon, it's hard to see how you can go on."
"Your teeth start to chatter from the cold; you are clearly slowing down, both physically and mentally."
"You've got quite a chill; you must move now to keep warm, but even this is not enough."
"In your confusion, you've all but forgotten how cold it is outside.">>
;"Guards, towers, etc."
<OBJECT WATCHING-OBJECT
(DESC "watching")
(LOC GLOBAL-OBJECTS)
(SYNONYM WATCHING)
(ACTION WATCHING-OBJECT-F)>
<ROUTINE WATCHING-OBJECT-F
()
<COND (<VERB? OFF-2 ON-2> <RFALSE>) (T <TELL "Huh?" CR>)>>
<OBJECT TIMING-OBJECT
(DESC "chronograph")
(SYNONYM WATCH TIMER TIMING CLOCK TIME CHRONOGRAPH STOPWATCH
CHRONOMETER)
(FLAGS WORNBIT TAKEBIT WEARBIT READBIT)
(SCENARIO 2)
(ACTION TIMING-OBJECT-F)>
<ROUTINE TIMING-OBJECT-F ("AUX" TMP)
<COND (<VERB? SET>
<TELL
"You can only do three things to the timer: reset it, turn it on,
and turn it off." CR>)
(<VERB? ON>
<SETG CHRONOGRAPH-ON T>
<SETG CLOCK-MOVE 0>
<TELL "The " D ,PRSO " is on." CR>)
(<VERB? OFF>
<SETG CHRONOGRAPH-ON <>>
<TELL "The " D ,PRSO " is off." CR>)
(<VERB? DROP>
<TELL "Not a good idea; you'll probably need it." CR>)
(<VERB? RESET>
<SETG CHRONOGRAPH-TIME 0>
<TELL "The " D ,PRSO " is now reset." CR>
<SETG CLOCK-MOVE 0>
<REDISPLAY-CHRONOGRAPH>
<RTRUE>)
(<VERB? READ>
<TELL
"The time appears on your status line." CR>)
(<VERB? EXAMINE>
<TELL
"The watch is a precision Swiss instrument, incorporating both a digital
clock and a one-hour timer." CR>)>>
<ROUTINE REDISPLAY-CHRONOGRAPH ("AUX" TMP)
<SET TMP ,CHRONOGRAPH-ON>
<SETG CHRONOGRAPH-ON T>
<UPDATE-CHRONOGRAPH 0 T>
<SETG CHRONOGRAPH-ON .TMP>>
<OBJECT SEARCHLIGHTS
(DESC "searchlight")
(LOC LOCAL-GLOBALS)
(SYNONYM SEARCHLIGHT LIGHT LIGHTS)
(ACTION SEARCHLIGHTS-F)>
<ROUTINE SEARCHLIGHTS-F ()
<COND (<VERB? EXAMINE EXAMINE-THROUGH>
<TELL
"The three searchlights are rotating clockwise. The first and third
are moving at the same slow pace, and the middle one is moving quite
a bit faster. At this moment, the ">
<SL-TELL <>>
<COND (<NOT ,SL-WATCH>
<TELL
" Since the lights are always in motion, it might be best to WATCH them.">)>
<CRLF>
<RTRUE>)
(<VERB? WATCH>
<SETG CHRONOGRAPH-ON T>
<COND (,SL-WATCH <TELL "You already are." CR> <RTRUE>)>
<COND (,G-WATCH
<PERFORM ,V?OFF-2 ,TIMING-OBJECT ,GUARDS>)>
<SETG SL-WATCH T>
<SETG CLOCK-MOVE 4>
<SCREEN-1>
<CURSET 2 2>
<TELL "Left:">
<CURSET 2 <- </ <GETB 0 33> 2> 6>>
<TELL "Center:">
<CURSET 2 <- <GETB 0 33> 11>>
<TELL "Right:">
<SL-WATCHER>
<SCREEN-0>
<CRLF>
<PERFORM ,V?EXAMINE ,SEARCHLIGHTS>
<TELL CR
"Now that you're watching the searchlights, you'll take a moment to check
on them after everything you do until you stop watching them, or move out
of range." CR>
<RTRUE>)
(<AND <VERB? OFF-2>
<EQUAL? ,PRSO ,TIMING-OBJECT ,WATCHING-OBJECT>>
<COND (<NOT ,SL-WATCH>
<TELL "You weren't watching them." CR>
<RTRUE>)>
<SETG SL-WATCH <>>
<SETG CLOCK-MOVE 4>
<FLUSH-WATCHER>
<COND (<NOT ,SAVE-FLAG>
<TELL
"You're no longer watching the searchlights." CR>)>
<RTRUE>)>>
<ROUTINE SL-CYCLE ()
<SETG SAVE-FLAG T>
<PERFORM ,V?OFF-2 ,TIMING-OBJECT ,SEARCHLIGHTS>
<PERFORM ,V?WATCH ,SEARCHLIGHTS>
<SETG SAVE-FLAG <>>
<RTRUE>>
<ROUTINE G-CYCLE ()
<SETG SAVE-FLAG T>
<PERFORM ,V?OFF-2 ,TIMING-OBJECT ,GUARDS>
<PERFORM ,V?WATCH ,GUARDS>
<SETG SAVE-FLAG <>>
<RTRUE>>
<GLOBAL PERIOD-CR ".|
">
<GLOBAL SL-WATCH <>>
<ROUTINE SL-TELL
("OPTIONAL" (CR T))
<TELL "left light faces "
<SL-POS-STR 1>
", "
"the middle one "
<SL-POS-STR 2>
", "
"and the right one "
<SL-POS-STR 3>
".">
<COND (.CR <CRLF>)>
T>
<ROUTINE SL-POS-STR (L)
<GET ,SL-POS-STR-TBL </ <+ <SL-POS .L> 112> 225>>>
<ROUTINE SL-POS-STR-AB (L)
<GET ,SL-POS-STR-AB-TBL </ <+ <SL-POS .L> 112> 225>>>
<ROUTINE SL-POS (L) <GET <GET ,SL-TBL .L> 0>>
<GLOBAL SL-POS-STR-TBL
<PTABLE "north"
"north-northeast"
"northeast"
"east-northeast"
"east"
"east-southeast"
"southeast"
"south-southeast"
"south"
"south-southwest"
"southwest"
"west-southwest"
"west"
"west-northwest"
"northwest"
"north-northwest"
"north">>
<GLOBAL SL-POS-STR-AB-TBL
<PTABLE "N"
"NNE"
"NE"
"ENE"
"E"
"ESE"
"SE"
"SSE"
"S"
"SSW"
"SW"
"WSW"
"W"
"WNW"
"NW"
"NNW"
"N">>
<GLOBAL SL-TBL <LTABLE <TABLE 0 45> <TABLE 900 90> <TABLE 2700 45>>>
<GLOBAL NOMANS-SPEED 3>
;<GLOBAL SL-DEBUG <>>
;"Movement between the towers and no-mans land"
<ROUTINE NOMANS-MOVE ("AUX" TBL MVS (MV 1) (OFF 0) SL TMP)
<SET TBL <GETP ,HERE ,P?NOMAN>>
<SET MVS </ </ <* </ <GETP ,SHOES-WORN ,P?SPEED>
10>
100>
,WARMTH>
,HEALTH>>
;<COND (,SL-DEBUG
<TELL "[MOVE-TIME: " N .MVS "]" CR>
<TELL "[LIGHTS: ">
<SL-TELL>
<TELL "]" CR>)>
<SETG NOMANS-SPEED .MVS>
<SET MVS <* .MVS 5>>
<COND (<G? <WEIGHT ,WINNER> 50>
<TELL
"With all the weight you are carrying, you'd never make it across
without getting caught." CR>
<RFALSE>)
(<G? ,NOMANS-SPEED 6>
<TELL "You are slowed down so extensively by ">
<SLOWDOWN>
<TELL " that you turn back almost at once. You'll
never get across in this condition." CR>
<RFALSE>)>
;"First set up the tables"
<REPEAT ()
<SET SL <GET .TBL .OFF>>
<PUT .SL 2 </ <- <GET .SL 1> <SET TMP <GET .SL 0>>> .MVS>>
<PUT .SL 3 .TMP>
<COND (<G? <SET OFF <+ .OFF 1>> 2>
<RETURN>)>>
;"Now cycle through MVS moves"
<REPEAT ()
;<COND (,DEBUG
<TELL "[NOMAN: OK]" CR>
<RETURN>)>
<COND (<L? <SET MVS <- .MVS 1>> 0> <RETURN>)>
<SET OFF 0>
;<COND (,SL-DEBUG <TELL "Move #" N .MV CR>)>
<REPEAT ()
<COND (<G? .OFF 2> <RETURN>)
(T
<SET SL <GET .TBL .OFF>>
<PUT .SL
3
<SET TMP <+ <GET .SL 3> <GET .SL 2>>>>
<COND (<IN-THE-SPOTLIGHT? .TMP <+ .OFF 1>>
<COND (<L? .MVS 5> ;"Almost made it..."
<SL-CAUGHT-START>
<TELL
"You're almost there now, but in the corner of your eye, you see the light
from the " <GET ,SL-CAUGHT-TOWERS .OFF> "racing toward
you! Too late! The intense white light blinds you and piercing sirens
fill the night air!">
<JIGS-UP " ">
<RTRUE>)
(<NOT <G? </ .MVS 5>
</ ,NOMANS-SPEED 2>>>
<SL-CAUGHT-START>
<TELL
"You're past the halfway point, but wait! The light from the "
<GET ,SL-CAUGHT-TOWERS .OFF> "is heading right at you! You freeze,
and consider turning back, but it's too late. The searchlight is upon you now,
and before you can react, the night is filled with the sound of wailing
sirens.">
<JIGS-UP " ">
<RTRUE>)
(T
<SL-CAUGHT-START>
<TELL
"Well before you reach the halfway point, the light from the "
<GET ,SL-CAUGHT-TOWERS .OFF> "is bearing down on you. You decide
to turn back, and just barely manage to reach the safety of the ">
<COND (<EQUAL? ,P-WALK-DIR
,P?SOUTH>
<TELL "fence">)
(T
<TELL "forest">)>
<TELL " as
the light sweeps over you." CR>
<RFALSE>)>)>
<SET OFF <+ .OFF 1>>)>>
<TURN-SL>
<UPDATE-CLOCK 1 T ;"Force output of SL/GUARD wtacher">
<COND (,SL-WATCH
<PAUSE 2>)>
<SET MV <+ .MV 1>>>
<FSET ,HERE ,CROSSBIT>
<GET .TBL 3>>
<ROUTINE PAUSE (N)
<REPEAT ()
<COND (<L? <SET N <- .N 1>> 0>
<RETURN>)
(T
<INPUT 1 10 ,I-READ-FALSE>)>>>
<ROUTINE I-READ-FALSE () <RTRUE>>
<ROUTINE SL-CAUGHT-START ()
<TELL
"You run across the open field ">
<COND (<L? ,NOMANS-SPEED 4>
<TELL "at your best speed">)
(<EQUAL? ,NOMANS-SPEED 4>
<TELL "at a good clip, though you are hampered by ">
<SLOWDOWN>)
(<EQUAL? ,NOMANS-SPEED 5>
<TELL "at a rather slow pace, hampered as you are by ">
<SLOWDOWN>)
(<EQUAL? ,NOMANS-SPEED 6>
<TELL "slowly, badly hampered by ">
<SLOWDOWN>)
(T
<TELL "at a dreadful pace, slowed miserably by ">
<SLOWDOWN>)>
<TELL ". ">>
<ROUTINE SLOWDOWN ("OPTIONAL" (DIAGNOSE? <>) "AUX" (FLG 0))
<COND (<AND <NOT .DIAGNOSE?>
<G? <GETP ,SHOES-WORN ,P?SPEED> 30>>
<TELL "slick-surfaced shoes">
<SET FLG <+ .FLG 1>>)>
<COND (<AND <L? ,HEALTH 9> <G? .FLG 0>>
<COND (<L? ,WARMTH 9> <TELL ", ">)
(T <TELL " and ">)>)
(<L? ,HEALTH 9> <SET FLG <+ .FLG 1>>)>
<COND (<L? ,HEALTH 3>
<TELL "severe blood loss">)
(<L? ,HEALTH 5>
<TELL "considerable blood loss">)
(<L? ,HEALTH 9>
<TELL "blood loss">)>
<COND (<AND <L? ,WARMTH 9> <G? .FLG 0>>
<COND (<G? .FLG 1> <TELL ",">)>
<TELL " and ">)>
<COND (<L? ,WARMTH 3>
<TELL "severe exposure">)
(<L? ,WARMTH 5>
<TELL "considerable cold exposure">)
(<L? ,WARMTH 9>
<TELL "cold exposure">)>>
<GLOBAL SL-CAUGHT-TOWERS
<PTABLE "leftmost tower " "middle tower " "rightmost tower ">>
<CONSTANT SL-BEAM 16>
<ROUTINE IN-THE-SPOTLIGHT? (YOU IT "AUX" SL)
<SET SL </ <GET <GET ,SL-TBL .IT> 0> 10>>
;<COND (,SL-DEBUG
<TELL "SL #" N .IT " at " N .SL
"/ PLAYER at " N .YOU ": " CR>)>
<COND (<AND <L? .SL 271>
<G? .YOU <- .SL ,SL-BEAM>>
<L? .YOU <+ .SL ,SL-BEAM>>>
;<COND (,SL-DEBUG <TELL "Seen." CR>)>
<RTRUE>)
(T <RFALSE>)>>
<ROUTINE TURN-SL
("AUX" (OFF 0) TBL SL)
<REPEAT ()
<COND (<G? <SET OFF <+ .OFF 1>> 3> <RETURN>)>
<SET TBL <GET ,SL-TBL .OFF>>
<SET SL <+ <GET .TBL 0> <GET .TBL 1>>>
<COND (<EQUAL? .SL 3600> <SET SL 0>)>
<PUT .TBL 0 .SL>>>
<GLOBAL TRUE-FLAG T>
<GLOBAL FALSE-FLAG <>>
;"Something stinks..."
<OBJECT DOGS
(LOC A2)
(DESC "pack of dogs")
(SYNONYM DOGS PACK)>
<OBJECT GLOBAL-DOGS
(LOC GLOBAL-OBJECTS)
(DESC "pack of dogs")
(SYNONYM DOGS PACK)
(SCENARIO 2)
(ACTION GLOBAL-DOGS-F)>
<ROUTINE GLOBAL-DOGS-F ("OPTIONAL" (B ,DOGS) "AUX" L HF)
<COND (<VERB? LISTEN FIND WATCH EXAMINE>
<SET L <LOC .B>>
<COND (<OR <ZERO? .L>
<G? <SET HF <HOW-FAR .L ,HERE>> 3>>
<TELL
"You are relieved to find that you can't hear the " D .B "." CR>)
(T
<TELL "You can hear the " D .B>
<COND (<ZERO? .HF>
<TELL "; they are now at close range." CR>
<RTRUE>)
(<EQUAL? .HF 1>
<TELL " less than a hundred yards">)
(<EQUAL? .HF 2>
<TELL " a few hundred yards">)
(T
<TELL " off in the distance">)>
<TELL " to the ">
<TELL-DIRECTION ,HERE .L>
<TELL ,PERIOD-CR>)>)>>
<GLOBAL NODOGS-FLAG <>>
<GLOBAL DOG-PURSUIT <>>
<GLOBAL VIGILANCE <>>
<ROUTINE I-DOGS ("AUX" (DL <LOC ,DOGS>) HF NDL)
;"Debugging"
<COND (<L? ,CLOCK-TIME 140> <RTRUE>)>
<COND (,NODOGS-FLAG <RTRUE>)>
<COND (<AND ,DOG-PURSUIT <FSET? ,HERE ,GVIEWBIT>>
<CRLF>
<HLIGHT ,H-BOLD>
<JIGS-UP
"Too late! The guards, alerted by the guard dogs who have pursued you
across no-man's-land, approach with weapons drawn.">
<SETG NODOGS-FLAG T>
<RTRUE>)>
<SET HF <HOW-FAR .DL ,HERE>>
<COND (<NOT <ZERO? <SET NDL <GETP .DL ,P?PATH>>>>
<SETG LOST-SCENT <>>
<MOVE ,DOGS .NDL>
<COND (<EQUAL? .NDL ,HERE>
<CRLF>
<HLIGHT ,H-BOLD>
<COND (<OR <FSET? ,HERE ,HUTBIT>
<EQUAL? ,HERE ,INSIDE-SHED>>
<TELL
"A pair of guards, presumably with the pursuing dogs, rushes in, finding
you within seconds.">)
(T
<TELL
"The sounds of dogs barking madly and soldiers barking orders are close
upon you. A muddled explosion - a signal flare lightens the sky with a
red-orange glow. Before you can react, you are spotted! Brilliant white
searchlights are aimed upon you, blinding you long enough for more
soldiers and border guards to arrive.">)>
<JIGS-UP
" With no hope of escape, you surrender to the guards, and are led away,
handcuffed, to the border station.">
<RTRUE>)
(<FSET? .NDL ,CROSSBIT> ;"Player has crossed here."
<COND (<FSET? ,HERE ,GVIEWBIT>
<HLIGHT ,H-BOLD>
<CRLF>
<TELL
"From across the expanse of no-man's-land comes the sound of the search
dogs. They are moving quickly in your direction, following the tracks
made in your desperate run to the fence. The approaching dogs have
alerted the guards as well, who appear increasingly vigilant. You don't
have much time.">
<HLIGHT ,H-NORMAL>
<CRLF>
<SETG DOG-PURSUIT T>)>)>
<GONE-TO-THE-DOGS? .HF <HOW-FAR .NDL ,HERE>>)
(T
<SETG LOST-SCENT T>)>>
<GLOBAL LOST-SCENT <>>
<ROUTINE HOW-FAR (L1 L2 "OPTIONAL" (CAR? <>) "AUX" TMP)
<SET TMP <+ <* <SET TMP <NS-DIFF .L1 .L2>> .TMP>
<* <SET TMP <EW-DIFF .L1 .L2>> .TMP>>>
<COND (<L? .TMP 1> 0)
(<AND .CAR? <EQUAL? .TMP 2>> 2)
(<L? .TMP 3> 1)
(<L? .TMP 7> 2)
(<L? .TMP 13> 3)
(<L? .TMP 21> 4)
(T 5)>>
<ROUTINE NS-DIFF (L1 L2)
<ABS <- <GETP .L1 ,P?NS> <GETP .L2 ,P?NS>>>>
<ROUTINE EW-DIFF (L1 L2)
<ABS <- <GETP .L1 ,P?EW> <GETP .L2 ,P?EW>>>>
;"Sorry, no car chase..."
<GLOBAL ROAD-TBL <PTABLE F4 F5 E6 D6 ROAD-END D6 D7 D8 C9 0>>
<GLOBAL RESTED-ROAD-TBL 0>
;"Runs every 50 seconds; car goes past every 5th time, on average."
<GLOBAL CAR-ON-ROAD? <>>
<OBJECT CAR
(LOC ROOMS)
(DESC "automobile")
(LDESC
"An official car is here, bearing the seal of Frobnia.")
(SYNONYM DOOR CAR AUTO AUTOMOBILE)
(FLAGS VOWELBIT AN OPENBIT METALBIT)
(ACTION CAR-F)>
<ROUTINE CAR-F ()
<COND (<VERB? EXAMINE LOOK-INSIDE>
<TELL
"It's an official car, bearing the seal of Frobnia. There is no key in
the ignition, so starting it is out of the question.">
<COND (<IN? ,EXPLODING-PEN ,PRSO>
<TELL " The pen is adhering to the side of the
car.">)>
<CRLF>)
(<AND <VERB? PUT PUT-ON PUT-UNDER TIE>
<EQUAL? ,PRSO ,EXPLODING-PEN>>
<MOVE ,PRSO ,PRSI>
<TELL
"The pen adheres to the ">
<COND (<VERB? PUT-UNDER> <TELL "under">)>
<TELL "side of the car." CR>)
(<VERB? HIDE>
<TELL
"You can't get in, so hiding's inside's out of the question; neither is
there anything to be gained from hiding under the car." CR>)
(<VERB? ON>
<TELL
"You can't get in, so starting it is rather difficult." CR>)
(<VERB? BOARD CLIMB OPEN ENTER>
<TELL
"It wouldn't help. There's nothing important inside, and you couldn't
possibly start it up without being caught." CR>)>>
<OBJECT CAR-WINDOW
(LOC CAR)
(DESC "car window")
(SYNONYM WINDOW)
(FLAGS NDESCBIT)
(ACTION CAR-WINDOW-F)>
<ROUTINE CAR-WINDOW-F ()
<COND (<VERB? MUNG KICK>
<TELL
"This would only alert the guards, who are just fifty yards away." CR>)
(<VERB? OPEN>
<TELL
"You can't open the car's windows." CR>)>>
<OBJECT CAR-STUFF
(LOC CAR)
(DESC "car part")
(SYNONYM TRUNK HOOD)
(FLAGS NDESCBIT)
(ACTION CAR-STUFF-F)>
<ROUTINE CAR-STUFF-F ()
<COND (<VERB? OPEN UNLOCK BOARD ENTER>
<TELL
"It's closed and locked; trying to get in would undoubtably alert the guards,
and lead to your arrest." CR>)>>
<OBJECT GLOBAL-CAR
(LOC GLOBAL-OBJECTS)
(DESC "automobile")
(SCENARIO 2)
(SYNONYM CAR AUTO AUTOMOBILE)
(FLAGS VOWELBIT AN)
(ACTION GLOBAL-CAR-F)>
<ROUTINE GLOBAL-CAR-F ("AUX" HF)
<COND (<AND <VERB? LISTEN FIND> ,CAR-SEQUENCE>
<TELL "You can neither see nor hear the car." CR>)
(<VERB? LISTEN FIND>
<GLOBAL-DOGS-F ,CAR>
<RTRUE>)
(<VERB? EXAMINE>
<COND (<CAR-IN-VIEW?>
<COND (<NOT <ZERO? <LOC ,FLAMING-CAR>>>