act2.37 27 KB

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