nobjs.for 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. C NOBJS- NEW OBJECTS PROCESSOR
  2. C OBJECTS IN THIS MODULE CANNOT CALL RMINFO, JIGSUP,
  3. C MAJOR VERBS, OR OTHER NON-RESIDENT SUBROUTINES
  4. C
  5. C COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142
  6. C ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED
  7. C WRITTEN BY R. M. SUPNIK
  8. C
  9. C DECLARATIONS
  10. C
  11. LOGICAL FUNCTION NOBJS(RI,ARG)
  12. IMPLICIT INTEGER (A-Z)
  13. LOGICAL QOPEN,MOVETO,F
  14. LOGICAL QHERE,OPNCLS,MIRPAN
  15. include 'parser.h'
  16. include 'gamestat.h'
  17. include 'state.h'
  18. include 'screen.h'
  19. include 'puzzle.h'
  20. C
  21. C MISCELLANEOUS VARIABLES
  22. C
  23. COMMON /HYPER/ HFACTR
  24. include 'rooms.h'
  25. include 'rflag.h'
  26. include 'rindex.h'
  27. include 'objects.h'
  28. include 'oflags.h'
  29. include 'oindex.h'
  30. include 'clock.h'
  31. include 'villians.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. C NOBJS, PAGE 2
  40. C
  41. IF(PRSO.NE.0) ODO2=ODESC2(PRSO)
  42. IF(PRSI.NE.0) ODI2=ODESC2(PRSI)
  43. AV=AVEHIC(WINNER)
  44. NOBJS=.TRUE.
  45. C
  46. GO TO (1000,2000,3000,4000,5000,6000,7000,8000,9000,
  47. & 10000,11000,12000,13000,14000,15000,16000,17000,
  48. & 18000,19000,20000,21000),
  49. & (RI-31)
  50. CALL BUG(6,RI)
  51. C
  52. C RETURN HERE TO DECLARE FALSE RESULT
  53. C
  54. 10 NOBJS=.FALSE.
  55. RETURN
  56. C
  57. C O32-- BILLS
  58. C
  59. 1000 IF(PRSA.NE.EATW) GO TO 1100
  60. C !EAT?
  61. CALL RSPEAK(639)
  62. C !JOKE.
  63. RETURN
  64. C
  65. 1100 IF(PRSA.EQ.BURNW) CALL RSPEAK(640)
  66. C !BURN? JOKE.
  67. GO TO 10
  68. C !LET IT BE HANDLED.
  69. C NOBJS, PAGE 3
  70. C
  71. C O33-- SCREEN OF LIGHT
  72. C
  73. 2000 TARGET=SCOL
  74. C !TARGET IS SCOL.
  75. 2100 IF(PRSO.NE.TARGET) GO TO 2400
  76. C !PRSO EQ TARGET?
  77. IF((PRSA.NE.PUSHW).AND.(PRSA.NE.MOVEW).AND.
  78. & (PRSA.NE.TAKEW).AND.(PRSA.NE.RUBW)) GO TO 2200
  79. CALL RSPEAK(673)
  80. C !HAND PASSES THRU.
  81. RETURN
  82. C
  83. 2200 IF((PRSA.NE.KILLW).AND.(PRSA.NE.ATTACW).AND.
  84. & (PRSA.NE.MUNGW)) GO TO 2400
  85. CALL RSPSUB(674,ODI2)
  86. C !PASSES THRU.
  87. RETURN
  88. C
  89. 2400 IF((PRSA.NE.THROWW).OR.(PRSI.NE.TARGET)) GO TO 10
  90. IF(HERE.EQ.BKBOX) GO TO 2600
  91. C !THRU SCOL?
  92. CALL NEWSTA(PRSO,0,BKBOX,0,0)
  93. C !NO, THRU WALL.
  94. CALL RSPSUB(675,ODO2)
  95. C !ENDS UP IN BOX ROOM.
  96. CTICK(CEVSCL)=0
  97. C !CANCEL ALARM.
  98. SCOLRM=0
  99. C !RESET SCOL ROOM.
  100. RETURN
  101. C
  102. 2600 IF(SCOLRM.EQ.0) GO TO 2900
  103. C !TRIED TO GO THRU?
  104. CALL NEWSTA(PRSO,0,SCOLRM,0,0)
  105. C !SUCCESS.
  106. CALL RSPSUB(676,ODO2)
  107. C !ENDS UP SOMEWHERE.
  108. CTICK(CEVSCL)=0
  109. C !CANCEL ALARM.
  110. SCOLRM=0
  111. C !RESET SCOL ROOM.
  112. RETURN
  113. C
  114. 2900 CALL RSPEAK(213)
  115. C !CANT DO IT.
  116. RETURN
  117. C NOBJS, PAGE 4
  118. C
  119. C O34-- GNOME OF ZURICH
  120. C
  121. 3000 IF((PRSA.NE.GIVEW).AND.(PRSA.NE.THROWW)) GO TO 3200
  122. IF(OTVAL(PRSO).NE.0) GO TO 3100
  123. C !THROW A TREASURE?
  124. CALL NEWSTA(PRSO,641,0,0,0)
  125. C !NO, GO POP.
  126. RETURN
  127. C
  128. 3100 CALL NEWSTA(PRSO,0,0,0,0)
  129. C !YES, BYE BYE TREASURE.
  130. CALL RSPSUB(642,ODO2)
  131. CALL NEWSTA(ZGNOM,0,0,0,0)
  132. C !BYE BYE GNOME.
  133. CTICK(CEVZGO)=0
  134. C !CANCEL EXIT.
  135. F=MOVETO(BKENT,WINNER)
  136. C !NOW IN BANK ENTRANCE.
  137. RETURN
  138. C
  139. 3200 IF((PRSA.NE.ATTACW).AND.(PRSA.NE.KILLW).AND.
  140. & (PRSA.NE.MUNGW)) GO TO 3300
  141. CALL NEWSTA(ZGNOM,643,0,0,0)
  142. C !VANISH GNOME.
  143. CTICK(CEVZGO)=0
  144. C !CANCEL EXIT.
  145. RETURN
  146. C
  147. 3300 CALL RSPEAK(644)
  148. C !GNOME IS IMPATIENT.
  149. RETURN
  150. C
  151. C O35-- EGG
  152. C
  153. 4000 IF((PRSA.NE.OPENW).OR.(PRSO.NE.EGG)) GO TO 4500
  154. IF(.NOT.QOPEN(EGG)) GO TO 4100
  155. C !OPEN ALREADY?
  156. CALL RSPEAK(649)
  157. C !YES.
  158. RETURN
  159. C
  160. 4100 IF(PRSI.NE.0) GO TO 4200
  161. C !WITH SOMETHING?
  162. CALL RSPEAK(650)
  163. C !NO, CANT.
  164. RETURN
  165. C
  166. 4200 IF(PRSI.NE.HANDS) GO TO 4300
  167. C !WITH HANDS?
  168. CALL RSPEAK(651)
  169. C !NOT RECOMMENDED.
  170. RETURN
  171. C
  172. 4300 I=652
  173. C !MUNG MESSAGE.
  174. IF((IAND(OFLAG1(PRSI),TOOLBT).NE.0).OR.
  175. & (IAND(OFLAG2(PRSI),WEAPBT).NE.0)) GO TO 4600
  176. I=653
  177. C !NOVELTY 1.
  178. IF(IAND(OFLAG2(PRSO),FITEBT).NE.0) I=654
  179. OFLAG2(PRSO)=IOR(OFLAG2(PRSO),FITEBT)
  180. CALL RSPSUB(I,ODI2)
  181. RETURN
  182. C
  183. 4500 IF((PRSA.NE.OPENW).AND.(PRSA.NE.MUNGW)) GO TO 4800
  184. I=655
  185. C !YOU BLEW IT.
  186. 4600 CALL NEWSTA(BEGG,I,OROOM(EGG),OCAN(EGG),OADV(EGG))
  187. CALL NEWSTA(EGG,0,0,0,0)
  188. C !VANISH EGG.
  189. OTVAL(BEGG)=2
  190. C !BAD EGG HAS VALUE.
  191. IF(OCAN(CANAR).NE.EGG) GO TO 4700
  192. C !WAS CANARY INSIDE?
  193. CALL RSPEAK(ODESCO(BCANA))
  194. C !YES, DESCRIBE RESULT.
  195. OTVAL(BCANA)=1
  196. RETURN
  197. C
  198. 4700 CALL NEWSTA(BCANA,0,0,0,0)
  199. C !NO, VANISH IT.
  200. RETURN
  201. C
  202. 4800 IF((PRSA.NE.DROPW).OR.(HERE.NE.MTREE)) GO TO 10
  203. CALL NEWSTA(BEGG,658,FORE3,0,0)
  204. C !DROPPED EGG.
  205. CALL NEWSTA(EGG,0,0,0,0)
  206. OTVAL(BEGG)=2
  207. IF(OCAN(CANAR).NE.EGG) GO TO 4700
  208. OTVAL(BCANA)=1
  209. C !BAD CANARY.
  210. RETURN
  211. C NOBJS, PAGE 5
  212. C
  213. C O36-- CANARIES, GOOD AND BAD
  214. C
  215. 5000 IF(PRSA.NE.WINDW) GO TO 10
  216. C !WIND EM UP?
  217. IF(PRSO.EQ.CANAR) GO TO 5100
  218. C !RIGHT ONE?
  219. CALL RSPEAK(645)
  220. C !NO, BAD NEWS.
  221. RETURN
  222. C
  223. 5100 IF(.NOT.SINGSF.AND.((HERE.EQ.MTREE).OR.
  224. & ((HERE.GE.FORE1).AND.(HERE.LT.CLEAR))))
  225. & GO TO 5200
  226. CALL RSPEAK(646)
  227. C !NO, MEDIOCRE NEWS.
  228. RETURN
  229. C
  230. 5200 SINGSF=.TRUE.
  231. C !SANG SONG.
  232. I=HERE
  233. IF(I.EQ.MTREE) I=FORE3
  234. C !PLACE BAUBLE.
  235. CALL NEWSTA(BAUBL,647,I,0,0)
  236. RETURN
  237. C
  238. C O37-- WHITE CLIFFS
  239. C
  240. 6000 IF((PRSA.NE.CLMBW).AND.(PRSA.NE.CLMBUW).AND.
  241. & (PRSA.NE.CLMBDW)) GO TO 10
  242. CALL RSPEAK(648)
  243. C !OH YEAH?
  244. RETURN
  245. C
  246. C O38-- WALL
  247. C
  248. 7000 IF((IABS(HERE-MLOC).NE.1).OR.(MRHERE(HERE).NE.0).OR.
  249. & (PRSA.NE.PUSHW)) GO TO 7100
  250. CALL RSPEAK(860)
  251. C !PUSHED MIRROR WALL.
  252. RETURN
  253. C
  254. 7100 IF(IAND(RFLAG(HERE),RNWALL).EQ.0) GO TO 10
  255. CALL RSPEAK(662)
  256. C !NO WALL.
  257. RETURN
  258. C NOBJS, PAGE 6
  259. C
  260. C O39-- SONG BIRD GLOBAL
  261. C
  262. 8000 IF(PRSA.NE.FINDW) GO TO 8100
  263. C !FIND?
  264. CALL RSPEAK(666)
  265. RETURN
  266. C
  267. 8100 IF(PRSA.NE.EXAMIW) GO TO 10
  268. C !EXAMINE?
  269. CALL RSPEAK(667)
  270. RETURN
  271. C
  272. C O40-- PUZZLE/SCOL WALLS
  273. C
  274. 9000 IF(HERE.NE.CPUZZ) GO TO 9500
  275. C !PUZZLE WALLS?
  276. IF(PRSA.NE.PUSHW) GO TO 10
  277. C !PUSH?
  278. DO 9100 I=1,8,2
  279. C !LOCATE WALL.
  280. IF(PRSO.EQ.CPWL(I)) GO TO 9200
  281. 9100 CONTINUE
  282. CALL BUG(80,PRSO)
  283. C !WHAT?
  284. C
  285. 9200 J=CPWL(I+1)
  286. C !GET DIRECTIONAL OFFSET.
  287. NXT=CPHERE+J
  288. C !GET NEXT STATE.
  289. WL=CPVEC(NXT)
  290. C !GET C(NEXT STATE).
  291. GO TO (9300,9300,9300,9250,9350),(WL+4)
  292. C !PROCESS.
  293. C
  294. 9250 CALL RSPEAK(876)
  295. C !CLEAR CORRIDOR.
  296. RETURN
  297. C
  298. 9300 IF(CPVEC(NXT+J).EQ.0) GO TO 9400
  299. C !MOVABLE, ROOM TO MOVE?
  300. 9350 CALL RSPEAK(877)
  301. C !IMMOVABLE, NO ROOM.
  302. RETURN
  303. C
  304. 9400 I=878
  305. C !ASSUME FIRST PUSH.
  306. IF(CPUSHF) I=879
  307. C !NOT?
  308. CPUSHF=.TRUE.
  309. CPVEC(NXT+J)=WL
  310. C !MOVE WALL.
  311. CPVEC(NXT)=0
  312. C !VACATE NEXT STATE.
  313. CALL CPGOTO(NXT)
  314. C !ONWARD.
  315. CALL CPINFO(I,NXT)
  316. C !DESCRIBE.
  317. CALL PRINCR(.TRUE.,HERE)
  318. C !PRINT ROOMS CONTENTS.
  319. RFLAG(HERE)=IOR(RFLAG(HERE),RSEEN)
  320. RETURN
  321. C
  322. 9500 IF(HERE.NE.SCOLAC) GO TO 9700
  323. C !IN SCOL ACTIVE ROOM?
  324. DO 9600 I=1,12,3
  325. TARGET=SCOLWL(I+1)
  326. C !ASSUME TARGET.
  327. IF(SCOLWL(I).EQ.HERE) GO TO 2100
  328. C !TREAT IF FOUND.
  329. 9600 CONTINUE
  330. C
  331. 9700 IF(HERE.NE.BKBOX) GO TO 10
  332. C !IN BOX ROOM?
  333. TARGET=WNORT
  334. GO TO 2100
  335. C NOBJS, PAGE 7
  336. C
  337. C O41-- SHORT POLE
  338. C
  339. 10000 IF(PRSA.NE.RAISEW) GO TO 10100
  340. C !LIFT?
  341. I=749
  342. C !ASSUME UP.
  343. IF(POLEUF.EQ.2) I=750
  344. C !ALREADY UP?
  345. CALL RSPEAK(I)
  346. POLEUF=2
  347. C !POLE IS RAISED.
  348. RETURN
  349. C
  350. 10100 IF((PRSA.NE.LOWERW).AND.(PRSA.NE.PUSHW)) GO TO 10
  351. IF(POLEUF.NE.0) GO TO 10200
  352. C !ALREADY LOWERED?
  353. CALL RSPEAK(751)
  354. C !CANT DO IT.
  355. RETURN
  356. C
  357. 10200 IF(MOD(MDIR,180).NE.0) GO TO 10300
  358. C !MIRROR N-S?
  359. POLEUF=0
  360. C !YES, LOWER INTO
  361. CALL RSPEAK(752)
  362. C !CHANNEL.
  363. RETURN
  364. C
  365. 10300 IF((MDIR.NE.270).OR.(MLOC.NE.MRB)) GO TO 10400
  366. POLEUF=0
  367. C !LOWER INTO HOLE.
  368. CALL RSPEAK(753)
  369. RETURN
  370. C
  371. 10400 CALL RSPEAK(753+POLEUF)
  372. C !POLEUF = 1 OR 2.
  373. POLEUF=1
  374. C !NOW ON FLOOR.
  375. RETURN
  376. C
  377. C O42-- MIRROR SWITCH
  378. C
  379. 11000 IF(PRSA.NE.PUSHW) GO TO 10
  380. C !PUSH?
  381. IF(MRPSHF) GO TO 11300
  382. C !ALREADY PUSHED?
  383. CALL RSPEAK(756)
  384. C !BUTTON GOES IN.
  385. DO 11100 I=1,OLNT
  386. C !BLOCKED?
  387. IF(QHERE(I,MREYE).AND.(I.NE.RBEAM)) GO TO 11200
  388. 11100 CONTINUE
  389. CALL RSPEAK(757)
  390. C !NOTHING IN BEAM.
  391. RETURN
  392. C
  393. 11200 CFLAG(CEVMRS)=.TRUE.
  394. C !MIRROR OPENS.
  395. CTICK(CEVMRS)=7
  396. MRPSHF=.TRUE.
  397. MROPNF=.TRUE.
  398. RETURN
  399. C
  400. 11300 CALL RSPEAK(758)
  401. C !MIRROR ALREADYOPEN.
  402. RETURN
  403. C NOBJS, PAGE 8
  404. C
  405. C O43-- BEAM FUNCTION
  406. C
  407. 12000 IF((PRSA.NE.TAKEW).OR.(PRSO.NE.RBEAM)) GO TO 12100
  408. CALL RSPEAK(759)
  409. C !TAKE BEAM, JOKE.
  410. RETURN
  411. C
  412. 12100 I=PRSO
  413. C !ASSUME BLK WITH DIROBJ.
  414. IF((PRSA.EQ.PUTW).AND.(PRSI.EQ.RBEAM)) GO TO 12200
  415. IF((PRSA.NE.MUNGW).OR.(PRSO.NE.RBEAM).OR.
  416. & (PRSI.EQ.0)) GO TO 10
  417. I=PRSI
  418. 12200 IF(OADV(I).NE.WINNER) GO TO 12300
  419. C !CARRYING?
  420. CALL NEWSTA(I,0,HERE,0,0)
  421. C !DROP OBJ.
  422. CALL RSPSUB(760,ODESC2(I))
  423. RETURN
  424. C
  425. 12300 J=761
  426. C !ASSUME NOT IN ROOM.
  427. IF(QHERE(J,HERE)) I=762
  428. C !IN ROOM?
  429. CALL RSPSUB(J,ODESC2(I))
  430. C !DESCRIBE.
  431. RETURN
  432. C
  433. C O44-- BRONZE DOOR
  434. C
  435. 13000 IF((HERE.EQ.NCELL).OR.((LCELL.EQ.4).AND.
  436. & ((HERE.EQ.CELL).OR.(HERE.EQ.SCORR))))
  437. & GO TO 13100
  438. CALL RSPEAK(763)
  439. C !DOOR NOT THERE.
  440. RETURN
  441. C
  442. 13100 IF(.NOT.OPNCLS(ODOOR,764,765)) GO TO 10
  443. C !OPEN/CLOSE?
  444. IF((HERE.EQ.NCELL).AND.QOPEN(ODOOR))
  445. & CALL RSPEAK(766)
  446. RETURN
  447. C
  448. C O45-- QUIZ DOOR
  449. C
  450. 14000 IF((PRSA.NE.OPENW).AND.(PRSA.NE.CLOSEW)) GO TO 14100
  451. CALL RSPEAK(767)
  452. C !DOOR WONT MOVE.
  453. RETURN
  454. C
  455. 14100 IF(PRSA.NE.KNOCKW) GO TO 10
  456. C !KNOCK?
  457. IF(INQSTF) GO TO 14200
  458. C !TRIED IT ALREADY?
  459. INQSTF=.TRUE.
  460. C !START INQUISITION.
  461. CFLAG(CEVINQ)=.TRUE.
  462. CTICK(CEVINQ)=2
  463. QUESNO=RND(8)
  464. C !SELECT QUESTION.
  465. NQATT=0
  466. CORRCT=0
  467. CALL RSPEAK(768)
  468. C !ANNOUNCE RULES.
  469. CALL RSPEAK(769)
  470. CALL RSPEAK(770+QUESNO)
  471. C !ASK QUESTION.
  472. RETURN
  473. C
  474. 14200 CALL RSPEAK(798)
  475. C !NO REPLY.
  476. RETURN
  477. C
  478. C O46-- LOCKED DOOR
  479. C
  480. 15000 IF(PRSA.NE.OPENW) GO TO 10
  481. C !OPEN?
  482. CALL RSPEAK(778)
  483. C !CANT.
  484. RETURN
  485. C
  486. C O47-- CELL DOOR
  487. C
  488. 16000 NOBJS=OPNCLS(CDOOR,779,780)
  489. C !OPEN/CLOSE?
  490. RETURN
  491. C NOBJS, PAGE 9
  492. C
  493. C O48-- DIALBUTTON
  494. C
  495. 17000 IF(PRSA.NE.PUSHW) GO TO 10
  496. C !PUSH?
  497. CALL RSPEAK(809)
  498. C !CLICK.
  499. IF(QOPEN(CDOOR)) CALL RSPEAK(810)
  500. C !CLOSE CELL DOOR.
  501. C
  502. DO 17100 I=1,OLNT
  503. C !RELOCATE OLD TO HYPER.
  504. IF((OROOM(I).EQ.CELL).AND.(IAND(OFLAG1(I),DOORBT).EQ.0))
  505. & CALL NEWSTA(I,0,LCELL*HFACTR,0,0)
  506. IF(OROOM(I).EQ.(PNUMB*HFACTR))
  507. & CALL NEWSTA(I,0,CELL,0,0)
  508. 17100 CONTINUE
  509. C
  510. OFLAG2(ODOOR)=IAND(OFLAG2(ODOOR), not(OPENBT))
  511. OFLAG2(CDOOR)=IAND(OFLAG2(CDOOR), not(OPENBT))
  512. OFLAG1(ODOOR)=IAND(OFLAG1(ODOOR), not(VISIBT))
  513. IF(PNUMB.EQ.4) OFLAG1(ODOOR)=IOR(OFLAG1(ODOOR),VISIBT)
  514. C
  515. IF(AROOM(PLAYER).NE.CELL) GO TO 17400
  516. C !PLAYER IN CELL?
  517. IF(LCELL.NE.4) GO TO 17200
  518. C !IN RIGHT CELL?
  519. OFLAG1(ODOOR)=IOR(OFLAG1(ODOOR), VISIBT)
  520. F=MOVETO(NCELL,PLAYER)
  521. C !YES, MOVETO NCELL.
  522. GO TO 17400
  523. 17200 F=MOVETO(PCELL,PLAYER)
  524. C !NO, MOVETO PCELL.
  525. C
  526. 17400 LCELL=PNUMB
  527. RETURN
  528. C NOBJS, PAGE 10
  529. C
  530. C O49-- DIAL INDICATOR
  531. C
  532. 18000 IF(PRSA.NE.SPINW) GO TO 18100
  533. C !SPIN?
  534. PNUMB=RND(8)+1
  535. C !WHEE
  536. C !
  537. CALL RSPSUB(797,712+PNUMB)
  538. RETURN
  539. C
  540. 18100 IF((PRSA.NE.MOVEW).AND.(PRSA.NE.PUTW).AND.
  541. & (PRSA.NE.TRNTOW)) GO TO 10
  542. IF(PRSI.NE.0) GO TO 18200
  543. C !TURN DIAL TO X?
  544. CALL RSPEAK(806)
  545. C !MUST SPECIFY.
  546. RETURN
  547. C
  548. 18200 IF((PRSI.GE.NUM1).AND.(PRSI.LE.NUM8)) GO TO 18300
  549. CALL RSPEAK(807)
  550. C !MUST BE DIGIT.
  551. RETURN
  552. C
  553. 18300 PNUMB=PRSI-NUM1+1
  554. C !SET UP NEW.
  555. CALL RSPSUB(808,712+PNUMB)
  556. RETURN
  557. C
  558. C O50-- GLOBAL MIRROR
  559. C
  560. 19000 NOBJS=MIRPAN(832,.FALSE.)
  561. RETURN
  562. C
  563. C O51-- GLOBAL PANEL
  564. C
  565. 20000 IF(HERE.NE.FDOOR) GO TO 20100
  566. C !AT FRONT DOOR?
  567. IF((PRSA.NE.OPENW).AND.(PRSA.NE.CLOSEW)) GO TO 10
  568. CALL RSPEAK(843)
  569. C !PANEL IN DOOR, NOGO.
  570. RETURN
  571. C
  572. 20100 NOBJS=MIRPAN(838,.TRUE.)
  573. RETURN
  574. C
  575. C O52-- PUZZLE ROOM SLIT
  576. C
  577. 21000 IF((PRSA.NE.PUTW).OR.(PRSI.NE.CSLIT)) GO TO 10
  578. IF(PRSO.NE.GCARD) GO TO 21100
  579. C !PUT CARD IN SLIT?
  580. CALL NEWSTA(PRSO,863,0,0,0)
  581. C !KILL CARD.
  582. CPOUTF=.TRUE.
  583. C !OPEN DOOR.
  584. OFLAG1(STLDR)=IAND(OFLAG1(STLDR),not(VISIBT))
  585. RETURN
  586. C
  587. 21100 IF((IAND(OFLAG1(PRSO),VICTBT).EQ.0).AND.
  588. & (IAND(OFLAG2(PRSO),VILLBT).EQ.0)) GO TO 21200
  589. CALL RSPEAK(RND(5)+552)
  590. C !JOKE FOR VILL, VICT.
  591. RETURN
  592. C
  593. 21200 CALL NEWSTA(PRSO,0,0,0,0)
  594. C !KILL OBJECT.
  595. CALL RSPSUB(864,ODO2)
  596. C !DESCRIBE.
  597. RETURN
  598. C
  599. END
  600. C MIRPAN-- PROCESSOR FOR GLOBAL MIRROR/PANEL
  601. C
  602. C DECLARATIONS
  603. C
  604. LOGICAL FUNCTION MIRPAN(ST,PNF)
  605. IMPLICIT INTEGER(A-Z)
  606. LOGICAL PNF
  607. include 'gamestat.h'
  608. include 'parser.h'
  609. include 'verbs.h'
  610. include 'flags.h'
  611. C MIRPAN, PAGE 2
  612. C
  613. MIRPAN=.TRUE.
  614. NUM=MRHERE(HERE)
  615. C !GET MIRROR NUM.
  616. IF(NUM.NE.0) GO TO 100
  617. C !ANY HERE?
  618. CALL RSPEAK(ST)
  619. C !NO, LOSE.
  620. RETURN
  621. C
  622. 100 MRBF=0
  623. C !ASSUME MIRROR OK.
  624. IF(((NUM.EQ.1).AND..NOT.MR1F).OR.
  625. & ((NUM.EQ.2).AND..NOT.MR2F)) MRBF=1
  626. IF((PRSA.NE.MOVEW).AND.(PRSA.NE.OPENW)) GO TO 200
  627. CALL RSPEAK(ST+1)
  628. C !CANT OPEN OR MOVE.
  629. RETURN
  630. C
  631. 200 IF(PNF.OR.((PRSA.NE.LOOKIW).AND.(PRSA.NE.EXAMIW).AND.
  632. & (PRSA.NE.LOOKW))) GO TO 300
  633. CALL RSPEAK(844+MRBF)
  634. C !LOOK IN MIRROR.
  635. RETURN
  636. C
  637. 300 IF(PRSA.NE.MUNGW) GO TO 400
  638. C !BREAK?
  639. CALL RSPEAK(ST+2+MRBF)
  640. C !DO IT.
  641. IF((NUM.EQ.1).AND..NOT.PNF) MR1F=.FALSE.
  642. IF((NUM.EQ.2).AND..NOT.PNF) MR2F=.FALSE.
  643. RETURN
  644. C
  645. 400 IF(PNF.OR.(MRBF.EQ.0)) GO TO 500
  646. C !BROKEN MIRROR?
  647. CALL RSPEAK(846)
  648. RETURN
  649. C
  650. 500 IF(PRSA.NE.PUSHW) GO TO 600
  651. C !PUSH?
  652. CALL RSPEAK(ST+3+NUM)
  653. RETURN
  654. C
  655. 600 MIRPAN=.FALSE.
  656. C !CANT HANDLE IT.
  657. RETURN
  658. C
  659. END