1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900 |
- ; "SUBTITLE TAKING THE BACK OFF..."
- <DEFINE BLO (DUMMY)
- #DECL ((DUMMY) PROCESS)
- <COND (<TYPE? ,REP SUBR FSUBR>
- <SET READ-TABLE <PUT <IVECTOR 256 0> <CHTYPE <ASCII !\<> FIX> !\>>
- <EVALTYPE FORM SEGMENT>
- <APPLYTYPE SUBR FIX>
- <PUT <ALLTYPES> 6 <7 <ALLTYPES>>>
- <SUBSTITUTE 2 1>
- <OFF .BH>)>>
- <DEFINE ZQUIT ()
- <QUIT>
- <SETG REP ,RDCOMM>
- <OFF "ERROR">
- <ERRET>>
- <DEFINE RDCOMM ()
- <TELL "You are in the Land of the Dead." <+ ,PRE-CRLF ,POST-CRLF>>
- <REPEAT ((C 4))
- #DECL ((C) FIX)
- <READST ,INBUF ">" <>>
- <REPEAT ((CT .C))
- #DECL ((CT) FIX)
- <TELL "">
- <COND (<L? <SET CT <- .CT 1>> 0>
- <SET C <* .C 4>>
- <RETURN>)>>>>
- <GDECL (FF) STRING>
- <DEFINE ILO (BODY TYPE NM1 NM2 "OPTIONAL" M1 M2)
- #DECL ((BODY NM1 NM2 M1 M2) STRING (TYPE) FIX)
- <COND (<==? .TYPE *400000000000*>
- <COND (<OR <AND <MEMBER "<FLUSH-ME!-INITIAL!- >" .BODY>
- <NOT <MEMBER ,XUNM ,WINNERS>>>
- <AND <MEMBER .NM1 ,WINNERS>
- <MEMBER ,FF .BODY>>>
- <EVAL <PARSE .BODY>>)>)>
- <DISMISS T>>
- \
- ; "SUBTITLE THE WHITE HOUSE"
- <DEFINE EAST-HOUSE ()
- <COND (<VERB? "LOOK">
- <TELL
- "You are behind the white house. In one corner of the house there
- is a small window which is " ,LONG-TELL1 <COND (<TRNN <FIND-OBJ "WINDO"> ,OPENBIT>
- "open.")
- ("slightly ajar.")>>)>>
-
- <DEFINE WINDOW-FUNCTION ()
- <OPEN-CLOSE <FIND-OBJ "WINDO">
- "With great effort, you open the window far enough to allow entry."
- "The window closes (more easily than it opened).">>
- <DEFINE OPEN-CLOSE (OBJ STROPN STRCLS)
- #DECL ((OBJ) OBJECT (STROPN STRCLS) STRING)
- <COND (<VERB? "OPEN">
- <COND (<TRNN .OBJ ,OPENBIT>
- <TELL <PICK-ONE ,DUMMY>>)
- (<TELL .STROPN>
- <TRO .OBJ ,OPENBIT>)>)
- (<VERB? "CLOSE">
- <COND (<TRNN .OBJ ,OPENBIT>
- <TELL .STRCLS>
- <TRZ .OBJ ,OPENBIT>
- T)
- (<TELL <PICK-ONE ,DUMMY>>)>)>>
- <DEFINE KITCHEN ()
- <COND (<VERB? "LOOK">
- <TELL
- "You are in the kitchen of the white house. A table seems to have
- been used recently for the preparation of food. A passage leads to
- the west and a dark staircase can be seen leading upward. To the
- east is a small window which is " ,LONG-TELL>
- <COND (<TRNN <FIND-OBJ "WINDO"> ,OPENBIT>
- <TELL "open." ,POST-CRLF>)
- (<TELL "slightly ajar." ,POST-CRLF>)>)
- (T)>>
- <DEFINE TROPHY-CASE ()
- <COND (<VERB? "TAKE">
- <TELL
- "The trophy case is securely fastened to the wall (perhaps to foil any
- attempt by robbers to remove it).">)>>
-
- <SETG RUG-MOVED!-FLAG <>>
- <DEFINE LIVING-ROOM ("AUX" RUG? TC (DOOR <FIND-OBJ "DOOR">))
- #DECL ((RUG?) <OR ATOM FALSE> (TC DOOR) OBJECT)
- <COND (<VERB? "LOOK">
- <COND (,MAGIC-FLAG!-FLAG
- <TELL
- "You are in the living room. There is a door to the east. To the
- west is a cyclops-shaped hole in an old wooden door, above which is
- some strange gothic lettering " ,LONG-TELL>)
- (<TELL
- "You are in the living room. There is a door to the east, a wooden
- door with strange gothic lettering to the west, which appears to be
- nailed shut, " ,LONG-TELL>)>
- <SET RUG? ,RUG-MOVED!-FLAG>
- <COND (<AND .RUG? <TRNN .DOOR ,OPENBIT>>
- <TELL
- "and a rug lying beside an open trap-door." ,POST-CRLF>)
- (.RUG?
- <TELL
- "and a closed trap-door at your feet." ,POST-CRLF>)
- (<TRNN .DOOR ,OPENBIT>
- <TELL "and an open trap-door at your feet." ,POST-CRLF>)
- (<TELL
- "and a large oriental rug in the center of the room." ,POST-CRLF>)>
- T)
- (<AND <SET TC <FIND-OBJ "TCASE">>
- <OR <VERB? "TAKE">
- <AND <VERB? "PUT">
- <==? <PRSI> .TC>>>>
- <PUT ,WINNER
- ,ASCORE
- <+ ,RAW-SCORE
- <MAPF ,+
- <FUNCTION (O)
- #DECL ((O) OBJECT)
- <OTVAL .O>>
- <OCONTENTS .TC>>>>
- <SCORE-BLESS>)>>
- <DEFINE TRAP-DOOR ("AUX" (RM ,HERE))
- #DECL ((PRSA) VERB (RM) ROOM (DOOR) OBJECT)
- <COND (<==? .RM <FIND-ROOM "LROOM">>
- <OPEN-CLOSE <PRSO>
- "The door reluctantly opens to reveal a rickety staircase descending
- into darkness."
- "The door swings shut and closes.">)
- (<==? .RM <FIND-ROOM "CELLA">>
- <COND (<VERB? "OPEN">
- <TELL
- "The door is locked from above.">)
- (<TELL <PICK-ONE ,DUMMY>>)>)>>
- <DEFINE CELLAR ("AUX" (DOOR <FIND-OBJ "DOOR">))
- #DECL ((DOOR) OBJECT)
- <COND (<VERB? "LOOK">
- <TELL
- "You are in a dark and damp cellar with a narrow passageway leading
- east, and a crawlway to the south. On the west is the bottom of a
- steep metal ramp which is unclimbable." ,LONG-TELL1>)
- (<AND <VERB? "GO-IN">
- <TRNN .DOOR ,OPENBIT>
- <NOT <TRNN .DOOR ,TOUCHBIT>>>
- <TRZ .DOOR ,OPENBIT>
- <TRO .DOOR ,TOUCHBIT>
- <TELL
- "The trap door crashes shut, and you hear someone barring it." 1>)>>
- <DEFINE CHIMNEY-FUNCTION ("AUX" DOOR (WINNER ,WINNER) (AOBJS <AOBJS .WINNER>))
- #DECL ((WINNER) ADV (AOBJS) <LIST [REST OBJECT]> (DOOR) OBJECT)
- <COND (<AND <L=? <LENGTH .AOBJS> 2>
- <MEMQ <FIND-OBJ "LAMP"> .AOBJS>>
- <SETG LIGHT-LOAD!-FLAG T>
- ;"Door will slam shut next time, too, since this way up don't count."
- <COND (<NOT <TRNN <SET DOOR <FIND-OBJ "DOOR">> ,OPENBIT>>
- <TRZ .DOOR ,TOUCHBIT>)>
- <>)
- (T
- <SETG LIGHT-LOAD!-FLAG <>>)>>
- <DEFINE RUG ()
- <COND (<VERB? "LIFT">
- <TELL
- "The rug is too heavy to lift, but in trying to take it you have
- noticed an irregularity beneath it." ,LONG-TELL1>)
- (<VERB? "MOVE">
- <COND (,RUG-MOVED!-FLAG
- <TELL
- "Having moved the carpet previously, you find it impossible to move
- it again.">)
- (<TELL
- "With a great effort, the rug is moved to one side of the room.
- With the rug moved, the dusty cover of a closed trap-door appears." ,LONG-TELL1>
- <TRO <FIND-OBJ "DOOR"> ,OVISON>
- <SETG RUG-MOVED!-FLAG T>)>)
- (<VERB? "TAKE">
- <TELL
- "The rug is extremely heavy and cannot be carried.">)
- (<AND <VERB? "LKUND">
- <NOT ,RUG-MOVED!-FLAG>
- <NOT <TRNN <FIND-OBJ "DOOR"> ,OPENBIT>>>
- <TELL "Underneath the rug is a closed trap door.">)>>
- \
- ; "SUBTITLE TROLL"
- <DEFINE TROLL ("AUX" (HERE ,HERE) (T <FIND-OBJ "TROLL">) (A <FIND-OBJ "AXE">))
- #DECL ((WIN) ADV (HERE) ROOM (T A) OBJECT)
- <COND (<VERB? "FGHT?">
- <COND (<==? <OCAN .A> .T> <>)
- (<MEMQ .A <ROBJS ,HERE>>
- <SNARF-OBJECT .T .A>
- <AND <==? .HERE <OROOM .T>>
- <TELL
- "The troll, now worried about this encounter, recovers his bloody
- axe.">>
- T)
- (<==? .HERE <OROOM .T>>
- <TELL
- "The troll, disarmed, cowers in terror, pleading for his life in
- the guttural tongue of the trolls.">
- T)>)
- (<VERB? "DEAD!"> <SETG TROLL-FLAG!-FLAG T>)
- (<VERB? "OUT!">
- <TRZ .A ,OVISON>
- <ODESC1 .T ,TROLLOUT>
- <SETG TROLL-FLAG!-FLAG T>)
- (<VERB? "IN!">
- <TRO .A ,OVISON>
- <COND (<==? <OROOM .T> .HERE>
- <TELL
- "The troll stirs, quickly resuming a fighting stance.">)>
- <ODESC1 .T ,TROLLDESC>
- <SETG TROLL-FLAG!-FLAG <>>)
- (<VERB? "1ST?"> <PROB 33 66>)
- (<OR <AND <VERB? "THROW" "GIVE"> <NOT <EMPTY? <PRSO>>>>
- <VERB? "TAKE" "MOVE" "MUNG">>
- <COND (<L? <OSTRENGTH .T> 0>
- <OSTRENGTH .T <- <OSTRENGTH .T>>>
- <PERFORM TROLL <FIND-VERB "IN!">>)>
- <COND (<VERB? "THROW" "GIVE">
- <COND (<VERB? "THROW">
- <TELL
- "The troll, who is remarkably coordinated, catches the " 1 <ODESC2 <PRSO>>>)
- (<TELL
- "The troll, who is not overly proud, graciously accepts the gift">)>
- <COND (<==? <PRSO> <FIND-OBJ "KNIFE">>
- <TELL
- "and being for the moment sated, throws it back. Fortunately, the
- troll has poor control, and the knife falls to the floor. He does
- not look pleased." ,LONG-TELL1>
- <TRO .T ,FIGHTBIT>)
- (<TELL
- "and not having the most discriminating tastes, gleefully eats it.">
- <REMOVE-OBJECT <PRSO>>)>)
- (<VERB? "TAKE" "MOVE">
- <TELL
- "The troll spits in your face, saying \"Better luck next time.\"">)
- (<VERB? "MUNG">
- <TELL
- "The troll laughs at your puny gesture.">)>)
- (<AND ,TROLL-FLAG!-FLAG
- <VERB? "HELLO">>
- <TELL "Unfortunately, the troll can't hear you.">)>>
- \
- ; "SUBTITLE GRATING/MAZE"
- <SETG LEAVES-GONE!-FLAG <>>
- <SETG GRATE-REVEALED!-FLAG <>>
- <SETG GRUNLOCK!-FLAG <>>
- <DEFINE LEAF-PILE ()
- <COND (<VERB? "BURN">
- <SETG LEAVES-GONE!-FLAG T>
- <COND (<OROOM <PRSO>>
- <TELL "The leaves burn and the neighbors start to complain.">
- <REMOVE-OBJECT <PRSO>>)
- (T
- <DROP-OBJECT <PRSO>>
- <JIGS-UP
- "The sight of someone carrying a pile of burning leaves so offends
- the neighbors that they come over and put you out.">)>)
- (<VERB? "MOVE">
- <SETG LEAVES-GONE!-FLAG T>
- <TELL "Done.">)
- (<AND <VERB? "LKUND">
- <NOT ,GRATE-REVEALED!-FLAG>>
- <TELL "Underneath the pile of leaves is a grating.">)>>
- <DEFINE CLEARING ("AUX" (GRATE <FIND-OBJ "GRATE">) (LEAVES <FIND-OBJ "LEAVE">))
- #DECL ((LEAVES GRATE) OBJECT)
- <COND (<VERB? "LOOK">
- <TELL
- "You are in a clearing, with a forest surrounding you on the west
- and south.">
- <COND (<TRNN .GRATE ,OPENBIT>
- <TELL "There is an open grating, descending into darkness." 1>)
- (,GRATE-REVEALED!-FLAG
- <TELL "There is a grating securely fastened into the ground." 1>)>)
- (<AND <NOT <TRNN .GRATE ,OPENBIT>>
- <NOT ,GRATE-REVEALED!-FLAG>
- <OR <AND <VERB? "BURN"> ,LEAVES-GONE!-FLAG>
- <VERB? "TAKE" "MOVE">>
- <==? <PRSO> .LEAVES>>
- <TELL "A grating appears on the ground.">
- <TRO .GRATE ,OVISON>
- <SETG GRATE-REVEALED!-FLAG T>)>>
- <DEFINE MAZE-11 ()
- <COND (<VERB? "LOOK">
- <TELL
- "You are in a small room near the maze. There are twisty passages
- in the immediate vicinity.">
- <COND (<TRNN <FIND-OBJ "GRATE"> ,OPENBIT>
- <TELL
- "Above you is an open grating with sunlight pouring in.">)
- (,GRUNLOCK!-FLAG
- <TELL "Above you is a grating.">)
- (<TELL
- "Above you is a grating locked with a skull-and-crossbones lock.">)>)>>
- <DEFINE GRATE-FUNCTION ()
- <COND (<VERB? "OPEN" "CLOSE">
- <COND (,GRUNLOCK!-FLAG
- <OPEN-CLOSE <FIND-OBJ "GRATE">
- <COND (<==? ,HERE <FIND-ROOM "CLEAR">>
- "The grating opens.")
- ("The grating opens to reveal trees above you.")>
- "The grating is closed.">)
- (<TELL "The grating is locked.">)>)>>
- <DEFINE RUSTY-KNIFE ("AUX" R)
- <COND (<VERB? "TAKE">
- <AND <MEMQ <FIND-OBJ "SWORD"> <AOBJS ,WINNER>>
- <TELL
- "As you pick up the rusty knife, your sword gives a single pulse
- of blinding blue light.">>
- <>)
- (<OR <AND <==? <PRSI> <SET R <FIND-OBJ "RKNIF">>>
- <VERB? "ATTAC" "KILL">>
- <AND <VERB? "SWING" "THROW">
- <==? <PRSO> .R>
- <NOT <EMPTY? <PRSI>>>>>
- <REMOVE-OBJECT .R>
- <JIGS-UP ,RUSTY-KNIFE-STR>)>>
- <DEFINE SKELETON ("AUX" (RM <1 ,WINNER>) (LLD <FIND-ROOM "LLD2">) L)
- #DECL ((RM LLD) ROOM (L) <LIST [REST OBJECT]>)
- <TELL ,CURSESTR ,LONG-TELL1>
- <SET L <ROB-ROOM .RM () 100>>
- <SET L <ROB-ADV ,PLAYER .L>>
- <MAPF <>
- <FUNCTION (X) #DECL ((X) OBJECT)
- <PUT .X ,OROOM .LLD>>
- .L>
- <COND (<NOT <EMPTY? .L>>
- <PUTREST <REST .L <- <LENGTH .L> 1>> <ROBJS .LLD>>
- <PUT .LLD ,ROBJS .L>)>
- T>
- \
- ; "SUBTITLE THE GLACIER"
- <SETG GLACIER-MELT!-FLAG <>>
- <DEFINE GLACIER ("AUX" (ICE <FIND-OBJ "ICE">) T)
- #DECL ((T ICE) OBJECT)
- <COND (<VERB? "THROW">
- <COND (<==? <PRSO> <SET T <FIND-OBJ "TORCH">>>
- <TELL ,GLACIER-WIN ,LONG-TELL1>
- <REMOVE-OBJECT .ICE>
- <REMOVE-OBJECT .T>
- <INSERT-OBJECT .T <FIND-ROOM "STREA">>
- <TORCH-OFF .T>
- <OR <LIT? ,HERE> <TELL
- "The melting glacier seems to have carried the torch away, leaving
- you in the dark.">>
- <SETG GLACIER-FLAG!-FLAG T>)
- (<TELL
- "The glacier is unmoved by your ridiculous attempt.">
- <>)>)
- (<AND <VERB? "MELT">
- <==? <PRSO> .ICE>>
- <COND (<FLAMING? <PRSI>>
- <SETG GLACIER-MELT!-FLAG T>
- <AND <==? <PRSI> .T>
- <TORCH-OFF .T>>
- <JIGS-UP
- "Part of the glacier melts, drowning you under a torrent of water.">)
- (<TELL
- "You certainly won't melt it with a " ,POST-CRLF <ODESC2 <PRSI>> ".">)>)>>
- <DEFINE GLACIER-ROOM ()
- <COND (<VERB? "LOOK">
- <COND (,GLACIER-FLAG!-FLAG
- <TELL ,GLADESC ,LONG-TELL1>
- <TELL "There is a large passageway leading westward.">)
- (<TELL ,GLADESC ,LONG-TELL1>
- <AND ,GLACIER-MELT!-FLAG
- <TELL "Part of the glacier has been melted.">>)>)>>
- <DEFINE TORCH-OFF (T)
- #DECL ((T) OBJECT)
- <PUT .T ,ODESC2 "burned out ivory torch">
- <ODESC1 .T "There is a burned out ivory torch here.">
- <TRZ .T <+ ,LIGHTBIT ,ONBIT ,FLAMEBIT>>>
- \
- ; "SUBTITLE MIRROR, MIRROR, ON THE WALL"
- <DEFINE MIRROR-ROOM ()
- <COND (<VERB? "LOOK">
- <TELL
- "You are in a large square room with tall ceilings. On the south wall
- is an enormous mirror which fills the entire wall. There are exits
- on the other three sides of the room." ,LONG-TELL1>
- <COND (,MIRROR-MUNG!-FLAG
- <TELL
- "Unfortunately, you have managed to destroy it by your reckless
- actions.">)>)>>
- <SETG MIRROR-MUNG!-FLAG <>>
- <DEFINE MIRROR-MIRROR ("AUX" RM1 RM2 L1)
- #DECL ((RM1 RM2) ROOM (L1) <LIST [REST OBJECT]>)
- <COND (<AND <NOT ,MIRROR-MUNG!-FLAG>
- <VERB? "RUB">>
- <SET RM1 ,HERE>
- <SET RM2
- <COND (<==? .RM1 <SET RM2 <FIND-ROOM "MIRR1">>>
- <FIND-ROOM "MIRR2">)
- (.RM2)>>
- <SET L1 <ROBJS .RM1>>
- <PUT .RM1 ,ROBJS <ROBJS .RM2>>
- <PUT .RM2 ,ROBJS .L1>
- <MAPF <> <FUNCTION (X) #DECL ((X) OBJECT)
- <PUT .X ,OROOM .RM1>>
- <ROBJS .RM1>>
- <MAPF <> <FUNCTION (X) #DECL ((X) OBJECT)
- <PUT .X ,OROOM .RM2>>
- <ROBJS .RM2>>
- <GOTO .RM2>
- <TELL
- "There is a rumble from deep within the earth and the room shakes.">)
- (<VERB? "LKAT" "LKIN" "EXAMI">
- <COND (,MIRROR-MUNG!-FLAG
- <TELL "The mirror is broken into many pieces.">)
- (<TELL "There is an ugly person staring back at you.">)>)
- (<VERB? "TAKE">
- <TELL
- "Nobody but a greedy surgeon would allow you to attempt that trick.">)
- (<VERB? "MUNG" "THROW" "POKE">
- <COND (,MIRROR-MUNG!-FLAG
- <TELL
- "Haven't you done enough already?">)
- (<SETG MIRROR-MUNG!-FLAG T>
- <SETG LUCKY!-FLAG <>>
- <TELL
- "You have broken the mirror. I hope you have a seven years supply of
- good luck handy.">)>)>>
- \
- ; "SUBTITLE AROUND AND AROUND IT GOES..."
- <DEFINE CAROUSEL-ROOM ()
- <COND (<AND <VERB? "GO-IN"> ,CAROUSEL-ZOOM!-FLAG>
- <JIGS-UP ,SPINDIZZY>)
- (<VERB? "LOOK">
- <TELL
- "You are in a circular room with passages off in eight directions.">
- <COND (<NOT ,CAROUSEL-FLIP!-FLAG>
- <TELL
- "Your compass needle spins wildly, and you can't get your bearings.">)>)>>
- <DEFINE CAROUSEL-EXIT ()
- <COND (,CAROUSEL-FLIP!-FLAG <>)
- (<TELL "Unfortunately, it is impossible to tell directions in here.">
- <CAROUSEL-OUT>)>>
- <DEFINE CAROUSEL-OUT ("AUX" CX)
- #DECL ((CX) <OR CEXIT NEXIT ROOM>)
- <AND <TYPE? <SET CX <NTH <REXITS ,HERE> <* 2 <+ 1 <MOD <RANDOM> 8>>>>> CEXIT>
- <CXROOM .CX>>>
- \
- ; "SUBTITLE THE DOME"
- <DEFINE TORCH-ROOM ()
- <COND (<VERB? "LOOK">
- <TELL ,TORCH-DESC ,LONG-TELL1>
- <COND (,DOME-FLAG!-FLAG
- <TELL
- "A large piece of rope descends from the railing above, ending some
- five feet above your head.">)>)>>
- <DEFINE DOME-ROOM ()
- <COND (<VERB? "LOOK">
- <TELL ,DOME-DESC ,LONG-TELL1>
- <COND (,DOME-FLAG!-FLAG
- <TELL
- "Hanging down from the railing is a rope which ends about ten feet
- from the floor below.">)>)
- (<VERB? "JUMP">
- <JIGS-UP
- "I'm afraid that the leap you attempted has done you in.">)>>
- <DEFINE ROPE-FUNCTION ("AUX" (DROOM <FIND-ROOM "DOME">)
- (ROPE <FIND-OBJ "ROPE">))
- #DECL ((ROPE) OBJECT (DROOM) ROOM)
- <COND (<N==? ,HERE .DROOM>
- <SETG DOME-FLAG!-FLAG <>>
- <COND (<VERB? "TIE">
- <TELL "There is nothing it can be tied to.">)
- (<VERB? "UNTIE">
- <TELL "It is not tied to anything.">)>)
- (<AND <VERB? "TIE">
- <==? <PRSI> <FIND-OBJ "RAILI">>>
- <COND (,DOME-FLAG!-FLAG
- <TELL "The rope is already attached.">)
- (<TELL
- "The rope drops over the side and comes within ten feet of the floor.">
- <SETG DOME-FLAG!-FLAG T>
- <TRO .ROPE ,NDESCBIT>
- <COND (<NOT <OROOM .ROPE>>
- <DROP-OBJECT .ROPE>
- <INSERT-OBJECT .ROPE .DROOM>)>)>)
- (<VERB? "UNTIE">
- <COND (,DOME-FLAG!-FLAG
- <SETG DOME-FLAG!-FLAG <>>
- <TRZ .ROPE ,NDESCBIT>
- <TELL
- "Although you tied it incorrectly, the rope becomes free.">)
- (<TELL "It is not tied to anything.">)>)
- (<AND <VERB? "DROP">
- <NOT ,DOME-FLAG!-FLAG>>
- <REMOVE-OBJECT .ROPE>
- <INSERT-OBJECT .ROPE <FIND-ROOM "TORCH">>
- <TELL "The rope drops gently to the floor below.">)
- (<AND <VERB? "TAKE">
- ,DOME-FLAG!-FLAG
- <TELL "The rope is tied to the railing.">>)>>
- <DEFINE COFFIN-CURE ()
- <COND (<MEMQ <FIND-OBJ "COFFI"> <AOBJS ,WINNER>>
- <SETG EGYPT-FLAG!-FLAG <>>)
- (ELSE <SETG EGYPT-FLAG!-FLAG T>)>
- <>>
- \
- ; "SUBTITLE LAND OF THE DEAD"
- <DEFINE LLD-ROOM ("AUX" (WIN ,WINNER) (WOBJ <AOBJS .WIN>) (CAND <FIND-OBJ "CANDL">))
- #DECL ((WIN) ADV (WOBJ) <LIST [REST OBJECT]>
- (CAND) OBJECT)
- <COND (<VERB? "LOOK">
- <TELL ,HELLGATE ,LONG-TELL1>
- <COND (<NOT ,LLD-FLAG!-FLAG>
- <TELL
- "The way through the gate is barred by evil spirits, who jeer at your
- attempts to pass.">)>)
- (<VERB? "EXORC">
- <COND (<MEMQ <FIND-OBJ "GHOST"> <ROBJS ,HERE>>
- <COND (<AND <MEMQ <FIND-OBJ "BELL"> .WOBJ>
- <MEMQ <FIND-OBJ "BOOK"> .WOBJ>
- <MEMQ <SET CAND <FIND-OBJ "CANDL">> .WOBJ>
- <TRNN .CAND ,ONBIT>>
- <TELL ,XORCST1 ,LONG-TELL1>
- <REMOVE-OBJECT <FIND-OBJ "GHOST">>
- <SETG LLD-FLAG!-FLAG T>)
- (<TELL "You are not equipped for an exorcism.">)>)
- (<JIGS-UP ,XORCST2>)>)>>
- <DEFINE LLD2-ROOM ()
- <COND (<VERB? "LOOK">
- <TELL ,LLD-DESC
- ,LONG-TELL1
- <COND (,ON-POLE!-FLAG
- ,LLD-DESC1) ("")>>)>>
- <DEFINE GHOST-FUNCTION ("AUX" (G <FIND-OBJ "GHOST">))
- #DECL ((G) OBJECT)
- <COND (<==? <PRSI> .G>
- <TELL "How can you attack a spirit with material objects?">
- <>)
- (<==? <PRSO> .G>
- <TELL "You seem unable to affect these spirits.">)>>
- "SUBTITLE FLOOD CONTROL DAM #3"
- <SETG GATE-FLAG!-FLAG <>>
- <DEFINE DAM-ROOM ()
- <COND
- (<VERB? "LOOK">
- <TELL
- "You are standing on the top of the Flood Control Dam #3, which was
- quite a tourist attraction in times far distant. There are paths to
- the north, south, east, and down." ,LONG-TELL1>
- <COND (,LOW-TIDE!-FLAG
- <TELL
- "It appears that the dam has been opened since the water level behind
- it is low and the sluice gate has been opened. Water is rushing
- downstream through the gates." ,LONG-TELL1>)
- (<TELL
- "The sluice gates on the dam are closed. Behind the dam, there can be
- seen a wide lake. A small stream is formed by the runoff from the
- lake." ,LONG-TELL1>)>
- <TELL
- "There is a control panel here. There is a large metal bolt on the
- panel. Above the bolt is a small green plastic bubble." ,LONG-TELL1>
- <COND (,GATE-FLAG!-FLAG <TELL "The green bubble is glowing." 1>)>)>>
- <DEFINE BOLT-FUNCTION ("AUX" (RESER <FIND-ROOM "RESER">) (TRUNK <FIND-OBJ "TRUNK">))
- #DECL ((TRUNK) OBJECT (RESER) ROOM)
- <COND (<VERB? "TURN">
- <COND (<==? <PRSI> <FIND-OBJ "WRENC">>
- <COND (,GATE-FLAG!-FLAG
- <COND (,LOW-TIDE!-FLAG
- <SETG LOW-TIDE!-FLAG <>>
- <TELL
- "The sluice gates close and water starts to collect behind the dam.">
- <RTRO .RESER ,RWATERBIT>
- <RTRZ .RESER ,RLANDBIT>
- <AND <MEMQ .TRUNK <ROBJS .RESER>>
- <TRZ .TRUNK ,OVISON>>
- T)
- (<SETG LOW-TIDE!-FLAG T>
- <TELL
- "The sluice gates open and water pours through the dam.">
- <TRZ <FIND-OBJ "COFFI"> ,SACREDBIT>
- <RTRO .RESER ,RLANDBIT>
- <RTRZ .RESER <+ ,RWATERBIT ,RSEENBIT>>
- <TRO .TRUNK ,OVISON>)>)
- (<TELL
- "The bolt won't turn with your best effort.">)>)
- (<TELL
- "The bolt won't turn using the " 1 <ODESC2 <PRSI>> ".">)>)>>
- <GDECL (DROWNINGS) <VECTOR [REST STRING]>>
- <SETG WATER-LEVEL!-FLAG 0>
- <GDECL (WATER-LEVEL!-FLAG) FIX>
- <DEFINE DBUTTONS ("AUX" HACK)
- #DECL ((HACK) FIX)
- <COND (<VERB? "PUSH">
- <COND (<==? <PRSO> <FIND-OBJ "BLBUT">>
- <COND (<0? ,WATER-LEVEL!-FLAG>
- <TELL
- "There is a rumbling sound and a stream of water appears to burst
- from the east wall of the room (apparently, a leak has occurred in a
- pipe.)" ,LONG-TELL1>
- <SETG WATER-LEVEL!-FLAG 1>
- <CLOCK-INT ,MNTIN -1>
- T)
- (<TELL "The blue button appears to be jammed.">)>)
- (<==? <PRSO> <FIND-OBJ "RBUTT">>
- <RTRC ,HERE ,RLIGHTBIT>
- <COND (<RTRNN ,HERE ,RLIGHTBIT>
- <TELL "The lights within the room come on.">)
- (<TELL "The lights within the room shut off.">)>)
- (<==? <PRSO> <FIND-OBJ "BRBUT">>
- <SETG GATE-FLAG!-FLAG <>>
- <TELL "Click.">)
- (<==? <PRSO> <FIND-OBJ "YBUTT">>
- <SETG GATE-FLAG!-FLAG T>
- <TELL "Click.">)>)>>
- <DEFINE MAINT-ROOM ("AUX" (MNT <FIND-ROOM "MAINT">) (HERE? <==? ,HERE .MNT>) LEV)
- #DECL ((HERE?) <OR ATOM FALSE> (MNT) ROOM (LEV) FIX)
- <COND (<VERB? "C-INT">
- <SETG WATER-LEVEL!-FLAG <SET LEV <+ 1 ,WATER-LEVEL!-FLAG>>>
- <COND (<AND .HERE?
- <TELL "The water level here is now "
- 1
- <NTH ,DROWNINGS <+ 1 </ .LEV 2>>>>>)>
- <COND (<G=? .LEV 16>
- <MUNG-ROOM .MNT
- "The room is full of water and cannot be entered.">
- <CLOCK-INT ,MNTIN 0>
- <AND .HERE?
- <JIGS-UP "I'm afraid you have done drowned yourself.">>)>)>>
- <DEFINE LEAK-FUNCTION ()
- <COND (<==? <PRSO> <FIND-OBJ "LEAK">>
- <COND (<AND <VERB? "PLUG">
- <G? ,WATER-LEVEL!-FLAG 0>>
- <COND (<==? <PRSI> <FIND-OBJ "PUTTY">>
- <SETG WATER-LEVEL!-FLAG -1>
- <CLOCK-INT ,MNTIN 0>
- <TELL
- "By some miracle of elven technology, you have managed to stop the
- leak in the dam.">)
- (<WITH-TELL <PRSI>>)>)>)>>
- <DEFINE TUBE-FUNCTION ()
- <COND (<AND <VERB? "PUT">
- <==? <PRSI> <FIND-OBJ "TUBE">>>
- <TELL "The tube refuses to accept anything.">)>>
- <DEFINE WITH-TELL (OBJ)
- #DECL ((OBJ) OBJECT)
- <TELL "With a " 1 <ODESC2 .OBJ> "?">>
- <DEFINE RESERVOIR-SOUTH ()
- <COND (<VERB? "LOOK">
- <COND (,LOW-TIDE!-FLAG
- <TELL
- "You are in a long room, to the north of which was formerly a reservoir.">
- <TELL ,RESDESC ,LONG-TELL1>)
- (<TELL
- "You are in a long room on the south shore of a large reservoir.">)>
- <TELL
- "There is a western exit, a passageway south, and a steep pathway
- climbing up along the edge of a cliff." ,LONG-TELL1>)>>
- <DEFINE RESERVOIR ()
- <COND (<VERB? "LOOK">
- <COND (,LOW-TIDE!-FLAG
- <TELL
- "You are on what used to be a large reservoir, but which is now a large
- mud pile. There are 'shores' to the north and south." ,LONG-TELL1>)
- (<TELL
- "You are on the reservoir. Beaches can be seen north and south.
- Upstream a small stream enters the reservoir through a narrow cleft
- in the rocks. The dam can be seen downstream." ,LONG-TELL1>)>)>>
- <DEFINE RESERVOIR-NORTH ()
- <COND (<VERB? "LOOK">
- <COND (,LOW-TIDE!-FLAG
- <TELL
- "You are in a large cavernous room, the south of which was formerly
- a reservoir.">
- <TELL ,RESDESC ,LONG-TELL1>)
- (<TELL
- "You are in a large cavernous room, north of a large reservoir.">)>
- <TELL "There is a tunnel leaving the room to the north.">)>>
- \
- ; "SUBTITLE WATER, WATER EVERYWHERE..."
- <DEFINE BOTTLE-FUNCTION ()
- <COND (<VERB? "THROW">
- <TELL "The bottle hits the far wall and is decimated.">
- <REMOVE-OBJECT <PRSO>>)
- (<VERB? "MUNG">
- <REMOVE-OBJECT <PRSO>>
- <TELL "A brilliant maneuver destroys the bottle.">)>>
-
- <DEFINE FILL ("AUX" (REM <>) (W <FIND-OBJ "WATER">) (PRSVEC ,PRSVEC))
- #DECL ((REM) <OR ATOM FALSE> (W) OBJECT (PRSVEC) VECTOR)
- <COND (<OBJECT-ACTION>)
- (<AND <NOT <EMPTY? <PRSI>>> <N==? <PRSI> .W>>
- <TELL "Sadly, " 0 <ODESC2 <PRSO>>
- " can't be put in the ">
- <TELL <ODESC2 <PRSI>>>)
- (<OR <RTRNN ,HERE ,RFILLBIT>
- <SET REM <OR <AND <OCAN .W>
- <==? <OCAN .W> <AVEHICLE ,WINNER>>>
- <==? <OROOM .W> ,HERE>>>>
- <PUT .PRSVEC 1 <FIND-VERB "TAKE">>
- <PUT .PRSVEC 3 <2 .PRSVEC>>
- <PUT .PRSVEC 2 .W>
- <WATER-FUNCTION .REM>)
- (<TELL "I can't find any water here.">)>>
- <DEFINE WATER-FUNCTION ("OPTIONAL" (REM T)
- "AUX" (ME ,WINNER) (B <FIND-OBJ "BOTTL">)
- (PRSVEC ,PRSVEC) (AV <AVEHICLE .ME>) (W <PRSO>))
- #DECL ((ME) ADV (B) OBJECT (REM) <OR ATOM FALSE>
- (PRSVEC) VECTOR (AV) <OR OBJECT FALSE> (W) OBJECT)
- <COND (<VERB? "TAKE" "PUT">
- <COND (<AND .AV <==? .AV <PRSI>>>
- <TELL "There is now a puddle in the bottom of the "
- 1
- <ODESC2 .AV>
- ".">
- <DROP-IF <PRSO>>
- <COND (<==? <OCAN <PRSO>> .AV>)
- (<INSERT-INTO .AV <PRSO>>)>)
- (<AND <NOT <EMPTY? <PRSI>>> <N==? <PRSI> .B>>
- <TELL "The water leaks out of the " 1 <ODESC2 <PRSI>>
- " and evaporates immediately.">
- <REMOVE-OBJECT <PRSO>>)
- (<MEMQ .B <AOBJS .ME>>
- <COND (<NOT <TRNN .B ,OPENBIT>>
- <TELL "The bottle is closed.">)
- (<NOT <EMPTY? <OCONTENTS .B>>>
- <TELL "The bottle is already full.">)
- (T
- <AND .REM <REMOVE-OBJECT <PRSO>>>
- <INSERT-INTO .B <PRSO>>
- <TELL "The bottle is now full of water.">)>)
- (<AND <==? <OCAN <PRSO>> .B>
- <VERB? "TAKE">
- <EMPTY? <PRSI>>>
- <PUT .PRSVEC 2 .B>
- <TAKE T>
- <PUT .PRSVEC 2 .W>)
- (<TELL "The water slips through your fingers.">)>)
- (<VERB? "DROP" "POUR" "GIVE">
- <DROP-IF <PRSO>>
- <COND (.AV
- <TELL "There is now a puddle in the bottom of the "
- 1
- <ODESC2 .AV>
- ".">)
- (<TELL "The water spills to the floor and evaporates immediately.">
- <REMOVE-OBJECT <PRSO>>)>)
- (<VERB? "THROW">
- <TELL "The water splashes on the walls, and evaporates immediately.">
- <REMOVE-OBJECT <PRSO>>)>>
- \
- ; "SUBTITLE CYCLOPS"
- <SETG CYCLOWRATH!-FLAG 0>
- <DEFINE CYCLOPS ("AUX" (RM ,HERE)
- (FOOD <FIND-OBJ "FOOD">) (DRINK <FIND-OBJ "WATER">)
- (COUNT ,CYCLOWRATH!-FLAG) (GARLIC <FIND-OBJ "GARLI">) CYC)
- #DECL ((RM) ROOM (FOOD DRINK) OBJECT
- (CYC GARLIC) OBJECT (COUNT) FIX)
- <COND (,CYCLOPS-FLAG!-FLAG
- <COND (<VERB? "AWAKE" "MUNG" "BURN"
- "ATTAC" "KILL" "HELLO">
- <TELL
- "The cyclops yawns and stares at the thing that woke him up.">
- <SETG CYCLOPS-FLAG!-FLAG <>>
- <TRZ <SET CYC <FIND-OBJ "CYCLO">> ,SLEEPBIT>
- <TRO .CYC ,FIGHTBIT>
- <SETG CYCLOWRATH!-FLAG <ABS .COUNT>>)>)
- (<AND <NOT <VERB? "FGHT?" "1ST?">>
- <G? <ABS .COUNT> 5>>
- <JIGS-UP
- "The cyclops, tired of all of your games and trickery, eats you.
- The cyclops says 'Mmm. Just like mom used to make 'em.'">)
- (<VERB? "GIVE">
- <COND (<==? <PRSO> .FOOD>
- <COND (<G=? .COUNT 0>
- <REMOVE-OBJECT .FOOD>
- <TELL
- "The cyclops says 'Mmm Mmm. I love hot peppers! But oh, could I use
- a drink. Perhaps I could drink the blood of that thing'. From the
- gleam in his eye, it could be surmised that you are 'that thing'." ,LONG-TELL1>
- <SETG CYCLOWRATH!-FLAG <MIN -1 <- .COUNT>>>)>)
- (<==? <PRSO> .DRINK>
- <COND (<L? .COUNT 0>
- <REMOVE-OBJECT .DRINK>
- <TRO <SET CYC <FIND-OBJ "CYCLO">> ,SLEEPBIT>
- <TRZ .CYC ,FIGHTBIT>
- <TELL
- "The cyclops looks tired and quickly falls fast asleep (what did you
- put in that drink, anyway?)." ,LONG-TELL1>
- <SETG CYCLOPS-FLAG!-FLAG T>)
- (<TELL
- "The cyclops apparently was not thirsty at the time and refuses your
- generous gesture.">
- <>)>)
- (<==? <PRSO> .GARLIC>
- <TELL "The cyclops may be hungry, but there is a limit.">
- <SETG CYCLOWRATH!-FLAG <AOS-SOS .COUNT>>)
- (<TELL "The cyclops is not so stupid as to eat THAT!">
- <SETG CYCLOWRATH!-FLAG <AOS-SOS .COUNT>>)>)
- (<VERB? "1ST?" "FGHT?"> <>)
- (<VERB? "HELLO"> <SETG CYCLOWRATH!-FLAG <AOS-SOS .COUNT>>)
- (<AND <SETG CYCLOWRATH!-FLAG <AOS-SOS .COUNT>> <>>)
- (<VERB? "THROW" "MUNG">
- <COND (<PROB 50>
- <TELL
- "Your actions don't appear to be doing much harm to the cyclops, but
- they do not exactly lower your insurance premiums, either." ,LONG-TELL1>)
- (<TELL
- "The cyclops ignores all injury to his body with a shrug.">)>)
- (<VERB? "TAKE">
- <TELL
- "The cyclops is rather heavy and doesn't take kindly to being grabbed.">)
- (<VERB? "TIE">
- <TELL
- "You cannot tie the cyclops, although he is fit to be tied.">)>>
- <DEFINE CYCLOPS-ROOM ("AUX" (WRATH ,CYCLOWRATH!-FLAG))
- #DECL ((WRATH) FIX)
- <COND (<VERB? "LOOK">
- <TELL
- "You are in a room with an exit on the west side, and a staircase
- leading up.">
- <COND (<AND ,CYCLOPS-FLAG!-FLAG <NOT ,MAGIC-FLAG!-FLAG>>
- <TELL
- "The cyclops, perhaps affected by a drug in your drink, is sleeping
- blissfully at the foot of the stairs.">)
- (,MAGIC-FLAG!-FLAG
- <TELL
- "On the north of the room is a wall which used to be solid, but which
- now has a cyclops-sized hole in it.">)
- (<0? .WRATH>
- <TELL
- "A cyclops, who looks prepared to eat horses (much less mere
- adventurers), blocks the staircase. From his state of health, and
- the bloodstains on the walls, you gather that he is not very
- friendly, though he likes people." ,LONG-TELL1>)
- (<G? .WRATH 0>
- <TELL
- "The cyclops is standing in the corner, eyeing you closely. I don't
- think he likes you very much. He looks extremely hungry even for a
- cyclops." ,LONG-TELL1>)
- (<L? .WRATH 0>
- <TELL
- "The cyclops, having eaten the hot peppers, appears to be gasping.
- His enflamed tongue protrudes from his man-sized mouth." ,LONG-TELL1>)>
- <COND (,CYCLOPS-FLAG!-FLAG)
- (<OR <0? .WRATH> <TELL <NTH ,CYCLOMAD <ABS .WRATH>>>>)>)>>
- <GDECL (CYCLOMAD) <VECTOR [REST STRING]>>
- <DEFINE AOS-SOS (FOO)
- #DECL ((FOO) FIX)
- <COND (<L? .FOO 0> <SET FOO <- .FOO 1>>)
- (<SET FOO <+ .FOO 1>>)>
- <COND (,CYCLOPS-FLAG!-FLAG)
- (<TELL <NTH ,CYCLOMAD <ABS .FOO>>>)>
- .FOO>
- \
- ; "SUBTITLE ECHO ECHO ECHO"
- <SETG ECHO-FLAG!-FLAG <>>
- <DEFINE ECHO-ROOM ("AUX"
- (B ,INBUF) L (RM <FIND-ROOM "ECHO">) (OUTCHAN ,OUTCHAN)
- (WALK <FIND-VERB "WALK">) (PRSVEC ,PRSVEC) V
- (BUG <FIND-VERB "BUG">) (FEATURE <FIND-VERB "FEATU">))
- #DECL ((OUTCHAN) CHANNEL (WALK) VERB (PRSVEC) <VECTOR VERB [2 ANY]>
- (B) STRING (L) FIX (RM) ROOM (V) <OR VECTOR FALSE>)
- <COND (,ECHO-FLAG!-FLAG)
- (<UNWIND
- <PROG ()
- <REPEAT (RANDOM-ACTION)
- #DECL ((RANDOM-ACTION) <OR ATOM FALSE OFFSET>)
- <SET L
- <READST .B "" <>>>
- <SETG MOVES <+ ,MOVES 1>>
- <COND (<AND <SET V <LEX .B <REST .B .L> T>>
- <EPARSE .V T>
- <==? <PRSA> .WALK>
- <NOT <EMPTY? <PRSO>>>
- <MEMQ <2 .PRSVEC> <REXITS .RM>>>
- <SET RANDOM-ACTION <VFCN <PRSA>>>
- <APPLY-RANDOM .RANDOM-ACTION>
- <RETURN T>)
- (<==? <PRSA> .BUG>
- <TELL "Feature">)
- (<==? <PRSA> .FEATURE>
- <TELL "That's right.">)
- (<PRINTSTRING .B .OUTCHAN .L>
- <SETG TELL-FLAG T>
- <CRLF>
- <COND (<==? <MEMBER "ECHO" <UPPERCASE .B>> .B>
- <TELL "The acoustics of the room change subtly.">
- <TRZ <FIND-OBJ "BAR"> ,SACREDBIT>
- <SETG ECHO-FLAG!-FLAG T>
- <RETURN T>)>)>>>
- <PROG ()
- <GOTO <FIND-ROOM "CHAS3">>
- <SETG MOVES <+ ,MOVES 1>>>>)>>
- \
- ; "SUBTITLE A SEEDY LOOKING GENTLEMAN..."
- <DEFINE ROBBER ROBBER (HACK
- "AUX" (RM <HROOM .HACK>) ROBJ
- (SEEN? <RTRNN .RM ,RSEENBIT>) (WIN ,WINNER) (WROOM ,HERE)
- (HOBJ <HOBJ .HACK>) (STILL <FIND-OBJ "STILL">)
- HERE? (HH <HOBJS .HACK>) (TREAS <FIND-ROOM "TREAS">))
- #DECL ((HACK) HACK (RM WROOM) ROOM (ROBJ HH) <LIST [REST OBJECT]>
- (SEEN?) <OR ATOM FALSE> (WIN) ADV (HOBJ) OBJECT (ROBBER) ACTIVATION
- (HERE?) <OR ROOM FALSE> (STILL) OBJECT (TREAS) ROOM)
- <PROG ((ONCE <>) OBJT)
- #DECL ((ONCE) <OR ATOM FALSE> (OBJT) <LIST [REST OBJECT]>)
- <COND (<SET HERE? <OROOM .HOBJ>>
- <SET RM .HERE?>)>
- <SET ROBJ <ROBJS .RM>>
- <SET OBJT .HH>
- <COND
- (<AND <==? .RM .TREAS>
- <N==? .RM .WROOM>>
- <COND (.HERE?
- <COND (<==? <OROOM .STILL> .TREAS>
- <SNARF-OBJECT .HOBJ .STILL>)>
- <REMOVE-OBJECT .HOBJ>
- <SET HERE? <>>)>
- <MAPF <>
- <FUNCTION (X)
- #DECL ((X) OBJECT)
- <COND (<G? <OTVAL .X> 0>
- <PUT .HACK ,HOBJS <SET HH <SPLICE-OUT .X .HH>>>
- <INSERT-OBJECT .X .RM>)>>
- .HH>)
- (<AND <==? .RM .WROOM>
- <NOT <RTRNN .RM ,RLIGHTBIT>>> ;"Adventurer is in room: CHOMP, CHOMP"
- <COND
- (<==? .RM .TREAS>) ; "Don't move, Gertrude"
- (<NOT <HFLAG .HACK>>
- <COND (<AND <NOT .HERE?> <PROB 30>>
- <COND (<==? <OCAN .STILL> .HOBJ>
- <INSERT-OBJECT .HOBJ .RM>
- <TELL
- "Someone carrying a large bag is casually leaning against one of the
- walls here. He does not speak, but it is clear from his aspect that
- the bag will be taken only over his dead body." ,LONG-TELL1>
- <PUT .HACK ,HFLAG T>
- <RETURN T .ROBBER>)>)
- (<AND .HERE?
- <TRNN .HOBJ ,FIGHTBIT>
- <COND (<NOT <WINNING? .HOBJ .WIN>>
- <TELL
- "Your opponent, determining discretion to be the better part of
- valor, decides to terminate this little contretemps. With a rueful
- nod of his head, he steps backward into the gloom and disappears." ,LONG-TELL1>
- <REMOVE-OBJECT .HOBJ>
- <TRZ .HOBJ ,FIGHTBIT>
- <SNARF-OBJECT .HOBJ .STILL>
- <RETURN T .ROBBER>)
- (<PROB 90>)>>)
- (<AND .HERE? <PROB 30>>
- <TELL
- "The holder of the large bag just left, looking disgusted.
- Fortunately, he took nothing.">
- <REMOVE-OBJECT .HOBJ>
- <SNARF-OBJECT .HOBJ .STILL>
- <RETURN T .ROBBER>)
- (<PROB 70> <RETURN T .ROBBER>)
- (T
- <COND (<MEMQ .STILL <HOBJS .HACK>>
- <PUT .HACK ,HOBJS <SPLICE-OUT .STILL <HOBJS .HACK>>>
- <PUT .HOBJ ,OCONTENTS (.STILL)>
- <PUT .STILL ,OCAN .HOBJ>)>
- <PUT .HACK ,HOBJS <SET HH <ROB-ROOM .RM .HH 100>>>
- <PUT .HACK ,HOBJS <SET HH <ROB-ADV .WIN .HH>>>
- <PUT .HACK ,HFLAG T>
- <COND (<AND <N==? .OBJT .HH> <NOT .HERE?>>
- <TELL
- "A seedy-looking individual with a large bag just wandered through
- the room. On the way through, he quietly abstracted all valuables
- from the room and from your possession, mumbling something about
- \"Doing unto others before..\"" ,LONG-TELL1>)
- (.HERE?
- <SNARF-OBJECT .HOBJ .STILL>
- <COND (<N==? .OBJT .HH>
- <TELL
- "The other occupant just left, still carrying his large bag. You may
- not have noticed that he robbed you blind first.">)
- (<TELL
- "The other occupant (he of the large bag), finding nothing of value,
- left disgusted.">)>
- <REMOVE-OBJECT .HOBJ>
- <SET HERE? <>>)
- (T
- <TELL
- "A 'lean and hungry' gentleman just wandered through. Finding
- nothing of value, he left disgruntled.">)>)>)
- (T
- <COND (.HERE? ;"Here, already announced."
- <COND (<PROB 30>
- <PUT .HACK ,HOBJS <SET HH <ROB-ROOM .RM .HH 100>>>
- <PUT .HACK ,HOBJS <SET HH <ROB-ADV .WIN .HH>>>
- <COND (<MEMQ <FIND-OBJ "ROPE"> .HH>
- <SETG DOME-FLAG!-FLAG <>>)>
- <COND (<==? .OBJT .HH>
- <TELL
- "The other occupant (he of the large bag), finding nothing of value,
- left disgusted.">)
- (T
- <TELL
- "The other occupant just left, still carrying his large bag. You may
- not have noticed that he robbed you blind first.">)>
- <REMOVE-OBJECT .HOBJ>
- <SET HERE? <>>
- <SNARF-OBJECT .HOBJ .STILL>)
- (<RETURN T .ROBBER>)>)>)>)
- (<AND <MEMQ .HOBJ <ROBJS .RM>> ;"Leave if victim left"
- <SNARF-OBJECT .HOBJ .STILL>
- <REMOVE-OBJECT .HOBJ>
- <SET HERE? <>>>)
- (<AND <==? <OROOM .STILL> .RM>
- <SNARF-OBJECT .HOBJ .STILL>
- <>>)
- (.SEEN? ;"Hack the adventurer's belongings"
- <PUT .HACK ,HOBJS <SET HH <ROB-ROOM .RM .HH 75>>>
- <COND
- (<AND <==? <RDESC2 .RM> ,MAZEDESC> <==? <RDESC2 .WROOM> ,MAZEDESC>>
- <MAPF <>
- <FUNCTION (X)
- #DECL ((X) OBJECT)
- <COND (<AND <TRNN .X ,TAKEBIT> <TRNN .X ,OVISON> <PROB 40>>
- <TELL
- "You hear, off in the distance, someone saying \"My, I wonder what
- this fine " 3 <ODESC2 .X> " is doing here.\"">
- <TELL "" 1>
- <COND (<PROB 60 80>
- <REMOVE-OBJECT .X>
- <TRO .X ,TOUCHBIT>
- <PUT .HACK ,HOBJS <SET HH (.X !.HH)>>)>
- <MAPLEAVE>)>>
- <ROBJS .RM>>)
- (<MAPF <>
- <FUNCTION (X)
- #DECL ((X) OBJECT)
- <COND (<AND <0? <OTVAL .X>>
- <TRNN .X ,TAKEBIT>
- <TRNN .X ,OVISON>
- <PROB 20 40>>
- <REMOVE-OBJECT .X>
- <TRO .X ,TOUCHBIT>
- <PUT .HACK ,HOBJS <SET HH (.X !.HH)>>
- <COND (<==? .RM .WROOM>
- <TELL "You suddenly notice that the "
- 1
- <ODESC2 .X>
- " vanished.">)>
- <MAPLEAVE>)>>
- <ROBJS .RM>>
- <COND (<MEMQ <FIND-OBJ "ROPE"> .HH>
- <SETG DOME-FLAG!-FLAG <>>)>)>)>
- <COND (<SET ONCE <NOT .ONCE>> ;"Move to next room, and hack."
- <PROG ((ROOMS <HROOMS .HACK>))
- #DECL ((ROOMS) <LIST [REST ROOM]>)
- <SET RM <1 .ROOMS>>
- <COND (<EMPTY? <SET ROOMS <REST .ROOMS>>>
- <SET ROOMS ,ROOMS>)>
- <COND (<OR <RTRNN .RM ,RSACREDBIT>
- <NOT <RTRNN .RM ,RLANDBIT>>> ;"Can I work here?"
- <AGAIN>)>
- <PUT .HACK ,HROOM .RM>
- <PUT .HACK ,HFLAG <>>
- <PUT .HACK ,HROOMS .ROOMS>
- <SET SEEN? <RTRNN .RM ,RSEENBIT>>>
- <AGAIN>)>> ;"Drop worthless cruft, sometimes"
- <OR <==? .RM .TREAS>
- <MAPF <>
- <FUNCTION (X)
- #DECL ((X) OBJECT)
- <COND (<AND <0? <OTVAL .X>> <PROB 30 70>>
- <PUT .HACK ,HOBJS <SET HH <SPLICE-OUT .X .HH>>>
- <INSERT-OBJECT .X .RM>
- <AND <==? .RM .WROOM>
- <TELL
- "The robber, rummaging through his bag, dropped a few items he found
- valueless." >>)>>
- .HH>>>
- <DEFINE ROBBER-FUNCTION ("AUX" (DEM <GET-DEMON "THIEF">) (HERE ,HERE) (FLG <>)
- BRICK FUSE ST F (T <HOBJ .DEM>) (CHALI <FIND-OBJ "CHALI">))
- #DECL ((DEM) HACK (CHALI T HOBJ ST BRICK FUSE) OBJECT (F) <VECTOR ANY CEVENT>
- (HERE) ROOM (FLG) <OR ATOM FALSE>)
- <COND (<VERB? "FGHT?">
- <COND (<==? <OCAN <SET ST <FIND-OBJ "STILL">>> .T> <>)
- (<==? <OROOM .ST> .HERE>
- <SNARF-OBJECT .T .ST>
- <TELL
- "The robber, somewhat surprised at this turn of events, nimbly
- retrieves his stilletto.">
- T)
- (ELSE
- <TELL
- "Annoyed to be left unarmed in such an obviously dangerous
- neighborhood, the thief slips off into the shadows.">
- <TRO .CHALI ,TAKEBIT>
- <REMOVE-OBJECT .T>)>)
- (<VERB? "DEAD!">
- <COND (<NOT <EMPTY? <HOBJS .DEM>>>
- <TELL " His booty remains.">
- <MAPF <> <FUNCTION (X) #DECL ((X) OBJECT)
- <INSERT-OBJECT .X .HERE>>
- <HOBJS .DEM>>
- <PUT .DEM ,HOBJS ()>)>
- <TRO .CHALI ,TAKEBIT>
- <COND (<==? .HERE <FIND-ROOM "TREAS">>
- <MAPF <>
- <FUNCTION (X) #DECL ((X) OBJECT)
- <COND (<AND <N==? .X .CHALI>
- <N==? .X .T>>
- <COND (<TRO .X ,OVISON>
- <COND (<NOT .FLG>
- <SET FLG T>
- <TELL
- "As the thief dies, the power of his magic decreases, and his
- treasures reappear:" 2>)>
- <TELL " A " 2 <ODESC2 .X>>)>)>>
- <ROBJS .HERE>>)>
- <PUT .DEM ,HACTION <>>)
- (<VERB? "1ST?"> <PROB 20 75>)
- (<VERB? "OUT!">
- <PUT .DEM ,HACTION <>>
- <TRZ <FIND-OBJ "STILL"> ,OVISON>
- <TRO .CHALI ,TAKEBIT>
- <ODESC1 .T ,ROBBER-U-DESC>)
- (<AND <VERB? "HELLO">
- <==? <ODESC1 .T> ,ROBBER-U-DESC>>
- <TELL
- "The thief, being temporarily incapacitated, is unable to acknowledge
- your greeting with his usual graciousness.">)
- (<VERB? "IN!">
- <COND (<==? <HROOM .DEM> .HERE>
- <TELL
- "The robber revives, briefly feigning continued unconsciousness, and
- when he sees his moment, scrambles away from you.">)>
- <COND (<TYPE? ,ROBBER OFFSET> <PUT .DEM ,HACTION ROBBER>)
- (<PUT .DEM ,HACTION ROBBER>)>
- <ODESC1 .T ,ROBBER-C-DESC>
- <COND (<AND <==? .HERE <FIND-ROOM "TREAS">>
- <OROOM <SET CHALI .CHALI>>>
- <TRZ .CHALI ,TAKEBIT>)>
- <TRO <FIND-OBJ "STILL"> ,OVISON>)
- (<AND <==? <PRSO> <FIND-OBJ "KNIFE">>
- <VERB? "THROW">
- <NOT <TRNN .T ,FIGHTBIT>>>
- <COND (<PROB 10 0>
- <TELL
- "You evidently frightened the robber, though you didn't hit him. He
- flees" 1
- <COND (<EMPTY? <HOBJS .DEM>>
- ".")
- (T
- <MAPF <> <FUNCTION (X) #DECL ((X) OBJECT)
- <INSERT-OBJECT .X .HERE>> <HOBJS .DEM>>
- <PUT .DEM ,HOBJS ()>
- ", but the contents of his bag fall on the floor.")>>
- <REMOVE-OBJECT .T>)
- (T
- <TELL
- "You missed. The thief makes no attempt to take the knife, though it
- would be a fine addition to the collection in his bag. He does seem
- angered by your attempt." ,LONG-TELL1>
- <TRO .T ,FIGHTBIT>)>)
- (<AND <VERB? "THROW" "GIVE">
- <NOT <EMPTY? <PRSO>>>
- <N==? <PRSO> <HOBJ .DEM>>>
- <COND (<L? <OSTRENGTH .T> 0>
- <OSTRENGTH .T <- <OSTRENGTH .T>>>
- <PUT .DEM ,HACTION <COND (<TYPE? ,ROBBER OFFSET> ,ROBBER)
- (ROBBER)>>
- <TRO <FIND-OBJ "STILL"> ,OVISON>
- <ODESC1 .T ,ROBBER-C-DESC>
- <TELL
- "Your proposed victim suddenly recovers consciousness.">)>
- <COND (<AND <==? <PRSO> <SET BRICK <FIND-OBJ "BRICK">>>
- <==? <OCAN <SET FUSE <FIND-OBJ "FUSE">>> .BRICK>
- <SET F <OLINT .FUSE>>
- <NOT <0? <CTICK <2 .F>>>>>
- ; "I.e., he's trying to give us the brick with a lighted fuse."
- <TELL
- "The thief seems rather offended by your offer. Do you think he's as
- stupid as you are?">)
- (<REMOVE-OBJECT <PRSO>>
- <PUT .DEM ,HOBJS (<PRSO> !<HOBJS .DEM>)>
- <COND (<G? <OTVAL <PRSO>> 0>
- <SETG THIEF-ENGROSSED!-FLAG T>
- <TELL
- "The thief is taken aback by your unexpected generosity, but accepts
- the " 1 <ODESC2 <PRSO>> " and stops to admire its beauty.">)
- (<TELL
- "The thief places the " 1 <ODESC2 <PRSO>> " in his bag and thanks
- you politely.">)>)>)
- (<VERB? "TAKE">
- <TELL
- "Once you got him, what would you do with him?">)>>
- <DEFINE CHALICE ("AUX" TR T)
- #DECL ((TR) ROOM (T) OBJECT)
- <COND (<VERB? "TAKE">
- <COND (<AND <NOT <OCAN <PRSO>>>
- <==? <OROOM <PRSO>> <SET TR <FIND-ROOM "TREAS">>>
- <==? <OROOM <SET T <FIND-OBJ "THIEF">>> .TR>
- <TRNN .T ,FIGHTBIT>
- <HACTION ,ROBBER-DEMON>>
- <TELL
- "Realizing just in time that you'd be stabbed in the back if you
- attempted to take the chalice, you return to the fray.">)>)>>
- <DEFINE TREASURE-ROOM ("AUX" (HACK ,ROBBER-DEMON) CHALI (HOBJ <HOBJ .HACK>)
- (FLG <>) TL (HERE ,HERE) (ROOMS ,ROOMS))
- #DECL ((HACK) HACK (CHALI HOBJ) OBJECT (FLG) <OR ATOM FALSE>
- (TL ROOMS) <LIST [REST ROOM]> (HERE) ROOM)
- <COND (<AND <HACTION .HACK>
- <VERB? "GO-IN">>
- <COND (<SET FLG <N==? <OROOM .HOBJ> .HERE>>
- <TELL
- "You hear a scream of anguish as you violate the robber's hideaway.
- Using passages unknown to you, he rushes to its defense.">
- <COND (<OROOM .HOBJ>
- <REMOVE-OBJECT .HOBJ>)>
- <TRO .HOBJ ,FIGHTBIT>
- <PUT .HACK ,HROOM .HERE>
- <PUT .HACK ,HROOMS <COND (<EMPTY? <SET TL <REST <MEMQ .HERE .ROOMS>>>>
- .ROOMS)
- (.TL)>>
- <INSERT-OBJECT .HOBJ .HERE>)
- (T
- <TRO .HOBJ ,FIGHTBIT>)>
- <AND <NOT <OCAN <SET CHALI <FIND-OBJ "CHALI">>>>
- <==? <OROOM .CHALI> .HERE>
- <TRZ .CHALI ,TAKEBIT>>
- <COND (<NOT <LENGTH? <ROBJS .HERE> 2>>
- <TELL
- "The thief gestures mysteriously, and the treasures in the room
- suddenly vanish.">)>
- <MAPF <>
- <FUNCTION (X) #DECL ((X) OBJECT)
- <COND (<AND <N==? .X .CHALI>
- <N==? .X .HOBJ>>
- <TRZ .X ,OVISON>)>>
- <ROBJS .HERE>>)>>
- <DEFINE TREAS ("AUX" (HERE ,HERE))
- #DECL ((HERE) ROOM)
- <COND (<AND <VERB? "TREAS">
- <==? .HERE <FIND-ROOM "TEMP1">>>
- <GOTO <FIND-ROOM "TREAS">>
- <ROOM-DESC>)
- (<AND <VERB? "TEMPL">
- <==? .HERE <FIND-ROOM "TREAS">>>
- <GOTO <FIND-ROOM "TEMP1">>
- <ROOM-DESC>)
- (T <TELL "Nothing happens.">)>>
- \
- ; "SUBTITLE RANDOM VERBS"
- <DEFINE SINBAD ("AUX" (C <FIND-OBJ "CYCLO">))
- #DECL ((C) OBJECT)
- <COND (<AND <==? ,HERE <FIND-ROOM "CYCLO">>
- <MEMQ .C <ROBJS ,HERE>>>
- <SETG CYCLOPS-FLAG!-FLAG T>
- <TELL
- "The cyclops, hearing the name of his deadly nemesis, flees the room
- by knocking down the wall on the north of the room.">
- <SETG MAGIC-FLAG!-FLAG T>
- <TRZ .C ,FIGHTBIT>
- <REMOVE-OBJECT .C>)
- (<TELL
- "Wasn't he a sailor?">)>>
- <DEFINE GRANITE ()
- <TELL "I think you are taking this thing for granite.">>
- <GDECL (DUMMY) <VECTOR [REST STRING]>>
- <DEFINE BRUSH ("AUX")
- <COND (<==? <PRSO> <FIND-OBJ "TEETH">>
- <COND (<AND <==? <PRSI> <FIND-OBJ "PUTTY">>
- <MEMQ <PRSI> <AOBJS ,WINNER>>>
- <JIGS-UP
- "Well, you seem to have been brushing your teeth with some sort of
- glue. As a result, your mouth gets glued together (with your nose)
- and you die of respiratory failure.">)
- (<EMPTY? <PRSI>>
- <TELL
- "Dental hygiene is highly recommended, but I'm not sure what you want
- to brush them with.">)
- (<TELL
- "A nice idea, but with a " 1 <ODESC2 <PRSI>> "?">)>)
- (<TELL
- "If you wish, but I can't understand why??">)>>
- <DEFINE RING ()
- <COND (<==? <PRSO> <FIND-OBJ "BELL">>
- <TELL
- "Ding, dong.">)
- (<TELL
- "How, exactly, can I ring that?">)>>
- <DEFINE EAT ("AUX" (EAT? <>) (DRINK? <>)
- NOBJ (AOBJS <AOBJS ,WINNER>))
- #DECL ((NOBJ) <OR OBJECT FALSE> (AOBJS) <LIST [REST OBJECT]>
- (EAT? DRINK?) <OR ATOM FALSE>)
- <COND (<OBJECT-ACTION>)
- (<AND <SET EAT? <TRNN <PRSO> ,FOODBIT>> <MEMQ <PRSO> .AOBJS>>
- <COND (<VERB? "DRINK">
- <TELL "How can I drink that?">)
- (<TELL
- "Thank you very much. It really hit the spot.">
- <REMOVE-OBJECT <PRSO>>)>)
- (<AND <SET DRINK? <TRNN <PRSO> ,DRINKBIT>>
- <SET NOBJ <OCAN <PRSO>>>
- <MEMQ .NOBJ .AOBJS>>
- <COND (<TRNN .NOBJ ,OPENBIT>
- <TELL
- "Thank you very much. I was rather thirsty (from all this talking,
- probably).">)
- (T
- <TELL
- "I'd like to, but I can't get to it.">)>
- <INSERT-INTO .NOBJ <PRSO>>)
- (<NOT <OR .EAT? .DRINK?>>
- <TELL
- "I don't think that the " 1 <ODESC2 <PRSO>> " would agree with you.">)
- (<TELL
- "I think you should get that first.">)>>
- <DEFINE JARGON ()
- <TELL "Well, FOO, BAR, and BLETCH to you too!">>
- <DEFINE CURSES ()
- <TELL <PICK-ONE ,OFFENDED>>>
- <GDECL (OFFENDED) <VECTOR [REST STRING]>>
- <DEFINE PRAYER ()
- <COND (<AND <==? ,HERE <FIND-ROOM "TEMP2">>
- <GOTO <FIND-ROOM "FORE1">>>
- <ROOM-DESC>)
- (<TELL
- "If you pray enough, your prayers may be answered.">)>>
- <DEFINE LEAPER ("AUX" (RM ,HERE) (EXITS <REXITS .RM>) M)
- #DECL ((RM) ROOM (EXITS) EXIT (M) <OR VECTOR FALSE>)
- <COND (<NOT <EMPTY? <PRSO>>>
- <COND (<MEMQ <PRSO> <ROBJS .RM>>
- <COND (<TRNN <PRSO> ,VILLAINBIT>
- <TELL "The " 1 <ODESC2 <PRSO>> " is too big to jump over.">)
- (<TELL <PICK-ONE ,WHEEEEE>>)>)
- (<TELL "That would be a good trick.">)>)
- (<SET M <MEMQ <FIND-DIR "DOWN"> .EXITS>>
- <COND (<OR <TYPE? <2 .M> NEXIT>
- <AND <TYPE? <2 .M> CEXIT>
- <NOT <CXFLAG <2 .M>>>>>
- <JIGS-UP <PICK-ONE ,JUMPLOSS>>)>)
- (<TELL <PICK-ONE ,WHEEEEE>>)>>
- <DEFINE SKIPPER ()
- <TELL <PICK-ONE ,WHEEEEE>>>
- <SETG HS 0>
- <GDECL (HS) FIX>
- <DEFINE HELLO ("AUX" AMT)
- #DECL ((AMT) FIX)
- <COND (<NOT <EMPTY? <PRSO>>>
- <COND (<==? <PRSO> <FIND-OBJ "SAILO">>
- <SET AMT <SETG HS <+ ,HS 1>>>
- <COND (<0? <MOD .AMT 20>>
- <TELL
- "You seem to be repeating yourself.">)
- (<0? <MOD .AMT 10>>
- <TELL
- "I think that phrase is getting a bit worn out.">)
- (<TELL
- "Nothing happens here.">)>)
- (<==? <PRSO> <FIND-OBJ "AVIAT">>
- <TELL "Here, nothing happens.">)
- (<OBJECT-ACTION>)
- (<TRNN <PRSO> ,VILLAINBIT>
- <TELL "The " 1 <ODESC2 <PRSO>> " bows his head to you in greeting.">)
- (<TELL
- "I think that only schizophrenics say 'Hello' to a " 1 <ODESC2 <PRSO>> ".">)>)
- (<TELL <PICK-ONE ,HELLOS>>)>>
- <GDECL (HELLOS WHEEEEE JUMPLOSS) <VECTOR [REST STRING]>>
- <DEFINE READER ()
- <COND (<NOT <LIT? ,HERE>>
- <TELL "It is impossible to read in the dark.">)
- (<AND <NOT <EMPTY? <PRSI>>> <NOT <TRNN <PRSI> ,TRANSBIT>>>
- <TELL "How does one look through a " 1 <ODESC2 <PRSI>> "?">)
- (<NOT <TRNN <PRSO> ,READBIT>>
- <TELL "How can I read a " 1 <ODESC2 <PRSO>> "?">)
- (<OBJECT-ACTION>)
- (<TELL <OREAD <PRSO>> ,LONG-TELL1>)>>
- <DEFINE LOOK-INSIDE ("AUX" (OD <ODESC2 <PRSO>>))
- #DECL ((OD) STRING)
- <COND (<OBJECT-ACTION>)
- (<TRNN <PRSO> ,DOORBIT>
- <COND (<TRNN <PRSO> ,OPENBIT>
- <TELL
- "The " 1 .OD " is open, but I can't tell what's beyond it.">)
- (<TELL "The " 1 .OD " is closed.">)>)
- (<TRNN <PRSO> ,CONTBIT>
- <COND (<SEE-INSIDE? <PRSO>>
- <COND (<NOT <EMPTY? <OCONTENTS <PRSO>>>>
- <PRINT-CONT <PRSO>
- <AVEHICLE ,WINNER>
- <FIND-OBJ "#####">
- ,INDENTSTR>)
- (<TELL "The " 1 .OD " is empty.">)>)
- (<TELL "The " 1 .OD " is closed.">)>)
- (<TELL "I don't know how to look inside a " 1 .OD ".">)>>
- <DEFINE LOOK-UNDER ()
- <COND (<OBJECT-ACTION>)
- (<TELL "There is nothing interesting there.">)>>
- <DEFINE REPENT ()
- <TELL "It could very well be too late!">>
- <DEFINE BURNER ()
- <COND (<FLAMING? <PRSI>>
- <COND (<OBJECT-ACTION>)
- (<AND <==? <AVEHICLE ,WINNER> <FIND-OBJ "BALLO">>
- <BALLOON>>)
- (<AND <TRNN <PRSO> ,BURNBIT>
- <COND (<MEMQ <PRSO> <AOBJS ,WINNER>>
- <TELL
- "The " 1 <ODESC2 <PRSO>> " catches fire.">
- <JIGS-UP
- "Unfortunately, you were holding it at the time.">)
- (<HACKABLE? <PRSO> ,HERE>
- <TELL
- "The " 1 <ODESC2 <PRSO>> " catches fire and is consumed.">
- <REMOVE-OBJECT <PRSO>>)
- (<TELL "You don't have that.">)>>)
- (<TELL
- "I don't think you can burn a " 1 <ODESC2 <PRSO>> ".">)>)
- (<TELL
- "With a " 1 <ODESC2 <PRSI>> "??!?">)>>
- <DEFINE TURNER ()
- <COND (<TRNN <PRSO> ,TURNBIT>
- <COND (<TRNN <PRSI> ,TOOLBIT>
- <OBJECT-ACTION>)
- (<TELL
- "You certainly can't turn it with a " 1 <ODESC2 <PRSI>> ".">)>)
- (<TELL
- "You can't turn that!">)>>
- <GDECL (DOORMUNGS) <VECTOR [REST STRING]>>
- <DEFINE DDOOR-FUNCTION ()
- <COND (<VERB? "OPEN">
- <TELL
- "The door cannot be opened.">)
- (<VERB? "BURN">
- <TELL
- "You cannot burn this door.">)
- (<VERB? "MUNG">
- <TELL <PICK-ONE ,DOORMUNGS>>)>>
- <DEFINE INFLATER ()
- <COND (<OBJECT-ACTION>)
- (<TELL "How can you inflate that?">)>>
- <DEFINE DEFLATER ()
- <COND (<OBJECT-ACTION>)
- (<TELL "Come on, now!">)>>
- <DEFINE LOCKER ()
- <COND (<AND <==? <PRSO> <FIND-OBJ "GRATE">>
- <==? ,HERE <FIND-ROOM "MGRAT">>>
- <SETG GRUNLOCK!-FLAG <>>
- <TELL "The grate is locked.">
- <MAPF <>
- <FUNCTION (X)
- #DECL ((X) <OR DOOR CEXIT NEXIT ROOM>)
- <COND (<AND <TYPE? .X DOOR>
- <==? <DOBJ .X> <PRSO>>>
- <PUT .X ,DSTR "The grate is locked.">
- <MAPLEAVE>)>>
- <REXITS ,HERE>>)
- (<TELL "It doesn't seem to work.">)>>
- <DEFINE UNLOCKER ("AUX" (R <FIND-ROOM "MGRAT">))
- #DECL ((R) ROOM)
- <COND (<AND <==? <PRSO> <FIND-OBJ "GRATE">>
- <==? ,HERE <FIND-ROOM "MGRAT">>>
- <COND (<==? <PRSI> <FIND-OBJ "KEYS">>
- <SETG GRUNLOCK!-FLAG T>
- <TELL "The grate is unlocked.">
- <MAPF <>
- <FUNCTION (X)
- #DECL ((X) <OR DOOR CEXIT NEXIT ROOM>)
- <COND (<AND <TYPE? .X DOOR>
- <==? <DOBJ .X> <PRSO>>>
- <PUT .X ,DSTR "The grate is closed.">
- <MAPLEAVE>)>>
- <REXITS .R>>)
- (<TELL "Can you unlock a grating with a " 1 <ODESC2 <PRSI>> "?">)>)
- (<TELL "It doesn't seem to work.">)>>
- <DEFINE KILLER ("OPTIONAL" (STR "kill"))
- #DECL ((STR) STRING)
- <COND (<OBJECT-ACTION>)
- (<EMPTY? <PRSO>>
- <TELL "There is nothing here to " 1 .STR ".">)
- (<NOT <TRNN <PRSO> ,VILLAIN>>
- <COND (<TRNN <PRSO> ,VICBIT>)
- (<TELL
- "I've known strange people, but fighting a " 1 <ODESC2 <PRSO>> "?">)>)
- (<EMPTY? <PRSI>>
- <TELL "Trying to " 0 .STR>
- <TELL " a " 1 <ODESC2 <PRSO>> " with your bare hands is suicidal.">)
- (<NOT <TRNN <PRSI> ,WEAPONBIT>>
- <TELL "Trying to " 0 .STR>
- <TELL " a " 0 <ODESC2 <PRSO>> " with a ">
- <TELL <ODESC2 <PRSI>> 1 " is suicidal.">)
- (ELSE
- <BLOW ,PLAYER <PRSO> <OFMSGS <PRSI>> T <>>)>>
- <DEFINE ATTACKER () <KILLER "attack">>
- <DEFINE SWINGER ()
- <PERFORM ATTACKER <PRSA> <PRSI> <PRSO>>>
- <DEFINE HACK-HACK (OBJ STR "OPTIONAL" (OBJ2 <>))
- #DECL ((OBJ) OBJECT (STR) STRING (OBJ2) <OR FALSE STRING>)
- <COND (<OBJECT-ACTION>)
- (.OBJ2
- <TELL .STR 0 <ODESC2 .OBJ> " with a ">
- <TELL .OBJ2 1 <PICK-ONE ,HO-HUM>>)
- (ELSE
- <TELL .STR 1 <ODESC2 .OBJ> <PICK-ONE ,HO-HUM>>)>>
- <GDECL (HO-HUM) <VECTOR [REST STRING]>>
- <DEFINE MUNGER ()
- <COND (<TRNN <PRSO> ,VILLAIN>
- <COND (<NOT <EMPTY? <PRSI>>>
- <COND (<OBJECT-ACTION>)
- (<TRNN <PRSI> ,WEAPONBIT>
- <BLOW ,PLAYER <PRSO> <OFMSGS <PRSI>> T <>>)
- (T
- <TELL "Munging a " 0 <ODESC2 <PRSO>> " with a ">
- <TELL <ODESC2 <PRSI>> 1 " is quite self-destructive.">)>)
- (T
- <TELL "Munging a " 1 <ODESC2 <PRSO>> " with your bare hands is suicidal.">)>)
- (<HACK-HACK <PRSO> "Munging a ">)>>
- <DEFINE KICKER ()
- <HACK-HACK <PRSO> "Munging a ">>
- <DEFINE WAVER ()
- <HACK-HACK <PRSO> "Waving a ">>
- <DEFINE R/L ()
- <HACK-HACK <PRSO> "Playing in this way with a ">>
- <DEFINE RUBBER ()
- <HACK-HACK <PRSO> "Fiddling with a ">>
- <DEFINE EXORCISE ()
- <COND (<OBJECT-ACTION>) (T)>>
-
- <DEFINE PLUGGER ()
- <COND (<OBJECT-ACTION>)
- (<TELL "This has no effect.">)>>
- <DEFINE UNTIE ()
- <COND (<OBJECT-ACTION>)
- (<TRNN <PRSO> ,TIEBIT>
- <TELL "I don't think so.">)
- (<TELL "This cannot be tied, so it cannot be untied!">)>>
- <DEFINE PUSHER ()
- <COND (<OBJECT-ACTION>)
- (<HACK-HACK <PRSO> "Pushing the ">)>>
- <DEFINE TIE ()
- <COND (<TRNN <PRSO> ,TIEBIT>
- <COND (<OBJECT-ACTION>)
- (<TELL "You can't tie the " 1 <ODESC2 <PRSO>> " to that.">)>)
- (<TELL "How can you tie that to anything.">)>>
- <DEFINE TIE-UP ()
- <COND (<TRNN <PRSI> ,TIEBIT>
- <COND (<TRNN <PRSO> ,VILLAINBIT>
- <TELL "The "
- 1
- <ODESC2 <PRSO>>
- " struggles and you cannot tie him up.">)
- (<TELL "Why would you tie up a " 1 <ODESC2 <PRSO>> "?">)>)
- (<TELL "You could certainly never tie it with that!">)>>
- <DEFINE MELTER ()
- <COND (<OBJECT-ACTION>)
- (<TELL "I'm not sure that a " 1 <ODESC2 <PRSO>> " can be melted.">)>>
- <DEFINE MUMBLER ()
- <TELL "You'll have to speak up if you expect me to hear you!">>
- <DEFINE ALARM ()
- <COND (<TRNN <PRSO> ,SLEEPBIT>
- <OBJECT-ACTION>)
- (<TELL "The " 1 <ODESC2 <PRSO>> " isn't sleeping.">)>>
- <DEFINE ZORK ()
- <TELL "That word is replaced henceforth with DUNGEON.">>
- <DEFINE DUNGEON ()
- <TELL "At your service!">>
- \
- ; "SUBTITLE RANDOM FUNCTIONS"
- <SETG ON-POLE!-FLAG <>>
- <DEFINE BODY-FUNCTION ()
- <COND (<VERB? "TAKE">
- <TELL "A force keeps you from taking the bodies.">)
- (<VERB? "MUNG" "BURN">
- <COND (,ON-POLE!-FLAG)
- (<SETG ON-POLE!-FLAG T>
- <INSERT-OBJECT <FIND-OBJ "HPOLE"> <FIND-ROOM "LLD2">>)>
- <JIGS-UP
- "The voice of the guardian of the dungeon booms out from the darkness
- 'Your disrespect costs you your life!' and places your head on a pole.">)>>
- <DEFINE BLACK-BOOK ()
- <COND (<VERB? "OPEN">
- <TELL
- "The book is open to page 569.">)
- (<VERB? "CLOSE">
- <TELL
- "As hard as you try, the book cannot be closed.">)
- (<VERB? "BURN">
- <REMOVE-OBJECT <PRSO>>
- <JIGS-UP
- "A booming voice says 'Wrong, cretin!' and you notice that you have
- turned into a pile of dust.">)>>
- <DEFINE PAINTING ()
- <COND (<VERB? "MUNG">
- <OTVAL <PRSO> 0>
- <PUT <PRSO> ,ODESC2 "worthless piece of canvas">
- <ODESC1 <PRSO> "There is a worthless piece of canvas here.">
- <TELL
- "Congratulations! Unlike the other vandals, who merely stole the
- artist's masterpieces, you have destroyed one.">)>>
- \
- ; "SUBTITLE LET THERE BE LIGHT SOURCES"
- <PSETG DIMMER "The lamp appears to be getting dimmer.">
- <PSETG LAMP-TICKS [50 30 20 10 4 0]>
- <PSETG LAMP-TELLS [,DIMMER ,DIMMER ,DIMMER ,DIMMER "The lamp is dying."]>
- <DEFINE LANTERN ("AUX" (HERE ,HERE) (RLAMP <FIND-OBJ "LAMP">) FOO)
- #DECL ((HERE) ROOM (RLAMP) OBJECT (FOO) <VECTOR ANY CEVENT>)
- <COND (<VERB? "THROW">
- <TELL
- "The lamp has smashed into the floor and the light has gone out.">
- <REMOVE-OBJECT <FIND-OBJ "LAMP">>
- <INSERT-OBJECT <FIND-OBJ "BLAMP"> .HERE>)
- (<VERB? "C-INT">
- <LIGHT-INT .RLAMP ,LNTIN ,LAMP-TICKS ,LAMP-TELLS>)
- (<VERB? "TRNON" "LIGHT">
- <CLOCK-ENABLE <2 <SET FOO <OLINT .RLAMP>>>>
- <>)
- (<VERB? "TRNOF">
- <CLOCK-DISABLE <2 <SET FOO <OLINT .RLAMP>>>>
- <>)>>
- <PSETG CDIMMER "The candles grow shorter.">
- <PSETG CANDLE-TICKS [20 10 5 0]>
- <PSETG CANDLE-TELLS [,CDIMMER ,CDIMMER "The candles are very short."]>
- <DEFINE MATCH-FUNCTION ("AUX" (MATCH <FIND-OBJ "MATCH">) (MC <OMATCH .MATCH>))
- #DECL ((MATCH) OBJECT (MC) FIX)
- <COND (<AND <VERB? "LIGHT"> <==? <PRSO> .MATCH>>
- <COND (<AND <OMATCH .MATCH <SET MC <- .MC 1>>>
- <L=? .MC 0>>
- <TELL "I'm afraid that you have run out of matches.">)
- (<TRO .MATCH <+ ,FLAMEBIT ,LIGHTBIT ,ONBIT>>
- <CLOCK-INT ,MATIN 2>
- <TELL "One of the matches starts to burn.">)>)
- (<AND <VERB? "TRNOF"> <TRNN .MATCH ,LIGHTBIT>>
- <TELL "The match is out.">
- <TRZ .MATCH <+ ,FLAMEBIT ,LIGHTBIT ,ONBIT>>
- <CLOCK-INT ,MATIN 0>
- T)
- (<VERB? "C-INT">
- <TELL "The match has gone out.">
- <TRZ .MATCH <+ ,FLAMEBIT ,LIGHTBIT ,ONBIT>>)>>
- <DEFINE CANDLES ("AUX" (C <FIND-OBJ "CANDL">) MATCH FOO)
- #DECL ((PRSA) VERB (MATCH C) OBJECT (W) <OR FALSE OBJECT>
- (FOO) <VECTOR FIX CEVENT>)
- <COND
- (<==? .C <PRSI>>)
- (ELSE
- <SET FOO <OLINT .C>>
- <COND (<VERB? "BURN" "LIGHT">
- <COND (<NOT <TRNN .C ,LIGHTBIT>>
- <TELL
- "Alas, there's not much left of the candles. Certainly not enough to
- burn.">)
- (<EMPTY? <PRSI>>
- <TELL "With what?">
- <ORPHAN T
- <FIND-ACTION "LIGHT">
- .C
- <FIND-PREP "WITH">>
- <SETG PARSE-WON <>>
- T)
- (<AND <==? <PRSI> <SET MATCH <FIND-OBJ "MATCH">>>
- <TRNN .MATCH ,ONBIT>>
- <COND (<TRNN .C ,ONBIT>
- <TELL "The candles are already lighted.">)
- (<TRO .C ,ONBIT>
- <TELL "The candles are lighted.">
- <CLOCK-ENABLE <2 .FOO>>)>)
- (<==? <PRSI> <FIND-OBJ "TORCH">>
- <COND (<TRNN .C ,ONBIT>
- <TELL
- "You realize, just in time, that the candles are already lighted.">)
- (<TELL
- "The heat from the torch is so intense that the candles are vaporised.">
- <REMOVE-OBJECT .C>)>)
- (<TELL
- "You have to light them with something that's burning, you know.">)>)
- (<VERB? "TRNOF">
- <CLOCK-DISABLE <2 .FOO>>
- <COND (<TRNN .C ,ONBIT>
- <TELL "The flame is extinguished.">
- <TRZ .C ,ONBIT>)
- (<TELL "The candles are not lighted.">)>)
- (<VERB? "C-INT">
- <LIGHT-INT .C ,CNDIN ,CANDLE-TICKS ,CANDLE-TELLS>)>)>>
- <DEFINE LIGHT-INT (OBJ CEV TICK TELL "AUX" CNT TIM (FOO <OLINT .OBJ>))
- #DECL ((OBJ) OBJECT (FCN) APPLICABLE (TICK) <VECTOR [REST FIX]> (CEV) CEVENT
- (TELL) <VECTOR [REST STRING]> (TIM CNT) FIX (FOO) <VECTOR FIX CEVENT>)
- <PUT .FOO 1 <SET CNT <+ <1 .FOO> 1>>>
- <CLOCK-INT .CEV <SET TIM <NTH .TICK .CNT>>>
- <COND (<0? .TIM>
- <COND (<OR <NOT <OROOM .OBJ>> <==? <OROOM .OBJ> ,HERE>>
- <TELL "I hope you have more light than from a " 1 <ODESC2 .OBJ> ".">)>
- <TRZ .OBJ <+ ,LIGHTBIT ,ONBIT>>)
- (<OR <NOT <OROOM .OBJ>>
- <==? <OROOM .OBJ> ,HERE>>
- <TELL <NTH .TELL .CNT>>)>>
- <DEFINE CAVE2-ROOM ("AUX" FOO BAR C)
- #DECL ((FOO) <VECTOR FIX CEVENT> (BAR) CEVENT (C) OBJECT)
- <COND (<VERB? "GO-IN">
- <AND <MEMQ <SET C <FIND-OBJ "CANDL">> <AOBJS ,WINNER>>
- <PROB 50 80>
- <TRNN .C ,ONBIT>
- <CLOCK-DISABLE <SET BAR <2 <SET FOO <OLINT .C>>>>>
- <TRZ .C ,ONBIT>
- <TELL
- "The cave is very windy at the moment and your candles have blown out.">>)>>
- \
- ; "SUBTITLE ASSORTED WEAPONS"
- <DEFINE SWORD-GLOW (DEM
- "AUX" (SW <HOBJ .DEM>) (G <OTVAL .SW>) (HERE ,HERE) (NG 0))
- #DECL ((DEM) HACK (SW) OBJECT (NG G) FIX (HERE) ROOM)
- <COND (<AND <NOT <OROOM .SW>> <NOT <OCAN .SW>>
- <MEMQ .SW <AOBJS ,PLAYER>>>
- <COND (<INFESTED? .HERE> <SET NG 2>)
- (<MAPF <>
- <FUNCTION (E)
- #DECL ((E) <OR ROOM CEXIT DOOR NEXIT ATOM>)
- <COND (<TYPE? .E ROOM>
- <AND <INFESTED? .E> <MAPLEAVE T>>)
- (<TYPE? .E CEXIT>
- <AND <INFESTED? <2 .E>> <MAPLEAVE T>>)
- (<TYPE? .E DOOR>
- <AND <INFESTED? <GET-DOOR-ROOM .HERE .E>>
- <MAPLEAVE T>>)>>
- <REXITS .HERE>>
- <SET NG 1>)>
- <COND (<==? .NG .G>)
- (<==? .NG 2> <TELL "Your sword has begun to glow very brightly.">)
- (<1? .NG> <TELL "Your sword is glowing with a faint blue glow.">)
- (<0? .NG> <TELL "Your sword is no longer glowing.">)>
- <OTVAL .SW .NG>)
- (<PUT .DEM ,HACTION <>>)>>
- <DEFINE SWORD ()
- <COND (<AND <VERB? "TAKE">
- <==? ,WINNER ,PLAYER>>
- <PUT ,SWORD-DEMON ,HACTION <COND (<TYPE? ,SWORD-GLOW OFFSET>
- ,SWORD-GLOW)
- (SWORD-GLOW)>>
- <>)>>
- <DEFINE INFESTED? (R "AUX" (VILLAINS ,VILLAINS) (DEM <GET-DEMON "THIEF">))
- #DECL ((R) ROOM (VILLAINS) <LIST [REST OBJECT]> (DEM) HACK)
- <OR <AND ,END-GAME!-FLAG <EG-INFESTED? .R>>
- <AND <==? .R <HROOM .DEM>>
- <HACTION .DEM>>
- <MAPF <>
- <FUNCTION (V)
- #DECL ((V) OBJECT)
- <COND (<==? .R <OROOM .V>> <MAPLEAVE T>)>>
- .VILLAINS>>>
-
|