objcts.for 16 KB

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