! _Hunter, in Darkness_ ! Special source-code edition ! Copyright 1999 Andrew Plotkin ! http://www.eblong.com/zarf/if.html ! This source code is provided for personal, educational use only. ! See README file for details. ! --- Some classes. Class TunnelClass with before [; Jump, JumpInTo, JumpOver: "Jump? In here?"; Exit: print_ret "You ", (emph) "wish", " you could stand up."; Wear, Disrobe, Empty, EmptyT: if (noun == thighband) "You can't reach back to your leg with that much dexterity."; Insert, PutOn, Remove: if (second == thighband) "You can't reach back to your leg with that much dexterity."; Take: if (noun in thighband) "You can't reach back to your leg with that much dexterity."; Drop: if (noun == crossbow) "You're not really holding the bulky thing anyway; you're pushing it down the tunnel ahead of you. You couldn't crawl past it if you tried."; Cock, Uncock: if (noun == crossbow) "You don't have enough leverage, stretched out like this."; Smell: if (noun == nothing) "You have no breathing space."; TurnAround: "That's unmanageable."; ], ambient_sound "There is no sound here but your labored breath.", when_unbandage "You're an unknown distance into the most exhausting tunnel-crawl you can remember, and you want to start losing more blood?"; Class TunnelExitBack class ObjExit with short_name "crawl behind", name 'crawl' 'back' 'behind' 'backward' 'backwards', door_to "You try to wiggle backwards, but the position is impossible. It would take you hours to retreat even a few yards. And you've come much farther than that.", before [; Examine: if (illum) print "You can't"; else print "Even if there were light, you couldn't"; " see behind yourself."; ThrownAt: "You can't possibly throw anything backwards in this position."; ]; Class TunnelExitFore class ObjExit with short_name "crawl ahead", name 'crawl' 'ahead' 'advance' 'fore' 'forward' 'forwards', before [; ThrownAt: "In this position, you couldn't throw anything more than a few inches."; Examine: if (illum) "The crawl twists on ahead. You see no end."; else "There is no light ahead."; ]; Class TunnelWater with name 'icy' 'cold' 'water', short_name "water", article "some", before [; Take: "You have no way to carry water."; Drink, Taste: "You manage to lip a few drops from the stone. The water is muddy and harsh."; Touch: "It's cold."; Pull, Push, Rub: "You splash a bit. It doesn't make you feel better."; ], has static; ! --- Object Tunnel1 "Tight Crawl" class TunnelClass with description "You're on your hands and knees in a throat of stone. The roof dips even lower ahead. If you advance, it'll be squirming forwards on your belly. And squirming backwards will be impossible, you think grimly."; TunnelExitBack -> tun1_back with description "You can feel the open air of the pit just behind you.", door_to [; print "Crawling painfully backwards, you push yourself back out into the open. Well, into the less cramped, at any rate. You laugh nervously and take a deep breath.^"; return Pit; ]; TunnelExitFore -> tun1_fore with door_to [; print "You hunch your elbows beneath your chest, and wiggle forward on them, into the gullet.^"; return Tunnel2; ]; ! --- Object Tunnel2 "Tight Crawl" class TunnelClass with seen_once false, description [; if (~~self.seen_once) { self.seen_once = true; print "You stop, after a long silent time, to rest. Crawling is hard work, you know well, and your aching shoulders and scraped knees attest to it. But the"; } else { print "The"; } print " crawl is no different here than anywhere. You have just enough room to raise your head, and there's nothing to see ahead"; if (illum) print " but more stone to crawl through"; "."; ]; TunnelExitBack -> tun2_back with door_to "You try to wiggle backwards, but the position is impossible. It would take you hours to retreat even a few yards."; TunnelExitFore -> tun2_fore with door_to [; print "You begin determinedly working yourself forward, again.^"; return Tunnel3; ]; ! --- Object Tunnel3 "Tight Crawl" class TunnelClass with description "The rock is lower above you. And narrower; you're lying full length now, your arms stretched out ahead, but still rough stone scrapes your shoulders. And you seem to be angling a bit downwards.", seen_once false, each_turn [; if ((~~self.seen_once) && IndirectlyContains(self, lamp) && lamp has on && lamp.brightness) { self.seen_once = true; print "^Your lamp flickers erratically. The moisture must be getting to its workings.^"; } ]; TunnelExitBack -> tun3_back with name 'u//' 'up'; TunnelExitFore -> tun3_fore with name 'd//' 'down', door_to [; print "You continue. Scrabble with fingers, brace arms, push with toes"; if (crossbow in player) print ". Shove the crossbow a bit farther ahead"; print ". You're definitely tilted head-down now. Is the stone pressing more tightly to either side of you?^"; return Tunnel4; ]; Object -> tun3_water class TunnelWater with name 'trickle', initial "Icy water is trickling past you.", before [; Examine, Search: "A thin trickle of cold water, disappearing on ahead into the darkness. It must be seeping in through the limestone; or perhaps down from the pit you left behind."; ]; ! --- Object Tunnel4 "Tight Crawl" class TunnelClass with description "You lie on your side, gasping, trying to recover some strength. Your back is sore; your neck is worse. Your head aches from cracking into unexpected stone. A cold stony knot presses into your left side, your right knee."; TunnelExitBack -> tun4_back with name 'u//' 'up'; TunnelExitFore -> tun4_fore with name 'd//' 'down', door_to [; print "You stretch your hands forward, submerging them. Hunch, stretch. Inchworm... inchworm...^^Your arms are submerged, and water ripples at your chin. No room to lift your head. You turn your face to the side, cheek scraping against the damn everpresent stone, and stretch again.^"; if (lamp in player && lamp.brightness) { lamp.brightness = 0; if (lamp has on) { give lamp ~on; light_silent = true; print "^Your lamp flickers once and goes out.^"; } } return Tunnel5; ]; Object -> tun4_water class TunnelWater with name 'trickle' 'shallow' 'puddle' 'pool', seen_once false, initial [; if (~~self.seen_once) { self.seen_once = true; print "You stretch forward once more, feeling for a few more inches before you continue.^^", (emph) "Splash.", "^^Your fingers are submerged in water.^"; } else { print "A trickle of water runs past you, and merges into a shallow pool at your fingertips.^"; } ], before [; Examine, Search: "There's either a shallow puddle in the passage ahead... or more than that. From where you lie, there is no way to tell."; Enter: <>; ], when_shot " The bolt vanishes into the water."; ! --- Object Tunnel5 "Tight Crawl" class TunnelClass with description "You are lying in cold still water. It licks at your cheek and arms, and across the backs of your thighs. The chill makes your bruised knees and chest hurt all the more; your neck screams from craning high enough to breathe, but there is no room to sit up. No room to turn. No room."; TunnelExitBack -> tun5_back; TunnelExitFore -> tun5_fore with door_to [; print "You struggle on. You hope the water grows no deeper. That thought occupies you for a few more hunches, a few more stretches. Grow no deeper. If the water grows deeper... Grow no deeper. You shake that away, and nothing comes to replace it.^^"; print "You crawl on in the dark. The water grows no deeper.^^"; print "Maybe it's not as deep now?^"; return Tunnel6; ]; Object -> tun5_water class TunnelWater with name 'still' 'pool', before [; Examine, Search: "It fills half the tunnel."; Taste: "The water is muddy and harsh."; Drink: "The water is muddy and harsh. You cannot force yourself to swallow much."; ], when_shot " The bolt vanishes into the water.", has scenery; ! --- Object Tunnel6 "Tight Crawl" class TunnelClass with description [; print "Water trickles over your hands, but the floor must have risen; there is less of it"; if (self.phase == 0) print "... a note of hope. But you cannot see."; else print ". But the roof lowers, and the crawl has become almost impossibly tight. And you cannot see."; new_line; rtrue; ], phase 0, seen_once 0, each_turn [; if (self.phase == 5) { self.seen_once++; switch (self.seen_once) { 1, 3: print "^You are never going to leave this place.^"; 2: print "^The stone is not going to let you go.^"; default: print "^It is dark.^"; } } ]; TunnelExitBack -> tun6_back with door_to [; switch (Tunnel6.phase) { 0: return self.TunnelExitBack::door_to(); 1, 2: Tunnel6.phase--; "You shove yourself a few inches back, trying to adjust your position."; 3, 4: Tunnel6.phase = 5; "You hunch back from the edge, twist, and manage to get your other shoulder through instead. At least it's a change."; default: Tunnel6.phase = 5; "You try to shove yourself back, but you cannot move."; } ]; TunnelExitFore -> tun6_fore with door_to [; Tunnel6.phase++; switch (Tunnel6.phase) { 1: "You thrust your shoulders forward. They stick."; 2: "You push again. It's just this spot; your hands are free in a wider area ahead. But immovable stone grates against your chest and shoulders."; 3: "You've got one shoulder past the edge. The other is behind a corner of stone, and you can't imagine how it's going to get through."; 4, 5: "You brace your legs as best you can, and shove futilely against the trap."; } print "You brace your legs as best you can, and shove...^^"; print "It feels like scraping flesh from bone, but your shoulder tears past the edge. You lie and gasp for a moment, and then work your torso painfully through the gap.^^ The passage slants sharply down now, but it's widening. It's widening. You half-crawl, half-slide downward, dragging your legs out of the gap, and come to rest in what seems like blinding light --^"; light_silent = true; status_override = "Exhaustion"; DrawStatusLine(); KeyPause(); status_override = 0; MazeDaemonStart(); MazeSetup(); return Maze; ];