xref: /csrg-svn/contrib/dungeon/sobjs.F (revision 35973)
1*35973SbosticC SOBJS-	SIMPLE OBJECTS PROCESSOR
2*35973SbosticC	OBJECTS IN THIS MODULE CANNOT CALL RMINFO, JIGSUP,
3*35973SbosticC	MAJOR VERBS, OR OTHER NON-RESIDENT SUBROUTINES
4*35973SbosticC
5*35973SbosticC COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142
6*35973SbosticC ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED
7*35973SbosticC WRITTEN BY R. M. SUPNIK
8*35973SbosticC
9*35973SbosticC DECLARATIONS
10*35973SbosticC
11*35973Sbostic	LOGICAL FUNCTION SOBJS(RI,ARG)
12*35973Sbostic	IMPLICIT INTEGER (A-Z)
13*35973Sbostic	LOGICAL QOPEN
14*35973Sbostic	LOGICAL MOVETO,OPNCLS,LIT
15*35973Sbostic	LOGICAL QHERE,F
16*35973Sbostic#include "parser.h"
17*35973Sbostic#include "gamestate.h"
18*35973Sbostic#include "state.h"
19*35973Sbostic#include "rooms.h"
20*35973Sbostic#include "rflag.h"
21*35973Sbostic#include "rindex.h"
22*35973Sbostic#include "objects.h"
23*35973Sbostic#include "oflags.h"
24*35973Sbostic#include "oindex.h"
25*35973Sbostic#include "clock.h"
26*35973Sbostic
27*35973Sbostic#include "villians.h"
28*35973Sbostic#include "advers.h"
29*35973Sbostic#include "verbs.h"
30*35973Sbostic#include "flags.h"
31*35973SbosticC
32*35973SbosticC FUNCTIONS AND DATA
33*35973SbosticC
34*35973Sbostic	QOPEN(R)=and(OFLAG2(R),OPENBT).NE.0
35*35973SbosticC SOBJS, PAGE 2
36*35973SbosticC
37*35973Sbostic	IF(PRSO.GT.220) GO TO 5
38*35973Sbostic	IF(PRSO.NE.0) ODO2=ODESC2(PRSO)
39*35973Sbostic5	IF(PRSI.NE.0) ODI2=ODESC2(PRSI)
40*35973Sbostic	AV=AVEHIC(WINNER)
41*35973Sbostic	SOBJS=.TRUE.
42*35973SbosticC
43*35973Sbostic	GO TO (1000,3000,4000,6000,7000,8000,9000,
44*35973Sbostic&	 13000,14000,16000,17000,
45*35973Sbostic&	 21000,23000,24000,27000,28000,29000,30000,
46*35973Sbostic&	 31000,33000,34000,36000,37000,38000,
47*35973Sbostic&	 41000,42000,43000,44000,46000,
48*35973Sbostic&	 53000,56000)
49*35973Sbostic&		RI
50*35973Sbostic	CALL BUG(6,RI)
51*35973SbosticC
52*35973SbosticC RETURN HERE TO DECLARE FALSE RESULT
53*35973SbosticC
54*35973Sbostic10	SOBJS=.FALSE.
55*35973Sbostic	RETURN
56*35973SbosticC SOBJS, PAGE 3
57*35973SbosticC
58*35973SbosticC O1--	GUNK FUNCTION
59*35973SbosticC
60*35973Sbostic1000	IF(OCAN(GUNK).EQ.0) GO TO 10
61*35973SbosticC						!NOT INSIDE? F
62*35973Sbostic	CALL NEWSTA(GUNK,122,0,0,0)
63*35973SbosticC						!FALLS APART.
64*35973Sbostic	RETURN
65*35973SbosticC
66*35973SbosticC O2--	TROPHY CASE
67*35973SbosticC
68*35973Sbostic3000	IF(PRSA.NE.TAKEW) GO TO 10
69*35973SbosticC						!TAKE?
70*35973Sbostic	CALL RSPEAK(128)
71*35973SbosticC						!CANT.
72*35973Sbostic	RETURN
73*35973SbosticC
74*35973SbosticC O3--	BOTTLE FUNCTION
75*35973SbosticC
76*35973Sbostic4000	IF(PRSA.NE.THROWW) GO TO 4100
77*35973SbosticC						!THROW?
78*35973Sbostic	CALL NEWSTA(PRSO,129,0,0,0)
79*35973SbosticC						!BREAKS.
80*35973Sbostic	RETURN
81*35973SbosticC
82*35973Sbostic4100	IF(PRSA.NE.MUNGW) GO TO 10
83*35973SbosticC						!MUNG?
84*35973Sbostic	CALL NEWSTA(PRSO,131,0,0,0)
85*35973SbosticC						!BREAKS.
86*35973Sbostic	RETURN
87*35973SbosticC SOBJS, PAGE 4
88*35973SbosticC
89*35973SbosticC O4--	ROPE FUNCTION
90*35973SbosticC
91*35973Sbostic6000	IF(HERE.EQ.DOME) GO TO 6100
92*35973SbosticC						!IN DOME?
93*35973Sbostic	DOMEF=.FALSE.
94*35973SbosticC						!NO,
95*35973Sbostic	IF(PRSA.NE.UNTIEW) GO TO 6050
96*35973SbosticC						!UNTIE?
97*35973Sbostic	CALL RSPEAK(134)
98*35973SbosticC						!CANT
99*35973Sbostic	RETURN
100*35973SbosticC
101*35973Sbostic6050	IF(PRSA.NE.TIEW) GO TO 10
102*35973SbosticC						!TIE?
103*35973Sbostic	CALL RSPEAK(135)
104*35973SbosticC						!CANT TIE
105*35973Sbostic	RETURN
106*35973SbosticC
107*35973Sbostic6100	IF((PRSA.NE.TIEW).OR.(PRSI.NE.RAILI)) GO TO 6200
108*35973Sbostic	IF(DOMEF) GO TO 6150
109*35973SbosticC						!ALREADY TIED?
110*35973Sbostic	DOMEF=.TRUE.
111*35973SbosticC						!NO, TIE IT.
112*35973Sbostic	OFLAG1(ROPE)=or(OFLAG1(ROPE),NDSCBT)
113*35973Sbostic	OFLAG2(ROPE)=or(OFLAG2(ROPE),CLMBBT)
114*35973Sbostic	CALL NEWSTA(ROPE,137,DOME,0,0)
115*35973Sbostic	RETURN
116*35973SbosticC
117*35973Sbostic6150	CALL RSPEAK(136)
118*35973SbosticC						!DUMMY.
119*35973Sbostic	RETURN
120*35973SbosticC
121*35973Sbostic6200	IF(PRSA.NE.UNTIEW) GO TO 6300
122*35973SbosticC						!UNTIE?
123*35973Sbostic	IF(DOMEF) GO TO 6250
124*35973SbosticC						!TIED?
125*35973Sbostic	CALL RSPEAK(134)
126*35973SbosticC						!NO, DUMMY.
127*35973Sbostic	RETURN
128*35973SbosticC
129*35973Sbostic6250	DOMEF=.FALSE.
130*35973SbosticC						!YES, UNTIE IT.
131*35973Sbostic	OFLAG1(ROPE)=and(OFLAG1(ROPE), not(NDSCBT))
132*35973Sbostic	OFLAG2(ROPE)=and(OFLAG2(ROPE), not(CLMBBT))
133*35973Sbostic	CALL RSPEAK(139)
134*35973Sbostic	RETURN
135*35973SbosticC
136*35973Sbostic6300	IF(DOMEF.OR.(PRSA.NE.DROPW)) GO TO 6400
137*35973SbosticC						!DROP & UNTIED?
138*35973Sbostic	CALL NEWSTA(ROPE,140,MTORC,0,0)
139*35973SbosticC						!YES, DROP.
140*35973Sbostic	RETURN
141*35973SbosticC
142*35973Sbostic6400	IF((PRSA.NE.TAKEW).OR. .NOT.DOMEF) GO TO 10
143*35973Sbostic	CALL RSPEAK(141)
144*35973SbosticC						!TAKE & TIED.
145*35973Sbostic	RETURN
146*35973SbosticC
147*35973SbosticC O5--	SWORD FUNCTION
148*35973SbosticC
149*35973Sbostic7000	IF((PRSA.EQ.TAKEW).AND.(WINNER.EQ.PLAYER))
150*35973Sbostic&		SWDACT=.TRUE.
151*35973Sbostic	GO TO 10
152*35973SbosticC
153*35973SbosticC O6--	LANTERN
154*35973SbosticC
155*35973Sbostic8000	IF(PRSA.NE.THROWW) GO TO 8100
156*35973SbosticC						!THROW?
157*35973Sbostic	CALL NEWSTA(LAMP,0,0,0,0)
158*35973SbosticC						!KILL LAMP,
159*35973Sbostic	CALL NEWSTA(BLAMP,142,HERE,0,0)
160*35973SbosticC						!REPLACE WITH BROKEN.
161*35973Sbostic	RETURN
162*35973SbosticC
163*35973Sbostic8100	IF(PRSA.EQ.TRNONW) CFLAG(CEVLNT)=.TRUE.
164*35973Sbostic	IF(PRSA.EQ.TRNOFW) CFLAG(CEVLNT)=.FALSE.
165*35973Sbostic	GO TO 10
166*35973SbosticC
167*35973SbosticC O7--	RUG FUNCTION
168*35973SbosticC
169*35973Sbostic9000	IF(PRSA.NE.RAISEW) GO TO 9100
170*35973SbosticC						!RAISE?
171*35973Sbostic	CALL RSPEAK(143)
172*35973SbosticC						!CANT
173*35973Sbostic	RETURN
174*35973SbosticC
175*35973Sbostic9100	IF(PRSA.NE.TAKEW) GO TO 9200
176*35973SbosticC						!TAKE?
177*35973Sbostic	CALL RSPEAK(144)
178*35973SbosticC						!CANT
179*35973Sbostic	RETURN
180*35973SbosticC
181*35973Sbostic9200	IF(PRSA.NE.MOVEW) GO TO 9300
182*35973SbosticC						!MOVE?
183*35973Sbostic	CALL RSPEAK(145+ORRUG)
184*35973Sbostic	ORRUG=1
185*35973Sbostic	OFLAG1(DOOR)=or(OFLAG1(DOOR),VISIBT)
186*35973Sbostic	RETURN
187*35973SbosticC
188*35973Sbostic9300	IF((PRSA.NE.LOOKUW).OR.(ORRUG.NE.0).OR.
189*35973Sbostic&		QOPEN(DOOR)) GO TO 10
190*35973Sbostic	CALL RSPEAK(345)
191*35973Sbostic	RETURN
192*35973SbosticC SOBJS, PAGE 5
193*35973SbosticC
194*35973SbosticC O8--	SKELETON
195*35973SbosticC
196*35973Sbostic13000	I=ROBRM(HERE,100,LLD2,0,0)+ROBADV(WINNER,LLD2,0,0)
197*35973Sbostic	IF(I.NE.0) CALL RSPEAK(162)
198*35973SbosticC						!IF ROBBED, SAY SO.
199*35973Sbostic	RETURN
200*35973SbosticC
201*35973SbosticC O9--	MIRROR
202*35973SbosticC
203*35973Sbostic14000	IF(MIRRMF.OR.(PRSA.NE.RUBW)) GO TO 14500
204*35973Sbostic	MROOM=xor(HERE,1)
205*35973Sbostic	DO 14100 I=1,OLNT
206*35973SbosticC						!INTERCHANGE OBJS.
207*35973Sbostic	  IF(OROOM(I).EQ.HERE) OROOM(I)=-1
208*35973Sbostic	  IF(OROOM(I).EQ.MROOM) OROOM(I)=HERE
209*35973Sbostic	  IF(OROOM(I).EQ.-1) OROOM(I)=MROOM
210*35973Sbostic14100	CONTINUE
211*35973Sbostic	F=MOVETO(MROOM,WINNER)
212*35973Sbostic	CALL RSPEAK(163)
213*35973SbosticC						!SHAKE WORLD.
214*35973Sbostic	RETURN
215*35973SbosticC
216*35973Sbostic14500	IF((PRSA.NE.LOOKW).AND.(PRSA.NE.LOOKIW).AND.
217*35973Sbostic&		(PRSA.NE.EXAMIW)) GO TO 14600
218*35973Sbostic	I=164
219*35973SbosticC						!MIRROR OK.
220*35973Sbostic	IF(MIRRMF) I=165
221*35973SbosticC						!MIRROR DEAD.
222*35973Sbostic	CALL RSPEAK(I)
223*35973Sbostic	RETURN
224*35973SbosticC
225*35973Sbostic14600	IF(PRSA.NE.TAKEW) GO TO 14700
226*35973SbosticC						!TAKE?
227*35973Sbostic	CALL RSPEAK(166)
228*35973SbosticC						!JOKE.
229*35973Sbostic	RETURN
230*35973SbosticC
231*35973Sbostic14700	IF((PRSA.NE.MUNGW).AND.(PRSA.NE.THROWW)) GO TO 10
232*35973Sbostic	I=167
233*35973SbosticC						!MIRROR BREAKS.
234*35973Sbostic	IF(MIRRMF) I=168
235*35973SbosticC						!MIRROR ALREADY BROKEN.
236*35973Sbostic	MIRRMF=.TRUE.
237*35973Sbostic	BADLKF=.TRUE.
238*35973Sbostic	CALL RSPEAK(I)
239*35973Sbostic	RETURN
240*35973SbosticC SOBJS, PAGE 6
241*35973SbosticC
242*35973SbosticC O10--	DUMBWAITER
243*35973SbosticC
244*35973Sbostic16000	IF(PRSA.NE.RAISEW) GO TO 16100
245*35973SbosticC						!RAISE?
246*35973Sbostic	IF(CAGETF) GO TO 16400
247*35973SbosticC						!ALREADY AT TOP?
248*35973Sbostic	CALL NEWSTA(TBASK,175,TSHAF,0,0)
249*35973SbosticC						!NO, RAISE BASKET.
250*35973Sbostic	CALL NEWSTA(FBASK,0,BSHAF,0,0)
251*35973Sbostic	CAGETF=.TRUE.
252*35973SbosticC						!AT TOP.
253*35973Sbostic	RETURN
254*35973SbosticC
255*35973Sbostic16100	IF(PRSA.NE.LOWERW) GO TO 16200
256*35973SbosticC						!LOWER?
257*35973Sbostic	IF(.NOT.CAGETF) GO TO 16400
258*35973SbosticC						!ALREADY AT BOTTOM?
259*35973Sbostic	CALL NEWSTA(TBASK,176,BSHAF,0,0)
260*35973SbosticC						!NO, LOWER BASKET.
261*35973Sbostic	CALL NEWSTA(FBASK,0,TSHAF,0,0)
262*35973Sbostic	CAGETF=.FALSE.
263*35973Sbostic	IF(.NOT.LIT(HERE)) CALL RSPEAK(406)
264*35973SbosticC						!IF DARK, DIE.
265*35973Sbostic	RETURN
266*35973SbosticC
267*35973Sbostic16200	IF((PRSO.NE.FBASK).AND.(PRSI.NE.FBASK)) GO TO 16300
268*35973Sbostic	CALL RSPEAK(130)
269*35973SbosticC						!WRONG BASKET.
270*35973Sbostic	RETURN
271*35973SbosticC
272*35973Sbostic16300	IF(PRSA.NE.TAKEW) GO TO 10
273*35973SbosticC						!TAKE?
274*35973Sbostic	CALL RSPEAK(177)
275*35973SbosticC						!JOKE.
276*35973Sbostic	RETURN
277*35973SbosticC
278*35973Sbostic16400	CALL RSPEAK(125+RND(3))
279*35973SbosticC						!DUMMY.
280*35973Sbostic	RETURN
281*35973SbosticC
282*35973SbosticC O11--	GHOST FUNCTION
283*35973SbosticC
284*35973Sbostic17000	I=178
285*35973SbosticC						!ASSUME DIRECT.
286*35973Sbostic	IF(PRSO.NE.GHOST) I=179
287*35973SbosticC						!IF NOT, INDIRECT.
288*35973Sbostic	CALL RSPEAK(I)
289*35973Sbostic	RETURN
290*35973SbosticC						!SPEAK AND EXIT.
291*35973SbosticC SOBJS, PAGE 7
292*35973SbosticC
293*35973SbosticC O12--	TUBE
294*35973SbosticC
295*35973Sbostic21000	IF((PRSA.NE.PUTW).OR.(PRSI.NE.TUBE)) GO TO 10
296*35973Sbostic	CALL RSPEAK(186)
297*35973SbosticC						!CANT PUT BACK IN.
298*35973Sbostic	RETURN
299*35973SbosticC
300*35973SbosticC O13--	CHALICE
301*35973SbosticC
302*35973Sbostic23000	IF((PRSA.NE.TAKEW).OR.(OCAN(PRSO).NE.0).OR.
303*35973Sbostic&		(OROOM(PRSO).NE.TREAS).OR.(OROOM(THIEF).NE.TREAS).OR.
304*35973Sbostic&		(and(OFLAG2(THIEF),FITEBT).EQ.0).OR.
305*35973Sbostic&		.NOT. THFACT) GO TO 10
306*35973Sbostic	CALL RSPEAK(204)
307*35973SbosticC						!CANT TAKE.
308*35973Sbostic	RETURN
309*35973SbosticC
310*35973SbosticC O14--	PAINTING
311*35973SbosticC
312*35973Sbostic24000	IF(PRSA.NE.MUNGW) GO TO 10
313*35973SbosticC						!MUNG?
314*35973Sbostic	CALL RSPEAK(205)
315*35973SbosticC						!DESTROY PAINTING.
316*35973Sbostic	OFVAL(PRSO)=0
317*35973Sbostic	OTVAL(PRSO)=0
318*35973Sbostic	ODESC1(PRSO)=207
319*35973Sbostic	ODESC2(PRSO)=206
320*35973Sbostic	RETURN
321*35973SbosticC SOBJS, PAGE 8
322*35973SbosticC
323*35973SbosticC O15--	BOLT
324*35973SbosticC
325*35973Sbostic27000	IF(PRSA.NE.TURNW) GO TO 10
326*35973SbosticC						!TURN BOLT?
327*35973Sbostic	IF(PRSI.NE.WRENC) GO TO 27500
328*35973SbosticC						!WITH WRENCH?
329*35973Sbostic	IF(GATEF) GO TO 27100
330*35973SbosticC						!PROPER BUTTON PUSHED?
331*35973Sbostic	CALL RSPEAK(210)
332*35973SbosticC						!NO, LOSE.
333*35973Sbostic	RETURN
334*35973SbosticC
335*35973Sbostic27100	IF(LWTIDF) GO TO 27200
336*35973SbosticC						!LOW TIDE NOW?
337*35973Sbostic	LWTIDF=.TRUE.
338*35973SbosticC						!NO, EMPTY DAM.
339*35973Sbostic	CALL RSPEAK(211)
340*35973Sbostic	OFLAG2(COFFI)=and(OFLAG2(COFFI), not(SCRDBT))
341*35973Sbostic	OFLAG1(TRUNK)=or(OFLAG1(TRUNK),VISIBT)
342*35973Sbostic	RFLAG(RESER)=and(or(RFLAG(RESER),RLAND)
343*35973Sbostic&		,not(RWATER+RSEEN))
344*35973Sbostic	RETURN
345*35973SbosticC
346*35973Sbostic27200	LWTIDF=.FALSE.
347*35973SbosticC						!YES, FILL DAM.
348*35973Sbostic	CALL RSPEAK(212)
349*35973Sbostic	IF(QHERE(TRUNK,RESER))
350*35973Sbostic&		OFLAG1(TRUNK)=and(OFLAG1(TRUNK), not(VISIBT))
351*35973Sbostic	RFLAG(RESER)=and(or(RFLAG(RESER),RWATER) ,not(RLAND))
352*35973Sbostic	RETURN
353*35973SbosticC
354*35973Sbostic27500	CALL RSPSUB(299,ODI2)
355*35973SbosticC						!NOT WITH THAT.
356*35973Sbostic	RETURN
357*35973SbosticC
358*35973SbosticC O16--	GRATING
359*35973SbosticC
360*35973Sbostic28000	IF((PRSA.NE.OPENW).AND.(PRSA.NE.CLOSEW)) GO TO 10
361*35973Sbostic	IF(GRUNLF) GO TO 28200
362*35973SbosticC						!UNLOCKED?
363*35973Sbostic	CALL RSPEAK(214)
364*35973SbosticC						!NO, LOCKED.
365*35973Sbostic	RETURN
366*35973SbosticC
367*35973Sbostic28200	I=215
368*35973SbosticC						!UNLOCKED, VIEW FRM CLR.
369*35973Sbostic	IF(HERE.NE.CLEAR) I=216
370*35973SbosticC						!VIEW FROM BELOW.
371*35973Sbostic	SOBJS=OPNCLS(GRATE,I,885)
372*35973SbosticC						!OPEN/CLOSE.
373*35973Sbostic	RFLAG(MGRAT)=and(RFLAG(MGRAT), not(RLIGHT))
374*35973Sbostic	IF(QOPEN(GRATE)) RFLAG(MGRAT)=or(RFLAG(MGRAT),RLIGHT)
375*35973Sbostic	IF(.NOT.LIT(HERE)) CALL RSPEAK(406)
376*35973SbosticC						!IF DARK, DIE.
377*35973Sbostic	RETURN
378*35973SbosticC
379*35973SbosticC O17--	TRAP DOOR
380*35973SbosticC
381*35973Sbostic29000	IF(HERE.NE.LROOM) GO TO 29100
382*35973SbosticC						!FROM LIVING ROOM?
383*35973Sbostic	SOBJS=OPNCLS(DOOR,218,219)
384*35973SbosticC						!OPEN/CLOSE.
385*35973Sbostic	RETURN
386*35973SbosticC
387*35973Sbostic29100	IF(HERE.NE.CELLA) GO TO 10
388*35973SbosticC						!FROM CELLAR?
389*35973Sbostic	IF((PRSA.NE.OPENW).OR.QOPEN(DOOR)) GO TO 29200
390*35973Sbostic	CALL RSPEAK(220)
391*35973SbosticC						!CANT OPEN CLOSED DOOR.
392*35973Sbostic	RETURN
393*35973SbosticC
394*35973Sbostic29200	SOBJS=OPNCLS(DOOR,0,22)
395*35973SbosticC						!NORMAL OPEN/CLOSE.
396*35973Sbostic	RETURN
397*35973SbosticC
398*35973SbosticC O18--	DURABLE DOOR
399*35973SbosticC
400*35973Sbostic30000	I=0
401*35973SbosticC						!ASSUME NO APPL.
402*35973Sbostic	IF(PRSA.EQ.OPENW) I=221
403*35973SbosticC						!OPEN?
404*35973Sbostic	IF(PRSA.EQ.BURNW) I=222
405*35973SbosticC						!BURN?
406*35973Sbostic	IF(PRSA.EQ.MUNGW) I=223+RND(3)
407*35973SbosticC						!MUNG?
408*35973Sbostic	IF(I.EQ.0) GO TO 10
409*35973Sbostic	CALL RSPEAK(I)
410*35973Sbostic	RETURN
411*35973SbosticC
412*35973SbosticC O19--	MASTER SWITCH
413*35973SbosticC
414*35973Sbostic31000	IF(PRSA.NE.TURNW) GO TO 10
415*35973SbosticC						!TURN?
416*35973Sbostic	IF(PRSI.NE.SCREW) GO TO 31500
417*35973SbosticC						!WITH SCREWDRIVER?
418*35973Sbostic	IF(QOPEN(MACHI)) GO TO 31600
419*35973SbosticC						!LID UP?
420*35973Sbostic	CALL RSPEAK(226)
421*35973SbosticC						!NO, ACTIVATE.
422*35973Sbostic	IF(OCAN(COAL).NE.MACHI) GO TO 31400
423*35973SbosticC						!COAL INSIDE?
424*35973Sbostic	CALL NEWSTA(COAL,0,0,0,0)
425*35973SbosticC						!KILL COAL,
426*35973Sbostic	CALL NEWSTA(DIAMO,0,0,MACHI,0)
427*35973SbosticC						!REPLACE WITH DIAMOND.
428*35973Sbostic	RETURN
429*35973SbosticC
430*35973Sbostic31400	DO 31450 I=1,OLNT
431*35973SbosticC						!KILL NONCOAL OBJECTS.
432*35973Sbostic	  IF(OCAN(I).NE.MACHI) GO TO 31450
433*35973SbosticC						!INSIDE MACHINE?
434*35973Sbostic	  CALL NEWSTA(I,0,0,0,0)
435*35973SbosticC						!KILL OBJECT AND CONTENTS.
436*35973Sbostic	  CALL NEWSTA(GUNK,0,0,MACHI,0)
437*35973SbosticC						!REDUCE TO GUNK.
438*35973Sbostic31450	CONTINUE
439*35973Sbostic	RETURN
440*35973SbosticC
441*35973Sbostic31500	CALL RSPSUB(300,ODI2)
442*35973SbosticC						!CANT TURN WITH THAT.
443*35973Sbostic	RETURN
444*35973SbosticC
445*35973Sbostic31600	CALL RSPEAK(227)
446*35973SbosticC						!LID IS UP.
447*35973Sbostic	RETURN
448*35973SbosticC SOBJS, PAGE 9
449*35973SbosticC
450*35973SbosticC O20--	LEAK
451*35973SbosticC
452*35973Sbostic33000	IF((PRSO.NE.LEAK).OR.(PRSA.NE.PLUGW).OR.(RVMNT.LE.0))
453*35973Sbostic&		GO TO 10
454*35973Sbostic	IF(PRSI.NE.PUTTY) GO TO 33100
455*35973SbosticC						!WITH PUTTY?
456*35973Sbostic	RVMNT=-1
457*35973SbosticC						!DISABLE LEAK.
458*35973Sbostic	CTICK(CEVMNT)=0
459*35973Sbostic	CALL RSPEAK(577)
460*35973Sbostic	RETURN
461*35973SbosticC
462*35973Sbostic33100	CALL RSPSUB(301,ODI2)
463*35973SbosticC						!CANT WITH THAT.
464*35973Sbostic	RETURN
465*35973SbosticC
466*35973SbosticC O21--	DROWNING BUTTONS
467*35973SbosticC
468*35973Sbostic34000	IF(PRSA.NE.PUSHW) GO TO 10
469*35973SbosticC						!PUSH?
470*35973Sbostic	GO TO (34100,34200,34300,34400),(PRSO-RBUTT+1)
471*35973Sbostic	GO TO 10
472*35973SbosticC						!NOT A BUTTON.
473*35973SbosticC
474*35973Sbostic34100	RFLAG(HERE)=xor(RFLAG(HERE),RLIGHT)
475*35973Sbostic	I=230
476*35973Sbostic	IF(and(RFLAG(HERE),RLIGHT).NE.0) I=231
477*35973Sbostic	CALL RSPEAK(I)
478*35973Sbostic	RETURN
479*35973SbosticC
480*35973Sbostic34200	GATEF=.TRUE.
481*35973SbosticC						!RELEASE GATE.
482*35973Sbostic	CALL RSPEAK(232)
483*35973Sbostic	RETURN
484*35973SbosticC
485*35973Sbostic34300	GATEF=.FALSE.
486*35973SbosticC						!INTERLOCK GATE.
487*35973Sbostic	CALL RSPEAK(232)
488*35973Sbostic	RETURN
489*35973SbosticC
490*35973Sbostic34400	IF(RVMNT.NE.0) GO TO 34500
491*35973SbosticC						!LEAK ALREADY STARTED?
492*35973Sbostic	CALL RSPEAK(233)
493*35973SbosticC						!NO, START LEAK.
494*35973Sbostic	RVMNT=1
495*35973Sbostic	CTICK(CEVMNT)=-1
496*35973Sbostic	RETURN
497*35973SbosticC
498*35973Sbostic34500	CALL RSPEAK(234)
499*35973SbosticC						!BUTTON JAMMED.
500*35973Sbostic	RETURN
501*35973SbosticC
502*35973SbosticC O22--	INFLATABLE BOAT
503*35973SbosticC
504*35973Sbostic36000	IF(PRSA.NE.INFLAW) GO TO 10
505*35973SbosticC						!INFLATE?
506*35973Sbostic	IF(OROOM(IBOAT).NE.0) GO TO 36100
507*35973SbosticC						!IN ROOM?
508*35973Sbostic	CALL RSPEAK(235)
509*35973SbosticC						!NO, JOKE.
510*35973Sbostic	RETURN
511*35973SbosticC
512*35973Sbostic36100	IF(PRSI.NE.PUMP) GO TO 36200
513*35973SbosticC						!WITH PUMP?
514*35973Sbostic	CALL NEWSTA(IBOAT,0,0,0,0)
515*35973SbosticC						!KILL DEFL BOAT,
516*35973Sbostic	CALL NEWSTA(RBOAT,236,HERE,0,0)
517*35973SbosticC						!REPL WITH INF.
518*35973Sbostic	DEFLAF=.FALSE.
519*35973Sbostic	RETURN
520*35973SbosticC
521*35973Sbostic36200	I=237
522*35973SbosticC						!JOKES.
523*35973Sbostic	IF(PRSI.NE.LUNGS) I=303
524*35973Sbostic	CALL RSPSUB(I,ODI2)
525*35973Sbostic	RETURN
526*35973SbosticC
527*35973SbosticC O23--	DEFLATED BOAT
528*35973SbosticC
529*35973Sbostic37000	IF(PRSA.NE.INFLAW) GO TO 37100
530*35973SbosticC						!INFLATE?
531*35973Sbostic	CALL RSPEAK(238)
532*35973SbosticC						!JOKE.
533*35973Sbostic	RETURN
534*35973SbosticC
535*35973Sbostic37100	IF(PRSA.NE.PLUGW) GO TO 10
536*35973SbosticC						!PLUG?
537*35973Sbostic	IF(PRSI.NE.PUTTY) GO TO 33100
538*35973SbosticC						!WITH PUTTY?
539*35973Sbostic	CALL NEWSTA(IBOAT,239,OROOM(DBOAT),OCAN(DBOAT),OADV(DBOAT))
540*35973Sbostic	CALL NEWSTA(DBOAT,0,0,0,0)
541*35973SbosticC						!KILL DEFL BOAT, REPL.
542*35973Sbostic	RETURN
543*35973SbosticC SOBJS, PAGE 10
544*35973SbosticC
545*35973SbosticC O24--	RUBBER BOAT
546*35973SbosticC
547*35973Sbostic38000	IF(ARG.NE.0) GO TO 10
548*35973SbosticC						!DISMISS READIN, OUT.
549*35973Sbostic	IF((PRSA.NE.BOARDW).OR.(OADV(STICK).NE.WINNER)) GO TO 38100
550*35973Sbostic	CALL NEWSTA(RBOAT,0,0,0,0)
551*35973SbosticC						!KILL INFL BOAT,
552*35973Sbostic	CALL NEWSTA(DBOAT,240,HERE,0,0)
553*35973SbosticC						!REPL WITH DEAD.
554*35973Sbostic	DEFLAF=.TRUE.
555*35973Sbostic	RETURN
556*35973SbosticC
557*35973Sbostic38100	IF(PRSA.NE.INFLAW) GO TO 38200
558*35973SbosticC						!INFLATE?
559*35973Sbostic	CALL RSPEAK(367)
560*35973SbosticC						!YES, JOKE.
561*35973Sbostic	RETURN
562*35973SbosticC
563*35973Sbostic38200	IF(PRSA.NE.DEFLAW) GO TO 10
564*35973SbosticC						!DEFLATE?
565*35973Sbostic	IF(AV.EQ.RBOAT) GO TO 38300
566*35973SbosticC						!IN BOAT?
567*35973Sbostic	IF(OROOM(RBOAT).EQ.0) GO TO 38400
568*35973SbosticC						!ON GROUND?
569*35973Sbostic	CALL NEWSTA(RBOAT,0,0,0,0)
570*35973SbosticC						!KILL INFL BOAT,
571*35973Sbostic	CALL NEWSTA(IBOAT,241,HERE,0,0)
572*35973SbosticC						!REPL WITH DEFL.
573*35973Sbostic	DEFLAF=.TRUE.
574*35973Sbostic	RETURN
575*35973SbosticC
576*35973Sbostic38300	CALL RSPEAK(242)
577*35973SbosticC						!IN BOAT.
578*35973Sbostic	RETURN
579*35973SbosticC
580*35973Sbostic38400	CALL RSPEAK(243)
581*35973SbosticC						!NOT ON GROUND.
582*35973Sbostic	RETURN
583*35973SbosticC
584*35973SbosticC O25--	BRAIDED ROPE
585*35973SbosticC
586*35973Sbostic41000	IF((PRSA.NE.TIEW).OR.(PRSO.NE.BROPE).OR.
587*35973Sbostic&		((PRSI.NE.HOOK1).AND.(PRSI.NE.HOOK2)))
588*35973Sbostic&		GO TO 41500
589*35973Sbostic	BTIEF=PRSI
590*35973SbosticC						!RECORD LOCATION.
591*35973Sbostic	CFLAG(CEVBAL)=.FALSE.
592*35973SbosticC						!STALL ASCENT.
593*35973Sbostic	CALL RSPEAK(248)
594*35973Sbostic	RETURN
595*35973SbosticC
596*35973Sbostic41500	IF((PRSA.NE.UNTIEW).OR.(PRSO.NE.BROPE)) GO TO 10
597*35973Sbostic	IF(BTIEF.NE.0) GO TO 41600
598*35973SbosticC						!TIED UP?
599*35973Sbostic	CALL RSPEAK(249)
600*35973SbosticC						!NO, JOKE.
601*35973Sbostic	RETURN
602*35973SbosticC
603*35973Sbostic41600	CALL RSPEAK(250)
604*35973Sbostic	BTIEF=0
605*35973SbosticC						!UNTIE.
606*35973Sbostic	CTICK(CEVBAL)=3
607*35973SbosticC						!RESTART CLOCK.
608*35973Sbostic	CFLAG(CEVBAL)=.TRUE.
609*35973Sbostic	RETURN
610*35973SbosticC
611*35973SbosticC O26--	SAFE
612*35973SbosticC
613*35973Sbostic42000	I=0
614*35973SbosticC						!ASSUME UNPROCESSED.
615*35973Sbostic	IF(PRSA.EQ.TAKEW) I=251
616*35973SbosticC						!TAKE?
617*35973Sbostic	IF((PRSA.EQ.OPENW).AND.SAFEF) I=253
618*35973SbosticC						!OPEN AFTER BLAST?
619*35973Sbostic	IF((PRSA.EQ.OPENW).AND..NOT.SAFEF) I=254
620*35973SbosticC						!OPEN BEFORE BLAST?
621*35973Sbostic	IF((PRSA.EQ.CLOSEW).AND.SAFEF) I=253
622*35973SbosticC						!CLOSE AFTER?
623*35973Sbostic	IF((PRSA.EQ.CLOSEW).AND..NOT.SAFEF) I=255
624*35973Sbostic	IF(I.EQ.0) GO TO 10
625*35973Sbostic	CALL RSPEAK(I)
626*35973Sbostic	RETURN
627*35973SbosticC
628*35973SbosticC O27--	FUSE
629*35973SbosticC
630*35973Sbostic43000	IF(PRSA.NE.BURNW) GO TO 10
631*35973SbosticC						!BURN?
632*35973Sbostic	CALL RSPEAK(256)
633*35973Sbostic	CTICK(CEVFUS)=2
634*35973SbosticC						!START COUNTDOWN.
635*35973Sbostic	RETURN
636*35973SbosticC
637*35973SbosticC O28--	GNOME
638*35973SbosticC
639*35973Sbostic44000	IF((PRSA.NE.GIVEW).AND.(PRSA.NE.THROWW)) GO TO 44500
640*35973Sbostic	IF(OTVAL(PRSO).EQ.0) GO TO 44100
641*35973SbosticC						!TREASURE?
642*35973Sbostic	CALL RSPSUB(257,ODO2)
643*35973SbosticC						!YES, GET DOOR.
644*35973Sbostic	CALL NEWSTA(PRSO,0,0,0,0)
645*35973Sbostic	CALL NEWSTA(GNOME,0,0,0,0)
646*35973SbosticC						!VANISH GNOME.
647*35973Sbostic	GNODRF=.TRUE.
648*35973Sbostic	RETURN
649*35973SbosticC
650*35973Sbostic44100	CALL RSPSUB(258,ODO2)
651*35973SbosticC						!NO, LOSE OBJECT.
652*35973Sbostic	CALL NEWSTA(PRSO,0,0,0,0)
653*35973Sbostic	RETURN
654*35973SbosticC
655*35973Sbostic44500	CALL RSPEAK(259)
656*35973SbosticC						!NERVOUS GNOME.
657*35973Sbostic	IF(.NOT.GNOMEF) CTICK(CEVGNO)=5
658*35973SbosticC						!SCHEDULE BYEBYE.
659*35973Sbostic	GNOMEF=.TRUE.
660*35973Sbostic	RETURN
661*35973SbosticC
662*35973SbosticC O29--	COKE BOTTLES
663*35973SbosticC
664*35973Sbostic46000	IF((PRSA.NE.THROWW).AND.(PRSA.NE.MUNGW)) GO TO 10
665*35973Sbostic	CALL NEWSTA(PRSO,262,0,0,0)
666*35973SbosticC						!MUNG BOTTLES.
667*35973Sbostic	RETURN
668*35973SbosticC SOBJS, PAGE 11
669*35973SbosticC
670*35973SbosticC
671*35973SbosticC O30--	ROBOT
672*35973SbosticC
673*35973Sbostic53000	IF(PRSA.NE.GIVEW) GO TO 53200
674*35973SbosticC						!GIVE?
675*35973Sbostic	CALL NEWSTA(PRSO,0,0,0,AROBOT)
676*35973SbosticC						!PUT ON ROBOT.
677*35973Sbostic	CALL RSPSUB(302,ODO2)
678*35973Sbostic	RETURN
679*35973SbosticC
680*35973Sbostic53200	IF((PRSA.NE.MUNGW).AND.(PRSA.NE.THROWW)) GO TO 10
681*35973Sbostic	CALL NEWSTA(ROBOT,285,0,0,0)
682*35973SbosticC						!KILL ROBOT.
683*35973Sbostic	RETURN
684*35973SbosticC
685*35973SbosticC O31--	GRUE
686*35973SbosticC
687*35973Sbostic56000	IF(PRSA.NE.EXAMIW) GO TO 56100
688*35973SbosticC						!EXAMINE?
689*35973Sbostic	CALL RSPEAK(288)
690*35973Sbostic	RETURN
691*35973SbosticC
692*35973Sbostic56100	IF(PRSA.NE.FINDW) GO TO 10
693*35973SbosticC						!FIND?
694*35973Sbostic	CALL RSPEAK(289)
695*35973Sbostic	RETURN
696*35973SbosticC
697*35973Sbostic	END
698