-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathsetup.zil
107 lines (103 loc) · 2.83 KB
/
setup.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
"SETUP for
SUSPENDED
(c) Copyright 1982 Infocom, Inc. All Rights Reserved.
"
;"Routine for doing SETUP"
<ROUTINE V-CONFIGURE ("AUX" (COUNT 0) RBT RM)
<COND (<G? ,MOVES 1>
<TELL
"You may only configure the game on the first move. Consult the
manual for details." CR>
<RFALSE>)>
<SETG SETUP-MODE T>
<TELL
"Pick your poison.|
Specify the name of a location for each of the following robots or DEAD if you
would like to have the robot start out non-functional." CR>
<REPEAT ()
<COND (<G? <SET COUNT <+ .COUNT 1>> 6>
<RETURN>)
(T
<SET RBT <GET ,NAME-TBL <- .COUNT 1>>>
<REPEAT ()
<TELL <GET ,ROBOT-NAMES .COUNT> " ">
<COND (<PARSER>
<SET RM <GET ,P-TABLE 1>>
<COND
(<EQUAL? .RM ,UD-TUBE>
<PUT ,DEADBOTS .COUNT 30>
<FSET .RBT ,CUTBIT>
<RETURN>)
(<IN? .RM ,ROOMS>
<COND (<AND <EQUAL? .RBT ,IRIS>
<NOT
<IRIS-ALLOWED?
.RM>>>
<TELL
"IRIS cannot leave the Monitor and Supply Area." CR>)
(<OR <EQUAL? .RM ,CAR-AREA
,BIO-INT>
<EQUAL? .RM ,BIO-LAB
,CRYOUNITS>>
<TELL
"No robot is allowed to start in the Biological Areas." CR>)
(<EQUAL? .RM ,HELL>
<TELL
"Come on. Get serious." CR>)
(T
<MOVE .RBT .RM>
<RETURN>)>)
(T
<TELL
"Specify the name of a location or the word DEAD." CR>)>)
(T
<TELL
"Specify the name of a location or the word DEAD." CR>)>>)>>
<REPEAT ()
<TELL
"Surface-side systems tremor at which cycle? (1-100) >">
<COND (<READ-NUMBER 1 100>
<SETG RTD-KILLS ,P-NUMBER>
<QUEUE I-TREMOR2 ,RTD-KILLS>
<RETURN>)>>
<REPEAT ()
<TELL
"Cooling systems tremor at which cycle? (1-100) >">
<COND (<READ-NUMBER 1 100>
<SETG ACID-KILLS ,P-NUMBER>
<QUEUE I-TREMOR1 ,ACID-KILLS>
<RETURN>)>>
<REPEAT ()
<TELL
"Humans arrive at which cycle? (" N ,ACID-KILLS "-150) >">
<COND (<READ-NUMBER ,ACID-KILLS 150>
<SETG PEOPLE-APPEAR ,P-NUMBER>
<QUEUE I-PEOPLE1 ,PEOPLE-APPEAR>
<RETURN>)>>
<SETG SETUP-MODE <>>
<TELL
"Configuration completed." CR CR>
<V-ALL-REPORT-LOC>
<DISABLE <INT I-IRIS-HINTS>>
<DISABLE <INT I-AUDA-HINTS>>
<RTRUE>>
<ROUTINE READ-NUMBER (MN MX)
<READ ,P-INBUF ,P-LEXV>
<COND (<NUMBER? ,P-LEXSTART>
<COND (<AND <NOT <L? ,P-NUMBER .MN>>
<NOT <G? ,P-NUMBER .MX>>>
<RTRUE>)
(T
<TELL
"Enter a number between " N .MN " and " N .MX "." CR>
<RFALSE>)>)
(T
<TELL
"Enter a number between " N .MN " and " N .MX "." CR>
<RFALSE>)>>
<ROUTINE IRIS-ALLOWED? (RM)
<COND (<OR <EQUAL? .RM ,CPU-ROOM ,SERVO-SYSTEMS ,RTD-BANKS>
<EQUAL? .RM ,WEATHER-BANKS ,SUPPLIES-SOUTH ,SUPPLIES-MID>
<EQUAL? .RM ,SUPPLIES-NORTH>>
<RTRUE>)
(T <RFALSE>)>>