# 2.11BSD#431 - /usr/src/new/PORT/dungeon/nobjs.F

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

Last modified: 1988-10-21 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 654 |