Class Room; Class Aboveground class Room has light nodwarf; Class Scenic has scenery; Aboveground At_End_Of_Road "At End Of Road" with name 'end' 'of' 'road' 'street' 'path' 'gully', description "You are standing at the end of a road before a small brick building. Around you is a forest. A small stream flows out of the building and down a gully.", w_to At_Hill_In_Road, u_to At_Hill_In_Road, e_to Inside_Building, d_to In_A_Valley, s_to In_A_Valley, n_to In_Forest_1, in_to Inside_Building; Scenic "well house" with name 'well' 'house' 'brick' 'building' 'small' 'wellhouse', description "It's a small brick building. It seems to be a well house.", found_in At_End_Of_Road At_Hill_In_Road Inside_Building, before [; Enter: if (location == At_Hill_In_Road && Inside_Building hasnt visited) "It's too far away."; <>; ]; Scenic Stream "stream" with name 'stream' 'water' 'brook' 'river' 'lake' 'small' 'tumbling' 'splashing' 'babbling' 'rushing' 'reservoir', found_in At_End_Of_Road In_A_Valley At_Slit_In_Streambed In_Pit In_Cavern_With_Waterfall At_Reservoir Inside_Building, before [; Drink: "You have taken a drink from the stream. The water tastes strongly of minerals, but is not unpleasant. It is extremely cold."; Take: if (bottle notin player) "You have nothing in which to carry the water."; <>; Insert: if (second == bottle) <>; "You have nothing in which to carry the water."; Receive: if (noun == ming_vase) { remove ming_vase; move shards to location; score = score - 5; "The sudden change in temperature has delicately shattered the vase."; } if (noun == bottle) <>; remove noun; if (noun ofclass Treasure) score = score - 5; print_ret (The) noun, " washes away with the stream."; ]; Scenic "road" with name 'road' 'street' 'path' 'dirt', description "The road is dirt, not yellow brick.", found_in At_End_Of_Road At_Hill_In_Road In_Forest_2; Scenic "forest" with name 'forest' 'tree' 'trees' 'oak' 'maple' 'grove' 'pine' 'spruce' 'birch' 'ash' 'saplings' 'bushes' 'leaves' 'berry' 'berries' 'hardwood', description "The trees of the forest are large hardwood oak and maple, with an occasional grove of pine or spruce. There is quite a bit of undergrowth, largely birch and ash saplings plus nondescript bushes of various sorts. This time of year visibility is quite restricted by all the leaves, but travel is quite easy if you detour around the spruce and berry bushes.", found_in At_End_Of_Road At_Hill_In_Road In_A_Valley In_Forest_1 In_Forest_2, has multitude; ! ------------------------------------------------------------------------------ Aboveground At_Hill_In_Road "At Hill In Road" with name 'hill' 'in' 'road', description "You have walked up a hill, still in the forest. The road slopes back down the other side of the hill. There is a building in the distance.", e_to At_End_Of_Road, n_to At_End_Of_Road, d_to At_End_Of_Road, s_to In_Forest_1; Scenic -> "hill" with name 'hill' 'bump' 'incline', description "It's just a typical hill."; Scenic -> "other side of hill" with name 'side' 'other' 'of', article "the", description "Why not explore it yourself?"; ! ------------------------------------------------------------------------------ Aboveground Inside_Building "Inside Building" with name 'inside' 'building' 'well' 'house' 'wellhouse', description "You are inside a building, a well house for a large spring.", cant_go "The stream flows out through a pair of 1 foot diameter sewer pipes. The only exit is to the west.", before [; Enter: if (noun == Spring or SewerPipes) "The stream flows out through a pair of 1 foot diameter sewer pipes. It would be advisable to use the exit."; Xyzzy: if (In_Debris_Room hasnt visited) rfalse; PlayerTo(In_Debris_Room); rtrue; Plugh: if (At_Y2 hasnt visited) rfalse; PlayerTo(At_Y2); rtrue; ], w_to At_End_Of_Road, out_to At_End_Of_Road, in_to "The pipes are too small."; Scenic -> Spring "spring" with name 'spring' 'large', description "The stream flows out through a pair of 1 foot diameter sewer pipes."; Scenic -> SewerPipes "pair of 1 foot diameter sewer pipes" with name 'pipes' 'pipe' 'one' 'foot' 'diameter' 'sewer' 'sewer-pipes', description "Too small. The only exit is to the west."; Object -> set_of_keys "set of keys" with name 'keys' 'key' 'keyring' 'set' 'of' 'bunch', description "It's just a normal-looking set of keys.", initial "There are some keys on the ground here.", before [; Count: "A dozen or so keys."; ]; Object -> tasty_food "tasty food" with name 'food' 'ration' 'rations' 'tripe' 'yummy' 'tasty' 'delicious' 'scrumptious', article "some", description "Sure looks yummy!", initial "There is tasty food here.", after [; Eat: "Delicious!"; ], has edible; Object -> brass_lantern "brass lantern" with name 'lamp' 'headlamp' 'headlight' 'lantern' 'light' 'shiny' 'brass', when_off "There is a shiny brass lamp nearby.", when_on "Your lamp is here, gleaming brightly.", daemon [ t; if (self hasnt on) { StopDaemon(self); rtrue; } t = --(self.power_remaining); if (t == 0) give self ~on ~light; if (self in player || self in location) { if (t == 0) { print "Your lamp has run out of power."; if (fresh_batteries notin player && location hasnt light) { deadflag = 3; " You can't explore the cave without a lamp. So let's just call it a day."; } else self.replace_batteries(); new_line; rtrue; } if (t == 30) { print "Your lamp is getting dim."; if (fresh_batteries.have_been_used) " You're also out of spare batteries. You'd best start wrapping this up."; if (fresh_batteries in VendingMachine && Dead_End_14 has visited) " You'd best start wrapping this up, unless you can find some fresh batteries. I seem to recall there's a vending machine in the maze. Bring some coins with you."; if (fresh_batteries notin VendingMachine or player or location) " You'd best go back for those batteries."; new_line; rtrue; } } ], before [; Examine: print "It is a shiny brass lamp"; if (self hasnt on) ". It is not currently lit."; if (self.power_remaining < 30) ", glowing dimly."; ", glowing brightly."; Burn: <>; Rub: "Rubbing the electric lamp is not particularly rewarding. Anyway, nothing exciting happens."; SwitchOn: if (self.power_remaining <= 0) "Unfortunately, the batteries seem to be dead."; Receive: if (noun == old_batteries) "Those batteries are dead; they won't do any good at all."; if (noun == fresh_batteries) { self.replace_batteries(); rtrue; } "The only thing you might successfully put in the lamp is a fresh pair of batteries."; ], after [; SwitchOn: give self light; StartDaemon(self); SwitchOff: give self ~light; ], replace_batteries [; if (fresh_batteries in player or location) { remove fresh_batteries; fresh_batteries.have_been_used = true; move old_batteries to location; self.power_remaining = 2500; "I'm taking the liberty of replacing the batteries."; } ], power_remaining 330, has switchable; Object -> bottle "small bottle" with name 'bottle' 'jar' 'flask', initial "There is an empty bottle here.", before [; LetGo: if (noun in bottle) "You're holding that already (in the bottle)."; Receive: if (noun == stream or Oil) <>; else "The bottle is only supposed to hold liquids."; Fill: if (child(bottle) ~= nothing) "The bottle is full already."; if (stream in location || Spring in location) { move water_in_the_bottle to bottle; "The bottle is now full of water."; } if (Oil in location) { move oil_in_the_bottle to bottle; "The bottle is now full of oil."; } "There is nothing here with which to fill the bottle."; Empty: if (child(bottle) == nothing) "The bottle is already empty!"; remove child(bottle); "Your bottle is now empty and the ground is now wet."; ], has container open; Object water_in_the_bottle "bottled water" with name 'bottled' 'water' 'h2o', article "some", description "It looks like ordinary water to me.", before [; Drink: remove water_in_the_bottle; <>; ]; Object oil_in_the_bottle "bottled oil" with name 'oil' 'bottled' 'lubricant' 'grease', article "some", description "It looks like ordinary oil to me.", before [; Drink: <>; ]; ! ------------------------------------------------------------------------------ Aboveground In_Forest_1 "In Forest" with name 'forest', description "You are in open forest, with a deep valley to one side.", e_to In_A_Valley, d_to In_A_Valley, n_to In_Forest_1, w_to In_Forest_1, s_to In_Forest_1, initial [; if (random(2) == 1) PlayerTo(In_Forest_2, 1); ]; Aboveground In_Forest_2 "In Forest" with description "You are in open forest near both a valley and a road.", n_to At_End_Of_Road, e_to In_A_Valley, w_to In_A_Valley, d_to In_A_Valley, s_to In_Forest_1; Aboveground In_A_Valley "In A Valley" with description "You are in a valley in the forest beside a stream tumbling along a rocky bed.", n_to At_End_Of_Road, e_to In_Forest_1, w_to In_Forest_1, u_to In_Forest_1, s_to At_Slit_In_Streambed, d_to At_Slit_In_Streambed, name 'valley'; Scenic -> "streambed" with name 'bed' 'streambed' 'rock' 'small' 'rocky' 'bare' 'dry'; ! ------------------------------------------------------------------------------ Aboveground At_Slit_In_Streambed "At Slit In Streambed" with name 'slit' 'in' 'streambed', description "At your feet all the water of the stream splashes into a 2-inch slit in the rock. Downstream the streambed is bare rock.", n_to In_A_Valley, e_to In_Forest_1, w_to In_Forest_1, s_to Outside_Grate, d_to "You don't fit through a two-inch slit!", in_to "You don't fit through a two-inch slit!"; Scenic -> "2-inch slit" with name 'slit' 'two' 'inch' '2-inch', description "It's just a 2-inch slit in the rock, through which the stream is flowing.", before [; Enter: "You don't fit through a two-inch slit!"; ]; ! ------------------------------------------------------------------------------ Aboveground Outside_Grate "Outside Grate" with name 'outside' 'grate', description "You are in a 20-foot depression floored with bare dirt. Set into the dirt is a strong steel grate mounted in concrete. A dry streambed leads into the depression.", e_to In_Forest_1, w_to In_Forest_1, s_to In_Forest_1, n_to At_Slit_In_Streambed, d_to [; if (Grate hasnt locked && Grate hasnt open) { print "(first opening the grate)^"; give Grate open; } return Grate; ]; Scenic -> "20-foot depression" with name 'depression' 'dirt' 'twenty' 'foot' 'bare' '20-foot', description "You're standing in it."; Object -> Grate "steel grate" with name 'grate' 'lock' 'gate' 'grille' 'metal' 'strong' 'steel' 'grating', description "It just looks like an ordinary grate mounted in concrete.", with_key set_of_keys, door_dir [; if (location == Below_The_Grate) return u_to; return d_to; ], door_to [; if (location == Below_The_Grate) return Outside_Grate; return Below_The_Grate; ], describe [; if (self has open) "^The grate stands open."; if (self hasnt locked) "^The grate is unlocked but shut."; rtrue; ], found_in Below_The_Grate Outside_Grate, has static door openable lockable locked;