1*35973SbosticC NOBJS- NEW 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 NOBJS(RI,ARG) 12*35973Sbostic IMPLICIT INTEGER (A-Z) 13*35973Sbostic LOGICAL QOPEN,MOVETO,F 14*35973Sbostic LOGICAL QHERE,OPNCLS,MIRPAN 15*35973Sbostic#include "parser.h" 16*35973Sbostic#include "gamestate.h" 17*35973Sbostic#include "state.h" 18*35973Sbostic#include "screen.h" 19*35973Sbostic#include "puzzle.h" 20*35973SbosticC 21*35973SbosticC MISCELLANEOUS VARIABLES 22*35973SbosticC 23*35973Sbostic COMMON /HYPER/ HFACTR 24*35973Sbostic#include "rooms.h" 25*35973Sbostic#include "rflag.h" 26*35973Sbostic#include "rindex.h" 27*35973Sbostic#include "objects.h" 28*35973Sbostic#include "oflags.h" 29*35973Sbostic#include "oindex.h" 30*35973Sbostic#include "clock.h" 31*35973Sbostic 32*35973Sbostic#include "villians.h" 33*35973Sbostic#include "advers.h" 34*35973Sbostic#include "verbs.h" 35*35973Sbostic#include "flags.h" 36*35973SbosticC 37*35973SbosticC FUNCTIONS AND DATA 38*35973SbosticC 39*35973Sbostic QOPEN(R)=and(OFLAG2(R),OPENBT).NE.0 40*35973SbosticC NOBJS, PAGE 2 41*35973SbosticC 42*35973Sbostic IF(PRSO.NE.0) ODO2=ODESC2(PRSO) 43*35973Sbostic IF(PRSI.NE.0) ODI2=ODESC2(PRSI) 44*35973Sbostic AV=AVEHIC(WINNER) 45*35973Sbostic NOBJS=.TRUE. 46*35973SbosticC 47*35973Sbostic GO TO (1000,2000,3000,4000,5000,6000,7000,8000,9000, 48*35973Sbostic& 10000,11000,12000,13000,14000,15000,16000,17000, 49*35973Sbostic& 18000,19000,20000,21000), 50*35973Sbostic& (RI-31) 51*35973Sbostic CALL BUG(6,RI) 52*35973SbosticC 53*35973SbosticC RETURN HERE TO DECLARE FALSE RESULT 54*35973SbosticC 55*35973Sbostic10 NOBJS=.FALSE. 56*35973Sbostic RETURN 57*35973SbosticC 58*35973SbosticC O32-- BILLS 59*35973SbosticC 60*35973Sbostic1000 IF(PRSA.NE.EATW) GO TO 1100 61*35973SbosticC !EAT? 62*35973Sbostic CALL RSPEAK(639) 63*35973SbosticC !JOKE. 64*35973Sbostic RETURN 65*35973SbosticC 66*35973Sbostic1100 IF(PRSA.EQ.BURNW) CALL RSPEAK(640) 67*35973SbosticC !BURN? JOKE. 68*35973Sbostic GO TO 10 69*35973SbosticC !LET IT BE HANDLED. 70*35973SbosticC NOBJS, PAGE 3 71*35973SbosticC 72*35973SbosticC O33-- SCREEN OF LIGHT 73*35973SbosticC 74*35973Sbostic2000 TARGET=SCOL 75*35973SbosticC !TARGET IS SCOL. 76*35973Sbostic2100 IF(PRSO.NE.TARGET) GO TO 2400 77*35973SbosticC !PRSO EQ TARGET? 78*35973Sbostic IF((PRSA.NE.PUSHW).AND.(PRSA.NE.MOVEW).AND. 79*35973Sbostic& (PRSA.NE.TAKEW).AND.(PRSA.NE.RUBW)) GO TO 2200 80*35973Sbostic CALL RSPEAK(673) 81*35973SbosticC !HAND PASSES THRU. 82*35973Sbostic RETURN 83*35973SbosticC 84*35973Sbostic2200 IF((PRSA.NE.KILLW).AND.(PRSA.NE.ATTACW).AND. 85*35973Sbostic& (PRSA.NE.MUNGW)) GO TO 2400 86*35973Sbostic CALL RSPSUB(674,ODI2) 87*35973SbosticC !PASSES THRU. 88*35973Sbostic RETURN 89*35973SbosticC 90*35973Sbostic2400 IF((PRSA.NE.THROWW).OR.(PRSI.NE.TARGET)) GO TO 10 91*35973Sbostic IF(HERE.EQ.BKBOX) GO TO 2600 92*35973SbosticC !THRU SCOL? 93*35973Sbostic CALL NEWSTA(PRSO,0,BKBOX,0,0) 94*35973SbosticC !NO, THRU WALL. 95*35973Sbostic CALL RSPSUB(675,ODO2) 96*35973SbosticC !ENDS UP IN BOX ROOM. 97*35973Sbostic CTICK(CEVSCL)=0 98*35973SbosticC !CANCEL ALARM. 99*35973Sbostic SCOLRM=0 100*35973SbosticC !RESET SCOL ROOM. 101*35973Sbostic RETURN 102*35973SbosticC 103*35973Sbostic2600 IF(SCOLRM.EQ.0) GO TO 2900 104*35973SbosticC !TRIED TO GO THRU? 105*35973Sbostic CALL NEWSTA(PRSO,0,SCOLRM,0,0) 106*35973SbosticC !SUCCESS. 107*35973Sbostic CALL RSPSUB(676,ODO2) 108*35973SbosticC !ENDS UP SOMEWHERE. 109*35973Sbostic CTICK(CEVSCL)=0 110*35973SbosticC !CANCEL ALARM. 111*35973Sbostic SCOLRM=0 112*35973SbosticC !RESET SCOL ROOM. 113*35973Sbostic RETURN 114*35973SbosticC 115*35973Sbostic2900 CALL RSPEAK(213) 116*35973SbosticC !CANT DO IT. 117*35973Sbostic RETURN 118*35973SbosticC NOBJS, PAGE 4 119*35973SbosticC 120*35973SbosticC O34-- GNOME OF ZURICH 121*35973SbosticC 122*35973Sbostic3000 IF((PRSA.NE.GIVEW).AND.(PRSA.NE.THROWW)) GO TO 3200 123*35973Sbostic IF(OTVAL(PRSO).NE.0) GO TO 3100 124*35973SbosticC !THROW A TREASURE? 125*35973Sbostic CALL NEWSTA(PRSO,641,0,0,0) 126*35973SbosticC !NO, GO POP. 127*35973Sbostic RETURN 128*35973SbosticC 129*35973Sbostic3100 CALL NEWSTA(PRSO,0,0,0,0) 130*35973SbosticC !YES, BYE BYE TREASURE. 131*35973Sbostic CALL RSPSUB(642,ODO2) 132*35973Sbostic CALL NEWSTA(ZGNOM,0,0,0,0) 133*35973SbosticC !BYE BYE GNOME. 134*35973Sbostic CTICK(CEVZGO)=0 135*35973SbosticC !CANCEL EXIT. 136*35973Sbostic F=MOVETO(BKENT,WINNER) 137*35973SbosticC !NOW IN BANK ENTRANCE. 138*35973Sbostic RETURN 139*35973SbosticC 140*35973Sbostic3200 IF((PRSA.NE.ATTACW).AND.(PRSA.NE.KILLW).AND. 141*35973Sbostic& (PRSA.NE.MUNGW)) GO TO 3300 142*35973Sbostic CALL NEWSTA(ZGNOM,643,0,0,0) 143*35973SbosticC !VANISH GNOME. 144*35973Sbostic CTICK(CEVZGO)=0 145*35973SbosticC !CANCEL EXIT. 146*35973Sbostic RETURN 147*35973SbosticC 148*35973Sbostic3300 CALL RSPEAK(644) 149*35973SbosticC !GNOME IS IMPATIENT. 150*35973Sbostic RETURN 151*35973SbosticC 152*35973SbosticC O35-- EGG 153*35973SbosticC 154*35973Sbostic4000 IF((PRSA.NE.OPENW).OR.(PRSO.NE.EGG)) GO TO 4500 155*35973Sbostic IF(.NOT.QOPEN(EGG)) GO TO 4100 156*35973SbosticC !OPEN ALREADY? 157*35973Sbostic CALL RSPEAK(649) 158*35973SbosticC !YES. 159*35973Sbostic RETURN 160*35973SbosticC 161*35973Sbostic4100 IF(PRSI.NE.0) GO TO 4200 162*35973SbosticC !WITH SOMETHING? 163*35973Sbostic CALL RSPEAK(650) 164*35973SbosticC !NO, CANT. 165*35973Sbostic RETURN 166*35973SbosticC 167*35973Sbostic4200 IF(PRSI.NE.HANDS) GO TO 4300 168*35973SbosticC !WITH HANDS? 169*35973Sbostic CALL RSPEAK(651) 170*35973SbosticC !NOT RECOMMENDED. 171*35973Sbostic RETURN 172*35973SbosticC 173*35973Sbostic4300 I=652 174*35973SbosticC !MUNG MESSAGE. 175*35973Sbostic IF((and(OFLAG1(PRSI),TOOLBT).NE.0).OR. 176*35973Sbostic& (and(OFLAG2(PRSI),WEAPBT).NE.0)) GO TO 4600 177*35973Sbostic I=653 178*35973SbosticC !NOVELTY 1. 179*35973Sbostic IF(and(OFLAG2(PRSO),FITEBT).NE.0) I=654 180*35973Sbostic OFLAG2(PRSO)=or(OFLAG2(PRSO),FITEBT) 181*35973Sbostic CALL RSPSUB(I,ODI2) 182*35973Sbostic RETURN 183*35973SbosticC 184*35973Sbostic4500 IF((PRSA.NE.OPENW).AND.(PRSA.NE.MUNGW)) GO TO 4800 185*35973Sbostic I=655 186*35973SbosticC !YOU BLEW IT. 187*35973Sbostic4600 CALL NEWSTA(BEGG,I,OROOM(EGG),OCAN(EGG),OADV(EGG)) 188*35973Sbostic CALL NEWSTA(EGG,0,0,0,0) 189*35973SbosticC !VANISH EGG. 190*35973Sbostic OTVAL(BEGG)=2 191*35973SbosticC !BAD EGG HAS VALUE. 192*35973Sbostic IF(OCAN(CANAR).NE.EGG) GO TO 4700 193*35973SbosticC !WAS CANARY INSIDE? 194*35973Sbostic CALL RSPEAK(ODESCO(BCANA)) 195*35973SbosticC !YES, DESCRIBE RESULT. 196*35973Sbostic OTVAL(BCANA)=1 197*35973Sbostic RETURN 198*35973SbosticC 199*35973Sbostic4700 CALL NEWSTA(BCANA,0,0,0,0) 200*35973SbosticC !NO, VANISH IT. 201*35973Sbostic RETURN 202*35973SbosticC 203*35973Sbostic4800 IF((PRSA.NE.DROPW).OR.(HERE.NE.MTREE)) GO TO 10 204*35973Sbostic CALL NEWSTA(BEGG,658,FORE3,0,0) 205*35973SbosticC !DROPPED EGG. 206*35973Sbostic CALL NEWSTA(EGG,0,0,0,0) 207*35973Sbostic OTVAL(BEGG)=2 208*35973Sbostic IF(OCAN(CANAR).NE.EGG) GO TO 4700 209*35973Sbostic OTVAL(BCANA)=1 210*35973SbosticC !BAD CANARY. 211*35973Sbostic RETURN 212*35973SbosticC NOBJS, PAGE 5 213*35973SbosticC 214*35973SbosticC O36-- CANARIES, GOOD AND BAD 215*35973SbosticC 216*35973Sbostic5000 IF(PRSA.NE.WINDW) GO TO 10 217*35973SbosticC !WIND EM UP? 218*35973Sbostic IF(PRSO.EQ.CANAR) GO TO 5100 219*35973SbosticC !RIGHT ONE? 220*35973Sbostic CALL RSPEAK(645) 221*35973SbosticC !NO, BAD NEWS. 222*35973Sbostic RETURN 223*35973SbosticC 224*35973Sbostic5100 IF(.NOT.SINGSF.AND.((HERE.EQ.MTREE).OR. 225*35973Sbostic& ((HERE.GE.FORE1).AND.(HERE.LT.CLEAR)))) 226*35973Sbostic& GO TO 5200 227*35973Sbostic CALL RSPEAK(646) 228*35973SbosticC !NO, MEDIOCRE NEWS. 229*35973Sbostic RETURN 230*35973SbosticC 231*35973Sbostic5200 SINGSF=.TRUE. 232*35973SbosticC !SANG SONG. 233*35973Sbostic I=HERE 234*35973Sbostic IF(I.EQ.MTREE) I=FORE3 235*35973SbosticC !PLACE BAUBLE. 236*35973Sbostic CALL NEWSTA(BAUBL,647,I,0,0) 237*35973Sbostic RETURN 238*35973SbosticC 239*35973SbosticC O37-- WHITE CLIFFS 240*35973SbosticC 241*35973Sbostic6000 IF((PRSA.NE.CLMBW).AND.(PRSA.NE.CLMBUW).AND. 242*35973Sbostic& (PRSA.NE.CLMBDW)) GO TO 10 243*35973Sbostic CALL RSPEAK(648) 244*35973SbosticC !OH YEAH? 245*35973Sbostic RETURN 246*35973SbosticC 247*35973SbosticC O38-- WALL 248*35973SbosticC 249*35973Sbostic7000 IF((IABS(HERE-MLOC).NE.1).OR.(MRHERE(HERE).NE.0).OR. 250*35973Sbostic& (PRSA.NE.PUSHW)) GO TO 7100 251*35973Sbostic CALL RSPEAK(860) 252*35973SbosticC !PUSHED MIRROR WALL. 253*35973Sbostic RETURN 254*35973SbosticC 255*35973Sbostic7100 IF(and(RFLAG(HERE),RNWALL).EQ.0) GO TO 10 256*35973Sbostic CALL RSPEAK(662) 257*35973SbosticC !NO WALL. 258*35973Sbostic RETURN 259*35973SbosticC NOBJS, PAGE 6 260*35973SbosticC 261*35973SbosticC O39-- SONG BIRD GLOBAL 262*35973SbosticC 263*35973Sbostic8000 IF(PRSA.NE.FINDW) GO TO 8100 264*35973SbosticC !FIND? 265*35973Sbostic CALL RSPEAK(666) 266*35973Sbostic RETURN 267*35973SbosticC 268*35973Sbostic8100 IF(PRSA.NE.EXAMIW) GO TO 10 269*35973SbosticC !EXAMINE? 270*35973Sbostic CALL RSPEAK(667) 271*35973Sbostic RETURN 272*35973SbosticC 273*35973SbosticC O40-- PUZZLE/SCOL WALLS 274*35973SbosticC 275*35973Sbostic9000 IF(HERE.NE.CPUZZ) GO TO 9500 276*35973SbosticC !PUZZLE WALLS? 277*35973Sbostic IF(PRSA.NE.PUSHW) GO TO 10 278*35973SbosticC !PUSH? 279*35973Sbostic DO 9100 I=1,8,2 280*35973SbosticC !LOCATE WALL. 281*35973Sbostic IF(PRSO.EQ.CPWL(I)) GO TO 9200 282*35973Sbostic9100 CONTINUE 283*35973Sbostic CALL BUG(80,PRSO) 284*35973SbosticC !WHAT? 285*35973SbosticC 286*35973Sbostic9200 J=CPWL(I+1) 287*35973SbosticC !GET DIRECTIONAL OFFSET. 288*35973Sbostic NXT=CPHERE+J 289*35973SbosticC !GET NEXT STATE. 290*35973Sbostic WL=CPVEC(NXT) 291*35973SbosticC !GET C(NEXT STATE). 292*35973Sbostic GO TO (9300,9300,9300,9250,9350),(WL+4) 293*35973SbosticC !PROCESS. 294*35973SbosticC 295*35973Sbostic9250 CALL RSPEAK(876) 296*35973SbosticC !CLEAR CORRIDOR. 297*35973Sbostic RETURN 298*35973SbosticC 299*35973Sbostic9300 IF(CPVEC(NXT+J).EQ.0) GO TO 9400 300*35973SbosticC !MOVABLE, ROOM TO MOVE? 301*35973Sbostic9350 CALL RSPEAK(877) 302*35973SbosticC !IMMOVABLE, NO ROOM. 303*35973Sbostic RETURN 304*35973SbosticC 305*35973Sbostic9400 I=878 306*35973SbosticC !ASSUME FIRST PUSH. 307*35973Sbostic IF(CPUSHF) I=879 308*35973SbosticC !NOT? 309*35973Sbostic CPUSHF=.TRUE. 310*35973Sbostic CPVEC(NXT+J)=WL 311*35973SbosticC !MOVE WALL. 312*35973Sbostic CPVEC(NXT)=0 313*35973SbosticC !VACATE NEXT STATE. 314*35973Sbostic CALL CPGOTO(NXT) 315*35973SbosticC !ONWARD. 316*35973Sbostic CALL CPINFO(I,NXT) 317*35973SbosticC !DESCRIBE. 318*35973Sbostic CALL PRINCR(.TRUE.,HERE) 319*35973SbosticC !PRINT ROOMS CONTENTS. 320*35973Sbostic RFLAG(HERE)=or(RFLAG(HERE),RSEEN) 321*35973Sbostic RETURN 322*35973SbosticC 323*35973Sbostic9500 IF(HERE.NE.SCOLAC) GO TO 9700 324*35973SbosticC !IN SCOL ACTIVE ROOM? 325*35973Sbostic DO 9600 I=1,12,3 326*35973Sbostic TARGET=SCOLWL(I+1) 327*35973SbosticC !ASSUME TARGET. 328*35973Sbostic IF(SCOLWL(I).EQ.HERE) GO TO 2100 329*35973SbosticC !TREAT IF FOUND. 330*35973Sbostic9600 CONTINUE 331*35973SbosticC 332*35973Sbostic9700 IF(HERE.NE.BKBOX) GO TO 10 333*35973SbosticC !IN BOX ROOM? 334*35973Sbostic TARGET=WNORT 335*35973Sbostic GO TO 2100 336*35973SbosticC NOBJS, PAGE 7 337*35973SbosticC 338*35973SbosticC O41-- SHORT POLE 339*35973SbosticC 340*35973Sbostic10000 IF(PRSA.NE.RAISEW) GO TO 10100 341*35973SbosticC !LIFT? 342*35973Sbostic I=749 343*35973SbosticC !ASSUME UP. 344*35973Sbostic IF(POLEUF.EQ.2) I=750 345*35973SbosticC !ALREADY UP? 346*35973Sbostic CALL RSPEAK(I) 347*35973Sbostic POLEUF=2 348*35973SbosticC !POLE IS RAISED. 349*35973Sbostic RETURN 350*35973SbosticC 351*35973Sbostic10100 IF((PRSA.NE.LOWERW).AND.(PRSA.NE.PUSHW)) GO TO 10 352*35973Sbostic IF(POLEUF.NE.0) GO TO 10200 353*35973SbosticC !ALREADY LOWERED? 354*35973Sbostic CALL RSPEAK(751) 355*35973SbosticC !CANT DO IT. 356*35973Sbostic RETURN 357*35973SbosticC 358*35973Sbostic10200 IF(MOD(MDIR,180).NE.0) GO TO 10300 359*35973SbosticC !MIRROR N-S? 360*35973Sbostic POLEUF=0 361*35973SbosticC !YES, LOWER INTO 362*35973Sbostic CALL RSPEAK(752) 363*35973SbosticC !CHANNEL. 364*35973Sbostic RETURN 365*35973SbosticC 366*35973Sbostic10300 IF((MDIR.NE.270).OR.(MLOC.NE.MRB)) GO TO 10400 367*35973Sbostic POLEUF=0 368*35973SbosticC !LOWER INTO HOLE. 369*35973Sbostic CALL RSPEAK(753) 370*35973Sbostic RETURN 371*35973SbosticC 372*35973Sbostic10400 CALL RSPEAK(753+POLEUF) 373*35973SbosticC !POLEUF = 1 OR 2. 374*35973Sbostic POLEUF=1 375*35973SbosticC !NOW ON FLOOR. 376*35973Sbostic RETURN 377*35973SbosticC 378*35973SbosticC O42-- MIRROR SWITCH 379*35973SbosticC 380*35973Sbostic11000 IF(PRSA.NE.PUSHW) GO TO 10 381*35973SbosticC !PUSH? 382*35973Sbostic IF(MRPSHF) GO TO 11300 383*35973SbosticC !ALREADY PUSHED? 384*35973Sbostic CALL RSPEAK(756) 385*35973SbosticC !BUTTON GOES IN. 386*35973Sbostic DO 11100 I=1,OLNT 387*35973SbosticC !BLOCKED? 388*35973Sbostic IF(QHERE(I,MREYE).AND.(I.NE.RBEAM)) GO TO 11200 389*35973Sbostic11100 CONTINUE 390*35973Sbostic CALL RSPEAK(757) 391*35973SbosticC !NOTHING IN BEAM. 392*35973Sbostic RETURN 393*35973SbosticC 394*35973Sbostic11200 CFLAG(CEVMRS)=.TRUE. 395*35973SbosticC !MIRROR OPENS. 396*35973Sbostic CTICK(CEVMRS)=7 397*35973Sbostic MRPSHF=.TRUE. 398*35973Sbostic MROPNF=.TRUE. 399*35973Sbostic RETURN 400*35973SbosticC 401*35973Sbostic11300 CALL RSPEAK(758) 402*35973SbosticC !MIRROR ALREADYOPEN. 403*35973Sbostic RETURN 404*35973SbosticC NOBJS, PAGE 8 405*35973SbosticC 406*35973SbosticC O43-- BEAM FUNCTION 407*35973SbosticC 408*35973Sbostic12000 IF((PRSA.NE.TAKEW).OR.(PRSO.NE.RBEAM)) GO TO 12100 409*35973Sbostic CALL RSPEAK(759) 410*35973SbosticC !TAKE BEAM, JOKE. 411*35973Sbostic RETURN 412*35973SbosticC 413*35973Sbostic12100 I=PRSO 414*35973SbosticC !ASSUME BLK WITH DIROBJ. 415*35973Sbostic IF((PRSA.EQ.PUTW).AND.(PRSI.EQ.RBEAM)) GO TO 12200 416*35973Sbostic IF((PRSA.NE.MUNGW).OR.(PRSO.NE.RBEAM).OR. 417*35973Sbostic& (PRSI.EQ.0)) GO TO 10 418*35973Sbostic I=PRSI 419*35973Sbostic12200 IF(OADV(I).NE.WINNER) GO TO 12300 420*35973SbosticC !CARRYING? 421*35973Sbostic CALL NEWSTA(I,0,HERE,0,0) 422*35973SbosticC !DROP OBJ. 423*35973Sbostic CALL RSPSUB(760,ODESC2(I)) 424*35973Sbostic RETURN 425*35973SbosticC 426*35973Sbostic12300 J=761 427*35973SbosticC !ASSUME NOT IN ROOM. 428*35973Sbostic IF(QHERE(J,HERE)) I=762 429*35973SbosticC !IN ROOM? 430*35973Sbostic CALL RSPSUB(J,ODESC2(I)) 431*35973SbosticC !DESCRIBE. 432*35973Sbostic RETURN 433*35973SbosticC 434*35973SbosticC O44-- BRONZE DOOR 435*35973SbosticC 436*35973Sbostic13000 IF((HERE.EQ.NCELL).OR.((LCELL.EQ.4).AND. 437*35973Sbostic& ((HERE.EQ.CELL).OR.(HERE.EQ.SCORR)))) 438*35973Sbostic& GO TO 13100 439*35973Sbostic CALL RSPEAK(763) 440*35973SbosticC !DOOR NOT THERE. 441*35973Sbostic RETURN 442*35973SbosticC 443*35973Sbostic13100 IF(.NOT.OPNCLS(ODOOR,764,765)) GO TO 10 444*35973SbosticC !OPEN/CLOSE? 445*35973Sbostic IF((HERE.EQ.NCELL).AND.QOPEN(ODOOR)) 446*35973Sbostic& CALL RSPEAK(766) 447*35973Sbostic RETURN 448*35973SbosticC 449*35973SbosticC O45-- QUIZ DOOR 450*35973SbosticC 451*35973Sbostic14000 IF((PRSA.NE.OPENW).AND.(PRSA.NE.CLOSEW)) GO TO 14100 452*35973Sbostic CALL RSPEAK(767) 453*35973SbosticC !DOOR WONT MOVE. 454*35973Sbostic RETURN 455*35973SbosticC 456*35973Sbostic14100 IF(PRSA.NE.KNOCKW) GO TO 10 457*35973SbosticC !KNOCK? 458*35973Sbostic IF(INQSTF) GO TO 14200 459*35973SbosticC !TRIED IT ALREADY? 460*35973Sbostic INQSTF=.TRUE. 461*35973SbosticC !START INQUISITION. 462*35973Sbostic CFLAG(CEVINQ)=.TRUE. 463*35973Sbostic CTICK(CEVINQ)=2 464*35973Sbostic QUESNO=RND(8) 465*35973SbosticC !SELECT QUESTION. 466*35973Sbostic NQATT=0 467*35973Sbostic CORRCT=0 468*35973Sbostic CALL RSPEAK(768) 469*35973SbosticC !ANNOUNCE RULES. 470*35973Sbostic CALL RSPEAK(769) 471*35973Sbostic CALL RSPEAK(770+QUESNO) 472*35973SbosticC !ASK QUESTION. 473*35973Sbostic RETURN 474*35973SbosticC 475*35973Sbostic14200 CALL RSPEAK(798) 476*35973SbosticC !NO REPLY. 477*35973Sbostic RETURN 478*35973SbosticC 479*35973SbosticC O46-- LOCKED DOOR 480*35973SbosticC 481*35973Sbostic15000 IF(PRSA.NE.OPENW) GO TO 10 482*35973SbosticC !OPEN? 483*35973Sbostic CALL RSPEAK(778) 484*35973SbosticC !CANT. 485*35973Sbostic RETURN 486*35973SbosticC 487*35973SbosticC O47-- CELL DOOR 488*35973SbosticC 489*35973Sbostic16000 NOBJS=OPNCLS(CDOOR,779,780) 490*35973SbosticC !OPEN/CLOSE? 491*35973Sbostic RETURN 492*35973SbosticC NOBJS, PAGE 9 493*35973SbosticC 494*35973SbosticC O48-- DIALBUTTON 495*35973SbosticC 496*35973Sbostic17000 IF(PRSA.NE.PUSHW) GO TO 10 497*35973SbosticC !PUSH? 498*35973Sbostic CALL RSPEAK(809) 499*35973SbosticC !CLICK. 500*35973Sbostic IF(QOPEN(CDOOR)) CALL RSPEAK(810) 501*35973SbosticC !CLOSE CELL DOOR. 502*35973SbosticC 503*35973Sbostic DO 17100 I=1,OLNT 504*35973SbosticC !RELOCATE OLD TO HYPER. 505*35973Sbostic IF((OROOM(I).EQ.CELL).AND.(and(OFLAG1(I),DOORBT).EQ.0)) 506*35973Sbostic& CALL NEWSTA(I,0,LCELL*HFACTR,0,0) 507*35973Sbostic IF(OROOM(I).EQ.(PNUMB*HFACTR)) 508*35973Sbostic& CALL NEWSTA(I,0,CELL,0,0) 509*35973Sbostic17100 CONTINUE 510*35973SbosticC 511*35973Sbostic OFLAG2(ODOOR)=and(OFLAG2(ODOOR), not(OPENBT)) 512*35973Sbostic OFLAG2(CDOOR)=and(OFLAG2(CDOOR), not(OPENBT)) 513*35973Sbostic OFLAG1(ODOOR)=and(OFLAG1(ODOOR), not(VISIBT)) 514*35973Sbostic IF(PNUMB.EQ.4) OFLAG1(ODOOR)=or(OFLAG1(ODOOR),VISIBT) 515*35973SbosticC 516*35973Sbostic IF(AROOM(PLAYER).NE.CELL) GO TO 17400 517*35973SbosticC !PLAYER IN CELL? 518*35973Sbostic IF(LCELL.NE.4) GO TO 17200 519*35973SbosticC !IN RIGHT CELL? 520*35973Sbostic OFLAG1(ODOOR)=or(OFLAG1(ODOOR), VISIBT) 521*35973Sbostic F=MOVETO(NCELL,PLAYER) 522*35973SbosticC !YES, MOVETO NCELL. 523*35973Sbostic GO TO 17400 524*35973Sbostic17200 F=MOVETO(PCELL,PLAYER) 525*35973SbosticC !NO, MOVETO PCELL. 526*35973SbosticC 527*35973Sbostic17400 LCELL=PNUMB 528*35973Sbostic RETURN 529*35973SbosticC NOBJS, PAGE 10 530*35973SbosticC 531*35973SbosticC O49-- DIAL INDICATOR 532*35973SbosticC 533*35973Sbostic18000 IF(PRSA.NE.SPINW) GO TO 18100 534*35973SbosticC !SPIN? 535*35973Sbostic PNUMB=RND(8)+1 536*35973SbosticC !WHEE 537*35973SbosticC ! 538*35973Sbostic CALL RSPSUB(797,712+PNUMB) 539*35973Sbostic RETURN 540*35973SbosticC 541*35973Sbostic18100 IF((PRSA.NE.MOVEW).AND.(PRSA.NE.PUTW).AND. 542*35973Sbostic& (PRSA.NE.TRNTOW)) GO TO 10 543*35973Sbostic IF(PRSI.NE.0) GO TO 18200 544*35973SbosticC !TURN DIAL TO X? 545*35973Sbostic CALL RSPEAK(806) 546*35973SbosticC !MUST SPECIFY. 547*35973Sbostic RETURN 548*35973SbosticC 549*35973Sbostic18200 IF((PRSI.GE.NUM1).AND.(PRSI.LE.NUM8)) GO TO 18300 550*35973Sbostic CALL RSPEAK(807) 551*35973SbosticC !MUST BE DIGIT. 552*35973Sbostic RETURN 553*35973SbosticC 554*35973Sbostic18300 PNUMB=PRSI-NUM1+1 555*35973SbosticC !SET UP NEW. 556*35973Sbostic CALL RSPSUB(808,712+PNUMB) 557*35973Sbostic RETURN 558*35973SbosticC 559*35973SbosticC O50-- GLOBAL MIRROR 560*35973SbosticC 561*35973Sbostic19000 NOBJS=MIRPAN(832,.FALSE.) 562*35973Sbostic RETURN 563*35973SbosticC 564*35973SbosticC O51-- GLOBAL PANEL 565*35973SbosticC 566*35973Sbostic20000 IF(HERE.NE.FDOOR) GO TO 20100 567*35973SbosticC !AT FRONT DOOR? 568*35973Sbostic IF((PRSA.NE.OPENW).AND.(PRSA.NE.CLOSEW)) GO TO 10 569*35973Sbostic CALL RSPEAK(843) 570*35973SbosticC !PANEL IN DOOR, NOGO. 571*35973Sbostic RETURN 572*35973SbosticC 573*35973Sbostic20100 NOBJS=MIRPAN(838,.TRUE.) 574*35973Sbostic RETURN 575*35973SbosticC 576*35973SbosticC O52-- PUZZLE ROOM SLIT 577*35973SbosticC 578*35973Sbostic21000 IF((PRSA.NE.PUTW).OR.(PRSI.NE.CSLIT)) GO TO 10 579*35973Sbostic IF(PRSO.NE.GCARD) GO TO 21100 580*35973SbosticC !PUT CARD IN SLIT? 581*35973Sbostic CALL NEWSTA(PRSO,863,0,0,0) 582*35973SbosticC !KILL CARD. 583*35973Sbostic CPOUTF=.TRUE. 584*35973SbosticC !OPEN DOOR. 585*35973Sbostic OFLAG1(STLDR)=and(OFLAG1(STLDR),not(VISIBT)) 586*35973Sbostic RETURN 587*35973SbosticC 588*35973Sbostic21100 IF((and(OFLAG1(PRSO),VICTBT).EQ.0).AND. 589*35973Sbostic& (and(OFLAG2(PRSO),VILLBT).EQ.0)) GO TO 21200 590*35973Sbostic CALL RSPEAK(RND(5)+552) 591*35973SbosticC !JOKE FOR VILL, VICT. 592*35973Sbostic RETURN 593*35973SbosticC 594*35973Sbostic21200 CALL NEWSTA(PRSO,0,0,0,0) 595*35973SbosticC !KILL OBJECT. 596*35973Sbostic CALL RSPSUB(864,ODO2) 597*35973SbosticC !DESCRIBE. 598*35973Sbostic RETURN 599*35973SbosticC 600*35973Sbostic END 601*35973SbosticC MIRPAN-- PROCESSOR FOR GLOBAL MIRROR/PANEL 602*35973SbosticC 603*35973SbosticC DECLARATIONS 604*35973SbosticC 605*35973Sbostic LOGICAL FUNCTION MIRPAN(ST,PNF) 606*35973Sbostic IMPLICIT INTEGER(A-Z) 607*35973Sbostic LOGICAL PNF 608*35973Sbostic#include "gamestate.h" 609*35973Sbostic#include "parser.h" 610*35973Sbostic#include "verbs.h" 611*35973Sbostic#include "flags.h" 612*35973SbosticC MIRPAN, PAGE 2 613*35973SbosticC 614*35973Sbostic MIRPAN=.TRUE. 615*35973Sbostic NUM=MRHERE(HERE) 616*35973SbosticC !GET MIRROR NUM. 617*35973Sbostic IF(NUM.NE.0) GO TO 100 618*35973SbosticC !ANY HERE? 619*35973Sbostic CALL RSPEAK(ST) 620*35973SbosticC !NO, LOSE. 621*35973Sbostic RETURN 622*35973SbosticC 623*35973Sbostic100 MRBF=0 624*35973SbosticC !ASSUME MIRROR OK. 625*35973Sbostic IF(((NUM.EQ.1).AND..NOT.MR1F).OR. 626*35973Sbostic& ((NUM.EQ.2).AND..NOT.MR2F)) MRBF=1 627*35973Sbostic IF((PRSA.NE.MOVEW).AND.(PRSA.NE.OPENW)) GO TO 200 628*35973Sbostic CALL RSPEAK(ST+1) 629*35973SbosticC !CANT OPEN OR MOVE. 630*35973Sbostic RETURN 631*35973SbosticC 632*35973Sbostic200 IF(PNF.OR.((PRSA.NE.LOOKIW).AND.(PRSA.NE.EXAMIW).AND. 633*35973Sbostic& (PRSA.NE.LOOKW))) GO TO 300 634*35973Sbostic CALL RSPEAK(844+MRBF) 635*35973SbosticC !LOOK IN MIRROR. 636*35973Sbostic RETURN 637*35973SbosticC 638*35973Sbostic300 IF(PRSA.NE.MUNGW) GO TO 400 639*35973SbosticC !BREAK? 640*35973Sbostic CALL RSPEAK(ST+2+MRBF) 641*35973SbosticC !DO IT. 642*35973Sbostic IF((NUM.EQ.1).AND..NOT.PNF) MR1F=.FALSE. 643*35973Sbostic IF((NUM.EQ.2).AND..NOT.PNF) MR2F=.FALSE. 644*35973Sbostic RETURN 645*35973SbosticC 646*35973Sbostic400 IF(PNF.OR.(MRBF.EQ.0)) GO TO 500 647*35973SbosticC !BROKEN MIRROR? 648*35973Sbostic CALL RSPEAK(846) 649*35973Sbostic RETURN 650*35973SbosticC 651*35973Sbostic500 IF(PRSA.NE.PUSHW) GO TO 600 652*35973SbosticC !PUSH? 653*35973Sbostic CALL RSPEAK(ST+3+NUM) 654*35973Sbostic RETURN 655*35973SbosticC 656*35973Sbostic600 MIRPAN=.FALSE. 657*35973SbosticC !CANT HANDLE IT. 658*35973Sbostic RETURN 659*35973SbosticC 660*35973Sbostic END 661