sverbs.for 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. C SVERBS- SIMPLE VERBS PROCESSOR
  2. C ALL VERBS IN THIS ROUTINE MUST BE INDEPENDANT
  3. C OF OBJECT ACTIONS
  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 SVERBS(RI)
  12. IMPLICIT INTEGER (A-Z)
  13. LOGICAL MOVETO,YESNO
  14. LOGICAL RMDESC
  15. LOGICAL QOPEN
  16. LOGICAL FINDXT,QHERE,F
  17. INTEGER JOKES(25)
  18. CHARACTER ANSSTR(78)
  19. CHARACTER P1(6),P2(6),CH(6)
  20. INTEGER ANSWER(28)
  21. include 'parser.h'
  22. include 'gamestat.h'
  23. include 'state.h'
  24. include 'screen.h'
  25. C
  26. C MISCELLANEOUS VARIABLES
  27. C
  28. CHARACTER VEDIT
  29. COMMON /VERS/ VMAJ,VMIN,VEDIT
  30. include 'io.h'
  31. include 'rooms.h'
  32. include 'rflag.h'
  33. include 'rindex.h'
  34. include 'exits.h'
  35. include 'curxt.h'
  36. include 'xpars.h'
  37. include 'xsrch.h'
  38. include 'objects.h'
  39. include 'oflags.h'
  40. include 'oindex.h'
  41. include 'clock.h'
  42. include 'advers.h'
  43. include 'verbs.h'
  44. include 'flags.h'
  45. C
  46. C FUNCTIONS AND DATA
  47. C
  48. QOPEN(R)=IAND(OFLAG2(R),OPENBT).NE.0
  49. DATA MXNOP/39/,MXJOKE/64/
  50. DATA JOKES/4,5,3,304,305,306,307,308,309,310,311,312,
  51. & 313,5314,5319,324,325,883,884,120,120,0,0,0,0/
  52. DATA ANSWER/0,6,1,6,2,5,3,5,4,3,4,6,4,6,4,5,
  53. & 5,5,5,4,5,6,6,10,7,4,7,6/
  54. DATA ANSSTR/'T','E','M','P','L','E',
  55. & 'F','O','R','E','S','T',
  56. & '3','0','0','0','3',
  57. & 'F','L','A','S','K',
  58. & 'R','U','B',
  59. & 'F','O','N','D','L','E',
  60. & 'C','A','R','R','E','S',
  61. & 'T','O','U','C','H',
  62. & 'B','O','N','E','S',
  63. & 'B','O','D','Y',
  64. & 'S','K','E','L','E','T',
  65. & 'R','U','S','T','Y','K','N','I','F','E',
  66. & 'N','O','N','E',
  67. & 'N','O','W','H','E','R','\0'/
  68. C SVERBS, PAGE 2
  69. C
  70. SVERBS=.TRUE.
  71. C !ASSUME WINS.
  72. IF(PRSO.NE.0) ODO2=ODESC2(PRSO)
  73. C !SET UP DESCRIPTORS.
  74. IF(PRSI.NE.0) ODI2=ODESC2(PRSI)
  75. C
  76. IF(RI.EQ.0) CALL BUG(7,RI)
  77. C !ZERO IS VERBOTEN.
  78. IF(RI.LE.MXNOP) RETURN
  79. C !NOP?
  80. IF(RI.LE.MXJOKE) GO TO 100
  81. C !JOKE?
  82. GO TO (65000,66000,67000,68000,69000,
  83. & 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,
  84. & 11000,12000,13000,14000,15000,16000,17000,18000,19000,20000,
  85. & 21000,22000,23000,24000,25000,26000,27000),
  86. & (RI-MXJOKE)
  87. CALL BUG(7,RI)
  88. C
  89. C ALL VERB PROCESSORS RETURN HERE TO DECLARE FAILURE.
  90. C
  91. 10 SVERBS=.FALSE.
  92. C !LOSE.
  93. RETURN
  94. C
  95. C JOKE PROCESSOR.
  96. C FIND PROPER ENTRY IN JOKES, USE IT TO SELECT STRING TO PRINT.
  97. C
  98. 100 I=JOKES(RI-MXNOP)
  99. C !GET TABLE ENTRY.
  100. J=I/1000
  101. C !ISOLATE # STRINGS.
  102. IF(J.NE.0) I=MOD(I,1000)+RND(J)
  103. C !IF RANDOM, CHOOSE.
  104. CALL RSPEAK(I)
  105. C !PRINT JOKE.
  106. RETURN
  107. C SVERBS, PAGE 2A
  108. C
  109. C V65-- ROOM
  110. C
  111. 65000 SVERBS=RMDESC(2)
  112. C !DESCRIBE ROOM ONLY.
  113. RETURN
  114. C
  115. C V66-- OBJECTS
  116. C
  117. 66000 SVERBS=RMDESC(1)
  118. C !DESCRIBE OBJ ONLY.
  119. IF(.NOT.TELFLG) CALL RSPEAK(138)
  120. C !NO OBJECTS.
  121. RETURN
  122. C
  123. C V67-- RNAME
  124. C
  125. 67000 CALL RSPEAK(RDESC2-HERE)
  126. C !SHORT ROOM NAME.
  127. RETURN
  128. C
  129. C V68-- RESERVED
  130. C
  131. 68000 RETURN
  132. C
  133. C V69-- RESERVED
  134. C
  135. 69000 RETURN
  136. C SVERBS, PAGE 3
  137. C
  138. C V70-- BRIEF. SET FLAG.
  139. C
  140. 1000 BRIEFF=.TRUE.
  141. C !BRIEF DESCRIPTIONS.
  142. SUPERF=.FALSE.
  143. CALL RSPEAK(326)
  144. RETURN
  145. C
  146. C V71-- VERBOSE. CLEAR FLAGS.
  147. C
  148. 2000 BRIEFF=.FALSE.
  149. C !LONG DESCRIPTIONS.
  150. SUPERF=.FALSE.
  151. CALL RSPEAK(327)
  152. RETURN
  153. C
  154. C V72-- SUPERBRIEF. SET FLAG.
  155. C
  156. 3000 SUPERF=.TRUE.
  157. CALL RSPEAK(328)
  158. RETURN
  159. C
  160. C V73-- STAY (USED IN ENDGAME).
  161. C
  162. 4000 IF(WINNER.NE.AMASTR) GO TO 4100
  163. C !TELL MASTER, STAY.
  164. CALL RSPEAK(781)
  165. C !HE DOES.
  166. CTICK(CEVFOL)=0
  167. C !NOT FOLLOWING.
  168. RETURN
  169. C
  170. 4100 IF(WINNER.EQ.PLAYER) CALL RSPEAK(664)
  171. C !JOKE.
  172. RETURN
  173. C
  174. C V74-- VERSION. PRINT INFO.
  175. C
  176. 5000 WRITE(OUTCH,5010) VMAJ,VMIN,VEDIT
  177. 5010 FORMAT(' V',I1,'.',I2,A1)
  178. TELFLG=.TRUE.
  179. RETURN
  180. C
  181. C V75-- SWIM. ALWAYS A JOKE.
  182. C
  183. 6000 I=330
  184. C !ASSUME WATER.
  185. IF(IAND(RFLAG(HERE),(RWATER+RFILL)).EQ.0)
  186. & I=331+RND(3)
  187. CALL RSPEAK(I)
  188. RETURN
  189. C
  190. C V76-- GERONIMO. IF IN BARREL, FATAL, ELSE JOKE.
  191. C
  192. 7000 IF(HERE.EQ.MBARR) GO TO 7100
  193. C !IN BARREL?
  194. CALL RSPEAK(334)
  195. C !NO, JOKE.
  196. RETURN
  197. C
  198. 7100 CALL JIGSUP(335)
  199. C !OVER FALLS.
  200. RETURN
  201. C
  202. C V77-- SINBAD ET AL. CHASE CYCLOPS, ELSE JOKE.
  203. C
  204. 8000 IF((HERE.EQ.MCYCL).AND.QHERE(CYCLO,HERE)) GO TO 8100
  205. CALL RSPEAK(336)
  206. C !NOT HERE, JOKE.
  207. RETURN
  208. C
  209. 8100 CALL NEWSTA(CYCLO,337,0,0,0)
  210. C !CYCLOPS FLEES.
  211. CYCLOF=.TRUE.
  212. C !SET ALL FLAGS.
  213. MAGICF=.TRUE.
  214. OFLAG2(CYCLO)=IAND(OFLAG2(CYCLO), not(FITEBT))
  215. RETURN
  216. C
  217. C V78-- WELL. OPEN DOOR, ELSE JOKE.
  218. C
  219. 9000 IF(RIDDLF.OR.(HERE.NE.RIDDL)) GO TO 9100
  220. C !IN RIDDLE ROOM?
  221. RIDDLF=.TRUE.
  222. C !YES, SOLVED IT.
  223. CALL RSPEAK(338)
  224. RETURN
  225. C
  226. 9100 CALL RSPEAK(339)
  227. C !WELL, WHAT?
  228. RETURN
  229. C
  230. C V79-- PRAY. IF IN TEMP2, POOF
  231. C !
  232. C
  233. 10000 IF(HERE.NE.TEMP2) GO TO 10050
  234. C !IN TEMPLE?
  235. IF(MOVETO(FORE1,WINNER)) GO TO 10100
  236. C !FORE1 STILL THERE?
  237. 10050 CALL RSPEAK(340)
  238. C !JOKE.
  239. RETURN
  240. C
  241. 10100 F=RMDESC(3)
  242. C !MOVED, DESCRIBE.
  243. RETURN
  244. C
  245. C V80-- TREASURE. IF IN TEMP1, POOF
  246. C !
  247. C
  248. 11000 IF(HERE.NE.TEMP1) GO TO 11050
  249. C !IN TEMPLE?
  250. IF(MOVETO(TREAS,WINNER)) GO TO 10100
  251. C !TREASURE ROOM THERE?
  252. 11050 CALL RSPEAK(341)
  253. C !NOTHING HAPPENS.
  254. RETURN
  255. C
  256. C V81-- TEMPLE. IF IN TREAS, POOF
  257. C !
  258. C
  259. 12000 IF(HERE.NE.TREAS) GO TO 12050
  260. C !IN TREASURE?
  261. IF(MOVETO(TEMP1,WINNER)) GO TO 10100
  262. C !TEMP1 STILL THERE?
  263. 12050 CALL RSPEAK(341)
  264. C !NOTHING HAPPENS.
  265. RETURN
  266. C
  267. C V82-- BLAST. USUALLY A JOKE.
  268. C
  269. 13000 I=342
  270. C !DONT UNDERSTAND.
  271. IF(PRSO.EQ.SAFE) I=252
  272. C !JOKE FOR SAFE.
  273. CALL RSPEAK(I)
  274. RETURN
  275. C
  276. C V83-- SCORE. PRINT SCORE.
  277. C
  278. 14000 CALL SCORE(.FALSE.)
  279. RETURN
  280. C
  281. C V84-- QUIT. FINISH OUT THE GAME.
  282. C
  283. 15000 CALL SCORE(.TRUE.)
  284. C !TELLL SCORE.
  285. IF(.NOT.YESNO(343,0,0)) RETURN
  286. C !ASK FOR Y/N DECISION.
  287. CLOSE (DBCH)
  288. CALL EXIT
  289. C !BYE.
  290. C SVERBS, PAGE 4
  291. C
  292. C V85-- FOLLOW (USED IN ENDGAME)
  293. C
  294. 16000 IF(WINNER.NE.AMASTR) RETURN
  295. C !TELL MASTER, FOLLOW.
  296. CALL RSPEAK(782)
  297. CTICK(CEVFOL)=-1
  298. C !STARTS FOLLOWING.
  299. RETURN
  300. C
  301. C V86-- WALK THROUGH
  302. C
  303. 17000 IF((SCOLRM.EQ.0).OR.((PRSO.NE.SCOL).AND.
  304. & ((PRSO.NE.WNORT).OR.(HERE.NE.BKBOX)))) GO TO 17100
  305. SCOLAC=SCOLRM
  306. C !WALKED THRU SCOL.
  307. PRSO=0
  308. C !FAKE OUT FROMDR.
  309. CTICK(CEVSCL)=6
  310. C !START ALARM.
  311. CALL RSPEAK(668)
  312. C !DISORIENT HIM.
  313. F=MOVETO(SCOLRM,WINNER)
  314. C !INTO ROOM.
  315. F=RMDESC(3)
  316. C !DESCRIBE.
  317. RETURN
  318. C
  319. 17100 IF(HERE.NE.SCOLAC) GO TO 17300
  320. C !ON OTHER SIDE OF SCOL?
  321. DO 17200 I=1,12,3
  322. C !WALK THRU PROPER WALL?
  323. IF((SCOLWL(I).EQ.HERE).AND.(SCOLWL(I+1).EQ.PRSO))
  324. & GO TO 17500
  325. 17200 CONTINUE
  326. C
  327. 17300 IF(IAND(OFLAG1(PRSO),TAKEBT).NE.0) GO TO 17400
  328. I=669
  329. C !NO, JOKE.
  330. IF(PRSO.EQ.SCOL) I=670
  331. C !SPECIAL JOKE FOR SCOL.
  332. CALL RSPSUB(I,ODO2)
  333. RETURN
  334. C
  335. 17400 I=671
  336. C !JOKE.
  337. IF(OROOM(PRSO).NE.0) I=552+RND(5)
  338. C !SPECIAL JOKES IF CARRY.
  339. CALL RSPEAK(I)
  340. RETURN
  341. C
  342. 17500 PRSO=SCOLWL(I+2)
  343. C !THRU SCOL WALL...
  344. DO 17600 I=1,8,2
  345. C !FIND MATCHING ROOM.
  346. IF(PRSO.EQ.SCOLDR(I)) SCOLRM=SCOLDR(I+1)
  347. 17600 CONTINUE
  348. C !DECLARE NEW SCOLRM.
  349. CTICK(CEVSCL)=0
  350. C !CANCEL ALARM.
  351. CALL RSPEAK(668)
  352. C !DISORIENT HIM.
  353. F=MOVETO(BKBOX,WINNER)
  354. C !BACK IN BOX ROOM.
  355. F=RMDESC(3)
  356. RETURN
  357. C
  358. C V87-- RING. A JOKE.
  359. C
  360. 18000 I=359
  361. C !CANT RING.
  362. IF(PRSO.EQ.BELL) I=360
  363. C !DING, DONG.
  364. CALL RSPEAK(I)
  365. C !JOKE.
  366. RETURN
  367. C
  368. C V88-- BRUSH. JOKE WITH OBSCURE TRAP.
  369. C
  370. 19000 IF(PRSO.EQ.TEETH) GO TO 19100
  371. C !BRUSH TEETH?
  372. CALL RSPEAK(362)
  373. C !NO, JOKE.
  374. RETURN
  375. C
  376. 19100 IF(PRSI.NE.0) GO TO 19200
  377. C !WITH SOMETHING?
  378. CALL RSPEAK(363)
  379. C !NO, JOKE.
  380. RETURN
  381. C
  382. 19200 IF((PRSI.EQ.PUTTY).AND.(OADV(PUTTY).EQ.WINNER))
  383. & GO TO 19300
  384. CALL RSPSUB(364,ODI2)
  385. C !NO, JOKE.
  386. RETURN
  387. C
  388. 19300 CALL JIGSUP(365)
  389. C !YES, DEAD
  390. C !
  391. C !
  392. C !
  393. C !
  394. C !
  395. RETURN
  396. C SVERBS, PAGE 5
  397. C
  398. C V89-- DIG. UNLESS SHOVEL, A JOKE.
  399. C
  400. 20000 IF(PRSO.EQ.SHOVE) RETURN
  401. C !SHOVEL?
  402. I=392
  403. C !ASSUME TOOL.
  404. IF(IAND(OFLAG1(PRSO),TOOLBT).EQ.0) I=393
  405. CALL RSPSUB(I,ODO2)
  406. RETURN
  407. C
  408. C V90-- TIME. PRINT OUT DURATION OF GAME.
  409. C
  410. 21000 CALL GTTIME(K)
  411. C !GET PLAY TIME.
  412. I=K/60
  413. J=MOD(K,60)
  414. C
  415. WRITE(OUTCH,21010)
  416. IF(I.NE.0) WRITE(OUTCH,21011) I
  417. IF(I.GE.2) WRITE(OUTCH,21012)
  418. IF(I.EQ.1) WRITE(OUTCH,21013)
  419. IF(J.EQ.1) WRITE(OUTCH,21014) J
  420. IF(J.NE.1) WRITE(OUTCH,21015) J
  421. TELFLG=.TRUE.
  422. RETURN
  423. C
  424. 21010 FORMAT(' You have been playing Dungeon for ',$)
  425. 21011 FORMAT('+',I3,' hour',$)
  426. 21012 FORMAT('+s and ',$)
  427. 21013 FORMAT('+ and ',$)
  428. 21014 FORMAT('+',I2,' minute.')
  429. 21015 FORMAT('+',I2,' minutes.')
  430. C
  431. C V91-- LEAP. USUALLY A JOKE, WITH A CATCH.
  432. C
  433. 22000 IF(PRSO.EQ.0) GO TO 22200
  434. C !OVER SOMETHING?
  435. IF(QHERE(PRSO,HERE)) GO TO 22100
  436. C !HERE?
  437. CALL RSPEAK(447)
  438. C !NO, JOKE.
  439. RETURN
  440. C
  441. 22100 IF(IAND(OFLAG2(PRSO),VILLBT).EQ.0) GO TO 22300
  442. CALL RSPSUB(448,ODO2)
  443. C !CANT JUMP VILLAIN.
  444. RETURN
  445. C
  446. 22200 IF(.NOT.FINDXT(XDOWN,HERE)) GO TO 22300
  447. C !DOWN EXIT?
  448. IF((XTYPE.EQ.XNO).OR.((XTYPE.EQ.XCOND).AND.
  449. & .NOT.FLAGS(XFLAG))) GO TO 22400
  450. 22300 CALL RSPEAK(314+RND(5))
  451. C !WHEEEE
  452. C !
  453. RETURN
  454. C
  455. 22400 CALL JIGSUP(449+RND(4))
  456. C !FATAL LEAP.
  457. RETURN
  458. C SVERBS, PAGE 6
  459. C
  460. C V92-- LOCK.
  461. C
  462. 23000 IF((PRSO.EQ.GRATE).AND.(HERE.EQ.MGRAT))
  463. & GO TO 23200
  464. 23100 CALL RSPEAK(464)
  465. C !NOT LOCK GRATE.
  466. RETURN
  467. C
  468. 23200 GRUNLF=.FALSE.
  469. C !GRATE NOW LOCKED.
  470. CALL RSPEAK(214)
  471. TRAVEL(REXIT(HERE)+1)=214
  472. C !CHANGE EXIT STATUS.
  473. RETURN
  474. C
  475. C V93-- UNLOCK
  476. C
  477. 24000 IF((PRSO.NE.GRATE).OR.(HERE.NE.MGRAT))
  478. & GO TO 23100
  479. IF(PRSI.EQ.KEYS) GO TO 24200
  480. C !GOT KEYS?
  481. CALL RSPSUB(465,ODI2)
  482. C !NO, JOKE.
  483. RETURN
  484. C
  485. 24200 GRUNLF=.TRUE.
  486. C !UNLOCK GRATE.
  487. CALL RSPEAK(217)
  488. TRAVEL(REXIT(HERE)+1)=217
  489. C !CHANGE EXIT STATUS.
  490. RETURN
  491. C
  492. C V94-- DIAGNOSE.
  493. C
  494. 25000 I=FIGHTS(WINNER,.FALSE.)
  495. C !GET FIGHTS STRENGTH.
  496. J=ASTREN(WINNER)
  497. C !GET HEALTH.
  498. K=MIN0(I+J,4)
  499. C !GET STATE.
  500. IF(.NOT.CFLAG(CEVCUR)) J=0
  501. C !IF NO WOUNDS.
  502. L=MIN0(4,IABS(J))
  503. C !SCALE.
  504. CALL RSPEAK(473+L)
  505. C !DESCRIBE HEALTH.
  506. I=(30*(-J-1))+CTICK(CEVCUR)
  507. C !COMPUTE WAIT.
  508. C
  509. IF(J.NE.0) WRITE(OUTCH,25100) I
  510. 25100 FORMAT(' You will be cured after ',I3,' moves.')
  511. C
  512. CALL RSPEAK(478+K)
  513. C !HOW MUCH MORE?
  514. IF(DEATHS.NE.0) CALL RSPEAK(482+DEATHS)
  515. C !HOW MANY DEATHS?
  516. RETURN
  517. C SVERBS, PAGE 7
  518. C
  519. C V95-- INCANT
  520. C
  521. 26000 DO 26100 I=1,6
  522. C !SET UP PARSE.
  523. P1(I)=' '
  524. P2(I)=' '
  525. 26100 CONTINUE
  526. WP=1
  527. C !WORD POINTER.
  528. CP=1
  529. C !CHAR POINTER.
  530. IF(PRSCON.LE.1) GO TO 26300
  531. DO 26200 I=PRSCON,INLNT
  532. C !PARSE INPUT
  533. IF(INBUF(I).EQ.',') GO TO 26300
  534. C !END OF PHRASE?
  535. IF(INBUF(I).NE.' ') GO TO 26150
  536. C !SPACE?
  537. IF(CP.NE.1) WP=WP+1
  538. CP=1
  539. GO TO 26200
  540. 26150 IF(WP.EQ.1) P1(CP)=INBUF(I)
  541. C !STUFF INTO HOLDER.
  542. IF(WP.EQ.2) P2(CP)=INBUF(I)
  543. CP=MIN0(CP+1,6)
  544. 26200 CONTINUE
  545. C
  546. 26300 PRSCON=1
  547. C !KILL REST OF LINE.
  548. IF(P1(1).NE.' ') GO TO 26400
  549. C !ANY INPUT?
  550. CALL RSPEAK(856)
  551. C !NO, HO HUM.
  552. RETURN
  553. C
  554. 26400 CALL ENCRYP(P1,CH)
  555. C !COMPUTE RESPONSE.
  556. IF(P2(1).NE.' ') GO TO 26600
  557. C !TWO PHRASES?
  558. C
  559. IF(SPELLF) GO TO 26550
  560. C !HE'S TRYING TO LEARN.
  561. C The following line fixes a nice bug in the UNIX version! /* TAA */
  562. C IF(IAND(RFLAG(TSTRS),RSEEN).EQ.0) GO TO 26575
  563. SPELLF=.TRUE.
  564. C !TELL HIM.
  565. TELFLG=.TRUE.
  566. WRITE(OUTCH,26510) P1,CH
  567. 26510 FORMAT(' A hollow voice replies: "',6A1,1X,6A1,'".')
  568. C
  569. RETURN
  570. C
  571. 26550 CALL RSPEAK(857)
  572. C !HE'S GOT ONE ALREADY.
  573. RETURN
  574. C
  575. 26575 CALL RSPEAK(858)
  576. C !HE'S NOT IN ENDGAME.
  577. RETURN
  578. C
  579. 26600 IF(IAND(RFLAG(TSTRS),RSEEN).NE.0) GO TO 26800
  580. DO 26700 I=1,6
  581. IF(P2(I).NE.CH(I)) GO TO 26575
  582. C !WRONG.
  583. 26700 CONTINUE
  584. SPELLF=.TRUE.
  585. C !IT WORKS.
  586. CALL RSPEAK(859)
  587. CTICK(CEVSTE)=1
  588. C !FORCE START.
  589. RETURN
  590. C
  591. 26800 CALL RSPEAK(855)
  592. C !TOO LATE.
  593. RETURN
  594. C SVERBS, PAGE 8
  595. C
  596. C V96-- ANSWER
  597. C
  598. 27000 IF((PRSCON.GT.1).AND.
  599. & (HERE.EQ.FDOOR).AND.INQSTF)
  600. & GO TO 27100
  601. CALL RSPEAK(799)
  602. C !NO ONE LISTENS.
  603. PRSCON=1
  604. RETURN
  605. C
  606. 27100 K=1
  607. C !POINTER INTO ANSSTR.
  608. DO 27300 J=1,28,2
  609. C !CHECK ANSWERS.
  610. NEWK=K+ANSWER(J+1)
  611. C !COMPUTE NEXT K.
  612. IF(QUESNO.NE.ANSWER(J)) GO TO 27300
  613. C !ONLY CHECK PROPER ANS.
  614. I=PRSCON-1
  615. C !SCAN ANSWER.
  616. DO 27200 L=K,NEWK-1
  617. 27150 I=I+1
  618. C !SKIP INPUT BLANKS.
  619. IF(I.GT.INLNT) GO TO 27300
  620. C !END OF INPUT? LOSE.
  621. IF(INBUF(I).EQ.' ') GO TO 27150
  622. IF(INBUF(I).NE.ANSSTR(L)) GO TO 27300
  623. 27200 CONTINUE
  624. GO TO 27500
  625. C !RIGHT ANSWER.
  626. 27300 K=NEWK
  627. C
  628. PRSCON=1
  629. C !KILL REST OF LINE.
  630. NQATT=NQATT+1
  631. C !WRONG, CRETIN.
  632. IF(NQATT.GE.5) GO TO 27400
  633. C !TOO MANY WRONG?
  634. CALL RSPEAK(800+NQATT)
  635. C !NO, TRY AGAIN.
  636. RETURN
  637. C
  638. 27400 CALL RSPEAK(826)
  639. C !ALL OVER.
  640. CFLAG(CEVINQ)=.FALSE.
  641. C !LOSE.
  642. RETURN
  643. C
  644. 27500 PRSCON=1
  645. C !KILL REST OF LINE.
  646. CORRCT=CORRCT+1
  647. C !GOT IT RIGHT.
  648. CALL RSPEAK(800)
  649. C !HOORAY.
  650. IF(CORRCT.GE.3) GO TO 27600
  651. C !WON TOTALLY?
  652. CTICK(CEVINQ)=2
  653. C !NO, START AGAIN.
  654. QUESNO=MOD(QUESNO+3,8)
  655. NQATT=0
  656. CALL RSPEAK(769)
  657. C !ASK NEXT QUESTION.
  658. CALL RSPEAK(770+QUESNO)
  659. RETURN
  660. C
  661. 27600 CALL RSPEAK(827)
  662. C !QUIZ OVER,
  663. CFLAG(CEVINQ)=.FALSE.
  664. OFLAG2(QDOOR)=IOR(OFLAG2(QDOOR),OPENBT)
  665. RETURN
  666. C
  667. END