act3.18 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <DEFINE COKE-BOTTLES ("AUX" (PV ,PRSVEC) (BOTTL <2 .PV>) (VB <1 .PV>))
  2. #DECL ((PV) <VECTOR VERB> (VB) VERB (BOTTL) OBJECT)
  3. <COND (<OR <==? .VB ,THROW!-WORDS>
  4. <==? <VNAME .VB> MUNG!-WORDS>>
  5. <TELL
  6. "Congratulations! You've managed to break all those bottles.
  7. Fortunately for your feet, they were made of magic glass and disappear
  8. immediately.">
  9. <TRZ .BOTTL ,OVISON>
  10. <PUT .BOTTL ,OSIZE 0>
  11. T)>>
  12. <DEFINE HEAD-FUNCTION ("AUX" (PV ,PRSVEC) (VB <1 .PV>) (NL ())
  13. (LCASE <FIND-OBJ "LCASE">))
  14. #DECL ((PV) <VECTOR VERB> (VB) VERB (NL) <LIST [REST OBJECT]>
  15. (LCASE) OBJECT)
  16. <COND (<N==? .VB ,READ!-WORDS>
  17. <TELL
  18. "Although the implementers are dead, they foresaw that some cretin
  19. would tamper with their remains. Therefore, they took steps to
  20. prevent this.">
  21. <SET NL <ROB-ADV ,WINNER .NL>>
  22. <SET NL <ROB-ROOM ,HERE .NL 100>>
  23. <COND (<NOT <EMPTY? .NL>>
  24. <OR <OROOM .LCASE> <INSERT-OBJECT .LCASE <FIND-ROOM "LROOM">>>
  25. <PUT .LCASE ,OCONTENTS (!<OCONTENTS .LCASE> !.NL)>)>
  26. <JIGS-UP
  27. "Unfortunately, we've run out of poles. Therefore, in punishment for
  28. your most grievous sin, we shall deprive you of all your valuables,
  29. and of your life.">
  30. T)>>
  31. <SETG THEN 0>
  32. <SETG BUCKET-TOP!-FLAG <>>
  33. <DEFINE BUCKET ("OPTIONAL" (ARG <>)
  34. "AUX" (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>)
  35. (W <FIND-OBJ "WATER">) (BUCK <FIND-OBJ "BUCKE">))
  36. #DECL ((ARG) <OR FALSE ATOM> (PV) VECTOR (PA) VERB
  37. (PO) <OR DIRECTION FALSE OBJECT> (W BUCK) OBJECT)
  38. <COND (<==? .ARG READ-IN> <>)
  39. (<AND <==? .PA ,C-INT!-WORDS>
  40. <COND (<MEMQ .W <OCONTENTS .BUCK>>
  41. <REMOVE-OBJECT .W>
  42. <>)
  43. (T)>>)
  44. (<==? .ARG READ-OUT>
  45. <COND (<AND <==? <OCAN .W> .BUCK> <NOT ,BUCKET-TOP!-FLAG>>
  46. <TELL "The bucket rises and comes to a stop.">
  47. <SETG BUCKET-TOP!-FLAG T>
  48. <PASS-THE-BUCKET <FIND-ROOM "TWELL"> .PV .BUCK>
  49. <CLOCK-INT ,BCKIN 100>
  50. <>)
  51. (<AND ,BUCKET-TOP!-FLAG <N==? <OCAN .W> .BUCK>>
  52. <TELL "The bucket descends and comes to a stop.">
  53. <SETG BUCKET-TOP!-FLAG <>>
  54. <PASS-THE-BUCKET <FIND-ROOM "BWELL"> .PV .BUCK>)>)>>
  55. <DEFINE PASS-THE-BUCKET (R PV B "AUX" (PVS <2 .PV>))
  56. #DECL ((R) ROOM (B) OBJECT (PV) VECTOR (PVS) <OR FALSE OBJECT DIRECTION>)
  57. <PUT .PV 2 <>>
  58. <REMOVE-OBJECT .B>
  59. <INSERT-OBJECT .B .R>
  60. <COND (<==? <AVEHICLE ,WINNER> .B>
  61. <GOTO .R>
  62. <ROOM-INFO>)>
  63. <PUT .PV 2 .PVS>>
  64. <DEFINE EATME-FUNCTION ("AUX" R C (PV ,PRSVEC) (HERE ,HERE))
  65. #DECL ((PV) VECTOR (C) OBJECT (PA) VERB (HERE R) ROOM)
  66. <COND (<AND <==? <1 .PV> ,EAT!-WORDS>
  67. <==? <2 .PV> <SET C <FIND-OBJ "ECAKE">>>
  68. <==? .HERE <FIND-ROOM "ALICE">>>
  69. <TELL
  70. "Suddenly, the room appears to have become very large.">
  71. <KILL-OBJ .C ,WINNER>
  72. <SET R <FIND-ROOM "ALISM">>
  73. <PUT .R ,ROBJS <ROBJS .HERE>>
  74. <MAPF <>
  75. <FUNCTION (X) #DECL ((X) OBJECT)
  76. <PUT .X ,OSIZE <* 64 <OSIZE .X>>>
  77. <PUT .X ,OROOM .R>>
  78. <ROBJS .HERE>>
  79. <GOTO .R>)>>
  80. <DEFINE CAKE-FUNCTION ("AUX" (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>) (PI <3 .PV>)
  81. (RICE <FIND-OBJ "RDICE">) (OICE <FIND-OBJ "ORICE">)
  82. (BICE <FIND-OBJ "BLICE">) (HERE ,HERE) R)
  83. #DECL ((PV) VECTOR (PA) VERB (PI PO) <OR FALSE OBJECT>
  84. (RICE OICE BICE) OBJECT (HERE R) ROOM)
  85. <COND (<==? .PA ,READ!-WORDS>
  86. <COND (.PI
  87. <COND (<==? .PI <FIND-OBJ "BOTTL">>
  88. <TELL
  89. "The letters appear larger, but still are too small to be read.">)
  90. (<==? .PI <FIND-OBJ "FLASK">>
  91. <TELL "The icing, now visible, says '"
  92. 1
  93. <COND (<==? .PO .RICE> "Evaporate")
  94. (<==? .PO .OICE> "Explode")
  95. ("Enlarge")>
  96. "'.">)
  97. (<TELL "You can't see through that!">)>)
  98. (<TELL
  99. "The only writing legible is a capital E. The rest is too small to
  100. be clearly visible.">)>)
  101. (<AND <==? .PA ,EAT!-WORDS> <MEMBER "ALI" <SPNAME <RID .HERE>>>>
  102. <COND (<==? .PO .OICE>
  103. <KILL-OBJ .PO ,WINNER>
  104. <ICEBOOM>)
  105. (<==? .PO .BICE>
  106. <KILL-OBJ .PO ,WINNER>
  107. <TELL "The room around you seems to be getting smaller.">
  108. <COND (<==? .HERE <FIND-ROOM "ALISM">>
  109. <SET R <FIND-ROOM "ALICE">>
  110. <PUT .R ,ROBJS <ROBJS .HERE>>
  111. <MAPF <>
  112. <FUNCTION (X) #DECL ((X) OBJECT)
  113. <PUT .X ,OROOM .R>
  114. <PUT .X ,OSIZE </ <OSIZE .X> 64>>>
  115. <ROBJS .HERE>>
  116. <GOTO .R>)
  117. (<JIGS-UP ,CRUSHED>)>)>)
  118. (<AND <==? .PA ,THROW!-WORDS>
  119. <==? .PO .OICE>
  120. <MEMBER "ALI" <SPNAME <RID .HERE>>>>
  121. <KILL-OBJ .PO ,WINNER>
  122. <ICEBOOM>)
  123. (<AND <==? .PA ,THROW!-WORDS>
  124. <==? .PO .RICE>
  125. <==? .PI <FIND-OBJ "POOL">>>
  126. <REMOVE-OBJECT .PI>
  127. <TELL
  128. "The pool of water evaporates, revealing a tin of rare spices.">
  129. <TRO <FIND-OBJ "SAFFR"> ,OVISON>)>>
  130. <DEFINE FLASK-FUNCTION ("AUX" F (PV ,PRSVEC) (PA <1 .PV>))
  131. #DECL ((PV) <VECTOR VERB OBJECT> (PA) VERB)
  132. <COND (<==? .PA ,OPEN!-WORDS>
  133. <MUNG-ROOM ,HERE "Noxious vapors prevent your entry.">
  134. <JIGS-UP ,VAPORS>)
  135. (<OR <==? .PA ,MUNG!-WORDS>
  136. <==? .PA ,THROW!-WORDS>>
  137. <TELL "The flask breaks into pieces.">
  138. <SET F <2 .PV>>
  139. <TRZ .F ,OVISON>
  140. <JIGS-UP ,VAPORS>)>>
  141. <PSETG VAPORS
  142. "Just before you pass out, you notice that the vapors from the
  143. flask's contents are fatal.">
  144. <PSETG CRUSHED
  145. "The room seems to have become too small to hold you. It seems that
  146. the walls are not as compressible as your body, which is somewhat
  147. demolished.">
  148. <DEFINE ICEBOOM ()
  149. <MUNG-ROOM ,HERE
  150. "The door to the room seems to be blocked by sticky orange rubble
  151. from an explosion. Probably some careless adventurer was playing
  152. with blasting cakes.">
  153. <JIGS-UP ,ICEBLAST>>
  154. <PSETG ICEBLAST "You have been blasted to smithereens (wherever they are).">
  155. <DEFINE MAGNET-ROOM ("AUX" FOO (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>) (HERE ,HERE) M)
  156. #DECL ((PV) VECTOR (PA) VERB (PO) <OR FALSE OBJECT DIRECTION> (HERE) ROOM
  157. (M) <OR FALSE <PRIMTYPE VECTOR>> (FOO) CEXIT)
  158. <COND (<==? .PA ,LOOK!-WORDS>
  159. <TELL
  160. "You are in a room with a low ceiling which is circular in shape.
  161. There are exits to the east and the southeast.">)
  162. (<AND <==? .PA ,WALK-IN!-WORDS> ,CAROUSEL-FLIP!-FLAG>
  163. <COND (,CAROUSEL-ZOOM!-FLAG <JIGS-UP ,SPINDIZZY>)
  164. (<TELL
  165. "As you enter, your compass starts spinning wildly.">
  166. <>)>)
  167. (<==? .PA ,WALK!-WORDS>
  168. <COND (<AND ,CAROUSEL-FLIP!-FLAG <==? ,WINNER ,PLAYER>>
  169. <TELL "You cannot get your bearings...">
  170. <GOTO <CXROOM <SET FOO
  171. <NTH <REXITS .HERE> <* 2 <+ 1 <MOD <RANDOM> 8>>>>>>>
  172. <ROOM-INFO>)
  173. (<SET M <MEMQ <CHTYPE .PO ATOM> <REST <REXITS .HERE> 12>>>
  174. <GOTO <CXROOM <SET FOO <2 .M>>>>
  175. <ROOM-INFO>)>)>>
  176. <DEFINE CMACH-ROOM ("AUX" (PV ,PRSVEC) (PA <1 .PV>))
  177. #DECL ((PV) VECTOR (PA) VERB)
  178. <COND (<==? .PA ,LOOK!-WORDS>
  179. <TELL
  180. "You are in a large room full of assorted heavy machinery. The room
  181. smells of burned resistors. The room is noisy from the whirring
  182. sounds of the machines. Along one wall of the room are three buttons
  183. which are, respectively, round, triangular, and square. Naturally,
  184. above these buttons are instructions written in EBCDIC. A large sign
  185. in English above all the buttons says
  186. 'DANGER -- HIGH VOLTAGE '.
  187. There are exits to the west and the south.">)>>
  188. <SETG CAROUSEL-ZOOM!-FLAG <>>
  189. <SETG CAROUSEL-FLIP!-FLAG <>>
  190. <DEFINE BUTTONS ("AUX" I (PV ,PRSVEC) (PO <2 .PV>) (PA <1 .PV>))
  191. #DECL ((I) OBJECT (PV) VECTOR (PA) VERB)
  192. <COND (<==? .PA ,PUSH!-WORDS>
  193. <COND (<==? ,WINNER ,PLAYER>
  194. <JIGS-UP
  195. "There is a giant spark and you are fried to a crisp.">)
  196. (<==? .PO <FIND-OBJ "SQBUT">>
  197. <COND (,CAROUSEL-ZOOM!-FLAG
  198. <TELL "Nothing seems to happen.">)
  199. (<SETG CAROUSEL-ZOOM!-FLAG T>
  200. <TELL "The whirring increases in intensity slightly.">)>)
  201. (<==? .PO <FIND-OBJ "RNBUT">>
  202. <COND (,CAROUSEL-ZOOM!-FLAG
  203. <SETG CAROUSEL-ZOOM!-FLAG <>>
  204. <TELL "The whirring decreases in intensity slightly.">)
  205. (<TELL "Nothing seems to happen.">)>)
  206. (<==? .PO <FIND-OBJ "TRBUT">>
  207. <SETG CAROUSEL-FLIP!-FLAG <NOT ,CAROUSEL-FLIP!-FLAG>>
  208. <COND (<MEMQ <SET I <FIND-OBJ "IRBOX">>
  209. <ROBJS <FIND-ROOM "CAROU">>>
  210. <TELL
  211. "A dull thump is heard in the distance.">
  212. <TRC .I ,OVISON>)>)>)>>
  213. <PSETG SPINDIZZY
  214. "According to Prof. TAA of MIT Tech, the rapidly changing magnetic
  215. fields in the room are so intense as to cause you to be electrocuted.
  216. I really don't know, but in any event, something just killed you.">
  217. <SETG CAGE-SOLVE!-FLAG <>>
  218. <DEFINE SPHERE-FUNCTION ("AUX" (PV ,PRSVEC) (PA <1 .PV>)
  219. (R <FIND-OBJ "ROBOT">) C FL RACT)
  220. #DECL ((PV) <VECTOR VERB OBJECT>
  221. (PA) VERB (C) ROOM (R) OBJECT (FL) <OR ATOM FALSE> (RACT) ADV)
  222. <SET FL <AND <NOT ,CAGE-SOLVE!-FLAG> <==? .PA ,TAKE!-WORDS>>>
  223. <COND (<AND .FL <==? ,PLAYER ,WINNER>>
  224. <TELL
  225. "As you reach for the sphere, an iron cage falls from the ceiling
  226. to entrap you. To make matters worse, poisonous gas starts coming
  227. into the room.">
  228. <COND (<==? <OROOM .R> ,HERE>
  229. <GOTO <SET C <FIND-ROOM "CAGED">>>
  230. <REMOVE-OBJECT .R>
  231. <INSERT-OBJECT .R .C>
  232. <PUT <SET RACT <ORAND .R>> ,AROOM .C>
  233. <TRO .R ,NDESCBIT>
  234. <SETG SPHERE-CLOCK <CLOCK-INT ,SPHIN 10>>
  235. T)
  236. (ELSE
  237. <TRZ <FIND-OBJ "SPHER"> ,OVISON>
  238. <MUNG-ROOM <FIND-ROOM "CAGER">
  239. "You are stopped by a cloud of poisonous gas.">
  240. <JIGS-UP ,POISON>)>)
  241. (.FL
  242. <TRZ <FIND-OBJ "SPHER"> ,OVISON>
  243. <JIGS-UP
  244. "As the robot reaches for the sphere, an iron cage falls from the
  245. ceiling. The robot attempts to fend it off, but is trapped below it.
  246. Alas, the robot short-circuits in his vain attempt to escape, and
  247. crushes the sphere beneath him as he falls to the floor.">
  248. <REMOVE-OBJECT .R>
  249. <TRZ <2 .PV> ,OVISON>
  250. <INSERT-OBJECT <FIND-OBJ "RCAGE"> ,HERE>
  251. T)
  252. (<==? .PA ,C-INT!-WORDS>
  253. <MUNG-ROOM <FIND-ROOM "CAGER">
  254. "You are stopped by a cloud of poisonous gas.">
  255. <JIGS-UP ,POISON>)>>
  256. <PSETG POISON "Time passes...and you die from some obscure poisoning.">
  257. <DEFINE CAGED-ROOM ()
  258. <COND (,CAGE-SOLVE!-FLAG <SETG HERE <FIND-ROOM "CAGER">>)>>
  259. <GDECL (SPHERE-CLOCK) CEVENT (ROBOT-ACTIONS) <UVECTOR [REST VERB]>>
  260. <DEFINE ROBOT-ACTOR ("AUX" (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>) C CAGE
  261. (R <FIND-OBJ "ROBOT">) RACT)
  262. #DECL ((C) ROOM (PA) VERB (PV) VECTOR (PO) <OR FALSE OBJECT DIRECTION>
  263. (CAGE) OBJECT (R) OBJECT (RACT) ADV)
  264. <COND (<AND <==? .PA ,RAISE!-WORDS> <==? .PO <FIND-OBJ "CAGE">>>
  265. <TELL "The cage shakes and is hurled across the room.">
  266. <CLOCK-DISABLE ,SPHERE-CLOCK>
  267. <SETG WINNER ,PLAYER>
  268. <GOTO <SET C <FIND-ROOM "CAGER">>>
  269. <INSERT-OBJECT <SET CAGE <FIND-OBJ "CAGE">> .C>
  270. <TRO .CAGE ,TAKEBIT>
  271. <TRZ .CAGE ,NDESCBIT>
  272. <TRZ .R ,NDESCBIT>
  273. <TRO <FIND-OBJ "SPHER"> ,TAKEBIT>
  274. <REMOVE-OBJECT .R>
  275. <INSERT-OBJECT .R .C>
  276. <PUT <SET RACT <ORAND .R>> ,AROOM .C>
  277. <SETG CAGE-SOLVE!-FLAG T>)
  278. (<OR <==? .PA ,EAT!-WORDS> <==? .PA ,DRINK!-WORDS>>
  279. <TELL
  280. "\"I am sorry but that action is difficult in the absence of a mouth.\"">)
  281. (<==? .PA ,READ!-WORDS>
  282. <TELL
  283. "\"My vision is not that good without eyes.\"">)
  284. (<MEMQ .PA ,ROBOT-ACTIONS> <>)
  285. (<TELL
  286. "\"I am only a stupid robot and cannot perform that command.\"">)>>
  287. <DEFINE CRETIN ("AUX" (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>) (PI <3 .PV>) (ME ,PLAYER))
  288. #DECL ((PV) VECTOR (PA) VERB (PO PI) <OR FALSE OBJECT> (ME) ADV)
  289. <COND (<==? .PA ,GIVE!-WORDS>
  290. <REMOVE-OBJECT .PO>
  291. <PUT .ME ,AOBJS (.PO !<AOBJS .ME>)>
  292. <TELL "Done.">)
  293. (<OR <==? .PA ,KILL!-WORDS>
  294. <==? .PA ,MUNG!-WORDS>>
  295. <JIGS-UP
  296. "If you insist.... Poof, you're dead!">)
  297. (<==? .PA ,TAKE!-WORDS>
  298. <TELL "How romantic!">)>>
  299. <DEFINE ROBOT-FUNCTION ("AUX" (PV ,PRSVEC) (PA <1 .PV>) (PO <2 .PV>) (PI <3 .PV>) PP AA)
  300. #DECL ((AA) ADV (PV) VECTOR (PA) VERB (PP PO) OBJECT (PI) <OR FALSE OBJECT>)
  301. <COND (<==? .PA ,GIVE!-WORDS>
  302. <SET AA <ORAND <SET PP .PI>>>
  303. <REMOVE-OBJECT .PO>
  304. <PUT .AA ,AOBJS (.PO !<AOBJS .AA>)>
  305. <TELL "The robot gladly takes the "
  306. 1
  307. <ODESC2 .PO>
  308. "
  309. and nods his head-like appendage in thanks.">)
  310. (<OR <==? .PA ,THROW!-WORDS> <==? .PA ,MUNG!-WORDS>>
  311. <TELL
  312. "The robot is injured (being of shoddy construction) and falls to the
  313. floor in a pile of garbage, which disintegrates before your eyes.">
  314. <REMOVE-OBJECT <COND (<==? .PA ,THROW!-WORDS> .PI) (.PO)>>)>>
  315. <DEFINE KNOCK ("AUX" (PRSO <2 ,PRSVEC>))
  316. #DECL ((PRSO) OBJECT)
  317. <COND (<OBJECT-ACTION>)
  318. (<OR <==? <OID .PRSO> DOOR!-OBJECTS>
  319. <MEMQ DOOR!-OBJECTS <ONAMES .PRSO>>>
  320. <TELL "I don't think that anybody's home.">)
  321. (<TELL "Why knock on a " 0 <ODESC2 .PRSO> "?">)>>
  322. <DEFINE CHOMP ()
  323. <TELL "I don't know how to do that. I win in all cases!">>
  324. <DEFINE FROBOZZ ()
  325. <TELL "The FROBOZZ Corporation created, owns, and operates this dungeon.">>
  326. <DEFINE WIN ()
  327. <TELL "Naturally!">>
  328. <DEFINE YELL ()
  329. <TELL "Aaaarrrrrrrrgggggggggggggghhhhhhhhhhhhhh!">>