act2.27 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. <DEFINE BOOM-ROOM ("AUX" (DUMMY? <>) (PRSACT <1 ,PRSVEC>) (WIN ,WINNER) O)
  2. #DECL ((DUMMY?) <OR ATOM FALSE> (PRSACT) VERB (WIN) ADV (O) OBJECT)
  3. <COND (<OR <==? <VNAME .PRSACT> WALK-IN!-WORDS>
  4. <AND <==? <VNAME .PRSACT> ON!-WORDS>
  5. <SET DUMMY? T>>>
  6. <COND (<OR <AND <MEMQ <SET O <FIND-OBJ "CANDL">> <AOBJS .WIN>>
  7. <1? <OLIGHT? .O>>>
  8. <AND <MEMQ <SET O <FIND-OBJ "TORCH">> <AOBJS .WIN>>
  9. <1? <OLIGHT? .O>>>>
  10. <UNWIND
  11. <PROG ()
  12. <COND (.DUMMY?
  13. <TELL
  14. "I didn't realize that adventurers are stupid enough to light a
  15. " 1 <ODESC2 .O> " in a room which reeks of coal gas.
  16. Fortunately, there is justice in the world.">)
  17. (<TELL
  18. "Oh dear. It appears that the smell coming from this room was coal
  19. gas. I would have thought twice about carrying a " 1 <ODESC2 .O> "in here.">)>
  20. <FWEEP 7>
  21. <JIGS-UP " BOOOOOOOOOOOM ">>
  22. <JIGS-UP " BOOOOOOOOOOOM ">>)>)>>
  23. <DEFINE BATS-ROOM ("AUX" (PRSACT <1 ,PRSVEC>))
  24. #DECL ((PRSACT) VERB)
  25. <COND (<AND <==? <VNAME .PRSACT> WALK-IN!-WORDS>
  26. <NOT <MEMQ <FIND-OBJ "GARLI"> <AOBJS ,WINNER>>>>
  27. <FLY-ME>)
  28. (<==? .PRSACT ,LOOK!-WORDS>
  29. <TELL
  30. "You are in a small room which has only one door, to the east.">
  31. <AND <MEMQ <FIND-OBJ "GARLI"> <AOBJS ,WINNER>>
  32. <TELL
  33. "In the corner of the room on the ceiling is a large vampire bat who
  34. is obviously deranged and holding his nose.">>)>>
  35. <DEFINE FLY-ME ("AUX" (BAT-DROPS ,BAT-DROPS))
  36. #DECL ((BAT-DROPS) <VECTOR [REST STRING]>)
  37. <UNWIND
  38. <PROG ()
  39. <FWEEP 4 1>
  40. <TELL
  41. "A deranged giant vampire bat (a reject from WUMPUS) swoops down
  42. from his belfry and lifts you away....">
  43. <GOTO <FIND-ROOM <PICK-ONE .BAT-DROPS>>>>
  44. <GOTO <FIND-ROOM <PICK-ONE .BAT-DROPS>>>>
  45. <PUT ,PRSVEC 2 <>>
  46. <ROOM-DESC>
  47. T>
  48. <DEFINE FWEEP (NUM "OPTIONAL" (SLP 0))
  49. #DECL ((NUM SLP) FIX)
  50. <REPEAT ((N .NUM))
  51. <AND <0? <SET N <- .N 1>>> <RETURN>>
  52. <IMAGE 7>
  53. <OR <0? .SLP> <SLEEP .SLP>>>>
  54. <PSETG BAT-DROPS
  55. '["MINE1"
  56. "MINE2"
  57. "MINE3"
  58. "MINE4"
  59. "MINE5"
  60. "MINE6"
  61. "MINE7"
  62. "TLADD"
  63. "BLADD"]>
  64. <GDECL (BAT-DROPS) <VECTOR [REST STRING]>>
  65. <SETG CAGE-TOP!-FLAG T>
  66. <DEFINE DUMBWAITER ("AUX" (PRSACT <1 ,PRSVEC>) (TB <FIND-OBJ "TBASK">)
  67. (TOP <FIND-ROOM "TSHAF">) (BOT <FIND-ROOM "BSHAF">)
  68. (FB <FIND-OBJ "FBASK">) (CT ,CAGE-TOP!-FLAG)
  69. (HERE ,HERE) (DUMMY ,DUMMY))
  70. #DECL ((PRSACT) VERB (FB TB) OBJECT (TOP BOT) ROOM (CT) <OR ATOM FALSE>
  71. (HERE) ROOM (DUMMY) <VECTOR [REST STRING]>)
  72. <COND (<==? .PRSACT ,RAISE!-WORDS>
  73. <COND (.CT
  74. <TELL <PICK-ONE ,DUMMY>>)
  75. (<REMOVE-OBJECT .TB>
  76. <REMOVE-OBJECT .FB>
  77. <INSERT-OBJECT .TB .TOP>
  78. <INSERT-OBJECT .FB .BOT>
  79. <TELL "The basket is raised to the top of the shaft.">
  80. <SETG CAGE-TOP!-FLAG T>)>)
  81. (<==? .PRSACT ,LOWER!-WORDS>
  82. <COND (<NOT .CT>
  83. <TELL <PICK-ONE .DUMMY>>)
  84. (<REMOVE-OBJECT .TB>
  85. <REMOVE-OBJECT .FB>
  86. <INSERT-OBJECT .TB .BOT>
  87. <INSERT-OBJECT .FB .TOP>
  88. <TELL "The basket is lowered to the bottom of the shaft.">
  89. <SETG CAGE-TOP!-FLAG <>>
  90. T)>)
  91. (<==? .PRSACT ,TAKE!-WORDS>
  92. <COND (<OR <AND .CT <==? .HERE .TOP>>
  93. <AND <NOT .CT> <==? .HERE .BOT>>>
  94. <TELL "The cage is securely fastened to the iron chain.">)
  95. (<TELL "I can't see that here.">)>)>>
  96. <DEFINE MACHINE-ROOM ("AUX" (PRSACT <1 ,PRSVEC>))
  97. #DECL ((PRSACT) VERB)
  98. <COND (<==? .PRSACT ,LOOK!-WORDS>
  99. <TELL
  100. "You are in a large room which seems to be air-conditioned. In one
  101. corner there is a machine (?) which is shaped somewhat like a clothes
  102. dryer. On the 'panel' there is a switch which is labelled in a
  103. dialect of Swahili. Fortunately, I know this dialect and the label
  104. translates to START. The switch does not appear to be manipulable by
  105. any human hand (unless the fingers are about 1/16 by 1/4 inch). On
  106. the front of the machine is a large lid.">
  107. <COND (<OOPEN? <FIND-OBJ "MACHI">>
  108. <TELL "The lid on the machine is open.">)
  109. (<TELL "The lid on the machine is closed.">)>)>>
  110. <DEFINE MACHINE-FUNCTION ("AUX" (DUMMY ,DUMMY)
  111. (PRSACT <1 ,PRSVEC>) (MACH <FIND-OBJ "MACHI">))
  112. #DECL ((PRSACT) VERB (MACH) OBJECT (DUMMY) <VECTOR [REST STRING]>)
  113. <COND
  114. (<==? ,HERE <FIND-ROOM "MACHI">>
  115. <COND
  116. (<==? <VNAME .PRSACT> OPEN!-WORDS>
  117. <COND (<OOPEN? .MACH>
  118. <TELL <PICK-ONE .DUMMY>>)
  119. (<TELL "The lid opens.">
  120. <PUT .MACH ,OOPEN? T>)>)
  121. (<==? <VNAME .PRSACT> CLOSE!-WORDS>
  122. <COND (<OOPEN? .MACH>
  123. <TELL "The lid closes.">
  124. <PUT .MACH ,OOPEN? <>>
  125. T)
  126. (<TELL <PICK-ONE .DUMMY>>)>)
  127. (<==? .PRSACT ,TAKE!-WORDS>)>)>>
  128. <DEFINE MSWITCH-FUNCTION ("AUX" (PRSACT <1 ,PRSVEC>) (C <FIND-OBJ "COAL">)
  129. (IMP <3 ,PRSVEC>) D (MACH <FIND-OBJ "MACHI">)
  130. (SCREW <FIND-OBJ "SCREW">))
  131. #DECL ((PRSACT) VERB (IMP) OBJECT (MACH SCREW C D) OBJECT)
  132. <COND (<==? .PRSACT ,TURN!-WORDS>
  133. <COND (<==? .IMP .SCREW>
  134. <COND (<OOPEN? .MACH>
  135. <TELL
  136. "The machine doesn't seem to want to do anything.">)
  137. (<TELL
  138. "The machine comes to life (figuratively) with a dazzling display of
  139. colored lights and bizarre noises. After a few moments, the
  140. excitement abates.">
  141. <COND (<MEMQ .C <OCONTENTS .MACH>>
  142. <PUT .MACH
  143. ,OCONTENTS
  144. <SPLICE-OUT .C <OCONTENTS .MACH>>>
  145. <PUT .MACH
  146. ,OCONTENTS
  147. (<SET D <FIND-OBJ "DIAMO">>
  148. !<OCONTENTS .MACH>)>
  149. <PUT .D ,OCAN .MACH>)
  150. (<NOT <EMPTY? <OCONTENTS .MACH>>>
  151. <PUT .MACH ,OCONTENTS (<SET D <FIND-OBJ "GUNK">>)>)
  152. (T)>)>)
  153. (<TELL "It seems that a " 1 <ODESC2 .IMP> " won't do.">)>)>>
  154. <DEFINE GUNK-FUNCTION ("AUX" (G <FIND-OBJ "GUNK">) (M <OCAN .G>))
  155. #DECL ((G) OBJECT (M) <OR OBJECT FALSE>)
  156. <COND (.M
  157. <PUT .M ,OCONTENTS <SPLICE-OUT .G <OCONTENTS .M>>>
  158. <PUT .G ,OCAN <>>
  159. <TELL
  160. "The slag turns out to be rather insubstantial, and crumbles into dust
  161. at your touch. It must not have been very valuable.">)>>
  162. <SETG SCORE-MAX <+ ,SCORE-MAX <SETG LIGHT-SHAFT 10>>>
  163. <DEFINE NO-OBJS ()
  164. <COND (<EMPTY? <AOBJS ,WINNER>>
  165. <SETG EMPTY-HANDED!-FLAG T>)
  166. (<SETG EMPTY-HANDED!-FLAG <>>)>
  167. <COND (<AND <==? ,HERE <FIND-ROOM "BSHAF">>
  168. <LIT? ,HERE>>
  169. <SCORE-UPD ,LIGHT-SHAFT>
  170. <SETG LIGHT-SHAFT 0>)>>
  171. <GDECL (LIGHT-SHAFT) FIX>
  172. <DEFINE CLIFF-FUNCTION ()
  173. <COND (<MEMQ <FIND-OBJ "RBOAT"> <AOBJS ,WINNER>>
  174. <SETG DEFLATE!-FLAG <>>)
  175. (<SETG DEFLATE!-FLAG T>)>>
  176. <DEFINE STICK-FUNCTION ("AUX" (PRSACT <1 ,PRSVEC>))
  177. #DECL ((PRSACT) VERB)
  178. <COND (<==? <VNAME .PRSACT> WAVE!-WORDS>
  179. <COND (<OR <==? ,HERE <FIND-ROOM "FALLS">>
  180. <==? ,HERE <FIND-ROOM "POG">>>
  181. <COND (<NOT ,RAINBOW!-FLAG>
  182. <TRO <FIND-OBJ "POT"> ,OVISON>
  183. <TELL
  184. "Suddenly, the rainbow appears to become solid and, I venture,
  185. walkable (I think the giveaway was the stairs and bannister).">
  186. <SETG RAINBOW!-FLAG T>)
  187. (<TELL
  188. "The rainbow seems to have become somewhat run-of-the-mill.">
  189. <SETG RAINBOW!-FLAG <>>)>)
  190. (<==? ,HERE <FIND-ROOM "RAINB">>
  191. <SETG RAINBOW!-FLAG <>>
  192. <JIGS-UP
  193. "The structural integrity of the rainbow seems to have left it,
  194. leaving you about 450 feet in the air, supported by water vapor.">)
  195. (<TELL
  196. "Very good.">)>)>>
  197. <DEFINE FALLS-ROOM ("AUX" (PRSACT <1 ,PRSVEC>))
  198. #DECL ((PRSACT) VERB)
  199. <COND (<==? .PRSACT ,LOOK!-WORDS>
  200. <TELL
  201. "You are at the top of Aragain Falls, an enormous waterfall with a
  202. drop of about 450 feet. The only path here is on the north end.
  203. There is a man-sized barrel here which you could fit into.">
  204. <COND (,RAINBOW!-FLAG
  205. <TELL
  206. "A solid rainbow spans the falls.">)
  207. (<TELL
  208. "A beautiful rainbow can be seen over the falls and to the east.">)>)>>
  209. <DEFINE DIGGER ("AUX" (PRSO <2 ,PRSVEC>))
  210. #DECL ((PRSO) OBJECT)
  211. <COND (<==? .PRSO <FIND-OBJ "SHOVE">>)
  212. (<TRNN .PRSO ,TOOLBIT>
  213. <TELL
  214. "Digging with the " 1 <ODESC2 .PRSO> " is slow and tedious.">)
  215. (<TELL
  216. "Digging with a " 1 <ODESC2 .PRSO> " is silly.">)>>
  217. <DEFINE DBOAT-FUNCTION ("AUX" (PRSACT <1 ,PRSVEC>) (HERE ,HERE) (PRSI <3 ,PRSVEC>)
  218. (DBOAT <FIND-OBJ "DBOAT">))
  219. #DECL ((DBOAT) OBJECT (PRSACT) VERB (HERE) ROOM (PRSI) <OR FALSE OBJECT>)
  220. <COND (<==? <VNAME .PRSACT> INFLA!-WORDS>
  221. <TELL
  222. "This boat will not inflate since some moron put a hole in it.">)
  223. (<==? <VNAME .PRSACT> PLUG!-WORDS>
  224. <COND (<==? .PRSI <FIND-OBJ "PUTTY">>
  225. <TELL
  226. "Well done. The boat is repaired.">
  227. <COND (<NOT <OROOM .DBOAT>>
  228. <DROP-OBJECT .DBOAT>
  229. <TAKE-OBJECT <FIND-OBJ "IBOAT">>)
  230. (<REMOVE-OBJECT <FIND-OBJ "DBOAT">>
  231. <INSERT-OBJECT <FIND-OBJ "IBOAT"> .HERE>)>)
  232. (<WITH-TELL .PRSI>)>)>>
  233. <DEFINE RBOAT-FUNCTION ("OPTIONAL" (ARG <>)
  234. "AUX" (PRSACT <1 ,PRSVEC>) (RBOAT <FIND-OBJ "RBOAT">)
  235. (IBOAT <FIND-OBJ "IBOAT">) (HERE ,HERE))
  236. #DECL ((ARG) <OR FALSE ATOM> (PRSACT) VERB (IBOAT RBOAT) OBJECT (HERE) ROOM)
  237. <COND (.ARG <>)
  238. (<==? .PRSACT ,BOARD!-WORDS>
  239. <COND (<MEMQ <FIND-OBJ "STICK"> <AOBJS ,WINNER>>
  240. <TELL
  241. "There is a hissing sound and the boat deflates.">
  242. <REMOVE-OBJECT .RBOAT>
  243. <INSERT-OBJECT <FIND-OBJ "DBOAT"> .HERE>
  244. T)>)
  245. (<==? .PRSACT ,DISEM!-WORDS>
  246. <AND <MEMBER "RIVR" <SPNAME <RID .HERE>>>
  247. <JIGS-UP
  248. "Unfortunately, that leaves you in the water, where you drown.">>)
  249. (<==? <VNAME .PRSACT> DEFLA!-WORDS>
  250. <COND (<==? <AVEHICLE ,WINNER> .RBOAT>
  251. <TELL
  252. "You can't deflate the boat while you're in it.">)
  253. (<NOT <MEMQ .RBOAT <ROBJS .HERE>>>
  254. <TELL
  255. "The boat must be on the ground to be deflated.">)
  256. (<TELL
  257. "The boat deflates.">
  258. <SETG DEFLATE!-FLAG T>
  259. <REMOVE-OBJECT .RBOAT>
  260. <INSERT-OBJECT .IBOAT .HERE>)>)>>
  261. <DEFINE IBOAT-FUNCTION ("AUX" (PRSACT <1 ,PRSVEC>) (IBOAT <FIND-OBJ "IBOAT">)
  262. (RBOAT <FIND-OBJ "RBOAT">) (HERE ,HERE))
  263. #DECL ((PRSACT) VERB (IBOAT RBOAT) OBJECT (HERE) ROOM)
  264. <COND (<==? <VNAME .PRSACT> INFLA!-WORDS>
  265. <COND (<NOT <MEMQ .IBOAT <ROBJS .HERE>>>
  266. <TELL
  267. "The boat must be on the ground to be inflated.">)
  268. (<MEMQ <FIND-OBJ "PUMP"> <AOBJS ,WINNER>>
  269. <TELL
  270. "The boat inflates and appears seaworthy.">
  271. <SETG DEFLATE!-FLAG <>>
  272. <REMOVE-OBJECT .IBOAT>
  273. <INSERT-OBJECT .RBOAT .HERE>)
  274. (<TELL
  275. "I don't think you have enough lung-power to inflate this boat.">)>)>>
  276. <DEFINE OVER-FALLS ()
  277. <COND (<==? <1 ,PRSVEC> ,LOOK!-WORDS>)
  278. (<JIGS-UP
  279. "Oh dear, you seem to have gone over Aragain Falls. Not a very smart
  280. thing to do, apparently.">)>>
  281. <SETG BUOY-FLAG!-FLAG T>
  282. <DEFINE SHAKE ("AUX" (PRSOBJ <2 ,PRSVEC>) (HERE ,HERE))
  283. #DECL ((PRSOBJ) OBJECT (HERE) ROOM)
  284. <COND (<OBJECT-ACTION>)
  285. (<AND <NOT <OOPEN? .PRSOBJ>>
  286. <NOT <EMPTY? <OCONTENTS .PRSOBJ>>>
  287. <TELL
  288. "It sounds like there is something inside the " 1 <ODESC2 .PRSOBJ> ".">>)
  289. (<AND <OOPEN? .PRSOBJ>
  290. <NOT <EMPTY? <OCONTENTS .PRSOBJ>>>>
  291. <MAPF <>
  292. <FUNCTION (X)
  293. #DECL ((X) OBJECT)
  294. <PUT .X ,OCAN <>>
  295. <INSERT-OBJECT .X .HERE>>
  296. <OCONTENTS .PRSOBJ>>
  297. <PUT .PRSOBJ ,OCONTENTS ()>
  298. <TELL
  299. "All of the objects spill onto the floor.">)>>
  300. <DEFINE RIVR4-ROOM ()
  301. <AND <MEMQ <FIND-OBJ "BUOY"> <AOBJS ,WINNER>>
  302. ,BUOY-FLAG!-FLAG
  303. <TELL
  304. "Something seems funny about the feel of the buoy.">
  305. <SETG BUOY-FLAG!-FLAG <>>>>
  306. <DEFINE BEACH-ROOM ("AUX" (PRSACT <1 ,PRSVEC>) (SHOV <FIND-OBJ "SHOVE">)
  307. (HERE ,HERE) CNT)
  308. #DECL ((PRSACT) VERB (SHOV) OBJECT (HERE) ROOM (CNT) FIX)
  309. <COND (<AND <==? <VNAME .PRSACT> DIG!-WORDS>
  310. <==? .SHOV <2 ,PRSVEC>>>
  311. <PUT .HERE ,RVARS <SET CNT <+ 1 <RVARS .HERE>>>>
  312. <COND (<G? .CNT 4>
  313. <PUT .HERE ,RVARS 0>
  314. <JIGS-UP "The hole collapses, smothering you.">)
  315. (<==? .CNT 4>
  316. <TELL "You can see a small statue here in the sand.">
  317. <TRO <FIND-OBJ "STATU"> ,OVISON>
  318. <PUT .HERE ,RVARS .CNT>)
  319. (<L? .CNT 0>)
  320. (<TELL <NTH ,BDIGS .CNT>>)>)>>
  321. <DEFINE TCAVE-ROOM ("AUX" (PRSACT <1 ,PRSVEC>) (SHOV <FIND-OBJ "SHOVE">)
  322. (HERE ,HERE) CNT)
  323. #DECL ((PRSACT) VERB (SHOV) OBJECT (HERE) ROOM (CNT) FIX)
  324. <COND (<AND <==? <VNAME .PRSACT> DIG!-WORDS>
  325. <==? <2 ,PRSVEC> .SHOV>>
  326. <COND (<MEMQ <FIND-OBJ "GUANO"> <ROBJS .HERE>>
  327. <PUT .HERE ,RVARS <SET CNT <+ 1 <RVARS .HERE>>>>
  328. <COND (<G? .CNT 3>
  329. <TELL "This is getting you nowhere.">)
  330. (<TELL <NTH ,CDIGS .CNT>>)>)
  331. (<TELL
  332. "There's nothing to dig into here.">)>)>>
  333. <PSETG CDIGS
  334. '["You are digging into a pile of bat guano."
  335. "You seem to be getting knee deep in guano."
  336. "You are covered with bat turds, cretin."]>
  337. <PSETG BDIGS
  338. '["You seem to be digging a hole here."
  339. "The hole is getting deeper, but that's about it."
  340. "You are surrounded by a wall of sand on all sides."]>
  341. <GDECL (BDIGS CDIGS) <VECTOR [REST STRING]>>
  342. <DEFINE GERONIMO ()
  343. <COND (<==? ,HERE <FIND-ROOM "BARRE">>
  344. <JIGS-UP
  345. "I didn't think you would REALLY try to go over the falls in a
  346. barrel. It seems that some 450 feet below, you were met by a number
  347. of unfriendly rocks and boulders, causing your immediate demise. Is
  348. this what 'over a barrel' means?">)
  349. (<TELL
  350. "Wasn't he an Indian?">)>>
  351. <PSETG SWIMYUKS
  352. '["I don't really see how."
  353. "I think that swimming is best performed in water."
  354. "Perhaps it is your head that is swimming."]>
  355. <GDECL (SWIMYUKS) <VECTOR [REST STRING]>>
  356. <DEFINE SWIMMER ("AUX" (SWIMYUKS ,SWIMYUKS))
  357. #DECL ((SWIMYUKS) <VECTOR [REST STRING]>)
  358. <COND (<RTRNN ,HERE ,RFILLBIT>
  359. <TELL
  360. "Swimming is not allowed in this dungeon.">)
  361. (<TELL <PICK-ONE .SWIMYUKS>>)>>
  362. <DEFINE GRUE-FUNCTION ("AUX" (PRSA <1 ,PRSVEC>))
  363. #DECL ((PRSA) VERB)
  364. <COND (<==? .PRSA ,EXAMI!-WORDS>
  365. <TELL
  366. "The grue is a sinister, lurking presence in the dark places of the
  367. earth. Its favorite diet is adventurers, but its insatiable
  368. appetite is tempered by its fear of light. No grue has ever been
  369. seen by the light of day, and few have survived its fearsome jaws
  370. to tell the tale.">)
  371. (<==? .PRSA ,FIND!-WORDS>
  372. <TELL
  373. "There is no grue here, but I'm sure there is at least one lurking
  374. in the darkness nearby. I wouldn't let my light go out if I were
  375. you!">)>>
  376. <SETG BTIE!-FLAG <>>
  377. <SETG BINF!-FLAG <>>
  378. <DEFINE BALLOON BALLACT ("OPTIONAL" (ARG <>)
  379. "AUX" (PRSVEC ,PRSVEC)
  380. (BALL <FIND-OBJ "BALLO">) (PRSA <1 .PRSVEC>)
  381. (PRSO <2 .PRSVEC>) (CONT <FIND-OBJ "RECEP">) M
  382. (BINF ,BINF!-FLAG) BLABE)
  383. #DECL ((ARG) <OR ATOM FALSE> (BLABE BALL CONT RECEP) OBJECT (PRSA) VERB
  384. (PRSO) <OR OBJECT DIRECTION> (M) <OR FALSE <PRIMTYPE VECTOR>>
  385. (PRSVEC) <VECTOR [3 ANY]> (BINF) <OR FALSE ROOM>
  386. (M) <OR FALSE <<PRIMTYPE VECTOR> ANY ROOM>>)
  387. <COND (<==? .ARG READ-OUT>
  388. <COND (<==? .PRSA ,LOOK!-WORDS>
  389. <COND (.BINF
  390. <TELL
  391. "The cloth bag is inflated and there is a "
  392. 1
  393. <ODESC2 .BINF>
  394. " burning in the receptacle.">)
  395. (<TELL "The cloth bag is draped over the the basket.">)>
  396. <COND (,BTIE!-FLAG
  397. <TELL "The balloon is tied to the hook.">)>)>
  398. <RETURN <> .BALLACT>)>
  399. <COND (<==? .ARG READ-IN>
  400. <COND (<==? .PRSA ,WALK!-WORDS>
  401. <COND (<SET M
  402. <MEMQ <CHTYPE <2 .PRSVEC> ATOM>
  403. <REXITS ,HERE>>>
  404. <COND (,BTIE!-FLAG
  405. <TELL "You are tied to the ledge.">
  406. <RETURN T .BALLACT>)
  407. (ELSE
  408. <AND <NOT <RTRNN <2 .M> ,RMUNGBIT>>
  409. <SETG BLOC <2 .M>>>
  410. <RETURN <> .BALLACT>)>)
  411. (<TELL
  412. "I'm afraid you can't control the balloon in this way.">
  413. <RETURN T .BALLACT>)>)
  414. (<AND <==? .PRSA ,TAKE!-WORDS>
  415. <==? ,BINF!-FLAG .PRSO>>
  416. <TELL "You don't really want to hold a burning "
  417. 1
  418. <ODESC2 .PRSO>
  419. ".">
  420. <RETURN T .BALLACT>)
  421. (<AND <==? .PRSA ,PUT!-WORDS>
  422. <==? <3 .PRSVEC> .CONT>
  423. <NOT <EMPTY? <OCONTENTS .CONT>>>>
  424. <TELL "The receptacle is already occupied.">
  425. <RETURN T .BALLACT>)
  426. (<RETURN <> .BALLACT>)>)>
  427. <COND (<==? .PRSA ,BURN!-WORDS>
  428. <COND (<MEMQ .PRSO <OCONTENTS .CONT>>
  429. <TELL "The "
  430. 1
  431. <ODESC2 .PRSO>
  432. " burns inside the receptacle.">
  433. <SETG BURNUP-INT <CLOCK-INT ,BRNIN <* <OSIZE .PRSO> 20>>>
  434. <TRO .PRSO ,FLAMEBIT>
  435. <TRZ .PRSO <+ ,TAKEBIT ,READBIT>>
  436. <PUT .PRSO ,OLIGHT? 1>
  437. <COND (,BINF!-FLAG)
  438. (<TELL
  439. "The cloth bag inflates as it fills with hot air.">
  440. <COND (<NOT ,BLAB!-FLAG>
  441. <PUT .BALL
  442. ,OCONTENTS
  443. (<SET BLABE <FIND-OBJ "BLABE">>
  444. !<OCONTENTS .BALL>)>
  445. <PUT .BLABE ,OCAN .BALL>)>
  446. <SETG BLAB!-FLAG T>
  447. <SETG BINF!-FLAG .PRSO>
  448. <CLOCK-INT ,BINT 3>)>)>)
  449. (<AND <==? .PRSA ,DISEM!-WORDS>
  450. <RTRNN ,HERE ,RLANDBIT>>
  451. <COND (,BINF!-FLAG
  452. <CLOCK-INT ,BINT 3>)>
  453. <>)
  454. (<==? .PRSA ,C-INT!-WORDS>
  455. <COND (<OR <AND <OOPEN? .CONT> ,BINF!-FLAG>
  456. <MEMBER "LEDG" <SPNAME <RID ,HERE>>>>
  457. <RISE-AND-SHINE .BALL ,HERE>)
  458. (<DECLINE-AND-FALL .BALL ,HERE>)>)>>
  459. <SETG BLAB!-FLAG <>>
  460. <GDECL (BURNUP-INT BINT) CEVENT>
  461. <DEFINE RISE-AND-SHINE (BALL HERE
  462. "AUX" (S <TOP ,SCRSTR>) M
  463. (IN? <==? <AVEHICLE ,WINNER> .BALL>) (BL ,BLOC)
  464. FOO)
  465. #DECL ((BALL) OBJECT (HERE BL) ROOM (M) <OR FALSE STRING> (S) STRING
  466. (IN?) <OR ATOM FALSE> (FOO) CEVENT)
  467. <CLOCK-INT ,BINT 3>
  468. <COND (<SET M <MEMBER "VAIR" <SPNAME <RID .BL>>>>
  469. <COND (<=? <REST .M 4> "4">
  470. <CLOCK-DISABLE ,BURNUP-INT>
  471. <CLOCK-DISABLE ,BINT>
  472. <REMOVE-OBJECT .BALL>
  473. <INSERT-OBJECT <FIND-OBJ "DBALL"> <FIND-ROOM "VLBOT">>
  474. <COND (.IN?
  475. <JIGS-UP
  476. "Your balloon has hit the rim of the volcano, ripping the cloth and
  477. causing you a 500 foot drop. Did you get your flight insurance?">)
  478. (<TELL
  479. "You hear a boom and notice that the balloon is falling to the ground.">)>
  480. <SETG BLOC <FIND-ROOM "VLBOT">>)
  481. (<SUBSTRUC <SPNAME <RID .BL>> 0 4 .S>
  482. <PUT .S 5 <CHTYPE <+ <CHTYPE <5 .M> FIX> 1> CHARACTER>>
  483. <COND (.IN?
  484. <GOTO <SETG BLOC <FIND-ROOM .S>>>
  485. <TELL "The balloon ascends.">
  486. <ROOM-INFO T>)
  487. (<PUT-BALLOON .BALL .BL .S "ascends.">)>)>)
  488. (<SET M <MEMBER "LEDG" <SPNAME <RID .BL>>>>
  489. <SUBSTRUC "VAIR" 0 4 .S>
  490. <PUT .S 5 <5 .M>>
  491. <COND (.IN?
  492. <GOTO <SETG BLOC <FIND-ROOM .S>>>
  493. <TELL "The balloon leaves the ledge.">
  494. <ROOM-INFO T>)
  495. (<CLOCK-INT ,VLGIN 10>
  496. <PUT-BALLOON .BALL .BL .S "floats away. It seems to be ascending,
  497. due to its light load.">)>)
  498. (.IN?
  499. <GOTO <SETG BLOC <FIND-ROOM "VAIR1">>>
  500. <TELL "The balloon rises slowly from the ground.">
  501. <ROOM-INFO T>)
  502. (<PUT-BALLOON .BALL .BL "VAIR1" "lifts off.">)>>
  503. <DEFINE PUT-BALLOON (BALL HERE THERE STR)
  504. #DECL ((BALL) OBJECT (HERE) ROOM (THERE STR) STRING)
  505. <AND <MEMBER "LEDG" <SPNAME <RID ,HERE>>>
  506. <TELL "You watch as the balloon slowly " 1 .STR>>
  507. <REMOVE-OBJECT .BALL>
  508. <INSERT-OBJECT .BALL <SETG BLOC <FIND-ROOM .THERE>>>>
  509. <GDECL (BLOC) ROOM>
  510. <DEFINE DECLINE-AND-FALL (BALL HERE "AUX" (S <TOP ,SCRSTR>) M (BL ,BLOC)
  511. (IN? <==? <AVEHICLE ,WINNER> .BALL>) FOO)
  512. #DECL ((BALL) OBJECT (HERE BL) ROOM (M) <OR FALSE STRING> (S) STRING
  513. (IN?) <OR ATOM FALSE> (FOO) CEVENT)
  514. <CLOCK-INT ,BINT 3>
  515. <COND (<SET M <MEMBER "VAIR" <SPNAME <RID .BL>>>>
  516. <COND (<=? <REST .M 4> "1">
  517. <COND (.IN?
  518. <GOTO <SETG BLOC <FIND-ROOM "VLBOT">>>
  519. <COND (,BINF!-FLAG
  520. <TELL "The balloon has landed.">
  521. <ROOM-INFO T>)
  522. (T
  523. <REMOVE-OBJECT .BALL>
  524. <INSERT-OBJECT <FIND-OBJ "DBALL"> ,BLOC>
  525. <PUT ,WINNER ,AVEHICLE <>>
  526. <CLOCK-DISABLE <SET FOO <CLOCK-INT ,BINT 0>>>
  527. <TELL
  528. "You have landed, but the balloon did not survive.">)>)
  529. (<PUT-BALLOON .BALL .BL "VLBOT" "lands.">)>)
  530. (<SUBSTRUC <SPNAME <RID .BL>> 0 4 .S>
  531. <PUT .S 5 <CHTYPE <- <CHTYPE <5 .M> FIX> 1> CHARACTER>>
  532. <COND (.IN?
  533. <GOTO <SETG BLOC <FIND-ROOM .S>>>
  534. <TELL "The balloon descends.">
  535. <ROOM-INFO T>)
  536. (<PUT-BALLOON .BALL .BL .S "descends.">)>)>)>>
  537. <DEFINE WIRE-FUNCTION ("AUX" (PV ,PRSVEC) (PRSA <1 .PV>) (PRSO <2 .PV>)
  538. (PRSI <3 .PV>) (BINT ,BINT))
  539. #DECL ((BINT) CEVENT (PV) VECTOR (PRSA) VERB (PRSO PRSI) PRSOBJ)
  540. <COND (<==? .PRSA ,TIE!-WORDS>
  541. <COND (<AND <==? .PRSO <FIND-OBJ "BROPE">>
  542. <OR <==? .PRSI <FIND-OBJ "HOOK1">>
  543. <==? .PRSI <FIND-OBJ "HOOK2">>>>
  544. <SETG BTIE!-FLAG T>
  545. <CLOCK-DISABLE .BINT>
  546. <TELL "The balloon is fastened to the hook.">)>)
  547. (<AND <==? .PRSA ,UNTIE!-WORDS>
  548. <==? .PRSO <FIND-OBJ "BROPE">>>
  549. <COND (,BTIE!-FLAG
  550. <CLOCK-ENABLE <SET BINT <CLOCK-INT ,BINT 3>>>
  551. <SETG BTIE!-FLAG <>>
  552. <TELL "The wire falls off of the hook.">)
  553. (<TELL "The wire is not tied to anything.">)>)>>
  554. <DEFINE BURNUP ("AUX" (R <FIND-OBJ "RECEP">) (OBJ <1 <OCONTENTS .R>>))
  555. #DECL ((R OBJ) OBJECT)
  556. <PUT .R ,OCONTENTS <SPLICE-OUT .OBJ <OCONTENTS .R>>>
  557. <TELL
  558. "It seems that the " 1 <ODESC2 .OBJ> " has burned out, and the cloth
  559. bag starts to collapse.">
  560. <SETG BINF!-FLAG <>>
  561. T>
  562. <SETG SAFE-FLAG!-FLAG <>>
  563. <DEFINE SAFE-ROOM ("AUX" (PRSA <1 ,PRSVEC>))
  564. #DECL ((PRSA) VERB)
  565. <COND (<==? .PRSA ,LOOK!-WORDS>
  566. <TELL
  567. "You are in a dusty old room which is virtually featureless, except
  568. for an exit on the north side."
  569. 1
  570. <COND (<NOT ,SAFE-FLAG!-FLAG>
  571. "
  572. Imbedded in the far wall, there is a rusty old box. It appears that
  573. the box is somewhat damaged, since an oblong hole has been chipped
  574. out of the front of it.")
  575. ("
  576. On the far wall is a rusty box, whose door has been blown off.")>>)>>
  577. <DEFINE SAFE-FUNCTION ("AUX" (PRSA <1 ,PRSVEC>))
  578. #DECL ((PRSA) VERB)
  579. <COND (<==? .PRSA ,TAKE!-WORDS>
  580. <TELL "The box is imbedded in the wall.">)
  581. (<==? .PRSA ,OPEN!-WORDS>
  582. <COND (,SAFE-FLAG!-FLAG <TELL "The box has no door!">)
  583. (<TELL "The box is rusted and will not open.">)>)
  584. (<==? .PRSA ,CLOSE!-WORDS>
  585. <COND (,SAFE-FLAG!-FLAG <TELL "The box has no door!">)
  586. (<TELL "The box is not open, chomper!">)>)
  587. (<==? .PRSA ,BLAST!-WORDS> <TELL "What do you expect, BOOM?">)>>
  588. <PSETG BRICK-BOOM
  589. "Now you've done it. It seems that the brick has other properties
  590. than weight, namely the ability to blow you to smithereens.">
  591. <DEFINE BRICK-FUNCTION ("AUX" (PRSA <1 ,PRSVEC>))
  592. #DECL ((PRSA) VERB)
  593. <COND (<==? .PRSA ,BURN!-WORDS> <JIGS-UP ,BRICK-BOOM>)>>
  594. <DEFINE FUSE-FUNCTION ("AUX" (PRSA <1 ,PRSVEC>) (FUSE <FIND-OBJ "FUSE">)
  595. (BRICK <FIND-OBJ "BRICK">) BRICK-ROOM OC)
  596. #DECL ((PRSA) VERB (FUSE BRICK) OBJECT (BRICK-ROOM) <OR ROOM FALSE>
  597. (OC) <OR OBJECT FALSE>)
  598. <COND (<==? .PRSA ,BURN!-WORDS>
  599. <TELL "The wire starts to burn.">
  600. <PUT .FUSE ,ORAND [0 <CLOCK-INT ,FUSIN 2>]>)
  601. (<==? .PRSA ,C-INT!-WORDS>
  602. <TRZ .FUSE ,OVISON>
  603. <COND (<==? <OCAN .FUSE> .BRICK>
  604. <TRZ .BRICK ,OVISON>
  605. <COND (<SET OC <OCAN .BRICK>>
  606. <SET BRICK-ROOM <OROOM .OC>>)
  607. (<SET BRICK-ROOM <OROOM .BRICK>>)>
  608. <OR .BRICK-ROOM <SET BRICK-ROOM ,HERE>>
  609. <COND (<==? .BRICK-ROOM ,HERE>
  610. <MUNG-ROOM .BRICK-ROOM
  611. "The way is blocked by debris from an explosion.">
  612. <JIGS-UP ,BRICK-BOOM>)
  613. (<==? .BRICK-ROOM <FIND-ROOM "SAFE">>
  614. <CLOCK-INT ,SAFIN 5>
  615. <SETG MUNGED-ROOM <OROOM .BRICK>>
  616. <TELL "There is an explosion nearby.">
  617. <COND (<MEMQ .BRICK <OCONTENTS <FIND-OBJ "SSLOT">>>
  618. <TRZ <FIND-OBJ "SSLOT"> ,OVISON>
  619. <PUT <FIND-OBJ "SAFE"> ,OOPEN? T>
  620. <SETG SAFE-FLAG!-FLAG T>)>)
  621. (<TELL "There is an explosion nearby.">
  622. <CLOCK-INT ,SAFIN 5>
  623. <SETG MUNGED-ROOM .BRICK-ROOM>
  624. <MAPF <>
  625. <FUNCTION (X)
  626. <COND (<CAN-TAKE? .X>
  627. <TRZ .X ,OVISON>)>>
  628. <ROBJS .BRICK-ROOM>>
  629. <COND (<==? .BRICK-ROOM <FIND-ROOM "LROOM">>
  630. <MAPF <>
  631. <FUNCTION (X) #DECL ((X) OBJECT)
  632. <PUT .X ,OCAN <>>>
  633. <OCONTENTS <FIND-OBJ "TCASE">>>
  634. <PUT <FIND-OBJ "TCASE"> ,OCONTENTS ()>)>)>)
  635. (<OR <NOT <OROOM .FUSE>> <==? ,HERE <OROOM .FUSE>>>
  636. <TELL "The wire rapidly burns into nothingness.">)>)>>
  637. <DEFINE SAFE-MUNG ("AUX" (RM ,MUNGED-ROOM))
  638. #DECL ((RM) ROOM)
  639. <COND (<==? ,HERE .RM>
  640. <JIGS-UP
  641. <COND (<RTRNN .RM ,RHOUSEBIT>
  642. "The house shakes, and the ceiling of the room you're in collapses,
  643. turning you into a pancake.")
  644. ("The room trembles and 50,000 pounds of rock fall on you, turning you
  645. into a pancake.")>>)
  646. (<TELL
  647. "You may recall your recent explosion. Well, probably as a result of
  648. that, you hear an ominous rumbling, as if one of the rooms in the
  649. dungeon had collapsed.">
  650. <AND <==? .RM <FIND-ROOM "SAFE">>
  651. <CLOCK-INT ,LEDIN 8>>)>
  652. <MUNG-ROOM <OR <OROOM <FIND-OBJ "BRICK">> ,HERE>
  653. "The way is blocked by debris from an explosion.">>
  654. <DEFINE LEDGE-MUNG ("AUX" (RM <FIND-ROOM "LEDG4">))
  655. #DECL ((RM) ROOM)
  656. <COND (<==? ,HERE .RM>
  657. <COND (<AVEHICLE ,WINNER>
  658. <COND (,BTIE!-FLAG
  659. <SET RM <FIND-ROOM "VLBOT">>
  660. <SETG BLOC .RM>
  661. <REMOVE-OBJECT <FIND-OBJ "BALLO">>
  662. <INSERT-OBJECT <FIND-OBJ "DBALL"> .RM>
  663. <SETG BTIE!-FLAG <>>
  664. <SETG BINF!-FLAG <>>
  665. <CLOCK-DISABLE ,BINT>
  666. <CLOCK-DISABLE ,BRNIN>
  667. <JIGS-UP
  668. "The ledge collapses, probably as a result of the explosion. A large
  669. chunk of it, which is attached to the hook, drags you down to the
  670. ground. Fatally.">)
  671. (<TELL "The ledge collapses, leaving you with no place to land.">)>)
  672. (T
  673. <JIGS-UP
  674. "The force of the explosion has caused the ledge to collapse
  675. belatedly.">)>)
  676. (<TELL "The ledge collapses, giving you a narrow escape.">)>
  677. <MUNG-ROOM .RM "The ledge has collapsed and cannot be landed on.">>
  678. <DEFINE LEDGE-FUNCTION ("AUX" (PRSA <1 ,PRSVEC>))
  679. #DECL ((PRSA) VERB)
  680. <COND (<==? .PRSA ,WALK-IN!-WORDS>
  681. <AND ,SAFE-FLAG!-FLAG
  682. <TELL
  683. "Behind you, the walls of the safe room collapse into rubble.">
  684. <SETG SAFE-FLAG!-FLAG <>>>)
  685. (<==? .PRSA ,LOOK!-WORDS>
  686. <TELL
  687. "You are on a wide ledge high into the volcano. The rim of the
  688. volcano is about 200 feet above and there is a precipitous drop below
  689. to the bottom." 1
  690. <COND (<RTRNN <FIND-ROOM "SAFE"> ,RMUNGBIT>
  691. " The way to the south is blocked by rubble.")
  692. (" There is a small door to the south.")>>)>>
  693. <DEFINE BLAST ()
  694. <COND (<==? ,HERE <FIND-ROOM "SAFE">>)
  695. (<TELL "I don't really know how to do that.">)>>
  696. <DEFINE VOLGNOME ()
  697. <COND (<MEMBER "LEDG" <SPNAME <RID ,HERE>>>
  698. <TELL
  699. "A volcano gnome seems to walk straight out of the wall and says
  700. 'I have a very busy appointment schedule and little time to waste on
  701. tresspassers, but for a small fee, I'll show you the way out.' You
  702. notice the gnome nervously glancing at his watch.">
  703. <INSERT-OBJECT <FIND-OBJ "GNOME"> ,HERE>)
  704. (<CLOCK-INT ,VLGIN 1>)>>
  705. <SETG GNOME-DOOR!-FLAG <SETG GNOME-FLAG!-FLAG <>>>
  706. <DEFINE GNOME-FUNCTION ("AUX" (PV ,PRSVEC) (PRSA <1 .PV>) (PRSO <2 .PV>))
  707. #DECL ((PV) VECTOR (PRSA) VERB (PRSO) PRSOBJ)
  708. <COND (<AND <OR <==? .PRSA ,GIVE!-WORDS>
  709. <==? .PRSA ,THROW!-WORDS>>
  710. <TYPE? .PRSO OBJECT>
  711. <COND (<N==? <OTVAL .PRSO> 0>
  712. <TELL
  713. "Thank you very much for the " 1 <ODESC2 .PRSO> ". I don't believe
  714. I've ever seen one as beautiful. 'Follow me', he says, and a door
  715. appears on the west end of the ledge. Through the door, you can see
  716. a narrow chimney sloping steeply downward.">
  717. <SETG GNOME-DOOR!-FLAG T>)
  718. (<TELL
  719. "'That wasn't quite what I had in mind', he says, crunching the
  720. " 1 <ODESC2 .PRSO> " in his rock-hard hands.">
  721. <REMOVE-OBJECT .PRSO>)>>)
  722. (<==? .PRSA ,C-INT!-WORDS>
  723. <TELL
  724. "The gnome glances at his watch. 'Oops. I'm late for an
  725. appointment!' He disappears, leaving you alone on the ledge.">
  726. <REMOVE-OBJECT <FIND-OBJ "GNOME">>)
  727. (<TELL
  728. "The gnome appears increasingly nervous.">
  729. <OR ,GNOME-FLAG!-FLAG <CLOCK-INT ,GNOIN 5>>
  730. <SETG GNOME-FLAG!-FLAG T>)>>