sobjs.c 21 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024
  1. /* SOBJS- SIMPLE OBJECTS PROCESSOR */
  2. /* OBJECTS IN THIS MODULE CANNOT CALL RMINFO, JIGSUP, */
  3. /* MAJOR VERBS, OR OTHER NON-RESIDENT SUBROUTINES */
  4. /*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
  5. /* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
  6. /* WRITTEN BY R. M. SUPNIK */
  7. #include "funcs.h"
  8. #include "vars.h"
  9. logical sobjs_(ri, arg)
  10. integer ri;
  11. integer arg;
  12. {
  13. /* System generated locals */
  14. integer i__1;
  15. logical ret_val;
  16. /* Local variables */
  17. logical f;
  18. integer i;
  19. integer mroom;
  20. integer av;
  21. integer odi2 = 0, odo2 = 0;
  22. if (prsvec_1.prso > 220) {
  23. goto L5;
  24. }
  25. if (prsvec_1.prso != 0) {
  26. odo2 = objcts_1.odesc2[prsvec_1.prso - 1];
  27. }
  28. L5:
  29. if (prsvec_1.prsi != 0) {
  30. odi2 = objcts_1.odesc2[prsvec_1.prsi - 1];
  31. }
  32. av = advs_1.avehic[play_1.winner - 1];
  33. ret_val = TRUE_;
  34. switch (ri) {
  35. case 1: goto L1000;
  36. case 2: goto L3000;
  37. case 3: goto L4000;
  38. case 4: goto L6000;
  39. case 5: goto L7000;
  40. case 6: goto L8000;
  41. case 7: goto L9000;
  42. case 8: goto L13000;
  43. case 9: goto L14000;
  44. case 10: goto L16000;
  45. case 11: goto L17000;
  46. case 12: goto L21000;
  47. case 13: goto L23000;
  48. case 14: goto L24000;
  49. case 15: goto L27000;
  50. case 16: goto L28000;
  51. case 17: goto L29000;
  52. case 18: goto L30000;
  53. case 19: goto L31000;
  54. case 20: goto L33000;
  55. case 21: goto L34000;
  56. case 22: goto L36000;
  57. case 23: goto L37000;
  58. case 24: goto L38000;
  59. case 25: goto L41000;
  60. case 26: goto L42000;
  61. case 27: goto L43000;
  62. case 28: goto L44000;
  63. case 29: goto L46000;
  64. case 30: goto L53000;
  65. case 31: goto L56000;
  66. }
  67. bug_(6, ri);
  68. /* RETURN HERE TO DECLARE FALSE RESULT */
  69. L10:
  70. ret_val = FALSE_;
  71. return ret_val;
  72. /* SOBJS, PAGE 3 */
  73. /* O1-- GUNK FUNCTION */
  74. L1000:
  75. if (objcts_1.ocan[oindex_1.gunk - 1] == 0) {
  76. goto L10;
  77. }
  78. /* !NOT INSIDE? F */
  79. newsta_(oindex_1.gunk, 122, 0, 0, 0);
  80. /* !FALLS APART. */
  81. return ret_val;
  82. /* O2-- TROPHY CASE */
  83. L3000:
  84. if (prsvec_1.prsa != vindex_1.takew) {
  85. goto L10;
  86. }
  87. /* !TAKE? */
  88. rspeak_(128);
  89. /* !CANT. */
  90. return ret_val;
  91. /* O3-- BOTTLE FUNCTION */
  92. L4000:
  93. if (prsvec_1.prsa != vindex_1.throww) {
  94. goto L4100;
  95. }
  96. /* !THROW? */
  97. newsta_(prsvec_1.prso, 129, 0, 0, 0);
  98. /* !BREAKS. */
  99. return ret_val;
  100. L4100:
  101. if (prsvec_1.prsa != vindex_1.mungw) {
  102. goto L10;
  103. }
  104. /* !MUNG? */
  105. newsta_(prsvec_1.prso, 131, 0, 0, 0);
  106. /* !BREAKS. */
  107. return ret_val;
  108. /* SOBJS, PAGE 4 */
  109. /* O4-- ROPE FUNCTION */
  110. L6000:
  111. if (play_1.here == rindex_1.dome) {
  112. goto L6100;
  113. }
  114. /* !IN DOME? */
  115. findex_1.domef = FALSE_;
  116. /* !NO, */
  117. if (prsvec_1.prsa != vindex_1.untiew) {
  118. goto L6050;
  119. }
  120. /* !UNTIE? */
  121. rspeak_(134);
  122. /* !CANT */
  123. return ret_val;
  124. L6050:
  125. if (prsvec_1.prsa != vindex_1.tiew) {
  126. goto L10;
  127. }
  128. /* !TIE? */
  129. rspeak_(135);
  130. /* !CANT TIE */
  131. return ret_val;
  132. L6100:
  133. if (prsvec_1.prsa != vindex_1.tiew || prsvec_1.prsi != oindex_1.raili) {
  134. goto L6200;
  135. }
  136. if (findex_1.domef) {
  137. goto L6150;
  138. }
  139. /* !ALREADY TIED? */
  140. findex_1.domef = TRUE_;
  141. /* !NO, TIE IT. */
  142. objcts_1.oflag1[oindex_1.rope - 1] |= NDSCBT;
  143. objcts_1.oflag2[oindex_1.rope - 1] |= CLMBBT;
  144. newsta_(oindex_1.rope, 137, rindex_1.dome, 0, 0);
  145. return ret_val;
  146. L6150:
  147. rspeak_(136);
  148. /* !DUMMY. */
  149. return ret_val;
  150. L6200:
  151. if (prsvec_1.prsa != vindex_1.untiew) {
  152. goto L6300;
  153. }
  154. /* !UNTIE? */
  155. if (findex_1.domef) {
  156. goto L6250;
  157. }
  158. /* !TIED? */
  159. rspeak_(134);
  160. /* !NO, DUMMY. */
  161. return ret_val;
  162. L6250:
  163. findex_1.domef = FALSE_;
  164. /* !YES, UNTIE IT. */
  165. objcts_1.oflag1[oindex_1.rope - 1] &= ~ NDSCBT;
  166. objcts_1.oflag2[oindex_1.rope - 1] &= ~ CLMBBT;
  167. rspeak_(139);
  168. return ret_val;
  169. L6300:
  170. if (findex_1.domef || prsvec_1.prsa != vindex_1.dropw) {
  171. goto L6400;
  172. }
  173. /* !DROP & UNTIED? */
  174. newsta_(oindex_1.rope, 140, rindex_1.mtorc, 0, 0);
  175. /* !YES, DROP. */
  176. return ret_val;
  177. L6400:
  178. if (prsvec_1.prsa != vindex_1.takew || ! findex_1.domef) {
  179. goto L10;
  180. }
  181. rspeak_(141);
  182. /* !TAKE & TIED. */
  183. return ret_val;
  184. /* O5-- SWORD FUNCTION */
  185. L7000:
  186. if (prsvec_1.prsa == vindex_1.takew && play_1.winner == aindex_1.player) {
  187. hack_1.swdact = TRUE_;
  188. }
  189. goto L10;
  190. /* O6-- LANTERN */
  191. L8000:
  192. if (prsvec_1.prsa != vindex_1.throww) {
  193. goto L8100;
  194. }
  195. /* !THROW? */
  196. newsta_(oindex_1.lamp, 0, 0, 0, 0);
  197. /* !KILL LAMP, */
  198. newsta_(oindex_1.blamp, 142, play_1.here, 0, 0);
  199. /* !REPLACE WITH BROKEN. */
  200. return ret_val;
  201. L8100:
  202. if (prsvec_1.prsa == vindex_1.trnonw) {
  203. cevent_1.cflag[cindex_1.cevlnt - 1] = TRUE_;
  204. }
  205. if (prsvec_1.prsa == vindex_1.trnofw) {
  206. cevent_1.cflag[cindex_1.cevlnt - 1] = FALSE_;
  207. }
  208. goto L10;
  209. /* O7-- RUG FUNCTION */
  210. L9000:
  211. if (prsvec_1.prsa != vindex_1.raisew) {
  212. goto L9100;
  213. }
  214. /* !RAISE? */
  215. rspeak_(143);
  216. /* !CANT */
  217. return ret_val;
  218. L9100:
  219. if (prsvec_1.prsa != vindex_1.takew) {
  220. goto L9200;
  221. }
  222. /* !TAKE? */
  223. rspeak_(144);
  224. /* !CANT */
  225. return ret_val;
  226. L9200:
  227. if (prsvec_1.prsa != vindex_1.movew) {
  228. goto L9300;
  229. }
  230. /* !MOVE? */
  231. i__1 = findex_1.orrug + 145;
  232. rspeak_(i__1);
  233. findex_1.orrug = 1;
  234. objcts_1.oflag1[oindex_1.door - 1] |= VISIBT;
  235. return ret_val;
  236. L9300:
  237. if (prsvec_1.prsa != vindex_1.lookuw || findex_1.orrug != 0 || (
  238. objcts_1.oflag2[oindex_1.door - 1] & OPENBT) != 0) {
  239. goto L10;
  240. }
  241. rspeak_(345);
  242. return ret_val;
  243. /* SOBJS, PAGE 5 */
  244. /* O8-- SKELETON */
  245. L13000:
  246. i = robrm_(play_1.here, 100, rindex_1.lld2, 0, 0) + robadv_(
  247. play_1.winner, rindex_1.lld2, 0, 0);
  248. if (i != 0) {
  249. rspeak_(162);
  250. }
  251. /* !IF ROBBED, SAY SO. */
  252. return ret_val;
  253. /* O9-- MIRROR */
  254. L14000:
  255. if (findex_1.mirrmf || prsvec_1.prsa != vindex_1.rubw) {
  256. goto L14500;
  257. }
  258. mroom = play_1.here ^ 1;
  259. i__1 = objcts_1.olnt;
  260. for (i = 1; i <= i__1; ++i) {
  261. /* !INTERCHANGE OBJS. */
  262. if (objcts_1.oroom[i - 1] == play_1.here) {
  263. objcts_1.oroom[i - 1] = -1;
  264. }
  265. if (objcts_1.oroom[i - 1] == mroom) {
  266. objcts_1.oroom[i - 1] = play_1.here;
  267. }
  268. if (objcts_1.oroom[i - 1] == -1) {
  269. objcts_1.oroom[i - 1] = mroom;
  270. }
  271. /* L14100: */
  272. }
  273. f = moveto_(mroom, play_1.winner);
  274. rspeak_(163);
  275. /* !SHAKE WORLD. */
  276. return ret_val;
  277. L14500:
  278. if (prsvec_1.prsa != vindex_1.lookw && prsvec_1.prsa != vindex_1.lookiw &&
  279. prsvec_1.prsa != vindex_1.examiw) {
  280. goto L14600;
  281. }
  282. i = 164;
  283. /* !MIRROR OK. */
  284. if (findex_1.mirrmf) {
  285. i = 165;
  286. }
  287. /* !MIRROR DEAD. */
  288. rspeak_(i);
  289. return ret_val;
  290. L14600:
  291. if (prsvec_1.prsa != vindex_1.takew) {
  292. goto L14700;
  293. }
  294. /* !TAKE? */
  295. rspeak_(166);
  296. /* !JOKE. */
  297. return ret_val;
  298. L14700:
  299. if (prsvec_1.prsa != vindex_1.mungw && prsvec_1.prsa != vindex_1.throww) {
  300. goto L10;
  301. }
  302. i = 167;
  303. /* !MIRROR BREAKS. */
  304. if (findex_1.mirrmf) {
  305. i = 168;
  306. }
  307. /* !MIRROR ALREADY BROKEN. */
  308. findex_1.mirrmf = TRUE_;
  309. findex_1.badlkf = TRUE_;
  310. rspeak_(i);
  311. return ret_val;
  312. /* SOBJS, PAGE 6 */
  313. /* O10-- DUMBWAITER */
  314. L16000:
  315. if (prsvec_1.prsa != vindex_1.raisew) {
  316. goto L16100;
  317. }
  318. /* !RAISE? */
  319. if (findex_1.cagetf) {
  320. goto L16400;
  321. }
  322. /* !ALREADY AT TOP? */
  323. newsta_(oindex_1.tbask, 175, rindex_1.tshaf, 0, 0);
  324. /* !NO, RAISE BASKET. */
  325. newsta_(oindex_1.fbask, 0, rindex_1.bshaf, 0, 0);
  326. findex_1.cagetf = TRUE_;
  327. /* !AT TOP. */
  328. return ret_val;
  329. L16100:
  330. if (prsvec_1.prsa != vindex_1.lowerw) {
  331. goto L16200;
  332. }
  333. /* !LOWER? */
  334. if (! findex_1.cagetf) {
  335. goto L16400;
  336. }
  337. /* !ALREADY AT BOTTOM? */
  338. newsta_(oindex_1.tbask, 176, rindex_1.bshaf, 0, 0);
  339. /* !NO, LOWER BASKET. */
  340. newsta_(oindex_1.fbask, 0, rindex_1.tshaf, 0, 0);
  341. findex_1.cagetf = FALSE_;
  342. if (! lit_(play_1.here)) {
  343. rspeak_(406);
  344. }
  345. /* !IF DARK, DIE. */
  346. return ret_val;
  347. L16200:
  348. if (prsvec_1.prso != oindex_1.fbask && prsvec_1.prsi != oindex_1.fbask) {
  349. goto L16300;
  350. }
  351. rspeak_(130);
  352. /* !WRONG BASKET. */
  353. return ret_val;
  354. L16300:
  355. if (prsvec_1.prsa != vindex_1.takew) {
  356. goto L10;
  357. }
  358. /* !TAKE? */
  359. rspeak_(177);
  360. /* !JOKE. */
  361. return ret_val;
  362. L16400:
  363. i__1 = rnd_(3) + 125;
  364. rspeak_(i__1);
  365. /* !DUMMY. */
  366. return ret_val;
  367. /* O11-- GHOST FUNCTION */
  368. L17000:
  369. i = 178;
  370. /* !ASSUME DIRECT. */
  371. if (prsvec_1.prso != oindex_1.ghost) {
  372. i = 179;
  373. }
  374. /* !IF NOT, INDIRECT. */
  375. rspeak_(i);
  376. return ret_val;
  377. /* !SPEAK AND EXIT. */
  378. /* SOBJS, PAGE 7 */
  379. /* O12-- TUBE */
  380. L21000:
  381. if (prsvec_1.prsa != vindex_1.putw || prsvec_1.prsi != oindex_1.tube) {
  382. goto L10;
  383. }
  384. rspeak_(186);
  385. /* !CANT PUT BACK IN. */
  386. return ret_val;
  387. /* O13-- CHALICE */
  388. L23000:
  389. if (prsvec_1.prsa != vindex_1.takew || objcts_1.ocan[prsvec_1.prso - 1] !=
  390. 0 || objcts_1.oroom[prsvec_1.prso - 1] != rindex_1.treas ||
  391. objcts_1.oroom[oindex_1.thief - 1] != rindex_1.treas || (
  392. objcts_1.oflag2[oindex_1.thief - 1] & FITEBT) == 0 || !
  393. hack_1.thfact) {
  394. goto L10;
  395. }
  396. rspeak_(204);
  397. /* !CANT TAKE. */
  398. return ret_val;
  399. /* O14-- PAINTING */
  400. L24000:
  401. if (prsvec_1.prsa != vindex_1.mungw) {
  402. goto L10;
  403. }
  404. /* !MUNG? */
  405. rspeak_(205);
  406. /* !DESTROY PAINTING. */
  407. objcts_1.ofval[prsvec_1.prso - 1] = 0;
  408. objcts_1.otval[prsvec_1.prso - 1] = 0;
  409. objcts_1.odesc1[prsvec_1.prso - 1] = 207;
  410. objcts_1.odesc2[prsvec_1.prso - 1] = 206;
  411. return ret_val;
  412. /* SOBJS, PAGE 8 */
  413. /* O15-- BOLT */
  414. L27000:
  415. if (prsvec_1.prsa != vindex_1.turnw) {
  416. goto L10;
  417. }
  418. /* !TURN BOLT? */
  419. if (prsvec_1.prsi != oindex_1.wrenc) {
  420. goto L27500;
  421. }
  422. /* !WITH WRENCH? */
  423. if (findex_1.gatef) {
  424. goto L27100;
  425. }
  426. /* !PROPER BUTTON PUSHED? */
  427. rspeak_(210);
  428. /* !NO, LOSE. */
  429. return ret_val;
  430. L27100:
  431. if (findex_1.lwtidf) {
  432. goto L27200;
  433. }
  434. /* !LOW TIDE NOW? */
  435. findex_1.lwtidf = TRUE_;
  436. /* !NO, EMPTY DAM. */
  437. rspeak_(211);
  438. objcts_1.oflag2[oindex_1.coffi - 1] &= ~ SCRDBT;
  439. objcts_1.oflag1[oindex_1.trunk - 1] |= VISIBT;
  440. rooms_1.rflag[rindex_1.reser - 1] = (rooms_1.rflag[rindex_1.reser - 1] |
  441. RLAND) & ~ (RWATER + RSEEN);
  442. return ret_val;
  443. L27200:
  444. findex_1.lwtidf = FALSE_;
  445. /* !YES, FILL DAM. */
  446. rspeak_(212);
  447. if (qhere_(oindex_1.trunk, rindex_1.reser)) {
  448. objcts_1.oflag1[oindex_1.trunk - 1] &= ~ VISIBT;
  449. }
  450. rooms_1.rflag[rindex_1.reser - 1] = (rooms_1.rflag[rindex_1.reser - 1] |
  451. RWATER) & ~ RLAND;
  452. return ret_val;
  453. L27500:
  454. rspsub_(299, odi2);
  455. /* !NOT WITH THAT. */
  456. return ret_val;
  457. /* O16-- GRATING */
  458. L28000:
  459. if (prsvec_1.prsa != vindex_1.openw && prsvec_1.prsa != vindex_1.closew) {
  460. goto L10;
  461. }
  462. if (findex_1.grunlf) {
  463. goto L28200;
  464. }
  465. /* !UNLOCKED? */
  466. rspeak_(214);
  467. /* !NO, LOCKED. */
  468. return ret_val;
  469. L28200:
  470. i = 215;
  471. /* !UNLOCKED, VIEW FRM CLR. */
  472. if (play_1.here != rindex_1.clear) {
  473. i = 216;
  474. }
  475. /* !VIEW FROM BELOW. */
  476. ret_val = opncls_(oindex_1.grate, i, 885);
  477. /* !OPEN/CLOSE. */
  478. rooms_1.rflag[rindex_1.mgrat - 1] &= ~ RLIGHT;
  479. if ((objcts_1.oflag2[oindex_1.grate - 1] & OPENBT) != 0) {
  480. rooms_1.rflag[rindex_1.mgrat - 1] |= RLIGHT;
  481. }
  482. if (! lit_(play_1.here)) {
  483. rspeak_(406);
  484. }
  485. /* !IF DARK, DIE. */
  486. return ret_val;
  487. /* O17-- TRAP DOOR */
  488. L29000:
  489. if (play_1.here != rindex_1.lroom) {
  490. goto L29100;
  491. }
  492. /* !FROM LIVING ROOM? */
  493. ret_val = opncls_(oindex_1.door, 218, 219);
  494. /* !OPEN/CLOSE. */
  495. return ret_val;
  496. L29100:
  497. if (play_1.here != rindex_1.cella) {
  498. goto L10;
  499. }
  500. /* !FROM CELLAR? */
  501. if (prsvec_1.prsa != vindex_1.openw || (objcts_1.oflag2[oindex_1.door - 1]
  502. & OPENBT) != 0) {
  503. goto L29200;
  504. }
  505. rspeak_(220);
  506. /* !CANT OPEN CLOSED DOOR. */
  507. return ret_val;
  508. L29200:
  509. ret_val = opncls_(oindex_1.door, 0, 22);
  510. /* !NORMAL OPEN/CLOSE. */
  511. return ret_val;
  512. /* O18-- DURABLE DOOR */
  513. L30000:
  514. i = 0;
  515. /* !ASSUME NO APPL. */
  516. if (prsvec_1.prsa == vindex_1.openw) {
  517. i = 221;
  518. }
  519. /* !OPEN? */
  520. if (prsvec_1.prsa == vindex_1.burnw) {
  521. i = 222;
  522. }
  523. /* !BURN? */
  524. if (prsvec_1.prsa == vindex_1.mungw) {
  525. i = rnd_(3) + 223;
  526. }
  527. /* !MUNG? */
  528. if (i == 0) {
  529. goto L10;
  530. }
  531. rspeak_(i);
  532. return ret_val;
  533. /* O19-- MASTER SWITCH */
  534. L31000:
  535. if (prsvec_1.prsa != vindex_1.turnw) {
  536. goto L10;
  537. }
  538. /* !TURN? */
  539. if (prsvec_1.prsi != oindex_1.screw) {
  540. goto L31500;
  541. }
  542. /* !WITH SCREWDRIVER? */
  543. if ((objcts_1.oflag2[oindex_1.machi - 1] & OPENBT) != 0) {
  544. goto L31600;
  545. }
  546. /* !LID UP? */
  547. rspeak_(226);
  548. /* !NO, ACTIVATE. */
  549. if (objcts_1.ocan[oindex_1.coal - 1] != oindex_1.machi) {
  550. goto L31400;
  551. }
  552. /* !COAL INSIDE? */
  553. newsta_(oindex_1.coal, 0, 0, 0, 0);
  554. /* !KILL COAL, */
  555. newsta_(oindex_1.diamo, 0, 0, oindex_1.machi, 0);
  556. /* !REPLACE WITH DIAMOND. */
  557. return ret_val;
  558. L31400:
  559. i__1 = objcts_1.olnt;
  560. for (i = 1; i <= i__1; ++i) {
  561. /* !KILL NONCOAL OBJECTS. */
  562. if (objcts_1.ocan[i - 1] != oindex_1.machi) {
  563. goto L31450;
  564. }
  565. /* !INSIDE MACHINE? */
  566. newsta_(i, 0, 0, 0, 0);
  567. /* !KILL OBJECT AND CONTENTS. */
  568. newsta_(oindex_1.gunk, 0, 0, oindex_1.machi, 0);
  569. /* !REDUCE TO GUNK. */
  570. L31450:
  571. ;
  572. }
  573. return ret_val;
  574. L31500:
  575. rspsub_(300, odi2);
  576. /* !CANT TURN WITH THAT. */
  577. return ret_val;
  578. L31600:
  579. rspeak_(227);
  580. /* !LID IS UP. */
  581. return ret_val;
  582. /* SOBJS, PAGE 9 */
  583. /* O20-- LEAK */
  584. L33000:
  585. if (prsvec_1.prso != oindex_1.leak || prsvec_1.prsa != vindex_1.plugw ||
  586. findex_1.rvmnt <= 0) {
  587. goto L10;
  588. }
  589. if (prsvec_1.prsi != oindex_1.putty) {
  590. goto L33100;
  591. }
  592. /* !WITH PUTTY? */
  593. findex_1.rvmnt = -1;
  594. /* !DISABLE LEAK. */
  595. cevent_1.ctick[cindex_1.cevmnt - 1] = 0;
  596. rspeak_(577);
  597. return ret_val;
  598. L33100:
  599. rspsub_(301, odi2);
  600. /* !CANT WITH THAT. */
  601. return ret_val;
  602. /* O21-- DROWNING BUTTONS */
  603. L34000:
  604. if (prsvec_1.prsa != vindex_1.pushw) {
  605. goto L10;
  606. }
  607. /* !PUSH? */
  608. switch (prsvec_1.prso - oindex_1.rbutt + 1) {
  609. case 1: goto L34100;
  610. case 2: goto L34200;
  611. case 3: goto L34300;
  612. case 4: goto L34400;
  613. }
  614. goto L10;
  615. /* !NOT A BUTTON. */
  616. L34100:
  617. rooms_1.rflag[play_1.here - 1] ^= RLIGHT;
  618. i = 230;
  619. if ((rooms_1.rflag[play_1.here - 1] & RLIGHT) != 0) {
  620. i = 231;
  621. }
  622. rspeak_(i);
  623. return ret_val;
  624. L34200:
  625. findex_1.gatef = TRUE_;
  626. /* !RELEASE GATE. */
  627. rspeak_(232);
  628. return ret_val;
  629. L34300:
  630. findex_1.gatef = FALSE_;
  631. /* !INTERLOCK GATE. */
  632. rspeak_(232);
  633. return ret_val;
  634. L34400:
  635. if (findex_1.rvmnt != 0) {
  636. goto L34500;
  637. }
  638. /* !LEAK ALREADY STARTED? */
  639. rspeak_(233);
  640. /* !NO, START LEAK. */
  641. findex_1.rvmnt = 1;
  642. cevent_1.ctick[cindex_1.cevmnt - 1] = -1;
  643. return ret_val;
  644. L34500:
  645. rspeak_(234);
  646. /* !BUTTON JAMMED. */
  647. return ret_val;
  648. /* O22-- INFLATABLE BOAT */
  649. L36000:
  650. if (prsvec_1.prsa != vindex_1.inflaw) {
  651. goto L10;
  652. }
  653. /* !INFLATE? */
  654. if (objcts_1.oroom[oindex_1.iboat - 1] != 0) {
  655. goto L36100;
  656. }
  657. /* !IN ROOM? */
  658. rspeak_(235);
  659. /* !NO, JOKE. */
  660. return ret_val;
  661. L36100:
  662. if (prsvec_1.prsi != oindex_1.pump) {
  663. goto L36200;
  664. }
  665. /* !WITH PUMP? */
  666. newsta_(oindex_1.iboat, 0, 0, 0, 0);
  667. /* !KILL DEFL BOAT, */
  668. newsta_(oindex_1.rboat, 236, play_1.here, 0, 0);
  669. /* !REPL WITH INF. */
  670. findex_1.deflaf = FALSE_;
  671. return ret_val;
  672. L36200:
  673. i = 237;
  674. /* !JOKES. */
  675. if (prsvec_1.prsi != oindex_1.lungs) {
  676. i = 303;
  677. }
  678. rspsub_(i, odi2);
  679. return ret_val;
  680. /* O23-- DEFLATED BOAT */
  681. L37000:
  682. if (prsvec_1.prsa != vindex_1.inflaw) {
  683. goto L37100;
  684. }
  685. /* !INFLATE? */
  686. rspeak_(238);
  687. /* !JOKE. */
  688. return ret_val;
  689. L37100:
  690. if (prsvec_1.prsa != vindex_1.plugw) {
  691. goto L10;
  692. }
  693. /* !PLUG? */
  694. if (prsvec_1.prsi != oindex_1.putty) {
  695. goto L33100;
  696. }
  697. /* !WITH PUTTY? */
  698. newsta_(oindex_1.iboat, 239, objcts_1.oroom[oindex_1.dboat - 1],
  699. objcts_1.ocan[oindex_1.dboat - 1], objcts_1.oadv[oindex_1.dboat
  700. - 1]);
  701. newsta_(oindex_1.dboat, 0, 0, 0, 0);
  702. /* !KILL DEFL BOAT, REPL. */
  703. return ret_val;
  704. /* SOBJS, PAGE 10 */
  705. /* O24-- RUBBER BOAT */
  706. L38000:
  707. if (arg != 0) {
  708. goto L10;
  709. }
  710. /* !DISMISS READIN, OUT. */
  711. if (prsvec_1.prsa != vindex_1.boardw || objcts_1.oadv[oindex_1.stick - 1]
  712. != play_1.winner) {
  713. goto L38100;
  714. }
  715. newsta_(oindex_1.rboat, 0, 0, 0, 0);
  716. /* !KILL INFL BOAT, */
  717. newsta_(oindex_1.dboat, 240, play_1.here, 0, 0);
  718. /* !REPL WITH DEAD. */
  719. findex_1.deflaf = TRUE_;
  720. return ret_val;
  721. L38100:
  722. if (prsvec_1.prsa != vindex_1.inflaw) {
  723. goto L38200;
  724. }
  725. /* !INFLATE? */
  726. rspeak_(367);
  727. /* !YES, JOKE. */
  728. return ret_val;
  729. L38200:
  730. if (prsvec_1.prsa != vindex_1.deflaw) {
  731. goto L10;
  732. }
  733. /* !DEFLATE? */
  734. if (av == oindex_1.rboat) {
  735. goto L38300;
  736. }
  737. /* !IN BOAT? */
  738. if (objcts_1.oroom[oindex_1.rboat - 1] == 0) {
  739. goto L38400;
  740. }
  741. /* !ON GROUND? */
  742. newsta_(oindex_1.rboat, 0, 0, 0, 0);
  743. /* !KILL INFL BOAT, */
  744. newsta_(oindex_1.iboat, 241, play_1.here, 0, 0);
  745. /* !REPL WITH DEFL. */
  746. findex_1.deflaf = TRUE_;
  747. return ret_val;
  748. L38300:
  749. rspeak_(242);
  750. /* !IN BOAT. */
  751. return ret_val;
  752. L38400:
  753. rspeak_(243);
  754. /* !NOT ON GROUND. */
  755. return ret_val;
  756. /* O25-- BRAIDED ROPE */
  757. L41000:
  758. if (prsvec_1.prsa != vindex_1.tiew || prsvec_1.prso != oindex_1.brope ||
  759. prsvec_1.prsi != oindex_1.hook1 && prsvec_1.prsi !=
  760. oindex_1.hook2) {
  761. goto L41500;
  762. }
  763. findex_1.btief = prsvec_1.prsi;
  764. /* !RECORD LOCATION. */
  765. cevent_1.cflag[cindex_1.cevbal - 1] = FALSE_;
  766. /* !STALL ASCENT. */
  767. rspeak_(248);
  768. return ret_val;
  769. L41500:
  770. if (prsvec_1.prsa != vindex_1.untiew || prsvec_1.prso != oindex_1.brope) {
  771. goto L10;
  772. }
  773. if (findex_1.btief != 0) {
  774. goto L41600;
  775. }
  776. /* !TIED UP? */
  777. rspeak_(249);
  778. /* !NO, JOKE. */
  779. return ret_val;
  780. L41600:
  781. rspeak_(250);
  782. findex_1.btief = 0;
  783. /* !UNTIE. */
  784. cevent_1.ctick[cindex_1.cevbal - 1] = 3;
  785. /* !RESTART CLOCK. */
  786. cevent_1.cflag[cindex_1.cevbal - 1] = TRUE_;
  787. return ret_val;
  788. /* O26-- SAFE */
  789. L42000:
  790. i = 0;
  791. /* !ASSUME UNPROCESSED. */
  792. if (prsvec_1.prsa == vindex_1.takew) {
  793. i = 251;
  794. }
  795. /* !TAKE? */
  796. if (prsvec_1.prsa == vindex_1.openw && findex_1.safef) {
  797. i = 253;
  798. }
  799. /* !OPEN AFTER BLAST? */
  800. if (prsvec_1.prsa == vindex_1.openw && ! findex_1.safef) {
  801. i = 254;
  802. }
  803. /* !OPEN BEFORE BLAST? */
  804. if (prsvec_1.prsa == vindex_1.closew && findex_1.safef) {
  805. i = 253;
  806. }
  807. /* !CLOSE AFTER? */
  808. if (prsvec_1.prsa == vindex_1.closew && ! findex_1.safef) {
  809. i = 255;
  810. }
  811. if (i == 0) {
  812. goto L10;
  813. }
  814. rspeak_(i);
  815. return ret_val;
  816. /* O27-- FUSE */
  817. L43000:
  818. if (prsvec_1.prsa != vindex_1.burnw) {
  819. goto L10;
  820. }
  821. /* !BURN? */
  822. rspeak_(256);
  823. cevent_1.ctick[cindex_1.cevfus - 1] = 2;
  824. /* !START COUNTDOWN. */
  825. return ret_val;
  826. /* O28-- GNOME */
  827. L44000:
  828. if (prsvec_1.prsa != vindex_1.givew && prsvec_1.prsa != vindex_1.throww) {
  829. goto L44500;
  830. }
  831. if (objcts_1.otval[prsvec_1.prso - 1] == 0) {
  832. goto L44100;
  833. }
  834. /* !TREASURE? */
  835. rspsub_(257, odo2);
  836. /* !YES, GET DOOR. */
  837. newsta_(prsvec_1.prso, 0, 0, 0, 0);
  838. newsta_(oindex_1.gnome, 0, 0, 0, 0);
  839. /* !VANISH GNOME. */
  840. findex_1.gnodrf = TRUE_;
  841. return ret_val;
  842. L44100:
  843. rspsub_(258, odo2);
  844. /* !NO, LOSE OBJECT. */
  845. newsta_(prsvec_1.prso, 0, 0, 0, 0);
  846. return ret_val;
  847. L44500:
  848. rspeak_(259);
  849. /* !NERVOUS GNOME. */
  850. if (! findex_1.gnomef) {
  851. cevent_1.ctick[cindex_1.cevgno - 1] = 5;
  852. }
  853. /* !SCHEDULE BYEBYE. */
  854. findex_1.gnomef = TRUE_;
  855. return ret_val;
  856. /* O29-- COKE BOTTLES */
  857. L46000:
  858. if (prsvec_1.prsa != vindex_1.throww && prsvec_1.prsa != vindex_1.mungw) {
  859. goto L10;
  860. }
  861. newsta_(prsvec_1.prso, 262, 0, 0, 0);
  862. /* !MUNG BOTTLES. */
  863. return ret_val;
  864. /* SOBJS, PAGE 11 */
  865. /* O30-- ROBOT */
  866. L53000:
  867. if (prsvec_1.prsa != vindex_1.givew) {
  868. goto L53200;
  869. }
  870. /* !GIVE? */
  871. newsta_(prsvec_1.prso, 0, 0, 0, aindex_1.arobot);
  872. /* !PUT ON ROBOT. */
  873. rspsub_(302, odo2);
  874. return ret_val;
  875. L53200:
  876. if (prsvec_1.prsa != vindex_1.mungw && prsvec_1.prsa != vindex_1.throww) {
  877. goto L10;
  878. }
  879. newsta_(oindex_1.robot, 285, 0, 0, 0);
  880. /* !KILL ROBOT. */
  881. return ret_val;
  882. /* O31-- GRUE */
  883. L56000:
  884. if (prsvec_1.prsa != vindex_1.examiw) {
  885. goto L56100;
  886. }
  887. /* !EXAMINE? */
  888. rspeak_(288);
  889. return ret_val;
  890. L56100:
  891. if (prsvec_1.prsa != vindex_1.findw) {
  892. goto L10;
  893. }
  894. /* !FIND? */
  895. rspeak_(289);
  896. return ret_val;
  897. } /* sobjs_ */