objcts.c 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141
  1. /* OAPPLI- OBJECT SPECIAL ACTION ROUTINES */
  2. /*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
  3. /* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
  4. /* WRITTEN BY R. M. SUPNIK */
  5. #include "funcs.h"
  6. #include "vars.h"
  7. logical oappli_(ri, arg)
  8. integer ri;
  9. integer arg;
  10. {
  11. /* Initialized data */
  12. const integer mxsmp = 99;
  13. /* System generated locals */
  14. integer i__1;
  15. logical ret_val;
  16. /* Local variables */
  17. logical f;
  18. integer flobts, i;
  19. integer j, av, io, ir, iz;
  20. integer odi2 = 0, odo2 = 0;
  21. integer nloc;
  22. if (ri == 0) {
  23. goto L10;
  24. }
  25. /* !ZERO IS FALSE APP. */
  26. if (ri <= mxsmp) {
  27. goto L100;
  28. }
  29. /* !SIMPLE OBJECT? */
  30. if (prsvec_1.prso > 220) {
  31. goto L5;
  32. }
  33. if (prsvec_1.prso != 0) {
  34. odo2 = objcts_1.odesc2[prsvec_1.prso - 1];
  35. }
  36. L5:
  37. if (prsvec_1.prsi != 0) {
  38. odi2 = objcts_1.odesc2[prsvec_1.prsi - 1];
  39. }
  40. av = advs_1.avehic[play_1.winner - 1];
  41. flobts = FLAMBT + LITEBT + ONBT;
  42. ret_val = TRUE_;
  43. switch (ri - mxsmp) {
  44. case 1: goto L2000;
  45. case 2: goto L5000;
  46. case 3: goto L10000;
  47. case 4: goto L11000;
  48. case 5: goto L12000;
  49. case 6: goto L15000;
  50. case 7: goto L18000;
  51. case 8: goto L19000;
  52. case 9: goto L20000;
  53. case 10: goto L22000;
  54. case 11: goto L25000;
  55. case 12: goto L26000;
  56. case 13: goto L32000;
  57. case 14: goto L35000;
  58. case 15: goto L39000;
  59. case 16: goto L40000;
  60. case 17: goto L45000;
  61. case 18: goto L47000;
  62. case 19: goto L48000;
  63. case 20: goto L49000;
  64. case 21: goto L50000;
  65. case 22: goto L51000;
  66. case 23: goto L52000;
  67. case 24: goto L54000;
  68. case 25: goto L55000;
  69. case 26: goto L56000;
  70. case 27: goto L57000;
  71. case 28: goto L58000;
  72. case 29: goto L59000;
  73. case 30: goto L60000;
  74. case 31: goto L61000;
  75. case 32: goto L62000;
  76. }
  77. bug_(6, ri);
  78. /* RETURN HERE TO DECLARE FALSE RESULT */
  79. L10:
  80. ret_val = FALSE_;
  81. return ret_val;
  82. /* SIMPLE OBJECTS, PROCESSED EXTERNALLY. */
  83. L100:
  84. if (ri < 32) {
  85. ret_val = sobjs_(ri, arg);
  86. }
  87. else {
  88. ret_val = nobjs_(ri, arg);
  89. }
  90. return ret_val;
  91. /* OAPPLI, PAGE 3 */
  92. /* O100-- MACHINE FUNCTION */
  93. L2000:
  94. if (play_1.here != rindex_1.mmach) {
  95. goto L10;
  96. }
  97. /* !NOT HERE? F */
  98. ret_val = opncls_(oindex_1.machi, 123, 124);
  99. /* !HANDLE OPN/CLS. */
  100. return ret_val;
  101. /* O101-- WATER FUNCTION */
  102. L5000:
  103. if (prsvec_1.prsa != vindex_1.fillw) {
  104. goto L5050;
  105. }
  106. /* !FILL X WITH Y IS */
  107. prsvec_1.prsa = vindex_1.putw;
  108. /* !MADE INTO */
  109. i = prsvec_1.prsi;
  110. prsvec_1.prsi = prsvec_1.prso;
  111. prsvec_1.prso = i;
  112. /* !PUT Y IN X. */
  113. i = odi2;
  114. odi2 = odo2;
  115. odo2 = i;
  116. L5050:
  117. if (prsvec_1.prso == oindex_1.water || prsvec_1.prso == oindex_1.gwate) {
  118. goto L5100;
  119. }
  120. rspeak_(561);
  121. /* !WATER IS IND OBJ, */
  122. return ret_val;
  123. /* !PUNT. */
  124. L5100:
  125. if (prsvec_1.prsa != vindex_1.takew) {
  126. goto L5400;
  127. }
  128. /* !TAKE WATER? */
  129. if (objcts_1.oadv[oindex_1.bottl - 1] == play_1.winner && objcts_1.ocan[
  130. prsvec_1.prso - 1] != oindex_1.bottl) {
  131. goto L5500;
  132. }
  133. if (objcts_1.ocan[prsvec_1.prso - 1] == 0) {
  134. goto L5200;
  135. }
  136. /* !INSIDE ANYTHING? */
  137. if ((objcts_1.oflag2[objcts_1.ocan[prsvec_1.prso - 1] - 1] &
  138. OPENBT) != 0) {
  139. goto L5200;
  140. }
  141. /* !YES, OPEN? */
  142. rspsub_(525, objcts_1.odesc2[objcts_1.ocan[prsvec_1.prso - 1] - 1]);
  143. /* !INSIDE, CLOSED, PUNT. */
  144. return ret_val;
  145. L5200:
  146. rspeak_(615);
  147. /* !NOT INSIDE OR OPEN, */
  148. return ret_val;
  149. /* !SLIPS THRU FINGERS. */
  150. L5400:
  151. if (prsvec_1.prsa != vindex_1.putw) {
  152. goto L5700;
  153. }
  154. /* !PUT WATER IN X? */
  155. if (av != 0 && prsvec_1.prsi == av) {
  156. goto L5800;
  157. }
  158. /* !IN VEH? */
  159. if (prsvec_1.prsi == oindex_1.bottl) {
  160. goto L5500;
  161. }
  162. /* !IN BOTTLE? */
  163. rspsub_(297, odi2);
  164. /* !WONT GO ELSEWHERE. */
  165. newsta_(prsvec_1.prso, 0, 0, 0, 0);
  166. /* !VANISH WATER. */
  167. return ret_val;
  168. L5500:
  169. if ((objcts_1.oflag2[oindex_1.bottl - 1] & OPENBT) != 0) {
  170. goto L5550;
  171. }
  172. /* !BOTTLE OPEN? */
  173. rspeak_(612);
  174. /* !NO, LOSE. */
  175. return ret_val;
  176. L5550:
  177. if (qempty_(oindex_1.bottl)) {
  178. goto L5600;
  179. }
  180. /* !OPEN, EMPTY? */
  181. rspeak_(613);
  182. /* !NO, ALREADY FULL. */
  183. return ret_val;
  184. L5600:
  185. newsta_(oindex_1.water, 614, 0, oindex_1.bottl, 0);
  186. /* !TAKE WATER TO BOTTLE. */
  187. return ret_val;
  188. L5700:
  189. if (prsvec_1.prsa != vindex_1.dropw && prsvec_1.prsa != vindex_1.pourw &&
  190. prsvec_1.prsa != vindex_1.givew) {
  191. goto L5900;
  192. }
  193. if (av != 0) {
  194. goto L5800;
  195. }
  196. /* !INTO VEHICLE? */
  197. newsta_(prsvec_1.prso, 133, 0, 0, 0);
  198. /* !NO, VANISHES. */
  199. return ret_val;
  200. L5800:
  201. newsta_(oindex_1.water, 0, 0, av, 0);
  202. /* !WATER INTO VEHICLE. */
  203. rspsub_(296, objcts_1.odesc2[av - 1]);
  204. /* !DESCRIBE. */
  205. return ret_val;
  206. L5900:
  207. if (prsvec_1.prsa != vindex_1.throww) {
  208. goto L10;
  209. }
  210. /* !LAST CHANCE, THROW? */
  211. newsta_(prsvec_1.prso, 132, 0, 0, 0);
  212. /* !VANISHES. */
  213. return ret_val;
  214. /* OAPPLI, PAGE 4 */
  215. /* O102-- LEAF PILE */
  216. L10000:
  217. if (prsvec_1.prsa != vindex_1.burnw) {
  218. goto L10500;
  219. }
  220. /* !BURN? */
  221. if (objcts_1.oroom[prsvec_1.prso - 1] == 0) {
  222. goto L10100;
  223. }
  224. /* !WAS HE CARRYING? */
  225. newsta_(prsvec_1.prso, 158, 0, 0, 0);
  226. /* !NO, BURN IT. */
  227. return ret_val;
  228. L10100:
  229. newsta_(prsvec_1.prso, 0, play_1.here, 0, 0);
  230. /* !DROP LEAVES. */
  231. jigsup_(159);
  232. /* !BURN HIM. */
  233. return ret_val;
  234. L10500:
  235. if (prsvec_1.prsa != vindex_1.movew) {
  236. goto L10600;
  237. }
  238. /* !MOVE? */
  239. rspeak_(2);
  240. /* !DONE. */
  241. return ret_val;
  242. L10600:
  243. if (prsvec_1.prsa != vindex_1.lookuw || findex_1.rvclr != 0) {
  244. goto L10;
  245. }
  246. rspeak_(344);
  247. /* !LOOK UNDER? */
  248. return ret_val;
  249. /* O103-- TROLL, DONE EXTERNALLY. */
  250. L11000:
  251. ret_val = trollp_(arg);
  252. /* !TROLL PROCESSOR. */
  253. return ret_val;
  254. /* O104-- RUSTY KNIFE. */
  255. L12000:
  256. if (prsvec_1.prsa != vindex_1.takew) {
  257. goto L12100;
  258. }
  259. /* !TAKE? */
  260. if (objcts_1.oadv[oindex_1.sword - 1] == play_1.winner) {
  261. rspeak_(160);
  262. }
  263. /* !PULSE SWORD. */
  264. goto L10;
  265. L12100:
  266. if ((prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw
  267. || prsvec_1.prsi != oindex_1.rknif) && (prsvec_1.prsa !=
  268. vindex_1.swingw && prsvec_1.prsa != vindex_1.throww ||
  269. prsvec_1.prso != oindex_1.rknif)) {
  270. goto L10;
  271. }
  272. newsta_(oindex_1.rknif, 0, 0, 0, 0);
  273. /* !KILL KNIFE. */
  274. jigsup_(161);
  275. /* !KILL HIM. */
  276. return ret_val;
  277. /* OAPPLI, PAGE 5 */
  278. /* O105-- GLACIER */
  279. L15000:
  280. if (prsvec_1.prsa != vindex_1.throww) {
  281. goto L15500;
  282. }
  283. /* !THROW? */
  284. if (prsvec_1.prso != oindex_1.torch) {
  285. goto L15400;
  286. }
  287. /* !TORCH? */
  288. newsta_(oindex_1.ice, 169, 0, 0, 0);
  289. /* !MELT ICE. */
  290. objcts_1.odesc1[oindex_1.torch - 1] = 174;
  291. /* !MUNG TORCH. */
  292. objcts_1.odesc2[oindex_1.torch - 1] = 173;
  293. objcts_1.oflag1[oindex_1.torch - 1] &= ~ flobts;
  294. newsta_(oindex_1.torch, 0, rindex_1.strea, 0, 0);
  295. /* !MOVE TORCH. */
  296. findex_1.glacrf = TRUE_;
  297. /* !GLACIER GONE. */
  298. if (! lit_(play_1.here)) {
  299. rspeak_(170);
  300. }
  301. /* !IN DARK? */
  302. return ret_val;
  303. L15400:
  304. rspeak_(171);
  305. /* !JOKE IF NOT TORCH. */
  306. return ret_val;
  307. L15500:
  308. if (prsvec_1.prsa != vindex_1.meltw || prsvec_1.prso != oindex_1.ice) {
  309. goto L10;
  310. }
  311. if ((objcts_1.oflag1[prsvec_1.prsi - 1] & flobts) == flobts) {
  312. goto L15600;
  313. }
  314. rspsub_(298, odi2);
  315. /* !CANT MELT WITH THAT. */
  316. return ret_val;
  317. L15600:
  318. findex_1.glacmf = TRUE_;
  319. /* !PARTIAL MELT. */
  320. if (prsvec_1.prsi != oindex_1.torch) {
  321. goto L15700;
  322. }
  323. /* !MELT WITH TORCH? */
  324. objcts_1.odesc1[oindex_1.torch - 1] = 174;
  325. /* !MUNG TORCH. */
  326. objcts_1.odesc2[oindex_1.torch - 1] = 173;
  327. objcts_1.oflag1[oindex_1.torch - 1] &= ~ flobts;
  328. L15700:
  329. jigsup_(172);
  330. /* !DROWN. */
  331. return ret_val;
  332. /* O106-- BLACK BOOK */
  333. L18000:
  334. if (prsvec_1.prsa != vindex_1.openw) {
  335. goto L18100;
  336. }
  337. /* !OPEN? */
  338. rspeak_(180);
  339. /* !JOKE. */
  340. return ret_val;
  341. L18100:
  342. if (prsvec_1.prsa != vindex_1.closew) {
  343. goto L18200;
  344. }
  345. /* !CLOSE? */
  346. rspeak_(181);
  347. return ret_val;
  348. L18200:
  349. if (prsvec_1.prsa != vindex_1.burnw) {
  350. goto L10;
  351. }
  352. /* !BURN? */
  353. newsta_(prsvec_1.prso, 0, 0, 0, 0);
  354. /* !FATAL JOKE. */
  355. jigsup_(182);
  356. return ret_val;
  357. /* OAPPLI, PAGE 6 */
  358. /* O107-- CANDLES, PROCESSED EXTERNALLY */
  359. L19000:
  360. ret_val = lightp_(oindex_1.candl);
  361. return ret_val;
  362. /* O108-- MATCHES, PROCESSED EXTERNALLY */
  363. L20000:
  364. ret_val = lightp_(oindex_1.match);
  365. return ret_val;
  366. /* O109-- CYCLOPS, PROCESSED EXTERNALLY. */
  367. L22000:
  368. ret_val = cyclop_(arg);
  369. /* !CYCLOPS */
  370. return ret_val;
  371. /* O110-- THIEF, PROCESSED EXTERNALLY */
  372. L25000:
  373. ret_val = thiefp_(arg);
  374. return ret_val;
  375. /* O111-- WINDOW */
  376. L26000:
  377. ret_val = opncls_(oindex_1.windo, 208, 209);
  378. /* !OPEN/CLS WINDOW. */
  379. return ret_val;
  380. /* O112-- PILE OF BODIES */
  381. L32000:
  382. if (prsvec_1.prsa != vindex_1.takew) {
  383. goto L32500;
  384. }
  385. /* !TAKE? */
  386. rspeak_(228);
  387. /* !CANT. */
  388. return ret_val;
  389. L32500:
  390. if (prsvec_1.prsa != vindex_1.burnw && prsvec_1.prsa != vindex_1.mungw) {
  391. goto L10;
  392. }
  393. if (findex_1.onpolf) {
  394. return ret_val;
  395. }
  396. /* !BURN OR MUNG? */
  397. findex_1.onpolf = TRUE_;
  398. /* !SET HEAD ON POLE. */
  399. newsta_(oindex_1.hpole, 0, rindex_1.lld2, 0, 0);
  400. jigsup_(229);
  401. /* !BEHEADED. */
  402. return ret_val;
  403. /* O113-- VAMPIRE BAT */
  404. L35000:
  405. rspeak_(50);
  406. /* !TIME TO FLY, JACK. */
  407. f = moveto_(bats_1.batdrp[rnd_(9)], play_1.winner);
  408. /* !SELECT RANDOM DEST. */
  409. f = rmdesc_(0);
  410. return ret_val;
  411. /* OAPPLI, PAGE 7 */
  412. /* O114-- STICK */
  413. L39000:
  414. if (prsvec_1.prsa != vindex_1.wavew) {
  415. goto L10;
  416. }
  417. /* !WAVE? */
  418. if (play_1.here == rindex_1.mrain) {
  419. goto L39500;
  420. }
  421. /* !ON RAINBOW? */
  422. if (play_1.here == rindex_1.pog || play_1.here == rindex_1.falls) {
  423. goto L39200;
  424. }
  425. rspeak_(244);
  426. /* !NOTHING HAPPENS. */
  427. return ret_val;
  428. L39200:
  429. objcts_1.oflag1[oindex_1.pot - 1] |= VISIBT;
  430. findex_1.rainbf = ! findex_1.rainbf;
  431. /* !COMPLEMENT RAINBOW. */
  432. i = 245;
  433. /* !ASSUME OFF. */
  434. if (findex_1.rainbf) {
  435. i = 246;
  436. }
  437. /* !IF ON, SOLID. */
  438. rspeak_(i);
  439. /* !DESCRIBE. */
  440. return ret_val;
  441. L39500:
  442. findex_1.rainbf = FALSE_;
  443. /* !ON RAINBOW, */
  444. jigsup_(247);
  445. /* !TAKE A FALL. */
  446. return ret_val;
  447. /* O115-- BALLOON, HANDLED EXTERNALLY */
  448. L40000:
  449. ret_val = ballop_(arg);
  450. return ret_val;
  451. /* O116-- HEADS */
  452. L45000:
  453. if (prsvec_1.prsa != vindex_1.hellow) {
  454. goto L45100;
  455. }
  456. /* !HELLO HEADS? */
  457. rspeak_(633);
  458. /* !TRULY BIZARRE. */
  459. return ret_val;
  460. L45100:
  461. if (prsvec_1.prsa == vindex_1.readw) {
  462. goto L10;
  463. }
  464. /* !READ IS OK. */
  465. newsta_(oindex_1.lcase, 260, rindex_1.lroom, 0, 0);
  466. /* !MAKE LARGE CASE. */
  467. i = robadv_(play_1.winner, 0, oindex_1.lcase, 0) + robrm_(
  468. play_1.here, 100, 0, oindex_1.lcase, 0);
  469. jigsup_(261);
  470. /* !KILL HIM. */
  471. return ret_val;
  472. /* OAPPLI, PAGE 8 */
  473. /* O117-- SPHERE */
  474. L47000:
  475. if (findex_1.cagesf || prsvec_1.prsa != vindex_1.takew) {
  476. goto L10;
  477. }
  478. /* !TAKE? */
  479. if (play_1.winner != aindex_1.player) {
  480. goto L47500;
  481. }
  482. /* !ROBOT TAKE? */
  483. rspeak_(263);
  484. /* !NO, DROP CAGE. */
  485. if (objcts_1.oroom[oindex_1.robot - 1] != play_1.here) {
  486. goto L47200;
  487. }
  488. /* !ROBOT HERE? */
  489. f = moveto_(rindex_1.caged, play_1.winner);
  490. /* !YES, MOVE INTO CAGE. */
  491. newsta_(oindex_1.robot, 0, rindex_1.caged, 0, 0);
  492. /* !MOVE ROBOT. */
  493. advs_1.aroom[aindex_1.arobot - 1] = rindex_1.caged;
  494. objcts_1.oflag1[oindex_1.robot - 1] |= NDSCBT;
  495. cevent_1.ctick[cindex_1.cevsph - 1] = 10;
  496. /* !GET OUT IN 10 OR ELSE. */
  497. return ret_val;
  498. L47200:
  499. newsta_(oindex_1.spher, 0, 0, 0, 0);
  500. /* !YOURE DEAD. */
  501. rooms_1.rflag[rindex_1.cager - 1] |= RMUNG;
  502. rrand[rindex_1.cager - 1] = 147;
  503. jigsup_(148);
  504. /* !MUNG PLAYER. */
  505. return ret_val;
  506. L47500:
  507. newsta_(oindex_1.spher, 0, 0, 0, 0);
  508. /* !ROBOT TRIED, */
  509. newsta_(oindex_1.robot, 264, 0, 0, 0);
  510. /* !KILL HIM. */
  511. newsta_(oindex_1.cage, 0, play_1.here, 0, 0);
  512. /* !INSERT MANGLED CAGE. */
  513. return ret_val;
  514. /* O118-- GEOMETRICAL BUTTONS */
  515. L48000:
  516. if (prsvec_1.prsa != vindex_1.pushw) {
  517. goto L10;
  518. }
  519. /* !PUSH? */
  520. i = prsvec_1.prso - oindex_1.sqbut + 1;
  521. /* !GET BUTTON INDEX. */
  522. if (i <= 0 || i >= 4) {
  523. goto L10;
  524. }
  525. /* !A BUTTON? */
  526. if (play_1.winner != aindex_1.player) {
  527. switch (i) {
  528. case 1: goto L48100;
  529. case 2: goto L48200;
  530. case 3: goto L48300;
  531. }
  532. }
  533. jigsup_(265);
  534. /* !YOU PUSHED, YOU DIE. */
  535. return ret_val;
  536. L48100:
  537. i = 267;
  538. if (findex_1.carozf) {
  539. i = 266;
  540. }
  541. /* !SPEED UP? */
  542. findex_1.carozf = TRUE_;
  543. rspeak_(i);
  544. return ret_val;
  545. L48200:
  546. i = 266;
  547. /* !ASSUME NO CHANGE. */
  548. if (findex_1.carozf) {
  549. i = 268;
  550. }
  551. findex_1.carozf = FALSE_;
  552. rspeak_(i);
  553. return ret_val;
  554. L48300:
  555. findex_1.caroff = ! findex_1.caroff;
  556. /* !FLIP CAROUSEL. */
  557. if (! qhere_(oindex_1.irbox, rindex_1.carou)) {
  558. return ret_val;
  559. }
  560. /* !IRON BOX IN CAROUSEL? */
  561. rspeak_(269);
  562. /* !YES, THUMP. */
  563. objcts_1.oflag1[oindex_1.irbox - 1] ^= VISIBT;
  564. if (findex_1.caroff) {
  565. rooms_1.rflag[rindex_1.carou - 1] &= ~ RSEEN;
  566. }
  567. return ret_val;
  568. /* O119-- FLASK FUNCTION */
  569. L49000:
  570. if (prsvec_1.prsa == vindex_1.openw) {
  571. goto L49100;
  572. }
  573. /* !OPEN? */
  574. if (prsvec_1.prsa != vindex_1.mungw && prsvec_1.prsa != vindex_1.throww) {
  575. goto L10;
  576. }
  577. newsta_(oindex_1.flask, 270, 0, 0, 0);
  578. /* !KILL FLASK. */
  579. L49100:
  580. rooms_1.rflag[play_1.here - 1] |= RMUNG;
  581. rrand[play_1.here - 1] = 271;
  582. jigsup_(272);
  583. /* !POISONED. */
  584. return ret_val;
  585. /* O120-- BUCKET FUNCTION */
  586. L50000:
  587. if (arg != 2) {
  588. goto L10;
  589. }
  590. /* !READOUT? */
  591. if (objcts_1.ocan[oindex_1.water - 1] != oindex_1.bucke ||
  592. findex_1.bucktf) {
  593. goto L50500;
  594. }
  595. findex_1.bucktf = TRUE_;
  596. /* !BUCKET AT TOP. */
  597. cevent_1.ctick[cindex_1.cevbuc - 1] = 100;
  598. /* !START COUNTDOWN. */
  599. newsta_(oindex_1.bucke, 290, rindex_1.twell, 0, 0);
  600. /* !REPOSITION BUCKET. */
  601. goto L50900;
  602. /* !FINISH UP. */
  603. L50500:
  604. if (objcts_1.ocan[oindex_1.water - 1] == oindex_1.bucke || !
  605. findex_1.bucktf) {
  606. goto L10;
  607. }
  608. findex_1.bucktf = FALSE_;
  609. newsta_(oindex_1.bucke, 291, rindex_1.bwell, 0, 0);
  610. /* !BUCKET AT BOTTOM. */
  611. L50900:
  612. if (av != oindex_1.bucke) {
  613. return ret_val;
  614. }
  615. /* !IN BUCKET? */
  616. f = moveto_(objcts_1.oroom[oindex_1.bucke - 1], play_1.winner);
  617. /* !MOVE ADVENTURER. */
  618. f = rmdesc_(0);
  619. /* !DESCRIBE ROOM. */
  620. return ret_val;
  621. /* OAPPLI, PAGE 9 */
  622. /* O121-- EATME CAKE */
  623. L51000:
  624. if (prsvec_1.prsa != vindex_1.eatw || prsvec_1.prso != oindex_1.ecake ||
  625. play_1.here != rindex_1.alice) {
  626. goto L10;
  627. }
  628. newsta_(oindex_1.ecake, 273, 0, 0, 0);
  629. /* !VANISH CAKE. */
  630. objcts_1.oflag1[oindex_1.robot - 1] &= ~ VISIBT;
  631. ret_val = moveto_(rindex_1.alism, play_1.winner);
  632. /* !MOVE TO ALICE SMALL. */
  633. iz = 64;
  634. ir = rindex_1.alism;
  635. io = rindex_1.alice;
  636. goto L52405;
  637. /* O122-- ICINGS */
  638. L52000:
  639. if (prsvec_1.prsa != vindex_1.readw) {
  640. goto L52200;
  641. }
  642. /* !READ? */
  643. i = 274;
  644. /* !CANT READ. */
  645. if (prsvec_1.prsi != 0) {
  646. i = 275;
  647. }
  648. /* !THROUGH SOMETHING? */
  649. if (prsvec_1.prsi == oindex_1.bottl) {
  650. i = 276;
  651. }
  652. /* !THROUGH BOTTLE? */
  653. if (prsvec_1.prsi == oindex_1.flask) {
  654. i = prsvec_1.prso - oindex_1.orice + 277;
  655. }
  656. /* !THROUGH FLASK? */
  657. rspeak_(i);
  658. /* !READ FLASK. */
  659. return ret_val;
  660. L52200:
  661. if (prsvec_1.prsa != vindex_1.throww || prsvec_1.prso != oindex_1.rdice ||
  662. prsvec_1.prsi != oindex_1.pool) {
  663. goto L52300;
  664. }
  665. newsta_(oindex_1.pool, 280, 0, 0, 0);
  666. /* !VANISH POOL. */
  667. objcts_1.oflag1[oindex_1.saffr - 1] |= VISIBT;
  668. return ret_val;
  669. L52300:
  670. if (play_1.here != rindex_1.alice && play_1.here != rindex_1.alism &&
  671. play_1.here != rindex_1.alitr) {
  672. goto L10;
  673. }
  674. if (prsvec_1.prsa != vindex_1.eatw && prsvec_1.prsa != vindex_1.throww ||
  675. prsvec_1.prso != oindex_1.orice) {
  676. goto L52400;
  677. }
  678. newsta_(oindex_1.orice, 0, 0, 0, 0);
  679. /* !VANISH ORANGE ICE. */
  680. rooms_1.rflag[play_1.here - 1] |= RMUNG;
  681. rrand[play_1.here - 1] = 281;
  682. jigsup_(282);
  683. /* !VANISH ADVENTURER. */
  684. return ret_val;
  685. L52400:
  686. if (prsvec_1.prsa != vindex_1.eatw || prsvec_1.prso != oindex_1.blice) {
  687. goto L10;
  688. }
  689. newsta_(oindex_1.blice, 283, 0, 0, 0);
  690. /* !VANISH BLUE ICE. */
  691. if (play_1.here != rindex_1.alism) {
  692. goto L52500;
  693. }
  694. /* !IN REDUCED ROOM? */
  695. objcts_1.oflag1[oindex_1.robot - 1] |= VISIBT;
  696. io = play_1.here;
  697. ret_val = moveto_(rindex_1.alice, play_1.winner);
  698. iz = 0;
  699. ir = rindex_1.alice;
  700. /* Do a size change, common loop used also by code at 51000 */
  701. L52405:
  702. i__1 = objcts_1.olnt;
  703. for (i = 1; i <= i__1; ++i) {
  704. /* !ENLARGE WORLD. */
  705. if (objcts_1.oroom[i - 1] != io || objcts_1.osize[i - 1] == 10000) {
  706. goto L52450;
  707. }
  708. objcts_1.oroom[i - 1] = ir;
  709. objcts_1.osize[i - 1] *= iz;
  710. L52450:
  711. ;
  712. }
  713. return ret_val;
  714. L52500:
  715. jigsup_(284);
  716. /* !ENLARGED IN WRONG ROOM. */
  717. return ret_val;
  718. /* O123-- BRICK */
  719. L54000:
  720. if (prsvec_1.prsa != vindex_1.burnw) {
  721. goto L10;
  722. }
  723. /* !BURN? */
  724. jigsup_(150);
  725. /* !BOOM */
  726. /* ! */
  727. return ret_val;
  728. /* O124-- MYSELF */
  729. L55000:
  730. if (prsvec_1.prsa != vindex_1.givew) {
  731. goto L55100;
  732. }
  733. /* !GIVE? */
  734. newsta_(prsvec_1.prso, 2, 0, 0, aindex_1.player);
  735. /* !DONE. */
  736. return ret_val;
  737. L55100:
  738. if (prsvec_1.prsa != vindex_1.takew) {
  739. goto L55200;
  740. }
  741. /* !TAKE? */
  742. rspeak_(286);
  743. /* !JOKE. */
  744. return ret_val;
  745. L55200:
  746. if (prsvec_1.prsa != vindex_1.killw && prsvec_1.prsa != vindex_1.mungw) {
  747. goto L10;
  748. }
  749. jigsup_(287);
  750. /* !KILL, NO JOKE. */
  751. return ret_val;
  752. /* OAPPLI, PAGE 10 */
  753. /* O125-- PANELS INSIDE MIRROR */
  754. L56000:
  755. if (prsvec_1.prsa != vindex_1.pushw) {
  756. goto L10;
  757. }
  758. /* !PUSH? */
  759. if (findex_1.poleuf != 0) {
  760. goto L56100;
  761. }
  762. /* !SHORT POLE UP? */
  763. i = 731;
  764. /* !NO, WONT BUDGE. */
  765. if (findex_1.mdir % 180 == 0) {
  766. i = 732;
  767. }
  768. /* !DIFF MSG IF N-S. */
  769. rspeak_(i);
  770. /* !TELL WONT MOVE. */
  771. return ret_val;
  772. L56100:
  773. if (findex_1.mloc != rindex_1.mrg) {
  774. goto L56200;
  775. }
  776. /* !IN GDN ROOM? */
  777. rspeak_(733);
  778. /* !YOU LOSE. */
  779. jigsup_(685);
  780. return ret_val;
  781. L56200:
  782. i = 831;
  783. /* !ROTATE L OR R. */
  784. if (prsvec_1.prso == oindex_1.rdwal || prsvec_1.prso == oindex_1.ylwal) {
  785. i = 830;
  786. }
  787. rspeak_(i);
  788. /* !TELL DIRECTION. */
  789. findex_1.mdir = (findex_1.mdir + 45 + (i - 830) * 270) % 360;
  790. /* !CALCULATE NEW DIR. */
  791. i__1 = findex_1.mdir / 45 + 695;
  792. rspsub_(734, i__1);
  793. /* !TELL NEW DIR. */
  794. if (findex_1.wdopnf) {
  795. rspeak_(730);
  796. }
  797. /* !IF PANEL OPEN, CLOSE. */
  798. findex_1.wdopnf = FALSE_;
  799. return ret_val;
  800. /* !DONE. */
  801. /* O126-- ENDS INSIDE MIRROR */
  802. L57000:
  803. if (prsvec_1.prsa != vindex_1.pushw) {
  804. goto L10;
  805. }
  806. /* !PUSH? */
  807. if (findex_1.mdir % 180 == 0) {
  808. goto L57100;
  809. }
  810. /* !MIRROR N-S? */
  811. rspeak_(735);
  812. /* !NO, WONT BUDGE. */
  813. return ret_val;
  814. L57100:
  815. if (prsvec_1.prso != oindex_1.pindr) {
  816. goto L57300;
  817. }
  818. /* !PUSH PINE WALL? */
  819. if (findex_1.mloc == rindex_1.mrc && findex_1.mdir == 180 ||
  820. findex_1.mloc == rindex_1.mrd && findex_1.mdir == 0 ||
  821. findex_1.mloc == rindex_1.mrg) {
  822. goto L57200;
  823. }
  824. rspeak_(736);
  825. /* !NO, OPENS. */
  826. findex_1.wdopnf = TRUE_;
  827. /* !INDICATE OPEN. */
  828. cevent_1.cflag[cindex_1.cevpin - 1] = TRUE_;
  829. /* !TIME OPENING. */
  830. cevent_1.ctick[cindex_1.cevpin - 1] = 5;
  831. return ret_val;
  832. L57200:
  833. rspeak_(737);
  834. /* !GDN SEES YOU, DIE. */
  835. jigsup_(685);
  836. return ret_val;
  837. L57300:
  838. nloc = findex_1.mloc - 1;
  839. /* !NEW LOC IF SOUTH. */
  840. if (findex_1.mdir == 0) {
  841. nloc = findex_1.mloc + 1;
  842. }
  843. /* !NEW LOC IF NORTH. */
  844. if (nloc >= rindex_1.mra && nloc <= rindex_1.mrd) {
  845. goto L57400;
  846. }
  847. rspeak_(738);
  848. /* !HAVE REACHED END. */
  849. return ret_val;
  850. L57400:
  851. i = 699;
  852. /* !ASSUME SOUTH. */
  853. if (findex_1.mdir == 0) {
  854. i = 695;
  855. }
  856. /* !NORTH. */
  857. j = 739;
  858. /* !ASSUME SMOOTH. */
  859. if (findex_1.poleuf != 0) {
  860. j = 740;
  861. }
  862. /* !POLE UP, WOBBLES. */
  863. rspsub_(j, i);
  864. /* !DESCRIBE. */
  865. findex_1.mloc = nloc;
  866. if (findex_1.mloc != rindex_1.mrg) {
  867. return ret_val;
  868. }
  869. /* !NOW IN GDN ROOM? */
  870. if (findex_1.poleuf != 0) {
  871. goto L57500;
  872. }
  873. /* !POLE UP, GDN SEES. */
  874. if (findex_1.mropnf || findex_1.wdopnf) {
  875. goto L57600;
  876. }
  877. /* !DOOR OPEN, GDN SEES. */
  878. if (findex_1.mr1f && findex_1.mr2f) {
  879. return ret_val;
  880. }
  881. /* !MIRRORS INTACT, OK. */
  882. rspeak_(742);
  883. /* !MIRRORS BROKEN, DIE. */
  884. jigsup_(743);
  885. return ret_val;
  886. L57500:
  887. rspeak_(741);
  888. /* !POLE UP, DIE. */
  889. jigsup_(743);
  890. return ret_val;
  891. L57600:
  892. rspeak_(744);
  893. /* !DOOR OPEN, DIE. */
  894. jigsup_(743);
  895. return ret_val;
  896. /* OAPPLI, PAGE 11 */
  897. /* O127-- GLOBAL GUARDIANS */
  898. L58000:
  899. if (prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw &&
  900. prsvec_1.prsa != vindex_1.mungw) {
  901. goto L58100;
  902. }
  903. jigsup_(745);
  904. /* !LOSE. */
  905. return ret_val;
  906. L58100:
  907. if (prsvec_1.prsa != vindex_1.hellow) {
  908. goto L10;
  909. }
  910. /* !HELLO? */
  911. rspeak_(746);
  912. /* !NO REPLY. */
  913. return ret_val;
  914. /* O128-- GLOBAL MASTER */
  915. L59000:
  916. if (prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw &&
  917. prsvec_1.prsa != vindex_1.mungw) {
  918. goto L59100;
  919. }
  920. jigsup_(747);
  921. /* !BAD IDEA. */
  922. return ret_val;
  923. L59100:
  924. if (prsvec_1.prsa != vindex_1.takew) {
  925. goto L10;
  926. }
  927. /* !TAKE? */
  928. rspeak_(748);
  929. /* !JOKE. */
  930. return ret_val;
  931. /* O129-- NUMERAL FIVE (FOR JOKE) */
  932. L60000:
  933. if (prsvec_1.prsa != vindex_1.takew) {
  934. goto L10;
  935. }
  936. /* !TAKE FIVE? */
  937. rspeak_(419);
  938. /* !TIME PASSES. */
  939. for (i = 1; i <= 3; ++i) {
  940. /* !WAIT A WHILE. */
  941. if (clockd_()) {
  942. return ret_val;
  943. }
  944. /* L60100: */
  945. }
  946. return ret_val;
  947. /* O130-- CRYPT FUNCTION */
  948. L61000:
  949. if (! findex_1.endgmf) {
  950. goto L45000;
  951. }
  952. /* !IF NOT EG, DIE. */
  953. if (prsvec_1.prsa != vindex_1.openw) {
  954. goto L61100;
  955. }
  956. /* !OPEN? */
  957. i = 793;
  958. if ((objcts_1.oflag2[oindex_1.tomb - 1] & OPENBT) != 0) {
  959. i = 794;
  960. }
  961. rspeak_(i);
  962. objcts_1.oflag2[oindex_1.tomb - 1] |= OPENBT;
  963. return ret_val;
  964. L61100:
  965. if (prsvec_1.prsa != vindex_1.closew) {
  966. goto L45000;
  967. }
  968. /* !CLOSE? */
  969. i = 795;
  970. if ((objcts_1.oflag2[oindex_1.tomb - 1] & OPENBT) != 0) {
  971. i = 796;
  972. }
  973. rspeak_(i);
  974. objcts_1.oflag2[oindex_1.tomb - 1] &= ~ OPENBT;
  975. if (play_1.here == rindex_1.crypt) {
  976. cevent_1.ctick[cindex_1.cevste - 1] = 3;
  977. }
  978. /* !IF IN CRYPT, START EG. */
  979. return ret_val;
  980. /* OAPPLI, PAGE 12 */
  981. /* O131-- GLOBAL LADDER */
  982. L62000:
  983. if (puzzle_1.cpvec[findex_1.cphere] == -2 || puzzle_1.cpvec[
  984. findex_1.cphere - 2] == -3) {
  985. goto L62100;
  986. }
  987. rspeak_(865);
  988. /* !NO, LOSE. */
  989. return ret_val;
  990. L62100:
  991. if (prsvec_1.prsa == vindex_1.clmbw || prsvec_1.prsa == vindex_1.clmbuw) {
  992. goto L62200;
  993. }
  994. rspeak_(866);
  995. /* !CLIMB IT? */
  996. return ret_val;
  997. L62200:
  998. if (findex_1.cphere == 10 && puzzle_1.cpvec[findex_1.cphere] == -2) {
  999. goto L62300;
  1000. }
  1001. rspeak_(867);
  1002. /* !NO, HIT YOUR HEAD. */
  1003. return ret_val;
  1004. L62300:
  1005. f = moveto_(rindex_1.cpant, play_1.winner);
  1006. /* !TO ANTEROOM. */
  1007. f = rmdesc_(3);
  1008. /* !DESCRIBE. */
  1009. return ret_val;
  1010. } /* oappli_ */