1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141 |
- /* OAPPLI- OBJECT SPECIAL ACTION ROUTINES */
- /*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
- /* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
- /* WRITTEN BY R. M. SUPNIK */
- #include "funcs.h"
- #include "vars.h"
- logical oappli_(ri, arg)
- integer ri;
- integer arg;
- {
- /* Initialized data */
- const integer mxsmp = 99;
- /* System generated locals */
- integer i__1;
- logical ret_val;
- /* Local variables */
- logical f;
- integer flobts, i;
- integer j, av, io, ir, iz;
- integer odi2 = 0, odo2 = 0;
- integer nloc;
- if (ri == 0) {
- goto L10;
- }
- /* !ZERO IS FALSE APP. */
- if (ri <= mxsmp) {
- goto L100;
- }
- /* !SIMPLE OBJECT? */
- if (prsvec_1.prso > 220) {
- goto L5;
- }
- if (prsvec_1.prso != 0) {
- odo2 = objcts_1.odesc2[prsvec_1.prso - 1];
- }
- L5:
- if (prsvec_1.prsi != 0) {
- odi2 = objcts_1.odesc2[prsvec_1.prsi - 1];
- }
- av = advs_1.avehic[play_1.winner - 1];
- flobts = FLAMBT + LITEBT + ONBT;
- ret_val = TRUE_;
- switch (ri - mxsmp) {
- case 1: goto L2000;
- case 2: goto L5000;
- case 3: goto L10000;
- case 4: goto L11000;
- case 5: goto L12000;
- case 6: goto L15000;
- case 7: goto L18000;
- case 8: goto L19000;
- case 9: goto L20000;
- case 10: goto L22000;
- case 11: goto L25000;
- case 12: goto L26000;
- case 13: goto L32000;
- case 14: goto L35000;
- case 15: goto L39000;
- case 16: goto L40000;
- case 17: goto L45000;
- case 18: goto L47000;
- case 19: goto L48000;
- case 20: goto L49000;
- case 21: goto L50000;
- case 22: goto L51000;
- case 23: goto L52000;
- case 24: goto L54000;
- case 25: goto L55000;
- case 26: goto L56000;
- case 27: goto L57000;
- case 28: goto L58000;
- case 29: goto L59000;
- case 30: goto L60000;
- case 31: goto L61000;
- case 32: goto L62000;
- }
- bug_(6, ri);
- /* RETURN HERE TO DECLARE FALSE RESULT */
- L10:
- ret_val = FALSE_;
- return ret_val;
- /* SIMPLE OBJECTS, PROCESSED EXTERNALLY. */
- L100:
- if (ri < 32) {
- ret_val = sobjs_(ri, arg);
- }
- else {
- ret_val = nobjs_(ri, arg);
- }
- return ret_val;
- /* OAPPLI, PAGE 3 */
- /* O100-- MACHINE FUNCTION */
- L2000:
- if (play_1.here != rindex_1.mmach) {
- goto L10;
- }
- /* !NOT HERE? F */
- ret_val = opncls_(oindex_1.machi, 123, 124);
- /* !HANDLE OPN/CLS. */
- return ret_val;
- /* O101-- WATER FUNCTION */
- L5000:
- if (prsvec_1.prsa != vindex_1.fillw) {
- goto L5050;
- }
- /* !FILL X WITH Y IS */
- prsvec_1.prsa = vindex_1.putw;
- /* !MADE INTO */
- i = prsvec_1.prsi;
- prsvec_1.prsi = prsvec_1.prso;
- prsvec_1.prso = i;
- /* !PUT Y IN X. */
- i = odi2;
- odi2 = odo2;
- odo2 = i;
- L5050:
- if (prsvec_1.prso == oindex_1.water || prsvec_1.prso == oindex_1.gwate) {
- goto L5100;
- }
- rspeak_(561);
- /* !WATER IS IND OBJ, */
- return ret_val;
- /* !PUNT. */
- L5100:
- if (prsvec_1.prsa != vindex_1.takew) {
- goto L5400;
- }
- /* !TAKE WATER? */
- if (objcts_1.oadv[oindex_1.bottl - 1] == play_1.winner && objcts_1.ocan[
- prsvec_1.prso - 1] != oindex_1.bottl) {
- goto L5500;
- }
- if (objcts_1.ocan[prsvec_1.prso - 1] == 0) {
- goto L5200;
- }
- /* !INSIDE ANYTHING? */
- if ((objcts_1.oflag2[objcts_1.ocan[prsvec_1.prso - 1] - 1] &
- OPENBT) != 0) {
- goto L5200;
- }
- /* !YES, OPEN? */
- rspsub_(525, objcts_1.odesc2[objcts_1.ocan[prsvec_1.prso - 1] - 1]);
- /* !INSIDE, CLOSED, PUNT. */
- return ret_val;
- L5200:
- rspeak_(615);
- /* !NOT INSIDE OR OPEN, */
- return ret_val;
- /* !SLIPS THRU FINGERS. */
- L5400:
- if (prsvec_1.prsa != vindex_1.putw) {
- goto L5700;
- }
- /* !PUT WATER IN X? */
- if (av != 0 && prsvec_1.prsi == av) {
- goto L5800;
- }
- /* !IN VEH? */
- if (prsvec_1.prsi == oindex_1.bottl) {
- goto L5500;
- }
- /* !IN BOTTLE? */
- rspsub_(297, odi2);
- /* !WONT GO ELSEWHERE. */
- newsta_(prsvec_1.prso, 0, 0, 0, 0);
- /* !VANISH WATER. */
- return ret_val;
- L5500:
- if ((objcts_1.oflag2[oindex_1.bottl - 1] & OPENBT) != 0) {
- goto L5550;
- }
- /* !BOTTLE OPEN? */
- rspeak_(612);
- /* !NO, LOSE. */
- return ret_val;
- L5550:
- if (qempty_(oindex_1.bottl)) {
- goto L5600;
- }
- /* !OPEN, EMPTY? */
- rspeak_(613);
- /* !NO, ALREADY FULL. */
- return ret_val;
- L5600:
- newsta_(oindex_1.water, 614, 0, oindex_1.bottl, 0);
- /* !TAKE WATER TO BOTTLE. */
- return ret_val;
- L5700:
- if (prsvec_1.prsa != vindex_1.dropw && prsvec_1.prsa != vindex_1.pourw &&
- prsvec_1.prsa != vindex_1.givew) {
- goto L5900;
- }
- if (av != 0) {
- goto L5800;
- }
- /* !INTO VEHICLE? */
- newsta_(prsvec_1.prso, 133, 0, 0, 0);
- /* !NO, VANISHES. */
- return ret_val;
- L5800:
- newsta_(oindex_1.water, 0, 0, av, 0);
- /* !WATER INTO VEHICLE. */
- rspsub_(296, objcts_1.odesc2[av - 1]);
- /* !DESCRIBE. */
- return ret_val;
- L5900:
- if (prsvec_1.prsa != vindex_1.throww) {
- goto L10;
- }
- /* !LAST CHANCE, THROW? */
- newsta_(prsvec_1.prso, 132, 0, 0, 0);
- /* !VANISHES. */
- return ret_val;
- /* OAPPLI, PAGE 4 */
- /* O102-- LEAF PILE */
- L10000:
- if (prsvec_1.prsa != vindex_1.burnw) {
- goto L10500;
- }
- /* !BURN? */
- if (objcts_1.oroom[prsvec_1.prso - 1] == 0) {
- goto L10100;
- }
- /* !WAS HE CARRYING? */
- newsta_(prsvec_1.prso, 158, 0, 0, 0);
- /* !NO, BURN IT. */
- return ret_val;
- L10100:
- newsta_(prsvec_1.prso, 0, play_1.here, 0, 0);
- /* !DROP LEAVES. */
- jigsup_(159);
- /* !BURN HIM. */
- return ret_val;
- L10500:
- if (prsvec_1.prsa != vindex_1.movew) {
- goto L10600;
- }
- /* !MOVE? */
- rspeak_(2);
- /* !DONE. */
- return ret_val;
- L10600:
- if (prsvec_1.prsa != vindex_1.lookuw || findex_1.rvclr != 0) {
- goto L10;
- }
- rspeak_(344);
- /* !LOOK UNDER? */
- return ret_val;
- /* O103-- TROLL, DONE EXTERNALLY. */
- L11000:
- ret_val = trollp_(arg);
- /* !TROLL PROCESSOR. */
- return ret_val;
- /* O104-- RUSTY KNIFE. */
- L12000:
- if (prsvec_1.prsa != vindex_1.takew) {
- goto L12100;
- }
- /* !TAKE? */
- if (objcts_1.oadv[oindex_1.sword - 1] == play_1.winner) {
- rspeak_(160);
- }
- /* !PULSE SWORD. */
- goto L10;
- L12100:
- if ((prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw
- || prsvec_1.prsi != oindex_1.rknif) && (prsvec_1.prsa !=
- vindex_1.swingw && prsvec_1.prsa != vindex_1.throww ||
- prsvec_1.prso != oindex_1.rknif)) {
- goto L10;
- }
- newsta_(oindex_1.rknif, 0, 0, 0, 0);
- /* !KILL KNIFE. */
- jigsup_(161);
- /* !KILL HIM. */
- return ret_val;
- /* OAPPLI, PAGE 5 */
- /* O105-- GLACIER */
- L15000:
- if (prsvec_1.prsa != vindex_1.throww) {
- goto L15500;
- }
- /* !THROW? */
- if (prsvec_1.prso != oindex_1.torch) {
- goto L15400;
- }
- /* !TORCH? */
- newsta_(oindex_1.ice, 169, 0, 0, 0);
- /* !MELT ICE. */
- objcts_1.odesc1[oindex_1.torch - 1] = 174;
- /* !MUNG TORCH. */
- objcts_1.odesc2[oindex_1.torch - 1] = 173;
- objcts_1.oflag1[oindex_1.torch - 1] &= ~ flobts;
- newsta_(oindex_1.torch, 0, rindex_1.strea, 0, 0);
- /* !MOVE TORCH. */
- findex_1.glacrf = TRUE_;
- /* !GLACIER GONE. */
- if (! lit_(play_1.here)) {
- rspeak_(170);
- }
- /* !IN DARK? */
- return ret_val;
- L15400:
- rspeak_(171);
- /* !JOKE IF NOT TORCH. */
- return ret_val;
- L15500:
- if (prsvec_1.prsa != vindex_1.meltw || prsvec_1.prso != oindex_1.ice) {
- goto L10;
- }
- if ((objcts_1.oflag1[prsvec_1.prsi - 1] & flobts) == flobts) {
- goto L15600;
- }
- rspsub_(298, odi2);
- /* !CANT MELT WITH THAT. */
- return ret_val;
- L15600:
- findex_1.glacmf = TRUE_;
- /* !PARTIAL MELT. */
- if (prsvec_1.prsi != oindex_1.torch) {
- goto L15700;
- }
- /* !MELT WITH TORCH? */
- objcts_1.odesc1[oindex_1.torch - 1] = 174;
- /* !MUNG TORCH. */
- objcts_1.odesc2[oindex_1.torch - 1] = 173;
- objcts_1.oflag1[oindex_1.torch - 1] &= ~ flobts;
- L15700:
- jigsup_(172);
- /* !DROWN. */
- return ret_val;
- /* O106-- BLACK BOOK */
- L18000:
- if (prsvec_1.prsa != vindex_1.openw) {
- goto L18100;
- }
- /* !OPEN? */
- rspeak_(180);
- /* !JOKE. */
- return ret_val;
- L18100:
- if (prsvec_1.prsa != vindex_1.closew) {
- goto L18200;
- }
- /* !CLOSE? */
- rspeak_(181);
- return ret_val;
- L18200:
- if (prsvec_1.prsa != vindex_1.burnw) {
- goto L10;
- }
- /* !BURN? */
- newsta_(prsvec_1.prso, 0, 0, 0, 0);
- /* !FATAL JOKE. */
- jigsup_(182);
- return ret_val;
- /* OAPPLI, PAGE 6 */
- /* O107-- CANDLES, PROCESSED EXTERNALLY */
- L19000:
- ret_val = lightp_(oindex_1.candl);
- return ret_val;
- /* O108-- MATCHES, PROCESSED EXTERNALLY */
- L20000:
- ret_val = lightp_(oindex_1.match);
- return ret_val;
- /* O109-- CYCLOPS, PROCESSED EXTERNALLY. */
- L22000:
- ret_val = cyclop_(arg);
- /* !CYCLOPS */
- return ret_val;
- /* O110-- THIEF, PROCESSED EXTERNALLY */
- L25000:
- ret_val = thiefp_(arg);
- return ret_val;
- /* O111-- WINDOW */
- L26000:
- ret_val = opncls_(oindex_1.windo, 208, 209);
- /* !OPEN/CLS WINDOW. */
- return ret_val;
- /* O112-- PILE OF BODIES */
- L32000:
- if (prsvec_1.prsa != vindex_1.takew) {
- goto L32500;
- }
- /* !TAKE? */
- rspeak_(228);
- /* !CANT. */
- return ret_val;
- L32500:
- if (prsvec_1.prsa != vindex_1.burnw && prsvec_1.prsa != vindex_1.mungw) {
- goto L10;
- }
- if (findex_1.onpolf) {
- return ret_val;
- }
- /* !BURN OR MUNG? */
- findex_1.onpolf = TRUE_;
- /* !SET HEAD ON POLE. */
- newsta_(oindex_1.hpole, 0, rindex_1.lld2, 0, 0);
- jigsup_(229);
- /* !BEHEADED. */
- return ret_val;
- /* O113-- VAMPIRE BAT */
- L35000:
- rspeak_(50);
- /* !TIME TO FLY, JACK. */
- f = moveto_(bats_1.batdrp[rnd_(9)], play_1.winner);
- /* !SELECT RANDOM DEST. */
- f = rmdesc_(0);
- return ret_val;
- /* OAPPLI, PAGE 7 */
- /* O114-- STICK */
- L39000:
- if (prsvec_1.prsa != vindex_1.wavew) {
- goto L10;
- }
- /* !WAVE? */
- if (play_1.here == rindex_1.mrain) {
- goto L39500;
- }
- /* !ON RAINBOW? */
- if (play_1.here == rindex_1.pog || play_1.here == rindex_1.falls) {
- goto L39200;
- }
- rspeak_(244);
- /* !NOTHING HAPPENS. */
- return ret_val;
- L39200:
- objcts_1.oflag1[oindex_1.pot - 1] |= VISIBT;
- findex_1.rainbf = ! findex_1.rainbf;
- /* !COMPLEMENT RAINBOW. */
- i = 245;
- /* !ASSUME OFF. */
- if (findex_1.rainbf) {
- i = 246;
- }
- /* !IF ON, SOLID. */
- rspeak_(i);
- /* !DESCRIBE. */
- return ret_val;
- L39500:
- findex_1.rainbf = FALSE_;
- /* !ON RAINBOW, */
- jigsup_(247);
- /* !TAKE A FALL. */
- return ret_val;
- /* O115-- BALLOON, HANDLED EXTERNALLY */
- L40000:
- ret_val = ballop_(arg);
- return ret_val;
- /* O116-- HEADS */
- L45000:
- if (prsvec_1.prsa != vindex_1.hellow) {
- goto L45100;
- }
- /* !HELLO HEADS? */
- rspeak_(633);
- /* !TRULY BIZARRE. */
- return ret_val;
- L45100:
- if (prsvec_1.prsa == vindex_1.readw) {
- goto L10;
- }
- /* !READ IS OK. */
- newsta_(oindex_1.lcase, 260, rindex_1.lroom, 0, 0);
- /* !MAKE LARGE CASE. */
- i = robadv_(play_1.winner, 0, oindex_1.lcase, 0) + robrm_(
- play_1.here, 100, 0, oindex_1.lcase, 0);
- jigsup_(261);
- /* !KILL HIM. */
- return ret_val;
- /* OAPPLI, PAGE 8 */
- /* O117-- SPHERE */
- L47000:
- if (findex_1.cagesf || prsvec_1.prsa != vindex_1.takew) {
- goto L10;
- }
- /* !TAKE? */
- if (play_1.winner != aindex_1.player) {
- goto L47500;
- }
- /* !ROBOT TAKE? */
- rspeak_(263);
- /* !NO, DROP CAGE. */
- if (objcts_1.oroom[oindex_1.robot - 1] != play_1.here) {
- goto L47200;
- }
- /* !ROBOT HERE? */
- f = moveto_(rindex_1.caged, play_1.winner);
- /* !YES, MOVE INTO CAGE. */
- newsta_(oindex_1.robot, 0, rindex_1.caged, 0, 0);
- /* !MOVE ROBOT. */
- advs_1.aroom[aindex_1.arobot - 1] = rindex_1.caged;
- objcts_1.oflag1[oindex_1.robot - 1] |= NDSCBT;
- cevent_1.ctick[cindex_1.cevsph - 1] = 10;
- /* !GET OUT IN 10 OR ELSE. */
- return ret_val;
- L47200:
- newsta_(oindex_1.spher, 0, 0, 0, 0);
- /* !YOURE DEAD. */
- rooms_1.rflag[rindex_1.cager - 1] |= RMUNG;
- rrand[rindex_1.cager - 1] = 147;
- jigsup_(148);
- /* !MUNG PLAYER. */
- return ret_val;
- L47500:
- newsta_(oindex_1.spher, 0, 0, 0, 0);
- /* !ROBOT TRIED, */
- newsta_(oindex_1.robot, 264, 0, 0, 0);
- /* !KILL HIM. */
- newsta_(oindex_1.cage, 0, play_1.here, 0, 0);
- /* !INSERT MANGLED CAGE. */
- return ret_val;
- /* O118-- GEOMETRICAL BUTTONS */
- L48000:
- if (prsvec_1.prsa != vindex_1.pushw) {
- goto L10;
- }
- /* !PUSH? */
- i = prsvec_1.prso - oindex_1.sqbut + 1;
- /* !GET BUTTON INDEX. */
- if (i <= 0 || i >= 4) {
- goto L10;
- }
- /* !A BUTTON? */
- if (play_1.winner != aindex_1.player) {
- switch (i) {
- case 1: goto L48100;
- case 2: goto L48200;
- case 3: goto L48300;
- }
- }
- jigsup_(265);
- /* !YOU PUSHED, YOU DIE. */
- return ret_val;
- L48100:
- i = 267;
- if (findex_1.carozf) {
- i = 266;
- }
- /* !SPEED UP? */
- findex_1.carozf = TRUE_;
- rspeak_(i);
- return ret_val;
- L48200:
- i = 266;
- /* !ASSUME NO CHANGE. */
- if (findex_1.carozf) {
- i = 268;
- }
- findex_1.carozf = FALSE_;
- rspeak_(i);
- return ret_val;
- L48300:
- findex_1.caroff = ! findex_1.caroff;
- /* !FLIP CAROUSEL. */
- if (! qhere_(oindex_1.irbox, rindex_1.carou)) {
- return ret_val;
- }
- /* !IRON BOX IN CAROUSEL? */
- rspeak_(269);
- /* !YES, THUMP. */
- objcts_1.oflag1[oindex_1.irbox - 1] ^= VISIBT;
- if (findex_1.caroff) {
- rooms_1.rflag[rindex_1.carou - 1] &= ~ RSEEN;
- }
- return ret_val;
- /* O119-- FLASK FUNCTION */
- L49000:
- if (prsvec_1.prsa == vindex_1.openw) {
- goto L49100;
- }
- /* !OPEN? */
- if (prsvec_1.prsa != vindex_1.mungw && prsvec_1.prsa != vindex_1.throww) {
- goto L10;
- }
- newsta_(oindex_1.flask, 270, 0, 0, 0);
- /* !KILL FLASK. */
- L49100:
- rooms_1.rflag[play_1.here - 1] |= RMUNG;
- rrand[play_1.here - 1] = 271;
- jigsup_(272);
- /* !POISONED. */
- return ret_val;
- /* O120-- BUCKET FUNCTION */
- L50000:
- if (arg != 2) {
- goto L10;
- }
- /* !READOUT? */
- if (objcts_1.ocan[oindex_1.water - 1] != oindex_1.bucke ||
- findex_1.bucktf) {
- goto L50500;
- }
- findex_1.bucktf = TRUE_;
- /* !BUCKET AT TOP. */
- cevent_1.ctick[cindex_1.cevbuc - 1] = 100;
- /* !START COUNTDOWN. */
- newsta_(oindex_1.bucke, 290, rindex_1.twell, 0, 0);
- /* !REPOSITION BUCKET. */
- goto L50900;
- /* !FINISH UP. */
- L50500:
- if (objcts_1.ocan[oindex_1.water - 1] == oindex_1.bucke || !
- findex_1.bucktf) {
- goto L10;
- }
- findex_1.bucktf = FALSE_;
- newsta_(oindex_1.bucke, 291, rindex_1.bwell, 0, 0);
- /* !BUCKET AT BOTTOM. */
- L50900:
- if (av != oindex_1.bucke) {
- return ret_val;
- }
- /* !IN BUCKET? */
- f = moveto_(objcts_1.oroom[oindex_1.bucke - 1], play_1.winner);
- /* !MOVE ADVENTURER. */
- f = rmdesc_(0);
- /* !DESCRIBE ROOM. */
- return ret_val;
- /* OAPPLI, PAGE 9 */
- /* O121-- EATME CAKE */
- L51000:
- if (prsvec_1.prsa != vindex_1.eatw || prsvec_1.prso != oindex_1.ecake ||
- play_1.here != rindex_1.alice) {
- goto L10;
- }
- newsta_(oindex_1.ecake, 273, 0, 0, 0);
- /* !VANISH CAKE. */
- objcts_1.oflag1[oindex_1.robot - 1] &= ~ VISIBT;
- ret_val = moveto_(rindex_1.alism, play_1.winner);
- /* !MOVE TO ALICE SMALL. */
- iz = 64;
- ir = rindex_1.alism;
- io = rindex_1.alice;
- goto L52405;
- /* O122-- ICINGS */
- L52000:
- if (prsvec_1.prsa != vindex_1.readw) {
- goto L52200;
- }
- /* !READ? */
- i = 274;
- /* !CANT READ. */
- if (prsvec_1.prsi != 0) {
- i = 275;
- }
- /* !THROUGH SOMETHING? */
- if (prsvec_1.prsi == oindex_1.bottl) {
- i = 276;
- }
- /* !THROUGH BOTTLE? */
- if (prsvec_1.prsi == oindex_1.flask) {
- i = prsvec_1.prso - oindex_1.orice + 277;
- }
- /* !THROUGH FLASK? */
- rspeak_(i);
- /* !READ FLASK. */
- return ret_val;
- L52200:
- if (prsvec_1.prsa != vindex_1.throww || prsvec_1.prso != oindex_1.rdice ||
- prsvec_1.prsi != oindex_1.pool) {
- goto L52300;
- }
- newsta_(oindex_1.pool, 280, 0, 0, 0);
- /* !VANISH POOL. */
- objcts_1.oflag1[oindex_1.saffr - 1] |= VISIBT;
- return ret_val;
- L52300:
- if (play_1.here != rindex_1.alice && play_1.here != rindex_1.alism &&
- play_1.here != rindex_1.alitr) {
- goto L10;
- }
- if (prsvec_1.prsa != vindex_1.eatw && prsvec_1.prsa != vindex_1.throww ||
- prsvec_1.prso != oindex_1.orice) {
- goto L52400;
- }
- newsta_(oindex_1.orice, 0, 0, 0, 0);
- /* !VANISH ORANGE ICE. */
- rooms_1.rflag[play_1.here - 1] |= RMUNG;
- rrand[play_1.here - 1] = 281;
- jigsup_(282);
- /* !VANISH ADVENTURER. */
- return ret_val;
- L52400:
- if (prsvec_1.prsa != vindex_1.eatw || prsvec_1.prso != oindex_1.blice) {
- goto L10;
- }
- newsta_(oindex_1.blice, 283, 0, 0, 0);
- /* !VANISH BLUE ICE. */
- if (play_1.here != rindex_1.alism) {
- goto L52500;
- }
- /* !IN REDUCED ROOM? */
- objcts_1.oflag1[oindex_1.robot - 1] |= VISIBT;
- io = play_1.here;
- ret_val = moveto_(rindex_1.alice, play_1.winner);
- iz = 0;
- ir = rindex_1.alice;
- /* Do a size change, common loop used also by code at 51000 */
- L52405:
- i__1 = objcts_1.olnt;
- for (i = 1; i <= i__1; ++i) {
- /* !ENLARGE WORLD. */
- if (objcts_1.oroom[i - 1] != io || objcts_1.osize[i - 1] == 10000) {
- goto L52450;
- }
- objcts_1.oroom[i - 1] = ir;
- objcts_1.osize[i - 1] *= iz;
- L52450:
- ;
- }
- return ret_val;
- L52500:
- jigsup_(284);
- /* !ENLARGED IN WRONG ROOM. */
- return ret_val;
- /* O123-- BRICK */
- L54000:
- if (prsvec_1.prsa != vindex_1.burnw) {
- goto L10;
- }
- /* !BURN? */
- jigsup_(150);
- /* !BOOM */
- /* ! */
- return ret_val;
- /* O124-- MYSELF */
- L55000:
- if (prsvec_1.prsa != vindex_1.givew) {
- goto L55100;
- }
- /* !GIVE? */
- newsta_(prsvec_1.prso, 2, 0, 0, aindex_1.player);
- /* !DONE. */
- return ret_val;
- L55100:
- if (prsvec_1.prsa != vindex_1.takew) {
- goto L55200;
- }
- /* !TAKE? */
- rspeak_(286);
- /* !JOKE. */
- return ret_val;
- L55200:
- if (prsvec_1.prsa != vindex_1.killw && prsvec_1.prsa != vindex_1.mungw) {
- goto L10;
- }
- jigsup_(287);
- /* !KILL, NO JOKE. */
- return ret_val;
- /* OAPPLI, PAGE 10 */
- /* O125-- PANELS INSIDE MIRROR */
- L56000:
- if (prsvec_1.prsa != vindex_1.pushw) {
- goto L10;
- }
- /* !PUSH? */
- if (findex_1.poleuf != 0) {
- goto L56100;
- }
- /* !SHORT POLE UP? */
- i = 731;
- /* !NO, WONT BUDGE. */
- if (findex_1.mdir % 180 == 0) {
- i = 732;
- }
- /* !DIFF MSG IF N-S. */
- rspeak_(i);
- /* !TELL WONT MOVE. */
- return ret_val;
- L56100:
- if (findex_1.mloc != rindex_1.mrg) {
- goto L56200;
- }
- /* !IN GDN ROOM? */
- rspeak_(733);
- /* !YOU LOSE. */
- jigsup_(685);
- return ret_val;
- L56200:
- i = 831;
- /* !ROTATE L OR R. */
- if (prsvec_1.prso == oindex_1.rdwal || prsvec_1.prso == oindex_1.ylwal) {
- i = 830;
- }
- rspeak_(i);
- /* !TELL DIRECTION. */
- findex_1.mdir = (findex_1.mdir + 45 + (i - 830) * 270) % 360;
- /* !CALCULATE NEW DIR. */
- i__1 = findex_1.mdir / 45 + 695;
- rspsub_(734, i__1);
- /* !TELL NEW DIR. */
- if (findex_1.wdopnf) {
- rspeak_(730);
- }
- /* !IF PANEL OPEN, CLOSE. */
- findex_1.wdopnf = FALSE_;
- return ret_val;
- /* !DONE. */
- /* O126-- ENDS INSIDE MIRROR */
- L57000:
- if (prsvec_1.prsa != vindex_1.pushw) {
- goto L10;
- }
- /* !PUSH? */
- if (findex_1.mdir % 180 == 0) {
- goto L57100;
- }
- /* !MIRROR N-S? */
- rspeak_(735);
- /* !NO, WONT BUDGE. */
- return ret_val;
- L57100:
- if (prsvec_1.prso != oindex_1.pindr) {
- goto L57300;
- }
- /* !PUSH PINE WALL? */
- if (findex_1.mloc == rindex_1.mrc && findex_1.mdir == 180 ||
- findex_1.mloc == rindex_1.mrd && findex_1.mdir == 0 ||
- findex_1.mloc == rindex_1.mrg) {
- goto L57200;
- }
- rspeak_(736);
- /* !NO, OPENS. */
- findex_1.wdopnf = TRUE_;
- /* !INDICATE OPEN. */
- cevent_1.cflag[cindex_1.cevpin - 1] = TRUE_;
- /* !TIME OPENING. */
- cevent_1.ctick[cindex_1.cevpin - 1] = 5;
- return ret_val;
- L57200:
- rspeak_(737);
- /* !GDN SEES YOU, DIE. */
- jigsup_(685);
- return ret_val;
- L57300:
- nloc = findex_1.mloc - 1;
- /* !NEW LOC IF SOUTH. */
- if (findex_1.mdir == 0) {
- nloc = findex_1.mloc + 1;
- }
- /* !NEW LOC IF NORTH. */
- if (nloc >= rindex_1.mra && nloc <= rindex_1.mrd) {
- goto L57400;
- }
- rspeak_(738);
- /* !HAVE REACHED END. */
- return ret_val;
- L57400:
- i = 699;
- /* !ASSUME SOUTH. */
- if (findex_1.mdir == 0) {
- i = 695;
- }
- /* !NORTH. */
- j = 739;
- /* !ASSUME SMOOTH. */
- if (findex_1.poleuf != 0) {
- j = 740;
- }
- /* !POLE UP, WOBBLES. */
- rspsub_(j, i);
- /* !DESCRIBE. */
- findex_1.mloc = nloc;
- if (findex_1.mloc != rindex_1.mrg) {
- return ret_val;
- }
- /* !NOW IN GDN ROOM? */
- if (findex_1.poleuf != 0) {
- goto L57500;
- }
- /* !POLE UP, GDN SEES. */
- if (findex_1.mropnf || findex_1.wdopnf) {
- goto L57600;
- }
- /* !DOOR OPEN, GDN SEES. */
- if (findex_1.mr1f && findex_1.mr2f) {
- return ret_val;
- }
- /* !MIRRORS INTACT, OK. */
- rspeak_(742);
- /* !MIRRORS BROKEN, DIE. */
- jigsup_(743);
- return ret_val;
- L57500:
- rspeak_(741);
- /* !POLE UP, DIE. */
- jigsup_(743);
- return ret_val;
- L57600:
- rspeak_(744);
- /* !DOOR OPEN, DIE. */
- jigsup_(743);
- return ret_val;
- /* OAPPLI, PAGE 11 */
- /* O127-- GLOBAL GUARDIANS */
- L58000:
- if (prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw &&
- prsvec_1.prsa != vindex_1.mungw) {
- goto L58100;
- }
- jigsup_(745);
- /* !LOSE. */
- return ret_val;
- L58100:
- if (prsvec_1.prsa != vindex_1.hellow) {
- goto L10;
- }
- /* !HELLO? */
- rspeak_(746);
- /* !NO REPLY. */
- return ret_val;
- /* O128-- GLOBAL MASTER */
- L59000:
- if (prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw &&
- prsvec_1.prsa != vindex_1.mungw) {
- goto L59100;
- }
- jigsup_(747);
- /* !BAD IDEA. */
- return ret_val;
- L59100:
- if (prsvec_1.prsa != vindex_1.takew) {
- goto L10;
- }
- /* !TAKE? */
- rspeak_(748);
- /* !JOKE. */
- return ret_val;
- /* O129-- NUMERAL FIVE (FOR JOKE) */
- L60000:
- if (prsvec_1.prsa != vindex_1.takew) {
- goto L10;
- }
- /* !TAKE FIVE? */
- rspeak_(419);
- /* !TIME PASSES. */
- for (i = 1; i <= 3; ++i) {
- /* !WAIT A WHILE. */
- if (clockd_()) {
- return ret_val;
- }
- /* L60100: */
- }
- return ret_val;
- /* O130-- CRYPT FUNCTION */
- L61000:
- if (! findex_1.endgmf) {
- goto L45000;
- }
- /* !IF NOT EG, DIE. */
- if (prsvec_1.prsa != vindex_1.openw) {
- goto L61100;
- }
- /* !OPEN? */
- i = 793;
- if ((objcts_1.oflag2[oindex_1.tomb - 1] & OPENBT) != 0) {
- i = 794;
- }
- rspeak_(i);
- objcts_1.oflag2[oindex_1.tomb - 1] |= OPENBT;
- return ret_val;
- L61100:
- if (prsvec_1.prsa != vindex_1.closew) {
- goto L45000;
- }
- /* !CLOSE? */
- i = 795;
- if ((objcts_1.oflag2[oindex_1.tomb - 1] & OPENBT) != 0) {
- i = 796;
- }
- rspeak_(i);
- objcts_1.oflag2[oindex_1.tomb - 1] &= ~ OPENBT;
- if (play_1.here == rindex_1.crypt) {
- cevent_1.ctick[cindex_1.cevste - 1] = 3;
- }
- /* !IF IN CRYPT, START EG. */
- return ret_val;
- /* OAPPLI, PAGE 12 */
- /* O131-- GLOBAL LADDER */
- L62000:
- if (puzzle_1.cpvec[findex_1.cphere] == -2 || puzzle_1.cpvec[
- findex_1.cphere - 2] == -3) {
- goto L62100;
- }
- rspeak_(865);
- /* !NO, LOSE. */
- return ret_val;
- L62100:
- if (prsvec_1.prsa == vindex_1.clmbw || prsvec_1.prsa == vindex_1.clmbuw) {
- goto L62200;
- }
- rspeak_(866);
- /* !CLIMB IT? */
- return ret_val;
- L62200:
- if (findex_1.cphere == 10 && puzzle_1.cpvec[findex_1.cphere] == -2) {
- goto L62300;
- }
- rspeak_(867);
- /* !NO, HIT YOUR HEAD. */
- return ret_val;
- L62300:
- f = moveto_(rindex_1.cpant, play_1.winner);
- /* !TO ANTEROOM. */
- f = rmdesc_(3);
- /* !DESCRIBE. */
- return ret_val;
- } /* oappli_ */
|