-
Notifications
You must be signed in to change notification settings - Fork 16
/
erasmus.zil
3130 lines (2974 loc) · 96.3 KB
/
erasmus.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
"ERASMUS for
SHOGUN
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<FILE-FLAGS SENTENCE-ENDS?>
<BEGIN-SEGMENT ERASMUS>
;<CONSTANT CREW
<LTABLE HENDRIK VINCK MAETSUKKER GINSEL SPILLBERGEN VAN-NEKK
CROOCQ SONK ROPER PIETERZOON SALAMON>>
<OBJECT COMPASS
(SCENE S-ERASMUS)
(DESC "compass")
(SYNONYM COMPASS)
(ADJECTIVE MAGNETIC)
(FLAGS TAKEBIT READBIT)
(ACTION COMPASS-F)>
<ROUTINE COMPASS-F ()
<COND (<VERB? EXAMINE READ>
<TELL
"The compass points north. From it you can see that the course is ">
<TELL-DIRECTION ,SHIP-DIRECTION>
<TELL " and that the wind is out of the east, perhaps
a point or two south of east." CR>)>>
<OBJECT DECK
(SCENE S-ERASMUS)
(LOC LOCAL-GLOBALS)
(DESC "deck")
(SYNONYM DECK ABOVE WATCH POST POSTS)
(FLAGS NDESCBIT TAKEBIT)
(GENERIC GENERIC-DECK-F)
(ACTION DECK-F)>
<ROUTINE DECK-F ()
<COND (<VERB? EXAMINE>
<COND (<NOUN-USED? ,PRSO ,W?WATCH>
<COND (<FSET? ,MAETSUKKER ,SCOREBIT>
<TELL
"The men on watch are tired." CR>)
(ELSE
<TELL
"The watch is as fresh as can be expected." CR>)>)>)
(<VERB? TAKE>
<COND (<NOUN-USED? ,PRSO ,W?WATCH>
<TELL
"You are too tired to take the watch yourself." CR>)
(ELSE
<TELL "You can't take that." CR>)>)
(<VERB? RELEASE>
<COND (<HERE? ,BELOW-DECKS>
<TELL
"You should probably send some of these men out to relieve the
watch." CR>)
(ELSE
<TELL
,YOU-HAVE-TO "send some fresh crewmen out to do that." CR>)>)
(<VERB? WALK-UNDER>
<DO-WALK ,P?FORE>)
(<VERB? STEP-ON BOARD>
<DO-WALK ,P?OUT>)>>
<OBJECT REEF
(LOC LOCAL-GLOBALS)
(OWNER REEF)
(DESC "reef")
(SYNONYM REEF REEFS REEF-TOPS ROCKS GAP BREAK)
(FLAGS NDESCBIT SCOREBIT)
(ACTION REEF-F)>
<ROUTINE REEF-F ()
<COND (<VERB? EXAMINE>
<COND (<SCENE? ,S-ANJIRO ,S-RODRIGUES>
<TELL
"The reefs are over the horizon, invisible." CR>)
(<NOT ,REEF-FLAG>
<TELL
"You've been avoiding reefs for days. Right now the visibility is
terrible; only a few hundred yards. You couldn't see a reef unless
you were almost on top of it. A horrible thought!" CR>)
(<AND <EQUAL? ,SHIP-X 8> ;"10"
<EQUAL? ,SHIP-Y 2>>
<TELL
G"There's a break in the reef ahead and to starboard!" CR>)
(<AND <EQUAL? ,SHIP-X 6> ;"11"
<EQUAL? ,SHIP-Y 2>>
<TELL
"The gap in the reef is to port." CR>)
(<AND <EQUAL? ,SHIP-Y 1> ;"12"
<EQUAL? ,SHIP-X 5>>
<TELL
"The neck of the pass is right here, right to starboard, a maelstrom
of foaming sea and crashing combers." CR>)
(<AND <EQUAL? ,SHIP-Y 1>
<G? ,SHIP-X 0>
<L? ,SHIP-Y 5>>
<TELL
"The reef surrounds you on both sides, a terrifyingly narrow channel
hemmed in by rocks and smashed by waves." CR>)
(<EQUAL? ,REEF-X ,REEF-Y>
<TELL
"The reef is barely two hundred yards ">
<TELL-REEF-DIR>
<TELL ", great black claws of rocks
pounded by the hungry sea. A foaming line of surf looms ">
<TELL-REEF-DIR>
<TELL ", broken intermittently ">
<COND (<EQUAL? ,SHIP-DIRECTION ,P?WEST ,P?NW>
<TELL "to port">)
(<EQUAL? ,SHIP-DIRECTION ,P?SW>
<TELL "to starboard">)
(ELSE
<TELL "by too-narrow channels">)>
<TELL "." CR>)
(ELSE
<TELL
"The reef is off to the west, veiled in storm but revealed by
breakers." CR>)>)
(<VERB? TURN-AROUND>
<TELL ,YOU-HAVE-TO G"specify a direction." CR>)
(<VERB? TURN-TOWARD TURN-AWAY AVOID>
<COND (,REEF-FLAG
<COND (<VERB? TURN-TOWARD>
<SETG P-DIRECTION ,P?STARBOARD>)
(ELSE
<SETG P-DIRECTION ,P?PORT>)>
<PERFORM ,V?TURN ,WHEEL ,INTDIR>
<RTRUE>)>)>>
<ROUTINE TELL-REEF-DIR ()
<COND (<EQUAL? ,SHIP-DIRECTION ,P?WEST>
<TELL "ahead">)
(<EQUAL? ,SHIP-DIRECTION ,P?SW>
<TELL "to starboard">)
(<EQUAL? ,SHIP-DIRECTION ,P?NW>
<TELL "to port">)
(ELSE <TELL "away">)>>
<OBJECT FORESAILS
(LOC LOCAL-GLOBALS)
(DESC "foresails")
(SYNONYM FORESAILS SAILS SAIL HALLIARD)
(ADJECTIVE FORE)
(FLAGS NDESCBIT SCOREBIT)
(ACTION FORESAILS-F)>
<ROUTINE FORESAILS-F ()
<COND (<VERB? EXAMINE>
<COND (<FSET? ,FORESAILS ,TRYTAKEBIT>
<TELL "The foremast has snapped. You may be able
to survive without it for a while, though." CR>)
(ELSE
<TELL
"In this storm, only the barest storm sails are necessary, but you
can't get by with none. The foresails ">
<COND (<FSET? ,PRSO ,RMUNGBIT>
<TELL "have been torn away!" CR>)
(ELSE
<TELL "are barely hanging together." CR>)>)>)
(<P? ASK-ABOUT * FORESAILS>
<TELL
D ,PRSO " replies, \"Foresails only in a storm like this, by
God! Anything more and we'd lose the mast!\"" CR>)
(<VERB? LOWER>
<COND (<OR <FSET? ,FORESAILS ,RMUNGBIT>
<FSET? ,FORESAILS ,TRYTAKEBIT>>
<TELL "No need for that!" CR>)
(ELSE
<TELL
"Without foresails, there would be no control, and the ship would be
doomed. You wisely reconsider." CR>)>)
(<VERB? RAISE REPAIR>
<COND (<FSET? ,FORESAILS ,TRYTAKEBIT>
<TELL
"The mast itself has snapped, there's no way to repair the sails!" CR>)
(<NOT <FSET? ,FORESAILS ,RMUNGBIT>>
<COND (<FSET? ,FORESAILS ,SCOREBIT>
<TELL
"The foresails are still holding on, the maximum sail that the
ship can tolerate in this terrific gale." CR>)
(ELSE
<TELL
"The new foresails have already been raised." CR>)>)
(,CREW-ON-DECK?
<FCLEAR ,FORESAILS ,RMUNGBIT>
<TELL
"You yell to the crewmen, \"Fores'ls ho!\" Foot by foot they haul
themselves into the shrouds of the foremast rigging, dragging new
sails aloft as others below
lean on the ropes to give them a hand. They curse the sail out of
its ropes. It falls open, cracking like a cannonade as the wind
fills it, and the ship lurches. Now you have some control!" CR>
<SCORE-OBJECT ,FORESAILS>)
(<OR <IN? ,HENDRIK ,ON-DECK>
<IN? ,GINSEL ,ON-DECK>
<IN? ,VINCK ,ON-DECK>
<IN? ,MAETSUKKER ,ON-DECK>>
<QUEUE I-HANDS 2>
<TELL
"The crewmen on deck try to obey, but there are too few of them! You
need more crew on deck! They ring the bell. \"All hands on deck!\"
someone screams." CR>)
(ELSE
<TELL
"There's no one here to carry out your order!" CR>)>)>>
<OBJECT LG-ERASMUS
(LOC LOCAL-GLOBALS)
(OWNER BLACKTHORNE)
(DESC "Erasmus")
(SYNONYM ERASMUS SHIP BOAT)
(FLAGS NDESCBIT THE ;PERSON FEMALE VEHBIT SCOREBIT)
(GENERIC GENERIC-SHIP-F)
(ACTION LG-ERASMUS-F)>
<ROUTINE LG-ERASMUS-F ("OPT" (RARG <>))
<COND (<RARG? SUBJ>
<RFALSE>)
(<P? (TELL ASK-ABOUT) LG-ERASMUS>
<TELL "You have been at sea too long!" CR>)
(<VERB? EXAMINE>
<COND (<SCENE? ,S-ANJIRO>
<COND (<HERE? ,ANJIRO ,ANJIRO-WATERFRONT
,ANJIRO-HARBOR ,AT-ERASMUS>
<TELL
"The " I "Erasmus"" is anchored neatly, fifty yards from shore, in good
water, with three bow cables. You can see native men aboard." CR>
<COND (<NOT <FSET? ,RUTTER ,RMUNGBIT>>
<FSET ,RUTTER ,RMUNGBIT>
<TELL CR
"With a start you realize you don't know where your rutters are! Can
they still be on the ship? They are your most precious possessions,
and the stolen Portuguese one is a death sentence in any Catholic
country!" CR>)>
<RTRUE>)
(ELSE
<TELL
"You are surprised at how neat the ship is. The tattered sails are down
and tied in place. But the lashings are different from any you've ever
seen. You presume the Japaners have made the vessel secure." CR>)>)
(<FSET? ,FORESAILS ,TRYTAKEBIT>
<TELL
"The ship is without a foremast!" CR>)
(<FSET? ,FORESAILS ,RMUNGBIT>
<TELL
"Right now, the "I"Erasmus"" is missing her foresails." CR>)
(ELSE
<TELL
"The " I "Erasmus"" is a pisscutter of a ship, lean and taut as a
greyhound. If she can make it to port, God willing, all will be
well. Otherwise, you're a dead man." CR>)>)
(<AND <VERB? DROP>
<EQUAL? ,P-PRSA-WORD ,W?ABANDON>
<SCENE? ,S-ERASMUS>>
<TELL
G"That would be suicide in this storm." CR>)
(<VERB? WALK-TO>
<COND (<AND <SCENE? ,S-ANJIRO ,S-RODRIGUES>
<NOT <IN? ,PLAYER ,SMALL-BOAT>>>
<TELL
,YOU-HAVE-TO "use a boat to do that." CR>)>)
(<VERB? LEAP DIVE>
<COND (<HERE? ,ON-DECK ,BRIDGE-OF-ERASMUS>
<COND (<SCENE? ,S-ERASMUS>
<TELL
G"That would be suicide in this storm." CR>)
(ELSE
<TELL
"You hurry over the side and down the gangway!" CR CR>
<DO-WALK ,P?DOWN>)>)
(ELSE
<TELL
"You can hardly jump overboard from here!" CR>)>)
(<AND <VERB? DISEMBARK EXIT>
<SCENE? ,S-ANJIRO ,S-RODRIGUES>>
<DO-WALK ,P?DOWN>)
(<VERB? POINT>
<COND (<EQUAL? ,OMI-QUESTION 1 2>
<TELL
"\"That's no answer, heretic!\"" CR>)
(<IN? ,SEBASTIO ,HERE>
<TELL
"\"Your ship has been well cared for, pirate!\"" CR>)>)
(<VERB? BOARD CLIMB-ON THROUGH CLIMB-UP>
<COND (<HERE? ,AT-ERASMUS>
<DO-WALK ,P?UP>)
(<HERE? ,ON-DECK ,BRIDGE-OF-ERASMUS
,PASSAGEWAY ,PILOTS-CABIN ,MATES-CABIN
,CAPTAINS-CABIN>
<TELL "You already are!" CR>)
(ELSE
<YOULL-HAVE-TO "get to it">)>)
(<VERB? TURN>
<COND (<HERE? ,BRIDGE-OF-ERASMUS>
<PERFORM ,V?TURN ,WHEEL ,PRSI>
<RTRUE>)
(<SCENE? ,S-ERASMUS>
<ARENT-WHERE-PRSO-IS>
<FRUSTRATED <COND (<FSET? ,HENDRIK ,DEAD> ,VINCK)
(ELSE ,HENDRIK)>>)>)
(<VERB? REPAIR>
<MORE-SPECIFIC>)
(<HOSTILE-VERB?>
<TELL "What an infantile idea." CR>)>>
<ROUTINE ARENT-WHERE-PRSO-IS ()
<TELL
"You aren't on the bridge, where " THE ,PRSO " is.">>
<OBJECT GANGWAY
(LOC LOCAL-GLOBALS)
(DESC "gangway")
(SYNONYM GANGWAY)
(FLAGS NDESCBIT)
(ACTION GANGWAY-F)>
<ROUTINE GANGWAY-F ()
<COND (<VERB? CLIMB-UP>
<DO-WALK ,P?UP>)
(<VERB? CLIMB-DOWN>
<DO-WALK ,P?DOWN>)
(<VERB? CLIMB-FOO CLIMB-ON>
<COND (<HERE? ,AT-ERASMUS ,WHARF>
<DO-WALK ,P?UP>)
(<HERE? ,ON-DECK ,MAIN-DECK>
<DO-WALK ,P?DOWN>)>)>>
<GLOBAL STORM-DELAY? <>>
<GLOBAL SHIP-DIRECTION <>>
<GLOBAL SHIP-X 21>
<GLOBAL SHIP-Y 9>
<GLOBAL SHIP-COURSE <>>
;<GLOBAL SHIP-DEBUG <>> ;"T to print out ship position stuff"
;<ROUTINE SHIP-INFO ()
<TELL
"[Course ">
<TELL-DIRECTION ,SHIP-DIRECTION>
<TELL "; wheel ">
<TELL-DIRECTION ,SHIP-COURSE>
<TELL "; X=" N ,SHIP-X ",Y=" N ,SHIP-Y "; Reef X=" N ,REEF-X ",Y=" N ,REEF-Y "]" CR>>
<ROUTINE QUEUE-STORM ("AUX" S DONE?)
<SET S <GETPT <GET ,SCENE-LOCS ,SCENE> ,P?SCORE>>
<SET S <GETB .S 0>>
<SET DONE? <DONE-BELOW?>>
<COND (<L? ,STORM-DELAY? 0>
<SETG STORM-DELAY? <+ ,STORM-DELAY? 1>>
<QUEUE I-STORM 30>)
(<AND ,STORM-DELAY? ;"delay storm if loser increased score"
<FSET? ,BELL ,SCOREBIT> ;"unless we're in height of storm"
<G? .S ,STORM-DELAY?>
<NOT .DONE?>>
<SETG STORM-DELAY? .S>
<QUEUE I-STORM 10>
<RFALSE>)
(<OR <FSET? ,HERE ,OUTSIDE> ;"storm fast if outside"
.DONE? ;"or hanging around below decks too long">
<SETG STORM-DELAY? .S>
<QUEUE I-STORM
<COND (<OR ,REEF-FLAG <EQUAL? .S 7>> 4)
(<AND <FSET? ,HERE ,OUTSIDE> .DONE?> 3)
(ELSE 9)>>)
(<AND <EQUAL? ,SHIP-COURSE ,P?PORT ,P?STARBOARD> ;"or if stupid"
<NOT <FSET? ,WHEEL ,RMUNGBIT>>
<NOT <FSET? ,HENDRIK ,TRYTAKEBIT>>>
<QUEUE I-STORM 2>)
(ELSE ;"storm slow if inside"
<SETG STORM-DELAY? .S>
<QUEUE I-STORM
<COND (,REEF-FLAG 7) (ELSE 15)>>)>>
<GLOBAL WHEEL-SPINNING? <>>
<ROUTINE I-STORM ()
<COND (<NOT <QUEUE-STORM>> ;"returns false if storm-delay in effect"
<RFALSE>)>
<COND (<EQUAL? ,SHIP-COURSE ,P?FORE>)
(<EQUAL? ,SHIP-COURSE ,P?PORT>
<COND (<EQUAL? ,SHIP-DIRECTION ,P?WEST>
<SETG SHIP-DIRECTION ,P?SW>)
(<EQUAL? ,SHIP-DIRECTION ,P?SW>
<SETG SHIP-DIRECTION ,P?SOUTH>)
(<EQUAL? ,SHIP-DIRECTION ,P?NW>
<SETG SHIP-DIRECTION ,P?WEST>)
(<EQUAL? ,SHIP-DIRECTION ,P?NORTH>
<SETG SHIP-DIRECTION ,P?NW>)>)
(<EQUAL? ,SHIP-COURSE ,P?STARBOARD>
<COND (<EQUAL? ,SHIP-DIRECTION ,P?WEST>
<SETG SHIP-DIRECTION ,P?NW>)
(<EQUAL? ,SHIP-DIRECTION ,P?SW>
<SETG SHIP-DIRECTION ,P?WEST>)
(<EQUAL? ,SHIP-DIRECTION ,P?NW>
<SETG SHIP-DIRECTION ,P?NORTH>)
(<EQUAL? ,SHIP-DIRECTION ,P?SOUTH>
<SETG SHIP-DIRECTION ,P?SW>)>)>
<COND (<EQUAL? ,SHIP-DIRECTION ,P?WEST>
<COND (<OR <FSET? ,FORESAILS ,RMUNGBIT>
<AND <EQUAL? ,SHIP-Y 1>
<L=? ,SHIP-X 7>>>
<SETG SHIP-X <- ,SHIP-X 1>>)
(ELSE
<SETG SHIP-X <- ,SHIP-X 2>>)>)
(<EQUAL? ,SHIP-DIRECTION ,P?SW>
<SETG SHIP-X <- ,SHIP-X 1>>
<SETG SHIP-Y <- ,SHIP-Y 1>>)
(<EQUAL? ,SHIP-DIRECTION ,P?NW>
<SETG SHIP-X <- ,SHIP-X 1>>
<SETG SHIP-Y <+ ,SHIP-Y 1>>)
(<EQUAL? ,SHIP-DIRECTION ,P?NORTH ,P?SOUTH>
<SHIP-BROADSIDE>)>
<COND (<NOT <REEF-DISTANCE>>
<COND (<G? ,SHIP-X 6>
<TELL CR
"The waiting spines of the reef tear into the ship!">
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL "The gap is tantalizingly
close, but you missed it.">)>
<TELL "Two years out from England, and it ends here in
a watery grave." CR>
<JIGS-UP>)
(<EQUAL? ,SHIP-X 6>
<TELL CR
"The ship smashes into the ">
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL "side of the gap in the ">)>
<TELL "reef, tearing a huge
rent in the hull. Water pours in, and the stern crashes against the rocks">
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL
", throwing you to the deck. Suddenly the mainmast gives way. It's crashing
down upon you">)>
<TELL "!" CR>
<JIGS-UP>)
(ELSE
<CRLF>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL "You steer">)
(ELSE
<TELL "The ship steers">)>
<TELL
" directly into the waiting rocks!" CR>
<JIGS-UP>)>
<RFATAL>)>
<COND (<AND <L? ,SHIP-X 19>
<NOT <GETP ,BLACKTHORNE ,P?HEALTH>>>
<QUEUE I-TIRED-WARNING 5 T>
<QUEUE I-TIRED 10 T>)>
;<COND (,SHIP-DEBUG <SHIP-INFO>)>
<COND (,REEF-FLAG)
(<REEF-SIGHTED?>
<SETG REEF-FLAG T>
<CRLF>
<COND (<FSET? ,HERE ,OUTSIDE>
<COND (<IN? ,GINSEL ,BELOW-DECKS>
<TELL "The bow lookout">)
(ELSE
<TELL "Ginsel, the bow lookout,">)>
<TELL " yells \"Rotz vooruit!\" Reef
ahead! A foaming line of surf stretches ahead of you,
broken intermittently to port!" CR>
<COND (<AND <HERE? ,BRIDGE-OF-ERASMUS>
<FSET? ,HENDRIK ,RMUNGBIT>>
<FCLEAR ,HENDRIK ,RMUNGBIT>
<TELL CR
"The yelling wakes Hendrik." CR>)>)
(ELSE
<FCLEAR ,HENDRIK ,RMUNGBIT>
<TELL
"Faintly, over the roar of the storm, you hear the terrified
cry \"Rotz vooruit!\" Reef ahead! ">
<COND (<HERE? ,BELOW-DECKS>
<TELL
"The crewmen pull themselves painfully from their bunks. \"We're
dead men!\" screams one.">
<COND (<IN? ,VINCK ,HERE>
<MOVE ,VINCK ,ON-DECK>
<TELL
"\"We'd better go above, Pilot,\" urges Vinck as he shuffles toward
the door." CR>)
(ELSE <CRLF>)>)
(<HERE? ,CAPTAINS-CABIN>
<TELL
"\"Get out there, Pilot!\" Spillbergen orders you. \"We'll all die
thanks to you! Out!\"" CR>)
(ELSE
<TELL
"You sense from the terror in the voice that the reefs are close.">
<COND (<IN? ,GINSEL ,BELOW-DECKS>
<TELL
"Has the watch been asleep? All too likely!">)>
<CRLF>)>)>
<RTRUE>)>
<COND (<AND <EQUAL? ,SHIP-Y 9>
<EQUAL? ,SHIP-X 19>>
<QUEUE I-HENDRIK -1>
<FCLEAR ,WHEEL ,ONBIT>
<TELL CR
"The ship heels in a sudden squall, throwing you ">
<COND (<FSET? ,WHEEL ,RMUNGBIT>
<COND (<HERE? ,BRIDGE-OF-ERASMUS>
<TELL
"from your post at the wheel." CR>)
(ELSE
<TELL "to the deck." CR>)>)
(ELSE
<COND (<HERE? ,BRIDGE-OF-ERASMUS>
<TELL
"from your post at the wheel, which">)
(ELSE
<TELL "to the deck. The wheel">)>
<SETG SHIP-COURSE ,P?PORT>
<SETG SHIP-DIRECTION ,P?SW>
<QUEUE I-BROADSIDE 4>
<QUEUE I-SHIP-BROADSIDE 8>
<TELL
", uncontrolled, begins to turn to port." CR>)>
<RTRUE>)
(<OR <EQUAL? ,SHIP-X 18>
<AND <EQUAL? ,SHIP-Y 9>
<EQUAL? ,SHIP-X 17>>>
<TELL CR
"The wind freshens even more, and the ship lurches." CR>
<RTRUE>)
(<AND <EQUAL? ,SHIP-Y 8>
<EQUAL? ,SHIP-X 14>>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
"A forepeak halliard snaps, and the highest top gallant spar is carried
away into the sea, ">
<COND (<EQUAL? ,SHIP-DIRECTION ,P?SW>
<TELL
"but the ship is now making way parallel to the reef." CR>)
(ELSE
<TELL
"and the ship continues to approach the waiting reef." CR>)>)>)
(<AND <EQUAL? ,SHIP-Y 7>
<EQUAL? ,SHIP-X 13>>
<COND (<FSET? ,HERE ,OUTSIDE>
<CRLF>
<COND (<EQUAL? ,SHIP-DIRECTION ,P?SW>
<TELL
"The ship runs parallel to the reef, barely staying away from it, and a huge following wave towers over the ship!" CR>)
(ELSE
<TELL
"The ship is being carried still closer to the reef, and a huge wave is
approaching from the starboard side!" CR>)>)>)
(<AND <EQUAL? ,SHIP-Y 6>
<EQUAL? ,SHIP-X 12>>
<COND (<NOT <EQUAL? ,SHIP-DIRECTION ,P?SW>>
<FSET ,LG-ERASMUS ,RMUNGBIT>)>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
"Another halliard gives, block and tackle swinging wildly. The wave breaks
over the ship! ">
<COND (<EQUAL? ,SHIP-DIRECTION ,P?SW>
<TELL "It looks for a moment like you're
going to founder, but she shakes it off." CR>)
(ELSE
<TELL
"The force of the wave drives the ship onto the reef, the sharp
rocks tearing into the wooden hull! In what seems like an instant, she's
sinking!" CR>)>
<RTRUE>)>)
(<AND <EQUAL? ,SHIP-Y 5>
<EQUAL? ,SHIP-X 11>>
<FSET ,FORESAILS ,RMUNGBIT>
<COND (<FSET? ,HERE ,OUTSIDE>
<CRLF>
<COND (<EQUAL? ,SHIP-DIRECTION ,P?SW>
<TELL
"Another following sea towers above the ship. The ship is wallowing,
and the foresails are torn away by the tempest." CR>
<RTRUE>)
(ELSE
<JIGS-UP
"You struggle to stay afloat in the raging sea, but you are too weak to
fight the waves for long, and are dashed against the rocks.">
<RFATAL>)>)>)
(<AND <EQUAL? ,SHIP-Y 4>
<EQUAL? ,SHIP-X 10>>
<FSET ,HENDRIK ,DEAD>
<MOVE ,HENDRIK ,GENERIC-OBJECTS>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
"This wave comes in stronger than the last. Hendrik is caught and lifted,
gasping and struggling, into the sea." CR>
<TELL CR
"A giant comber throws Hendrik high above the ship, then takes him
away and pulps him against a rock spine." CR>)>)
(<AND <EQUAL? ,SHIP-Y 2>
<EQUAL? ,SHIP-X 8>>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
G"There's a break in the reef ahead and to starboard!" CR>)>)
(<AND <EQUAL? ,SHIP-Y 2>
<EQUAL? ,SHIP-X 6>>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
"The gulch through the reef is three points to windward, and you aren't gaining
way! You search desperately for another channel but know there is
none. The "I"Erasmus"" is heading for the rocks starboard of the gap!" CR>)>)
(<AND <EQUAL? ,SHIP-Y 1>
<EQUAL? ,SHIP-X 7>>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
"The ship is being swept past the gap in the reef!" CR>)>)
(<AND <EQUAL? ,SHIP-Y 1>
<EQUAL? ,SHIP-X 5>>
<COND (<HERE? ,BRIDGE-OF-ERASMUS ,ON-DECK>
<MOVE ,VINCK ,HERE>)
(ELSE <MOVE ,VINCK ,BRIDGE-OF-ERASMUS>)>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
"The ship is gaining way, helped by the fall off from the wind. You are
holding course parallel to the reef and approaching a narrow gap which
heads to starboard." CR CR
"You see Vinck making his way up the companionway to the bridge." CR>)>)
(<AND <EQUAL? ,SHIP-Y 1>
<EQUAL? ,SHIP-X 4>
<EQUAL? ,SHIP-DIRECTION ,P?WEST>>
<TELL CR
"There is a wailing, tormented shudder as the keel scrapes the razor
spines of the reef below!">
<COND (<NOT <FSET? ,WHEEL ,RMUNGBIT>>
<SETG WHEEL-SPINNING? T>
<DEQUEUE I-BROADSIDE>
<COND (<FSET? ,WHEEL ,ONBIT>
<FCLEAR ,WHEEL ,ONBIT>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL
"The"G" wheel spins out of your hands!" CR>)>)
(ELSE
<TELL
"The wheel begins spinning wildly!" CR>)>)>)
(<AND <EQUAL? ,SHIP-Y 1>
<EQUAL? ,SHIP-X 3>
<EQUAL? ,SHIP-DIRECTION ,P?WEST>>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
"The ship is sucked into a narrow vortex between the rocks. ">
<COND (<AND <NOT <FSET? ,WHEEL ,ONBIT>>
<NOT <FSET? ,WHEEL ,RMUNGBIT>>>
<TELL
"The wheel spins from side to side, out of control! ">)>
<FSET ,FORESAILS ,TRYTAKEBIT> ;"can't be repaired"
<TELL "The bowsprit
catches a rock and is torn loose! The foremast snaps! The men on deck
fall on the rigging with axes and cut it adrift as the ship founders
down the channel." CR>)>)
(<AND <EQUAL? ,SHIP-Y 1>
<EQUAL? ,SHIP-X 2>
<EQUAL? ,SHIP-DIRECTION ,P?WEST>>
<COND (<AND <NOT <FSET? ,WHEEL ,ONBIT>>
<NOT <FSET? ,WHEEL ,RMUNGBIT>>>
<CRLF>
<JIGS-UP
"Out of control, the ship spins broadside, and holes against the rocks.">
<RFATAL>)
(<FSET? ,HERE ,OUTSIDE>
<TELL CR
"The ship is pulled by the waves deeper into the strait, and then
pushed back by the return, but she's making some progress." CR>)>)
(<AND <EQUAL? ,SHIP-Y 1>
<EQUAL? ,SHIP-X 1>
<EQUAL? ,SHIP-DIRECTION ,P?WEST>>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
"For an instant, the strait broadens. Ahead, it narrows ominously and
turns to port." CR>)>)
(<AND <ZERO? ,SHIP-Y>
<ZERO? ,SHIP-X>
<EQUAL? ,SHIP-DIRECTION ,P?SW>>
<DEQUEUE I-STORM>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL CR
"The sea race quickens. The ship is in the neck and dead, but then the
keel scrapes a mud shoal, and the shock turns her head. The rudder bites
into the sea, the wind and sea join to help, and before the wind she
speeds through the pass to safety. Into the bay beyond." CR>
<COND (<IN? ,COMPASS ,BLACKTHORNE>
<REMOVE ,COMPASS>)>
<COND (<IN? ,QUILL ,BLACKTHORNE>
<REMOVE ,QUILL>)>
<REMOVE ,APPLE>
<SCORE-OBJECT ,REEF>
<CRLF>
<NEXT-SCENE>)>)>>
<GLOBAL REEF-FLAG <>>
"returns T the first time the reef is sighted"
<ROUTINE REEF-SIGHTED? ()
<COND (,REEF-FLAG <RFALSE>)
(<OR <L=? ,REEF-X 2>
<L=? ,REEF-Y 2>>
<RTRUE>)
(ELSE <RFALSE>)>>
<GLOBAL REEF-X <>> ;"x distance from ship to reef"
<GLOBAL REEF-Y <>> ;"y distance from ship to reef"
<ROUTINE REEF-DISTANCE ()
<SETG REEF-X 0>
<SETG REEF-Y 0>
<COND (<EQUAL? ,SHIP-X 0>
<COND (<ZERO? ,SHIP-Y>
<SETG REEF-X 1000>
<SETG REEF-Y 1000>)
(ELSE <RFALSE>)>)
(<AND <EQUAL? ,SHIP-Y 0>
<G? ,SHIP-X 0>
<L? ,SHIP-X 7>>
<RFALSE>)
(<AND <EQUAL? ,SHIP-Y 1>
<EQUAL? ,SHIP-X 6>>
<RFALSE>)
(<AND <EQUAL? ,SHIP-Y 0 1>
<EQUAL? ,SHIP-X 7>>
<SETG REEF-X 1>
<SETG REEF-Y <- 3 ,SHIP-Y>>)
(<AND <EQUAL? ,SHIP-Y 1>
<L=? ,SHIP-X 5>>
<SETG REEF-X ,SHIP-X>
<SETG REEF-Y 1>)
(<L=? ,SHIP-Y 1>
<COND (<L? ,SHIP-X 7>
<RFALSE>)
(ELSE
<SETG REEF-X <- ,SHIP-X 6>>
<SETG REEF-Y <+ <- ,SHIP-Y> <- ,SHIP-X 4>>>)>)
(<G=? ,SHIP-Y 11>
<SETG REEF-X <- ,SHIP-X 15>>
<COND (<G? ,SHIP-X 15> <SETG REEF-Y 1000>)
(ELSE <SETG REEF-Y 0>)>)
(<AND <EQUAL? ,SHIP-Y 2>
<EQUAL? ,SHIP-X 6 7>>
<SETG REEF-X <- ,SHIP-X 5>>
<SETG REEF-Y 1>)
(<G=? ,SHIP-Y 2>
<SETG REEF-X <- <- ,SHIP-X 6> <- ,SHIP-Y 2>>>
<SETG REEF-Y <- <- ,SHIP-X 4> ,SHIP-Y>>)>
<COND (<OR <L=? ,REEF-X 0> <L=? ,REEF-Y 0>>
<SETG REEF-X 0>
<SETG REEF-Y 0>
<RFALSE>)
(ELSE <RTRUE>)>>
<OBJECT CREWMEN
(LOC BELOW-DECKS)
(DESC "crewmen")
(SYNONYM CREW CREWMEN CREWMAN MEN MAN SAILOR SAILORS)
(FLAGS PERSON DUTCHBIT NOABIT THE PLURAL DONT-ALL)
(DESCFCN CREWMEN-DESC)
(GENERIC GENERIC-CREWMEN-F)
(ACTION LG-CREWMEN-F)>
<ROUTINE CREWMEN-DESC ("OPT" RARG OBJ)
<COND (<RARG? OBJDESC?>
<COND (<HERE? ,BELOW-DECKS ,VILLAGE-SQUARE>
<RTRUE>)>)
(<RARG? OBJDESC>
<COND (<HERE? ,BELOW-DECKS>
<COND (,CREW-ON-DECK?
<TELL
"A few of the worst-off crewmen are still here.">)
(,REEF-FLAG
<TELL
"Most of the surviving crewmen are preparing to go on deck.">)
(ELSE
<TELL
"Most of the survivors of the crew are here in bunks
and hammocks, some sleeping, some awake.">)>)
(<HERE? ,VILLAGE-SQUARE>
<TELL
"The rabble of the ship's crew kneel behind you, guards watching them.">)>)>>
<OBJECT LG-CREWMEN
(LOC LOCAL-GLOBALS)
(DESC "crewmen")
(SYNONYM CREW CREWMEN CREWMAN MAN MEN)
(FLAGS PERSON DUTCHBIT JAPANESEBIT NOABIT THE PLURAL)
(GENERIC GENERIC-CREWMEN-F)
(ACTION LG-CREWMEN-F)>
<GLOBAL CREW-ON-DECK? <>>
<ROUTINE LG-CREWMEN-F ("OPT" (RARG <>))
<COND (<RARG? SUBJ>
<RFALSE>)
(<SCENE? S-ERASMUS S-YABU> ;"dutch crew"
<COND (<RARG? WINNER>
<COND (<OR <HERE? PILOTS-CABIN CAPTAINS-CABIN
PASSAGEWAY>
<AND <HERE? ,BELOW-DECKS>
,CREW-ON-DECK?>>
<TELL "There are no crewmen here." CR>)
(<P? WHO YOU>
<SETG WINNER ,PLAYER>
<PERFORM ,V?WHO ,CREWMEN>
<END-QUOTE>
<RFATAL>)
(<HERE? ,BELOW-DECKS ,MATES-CABIN>
<TELL
G"The crewmen whine and groan and pretend you are referring to someone
else. You'll have to order specific crewmen to get any results." CR>)
(<P? (RAISE REPAIR LOWER REPLACE) FORESAILS>
<RFALSE>)
(<AND <IN? ,VINCK ,HERE>
<P? HELP>
<P? TAKE WHEEL>>
<SETG WINNER ,VINCK>
<PERFORM ,PRSA ,PRSO ,PRSI>
<RTRUE>)
(<AND <HERE? BELOW-DECKS>
<SEND-HIM-OUT?>>
<TELL
"The crewmen mutter among themselves, but no one moves." CR>)
(ELSE
<CURSES-IN "Dutch">)>)
(<VERB? EXAMINE WHO>
<LIST-PEOPLE ,CREWMAN? "crewman" "crewmen">
<COND (<HERE? ,BELOW-DECKS>
<COND (<IN? ,VINCK ,BELOW-DECKS>
<COND (<IN? ,GINSEL ,BELOW-DECKS>
<COND (<IN? ,MAETSUKKER
,BELOW-DECKS>
<TELL
"Vinck, Ginsel, and Maetsukker are">)
(ELSE
<TELL
"Vinck and Ginsel are">)>)
(<IN? ,MAETSUKKER ,BELOW-DECKS>
<TELL
"Vinck and Maetsukker are">)
(ELSE
<TELL
"Vinck is">)>)
(<IN? ,GINSEL ,BELOW-DECKS>
<COND (<IN? ,MAETSUKKER ,BELOW-DECKS>
<TELL
"Ginsel and Maetsukker are">)
(ELSE
<TELL
"Ginsel is">)>)
(<IN? ,MAETSUKKER ,BELOW-DECKS>
<TELL
"Maetsukker is">)
(ELSE <CRLF> <RTRUE>)>
<TELL
" in the best condition, although everyone is badly off.">)
(<HERE? ,BRIDGE-OF-ERASMUS>
<TELL "">
<LIST-PEOPLE ,CREWMAN? "crewman" "crewmen"
,ON-DECK "elsewhere on deck">)
(<HERE? ,ON-DECK>
<TELL "">
<LIST-PEOPLE ,CREWMAN?
"crewman" "crewmen"
,BRIDGE-OF-ERASMUS
"on the bridge">)>
<CRLF>)
(<AND <VERB? TELL>
,CREW-ON-DECK?
<HERE? ,BRIDGE-OF-ERASMUS ,ON-DECK>>
<RFALSE>)
(<NOT <CREW-HERE?>>
<TELL
G"There aren't any crewmen here." CR>
<COND (<VERB? TELL>
<END-QUOTE>
<RFATAL>)
(ELSE <RTRUE>)>)
(<AND <HERE? ,BELOW-DECKS>
<VERB? SEND>>
<TELL
G"The crewmen whine and groan and pretend you are referring to someone
else. You'll have to order specific crewmen to get any results." CR>)
(<AND <VERB? WAKE> <HERE? ,BELOW-DECKS>>
<TELL
"You cuff a few of the sleepers into wakefulness, but most are too far
gone to do more than curse feebly." CR>)>)
(<SCENE? S-PIT>
<COND (<VERB? EXAMINE>
<TELL
"They look scared." CR>)>)
(<SCENE? S-RODRIGUES>
<TELL "There are no longer any crewmen aboard." CR>)
(<SCENE? S-VOYAGE> ;"japanese crew of galley"
<COND (<RARG? WINNER>
<COND (<P? (DROP THROW PUT LOWER) ANCHOR>
<RFALSE>)
(ELSE
<CURSES-IN "Japanese">)>)>)
(<SCENE? S-MARIKO>
<COND (<NOT <ABSTRACT-VERB?>>
<TELL CTHE ,LG-CREWMEN " aren't here." CR>
<COND (<VERB? TELL> <END-QUOTE> <RFATAL>)
(ELSE <RTRUE>)>)>)>>
<ROUTINE CURSES-IN (L)
<TELL
"The only responses are muttered curses in " .L "." CR>>
<ROUTINE CREW-HERE? ()
<REPEAT ((F <FIRST? ,HERE>))
<COND (<NOT .F>
<RFALSE>)
(<AND <NOT <EQUAL? .F ,CREWMEN>>
<FSET? .F ,DUTCHBIT>>
<RTRUE>)>
<SET F <NEXT? .F>>>>
<OBJECT HENDRIK
(DESC "Hendrik Specz")
(SYNONYM HENDRIK SPECZ MATE)
(ADJECTIVE HENDRIK THIRD)
(FLAGS PERSON DUTCHBIT NOABIT NOTHEBIT)
(DESCFCN HENDRIK-DESC)
(ACTION HENDRIK-F)>
<ROUTINE HENDRIK-DESC (RARG OBJ)
<COND (<RARG? OBJDESC?>
<COND (<FSET? ,HENDRIK ,RMUNGBIT> <RTRUE>)
(<FSET? ,HENDRIK ,TRYTAKEBIT> <RTRUE>)
(ELSE <RFALSE>)>)
(<RARG? OBJDESC>
<TELL "Hendrik Specz ">
<COND (<FSET? ,HENDRIK ,RMUNGBIT>
<TELL "is asleep at">)
(ELSE
<TELL "has">)>
<TELL " the wheel.">)>>
<ROUTINE HENDRIK-F ("OPT" (RARG <>))
<COND (<RARG? SUBJ>
<RFALSE>)
(<RARG? WINNER>
<COND (<VERB? FOLLOW WALK WALK-TO WALK-UNDER>
<COND (<FSET? ,WHEEL ,ONBIT>
<TELL
"\"Pilot, it's my watch. Let me take the wheel. You must rest.\"" CR>)
(ELSE
<TELL
"\"One of us must stay and hold the God-cursed wheel, or we all die!\"" CR>)>)
(<OR <P? TAKE-OVER (<> WHEEL DECK)>
<P? (TAKE TURN) (WHEEL DECK)>>
<FSET ,HENDRIK ,TRYTAKEBIT> ;"hendrik has the wheel"
<HENDRIK-TAKES-WHEEL>
<TELL
"\"Aye, Pilot, I take the wheel.\"" CR>)
(<P? (RAISE REPAIR LOWER) FORESAILS>
<RFALSE>)
(<PRSO? ,WHEEL>
<TELL
"\"If you want the wheel, take it,\" snarls Hendrik." CR>)
(<OR <P? SHUT-UP ROOMS>
<AND <P? BE INTADJ>
<ADJ? ,W?QUIET>>>
<TELL
"\"We'll all be quiet soon enough!\"" CR>)
(<VERB? TELL-ME-ABOUT>
<COND (<PRSO? ,JAPAN>
<TELL
"\"You're the one who said it's here. Between latitudes thirty and
forty north, you said. Well, I don't see it.\"" CR>)
(<PRSO? ,SPILLBERGEN>
<TELL
"\"He's a maggot-eaten fool and we'll all be dead because of him.\"" CR>)
(ELSE
<TELL
"He doesn't answer." CR>)>)
(<I-DONT-KNOW?>
<TELL
"\"You don't know? You're the God-cursed Pilot, you'd better know!\"" CR>)
(ELSE
<TELL
"Hendrik's reply is a mixture of whining and curses." CR>)>)
(<VERB? TELL>
<COND (<FSET? ,HENDRIK ,RMUNGBIT>
<TELL
"Hendrik is asleep." CR>
<END-QUOTE>)>)
(<P? EXAMINE>
<TELL
"Hendrik, like all the crew members, is suffering from scurvy. His face
is gray, his eyes are sunken, and his skin is blotched and sallow. He
is dying." CR>)
(<VERB? GIVE>
<COND (<FSET? ,HENDRIK ,RMUNGBIT>
<YOULL-HAVE-TO "wake him">)