-
Notifications
You must be signed in to change notification settings - Fork 124
/
heart.zil
1979 lines (1857 loc) · 58.6 KB
/
heart.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
"HEART for
THE HITCHHIKER'S GUIDE TO THE GALAXY
(c) Copyright 1984 Infocom, Inc. All Rights Reserved."
<ROUTINE IN-HEART? (OBJ)
<COND (<OR <EQUAL? <META-LOC .OBJ> ,ENTRY-BAY ,FORE-CORRIDOR ,AFT-CORRIDOR>
<EQUAL? <META-LOC .OBJ> ,GALLEY ,BRIDGE ,ENGINE-ROOM>
<EQUAL? <META-LOC .OBJ> ,HATCHWAY ,PANTRY ,ACCESS-SPACE>>
<RTRUE>)
(T
<RFALSE>)>>
<OBJECT HEART-OF-GOLD
(IN LOCAL-GLOBALS)
(DESC "the Heart of Gold")
(SYNONYM HEART GOLD SHIP SPACES)
(ADJECTIVE SPACE INCRED NEW)
(FLAGS NARTICLEBIT)
(ACTION HEART-OF-GOLD-F)>
<ROUTINE HEART-OF-GOLD-F ()
<COND (<VERB? LEAVE EXIT DISEMBARK>
<COND (<EQUAL? ,HERE ,HATCHWAY>
<DO-WALK ,P?DOWN>)
(<EQUAL? ,HERE ,DAIS>
<TELL ,LOOK-AROUND CR>)
(T
<V-WALK-AROUND>)>)
(<VERB? THROUGH WALK-TO BOARD>
<COND (<EQUAL? ,HERE ,DAIS>
<DO-WALK ,P?EAST>)
(<IN-HEART? ,PROTAGONIST>
<TELL ,LOOK-AROUND CR>)>)>>
<GLOBAL TEA-SHOWN <>>
<GLOBAL SUBSTITUTE-DRUNK <>>
<ROOM PANTRY
(IN ROOMS)
(SYNONYM INTELL)
(DESC "Marvin's Pantry")
(LDESC "This is a small closet with an exit to starboard.")
(EAST TO AFT-CORRIDOR)
(OUT TO AFT-CORRIDOR)
(FLAGS RLANDBIT ONBIT NARTICLEBIT)
(PSEUDO "PANTRY" GLOBAL-ROOM-F "CLOSET" GLOBAL-ROOM-F)
(GLOBAL HEART-OF-GOLD SCREENING-DOOR)
(ACTION PANTRY-F)>
<ROUTINE PANTRY-F (RARG)
<COND (<EQUAL? .RARG ,M-ENTER>
<COND (<NOT ,LANDED>
<MOVE ,MARVIN ,HERE>
<DISABLE <INT I-MARVIN>>)>
<COND (<FSET? ,SCREENING-DOOR ,MUNGEDBIT>
<TELL
"As you pass the door, it slams against you, bruising your upper arm, and then
opens again. \"Take that, door-kicker.\"" CR CR>)>
<TELL
"Upon entering the room, you are battered by tidal waves of depression. ">
<COND (<L? ,SCORE 300>
<JIGS-UP "In fact, a lethal dose.">
<RTRUE>)
(T
<COND (<NOT <FSET? ,PANTRY ,REVISITBIT>>
<FSET ,PANTRY ,REVISITBIT>
<SETG SCORE <+ ,SCORE 25>>)>
<TELL
"However, the happiness derived from your high score and that thoroughly
excellent cup of tea you had recently help you to survive." CR CR>)>)>>
<OBJECT SCREENING-DOOR
(IN LOCAL-GLOBALS)
(DESC "screening door")
(SYNONYM DOOR)
(ADJECTIVE SCREEN)
(FLAGS DOORBIT NDESCBIT ACTORBIT)
(ACTION SCREENING-DOOR-F)>
<ROUTINE SCREENING-DOOR-F ()
<COND (<EQUAL? ,SCREENING-DOOR ,WINNER>
<COND (<AND <VERB? TELL-ABOUT>
<PRSO? ,ME>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?ASK-ABOUT ,SCREENING-DOOR ,PRSI>
<SETG WINNER ,SCREENING-DOOR>
<RTRUE>)
(<VERB? HELLO>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?HELLO ,SCREENING-DOOR>
<SETG WINNER ,SCREENING-DOOR>
<RTRUE>)
(<AND <VERB? WHAT>
<PRSO? ,OBJECT-OF-GAME>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?ASK-ABOUT ,SCREENING-DOOR ,OBJECT-OF-GAME>
<SETG WINNER ,SCREENING-DOOR>
<RTRUE>)
(T
<TELL
"\"Unless you're here to show me some clear sign of your intelligence, please
leave me alone. I'm a very busy door.\"" CR>
<FUCKING-CLEAR>)>)
(<AND <FSET? ,SCREENING-DOOR ,OPENBIT>
<VERB? SHOW GIVE KNOCK OPEN>>
<TELL "You already induced the door to open." CR>)
(<AND <FSET? ,SCREENING-DOOR ,OPENBIT>
<VERB? CLOSE>>
<TELL
"The door snaps, \"Hey! I'm resting. I've had a very busy day.\"" CR>)
(<VERB? KICK>
<FSET ,SCREENING-DOOR ,MUNGEDBIT>
<TELL
"\"I suppose you think that since you have legs and I have not, you can get
away with that sort of thing. Well,\" the door continues stiffly, \"maybe you
can and maybe you can't.\"" CR>)
(<VERB? SHOW GIVE>
<COND (<AND <PRSO? ,TEA ,NO-TEA>
,TEA-SHOWN
<HELD? ,TEA>
,HOLDING-NO-TEA
<NOT <PRSO? ,TEA-SHOWN>>>
<PERFORM ,V?KNOCK ,SCREENING-DOOR>
<RTRUE>)
(T
<COND (<PRSO? ,TEA ,NO-TEA>
<SETG TEA-SHOWN ,PRSO>)>
<COND (<PROB 50>
<TELL
"The door says \"Big deal. Anyone can have">
<ARTICLE ,PRSO>
<TELL ".\"" CR>)
(T
<TELL "The door yawns." CR>)>)>)
(<VERB? OPEN KNOCK>
<COND (<AND <HELD? ,TEA>
,HOLDING-NO-TEA>
<FSET ,SCREENING-DOOR ,OPENBIT>
<TELL
"The door is almost speechless with admiration. \"Wow. Simultaneous tea
and no tea. My apologies. You are clearly a heavy-duty philosopher.\" It
opens respectfully." CR>)
(T
<TELL
"The door explains, in a haughty tone, that the room is occupied by a
super-intelligent robot and that lesser beings (by which it means you)
are not to be admitted. \"Show me some tiny example of your intelligence,\"
it says, \"and maybe, just maybe, I might reconsider.\"" CR>)>)
(<AND <VERB? ASK-ABOUT>
<PRSI? ,OBJECT-OF-GAME>>
<TELL "\"To keep out sub-intelligent beings.\"" CR>)
(<VERB? THROUGH>
<COND (<EQUAL? ,HERE ,PANTRY>
<DO-WALK ,P?EAST>)
(T
<DO-WALK ,P?WEST>)>)
(<VERB? EXAMINE>
<FCLEAR ,SCREENING-DOOR ,ACTORBIT>
<V-LOOK-INSIDE>
<FSET ,SCREENING-DOOR ,ACTORBIT>)>>
<OBJECT MARVIN
(IN PANTRY)
(DESC "Marvin")
(LDESC "Marvin, the Paranoid Android, is here.")
(SYNONYM MARVIN MARV ROBOT ANDROI)
(ADJECTIVE DEPRES PARANO)
(FLAGS NARTICLEBIT ACTORBIT)
(ACTION MARVIN-F)>
<ROUTINE MARVIN-F ()
<COND (<EQUAL? ,MARVIN ,WINNER>
<COND (<AND <VERB? TELL-ABOUT>
<PRSO? ,ME>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?ASK-ABOUT ,MARVIN ,PRSI>
<SETG WINNER ,MARVIN>
<RTRUE>)
(<VERB? HELLO>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?HELLO ,MARVIN>
<SETG WINNER ,MARVIN>
<RTRUE>)
(<AND <VERB? WHAT>
<PRSO? ,OBJECT-OF-GAME>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?ASK-ABOUT ,MARVIN ,OBJECT-OF-GAME>
<SETG WINNER ,MARVIN>
<RTRUE>)
(<EQUAL? ,HERE ,PANTRY>
<COND (<AND <VERB? REPAIR OPEN>
<PRSO? ,HATCH ,MECHANISM>>
<COND (<NOT ,LANDED>
<TELL
"\"" ,HUMANS "stupid. Are you aware,\" he asks, \"that this ship is in
space, that space is an almost perfect vacuum, and that the hatch is the
only thing holding in all the air?\"" CR>)
(<EQUAL? ,MARVIN-COUNTER 3>
<TELL
"\"After the help I got last time? " ,HUMANS "ungrateful. Go away.\""CR>)
(<EQUAL? ,MARVIN-COUNTER 4>
<TELL "\"I did.\"" CR>)
(<G? ,MARVIN-COUNTER 0>
<TELL
"\"Yes, I said I'd do it! " ,HUMANS "repetitious.\"" CR>)
(T
<SETG MARVIN-COUNTER 1>
<ENABLE <QUEUE I-MARVIN 12>>
<TELL
"\"" ,HUMANS "demanding. Do this. Pick up that. Unjam the opening mechanism
of the other. Meet me in the hatchway " D ,ACCESS-SPACE " in twelve turns. I
suppose,\" he mutters, \"you can count up to twelve. So hard to know with
morons. And don't forget to bring the proper tool.\"" CR>)>)
(<AND <VERB? WHAT>
<PRSO? ,TWEEZERS>
<G? ,MARVIN-COUNTER 0>>
<TELL
"Marvin looks scornful. \"How did you get past my door if you're so
primordially benighted that you don't even know which tool is needed
for a job like this?\"" CR>)
(T
<TELL "\"Please don't feel you have
to take any notice of me. I'm just a menial robot.\"" CR>
<FUCKING-CLEAR>)>)
(T
<TELL
"\"I think you ought to know I'm feeling very depressed.\"" CR>
<FUCKING-CLEAR>)>)
(<AND <VERB? ASK-ABOUT>
<PRSI? ,OBJECT-OF-GAME>>
<TELL
"\"Being clever doesn't always make you happy, you know. Look at me, brain
the size of a planet, how many points do you think I've got? Minus thirty
zillion at the last count.\"" CR>)
(<AND <VERB? FOLLOW>
<EQUAL? ,FOLLOW-FLAG 2>>
<COND (<IN? ,MARVIN ,PANTRY>
<DO-WALK ,P?WEST>)
(T
<GOTO <LOC ,MARVIN>>)>)
(<AND <VERB? FOLLOW>
<EQUAL? ,FOLLOW-FLAG 7>>
<DO-WALK ,P?WEST>)
(<AND <VERB? GIVE>
<EQUAL? ,MARVIN-COUNTER 2>>
<COND (<PRSO? ,TOOL-REQUIRED>
<SETG SCORE <+ ,SCORE 25>>
<SETG MARVIN-COUNTER 4>
<SETG FOLLOW-FLAG 7>
<ENABLE <QUEUE I-FOLLOW 2>>
<DISABLE <INT I-MARVIN>>
<FSET ,HATCH ,OPENBIT>
<MOVE ,MARVIN ,PANTRY>
<MOVE ,TOOL-REQUIRED ,MARVIN>
<TELL
"Marvin fiddles inside the " D ,MECHANISM " with the " D ,TOOL-REQUIRED " for
about three-tenths of a second. You hear the hatchway slide open. \"I don't
expect you to be grateful,\" says Marvin, \"or even interested, but that was
probably more complicated than every single action you'll ever perform in your
entire life put together.\" He limps away. \"And me,\" you hear him mutter as
he goes, \"with this terrible pain in all the diodes down my left side.\"" CR>)
(T
<TELL "\"That's not">
<ARTICLE ,TOOL-REQUIRED>
<TELL ".\"" CR>)>)>>
<ROUTINE I-MARVIN ()
<ENABLE <QUEUE I-MARVIN -1>>
<COND (<EQUAL? ,MARVIN-COUNTER 2>
<SETG MARVIN-COUNTER 3>
<CRLF>
<COND (<EQUAL? ,HERE ,HATCHWAY>
<TELL "Marvin emerges from the " D, ACCESS-SPACE ". ">)>
<TELL "\"">
<MARVIN-BITCH>
<SETG MARVIN-COUNTER 3>)
(<IN? ,MARVIN ,ACCESS-SPACE>
<COND (<EQUAL? ,HERE ,ACCESS-SPACE>
<COND (<NOT ,TOOL-REQUIRED>
<REPEAT ()
<SETG TOOL-REQUIRED <PICK-ONE ,TOOL-LIST>>
<COND (<NOT <HELD? ,TOOL-REQUIRED ,PROTAGONIST>>
<RETURN>)>>)>
<SETG P-IT-OBJECT ,TOOL-REQUIRED>
<SETG MARVIN-COUNTER 2>
<TELL "Marvin, looking bored, says \"Hand me">
<ARTICLE ,TOOL-REQUIRED>
<TELL ".\"" CR>)
(T
<TELL CR "Marvin wanders up to you. \"I went to the "
D ,ACCESS-SPACE " but you never showed up. ">
<MARVIN-BITCH>
<SETG MARVIN-COUNTER 3>)>)
(<EQUAL? ,MARVIN-COUNTER 1>
<MOVE ,MARVIN ,ACCESS-SPACE>
<COND (<EQUAL? ,HERE ,ACCESS-SPACE>
<TELL "Marvin shambles in." CR>)
(T
<RFALSE>)>)
(<IN? ,MARVIN ,HERE>
<ENABLE <QUEUE I-FOLLOW 2>>
<SETG FOLLOW-FLAG 2>
<CRLF>
<COND (<OR <EQUAL? ,HERE ,HATCHWAY ,GALLEY ,ENTRY-BAY>
<EQUAL? ,HERE ,FORE-CORRIDOR ,ENGINE-ROOM ,BRIDGE>>
<TELL "Marvin wanders off." CR>
<COND (<EQUAL? ,HERE ,FORE-CORRIDOR
,ENGINE-ROOM ,HATCHWAY>
<MOVE ,MARVIN ,AFT-CORRIDOR>)
(T
<MOVE ,MARVIN ,FORE-CORRIDOR>)>)
(<EQUAL? ,HERE ,AFT-CORRIDOR>
<MOVE ,MARVIN ,PANTRY>
<TELL
"Marvin enters a room to port, and the door closes behind him." CR>)
(T
<TELL "Bug #17">)>)
(<NOT <IN? ,MARVIN ,PANTRY>>
<MOVE ,MARVIN ,PANTRY>
<RFALSE>)
(<OR <NOT <IN-HEART? ,PROTAGONIST>>
<EQUAL? ,HERE ,ACCESS-SPACE>
<FSET? ,SCREENING-DOOR ,OPENBIT>
,AWAITING-REPLY>
<RFALSE>)
(<AND <EQUAL? ,HERE ,ENGINE-ROOM>
<L? ,LOOK-COUNTER 3>>
<RFALSE>)
(<PROB 8>
<MOVE ,MARVIN ,HERE>
<TELL CR
"You feel a wave of depression sweep over you, and you turn to see that
Marvin the robot has stalked miserably into the room." CR>)
(T
<RFALSE>)>>
<ROUTINE MARVIN-BITCH ()
<DISABLE <INT I-MARVIN>>
<MOVE ,MARVIN ,PANTRY>
<TELL
"Ah. I was misled into thinking that you wanted me to open the hatch,
probably by the fact that you asked me to. Obviously you changed your mind
or I misunderstood you or you are a moronic imbecile. I wonder which">
<COND (<NOT <EQUAL? ,HERE ,PANTRY>>
<TELL
". I'm going back to my pantry to be alone with my grief">)>
<TELL ".\" Marvin stalks miserably away." CR>>
<GLOBAL MARVIN-COUNTER 0>
;"1 = Marvin's been asked to fix hatch.
2 = Marvin's waiting for you to hand him the right tool.
3 = Marvin's pissed because you weren't there or gave him the wrong tool.
4 = Marvin's already opened the hatch."
<GLOBAL TOOL-REQUIRED <>>
<GLOBAL FLUFF-COUNTER 0>
<GLOBAL PLANT-BLOOMED <>>
<OBJECT FLOWERPOT
(IN INSIDE-WHALE)
(DESC "flowerpot")
(SYNONYM FLOWER POT SOIL DIRT)
(ADJECTIVE FLOWER FERTIL)
(CAPACITY 1)
(SIZE 15)
(FLAGS TAKEBIT CONTBIT OPENBIT)
(ACTION FLOWERPOT-F)>
<ROUTINE FLOWERPOT-F ()
<COND (<AND <VERB? WATER>
<PRSO? ,FLOWERPOT>
<IN? ,PLANT ,FLOWERPOT>>
<PERFORM ,V?WATER ,PLANT ,PRSI>
<RTRUE>)
(<VERB? EXAMINE READ LOOK-INSIDE>
<TELL "The pot is filled with fertile soil">
<COND (<IN? ,PLANT ,FLOWERPOT>
<TELL ", out of which has sprouted a ">
<COND (,PLANT-BLOOMED
<TELL "large, leafy plant">)
(T
<TELL "tiny plant stalk">)>)
(T
<TELL
". It is inscribed \"Inertial Guidance System -- Magrathean Missile Company.\"
It must have been created by the same burst of improbability that created
the whale itself">)>
<TELL "." CR>)
(<AND <VERB? PUT>
<PRSO? ,POCKET-FLUFF ,JACKET-FLUFF
,SATCHEL-FLUFF ,CUSHION-FLUFF>>
<MOVE ,PRSO ,LOCAL-GLOBALS>
<SETG FLUFF-COUNTER <+ ,FLUFF-COUNTER 1>>
<COND (<EQUAL? ,FLUFF-COUNTER 4>
<ENABLE <QUEUE I-PLANT 10>>)>
<TELL
"You dig a " D ,FISH-HOLE ", gingerly place the fluff at the bottom, and
cover it over." CR>)
(<AND <VERB? OPEN CLOSE>
<PRSO? ,FLOWERPOT>>
<TELL-ME-HOW>)>>
<ROUTINE I-PLANT ()
<MOVE ,PLANT ,FLOWERPOT>
<COND (<VISIBLE? ,FLOWERPOT>
<TELL CR
"You notice a tiny movement from the " D ,FLOWERPOT ". You look closely, and
see a tiny sprout poking out of the soil." CR>)
(T
<RFALSE>)>>
<OBJECT PLANT
(IN LOCAL-GLOBALS) ;"just for the purpose of MOBY-FIND"
(DESC "plant")
(SYNONYM PLANT SPROUT STEM STALK)
(ADJECTIVE SMALL LARGE LEAFY)
(FLAGS NDESCBIT INTEGRALBIT)
(ACTION PLANT-F)>
<ROUTINE PLANT-F ()
<COND (<VERB? EXAMINE>
<COND (,PLANT-BLOOMED
<TELL "The plant is now large and leafy.">
<COND (<AND <FSET? ,FRUIT ,NDESCBIT>
<VISIBLE? ,FRUIT>>
<TELL
" Hanging from it is a large, succulent fruit.">)>
<CRLF>)
(T
<TELL "The plant is just a tiny stem." CR>)>)
(<AND <VERB? TAKE DROP>
<PRSO? ,PLANT>>
<COND (,PRSI
<PART-OF>)
(T
<PERFORM ,PRSA ,FLOWERPOT ,PRSI>
<RTRUE>)>)
(<AND <VERB? WATER>
<NOT ,PLANT-BLOOMED>
<PRSI? ,MINERAL-WATER ,SUBSTITUTE ,TEA>>
<MOVE ,PRSI ,LOCAL-GLOBALS>
<MOVE ,PLANT ,LOCAL-GLOBALS>
<TELL "After several seconds, the plant shrivels up.">
<ANTI-LITTER "cup">
<CRLF>)>>
<OBJECT FRUIT
(IN LOCAL-GLOBALS) ;"just for the purpose of MOBY-FIND"
(DESC "fruit")
(SYNONYM FRUIT)
(ADJECTIVE LARGE SUCCUL)
(FLAGS NDESCBIT TRYTAKEBIT TAKEBIT EATBIT)
(ACTION FRUIT-F)>
<ROUTINE FRUIT-F ("AUX" X)
<COND (<AND <VERB? TAKE PICK>
<FSET? ,FRUIT ,TRYTAKEBIT>>
<FCLEAR ,FRUIT ,TRYTAKEBIT>
<FCLEAR ,FRUIT ,NDESCBIT>
<MOVE ,FRUIT ,PROTAGONIST>
<TELL "Done." CR>)
(<AND <VERB? DROP THROW>
<FSET? ,FRUIT ,TRYTAKEBIT>>
<FCLEAR ,FRUIT ,TRYTAKEBIT>
<FCLEAR ,FRUIT ,NDESCBIT>
<MOVE ,FRUIT ,HERE>
<COND (<VERB? DROP>
<TELL "Dropped." CR>)
(T
<TELL "Thrown." CR>)>)
(<VERB? EAT>
<REPEAT ()
<SETG TOOL-REQUIRED <PICK-ONE ,TOOL-LIST>>
<SET X <+ .X 1>>
<COND (<OR <NOT <IN-HEART? ,TOOL-REQUIRED>>
<G? .X 50>>
<RETURN>)>>
<MOVE ,FRUIT ,LOCAL-GLOBALS>
<TELL
"The fruit has a zesty taste, and you devour it greedily. Suddenly, your vision
wavers, and you see yourself, as though from a distance, standing near Marvin,
who asks you for">
<ARTICLE ,TOOL-REQUIRED>
<TELL
". Then, the image vanishes like a movie when the film breaks, and you find
yourself still in">
<ARTICLE ,HERE T>
<TELL ".|
|
It seems that this plant is a rare horticultural phenomenon long thought to
be extinct: The Tree of Foreknowledge." CR>)>>
<ROOM GALLEY
(IN ROOMS)
(SYNONYM CORPOR SCC)
(ADJECTIVE SIRIUS CYBERN)
(DESC "Galley")
(EAST TO FORE-CORRIDOR)
(OUT TO FORE-CORRIDOR)
(FLAGS RLANDBIT ONBIT)
(PSEUDO "GALLEY" GLOBAL-ROOM-F)
(GLOBAL HEART-OF-GOLD)
(ACTION GALLEY-F)>
<ROUTINE GALLEY-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"You are in the Galley area of the ship, containing a machine which is the
state of the art in Nutritional Technology, a " ,SCC " " D ,NUTRIMAT ". There
is an exit to starboard." CR>)
(<AND <EQUAL? .RARG ,M-END>
<NOT <RUNNING? ,I-TEA>>
<PROB 3>>
<SETG FOLLOW-FLAG 6>
<ENABLE <QUEUE I-FOLLOW 2>>
<TELL CR
D ,ZAPHOD " walks in and presses the " D ,PAD ". The " D ,NUTRIMAT
" produces a huge, ice-cold Pan-Galactic Gargle Blaster. Zaphod heads off
toward the sauna, sipping loudly." CR>)>>
<OBJECT NUTRIMAT
(IN GALLEY)
(DESC "Nutrimat")
(SYNONYM NUTRIM MACHIN PANEL)
(ADJECTIVE SERVIC)
(FLAGS NDESCBIT ACTORBIT CONTBIT LIGHTBIT SEARCHBIT)
(ACTION NUTRIMAT-F)>
<ROUTINE NUTRIMAT-F ()
<COND (<EQUAL? ,NUTRIMAT ,WINNER>
<COND (<AND <VERB? TELL-ABOUT>
<PRSO? ,ME>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?ASK-ABOUT ,NUTRIMAT ,PRSI>
<SETG WINNER ,NUTRIMAT>
<RTRUE>)
(<VERB? HELLO>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?HELLO ,NUTRIMAT>
<SETG WINNER ,NUTRIMAT>
<RTRUE>)
(<AND <VERB? WHAT>
<PRSO? ,OBJECT-OF-GAME>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?ASK-ABOUT ,NUTRIMAT ,OBJECT-OF-GAME>
<SETG WINNER ,NUTRIMAT>
<RTRUE>)
(<OR <AND <VERB? SGIVE>
<PRSO? ,ME>>
<AND <VERB? GIVE>
<PRSI? ,ME>>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?ASK-FOR ,NUTRIMAT ,PRSI>
<SETG WINNER ,NUTRIMAT>
<RTRUE>)
(<AND <VERB? MAKE>
<PRSO? ,TEA ,NO-TEA>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?RUB ,PAD>
<SETG WINNER ,NUTRIMAT>
<RTRUE>)
(T
<TELL "The " D ,NUTRIMAT " ignores you." CR>
<FUCKING-CLEAR>)>)
(<VERB? EXAMINE>
<TELL
"The " D ,NUTRIMAT " has a " D ,PAD ", a dispensing slot, and a
service panel which is ">
<COND (<FSET? ,NUTRIMAT ,OPENBIT>
<TELL "open">)
(T
<TELL "closed">)>
<TELL ".">
<FINE-PRODUCT>
<COND (<RUNNING? ,I-TEA>
<TELL " ">
<PERFORM ,V?LISTEN ,NUTRIMAT>
<RTRUE>)
(T
<CRLF>)>)
(<AND <VERB? LISTEN>
<RUNNING? ,I-TEA>>
<TELL
"The " D ,NUTRIMAT " is making a faint whirring noise." CR>)
(<AND <VERB? ASK-FOR>
<PRSI? ,TEA ,SUBSTITUTE>>
<PERFORM ,V?RUB ,PAD>
<RTRUE>)
(<VERB? LAMP-ON>
<PERFORM ,V?RUB ,PAD>
<RTRUE>)
(<AND <VERB? LAMP-OFF>
<RUNNING? ,I-TEA>>
<PERFORM ,V?RUB ,PAD>
<RTRUE>)
(<AND <VERB? KILL KICK SHAKE>
,SUBSTITUTE-DRUNK>
<TELL "The " D ,NUTRIMAT " says ">
<COND (<PROB 50>
<TELL "\"Share and Enjoy.\"" CR>)
(T
<TELL
"\"If you have enjoyed the experience of this drink, why not share it with
your friends?\"" CR>)>)
(<AND <VERB? PUT PLUG>
<PRSI? ,NUTRIMAT>>
<COND (<NOT <FSET? ,NUTRIMAT ,OPENBIT>>
<TELL "The panel is closed." CR>)
(<FIRST? ,NUTRIMAT>
<TELL "There's no room." CR>)
(<PRSO? ,BOARD ,NUT-COM-INTERFACE>
<MOVE ,PRSO ,NUTRIMAT>
<TELL "Done." CR>)
(T
<V-PLUG>)>)
(<VERB? LOOK-INSIDE>
<COND (<NOT <FSET? ,NUTRIMAT ,OPENBIT>>
<PERFORM ,V?OPEN ,NUTRIMAT>
<RTRUE>)
(<IN? ,BOARD ,NUTRIMAT>
<TELL "There is a " D ,BOARD " there." CR>)
(<IN? ,NUT-COM-INTERFACE ,NUTRIMAT>
<TELL "There is a " D ,NUT-COM-INTERFACE " there." CR>)
(T
<TELL "There's nothing in the " D ,NUTRIMAT "." CR>)>)
(<AND <VERB? ASK-ABOUT>
<PRSI? ,OBJECT-OF-GAME>>
<TELL
"\"To provide a nutritious and flavour-enhanced diet.\"" CR>)>>
<OBJECT PAD
(IN GALLEY)
(DESC "touch-sensitive pad")
(SYNONYM PAD)
(ADJECTIVE TOUCH SENSIT)
(FLAGS NDESCBIT)
(ACTION PAD-F)>
<ROUTINE PAD-F ()
<COND (<VERB? RUB PUSH>
<COND (<IN? ,NUT-COM-INTERFACE ,NUTRIMAT>
<COND (<RUNNING? ,I-TEA>
<TELL
"\"Please wait..." D ,NUTRIMAT " engaged.\"" CR>)
(<IN? ,TEA ,PAD>
<ENABLE <QUEUE I-TEA -1>>
<TELL
"The " D ,NUTRIMAT " is puzzled that you want something made by pouring
boiling water on dead leaves and squirting stuff from a cow in it, and
says that it will need some help from " D ,EDDIE "." CR>)
(T
<TELL
"\"I won't go through that again. If " D ,SUBSTITUTE " isn't good
enough, too bad.\"" CR>)>)
(<IN? ,SUBSTITUTE ,PAD>
<MOVE ,SUBSTITUTE ,SLOT>
<SETG P-IT-OBJECT ,SUBSTITUTE>
<TELL
"The " D ,NUTRIMAT " makes an instant but highly detailed examination of
your taste buds, a spectroscopic analysis of your metabolism and
sends tiny experimental signals down your neural pathways to see
what you like.|
A cupful of " D ,SUBSTITUTE " appears in the dispensing slot." CR>)
(T
<TELL
"\"You still haven't drunk the nutritious and flavour-enhanced cupful of "
D ,SUBSTITUTE " I already gave you,\" scolds the " D ,NUTRIMAT "." CR>)>)>>
<OBJECT SLOT
(IN GALLEY)
(DESC "slot")
(SYNONYM SLOT)
(ADJECTIVE DISPEN)
(FLAGS NDESCBIT CONTBIT OPENBIT SEARCHBIT)
(CAPACITY 20)
(ACTION SLOT-F)>
<ROUTINE SLOT-F ()
<COND (<AND <VERB? OPEN CLOSE>
<PRSO? ,SLOT>>
<TELL-ME-HOW>)>>
<OBJECT BOARD
(IN NUTRIMAT)
(DESC "circuit board")
(SYNONYM BOARD MESSAG LETTER MICROC)
(ADJECTIVE CIRCUI MICROS PRINTE)
(FLAGS TAKEBIT CONTBIT TRANSBIT)
(ACTION BOARD-F)>
<ROUTINE BOARD-F ()
<COND (<AND <VERB? OPEN CLOSE>
<PRSO? ,BOARD>>
<TELL-ME-HOW>)
(<VERB? EXAMINE>
<TELL
"The " D ,PRSO " is square, about ten inches on each side. It has a number
of microchips, some printed circuitry, and a message printed in microscopic
letters. There are also eight " D ,DIPSWITCH "es, marked:|
1 Cholesterol Register|
2 MSG Specifier|
3 Thiamin Stack|
4 Piquant-O-Mat|
5 Flavour Dump|
6 Vitamin Interrupts|
7 Nose Sequencer|
8 Bouquet Arbitration Bus" CR>)
(<VERB? MUNG>
<MOVE ,BOARD ,LOCAL-GLOBALS>
<TELL
"It's all the device deserves. It shatters with a satisfying crunch." CR>)
(<AND <VERB? READ EXAMINE-THROUGH>
<PRSI? ,MAGNIFYING-GLASS>>
<TELL
"The message reads \"This is just a satirical device. It has no
practical function.\"" CR>)
(<VERB? READ>
<TELL "The message is too small for you to read." CR>)>>
<OBJECT DIPSWITCH
(IN BOARD)
(DESC "dipswitch")
(SYNONYM SWITCH DIPSWI)
(ADJECTIVE FIRST SECOND THIRD FOURTH FIFTH SIXTH SEVENT EIGHTH)
(FLAGS NDESCBIT SWITCHBIT)
(ACTION DIPSWITCH-F)>
<ROUTINE DIPSWITCH-F ()
<COND (<VERB? TURN THROW LAMP-ON LAMP-OFF PUSH MOVE>
<TELL "Switched.">
<COND (<IN? ,BOARD ,NUTRIMAT>
<TELL
" Some lights on the " D ,NUTRIMAT " flash briefly. A promising hum
quickly dies away." CR>)
(T
<CRLF>
<RTRUE>)>)>>
;<OBJECT DIPSWITCH-8
(IN BOARD)
(DESC "eighth dipswitch")
(SYNONYM SWITCH DIPSWI)
(ADJECTIVE EIGHTH DIP)
(FLAGS NDESCBIT SWITCHBIT)
(ACTION DIPSWITCH-F)>
;<OBJECT DIPSWITCH-7
(IN BOARD)
(DESC "seventh dipswitch")
(SYNONYM SWITCH DIPSWI)
(ADJECTIVE SEVENTH DIP)
(FLAGS NDESCBIT SWITCHBIT)
(ACTION DIPSWITCH-F)>
;<OBJECT DIPSWITCH-6
(IN BOARD)
(DESC "sixth dipswitch")
(SYNONYM SWITCH DIPSWI)
(ADJECTIVE SIXTH DIP)
(FLAGS NDESCBIT SWITCHBIT)
(ACTION DIPSWITCH-F)>
;<OBJECT DIPSWITCH-5
(IN BOARD)
(DESC "fifth dipswitch")
(SYNONYM SWITCH DIPSWI)
(ADJECTIVE FIFTH DIP)
(FLAGS NDESCBIT SWITCHBIT)
(ACTION DIPSWITCH-F)>
;<OBJECT DIPSWITCH-4
(IN BOARD)
(DESC "fourth dipswitch")
(SYNONYM SWITCH DIPSWI)
(ADJECTIVE FOURTH DIP)
(FLAGS NDESCBIT SWITCHBIT)
(ACTION DIPSWITCH-F)>
;<OBJECT DIPSWITCH-3
(IN BOARD)
(DESC "third dipswitch")
(SYNONYM SWITCH DIPSWI)
(ADJECTIVE THIRD DIP)
(FLAGS NDESCBIT SWITCHBIT)
(ACTION DIPSWITCH-F)>
;<OBJECT DIPSWITCH-2
(IN BOARD)
(DESC "second dipswitch")
(SYNONYM SWITCH DIPSWI)
(ADJECTIVE SECOND DIP)
(FLAGS NDESCBIT SWITCHBIT)
(ACTION DIPSWITCH-F)>
<OBJECT SUBSTITUTE
(IN PAD)
(DESC "Advanced Tea Substitute")
(DESCFCN SUBSTITUTE-DESCFCN)
(SYNONYM CUP CUPFUL SUBSTI ATS)
(ADJECTIVE TEA ADVANC NICE HOT)
(FLAGS NARTICLEBIT VOWELBIT TAKEBIT DRINKBIT)
(ACTION SUBSTITUTE-F)>
<ROUTINE SUBSTITUTE-DESCFCN ("OPTIONAL" X)
<DESCRIBE-DRINK ,SUBSTITUTE>>
<ROUTINE SUBSTITUTE-F ()
<COND (<VERB? DRINK ENJOY DRINK-FROM>
<COND (<NOT <HELD? ,SUBSTITUTE>>
<TELL ,NOT-HOLDING " the cup!" CR>
<RTRUE>)
(<G? ,SCORE 300>
<TELL
"You'd rather continue savouring that delicious tea." CR>
<RTRUE>)
(,SUBSTITUTE-DRUNK
<SETG SCORE <- ,SCORE 30>>
<SETG DREAMING <>>
<TELL "That last gulp of the vile " D ,SUBSTITUTE>
<JIGS-UP
" was a bit too much for you. You expire from sheer misery and unhappiness.">
<RTRUE>)>
<COND (<EQUAL? ,SUBSTITUTE ,BROWNIAN-SOURCE>
<SETG BROWNIAN-SOURCE <>>)>
<SETG SUBSTITUTE-DRUNK T>
<SETG SCORE <- ,SCORE 30>>
<MOVE ,SUBSTITUTE ,PAD>
<TELL
"It tastes almost, but not quite, entirely unlike tea. It's absolutely
disgusting.">
<ANTI-LITTER "cup">
<COND (<EQUAL? ,HERE ,GALLEY>
<TELL " ">
<PERFORM ,V?KILL ,NUTRIMAT>
<RTRUE>)>
<CRLF>)
(<VERB? EXAMINE LOOK-INSIDE>
<TELL
"About the only characteristic it shares with tea is that of" ,BROWNIAN ".">
<COND (<PRSO? ,BROWNIAN-SOURCE>
<TELL " ">
<PERFORM ,V?EXAMINE ,DANGLY-BIT>
<RTRUE>)
(T
<CRLF>)>)
(<VERB? POUR THROW>
<LIQUID-SPILL>)>>
<OBJECT INTERFACE-BOX
(IN GALLEY)
(DESC "shipping carton")
(LDESC
"A carton labelled \"Nutrimat/Computer Interface\" is sitting here.")
(SYNONYM CARTON BOX)
(ADJECTIVE SHIPPI)
(FLAGS CONTBIT TAKEBIT SEARCHBIT READBIT)
(SIZE 15)
(CAPACITY 14)
(ACTION INTERFACE-BOX-F)>
<ROUTINE INTERFACE-BOX-F ()
<COND (<VERB? READ EXAMINE>
<TELL
"The carton is labelled \"" D ,NUT-COM-INTERFACE ".\"" CR>
<COND (<VERB? EXAMINE>
<RFALSE>)
(T
<RTRUE>)>)>>
<OBJECT BEAST-GUN
(IN INTERFACE-BOX)
(DESC "strange gun")
(SYNONYM GUN WEAPON)
(ADJECTIVE STRANGE RAY ANTI- BEAST)
(FLAGS TAKEBIT)
(SIZE 4)
(ACTION BEAST-GUN-F)>
<ROUTINE BEAST-GUN-F ()
<COND (<VERB? EXAMINE READ>
<TELL
"The gun has a large label which reads \"Anti-Bugblatter Beast Ray Gun.\"">
<FINE-PRODUCT>
<CRLF>)>>
<GLOBAL GUN-COUNTER 0>
<GLOBAL TEA-COUNTER 0>
<GLOBAL LANDED <>>
<ROUTINE I-TEA ()
<SETG TEA-COUNTER <+ ,TEA-COUNTER 1>>
<COND (<AND <NOT <EQUAL? ,HERE ,GALLEY>>
<L? ,TEA-COUNTER 7>>
<RFALSE>)>
<CRLF>
<COND (<EQUAL? ,TEA-COUNTER 1>
<TELL "The nutrimat begins to whirr." CR>)
(<EQUAL? ,TEA-COUNTER 2>
<TELL
"A red sign lights up saying:|
MEMORY OVERLOAD" CR>)
(<EQUAL? ,TEA-COUNTER 3>
<TELL
"Another red sign lights up saying:|
RESERVE MEMORY OVERLOAD" CR>)
(<EQUAL? ,TEA-COUNTER 4>
<TELL
"A third sign lights up:|
PROCESSOR OVERLOAD,|
SWITCH TO TERMINAL MODE" CR>)
(<EQUAL? ,TEA-COUNTER 5>
<TELL
"A blue sign lights up:|
NUTRIMAT GOING ON LINE" CR>)
(<EQUAL? ,TEA-COUNTER 6>
<TELL
"More and more signs light up:|
SHIPBOARD COMPUTER ACCESSED|
MAIN MEMORY OVERLOAD|
RESERVE MEMORY ACCESSED|
PARALLEL PROCESSORS ON LINE|
|
****************************|
** NUMBERS BEING CRUNCHED **|
****************************" CR>)
(<EQUAL? ,TEA-COUNTER 7>
<FSET ,THUMB ,MUNGEDBIT>
<TELL ,ANNOUNCEMENT D ,EDDIE
". Emergency situation! Nuclear missiles have just been launched at us from the
approaching planet, which my data banks indicate is" ,LOST-PLANET ". I cannot
perform evasive maneuvers because" ,ENGAGED D ,NUTRIMAT ". The missiles will
turn this ship into a huge atomic fireball in approximately eight turns. By
the way, somebody didn't finish their spinach at dinner.\"" CR>)
(<L? ,TEA-COUNTER 15>
<TELL
"You hear distant sounds of panic: shouts of anger, cries of alarm,
pounding feet." CR>)
(T
<DISABLE <INT I-TEA>>
<TELL "It seems that the missiles struck " D ,HEART-OF-GOLD>
<JIGS-UP
" about three nanoseconds ago. Sure enough, here comes that huge atomic fireb">
<RTRUE>)>>
<ROUTINE I-LANDING ()
<COND (<NOT <IN-HEART? ,PROTAGONIST>>
<ENABLE <QUEUE I-LANDING 12>>
<RFALSE>)
(T
<MOVE ,MARVIN ,PANTRY>
<DISABLE <INT I-MARVIN>>
<SETG LANDED T>
<TELL CR ,ANNOUNCEMENT D ,EDDIE
". We have just landed on" ,LOST-PLANET ". I don't want anyone going outside
until I've checked the atmosphere, climatic conditions, existence of dangerous
wildlife, airborne diseases, volcanic activity, presence of real estate agents,
and more than eight thousand other possible dangers. This routine check will
take 14.9 years. And don't even think about leaving until I finish, because
I'm jamming the hatch.\"" CR>)>>
<ROOM BRIDGE
(IN ROOMS)
(SYNONYM MOVEME MOTION RANDOM)
(ADJECTIVE BROWNI)
(DESC "Bridge")
(DOWN TO FORE-CORRIDOR)
(WEST PER SAUNA-ENTER-F)
(FLAGS ONBIT RLANDBIT)
(GLOBAL STAIRS CONTROLS HEART-OF-GOLD)
(PSEUDO "SAUNA" SAUNA-PSEUDO "PEOPLE" PEOPLE-PSEUDO)
(ACTION BRIDGE-F)>
<ROUTINE SAUNA-ENTER-F ()
<UNPLUG-HELD-STUFF>
<SETG MOVES <+ ,MOVES <+ 10 <RANDOM 12>>>>
<TELL "You enter the sauna. After several ">
<COND (<RUNNING? ,I-FORD>
<TELL "minutes">)
(T
<TELL "hours">)>
<TELL ", you come out a changed man.">
<COND (<AND <HELD? ,FLOWERPOT>
<IN? ,PLANT ,FLOWERPOT>
<NOT ,PLANT-BLOOMED>>
<SETG PLANT-BLOOMED T>
<SETG SCORE <+ ,SCORE 25>>
<MOVE ,FRUIT ,FLOWERPOT>
<TELL " You have with you a changed plant.">)>
<CRLF>
<COND (<IN? ,MARVIN ,BRIDGE>
<MOVE ,MARVIN ,PANTRY>)>
<RFALSE>>
<ROUTINE BRIDGE-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>