1: C OAPPLI- OBJECT SPECIAL ACTION ROUTINES
   2: C
   3: C COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142
   4: C ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED
   5: C WRITTEN BY R. M. SUPNIK
   6: C
   7: C DECLARATIONS
   8: C
   9:         LOGICAL FUNCTION OAPPLI(RI,ARG)
  10:         IMPLICIT INTEGER (A-Z)
  11:         LOGICAL SOBJS,NOBJS
  12:         LOGICAL QOPEN,QON,LIT
  13:         LOGICAL MOVETO,RMDESC,CLOCKD
  14:         LOGICAL THIEFP,CYCLOP,TROLLP,BALLOP,LIGHTP
  15:         LOGICAL QEMPTY,QHERE,F,OPNCLS
  16: #include "parser.h"
  17: #include "gamestate.h"
  18: #include "state.h"
  19: C
  20:         COMMON /BATS/ BATDRP(9)
  21: C
  22: C PUZZLE ROOM
  23: C
  24:         COMMON /PUZZLE/ CPDR(16),CPWL(8),CPVEC(64)
  25: #include "rooms.h"
  26: #include "rflag.h"
  27: #include "rindex.h"
  28: #include "objects.h"
  29: #include "oflags.h"
  30: #include "oindex.h"
  31: #include "clock.h"
  32: 
  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:         QON(R)=and(OFLAG1(R),ONBT).NE.0
  41:         DATA MXSMP/99/
  42: C OAPPLI, PAGE 2
  43: C
  44:         IF(RI.EQ.0) GO TO 10
  45: C						!ZERO IS FALSE APP.
  46:         IF(RI.LE.MXSMP) GO TO 100
  47: C						!SIMPLE OBJECT?
  48:         IF(PRSO.GT.220) GO TO 5
  49:         IF(PRSO.NE.0) ODO2=ODESC2(PRSO)
  50: 5       IF(PRSI.NE.0) ODI2=ODESC2(PRSI)
  51:         AV=AVEHIC(WINNER)
  52:         FLOBTS=FLAMBT+LITEBT+ONBT
  53:         OAPPLI=.TRUE.
  54: C
  55:         GO TO (2000,5000,10000,11000,12000,15000,18000,
  56: &        19000,20000,22000,25000,26000,32000,35000,39000,40000,
  57: &        45000,47000,48000,49000,50000,51000,52000,54000,55000,
  58: &        56000,57000,58000,59000,60000,61000,62000),
  59: &               (RI-MXSMP)
  60:         CALL BUG(6,RI)
  61: C
  62: C RETURN HERE TO DECLARE FALSE RESULT
  63: C
  64: 10      OAPPLI=.FALSE.
  65:         RETURN
  66: C
  67: C SIMPLE OBJECTS, PROCESSED EXTERNALLY.
  68: C
  69: 100     IF(RI.LT.32) OAPPLI=SOBJS(RI,ARG)
  70:         IF(RI.GE.32) OAPPLI=NOBJS(RI,ARG)
  71:         RETURN
  72: C OAPPLI, PAGE 3
  73: C
  74: C O100--	MACHINE FUNCTION
  75: C
  76: 2000    IF(HERE.NE.MMACH) GO TO 10
  77: C						!NOT HERE? F
  78:         OAPPLI=OPNCLS(MACHI,123,124)
  79: C						!HANDLE OPN/CLS.
  80:         RETURN
  81: C
  82: C O101--	WATER FUNCTION
  83: C
  84: 5000    IF(PRSA.NE.FILLW) GO TO 5050
  85: C						!FILL X WITH Y IS
  86:         PRSA=PUTW
  87: C						!MADE INTO
  88:         I=PRSI
  89:         PRSI=PRSO
  90:         PRSO=I
  91: C						!PUT Y IN X.
  92:         I=ODI2
  93:         ODI2=ODO2
  94:         ODO2=I
  95: 5050    IF((PRSO.EQ.WATER).OR.(PRSO.EQ.GWATE)) GO TO 5100
  96:         CALL RSPEAK(561)
  97: C						!WATER IS IND OBJ,
  98:         RETURN
  99: C						!PUNT.
 100: C
 101: 5100    IF(PRSA.NE.TAKEW) GO TO 5400
 102: C						!TAKE WATER?
 103:         IF((OADV(BOTTL).EQ.WINNER).AND.(OCAN(PRSO).NE.BOTTL))
 104: &               GO TO 5500
 105:         IF(OCAN(PRSO).EQ.0) GO TO 5200
 106: C						!INSIDE ANYTHING?
 107:         IF(QOPEN(OCAN(PRSO))) GO TO 5200
 108: C						!YES, OPEN?
 109:         CALL RSPEAK(525,ODESC2(OCAN(PRSO)))
 110: C						!INSIDE, CLOSED, PUNT.
 111:         RETURN
 112: C
 113: 5200    CALL RSPEAK(615)
 114: C						!NOT INSIDE OR OPEN,
 115:         RETURN
 116: C						!SLIPS THRU FINGERS.
 117: C
 118: 5400    IF(PRSA.NE.PUTW) GO TO 5700
 119: C						!PUT WATER IN X?
 120:         IF((AV.NE.0).AND.(PRSI.EQ.AV)) GO TO 5800
 121: C						!IN VEH?
 122:         IF(PRSI.EQ.BOTTL) GO TO 5500
 123: C						!IN BOTTLE?
 124:         CALL RSPSUB(297,ODI2)
 125: C						!WONT GO ELSEWHERE.
 126:         CALL NEWSTA(PRSO,0,0,0,0)
 127: C						!VANISH WATER.
 128:         RETURN
 129: C
 130: 5500    IF(QOPEN(BOTTL)) GO TO 5550
 131: C						!BOTTLE OPEN?
 132:         CALL RSPEAK(612)
 133: C						!NO, LOSE.
 134:         RETURN
 135: C
 136: 5550    IF(QEMPTY(BOTTL)) GO TO 5600
 137: C						!OPEN, EMPTY?
 138:         CALL RSPEAK(613)
 139: C						!NO, ALREADY FULL.
 140:         RETURN
 141: C
 142: 5600    CALL NEWSTA(WATER,614,0,BOTTL,0)
 143: C						!TAKE WATER TO BOTTLE.
 144:         RETURN
 145: C
 146: 5700    IF((PRSA.NE.DROPW).AND.(PRSA.NE.POURW).AND.
 147: &               (PRSA.NE.GIVEW)) GO TO 5900
 148:         IF(AV.NE.0) GO TO 5800
 149: C						!INTO VEHICLE?
 150:         CALL NEWSTA(PRSO,133,0,0,0)
 151: C						!NO, VANISHES.
 152:         RETURN
 153: C
 154: 5800    CALL NEWSTA(WATER,0,0,AV,0)
 155: C						!WATER INTO VEHICLE.
 156:         CALL RSPSUB(296,ODESC2(AV))
 157: C						!DESCRIBE.
 158:         RETURN
 159: C
 160: 5900    IF(PRSA.NE.THROWW) GO TO 10
 161: C						!LAST CHANCE, THROW?
 162:         CALL NEWSTA(PRSO,132,0,0,0)
 163: C						!VANISHES.
 164:         RETURN
 165: C OAPPLI, PAGE 4
 166: C
 167: C O102--	LEAF PILE
 168: C
 169: 10000   IF(PRSA.NE.BURNW) GO TO 10500
 170: C						!BURN?
 171:         IF(OROOM(PRSO).EQ.0) GO TO 10100
 172: C						!WAS HE CARRYING?
 173:         CALL NEWSTA(PRSO,158,0,0,0)
 174: C						!NO, BURN IT.
 175:         RETURN
 176: C
 177: 10100   CALL NEWSTA(PRSO,0,HERE,0,0)
 178: C						!DROP LEAVES.
 179:         CALL JIGSUP(159)
 180: C						!BURN HIM.
 181:         RETURN
 182: C
 183: 10500   IF(PRSA.NE.MOVEW) GO TO 10600
 184: C						!MOVE?
 185:         CALL RSPEAK(2)
 186: C						!DONE.
 187:         RETURN
 188: C
 189: 10600   IF((PRSA.NE.LOOKUW).OR.(RVCLR.NE.0)) GO TO 10
 190:         CALL RSPEAK(344)
 191: C						!LOOK UNDER?
 192:         RETURN
 193: C
 194: C O103--	TROLL, DONE EXTERNALLY.
 195: C
 196: 11000   OAPPLI=TROLLP(ARG)
 197: C						!TROLL PROCESSOR.
 198:         RETURN
 199: C
 200: C O104--	RUSTY KNIFE.
 201: C
 202: 12000   IF(PRSA.NE.TAKEW) GO TO 12100
 203: C						!TAKE?
 204:         IF(OADV(SWORD).EQ.WINNER) CALL RSPEAK(160)
 205: C						!PULSE SWORD.
 206:         GO TO 10
 207: C
 208: 12100   IF((((PRSA.NE.ATTACW).AND.(PRSA.NE.KILLW)).OR.
 209: &               (PRSI.NE.RKNIF)).AND.
 210: &         (((PRSA.NE.SWINGW).AND.(PRSA.NE.THROWW)).OR.
 211: &               (PRSO.NE.RKNIF))) GO TO 10
 212:         CALL NEWSTA(RKNIF,0,0,0,0)
 213: C						!KILL KNIFE.
 214:         CALL JIGSUP(161)
 215: C						!KILL HIM.
 216:         RETURN
 217: C OAPPLI, PAGE 5
 218: C
 219: C O105--	GLACIER
 220: C
 221: 15000   IF(PRSA.NE.THROWW) GO TO 15500
 222: C						!THROW?
 223:         IF(PRSO.NE.TORCH) GO TO 15400
 224: C						!TORCH?
 225:         CALL NEWSTA(ICE,169,0,0,0)
 226: C						!MELT ICE.
 227:         ODESC1(TORCH)=174
 228: C						!MUNG TORCH.
 229:         ODESC2(TORCH)=173
 230:         OFLAG1(TORCH)=and(OFLAG1(TORCH), not(FLOBTS))
 231:         CALL NEWSTA(TORCH,0,STREA,0,0)
 232: C						!MOVE TORCH.
 233:         GLACRF=.TRUE.
 234: C						!GLACIER GONE.
 235:         IF(.NOT.LIT(HERE)) CALL RSPEAK(170)
 236: C						!IN DARK?
 237:         RETURN
 238: C
 239: 15400   CALL RSPEAK(171)
 240: C						!JOKE IF NOT TORCH.
 241:         RETURN
 242: C
 243: 15500   IF((PRSA.NE.MELTW).OR.(PRSO.NE.ICE)) GO TO 10
 244:         IF(and(OFLAG1(PRSI),FLOBTS).EQ.FLOBTS) GO TO 15600
 245:         CALL RSPSUB(298,ODI2)
 246: C						!CANT MELT WITH THAT.
 247:         RETURN
 248: C
 249: 15600   GLACMF=.TRUE.
 250: C						!PARTIAL MELT.
 251:         IF(PRSI.NE.TORCH) GO TO 15700
 252: C						!MELT WITH TORCH?
 253:         ODESC1(TORCH)=174
 254: C						!MUNG TORCH.
 255:         ODESC2(TORCH)=173
 256:         OFLAG1(TORCH)=and(OFLAG1(TORCH), not(FLOBTS))
 257: 15700   CALL JIGSUP(172)
 258: C						!DROWN.
 259:         RETURN
 260: C
 261: C O106--	BLACK BOOK
 262: C
 263: 18000   IF(PRSA.NE.OPENW) GO TO 18100
 264: C						!OPEN?
 265:         CALL RSPEAK(180)
 266: C						!JOKE.
 267:         RETURN
 268: C
 269: 18100   IF(PRSA.NE.CLOSEW) GO TO 18200
 270: C						!CLOSE?
 271:         CALL RSPEAK(181)
 272:         RETURN
 273: C
 274: 18200   IF(PRSA.NE.BURNW) GO TO 10
 275: C						!BURN?
 276:         CALL NEWSTA(PRSO,0,0,0,0)
 277: C						!FATAL JOKE.
 278:         CALL JIGSUP(182)
 279:         RETURN
 280: C OAPPLI, PAGE 6
 281: C
 282: C O107--	CANDLES, PROCESSED EXTERNALLY
 283: C
 284: 19000   OAPPLI=LIGHTP(CANDL)
 285:         RETURN
 286: C
 287: C O108--	MATCHES, PROCESSED EXTERNALLY
 288: C
 289: 20000   OAPPLI=LIGHTP(MATCH)
 290:         RETURN
 291: C
 292: C O109--	CYCLOPS, PROCESSED EXTERNALLY.
 293: C
 294: 22000   OAPPLI=CYCLOP(ARG)
 295: C						!CYCLOPS
 296:         RETURN
 297: C
 298: C O110--	THIEF, PROCESSED EXTERNALLY
 299: C
 300: 25000   OAPPLI=THIEFP(ARG)
 301:         RETURN
 302: C
 303: C O111--	WINDOW
 304: C
 305: 26000   OAPPLI=OPNCLS(WINDO,208,209)
 306: C						!OPEN/CLS WINDOW.
 307:         RETURN
 308: C
 309: C O112--	PILE OF BODIES
 310: C
 311: 32000   IF(PRSA.NE.TAKEW) GO TO 32500
 312: C						!TAKE?
 313:         CALL RSPEAK(228)
 314: C						!CANT.
 315:         RETURN
 316: C
 317: 32500   IF((PRSA.NE.BURNW).AND.(PRSA.NE.MUNGW)) GO TO 10
 318:         IF(ONPOLF) RETURN
 319: C						!BURN OR MUNG?
 320:         ONPOLF=.TRUE.
 321: C						!SET HEAD ON POLE.
 322:         CALL NEWSTA(HPOLE,0,LLD2,0,0)
 323:         CALL JIGSUP(229)
 324: C						!BEHEADED.
 325:         RETURN
 326: C
 327: C O113--	VAMPIRE BAT
 328: C
 329: 35000   CALL RSPEAK(50)
 330: C						!TIME TO FLY, JACK.
 331:         F=MOVETO(BATDRP(RND(9)+1),WINNER)
 332: C						!SELECT RANDOM DEST.
 333:         F=RMDESC(0)
 334:         RETURN
 335: C OAPPLI, PAGE 7
 336: C
 337: C O114--	STICK
 338: C
 339: 39000   IF(PRSA.NE.WAVEW) GO TO 10
 340: C						!WAVE?
 341:         IF(HERE.EQ.MRAIN) GO TO 39500
 342: C						!ON RAINBOW?
 343:         IF((HERE.EQ.POG).OR.(HERE.EQ.FALLS)) GO TO 39200
 344:         CALL RSPEAK(244)
 345: C						!NOTHING HAPPENS.
 346:         RETURN
 347: C
 348: 39200   OFLAG1(POT)=or(OFLAG1(POT),VISIBT)
 349:         RAINBF=.NOT. RAINBF
 350: C						!COMPLEMENT RAINBOW.
 351:         I=245
 352: C						!ASSUME OFF.
 353:         IF(RAINBF) I=246
 354: C						!IF ON, SOLID.
 355:         CALL RSPEAK(I)
 356: C						!DESCRIBE.
 357:         RETURN
 358: C
 359: 39500   RAINBF=.FALSE.
 360: C						!ON RAINBOW,
 361:         CALL JIGSUP(247)
 362: C						!TAKE A FALL.
 363:         RETURN
 364: C
 365: C O115--	BALLOON, HANDLED EXTERNALLY
 366: C
 367: 40000   OAPPLI=BALLOP(ARG)
 368:         RETURN
 369: C
 370: C O116--	HEADS
 371: C
 372: 45000   IF(PRSA.NE.HELLOW) GO TO 45100
 373: C						!HELLO HEADS?
 374:         CALL RSPEAK(633)
 375: C						!TRULY BIZARRE.
 376:         RETURN
 377: C
 378: 45100   IF(PRSA.EQ.READW) GO TO 10
 379: C						!READ IS OK.
 380:         CALL NEWSTA(LCASE,260,LROOM,0,0)
 381: C						!MAKE LARGE CASE.
 382:         I=ROBADV(WINNER,0,LCASE,0)+ROBRM(HERE,100,0,LCASE,0)
 383:         CALL JIGSUP(261)
 384: C						!KILL HIM.
 385:         RETURN
 386: C OAPPLI, PAGE 8
 387: C
 388: C O117--	SPHERE
 389: C
 390: 47000   IF(CAGESF.OR.(PRSA.NE.TAKEW)) GO TO 10
 391: C						!TAKE?
 392:         IF(WINNER.NE.PLAYER) GO TO 47500
 393: C						!ROBOT TAKE?
 394:         CALL RSPEAK(263)
 395: C						!NO, DROP CAGE.
 396:         IF(OROOM(ROBOT).NE.HERE) GO TO 47200
 397: C						!ROBOT HERE?
 398:         F=MOVETO(CAGED,WINNER)
 399: C						!YES, MOVE INTO CAGE.
 400:         CALL NEWSTA(ROBOT,0,CAGED,0,0)
 401: C						!MOVE ROBOT.
 402:         AROOM(AROBOT)=CAGED
 403:         OFLAG1(ROBOT)=or(OFLAG1(ROBOT),NDSCBT)
 404:         CTICK(CEVSPH)=10
 405: C						!GET OUT IN 10 OR ELSE.
 406:         RETURN
 407: C
 408: 47200   CALL NEWSTA(SPHER,0,0,0,0)
 409: C						!YOURE DEAD.
 410:         RFLAG(CAGER)=or(RFLAG(CAGER),RMUNG)
 411:         RRAND(CAGER)=147
 412:         CALL JIGSUP(148)
 413: C						!MUNG PLAYER.
 414:         RETURN
 415: C
 416: 47500   CALL NEWSTA(SPHER,0,0,0,0)
 417: C						!ROBOT TRIED,
 418:         CALL NEWSTA(ROBOT,264,0,0,0)
 419: C						!KILL HIM.
 420:         CALL NEWSTA(CAGE,0,HERE,0,0)
 421: C						!INSERT MANGLED CAGE.
 422:         RETURN
 423: C
 424: C O118--	GEOMETRICAL BUTTONS
 425: C
 426: 48000   IF(PRSA.NE.PUSHW) GO TO 10
 427: C						!PUSH?
 428:         I=PRSO-SQBUT+1
 429: C						!GET BUTTON INDEX.
 430:         IF((I.LE.0).OR.(I.GE.4)) GO TO 10
 431: C						!A BUTTON?
 432:         IF(WINNER.NE.PLAYER) GO TO (48100,48200,48300),I
 433:         CALL JIGSUP(265)
 434: C						!YOU PUSHED, YOU DIE.
 435:         RETURN
 436: C
 437: 48100   I=267
 438:         IF(CAROZF) I=266
 439: C						!SPEED UP?
 440:         CAROZF=.TRUE.
 441:         CALL RSPEAK(I)
 442:         RETURN
 443: C
 444: 48200   I=266
 445: C						!ASSUME NO CHANGE.
 446:         IF(CAROZF) I=268
 447:         CAROZF=.FALSE.
 448:         CALL RSPEAK(I)
 449:         RETURN
 450: C
 451: 48300   CAROFF=.NOT.CAROFF
 452: C						!FLIP CAROUSEL.
 453:         IF(.NOT.QHERE(IRBOX,CAROU)) RETURN
 454: C						!IRON BOX IN CAROUSEL?
 455:         CALL RSPEAK(269)
 456: C						!YES, THUMP.
 457:         OFLAG1(IRBOX)=xor(OFLAG1(IRBOX),VISIBT)
 458:         IF(CAROFF) RFLAG(CAROU)=and(RFLAG(CAROU), not(RSEEN))
 459:         RETURN
 460: C
 461: C O119--	FLASK FUNCTION
 462: C
 463: 49000   IF(PRSA.EQ.OPENW) GO TO 49100
 464: C						!OPEN?
 465:         IF((PRSA.NE.MUNGW).AND.(PRSA.NE.THROWW)) GO TO 10
 466:         CALL NEWSTA(FLASK,270,0,0,0)
 467: C						!KILL FLASK.
 468: 49100   RFLAG(HERE)=or(RFLAG(HERE),RMUNG)
 469:         RRAND(HERE)=271
 470:         CALL JIGSUP(272)
 471: C						!POISONED.
 472:         RETURN
 473: C
 474: C O120--	BUCKET FUNCTION
 475: C
 476: 50000   IF(ARG.NE.2) GO TO 10
 477: C						!READOUT?
 478:         IF((OCAN(WATER).NE.BUCKE).OR.BUCKTF) GO TO 50500
 479:         BUCKTF=.TRUE.
 480: C						!BUCKET AT TOP.
 481:         CTICK(CEVBUC)=100
 482: C						!START COUNTDOWN.
 483:         CALL NEWSTA(BUCKE,290,TWELL,0,0)
 484: C						!REPOSITION BUCKET.
 485:         GO TO 50900
 486: C						!FINISH UP.
 487: C
 488: 50500   IF((OCAN(WATER).EQ.BUCKE).OR..NOT.BUCKTF) GO TO 10
 489:         BUCKTF=.FALSE.
 490:         CALL NEWSTA(BUCKE,291,BWELL,0,0)
 491: C						!BUCKET AT BOTTOM.
 492: 50900   IF(AV.NE.BUCKE) RETURN
 493: C						!IN BUCKET?
 494:         F=MOVETO(OROOM(BUCKE),WINNER)
 495: C						!MOVE ADVENTURER.
 496:         F=RMDESC(0)
 497: C						!DESCRIBE ROOM.
 498:         RETURN
 499: C OAPPLI, PAGE 9
 500: C
 501: C O121--	EATME CAKE
 502: C
 503: 51000   IF((PRSA.NE.EATW).OR.(PRSO.NE.ECAKE).OR.
 504: &               (HERE.NE.ALICE)) GO TO 10
 505:         CALL NEWSTA(ECAKE,273,0,0,0)
 506: C						!VANISH CAKE.
 507:         OFLAG1(ROBOT)=and(OFLAG1(ROBOT), not(VISIBT))
 508:         OAPPLI=MOVETO(ALISM,WINNER)
 509: C						!MOVE TO ALICE SMALL.
 510:         IZ=64
 511:         IR=ALISM
 512:         IO=ALICE
 513:         GO TO 52405
 514: C
 515: C O122--	ICINGS
 516: C
 517: 52000   IF(PRSA.NE.READW) GO TO 52200
 518: C						!READ?
 519:         I=274
 520: C						!CANT READ.
 521:         IF(PRSI.NE.0) I=275
 522: C						!THROUGH SOMETHING?
 523:         IF(PRSI.EQ.BOTTL) I=276
 524: C						!THROUGH BOTTLE?
 525:         IF(PRSI.EQ.FLASK) I=277+(PRSO-ORICE)
 526: C						!THROUGH FLASK?
 527:         CALL RSPEAK(I)
 528: C						!READ FLASK.
 529:         RETURN
 530: C
 531: 52200   IF((PRSA.NE.THROWW).OR.(PRSO.NE.RDICE).OR.(PRSI.NE.POOL))
 532: &               GO TO 52300
 533:         CALL NEWSTA(POOL,280,0,0,0)
 534: C						!VANISH POOL.
 535:         OFLAG1(SAFFR)=or(OFLAG1(SAFFR),VISIBT)
 536:         RETURN
 537: C
 538: 52300   IF((HERE.NE.ALICE).AND.(HERE.NE.ALISM).AND.(HERE.NE.ALITR))
 539: &               GO TO 10
 540:         IF(((PRSA.NE.EATW).AND.(PRSA.NE.THROWW)).OR.
 541: &               (PRSO.NE.ORICE)) GO TO 52400
 542:         CALL NEWSTA(ORICE,0,0,0,0)
 543: C						!VANISH ORANGE ICE.
 544:         RFLAG(HERE)=or(RFLAG(HERE),RMUNG)
 545:         RRAND(HERE)=281
 546:         CALL JIGSUP(282)
 547: C						!VANISH ADVENTURER.
 548:         RETURN
 549: C
 550: 52400   IF((PRSA.NE.EATW).OR.(PRSO.NE.BLICE))
 551: &               GO TO 10
 552:         CALL NEWSTA(BLICE,283,0,0,0)
 553: C						!VANISH BLUE ICE.
 554:         IF(HERE.NE.ALISM) GO TO 52500
 555: C						!IN REDUCED ROOM?
 556:         OFLAG1(ROBOT)=or(OFLAG1(ROBOT),VISIBT)
 557:         IO=HERE
 558:         OAPPLI=MOVETO(ALICE,WINNER)
 559:         IZ=1/64
 560:         IR=ALICE
 561: C
 562: C  Do a size change, common loop used also by code at 51000
 563: C
 564: 52405   DO 52450 I=1,OLNT
 565: C						!ENLARGE WORLD.
 566:           IF((OROOM(I).NE.IO).OR.(OSIZE(I).EQ.10000))
 567: &               GO TO 52450
 568:           OROOM(I)=IR
 569:           OSIZE(I)=OSIZE(I)*IZ
 570: 52450   CONTINUE
 571:         RETURN
 572: C
 573: 52500   CALL JIGSUP(284)
 574: C						!ENLARGED IN WRONG ROOM.
 575:         RETURN
 576: C
 577: C O123--	BRICK
 578: C
 579: 54000   IF(PRSA.NE.BURNW) GO TO 10
 580: C						!BURN?
 581:         CALL JIGSUP(150)
 582: C						!BOOM
 583: C						!
 584:         RETURN
 585: C
 586: C O124--	MYSELF
 587: C
 588: 55000   IF(PRSA.NE.GIVEW) GO TO 55100
 589: C						!GIVE?
 590:         CALL NEWSTA(PRSO,2,0,0,PLAYER)
 591: C						!DONE.
 592:         RETURN
 593: C
 594: 55100   IF(PRSA.NE.TAKEW) GO TO 55200
 595: C						!TAKE?
 596:         CALL RSPEAK(286)
 597: C						!JOKE.
 598:         RETURN
 599: C
 600: 55200   IF((PRSA.NE.KILLW).AND.(PRSA.NE.MUNGW)) GO TO 10
 601:         CALL JIGSUP(287)
 602: C						!KILL, NO JOKE.
 603:         RETURN
 604: C OAPPLI, PAGE 10
 605: C
 606: C O125--	PANELS INSIDE MIRROR
 607: C
 608: 56000   IF(PRSA.NE.PUSHW) GO TO 10
 609: C						!PUSH?
 610:         IF(POLEUF.NE.0) GO TO 56100
 611: C						!SHORT POLE UP?
 612:         I=731
 613: C						!NO, WONT BUDGE.
 614:         IF(MOD(MDIR,180).EQ.0) I=732
 615: C						!DIFF MSG IF N-S.
 616:         CALL RSPEAK(I)
 617: C						!TELL WONT MOVE.
 618:         RETURN
 619: C
 620: 56100   IF(MLOC.NE.MRG) GO TO 56200
 621: C						!IN GDN ROOM?
 622:         CALL RSPEAK(733)
 623: C						!YOU LOSE.
 624:         CALL JIGSUP(685)
 625:         RETURN
 626: C
 627: 56200   I=831
 628: C						!ROTATE L OR R.
 629:         IF((PRSO.EQ.RDWAL).OR.(PRSO.EQ.YLWAL)) I=830
 630:         CALL RSPEAK(I)
 631: C						!TELL DIRECTION.
 632:         MDIR=MOD(MDIR+45+(270*(I-830)),360)
 633: C						!CALCULATE NEW DIR.
 634:         CALL RSPSUB(734,695+(MDIR/45))
 635: C						!TELL NEW DIR.
 636:         IF(WDOPNF) CALL RSPEAK(730)
 637: C						!IF PANEL OPEN, CLOSE.
 638:         WDOPNF=.FALSE.
 639:         RETURN
 640: C						!DONE.
 641: C
 642: C O126--	ENDS INSIDE MIRROR
 643: C
 644: 57000   IF(PRSA.NE.PUSHW) GO TO 10
 645: C						!PUSH?
 646:         IF(MOD(MDIR,180).EQ.0) GO TO 57100
 647: C						!MIRROR N-S?
 648:         CALL RSPEAK(735)
 649: C						!NO, WONT BUDGE.
 650:         RETURN
 651: C
 652: 57100   IF(PRSO.NE.PINDR) GO TO 57300
 653: C						!PUSH PINE WALL?
 654:         IF(((MLOC.EQ.MRC).AND.(MDIR.EQ.180)).OR.
 655: &         ((MLOC.EQ.MRD).AND.(MDIR.EQ.0)).OR.
 656: &          (MLOC.EQ.MRG)) GO TO 57200
 657:         CALL RSPEAK(736)
 658: C						!NO, OPENS.
 659:         WDOPNF=.TRUE.
 660: C						!INDICATE OPEN.
 661:         CFLAG(CEVPIN)=.TRUE.
 662: C						!TIME OPENING.
 663:         CTICK(CEVPIN)=5
 664:         RETURN
 665: C
 666: 57200   CALL RSPEAK(737)
 667: C						!GDN SEES YOU, DIE.
 668:         CALL JIGSUP(685)
 669:         RETURN
 670: C
 671: 57300   NLOC=MLOC-1
 672: C						!NEW LOC IF SOUTH.
 673:         IF(MDIR.EQ.0) NLOC=MLOC+1
 674: C						!NEW LOC IF NORTH.
 675:         IF((NLOC.GE.MRA).AND.(NLOC.LE.MRD)) GO TO 57400
 676:         CALL RSPEAK(738)
 677: C						!HAVE REACHED END.
 678:         RETURN
 679: C
 680: 57400   I=699
 681: C						!ASSUME SOUTH.
 682:         IF(MDIR.EQ.0) I=695
 683: C						!NORTH.
 684:         J=739
 685: C						!ASSUME SMOOTH.
 686:         IF(POLEUF.NE.0) J=740
 687: C						!POLE UP, WOBBLES.
 688:         CALL RSPSUB(J,I)
 689: C						!DESCRIBE.
 690:         MLOC=NLOC
 691:         IF(MLOC.NE.MRG) RETURN
 692: C						!NOW IN GDN ROOM?
 693: C
 694:         IF(POLEUF.NE.0) GO TO 57500
 695: C						!POLE UP, GDN SEES.
 696:         IF(MROPNF.OR.WDOPNF) GO TO 57600
 697: C						!DOOR OPEN, GDN SEES.
 698:         IF(MR1F.AND.MR2F) RETURN
 699: C						!MIRRORS INTACT, OK.
 700:         CALL RSPEAK(742)
 701: C						!MIRRORS BROKEN, DIE.
 702:         CALL JIGSUP(743)
 703:         RETURN
 704: C
 705: 57500   CALL RSPEAK(741)
 706: C						!POLE UP, DIE.
 707:         CALL JIGSUP(743)
 708:         RETURN
 709: C
 710: 57600   CALL RSPEAK(744)
 711: C						!DOOR OPEN, DIE.
 712:         CALL JIGSUP(743)
 713:         RETURN
 714: C OAPPLI, PAGE 11
 715: C
 716: C O127--	GLOBAL GUARDIANS
 717: C
 718: 58000   IF((PRSA.NE.ATTACW).AND.(PRSA.NE.KILLW).AND.
 719: &         (PRSA.NE.MUNGW)) GO TO 58100
 720:         CALL JIGSUP(745)
 721: C						!LOSE.
 722:         RETURN
 723: C
 724: 58100   IF(PRSA.NE.HELLOW) GO TO 10
 725: C						!HELLO?
 726:         CALL RSPEAK(746)
 727: C						!NO REPLY.
 728:         RETURN
 729: C
 730: C O128--	GLOBAL MASTER
 731: C
 732: 59000   IF((PRSA.NE.ATTACW).AND.(PRSA.NE.KILLW).AND.
 733: &         (PRSA.NE.MUNGW)) GO TO 59100
 734:         CALL JIGSUP(747)
 735: C						!BAD IDEA.
 736:         RETURN
 737: C
 738: 59100   IF(PRSA.NE.TAKEW) GO TO 10
 739: C						!TAKE?
 740:         CALL RSPEAK(748)
 741: C						!JOKE.
 742:         RETURN
 743: C
 744: C O129--	NUMERAL FIVE (FOR JOKE)
 745: C
 746: 60000   IF(PRSA.NE.TAKEW) GO TO 10
 747: C						!TAKE FIVE?
 748:         CALL RSPEAK(419)
 749: C						!TIME PASSES.
 750:         DO 60100 I=1,3
 751: C						!WAIT A WHILE.
 752:           IF(CLOCKD(X)) RETURN
 753: 60100   CONTINUE
 754:         RETURN
 755: C
 756: C O130--	CRYPT FUNCTION
 757: C
 758: 61000   IF(.NOT.ENDGMF) GO TO 45000
 759: C						!IF NOT EG, DIE.
 760:         IF(PRSA.NE.OPENW) GO TO 61100
 761: C						!OPEN?
 762:         I=793
 763:         IF(QOPEN(TOMB)) I=794
 764:         CALL RSPEAK(I)
 765:         OFLAG2(TOMB)=or(OFLAG2(TOMB),OPENBT)
 766:         RETURN
 767: C
 768: 61100   IF(PRSA.NE.CLOSEW) GO TO 45000
 769: C						!CLOSE?
 770:         I=795
 771:         IF(QOPEN(TOMB)) I=796
 772:         CALL RSPEAK(I)
 773:         OFLAG2(TOMB)=and(OFLAG2(TOMB),not(OPENBT))
 774:         IF(HERE.EQ.CRYPT) CTICK(CEVSTE)=3
 775: C						!IF IN CRYPT, START EG.
 776:         RETURN
 777: C OAPPLI, PAGE 12
 778: C
 779: C O131--	GLOBAL LADDER
 780: C
 781: 62000   IF((CPVEC(CPHERE+1).EQ.-2).OR.(CPVEC(CPHERE-1).EQ.-3))
 782: &               GO TO 62100
 783:         CALL RSPEAK(865)
 784: C						!NO, LOSE.
 785:         RETURN
 786: C
 787: 62100   IF((PRSA.EQ.CLMBW).OR.(PRSA.EQ.CLMBUW)) GO TO 62200
 788:         CALL RSPEAK(866)
 789: C						!CLIMB IT?
 790:         RETURN
 791: C
 792: 62200   IF((CPHERE.EQ.10).AND.(CPVEC(CPHERE+1).EQ.-2))
 793: &               GO TO 62300
 794:         CALL RSPEAK(867)
 795: C						!NO, HIT YOUR HEAD.
 796:         RETURN
 797: C
 798: 62300   F=MOVETO(CPANT,WINNER)
 799: C						!TO ANTEROOM.
 800:         F=RMDESC(3)
 801: C						!DESCRIBE.
 802:         RETURN
 803: C
 804:         END
Last modified: 1988-10-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2519
Valid CSS Valid XHTML 1.0 Strict