!\--------------------------------------------------------------------------- DOWN1.HUG Part One of Down by Kent Tessman (c) 1997-1998 "Coming To" Including: Lying down Gentle slope Bluff of trees ---------------------------------------------------------------------------\! #set PART1 #ifset MODULE #if undefined InitModule routine InitModule {} #endif #endif !---------------------------------------------------------------------------- ! YOUR POSSESSIONS: attribute torn object pants "pair of pants" { inherits flammable_class in you article "your" nouns "pants", "trousers", "pantleg" adjectives "my", "pair", "cloth", "clothing" long_desc { "They're torn open around your knee"; if self is torn "--even more now that you've ripped away a strip of cloth"; print "." } before { object DoTakeOff, DoDrop {"Probably not the time or the place."} object DoTear { if self is torn "If you keep tearing them, you won't have any pants left." else { Acquire(player, cloth) "You tear away a strip of cloth." self is torn } } } is clothing, worn, hidden, plural } object cloth "strip of cloth" { inherits flammable_class article "a" noun "cloth" adjectives "strip", "piece", "swatch" long_desc "Longer than it is wide, and ragged on the edges where it was torn from your pantleg." } component rightleg "your leg" { part_of you nouns "leg", "shin", "knee", "thigh", "foot", "legs" adjectives "my", "right" long_desc "You're not a doctor, but you can't help thinking that your leg couldn't possibly twist like that if it weren't broken. Your pantleg is ripped open around your knee." before { object DoGet {"Hard not to."} object DoDrop {"That would be impressive."} } } component yourarm "your arm" { part_of you nouns "arm", "bicep", "forearm", "shoulder", "hand", "arms" adjectives "my" long_desc "Your arm, unlike your leg, looks fine." before { object DoGet {"Hard not to."} object DoDrop {"That would be impressive."} } } object watch "watch" ! 'special' once the little note about guessing it's p.m. has been printed { in gentleslope noun "watch", "wristwatch" article "your" initial_desc "Your wristwatch is lying on the ground here." inv_desc { if self is worn "You're wearing your watch on your wrist."; else "You're carrying your wristwatch, although you're not wearing it."; } long_desc { "What used to be a very nice wristwatch. The glass is cracked, but the watch still reads "; ! Adapted from HoursMinutes in hugolib.h: local hours, minutes, count count = counter + 1 ! since Main will add one count/=TURNS_PER_MIN hours = count / 60 minutes = count - hours * 60 if hours > 12: hours -= 12 elseif hours = 0: hours = 12 print number hours; ":"; if minutes < 10 print "0"; print number minutes; if self is not special { ". (The daylight makes it obvious that's p.m.)" self is special } else print "." } size { if self is worn return 0 else return 5 } is clothing } !---------------------------------------------------------------------------- ! GENTLE SLOPE: room lyingdown "lying down" { long_desc "You are lying on your back on a gentle slope of grass, your head slightly below the rest of your body, looking up at the hazy blue-gray sky. Further up, the slope disappears into the thickening forest. A smaller thick bluff of trees is on your left, to what would probably be the west. In the distance--you can't tell how far away--you can hear sounds, maybe even voices." u_to gentleslope out_to gentleslope n_to {return gentleslope.n_to} cant_go "You'll have to get up before you can go anywhere." before { location DoStand { return Perform(&DoExit) } location DoSmell { if object return false else "You smell something faint and unpleasant." } location DoListen { object = voices run voices.before } } } scenery sky "hazy blue-gray sky" { found_in { if location is not inside_the_plane return location else return false } nouns "sky", "clouds", "cloud" adjectives "hazy", "blue", "gray", "blue-gray" article "the" long_desc "Quite peaceful, actually. Deceptively so." } scenery slope "gentle slope" { found_in lyingdown, gentleslope nouns "slope" adjectives "gentle", "slope", "grass", "smaller" article "the" long_desc "You're currently on a slope of grass stretching out of the trees." } scenery voices "voices" { found_in lyingdown, gentleslope, bluff article "some" noun "voice", "voices", "sounds", "people" adjectives "people's" before { object DoListen { if object = voices or not object "Yes, you can definitely hear voices, although you can't make out what they're saying." else return false } object { "There's not much you can do with the voices but listen to them." } } is plural } room gentleslope "gentle slope" { long_desc "The ground curves gently downward here to the south, away from the thicker forest north of you. A smaller bluff of trees is just to the west." w_to bluff #ifset PART2 s_to { ! gentleslope is 'special' once this first impression of the ! site below has been printed ! if self is not special { Indent "Coming down out of the trees here, it's easy to piece together what must have happened: there's a wide scar of black earth where the airplane, a commercial DC-9, tore through the forest, brush and trees obliterated by its sweeping wings--wings that are now twisted backward at an odd angle to the plane body itself, barely attached to the aircraft. \n\n You feel your stomach pitch, remembering. You were \Ion\i that plane. And so were a lot of other people, some of whom--your head spins as your understanding tries to stretch around the situation--\ are probably doing much worse than you." self is special } return bottomofslope } #endif n_to "The thickening trees are probably not the best terrain for you to be exploring, given your current shape." u_to {return self.n_to} d_to {return self.s_to} after { location DoGo { local i ! Just in case the player dropped, say, the piece ! of cloth while lying down, since 'lyingdown' is ! a separate location ! for i in lyingdown move i to self if old_location = lyingdown { "\nThe pain in your right leg is unbearable! Your leg folds uselessly beneath you, sending a sharp, agonizing jolt all the way up to your stomach, and you crumple to the ground." } return false } } } scenery thicktrees "thick trees" { in gentleslope nouns "forest", "trees", "tree" adjectives "thick", "bluff", "thickening" article "some" is plural long_desc "You can't see much, mainly because the trees quickly become too thick to see through--not to mention thick enough to prevent foot travel." } object smokesmell "smoke" { noun "smoke", "odor", "smell" adjectives "wispy", "gray-black", "gray", "black", "pungent" found_in {return location} ! ever-present before { object DoSmell {"A pungent odor that grabs at the back of your throat."} object DoLook {"The wispy gray-black smoke drifts overhead."} object {"The smoke really isn't of much use to you."} } } !---------------------------------------------------------------------------- ! BLUFF OF TREES ! ! The branches are listed in the descriptions of the bluff and the trees as ! a sort of hint if a branch has not been broken off yet. room bluff "bluff of trees" { long_desc { "The ground slopes a little more here as it descends into the trees. It would be almost peaceful, almost soothing, if you didn't have a sick sense of dread that won't leave you. "; if branch is hidden "Branches criss-cross overhead. "; "Back to the east is where you came to." } e_to gentleslope out_to gentleslope } scenery trees "trees" { in bluff article "some" nouns "trees", "poplars", "tree" adjectives "poplar", "bluff" is plural long_desc { "They look like poplars. "; if branch is hidden "Slender branches criss-cross overhead." print newline } before { object DoClimb {"Not in your shape, you won't."} object DoPush, DoPull {"Not exactly the right idea, but not entirely the wrong one, either. Think a little smaller."} } } identical_class branches "poplar branches" { article "some" nouns "branches", "sticks", "twigs" single_noun "branch", "stick", "twig", "wood" adjective "poplar", "wooden", "slender" long_desc "Slender poplar branches, albeit sturdy ones." plural_of branch, branch2 before { object DoGet { if branch is hidden Perform(&DoGet, branch) else return false } } } object branch "poplar branch" { inherits flammable_class in bluff article "a" nouns "branch", "stick", "twig", "wood" adjective "poplar", "wooden", "slender" identical_to branches long_desc "A slender branch, albeit a sturdy one." before { object DoGet { if self is hidden "The branch would seem to be attached to the tree." else: return false } object DoHit ! i.e., "break" or "snap" { if self is hidden { self is not hidden Acquire(player, self) "You snap off one of the branches." } else { Acquire(player, branch2) branch2 is not hidden ! reveal the other branch2 is not static ! "half" branch "You break the branch in half." self.before = branch2.before } } } is hidden } object branch2 "poplar branch" { inherits flammable_class in bluff article "a" nouns "branch", "stick", "twig", "wood" adjective "poplar", "wooden", "slender" long_desc "A slender branch, albeit a sturdy one." plural_is branches before { object DoHit {"You have nothing more important to do than keep breaking branches?"} } is hidden, static ! so "branches" will work, but the second ! branch is not immediately accessible } object splint "splint" { inherits flammable_class nouns "splint", "cast", "bandage", "bandages" adjectives "make-shift", "makeshift", "make", "shift" article "a" long_desc "Two pieces of a broken branch strapped together with a swatch of cloth torn from your pants. Not exactly a replacement for proper medical attention, but not a bad job, all things considered." inv_desc "You are wearing a makeshift splint."; after { object DoTakeOff { remove self if not Acquire(player, cloth) move cloth to location if not Acquire(player, branch) move branch to location if not Acquire(player, branch2) move branch2 to location return false } } ! The splint is known so that "make splint" will work before ! the splint has been physically encountered. ! is known, clothing } !---------------------------------------------------------------------------- ! VERB ROUTINES: routine DoCrawl { if not object "You'll have to give a direction, too." elseif object.type ~= direction "Try a direction instead." elseif (location = lyingdown, gentleslope) and object = w_obj MovePlayer(bluff) elseif location = bluff and object = e_obj MovePlayer(gentleslope) elseif location ~= lyingdown, bluff { if splint in nothing and location = gentleslope "The ground isn't very easy to crawl over in your shape--not in that particular direction, at least." else "You're not going to be able to get there on just hands and knees--you'll have to try and figure out some way to walk." else "You're better off at least \Itrying\i to walk." return true } else "You can't go that way, even if you crawl." } replace DoSmell { if not object { #ifset PART3 if location = accessway, crawlspace "The acrid odor of smoke is much stronger here." elseif location = landinggearbay "The acrid odor of smoke is so thick you can hardly breathe." else #endif "The acrid odor of smoke hangs in the air." } else "You don't smell anything unusual." } replace DoJump { "You jump up and down, accomplishing little but sending a wrenching pain shooting up your entire leg." } routine DoTear { "Trying to tear "; The(object) " doesn't accomplish anything." } routine DoMake { if object ~= splint "Now how do you plan to cook up something like that?" elseif splint in player "You've already got a splint." elseif cloth in player and branch in player and branch2 not in player: "Not sure that a single stick and a swatch of cloth make a decent splint." elseif cloth not in player or branch not in player or branch2 not in player: "You don't seem to have all the necessary pieces at hand." else { remove cloth remove branch remove branch2 move splint to player splint is worn "You strap the two branches together with the strip of cloth, fashioning a makeshift splint for your leg." } } routine DoMakeSplint { if object = yourarm "It isn't your arm that needs attention." elseif object ~= rightleg "What good is splinting that going to do?" else return Perform(&DoMake, splint) }