1
2
3
4
5 LOGICAL INFEST(R)
6 IMPLICIT INTEGER (A-Z)
7 %include dparam
8
9 IF(.NOT.ENDGMF) INFEST=(OROOM(CYCLO).EQ.R).OR.
10 & (OROOM(TROLL).EQ.R).OR.
11 & ((OROOM(THIEF).EQ.R).AND.THFACT)
12 IF(ENDGMF) INFEST=(R.EQ.MRG).OR.(R.EQ.MRGE).OR.
13 & (R.EQ.MRGW).OR.
14 & ((R.EQ.INMIR).AND.(MLOC.EQ.MRG))
15 RETURN
16
17
18
19
20
21
22 LOGICAL AAPPLI(RI)
23 IMPLICIT INTEGER (A-Z)
24 %include dparam
25 LOGICAL F,MOVETO,QHERE,FINDXT
26
27 IF(RI.EQ.0) GO TO 10
28 AAPPLI=.TRUE.
29 GO TO (1000,2000,3000),RI
30 CALL BUG(11,RI)
31
32
33
34 10 AAPPLI=.FALSE.
35 RETURN
36
37
38
39
40
41 1000 IF((PRSA.NE.ATTACW).AND.(PRSA.NE.MUNGW).AND.
42 & (PRSA.NE.KILLW).AND.(PRSA.NE.SWINGW).AND.
43 & (PRSA.NE.KICKW).AND.(PRSA.NE.BLASTW)) GO TO 1050
44 CALL RSPEAK(949)
45 RETURN
46
47 1050 IF((PRSA.NE.OPENW).AND.(PRSA.NE.CLOSEW).AND.
48 & (PRSA.NE.EATW).AND.(PRSA.NE.DRINKW).AND.
49 & (PRSA.NE.INFLAW).AND.(PRSA.NE.DEFLAW).AND.
50 & (PRSA.NE.TURNW).AND.(PRSA.NE.TIEW).AND.
51 & (PRSA.NE.RUBW).AND.(PRSA.NE.COUNTW).AND.
52 & (PRSA.NE.BURNW).AND.(PRSA.NE.UNTIEW)) GO TO 1100
53 CALL RSPEAK(950)
54 RETURN
55
56 1100 IF(PRSA.NE.TRNONW) GO TO 1150
57 CALL RSPEAK(951)
58 RETURN
59
60 1150 IF(PRSA.NE.SCOREW) GO TO 1200
61 CALL RSPEAK(952)
62 RETURN
63
64 1200 IF(PRSA.NE.TELLW) GO TO 1250
65 CALL RSPEAK(953)
66 RETURN
67
68 1250 IF(PRSA.NE.TAKEW) GO TO 1300
69 CALL RSPEAK(954)
70 RETURN
71
72 1300 IF((PRSA.NE.DROPW).AND.(PRSA.NE.THROWW).AND.
73 & (PRSA.NE.INVENW)) GO TO 1350
74 CALL RSPEAK(955)
75 RETURN
76
77 1350 IF(PRSA.NE.DIAGNW) GO TO 1400
78 CALL RSPEAK(956)
79 RETURN
80
81 1400 IF(PRSA.NE.LOOKW) GO TO 1500
82 I=957
83 DO 1450 J=1,OLNT
84 IF(QHERE(J,HERE)) I=958
85 1450 CONTINUE
86 CALL RSPEAK(I)
87
88 IF((AND(RFLAG(HERE),RLIGHT)).EQ.0) CALL RSPEAK(959)
89 GO TO 10
90
91 1500 IF(PRSA.NE.PRAYW) GO TO 1600
92 IF(HERE.EQ.TEMP2) GO TO 1550
93 CALL RSPEAK(960)
94 RETURN
95
96
97 1550 OFLAG1(LAMP)=OR(OFLAG1(LAMP),VISIBT)
98 AACTIO(PLAYER)=0
99 DEADF=.FALSE.
100 F=MOVETO(FORE1,WINNER)
101 CALL RSPEAK(9)
102 RETURN
103
104 1600 IF(PRSA.NE.WALKW) GO TO 1700
105 IF(.NOT.FINDXT(PRSO,HERE)) GO TO 10
106 IF(XROOM1.NE.BSHAF) GO TO 10
107 CALL RSPEAK(962)
108 RETURN
109
110 1700 IF(PRSA.EQ.QUITW) GO TO 10
111 CALL RSPEAK(963)
112 RETURN
113
114
115
116
117 2000 IF((PRSA.NE.RAISEW).OR.(PRSO.NE.RCAGE)) GO TO 2200
118 CFLAG(CEVSPH)=.FALSE.
119 WINNER=PLAYER
120 F=MOVETO(CAGER,WINNER)
121 CALL NEWSTA(CAGE,567,CAGER,0,0)
122 CALL NEWSTA(ROBOT,0,CAGER,0,0)
123 AROOM(AROBOT)=CAGER
124 CAGESF=.TRUE.
125
126 OFLAG1(ROBOT)=AND(OFLAG1(ROBOT),COMPL(NDSCBT))
127
128 OFLAG1(SPHER)=OR(OFLAG1(SPHER),TAKEBT)
129 PRSCON=0
130 RETURN
131
132 2200 IF((PRSA.NE.DRINKW).AND.(PRSA.NE.EATW)) GO TO 2300
133 CALL RSPEAK(568)
134 RETURN
135
136 2300 IF(PRSA.NE.READW) GO TO 2400
137 CALL RSPEAK(569)
138 RETURN
139
140 2400 IF((PRSA.EQ.WALKW).OR.(PRSA.EQ.TAKEW).OR.(PRSA.EQ.DROPW)
141 & .OR.(PRSA.EQ.PUTW).OR.(PRSA.EQ.PUSHW).OR.(PRSA.EQ.LEAPW)
142 & .OR.(PRSA.EQ.TURNW)) GO TO 2500
143 CALL RSPEAK(570)
144 RETURN
145
146 2500 CALL RSPEAK(930)
147 GO TO 10
148
149
150
151
152
153
154 3000 IF((AND(OFLAG2(QDOOR),OPENBT)).NE.0) GO TO 3100
155 CALL RSPEAK(783)
156 RETURN
157
158 3100 IF(PRSA.NE.WALKW) GO TO 3200
159 I=784
160 IF(((HERE.EQ.SCORR).AND.
161 & ((PRSO.EQ.XNORTH).OR.(PRSO.EQ.XENTER))).OR.
162 & ((HERE.EQ.NCORR).AND.
163 & ((PRSO.EQ.XSOUTH).OR.(PRSO.EQ.XENTER))))
164 & I=785
165 CALL RSPEAK(I)
166 RETURN
167
168 3200 IF((PRSA.EQ.STAYW).OR.(PRSA.EQ.FOLLOW).OR.(PRSA.EQ.KILLW).OR.
169 & (PRSA.EQ.MUNGW).OR.(PRSA.EQ.ATTACW)) GO TO 10
170 IF((PRSA.EQ.TAKEW).OR.(PRSA.EQ.DROPW).OR.(PRSA.EQ.PUTW).OR.
171 & (PRSA.EQ.THROWW).OR.(PRSA.EQ.PUSHW).OR.(PRSA.EQ.TURNW).OR.
172 & (PRSA.EQ.SPINW).OR.(PRSA.EQ.TRNTOW).OR.(PRSA.EQ.OPENW).OR.
173 & (PRSA.EQ.CLOSEW)) GO TO 3300
174 CALL RSPEAK(786)
175 RETURN
176
177 3300 CALL RSPEAK(1057)
178 GO TO 10
179
180
181
182
183
184
185
186
187
188 THIEFD
189 IMPLICIT INTEGER (A-Z)
190 %include dparam
191 LOGICAL DFLAG,ONCE,PROB,QHERE,QSTILL,LIT,WINNIN,WASLIT
192
193
194
195 QSTILL(R)=(QHERE(STILL,R).OR.(OADV(STILL).EQ.-THIEF))
196
197
198
199
200 DFLAG=AND(PRSFLG,64).NE.0
201 ONCE=.FALSE.
202 1025 WASLIT=LIT(HERE)
203 RHERE=OROOM(THIEF)
204 IF(RHERE.NE.0) THFPOS=RHERE
205
206 IF((THFPOS.EQ.HERE).AND..NOT.DEADF) GO TO 1100
207 IF(THFPOS.NE.TREAS) GO TO 1400
208
209
210
211 IF(DFLAG) PRINT 10
212 10 FORMAT(' THIEFD-- IN TREASURE ROOM')
213 IF(RHERE.EQ.0) GO TO 1050
214 CALL NEWSTA(THIEF,0,0,0,0)
215 RHERE=0
216 IF(QSTILL(TREAS)) CALL NEWSTA(STILL,0,0,THIEF,0)
217 DO 1040 I=1,OLNT
218
219
220 IF(QHERE(I,THFPOS))
221 & OFLAG1(I)=OR(OFLAG1(I),VISIBT)
222 1040 CONTINUE
223 1050 I=ROBADV(-THIEF,THFPOS,0,0)
224
225 IF(QHERE(EGG,THFPOS)) OFLAG2(EGG)=OR(OFLAG2(EGG),OPENBT)
226 GO TO 1700
227
228
229
230
231
232 1100 IF(THFPOS.EQ.TREAS) GO TO 1700
233
234 IF((AND(RFLAG(THFPOS),RLIGHT)).NE.0) GO TO 1400
235 IF(DFLAG) PRINT 20
236 20 FORMAT(' THIEFD-- IN ADV ROOM')
237 IF(THFFLG) GO TO 1300
238 IF((RHERE.NE.0).OR.PROB(70,70)) GO TO 1150
239 IF(OCAN(STILL).NE.THIEF) GO TO 1700
240 CALL NEWSTA(THIEF,583,THFPOS,0,0)
241 THFFLG=.TRUE.
242 RETURN
243
244
245
246 1150 IF((RHERE.EQ.0).OR.((AND(OFLAG2(THIEF),FITEBT)).EQ.0))
247 & GO TO 1200
248 IF(WINNIN(THIEF,PLAYER)) GO TO 1175
249 CALL NEWSTA(THIEF,584,0,0,0)
250
251 OFLAG2(THIEF)=AND(OFLAG2(THIEF), COMPL(FITEBT))
252 IF(QSTILL(THFPOS)) CALL NEWSTA(STILL,0,0,THIEF,0)
253 RETURN
254
255 1175 IF(PROB(90,90)) GO TO 1700
256
257 1200 IF((RHERE.EQ.0).OR.PROB(70,70)) GO TO 1250
258 CALL NEWSTA(THIEF,585,0,0,0)
259 IF(QSTILL(THFPOS)) CALL NEWSTA(STILL,0,0,THIEF,0)
260 RETURN
261
262 1300 IF(RHERE.EQ.0) GO TO 1700
263 1250 IF(PROB(70,70)) RETURN
264 THFFLG=.TRUE.
265 NR=ROBRM(THFPOS,100,0,0,-THIEF)+ROBADV(PLAYER,0,0,-THIEF)
266 I=586
267 IF(RHERE.NE.0) I=588
268 CALL NEWSTA(THIEF,I+MIN0(1,NR),0,0,0)
269 IF(QSTILL(THFPOS))
270 & CALL NEWSTA(STILL,0,0,THIEF,0)
271 IF(WASLIT.AND..NOT.LIT(HERE).AND.(HERE.EQ.AROOM(PLAYER)))
272 & CALL RSPEAK(915)
273 RHERE=0
274 GO TO 1700
275
276
277
278
279
280 1400 CALL NEWSTA(THIEF,0,0,0,0)
281 RHERE=0
282 IF(DFLAG) PRINT 30,THFPOS
283 30 FORMAT(' THIEFD-- IN ROOM ',I4)
284 IF(QSTILL(THFPOS)) CALL NEWSTA(STILL,0,0,THIEF,0)
285
286 IF((AND(RFLAG(THFPOS),RSEEN)).EQ.0) GO TO 1700
287 RMK=1045
288 I=ROBRM(THFPOS,75,0,0,-5555)
289 DO 1410 I=1,OLNT
290 IF(OADV(I).NE.-5555) GO TO 1410
291 CALL NEWSTA(I,0,0,0,-THIEF)
292 IF((THFPOS.EQ.HERE).AND..NOT.DEADF)
293 & CALL RSPSUB(RMK,ODESC2(I))
294 RMK=1083
295 1410 CONTINUE
296
297 IF((THFPOS.LT.MAZE1).OR.(THFPOS.GT.MAZ15).OR.
298 & (HERE.LT.MAZE1).OR.(HERE.GT.MAZ15)) GO TO 1500
299 DO 1450 I=1,OLNT
300
301
302
303 IF(.NOT.QHERE(I,THFPOS).OR.PROB(60,60).OR.(I.EQ.WATER).OR.
304 & ((AND(OFLAG1(I),(VISIBT+TAKEBT))).NE.(VISIBT+TAKEBT)))
305 & GO TO 1450
306 IF(.NOT.DEADF) CALL RSPSUB(590,ODESC2(I))
307 IF(PROB(40,20)) GO TO 1700
308 CALL NEWSTA(I,0,0,0,-THIEF)
309
310 OFLAG2(I)=OR(OFLAG2(I),TCHBT)
311 GO TO 1700
312 1450 CONTINUE
313 GO TO 1700
314
315 1500 DO 1550 I=1,OLNT
316
317
318
319
320 IF(.NOT.QHERE(I,THFPOS).OR.(OTVAL(I).NE.0).OR.
321 & PROB(80,60).OR.(I.EQ.WATER).OR.
322 & ((AND(OFLAG1(I),(VISIBT+TAKEBT))).NE.(VISIBT+TAKEBT)))
323 & GO TO 1550
324 CALL NEWSTA(I,0,0,0,-THIEF)
325
326 OFLAG2(I)=OR(OFLAG2(I),TCHBT)
327 IF((THFPOS.EQ.HERE).AND..NOT.DEADF)
328 & CALL RSPSUB(RMK,ODESC2(I))
329 GO TO 1700
330 1550 CONTINUE
331
332
333
334
335
336 1700 IF(OADV(ROPE).NE.-THIEF) GO TO 1725
337 DOMEF=.FALSE.
338 TTIE=0
339 1725 IF(ONCE) GO TO 1800
340 ONCE=.NOT.ONCE
341 1750 THFPOS=THFPOS-1
342 IF(THFPOS.LE.0) THFPOS=RLNT
343
344
345 IF((AND(RFLAG(THFPOS),(RLAND+RSACRD+REND))).NE.RLAND)
346 & GO TO 1750
347 THFFLG=.FALSE.
348 GO TO 1025
349
350
351
352 1800 IF(THFPOS.EQ.TREAS) RETURN
353 J=1055
354 IF(THFPOS.NE.HERE) J=0
355 DO 1850 I=1,OLNT
356 IF((OADV(I).NE.-THIEF).OR.PROB(70,30).OR.
357 & (OTVAL(I).GT.0)) GO TO 1850
358 CALL NEWSTA(I,J,THFPOS,0,0)
359 J=0
360 1850 CONTINUE
361 RETURN
362
363