-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathzork1-decompile.txt
executable file
·11591 lines (10985 loc) · 306 KB
/
zork1-decompile.txt
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
! Output of: /home/agarvin/ztool/ztool.pike '-TuXgCRx' '/usr/games/infocom/z3/zork1-r88.z3'
! Story file is /usr/games/infocom/z3/zork1-r88.z3
Constant M_END 0;
Constant M_HANDLED 1;
Constant M_ENTER 2;
Constant M_LOOK 3;
Constant M_WAKE 4;
Constant M_FIGHT 5;
Constant M_BEFORE 6;
Release 88;
Serial "840726";
Constant true 1;
Constant false 0;
Global location;
Global score;
Global turns;
Array Villains --> [ ! 4 elements
3
[ ! 5 elements
troll
sword
1
0
Troll_melee
]
[ ! 5 elements
thief
nasty_knife
1
0
Thief_melee
]
[ ! 5 elements
cyclops
0
0
0
Cyclops_melee
]
];
Array Thief_melee --> [ ! 9 elements
[ ! 5 elements
4
[ ! 2 elements
1
"The thief stabs nonchalantly with his stiletto and misses."
]
[ ! 2 elements
1
"You dodge as the thief comes in low."
]
[ ! 2 elements
1
"You parry a lightning thrust, and the thief salutes you with a grim nod."
]
[ ! 2 elements
1
"The thief tries to sneak past your guard, but you twist away."
]
]
[ ! 3 elements
2
[ ! 2 elements
1
"Shifting in the midst of a thrust, the thief knocks you unconscious with the haft of his stiletto."
]
[ ! 2 elements
1
"The thief knocks you out."
]
]
[ ! 4 elements
3
[ ! 2 elements
1
"Finishing you off, the thief inserts his blade into your heart."
]
[ ! 2 elements
1
"The thief comes in from the side, feints, and inserts the blade into your ribs."
]
[ ! 2 elements
1
"The thief bows formally, raises his stiletto, and with a wry grin, ends the battle and your life."
]
]
[ ! 5 elements
4
[ ! 2 elements
1
"A quick thrust pinks your left arm, and blood starts to trickle down."
]
[ ! 2 elements
1
"The thief draws blood, raking his stiletto across your arm."
]
[ ! 2 elements
1
"The stiletto flashes faster than you can follow, and blood wells from your leg."
]
[ ! 2 elements
1
"The thief slowly approaches, strikes like a snake, and leaves you wounded."
]
]
[ ! 5 elements
4
[ ! 2 elements
1
"The thief strikes like a snake! The resulting wound is serious."
]
[ ! 2 elements
1
"The thief stabs a deep cut in your upper arm."
]
[ ! 2 elements
1
"The stiletto touches your forehead, and the blood obscures your vision."
]
[ ! 2 elements
1
"The thief strikes at your wrist, and suddenly your grip is slippery with blood."
]
]
[ ! 4 elements
3
[ ! 2 elements
1
"The butt of his stiletto cracks you on the skull, and you stagger back."
]
[ ! 2 elements
1
"The thief rams the haft of his blade into your stomach, leaving you out of breath."
]
[ ! 2 elements
1
"The thief attacks, and you fall back desperately."
]
]
[ ! 4 elements
3
[ ! 6 elements
5
"A long, theatrical slash. You catch it on your "
0
", but the thief twists his knife, and the "
0
" goes flying."
]
[ ! 4 elements
3
"The thief neatly flips your "
0
" out of your hands, and it drops to the floor."
]
[ ! 4 elements
3
"You parry a low thrust, and your "
0
" slips out of your hand."
]
]
[ ! 4 elements
3
[ ! 2 elements
1
"The thief, a man of superior breeding, pauses for a moment to consider the propriety of finishing you off."
]
[ ! 2 elements
1
"The thief amuses himself by searching your pockets."
]
[ ! 2 elements
1
"The thief entertains himself by rifling your pack."
]
]
[ ! 3 elements
2
[ ! 2 elements
1
"The thief, forgetting his essentially genteel upbringing, cuts your throat."
]
[ ! 2 elements
1
"The thief, a pragmatist, dispatches you as a threat to his livelihood."
]
]
];
Array Troll_melee --> [ ! 9 elements
[ ! 5 elements
4
[ ! 2 elements
1
"The troll swings his axe, but it misses."
]
[ ! 2 elements
1
"The troll's axe barely misses your ear."
]
[ ! 2 elements
1
"The axe sweeps past as you jump aside."
]
[ ! 2 elements
1
"The axe crashes against the rock, throwing sparks!"
]
]
[ ! 2 elements
1
[ ! 2 elements
1
"The flat of the troll's axe hits you delicately on the head, knocking you out."
]
]
[ ! 4 elements
3
[ ! 2 elements
1
"The troll neatly removes your head."
]
[ ! 2 elements
1
"The troll's axe stroke cleaves you from the nave to the chops."
]
[ ! 2 elements
1
"The troll's axe removes your head."
]
]
[ ! 5 elements
4
[ ! 2 elements
1
"The axe gets you right in the side. Ouch!"
]
[ ! 2 elements
1
"The flat of the troll's axe skins across your forearm."
]
[ ! 2 elements
1
"The troll's swing almost knocks you over as you barely parry in time."
]
[ ! 2 elements
1
"The troll swings his axe, and it nicks your arm as you dodge."
]
]
[ ! 4 elements
3
[ ! 4 elements
3
"The troll charges, and his axe slashes you on your "
0
" arm."
]
[ ! 2 elements
1
"An axe stroke makes a deep wound in your leg."
]
[ ! 2 elements
1
"The troll's axe swings down, gashing your shoulder."
]
]
[ ! 5 elements
4
[ ! 2 elements
1
"The troll hits you with a glancing blow, and you are momentarily stunned."
]
[ ! 2 elements
1
"The troll swings; the blade turns on your armor but crashes broadside into your head."
]
[ ! 2 elements
1
"You stagger back under a hail of axe strokes."
]
[ ! 2 elements
1
"The troll's mighty blow drops you to your knees."
]
]
[ ! 4 elements
3
[ ! 4 elements
3
"The axe hits your "
0
" and knocks it spinning."
]
[ ! 4 elements
3
"The troll swings, you parry, but the force of his blow knocks your "
0
" away."
]
[ ! 4 elements
3
"The axe knocks your "
0
" out of your hand. It falls to the floor."
]
]
[ ! 3 elements
2
[ ! 2 elements
1
"The troll hesitates, fingering his axe."
]
[ ! 2 elements
1
"The troll scratches his head ruminatively: Might you be magically protected, he wonders?"
]
]
[ ! 2 elements
1
[ ! 2 elements
1
"Conquering his fears, the troll puts you to death."
]
]
];
Array Cyclops_melee --> [ ! 9 elements
[ ! 3 elements
2
[ ! 2 elements
1
"The Cyclops misses, but the backwash almost knocks you over."
]
[ ! 2 elements
1
"The Cyclops rushes you, but runs into the wall."
]
]
[ ! 2 elements
1
[ ! 2 elements
1
"The Cyclops sends you crashing to the floor, unconscious."
]
]
[ ! 2 elements
1
[ ! 2 elements
1
"The Cyclops breaks your neck with a massive smash."
]
]
[ ! 3 elements
2
[ ! 2 elements
1
"A quick punch, but it was only a glancing blow."
]
[ ! 2 elements
1
"A glancing blow from the Cyclops' fist."
]
]
[ ! 3 elements
2
[ ! 2 elements
1
"The monster smashes his huge fist into your chest, breaking several ribs."
]
[ ! 2 elements
1
"The Cyclops almost knocks the wind out of you with a quick punch."
]
]
[ ! 3 elements
2
[ ! 2 elements
1
"The Cyclops lands a punch that knocks the wind out of you."
]
[ ! 2 elements
1
"Heedless of your weapons, the Cyclops tosses you against the rock wall of the room."
]
]
[ ! 3 elements
2
[ ! 4 elements
3
"The Cyclops grabs your "
0
", tastes it, and throws it to the ground in disgust."
]
[ ! 4 elements
3
"The monster grabs you on the wrist, squeezes, and you drop your "
0
" in pain."
]
]
[ ! 2 elements
1
[ ! 2 elements
1
"The Cyclops seems unable to decide whether to broil or stew his dinner."
]
]
[ ! 2 elements
1
[ ! 2 elements
1
"The Cyclops, no sportsman, dispatches his unconscious victim."
]
]
];
Array Hero_melee --> [ ! 7 elements
[ ! 7 elements
6
[ ! 6 elements
5
"Your "
0
" misses the "
1
" by an inch."
]
[ ! 4 elements
3
"A good slash, but it misses the "
1
" by a mile."
]
[ ! 4 elements
3
"You charge, but the "
1
" jumps nimbly aside."
]
[ ! 4 elements
3
"Clang! Crash! The "
1
" parries."
]
[ ! 4 elements
3
"A quick stroke, but the "
1
" is on guard."
]
[ ! 4 elements
3
"A good stroke, but it's too slow; the "
1
" dodges."
]
]
[ ! 6 elements
5
[ ! 6 elements
5
"Your "
0
" crashes down, knocking the "
1
" into dreamland."
]
[ ! 4 elements
3
"The "
1
" is battered into unconsciousness."
]
[ ! 4 elements
3
"A furious exchange, and the "
1
" is knocked out!"
]
[ ! 6 elements
5
"The haft of your "
0
" knocks out the "
1
"."
]
[ ! 4 elements
3
"The "
1
" is knocked out!"
]
]
[ ! 4 elements
3
[ ! 6 elements
5
"It's curtains for the "
1
" as your "
0
" removes his head."
]
[ ! 4 elements
3
"The fatal blow strikes the "
1
" square in the heart: He dies."
]
[ ! 4 elements
3
"The "
1
" takes a fatal blow and slumps to the floor dead."
]
]
[ ! 5 elements
4
[ ! 4 elements
3
"The "
1
" is struck on the arm; blood begins to trickle down."
]
[ ! 6 elements
5
"Your "
0
" pinks the "
1
" on the wrist, but it's not serious."
]
[ ! 2 elements
1
"Your stroke lands, but it was only the flat of the blade."
]
[ ! 4 elements
3
"The blow lands, making a shallow gash in the "
1
"'s arm!"
]
]
[ ! 5 elements
4
[ ! 4 elements
3
"The "
1
" receives a deep gash in his side."
]
[ ! 4 elements
3
"A savage blow on the thigh! The "
1
" is stunned but can still fight!"
]
[ ! 2 elements
1
"Slash! Your blow lands! That one hit an artery, it could be serious!"
]
[ ! 2 elements
1
"Slash! Your stroke connects! This could be serious!"
]
]
[ ! 6 elements
5
[ ! 4 elements
3
"The "
1
" is staggered, and drops to his knees."
]
[ ! 4 elements
3
"The "
1
" is momentarily disoriented and can't fight back."
]
[ ! 4 elements
3
"The force of your blow knocks the "
1
" back, stunned."
]
[ ! 4 elements
3
"The "
1
" is confused and can't fight back."
]
[ ! 4 elements
3
"The quickness of your thrust knocks the "
1
" back, stunned."
]
]
[ ! 3 elements
2
[ ! 4 elements
3
"The "
1
"'s weapon is knocked to the floor, leaving him unarmed."
]
[ ! 4 elements
3
"The "
1
" is disarmed by a subtle feint past his guard."
]
]
];
Array Def3_res --> [ ! 5 elements
Def3a
0
Def3b
0
Def3c
];
Array Def2_res --> [ ! 4 elements
Def2a
Def2b
0
0
];
Array Def1_res --> [ ! 3 elements
Def1
0
0
];
Array Def3c --> [ ! 10 elements
1
6
6
4
4
4
4
5
5
5
];
Array Def3b --> [ ! 11 elements
1
1
1
6
6
4
4
4
5
5
5
];
Array Def3a --> [ ! 11 elements
1
1
1
1
1
6
6
4
4
5
5
];
Array Def2b --> [ ! 12 elements
1
1
1
6
6
4
4
4
2
3
3
3
];
Array Def2a --> [ ! 10 elements
1
1
1
1
1
6
6
4
4
2
];
Array Def1 --> [ ! 13 elements
1
1
1
1
6
6
2
2
3
3
3
3
3
];
Global Sing_song;
Array Bdigs --> [ ! 3 elements
"You seem to be digging a hole here."
"The hole is getting deeper, but that's about it."
"You are surrounded by a wall of sand on all sides."
];
Global Beach_dig = -1;
Global Buoy_flag = 1;
Array Near_water --> [ ! 17 elements
16
dam_base
river4
beach2
river2
beach1
frigid_river
shore
river1
sandy_beach
frigid_river
reservoir_south
reservoir
reservoir_north
reservoir
stream_view
stream
];
Array River_next --> [ ! 6 elements
5
river4
river3
river2
frigid_river
river1
];
Array River_speeds --> [ ! 11 elements
10
river4
4
river3
4
river2
3
frigid_river
2
river1
1
];
Global Light_shaft = 13;
Array Candle_table --> [ ! 6 elements
20
"The candles grow shorter."
10
"The candles are becoming quite short."
5
"The candles won't last long now."
];
Global Matches_count = 6;
Array Lamp_table --> [ ! 6 elements
100
"The lamp appears a bit dimmer."
70
"The lamp is definitely dimmer now."
15
"The lamp is nearly out."
];
Global Thief_out_desc = "There is a suspicious-looking individual lying unconscious on the ground.";
Global Thief_desc = "There is a suspicious-looking individual, holding a bag, leaning against one wall. He is armed with a vicious-looking stiletto.";
Global Thief_engrossed;
Global Thief_here;
Global Egg_solve;
Global Echo_flag;
Array Cyclo_messages --> [ ! 6 elements
"The cyclops seems somewhat agitated."
"The cyclops appears to be getting more agitated."
"The cyclops is moving about the room, looking for something."
"The cyclops was looking for salt and pepper. No doubt they are condiments for his upcoming snack."
"The cyclops is moving toward you in an unfriendly manner."
"You have two choices: 1. Leave 2. Become dinner."
];
Global Cyclowrath;
Global Leak_sprung;
Array LeakLevel --> [ ! 9 elements
"up to your ankles."
"up to your shin."
"up to your knees."
"up to your hips."
"up to your waist."
"up to your chest."
"up to your neck."
"over your head."
"high in your lungs."
];
Array Near_loudroom --> [ ! 5 elements
4
0
damp_cave
round_room
deep_canyon
];
Global Dam_open;
Global Gate_flag;
Global Exorcism_candle;
Global Exorcism_bell;
Global Mirror_flag;
Global Grate_unlocked;
Global Leaves_moved;
Global Rug_moved;
Array coalmine_rooms --> [ ! 10 elements
9
0
mine4
mine3
mine2
mine1
ladder_top
ladder_bottom
squeaky_room
mine_entrance
];
Global Basket_up = 1;
Global Window_munged;
Array Dummy_table --> [ ! 5 elements
4
0
"Look around."
"Too late for that."
"Have your eyes checked."
];
Array Yuks_table --> [ ! 6 elements
5
0
"A valiant attempt."
"You can't be serious."
"An interesting idea..."
"What a concept!"
];
Array Hello_table --> [ ! 6 elements
5
0
"Hello."
"Good day."
"Nice weather we've been having lately."
"Goodbye."
];
Array Noswim_table --> [ ! 3 elements
2
0
"You can't swim in the dungeon."
];
Array Ho_hum_table --> [ ! 5 elements
4
0
" doesn't seem to work."
" isn't notably helpful."
" has no effect."
];
Array Indents --> [ ! 6 elements
" "
" "
" "
" "
" "
" "
];
Global Max_held_mult = 8;
Global Maximum_held = 7;
Global Goodluck_Flag = 1;
Global Deaths;
Global Dead;
Global Base_score;
Global Last_ob_longdesc;
Global Grue_Repellent;
Global Lit;
Array Hop_msg --> [ ! 6 elements
5
0
"Very good. Now you can go to the second grade."
"Are you enjoying yourself?"
"Wheeeeeeeeee!!!!!"
"Do you expect me to applaud?"
];
Array Dive_msg --> [ ! 5 elements
4
0
"You should have looked before you leaped."
"In the movies, your life would be passing before your eyes."
"Geronimo..."
];
Global HS_count;
Global superbrief;
Global verbose;
Global Always_lit;
Global Tmp_p_adjn;
Global Tmp_p_adj;
Global Tmp_p_name;
Global P_object;
Global SnarfFlag;
Global SN_tmpptr;
Global SN_tmpptr2;
Global P_getflags;
Global P_matchlen;
Global sentence = 10441;
Global P_merge --> 50;
Global P_buts --> 50;
Global P_prsi --> 50;
Global P_prso --> 50;
Global P_adjn;
Global P_adj;
Global P_name;
Global P_gwimbit;
Global P_slocbits;
Global second_intnum;
Global Direction;
Global P_unknown1;
Global P_ncn;
Global P_itbl_2 = 10013;
Global P_itbl = 9993;
Global P_tmp_adj;
Global P_select_adj;
Global LastNounPlace;
Global LastNoun;
Global P_cont;
Global P_inbuf --> 60;
Global P_lexv --> 60;
Global player;
Global P_dir;
Global P_len;
Global P_syntax;
Global P_tmp_name;
Global P_table;
Global noun;
Global second;
Global Verb;
Global Obs_not_here;
Global prev_indirect;
Global prev_direct;
Global prev_verb;
Global P_won;
Global actor;
Global Clock_wait;
Global C_ints = 180;
Global C_ints2 = 180;
Global C_table = 9193;
Global Load_max = 100;
Global Load_allowed = 100;
Array Above_ground --> [ ! 12 elements
11
west_of_house
north_of_house
east_of_house
south_of_house
forest1
forest2
forest4
forest_path
clearing2
clearing1
canyon_view
];
Array In_house --> [ ! 5 elements
4
living_room
kitchen
attic
kitchen
];
Array Forest_around --> [ ! 7 elements
6
forest1
forest2
forest4
forest_path
clearing2
forest1
];
Array House_around --> [ ! 6 elements
5
west_of_house
north_of_house
east_of_house