act2.1 24 KB

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