! _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. ! --- The starting room Object StartCave "Branching Cave" with description [; if (illum == 0) { "It is dark, and you can just see -- sense -- the greater darknesses ahead, to the right, and to the left."; } if (self.seen_once < 2) print "You glance around again. "; print "The cave narrows ahead, a tight crawl winding around folds of limestone. A low passage descends to your right, and there is a side chamber on the left.^"; self.seen_once = 2; rtrue; ], before [; Look: if (self.seen_once == 0) { ! first turn auto-look. Suppress it. self.seen_once = 1; rtrue; } ], ambient_sound [; "You search the silence for a hint of your prey, but there is nothing. Only the rustling of bats, off to the side."; ], ambient_smell [; if (wumpus_0 in self) <>; print_ret "The stink of the ", (NameWumpus) 0, " lingers, tinged now with hot blood."; ], before_go [; ! The daemon is only for the first scene. StopDaemon(self); ], seen_once 0, daemon [; if (location ~= self) "^(BUG) StartCave daemon still active."; self.turns_here++; switch (self.turns_here) { 1: "^Something shifts in the darkness ahead, a great silent bulk. Your prey."; 3: "^A faint rustling echoes deep in the side chamber, and the laughing chitter of bats."; } ], turns_here 0; Objexit -> start_ahead "narrow crawl" with name 'tight' 'narrow' 'crawl' 'ahead' 'fore' 'forward' 'forwards', description [; print "A tight crawl winds ahead, half-choked with pale folds of limestone. Little enough headroom, but not impossible."; if (wumpus_0 in parent(self)) print " It's the movement in the shadows that sends ice over your skin... The creature is waiting."; new_line; rtrue; ], door_to [; if (wumpus_0 in parent(self)) { deadflag = 1; print "You creep up the passage, as stealthily as you can. It must be retreating ahead, for you"; if (illum == 0) print " feel"; else print " see"; " only empty stone, though the smell grows harsher...^^ And the eyes of the beast are on you, and claws come out of the night."; } print "You worm yourself into the crawl."; if (self.seen_once == false) { print " The roof lowers even further as you proceed -- you hate this, walls pressing in like a stone gullet -- until suddenly there is no floor ahead."; self.seen_once = true; } new_line; return DeadEndPit; ], seen_once false, when_shot [ curbolt; if (wumpus_0 in parent(self)) { return wumpus_0.when_shot(curbolt); } rfalse; ]; Objexit -> start_left "side chamber" with name 'side' 'chamber' 'left', description "A high chamber lies to your left. You cannot see its far side, but the rustle of cave bats drifts from the darkness.", door_to [; print "You advance into the chamber. A bat flutters in your face. You swipe it away... and three more bats replace it. You duck, swearing; swearing again at a sharp nip on your arm. Drew blood, it did.^^ There is a rustling all around you. You try to remember what you know about the habits of cave bats --^^ Oh.^^ You scramble back, covering your eyes; too late. The swarm is on you, harrying you, small teeth and shrieks like shards of glass. You cannot see. You are running, stumbling ahead of the storm"; if (wumpus_wounded) { print ". The Wumpus screams -- ", (emph) "too close", " -- you thrash"; if (crossbow in player) { print ", flinging something blindly at the new threat"; remove crossbow; lost_crossbow = true; } } print ", and as you recall what ", (emph) "else", " you know of the hunting of bats, the floor drops away to nothing beneath you --^^"; wound.spot = arm; if (~~(lamp.broken)) { lamp.broken = true; if (lamp.brightness > 1) lamp.brightness = 1; } light_silent = true; status_override = "Pain"; DrawStatusLine(); KeyPause(); status_override = 0; return Pit; ], when_shot [ curbolt; return bats_0.when_shot(curbolt); ]; Objexit -> start_right "low passage" with name 'low' 'passage' 'right' 'd//' 'down' 'descend', description "A low passage descends out of sight on the right.", door_to PitEdge; Objexit -> start_up "chimney" with name 'chimney' 'u//' 'up' 'ascend', description "Dark stone glistens overhead. Somewhere above is the chimney you slithered down, but you couldn't climb back even if you you could see it.", door_to "You knew when you slid down here that climbing back would be impossible.", before [; Climb: <>; ]; Object -> wumpus_0 "beast" with name 'beast' 'creature' 'prey' 'animal' 'monster' 'wumpus' 'silent' 'bulk' 'shape', description "You can see nothing of it; only a sense of movement, back and forth, in the depths of the cave ahead.", before [; Examine, VagueShoot: rfalse; Smell: "The stink of your prey is all around."; Listen: <>; ThrownAt: <>; default: if (~~self.touched_once) { self.touched_once = true; "If the creature was close enough for that, you would certainly have other worries on your mind."; } "The creature is waiting beyond the narrow crawl."; ], touched_once false, when_shot [; wumpus_wounded = true; wumpus_known = true; remove self; " And you flinch at the hissing shriek that echoes down the cave walls. The dark shape retreats, scrambling away, as your thudding pulse slows.^^ Moments later, barely sensed, the scent of blood. You have wounded the Wumpus."; ], has scenery; Object -> bats_0 "bats" with name 'bat' 'bats' 'faint' 'rustle' 'rustling' 'laugh' 'laughing' 'laughter' 'chitter', description [; <>; ], before [; Examine, VagueShoot: rfalse; Listen: "Somewhere in the darkness to your left, bats chitter and hiss."; ThrownAt: <>; default: "The bats, to your relief, are not that close at hand."; ], when_shot " The bats stir, a gust of invisible leaves scraping on the edge of hearing. But you doubt you've done the swarm any real hurt.", has scenery pluralname; ! --- Object DeadEndPit "Crawl At Pit" with description [; if (wumpus_0 in StartCave || ~~wumpus_wounded) print "(BUG) "; if (illum == 0) { "The crawl ends as the floor falls abruptly away. The pit blocks your way, and you have no idea how deep it is."; } print "The crawl ends as the floor falls away, into a wide pit. You can see no bottom, and the walls are slick-polished."; if (self.seen_once == false) { print " You can go no farther this way."; self.seen_once = true; } new_line; rtrue; ], before [; Jump: <>; ], ambient_smell "The trace of fresh blood is still carried on the air, above the fading smell of the creature itself.", seen_once false; Objexit -> deadpit_back "crawl back" with name 'low' 'crawl' 'back' 'backward' 'backwards', description "The low crawl leads back the way you came.", door_to [; if (self.seen_once == false) { print "You have no room even to turn around, so you"; self.seen_once = true; } else { print "You"; } print " back carefully through the limestone folds.^"; return StartCave; ], seen_once false; Objexit -> deadpit_pit "pit" with name 'pit' 'down' 'd//', description [; print_ret "The pit is wider than you can jump, deeper than you can make out, and there are no handholds at all.^^The ", (NameWumpus) 0, " must have crossed somehow, though -- you can see a smear of blood on the farther lip."; ], door_to "There is no safe descent here -- or even a risky one.", before [; Climb: <>; JumpInto: deadflag = 1; "You gather your breath and leap into the pit. The awful plummet lasts a second... and then two... three..."; JumpOver: "You could not hope to make it."; ]; Objexit -> deadpit_ahead "crawl ahead" with name 'ahead' 'fore' 'forward' 'forwards', description "The crawl continues beyond the pit. You can see a smear of blood on the farther lip.", door_to "There is no way across."; Object -> deadpit_blood "smear of blood" with name 'smear' 'of' 'blood' 'stain' 'bloodstain', description "Dark blood is smeared on the lip of the pit, and trails away into the passage on the far side.", before [; Examine, VagueShoot: rfalse; Smell: <>; default: "The bloodstain is out of reach."; ], has scenery; ! --- Object PitEdge "Edge Of Pit" with description [; if (self.seen_once == false) { print "The passage drops off suddenly, ending in"; if (illum == 0) print " a sharp incline."; else print " a deep pit."; self.seen_once = true; } else { print "You stand at the bottom of a rising passage. Before you"; if (illum == 0) print ", you can feel a sharp incline."; else print " is a deep pit."; } if (illum == 0) { " The pit's depth is utterly unfathomable in this dark."; } " The sides are steep but not vertical; you might be able to scramble down, but you make no bets about climbing back up."; ], initial [; self.seen_once = false; ], before [; Jump: <>; ], seen_once false; Objexit -> pitedge_back "crawl back" with name 'rising' 'passage' 'back' 'backward' 'backwards' 'u//' 'up', description "The passage rises behind you.", door_to StartCave; Objexit -> pitedge_pit "pit" with name 'pit' 'down' 'd//' 'incline', description "The pit is edged in veined, knotted flowstone. A stiff climb, considering its steepness, but possible -- in descent.^^You can make out a ledge far below.", door_to [; print "You sit at the edge, turn, catch, and hang full-length against the wall. There ought to be a foothold...^^"; print "Well, perhaps not. You slam into the ledge and lean into stone, face and belly, trying not to slide any farther.^"; return PitLedge; ], before [; Climb: <>; JumpInto: "Not clever. A wild leap would probably miss the ledge, and there could be anything farther down."; JumpOver: "The other side of the pit is blank stone; there is nowhere to jump to."; ]; Object -> pitedge_ledge "ledge" with name 'ledge', description "The ledge is deep in the pit's darkness. You can see no details.", before [; Examine, VagueShoot: rfalse; ThrownAt: <>; default: "The ledge is far out of reach."; ], when_shot " The bolt strikes the ledge, and goes spinning away down the pit.", has scenery;