mrf.65 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995
  1. <OR <GASSIGNED? END-GAME!-FLAG> <BLOAT 20000 0 0 500>>
  2. "============ ZORK END-GAME FUNCTIONS ============="
  3. <SETG END-GAME-EXISTS? T>
  4. ;"enable endgame"
  5. <SETG END-GAME!-FLAG <>>
  6. ;"endgame has begun?"
  7. <DEFMAC DOPEN ('OBJ) <FORM TRO .OBJ ,OPENBIT>>
  8. <DEFMAC DCLOSE ('OBJ) <FORM TRZ .OBJ ,OPENBIT>>
  9. <DEFINE DPR (OBJ)
  10. #DECL ((OBJ) OBJECT)
  11. <COND (<OOPEN? .OBJ> "open.")("closed.")>>
  12. "============ Is There Life after Death? =========="
  13. <DEFINE TOMB-FUNCTION ("AUX" (VB <1 ,PRSVEC>))
  14. #DECL ((VB) VERB)
  15. <COND (<==? .VB ,LOOK!-WORDS>
  16. <TELL
  17. "You are in the Tomb of the Unknown Implementer.
  18. A hollow voice says: \"That's not a bug, it's a feature!\"
  19. In the north wall of the room is the Crypt of the Implementers. It
  20. is made of the finest marble, and apparently large enough for four
  21. headless corpses. The crypt is " 1 <DPR <FIND-OBJ "TOMB">>
  22. " Above the entrance is the
  23. cryptic inscription:
  24. \"Feel Free.\"
  25. ">)>>
  26. <DEFINE CRYPT-FUNCTION ("AUX" (VB <1 ,PRSVEC>) (EG? ,END-GAME!-FLAG))
  27. #DECL ((VB) VERB (EG?) <OR ATOM FALSE>)
  28. <COND (<AND .EG? <==? .VB ,LOOK!-WORDS>>
  29. <TELL
  30. "Though large and esthetically pleasing the marble crypt is empty; the
  31. sarcophagi, bodies, and rich treasure to be expected in a tomb of
  32. this magnificence are missing. Inscribed on one wall is the motto of
  33. the implementers, \"Feel Free\". There is a door leading out of the
  34. crypt to the south. The door is "
  35. 1
  36. <DPR <FIND-OBJ "TOMB">>>)>>
  37. <DEFINE CRYPT-OBJECT ("AUX" (VB <1 ,PRSVEC>) (EG? ,END-GAME!-FLAG)
  38. (C <FIND-OBJ "TOMB">))
  39. #DECL ((VB) VERB (EG?) <OR ATOM FALSE> (C) OBJECT)
  40. <COND (<AND <NOT .EG?> <HEAD-FUNCTION>>)
  41. (<AND .EG? <==? .VB ,OPEN!-WORDS>>
  42. <COND (<NOT <OOPEN? .C>>
  43. <DOPEN .C>
  44. <TELL
  45. "The door of the crypt is extremely heavy, but it opens easily.">)
  46. (ELSE
  47. <TELL "The crypt is already open.">)>
  48. T)
  49. (<AND .EG? <==? .VB ,CLOSE!-WORDS>>
  50. <COND (<OOPEN? .C>
  51. <DCLOSE .C>
  52. <TELL "The crypt is closed.">)
  53. (ELSE <TELL "The crypt is already closed.">)>
  54. <COND (<==? ,HERE <FIND-ROOM "CRYPT">>
  55. <CLOCK-INT ,STRTE 3>)>)>>
  56. <DEFINE START-END ("AUX" (HERE ,HERE) LAMP)
  57. #DECL ((HERE) ROOM (LAMP) OBJECT)
  58. <COND (<==? .HERE <FIND-ROOM "CRYPT">>
  59. <COND (<LIT? .HERE>
  60. <CLOCK-INT ,STRTE 3>)
  61. (ELSE
  62. <TELL
  63. "Suddenly, as you wait in the dark, you begin to feel somewhat
  64. disoriented. The feeling passes, but something seems different.">
  65. <SET LAMP <FIND-OBJ "LAMP">>
  66. <TRO .LAMP ,LIGHTBIT>
  67. <TRZ .LAMP ,ONBIT>
  68. <PUT <1 <SET C <ORAND .LAMP>>> ,ORAND 0>
  69. <PUT <2 .C> ,CTICK 350>
  70. <PUT <2 .C> ,CFLAG <>>
  71. <PUT ,WINNER ,AOBJS (.LAMP)>
  72. <GOTO <FIND-ROOM "TSTRS">>)>)>>
  73. \
  74. "========== It's All Done with Mirrors =========="
  75. <SETG MR1!-FLAG T>
  76. <SETG MR2!-FLAG T>
  77. <SETG MLOC <FIND-ROOM "MRB">>
  78. <SETG MIRROR-OPEN!-FLAG <>>
  79. <SETG WOOD-OPEN!-FLAG <>>
  80. <SETG MRSWPUSH!-FLAG <>>
  81. <DEFINE MRGO ("AUX" (DIR <CHTYPE <2 ,PRSVEC> ATOM>)
  82. (NRM <MEMQ .DIR <REXITS ,HERE>>) (CEX <2 .NRM>)
  83. (TORM <CXROOM .CEX>))
  84. #DECL ((DIR) ATOM (NRM) <<PRIMTYPE VECTOR> ATOM CEXIT>
  85. (CEX) CEXIT (TORM) ROOM)
  86. <COND (<MEMQ .DIR '[NORTH!-DIRECTIONS SOUTH!-DIRECTIONS]>
  87. <COND (<==? ,MLOC .TORM>
  88. <COND (<N-S ,MDIR>
  89. <TELL "There is a wooden wall blocking your way.">)
  90. (<TELL "A large mirror blocks your way.">)>
  91. <>)
  92. (.TORM)>)
  93. (<==? ,MLOC .TORM>
  94. <COND (<N-S ,MDIR> <GO-E-W .TORM .DIR>)
  95. (<TELL "There is a large mirror blocking your way."> <>)>)
  96. (<GO-E-W .TORM .DIR>)>>
  97. <DEFINE GO-E-W (RM DIR
  98. "AUX" (SPR <SPNAME <RID .RM>>) (SPD <SPNAME .DIR>)
  99. (STR ,MRESTR))
  100. #DECL ((RM) ROOM (DIR) ATOM (SPR SPD STR) STRING)
  101. <OR <==? <2 .SPD> !\E> <SET STR ,MRWSTR>>
  102. <FIND-ROOM <SUBSTRUC .SPR 0 3 .STR>>>
  103. <SETG MRESTR " E">
  104. <SETG MRWSTR "MRBW">
  105. <DEFMAC N-S ('FX) <FORM 0? <FORM MOD .FX 180>>>
  106. <DEFMAC E-W ('FX) <FORM OR <FORM ==? .FX 90> <FORM ==? .FX 270>>>
  107. <DEFINE EWTELL (RM "AUX" (EAST? <==? <4 <SPNAME <RID .RM>>> !\E>) BROKEN M1?)
  108. #DECL ((RM) ROOM (EAST? MWIN M1?) <OR FALSE ATOM>)
  109. <SET MWIN
  110. <COND (<SET M1? <==? 180 <+ ,MDIR <COND (.EAST? 0) (180)>>>>
  111. ,MR1!-FLAG)
  112. (,MR2!-FLAG)>>
  113. <TELL "You are in a narrow room, whose "
  114. 0
  115. <COND (.EAST? "west") ("east")>
  116. " wall is a large ">
  117. <TELL <COND (.MWIN "mirror.") ("broken mirror.")>>
  118. <AND .M1? ,MIRROR-OPEN!-FLAG <TELL ,MIROPEN>>
  119. <TELL "The opposite wall is solid rock.">>
  120. <SETG MIROPEN "The mirror is mounted on a panel which has been opened outward.">
  121. <DEFINE MRCEW ("AUX" (PRSA <1 ,PRSVEC>))
  122. #DECL ((PRSA) VERB)
  123. <COND (<==? .PRSA ,LOOK!-WORDS> <EWTELL ,HERE> <TELL ,GUARDSTR>)>>
  124. <DEFINE MRBEW ("AUX" (PRSA <1 ,PRSVEC>))
  125. #DECL ((PRSA) VERB)
  126. <COND (<==? .PRSA ,LOOK!-WORDS>
  127. <EWTELL ,HERE>
  128. <TELL "To the north and south are large hallways.">)>>
  129. <DEFINE MRAEW ("AUX" (PRSA <1 ,PRSVEC>))
  130. #DECL ((PRSA) VERB)
  131. <COND (<==? .PRSA ,LOOK!-WORDS>
  132. <EWTELL ,HERE>
  133. <TELL "To the north is a large hallway.">)>>
  134. <DEFINE LOOK-TO (STR NORTH?
  135. "AUX" (RM <FIND-ROOM .STR>) (MDIR ,MDIR) MIR? (M1? <>)
  136. (DIR <COND (.NORTH? "north") ("south")>))
  137. #DECL ((STR DIR) STRING (NORTH? MIR? M1?) <OR ATOM FALSE> (RM) ROOM
  138. (MDIR) FIX)
  139. <SET MIR?
  140. <COND (<OR <AND .NORTH? <G? .MDIR 180> <L? .MDIR 359>>
  141. <AND <NOT .NORTH?> <G? .MDIR 0> <L? .MDIR 179>>>
  142. <SET M1? T>
  143. ,MR1!-FLAG)
  144. (,MR2!-FLAG)>>
  145. <COND (<==? ,MLOC .RM>
  146. <COND (<E-W .MDIR>
  147. <TELL "A large mirror fills the "
  148. 1
  149. .DIR
  150. " side of the hallway.">
  151. <AND .M1?
  152. ,MIRROR-OPEN!-FLAG
  153. <TELL ,MIROPEN>>
  154. <OR .MIR?
  155. <TELL "The mirror is shattered into little pieces.">>)
  156. (<TELL "The "
  157. 0
  158. .DIR
  159. " side of the room is divided by a wooden wall into small
  160. hallways to the ">
  161. <TELL .DIR 0 "east and ">
  162. <TELL .DIR 1 "west.">)>)>>
  163. <SETG HALLWAY
  164. "You are in a part of the long hallway. The east and west walls are
  165. dressed stone. In the center of the hall is a shallow stone channel.
  166. In the center of the room the channel widens into a large hole around
  167. which is engraved a compass rose.">
  168. <DEFINE MRCF ("AUX" (PRSA <1 ,PRSVEC>))
  169. #DECL ((PRSA) VERB)
  170. <COND (<==? .PRSA ,LOOK!-WORDS>
  171. <TELL ,HALLWAY>
  172. <TELL ,GUARDSTR>
  173. <LOOK-TO "MRG" T>
  174. <LOOK-TO "MRB" <>>)>>
  175. <DEFINE MRBF ("AUX" (PRSA <1 ,PRSVEC>))
  176. #DECL ((PRSA) VERB)
  177. <COND (<==? .PRSA ,LOOK!-WORDS>
  178. <TELL ,HALLWAY>
  179. <LOOK-TO "MRC" T>
  180. <LOOK-TO "MRA" <>>)>>
  181. <DEFINE MRAF ("AUX" (PRSA <1 ,PRSVEC>))
  182. #DECL ((PRSA) VERB)
  183. <COND (<==? .PRSA ,LOOK!-WORDS>
  184. <TELL ,HALLWAY>
  185. <LOOK-TO "MRB" T>
  186. <TELL
  187. "A passage enters from the south.">)>>
  188. <SETG GUARDKILL
  189. "The Guardians awake, and in perfect unison, utterly destroy you with
  190. their stone bludgeons. Satisfied, they resume their posts.">
  191. <DEFINE GUARDIANS ("AUX" (PRSA <1 ,PRSVEC>))
  192. #DECL ((PRSA) VERB)
  193. <COND (<==? .PRSA ,WALK-IN!-WORDS>
  194. <JIGS-UP ,GUARDKILL>)>>
  195. <DEFINE MIRROR-DIR? (DIR RM "AUX" M (MDIR ,MDIR))
  196. #DECL ((MDIR) FIX (DIR) ATOM (RM) ROOM
  197. (M) <OR FALSE <<PRIMTYPE VECTOR> ATOM CEXIT>>)
  198. <AND <SET M <MEMQ NORTH!-DIRECTIONS <REXITS .RM>>>
  199. <==? ,MLOC <CXROOM <2 .M>>>
  200. <COND (<OR <AND <==? .DIR NORTH!-DIRECTIONS>
  201. <G? .MDIR 180>
  202. <L? .MDIR 360>>
  203. <AND <==? .DIR SOUTH!-DIRECTIONS>
  204. <G? .MDIR 0>
  205. <L? .MDIR 180>>>
  206. 1)
  207. (2)>>>
  208. <DEFINE MIRROR-HERE? (RM "AUX" (SP <SPNAME <RID .RM>>) (MDIR ,MDIR))
  209. #DECL ((RM) ROOM (SP) STRING (MDIR) FIX)
  210. <COND (<==? <LENGTH .SP> 4>
  211. <COND (<==? 180 <+ .MDIR <COND (<==? <4 .SP> !\E> 0) (180)>>> 1)
  212. (2)>)
  213. (<N-S .MDIR> <>)
  214. (<MIRROR-DIR? NORTH!-DIRECTIONS .RM>)
  215. (<MIRROR-DIR? SOUTH!-DIRECTIONS .RM>)>>
  216. <SETG MIRBREAK "The mirror breaks, revealing a wooden panel behind it.">
  217. <SETG MIRBROKE "The mirror has already been broken.">
  218. <DEFINE WALL-FUNCTION ("AUX" (PV ,PRSVEC) (PA <1 .PV>) (HERE ,HERE) (NORTH? <>)
  219. (MLOC ,MLOC))
  220. #DECL ((PV) VECTOR (PA) VERB (MLOC HERE) ROOM (NORTH?) <OR FALSE FIX>)
  221. <COND (<AND <N-S ,MDIR>
  222. <OR <SET NORTH? <MIRROR-DIR? NORTH!-DIRECTIONS .HERE>>
  223. <MIRROR-DIR? SOUTH!-DIRECTIONS .HERE>>>
  224. <COND (<==? .PA ,PUSH!-WORDS>
  225. <COND (<SET RM <MIRNS .NORTH?>>
  226. <MIRMOVE .NORTH? .RM>
  227. <GOTO .MLOC>)
  228. (<TELL "The structure won't budge.">)>)>)
  229. (<TELL "I don't see a wooden wall here.">)>>
  230. <DEFINE MIRROR-FUNCTION ("AUX" (PV ,PRSVEC) (PA <1 .PV>) MIRROR)
  231. #DECL ((PV) VECTOR (PA) VERB (MIRROR) <OR FIX FALSE>)
  232. <COND (<NOT <SET MIRROR <MIRROR-HERE? ,HERE>>>
  233. <TELL
  234. "I can't see a mirror here.">)
  235. (<==? .PA ,C-INT!-WORDS>
  236. <SETG MIRROR-OPEN!-FLAG <>>
  237. <TELL "The mirror slams shut.">)
  238. (<OR <==? .PA ,BREAK!-WORDS>
  239. <==? .PA ,PUSH!-WORDS>
  240. <==? .PA ,MUNG!-WORDS>>
  241. <COND (<1? .MIRROR>
  242. <COND (,MR1!-FLAG
  243. <SETG MR1!-FLAG <>>
  244. <TELL ,MIRBREAK>)
  245. (<TELL ,MIRBROKE>)>)
  246. (,MR2!-FLAG
  247. <SETG MR2!-FLAG <>>
  248. <TELL ,MIRBREAK>)
  249. (<TELL ,MIRBROKE>)>)>>
  250. <SETG DIRVEC
  251. [NORTH!-DIRECTIONS
  252. 0
  253. NE!-DIRECTIONS
  254. 45
  255. EAST!-DIRECTIONS
  256. 90
  257. SE!-DIRECTIONS
  258. 135
  259. SOUTH!-DIRECTIONS
  260. 180
  261. SW!-DIRECTIONS
  262. 225
  263. WEST!-DIRECTIONS
  264. 270
  265. NW!-DIRECTIONS
  266. 315]>
  267. <DEFINE MIROUT ("AUX" (DIR <2 <MEMQ <CHTYPE <2 ,PRSVEC> ATOM> ,DIRVEC>>) (MDIR ,MDIR)
  268. RM)
  269. #DECL ((DIR MDIR) FIX (RM) <OR FALSE ROOM>)
  270. <COND (,MIRROR-OPEN!-FLAG
  271. <COND (<==? <MOD <+ .MDIR 270> 360> .DIR>
  272. <COND (<N-S .MDIR>
  273. <MIREW>)
  274. (<MIRNS>)>)
  275. (<TELL ,NOWAY>
  276. <>)>)
  277. (,WOOD-OPEN!-FLAG
  278. <COND (<==? <MOD <+ .MDIR 180> 360> .DIR>
  279. <COND (<SET RM <MIRNS <N==? 0 .MDIR>>>
  280. <TELL "As you leave, the door swings shut.">
  281. <SETG WOOD-OPEN!-FLAG <>>
  282. .RM)
  283. (<TELL ,NOWAY>)>)
  284. (<TELL ,NOWAY>
  285. <>)>)
  286. (<TELL ,NOWAY>
  287. <>)>>
  288. <SETG NOWAY "There is no way to go in that direction.">
  289. <DEFINE MIRNS ("OPTIONAL" (NORTH? <L? ,MDIR 180>)
  290. "AUX" (MLOC ,MLOC) (REX <REXITS .MLOC>) M EXIT)
  291. #DECL ((MLOC) ROOM (REX) EXIT (M) <OR FALSE <<PRIMTYPE VECTOR> ATOM>>
  292. (EXIT) <OR DOOR ROOM CEXIT NEXIT> (NORTH?) <OR FALSE FIX ATOM>)
  293. <COND (<SET M
  294. <MEMQ <COND (.NORTH? NORTH!-DIRECTIONS) (SOUTH!-DIRECTIONS)>
  295. .REX>>
  296. <SET EXIT <2 .M>>
  297. <COND (<TYPE? .EXIT CEXIT> <CXROOM <2 .M>>)
  298. (<TYPE? .EXIT ROOM> .EXIT)>)>>
  299. <DEFINE MIREW ()
  300. <FIND-ROOM <SUBSTRUC <SPNAME <RID ,MLOC>>
  301. 0
  302. 3
  303. <COND (<0? ,MDIR> ,MRWSTR)
  304. (,MRESTR)>>>>
  305. <DEFINE MIRIN ()
  306. <COND (<AND <==? <MIRROR-HERE? ,HERE> 1>
  307. ,MIRROR-OPEN!-FLAG>
  308. <FIND-ROOM "INMIR">)>>
  309. <DEFINE MREYE-ROOM ("AUX" (PRSA <1 ,PRSVEC>))
  310. #DECL ((PRSA) VERB)
  311. <COND (<==? .PRSA ,LOOK!-WORDS>
  312. <TELL
  313. "You are in a small room, with narrow passages exiting to the north
  314. and south. " 0>
  315. <COND (<EMPTY? <ROBJS ,HERE>>
  316. <TELL "A narrow red beam of light crosses the room at the
  317. north end, inches above the floor.">)>)>>
  318. <DEFINE MRSWITCH ("AUX" (PRSA <1 ,PRSVEC>) (HERE ,HERE))
  319. #DECL ((PRSA) VERB (HERE) ROOM)
  320. <COND (<==? .PRSA ,PUSH!-WORDS>
  321. <COND (,MRSWPUSH!-FLAG <TELL "The button is already depressed.">)
  322. (<TELL "The button becomes depressed.">
  323. <SETG MRSWPUSH!-FLAG T>
  324. <COND (<EMPTY? <ROBJS <FIND-ROOM "MREYE">>>)
  325. (<CLOCK-ENABLE <CLOCK-INT ,MRINT 6>>
  326. <SETG MIRROR-OPEN!-FLAG T>)>)>)
  327. (<==? .PRSA ,C-INT!-WORDS>
  328. <SETG MRSWPUSH!-FLAG <>>
  329. <SETG MIRROR-OPEN!-FLAG <>>
  330. <COND (<OR <==? <MIRROR-HERE? .HERE> 1>
  331. <==? .HERE <FIND-ROOM "INMIR">>>
  332. <TELL "The mirror quietly swings shut.">)
  333. (<==? .HERE <FIND-ROOM "MRANT">>
  334. <TELL "The button pops back to its original position.">)>)
  335. >>
  336. <SETG GUARDSTR
  337. "Somewhat to the north, identical stone statues face each other from
  338. pedestals on opposite sides of the corridor. The statues represent
  339. Guardians of Zork, a military order of ancient lineage. They are
  340. portrayed as heavily armored warriors standing at ease, hands clasped
  341. around formidable bludgeons.">
  342. <SETG MDIR 270>
  343. ;"mirror points... 0 = north"
  344. <SETG STARTROOM <SETG MLOC <FIND-ROOM "MRB">>>
  345. <SETG ENDROOM <FIND-ROOM "FROBN">>
  346. ;"FIX THIS"
  347. <SETG POLEUP!-FLAG <>>
  348. ;"pole raised?"
  349. <DEFINE MAGIC-MIRROR ("AUX" (PV ,PRSVEC) (PA <1 .PV>)
  350. (MDIR ,MDIR) (MLOC ,MLOC) (STARTER <>))
  351. #DECL ((PV) VECTOR (PA) VERB (MDIR) FIX (MLOC) ROOM)
  352. <COND (<==? .PA ,LOOK!-WORDS>
  353. <SET STARTER <==? .MLOC ,STARTROOM>>
  354. <TELL
  355. "You are inside a rectangular box of wood whose structure is rather
  356. complicated. Four sides and the roof are filled in, and the floor is
  357. open.
  358. As you face the side opposite the entrance, two short sides of
  359. carved and polished wood are to your left and right. The left panel
  360. is oak, the right pine. The wall you face is red on its left half
  361. and black on its right. On the entrance side, the wall is white
  362. opposite the red part of the wall it faces, and yellow opposite the
  363. black section. The painted walls are at least twice the length of
  364. the unpainted ones. The ceiling is painted blue.
  365. In the floor is a stone channel about six inches wide and a foot
  366. deep. The channel is oriented in a north-south direction. In the
  367. exact center of the room the channel widens into a circular
  368. depression perhaps two feet wide. Incised in the stone around this
  369. area is a compass rose.
  370. Running from one short wall to the other at about waist height
  371. is a wooden bar, carefully carved and drilled. This bar is pierced
  372. in two places. The first hole is in the center of the bar (and thus
  373. the center of the room). The second is at the left end of the room
  374. (as you face opposite the entrance). Through each hole runs a wooden
  375. pole.
  376. The pole at the left end of the bar extends only about a foot
  377. above the bar, and ends in a hand grip. The pole " 0>
  378. <COND (<AND .STARTER <==? .MDIR 270>>
  379. <COND (,POLEUP!-FLAG
  380. <TELL
  381. "has been lifted out
  382. of a hole carved in the stone floor. There is evidently enough
  383. friction to keep the pole from dropping back down.">)
  384. (ELSE
  385. <TELL "has been dropped
  386. into a hole carved in the stone floor.">)>)
  387. (<OR <0? .MDIR> <==? .MDIR 180>>
  388. <COND (,POLEUP!-FLAG
  389. <TELL "is positioned above
  390. the stone channel in the floor.">)
  391. (ELSE
  392. <TELL "has been dropped
  393. into the stone channel incised in the floor.">)>)
  394. (ELSE
  395. <TELL "is resting on the
  396. stone floor.">)>
  397. <TELL
  398. " The pole at the center of the bar extends from the ceiling
  399. through the bar to the circular area in the stone channel. This
  400. bottom end of the pole has a T-bar a bit less than two feet long
  401. attached to it, and on the T-bar is carved an arrow. The arrow and
  402. T-bar are pointing " 1
  403. <NTH ,LONGDIRS <+ </ .MDIR 45> 1>>
  404. ".">)>>
  405. <SETG LONGDIRS
  406. '["north"
  407. "northeast"
  408. "east"
  409. "southeast"
  410. "south"
  411. "southwest"
  412. "west"
  413. "northwest"]>
  414. ;"MOVEMENT"
  415. <DEFINE MPANELS ("AUX" (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>) (MDIR ,MDIR))
  416. #DECL ((PV) VECTOR (PA) VERB (PO) OBJECT (MDIR) FIX)
  417. <COND (<==? .PA ,PUSH!-WORDS>
  418. <COND (,POLEUP!-FLAG
  419. <AND <==? ,MLOC <FIND-ROOM "MRG">>
  420. <TELL "The movement of the structure alerts the Guardians.">
  421. <JIGS-UP ,GUARDKILL>>
  422. <COND (<OR <==? .PO <FIND-OBJ "RDWAL">>
  423. <==? .PO <FIND-OBJ "YLWAL">>>
  424. <SET MDIR <MOD <+ .MDIR 45> 360>>
  425. <TELL "The structure rotates clockwise.">)
  426. (<SET MDIR <MOD <+ .MDIR 315> 360>>
  427. <TELL "The structure rotates counterclockwise.">)>
  428. <TELL "The arrow on the compass rose now indicates "
  429. 1
  430. <NTH ,LONGDIRS <+ 1 </ .MDIR 45>>>
  431. ".">
  432. <SETG MDIR .MDIR>)
  433. (<N-S .MDIR>
  434. <TELL "The short pole prevents the structure from rotating.">)
  435. (<TELL "The structure shakes slightly but doesn't move.">)>)>>
  436. <DEFINE MENDS ("AUX" (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>) (MDIR ,MDIR) RM
  437. (MRG <FIND-ROOM "MRG">) (MLOC ,MLOC))
  438. #DECL ((PV) VECTOR (PA) VERB (PO) <OR FALSE OBJECT> (MDIR) FIX
  439. (RM) <OR FALSE ROOM> (MRG MLOC) ROOM)
  440. <COND (<==? .PA ,PUSH!-WORDS>
  441. <COND (<NOT <N-S .MDIR>>
  442. <TELL
  443. "The structure rocks back and forth slightly but doesn't move.">)
  444. (<==? .PO <FIND-OBJ "OAKND">>
  445. <COND (<SET RM <MIRNS>> <MIRMOVE <0? .MDIR> .RM>)>)
  446. (<==? .MLOC <FIND-ROOM "FDOOR">>
  447. <TELL "The pine wall is blocked by something and won't open.">)
  448. (<TELL "The pine wall swings open.">
  449. <AND <OR <==? .MLOC .MRG>
  450. <AND <==? .MLOC <FIND-ROOM "MRD">>
  451. <==? .MDIR 0>>>
  452. <TELL
  453. "The pine door opens into the field of view of the Guardians.">
  454. <JIGS-UP ,GUARDKILL>>
  455. <SETG WOOD-OPEN!-FLAG T>
  456. <CLOCK-ENABLE <CLOCK-INT ,PININ 5>>)>)
  457. (<==? .PA ,C-INT!-WORDS> <SETG WOOD-OPEN!-FLAG <>> T)>>
  458. <DEFINE MIRMOVE (NORTH? RM "AUX" (MRG <FIND-ROOM "MRG">))
  459. #DECL ((NORTH?) <OR FIX ATOM FALSE> (RM MRG) ROOM)
  460. <TELL <COND (,POLEUP!-FLAG "The structure wobbles ")
  461. ("The structure slides ")>
  462. 1
  463. <COND (.NORTH? "north") ("south")>
  464. " and stops over another compass rose.">
  465. <SETG MLOC .RM>
  466. <AND <==? .RM .MRG>
  467. <==? ,HERE <FIND-ROOM "INMIR">>
  468. <COND (,POLEUP!-FLAG
  469. <TELL
  470. "The structure wobbles as it moves, alerting the Guardians.">)
  471. (<OR <NOT ,MR1!-FLAG> <NOT ,MR2!-FLAG>>
  472. <TELL
  473. "A Guardian notices a wooden structure creeping by, and his
  474. suspicions are aroused.">)>
  475. <JIGS-UP
  476. "Suddenly the Guardians realize someone is trying to sneak by them in
  477. the structure. They awake, and in perfect unison, hammer the box and
  478. its contents (including you) to pulp. They then resume their posts,
  479. satisfied.">>
  480. T>
  481. <DEFINE SHORT-POLE ("AUX" (PA <1 ,PRSVEC>) (MDIR ,MDIR))
  482. #DECL ((PA) VERB (MDIR) FIX)
  483. <COND (<==? .PA ,RAISE!-WORDS>
  484. <COND (,POLEUP!-FLAG
  485. <TELL "The pole cannot be raised further.">)
  486. (<SETG POLEUP!-FLAG T>
  487. <TELL "The pole is now slightly above the floor.">)>)
  488. (<OR <==? .PA ,PUSH!-WORDS>
  489. <==? .PA ,LOWER!-WORDS>>
  490. <COND (,POLEUP!-FLAG
  491. <COND (<N-S .MDIR>
  492. <TELL "The pole is lowered into the channel.">
  493. <SETG POLEUP!-FLAG <>>
  494. T)
  495. (<AND <==? .MDIR 270>
  496. <==? ,MLOC <FIND-ROOM "MRA">>>
  497. <SETG POLEUP!-FLAG <>>
  498. <TELL "The pole is lowered into the stone hole.">)
  499. (<TELL "The pole rests on the floor.">)>)
  500. (<TELL "The pole cannot be lowered further.">)>)>>
  501. \
  502. "========== The Spanish Inquisition =========="
  503. <NEWSTRUC QUESTION VECTOR QSTR STRING ;"question to ask"
  504. QANS VECTOR ;"answers (as returned by LEX)">
  505. <SETG EQUESTION <CHTYPE ["FOO" []] QUESTION>>
  506. <SETG QVEC <REST <IUVECTOR 15 ,EQUESTION> 15>>
  507. <SETG NQVEC <IUVECTOR 3 ,EQUESTION>>
  508. <SETG NQATT 0>
  509. ;"tries recorded for this question"
  510. <SETG NUMS ["one" "two" "three" "four"]>
  511. <SETG INQOBJS ()>
  512. <DEFINE ADD-QUESTION (STR VEC)
  513. <PUT <SETG QVEC <BACK ,QVEC>>
  514. 1
  515. <CHTYPE [.STR .VEC] QUESTION>>
  516. <AND <TYPE? <1 .VEC> OBJECT>
  517. <ADD-INQOBJ <1 .VEC>>>>
  518. <DEFINE ADD-INQOBJ (OBJ)
  519. <SETG INQOBJS (.OBJ !,INQOBJS)>>
  520. <DEFINE CORRECT? (ANS CORRECT "AUX" (1CORR <1 .CORRECT>))
  521. #DECL ((ANS) <VECTOR [REST STRING]> (CORRECT) VECTOR
  522. (1CORR) <OR OBJECT ACTION FALSE STRING>)
  523. <REPEAT (W)
  524. #DECL ((W) <OR ATOM FALSE>)
  525. <COND (<EMPTY? .ANS> <RETURN>)
  526. (<AND <SET W <LOOKUP <1 .ANS> ,WORDS>>
  527. <TYPE? ,.W BUZZ>>
  528. <SET ANS <REST .ANS>>)
  529. (ELSE <RETURN>)>>
  530. <COND (<TYPE? .1CORR STRING> <MEMBER <1 .ANS> .CORRECT>)
  531. (<REPEAT ((LV .ANS) STR ATM OBJ (ADJ <>) VAL)
  532. #DECL ((LV) <VECTOR [REST STRING]> (STR) STRING
  533. (ATM) <OR FALSE ATOM> (VAL) ANY
  534. (ADJ) <OR FALSE ADJECTIVE>
  535. (OBJ) <OR FALSE OBJECT>)
  536. <AND <EMPTY? <SET STR <1 .LV>>> <RETURN <>>>
  537. <COND (<SET ATM <LOOKUP .STR ,ACTIONS>>
  538. <RETURN <==? ,.ATM .1CORR>>)
  539. (<SET ATM <LOOKUP .STR ,WORDS>>
  540. <COND (<TYPE? <SET VAL ,.ATM> ADJECTIVE>
  541. <SET ADJ .VAL>)>)
  542. (<SET ATM <LOOKUP .STR ,OBJECT-OBL>>
  543. <COND (<SET OBJ <SEARCH-LIST .ATM ,INQOBJS .ADJ>>
  544. <RETURN <==? .OBJ .1CORR>>)>)>
  545. <SET LV <REST .LV>>>)>>
  546. <DEFINE INQUISITOR ("OPTIONAL" (ANS <>)
  547. "AUX" (NQV ,NQVEC) (QUES <1 .NQV>) NQATT)
  548. #DECL ((ANS) <OR FALSE <VECTOR [REST STRING]>>
  549. (NQV) <UVECTOR [REST QUESTION]> (QUES) QUESTION (NQATT) FIX)
  550. <COND (<==? <1 ,PRSVEC> ,C-INT!-WORDS>
  551. <TELL "The booming voice asks:
  552. \"" 1 <QSTR .QUES> "\"">
  553. <CLOCK-INT ,INQIN 2>)
  554. (.ANS
  555. <COND (<CORRECT? .ANS <QANS .QUES>>
  556. <TELL "The dungeon master says \"Excellent\".">
  557. <COND (<EMPTY? <SET NQV <REST .NQV>>>
  558. <CLOCK-ENABLE <CLOCK-INT ,FOLIN -1>>
  559. <TELL
  560. "The dungeon master, obviously pleased, says \"You are indeed a
  561. master of lore. I am proud to be at your service.\" The massive
  562. wooden door swings open, and the master motions for you to enter.">
  563. <DOPEN <FIND-OBJ "WDOOR">>
  564. <CLOCK-DISABLE ,INQIN>)
  565. (<SETG NQATT 0>
  566. <SETG NQVEC .NQV>
  567. <TELL "The booming voice asks:
  568. \""
  569. 1
  570. <QSTR <1 .NQV>>
  571. "\"">
  572. <CLOCK-INT ,INQIN 2>)>)
  573. (<SET NQATT <SETG NQATT <+ 1 ,NQATT>>>
  574. <TELL "The dungeon master says \"You are wrong." 0>
  575. <COND (<==? .NQATT 5>
  576. <TELL
  577. "\" The dungeon master,
  578. obviously disappointed in your lack of knowledge, shakes his head and
  579. mumbles \"I guess they'll let anyone in the Dungeon these days\". With
  580. that, he departs.">
  581. <REMOVE-OBJECT <FIND-OBJ "MASTE">>
  582. <CLOCK-DISABLE ,INQIN>)
  583. (<TELL " You have "
  584. 1
  585. <NTH ,NUMS <- 5 .NQATT>>
  586. " more chances.\"">)>)>)>>
  587. <SETG INQSTART? <>>
  588. ;"if D.M. has stated the rules."
  589. <DEFINE INQSTART ("AUX" (QV ,QVEC) (NQV ,NQVEC))
  590. #DECL ((QV NQV) <UVECTOR [REST QUESTION]>)
  591. <COND (<NOT ,INQSTART?>
  592. <INSERT-OBJECT <FIND-OBJ "MASTE"> ,HERE>
  593. <CLOCK-ENABLE <CLOCK-INT ,INQIN 2>>
  594. <TELL
  595. "The knock reverberates along the hall. For a time it seems there
  596. will be no answer. Then you hear someone unlatching the small wooden
  597. panel. Through the bars of the great door, the wrinkled face of an
  598. old man appears. He gazes down at you and intones as follows:
  599. \"I am the Master of the Dungeon, whose task it is to insure
  600. that none but the most scholarly and masterful adventurers are
  601. admitted into the secret realms of the Dungeon. To ascertain whether
  602. you meet the stringent requirements laid down by the Great
  603. Implementers, I will ask three questions which should be easy for one
  604. of your reputed excellence to answer. You have undoubtedly
  605. discovered their answers during your travels through the Dungeon.
  606. Should you answer each of these questions correctly within five
  607. attempts, then I am obliged to acknowledge your skill and daring and
  608. admit you to these regions.
  609. \"All answers should be in the form 'ANSWER \"<answer>\"'\"">
  610. <SETG INQSTART? T>
  611. <REPEAT ()
  612. <SET Q <PICK-ONE .QV>>
  613. <COND (<MEMQ .Q <TOP .NQV>>)
  614. (<PUT .NQV 1 .Q>
  615. <SET NQV <REST .NQV>>
  616. <AND <EMPTY? .NQV> <RETURN>>)>>
  617. <TELL "The booming voice asks:
  618. \"" 1 <QSTR <1 ,NQVEC>> "\"">)
  619. (<TELL
  620. "The Dungeonmaster gazes at you impatiently, and says, \"My conditions
  621. have been stated, abide by them or depart!\"">)>>
  622. <DEFINE ANSWER ("AUX" (LV ,LEXV) M)
  623. #DECL ((LV M) <VECTOR [REST STRING]>)
  624. <COND (<SET M <MEMBER "" .LV>>
  625. <INQUISITOR <REST .M>>)>>
  626. <DEFINE MASTER-ACTOR ("AUX" (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>) C
  627. (R <FIND-OBJ "DUNGM">) RACT)
  628. #DECL ((C) ROOM (PA) VERB (PV) VECTOR (PO) <OR FALSE OBJECT DIRECTION>
  629. (R) OBJECT (RACT) ADV)
  630. <COND (<NOT <OOPEN? <FIND-OBJ "WDOOR">>> <TELL "There is no reply.">)
  631. (<MEMQ .PA ,MASTER-ACTIONS> <>)
  632. (<TELL "\"I cannot perform that action for you.\"">)>>
  633. <DEFINE FDOOR-FUNCTION ("AUX" (PA <1 ,PRSVEC>))
  634. #DECL ((PA) VERB)
  635. <COND (<==? .PA ,LOOK!-WORDS>
  636. <TELL
  637. "You are in a north-south hallway which ends in a large wooden door.
  638. The wooden door has a closed panel in it at about head height. The
  639. great door is " 1 <DPR <FIND-OBJ "WDOOR">>>)>>
  640. <DEFINE WOOD-DOOR ("AUX" (PA <1 ,PRSVEC>))
  641. #DECL ((PA) VERB)
  642. <COND (<OR <==? .PA ,OPEN!-WORDS> <==? .PA ,CLOSE!-WORDS>>
  643. <TELL "The door won't budge.">)
  644. (<==? .PA ,KNOCK!-WORDS>
  645. <COND (,INQSTART?
  646. <TELL "There is no answer.">)
  647. (<INQSTART>)>)>>
  648. <SETG FOLFLAG T>
  649. <DEFINE FOLLOW ("AUX" (WIN ,WINNER) (MAST <ORAND <FIND-OBJ "MASTE">>)
  650. (HERE ,HERE) (MROOM <AROOM .MAST>))
  651. #DECL ((WIN MAST) ADV (HERE MROOM) ROOM)
  652. <COND (<==? <1 ,PRSVEC> ,C-INT!-WORDS>
  653. <COND (<OR <==? .HERE .MROOM> <==? .HERE <FIND-ROOM "FDOOR">>>)
  654. (<N==? .HERE <FIND-ROOM "CELL">>
  655. <AND <MEMQ <AOBJ .MAST> <ROBJS .MROOM>>
  656. <PUT .MROOM
  657. ,ROBJS
  658. <SPLICE-OUT <AOBJ .MAST> <ROBJS .MROOM>>>>
  659. <PUT .MAST ,AROOM .HERE>
  660. <SETG FOLFLAG T>
  661. <INSERT-OBJECT <AOBJ .MAST> .HERE>
  662. <TELL
  663. "The dungeon master follows you.">)
  664. (,FOLFLAG
  665. <TELL
  666. "You notice that the dungeon master does not follow.">
  667. <SETG FOLFLAG <>>
  668. T)>)
  669. (<==? .WIN .MAST>
  670. <CLOCK-INT ,FOLIN -1>
  671. <TELL "The dungeon master answers, 'I will follow.'">)>>
  672. <DEFINE STAY ()
  673. <COND (<==? ,WINNER <ORAND <FIND-OBJ "MASTE">>>
  674. <CLOCK-INT ,FOLIN 0>
  675. <TELL "The dungeon master says, 'I will stay.'">)
  676. (<==? ,WINNER ,PLAYER>
  677. <TELL "You will be lost without me.">)>>
  678. \
  679. "===== 'She reached her end, and this was it; he cast her in the fiery pit' ===="
  680. <SETG LCELL 1> ;"cell in slot"
  681. <SETG PNUMB 1> ;"cell pointed at"
  682. <SETG ACELL <>> ;"cell player is in"
  683. <SETG DCELL <>> ;"cell d.m. is in"
  684. <DEFINE CELL-MOVE ("AUX" (NEW ,PNUMB) (OLD ,LCELL) (CELL <FIND-ROOM "CELL">)
  685. (NCELL <FIND-ROOM "NCELL">) (PCELL <FIND-ROOM "PCELL">)
  686. (CELLS ,CELLS) PO (ME ,PLAYER) (DM ,MASTER))
  687. #DECL ((NEW OLD) FIX (CELL) ROOM (CELLS) <UVECTOR [REST LIST]>)
  688. <PUT .CELLS .OLD <ROBJS .CELL>>
  689. <PUT .CELL ,ROBJS <SET PO <NTH .CELLS .NEW>>>
  690. <COND (<==? .OLD 4> <PUT .NCELL ,ROBJS .PO>)
  691. (ELSE <PUT .PCELL ,ROBJS .PO>)>
  692. <DCLOSE <FIND-OBJ "CDOOR">>
  693. <DCLOSE <FIND-OBJ "NDOOR">>
  694. <DCLOSE <FIND-OBJ "ODOOR">>
  695. <COND (<==? <AROOM .ME> .CELL>
  696. <SETG ACELL .OLD>
  697. <GOTO <COND (<==? .OLD 4> .NCELL) (ELSE .PCELL)>>)
  698. (<==? ,ACELL .NEW>
  699. <SETG ACELL <>>
  700. <GOTO <FIND-ROOM "CELL">>)>
  701. <COND (<==? <AROOM .DM> .CELL>
  702. <SETG DCELL .OLD>)
  703. (<==? ,DCELL .NEW>
  704. <SETG DCELL <>>)>
  705. <SETG LCELL .NEW>>
  706. <DEFINE PARAPET ("AUX" (PV ,PRSVEC) (PA <1 .PV>))
  707. <COND (<==? .PA ,LOOK!-WORDS>
  708. <TELL
  709. "You are standing behind a stone retaining wall which rims a large
  710. parapet overlooking a fiery pit. It is difficult to see through the
  711. smoke and flame which fills the pit, but it seems to be more or less
  712. bottomless. It also extends upward out of sight. The pit itself is
  713. of roughly dressed stone and circular in shape. It is about two
  714. hundred feet in diameter. The flames generate considerable heat, so
  715. it is rather uncomfortable standing here.
  716. There is an object here which looks like a sundial. On it are an
  717. indicator arrow and (in the center) a large button. On the face of
  718. the dial are numbers 'one' through 'eight'. The indicator points to
  719. the number '"
  720. 1
  721. <NTH ,NUMS ,PNUMB>
  722. "'.">)>>
  723. <DEFINE DIAL ("AUX" (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>) (PI <3 .PV>))
  724. <COND (<OR <==? .PA ,SET!-WORDS>
  725. <==? .PA ,PUT!-WORDS>
  726. <==? .PA ,MOVE!-WORDS>
  727. <==? .PA ,TURN-TO!-WORDS>>
  728. <COND (.PI
  729. <COND (<SET N <MEMQ .PI ,NUMOBJS>>
  730. <SETG PNUMB <2 .N>>
  731. <TELL "The dial now points to '" 1
  732. <NTH ,NUMS <2 .N>> "'.">)
  733. (<TELL "The dial face only contains numbers.">)>)
  734. (<TELL "You must specify what to set the dial to.">)>)
  735. (<==? .PA ,SPIN!-WORDS>
  736. <SETG PNUMB <+ 1 <MOD <RANDOM> 7>>>
  737. <TELL
  738. "The dial spins and comes to a stop pointing at '" 1 <NTH ,NUMS ,PNUMB> "'.">)>>
  739. <DEFINE DIALBUTTON ("AUX" (PA <1 ,PRSVEC>) (CDOOR <OOPEN? <FIND-OBJ "CDOOR">>))
  740. <COND (<==? .PA ,PUSH!-WORDS>
  741. <CELL-MOVE>
  742. <TELL
  743. "The button depresses with a slight click, and pops back.">
  744. <AND .CDOOR <TELL "The cell door is now closed.">>
  745. T)>>
  746. <DEFINE TAKE-FIVE ("AUX" (PV ,PRSVEC) (PA <1 .PV>))
  747. #DECL ((PA) VERB)
  748. <COND (<==? .PA ,TAKE!-WORDS>
  749. <PUT .PV 1 ,WAIT!-WORDS>
  750. <WAIT>)>>
  751. <DEFINE CELL-ROOM ("AUX" (PA <1 ,PRSVEC>))
  752. #DECL ((PA) VERB)
  753. <COND (<==? .PA ,LOOK!-WORDS>
  754. <TELL
  755. "You are in a featureless prison cell. You can see "
  756. 1
  757. <COND (<OOPEN? <FIND-OBJ "CDOOR">>
  758. "the east-west
  759. corridor outside the open wooden door in front of you.")
  760. ("only the flames
  761. and smoke of the pit out the small window in a closed door in front
  762. of you.")>>
  763. <COND (<==? ,LCELL 4>
  764. <TELL
  765. "Behind you is an ornately decorated door which seems to be "
  766. 1
  767. <COND (<OOPEN? <FIND-OBJ "ODOOR">>
  768. "open.")
  769. ("closed.")>>)>)>>
  770. <DEFINE PCELL-ROOM ("AUX" (PA <1 ,PRSVEC>))
  771. #DECL ((PA) VERB)
  772. <COND (<==? .PA ,LOOK!-WORDS>
  773. <TELL
  774. "You are in a featureless prison cell. Its wooden door is securely
  775. fastened, and you can see only the flames and smoke of the pit out
  776. the small window.">)>>
  777. <DEFINE NCELL-ROOM ("AUX" (PA <1 ,PRSVEC>))
  778. #DECL ((PA) VERB)
  779. <COND (<==? .PA ,LOOK!-WORDS>
  780. <TELL
  781. "You are in a featureless prison cell. Its wooden door is securely
  782. fastened, and you can see only the flames and smoke of the pit out
  783. its small window.">
  784. <TELL
  785. "On the other side of the cell is an ornately decorated door which
  786. seems to be " 1 <DPR <FIND-OBJ "NDOOR">>>)>>
  787. <DEFINE NCORR-ROOM ("AUX" (PA <1 ,PRSVEC>))
  788. #DECL ((PA) VERB)
  789. <COND (<==? .PA ,LOOK!-WORDS>
  790. <TELL
  791. "You are in a large east-west corridor which opens onto a northern
  792. parapet at its center. You can see flames and smoke as you peer
  793. towards the parapet. The corridor turns south at its east and west
  794. ends, and due south is a massive wooden door. In the door is a small
  795. window barred with iron. The door is " 1
  796. <DPR <FIND-OBJ "CDOOR">>>)>>
  797. <DEFINE SCORR-ROOM ("AUX" (PA <1 ,PRSVEC>))
  798. #DECL ((PA) VERB)
  799. <COND (<==? .PA ,LOOK!-WORDS>
  800. <TELL
  801. "You are in an east-west corridor which turns north at its eastern
  802. and western ends. The walls of the corridor are marble. An
  803. additional passage leads south at the center of the corridor.">
  804. <COND (<==? ,LCELL 4>
  805. <TELL
  806. "In the center of the north wall of the passage is an ornately
  807. decorated door which is " 1 <DPR <FIND-OBJ "ODOOR">>>)>)>>
  808. <DEFINE CELL-DOOR ("AUX" (PA <1 ,PRSVEC>))
  809. #DECL ((PA) VERB)
  810. <COND (<OR <==? .PA ,OPEN!-WORDS> <==? .PA ,CLOSE!-WORDS>>
  811. <OPEN-CLOSE .PA <FIND-OBJ "CDOOR">
  812. "The wooden door opens."
  813. "The wooden door closes.">)>>
  814. <DEFINE ORNATE-DOOR ("AUX" (PA <1 ,PRSVEC>))
  815. #DECL ((PA) VERB)
  816. <COND (<OR <==? .PA ,OPEN!-WORDS> <==? .PA ,CLOSE!-WORDS>>
  817. <OPEN-CLOSE .PA <FIND-OBJ "NDOOR">
  818. "The ornate door opens."
  819. "The ornate door closes.">)>>
  820. <DEFINE MAYBE-DOOR ()
  821. <TELL "There is no way to go in that direction.">
  822. <>>
  823. <DEFINE LOCKED-DOOR ("AUX" (PA <1 ,PRSVEC>))
  824. #DECL ((PA) VERB)
  825. <COND (<==? .PA ,OPEN!-WORDS>
  826. <TELL "The door is securely fastened.">)>>
  827. \
  828. "=========== The Ultimate Winnage =========="
  829. <DEFINE NIRVANA ()
  830. <TELL
  831. " You are in a room of large size, richly appointed and decorated in
  832. a style that bespeaks exquisite taste. To judge from its contents, it
  833. is the ultimate storehouse of the treasures of Zork.
  834. There are chests here containing precious jewels, mountains of
  835. zorkmids, rare paintings, ancient statuary, and beguiling curios.
  836. In one corner of the room is a bookcase boasting such volumes
  837. as 'The History of the Great Underground Empire,' 'The Lives of the
  838. Twelve Flatheads,' 'The Wisdom of the Implementors,' and other
  839. informative and inspiring works.
  840. On one wall is a completely annotated map of the Dungeon of
  841. Zork, showing points of interest, various troves of treasure, and
  842. indicating the locations of several superior scenic views.
  843. On a desk at the far end of the room may be found stock
  844. certificates representing a controlling interest in Frobozco
  845. International, the multinational conglomerate and parent company of
  846. the Frobozz Magic Boat Co., etc.
  847. ">>
  848. \
  849. <DEFINE TURNTO ()
  850. <COND (<OBJECT-ACTION>)
  851. (<TELL "That cannot be turned.">)>>
  852. "=========== CEVENTs and such ============="
  853. <OR <LOOKUP "COMPILE" <ROOT>>
  854. <PROG ()
  855. <CEVENT 0 ,MRSWITCH <> "MRINT">
  856. <CEVENT 0 ,START-END T "STRTE">
  857. <CEVENT 0 ,MENDS <> "PININ">
  858. <CEVENT 0 ,INQUISITOR <> "INQIN">
  859. <CEVENT 0 ,FOLLOW <> "FOLIN">>>
  860.