! _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. Object Pit "Bottom of Pit" with initial [; if (self hasnt general) { give self general; StartDaemon(bats_2); } else { print "(BUG) Bats already on!^"; } ], before_go [; if (self has general) { give self ~general; StopDaemon(bats_2); } else { print "(BUG) Bats already off!^"; } ], description [; if (~~wound.spot) print "(BUG) Unwounded!^"; if (~~self.seen_once) { self.seen_once = true; if (wound.spot == arm) print "You roll painfully to hands and knees. ", (emph) "Ah", " -- your arm nearly gives way -- you realize you somehow tore hell out of it on the way down, or landing. It's bleeding freely.^^"; else if (wound.spot == hands) print "You begin to drag yourself up. ", (emph) "Ah", " -- no, you won't be putting any weight on your hands. They're badly torn up, and bleeding freely.^^"; } if (illum == 0) print "You're in a dark space, surrounded by stone. The floor is rippled and uneven. Mud and stones are strewn underfoot, but there's no standing water.^"; else print "This is the bottom of a wide pit. The walls are entirely unclimbable, of course. The floor is rippled and uneven, rising to sharp blades of stone near the edge. Mud and pebbles are strewn everywhere, but there's no standing water, so -- yes -- a narrow crawl leads down in the far corner.^"; rtrue; ], before [; WaveHands: if (bats_2 in self) <>; ], ambient_sound [; if (bats_2 in self) <>; ], ambient_smell "The air smells of old mud, and a hint of old death.", seen_once false, when_unbandage "You just got the bleeding stopped moments ago. You're afraid to weaken yourself any further by restarting it.", has bled_in; ! no quick bleeding here ObjExit -> pit_crawl "narrow crawl" with name 'tight' 'narrow' 'crawl' 'passage' 'd//' 'down', description "It's tight -- barely high enough to crawl in.", door_to [; print "You kneel, stiffly, and poke your head into the opening. It's tight, and it looks like it gets tighter ahead. No help for it -- you crawl inside"; if (crossbow in player) print ", pushing the crossbow awkwardly ahead of you"; if (wound.phase == 1) print ", leaving streaks of blood on the stone as you pass"; print ".^"; return Tunnel1; ]; ObjExit -> pit_up "shaft above" with name 'shaft' 'u//' 'up' 'above', description "You fell from the darkness somewhere above, but from down here it's impenetrable.", door_to "There's no way up from here."; Object -> pit_corpse "corpse" with name 'twisted' 'broken' 'shape' 'human' 'corpse' 'body' 'bone' 'bones', initial [; if (self.seen_once == 0) "A twisted shape lies nearby."; "A twisted corpse lies nearby."; ], description [; if (self.seen_once == 0) { self.seen_once = 1; print "It's human.^^And it's been here a long time. ", (emph) "He", " has, you think... or she, for all you know. There's"; } else { print "There's"; } print " little left to recall this broken shape to past life. The bones lie crumpled, clad in tatters of chewed black flesh"; if (~~pit_corpse_rags.touched_once) { print ". The clothes have fared somewhat better -- some resistant fiber -- but even they are brittle and rent."; } else { print " and torn rags."; } new_line; rtrue; ], seen_once 0, when_shot [ curbolt; move curbolt to Pit; " The bolt rips through dead flesh without much resistance. Pleased?"; ], before [; Take, Touch, Rub, Squeeze, Push, Pull, Turn: self.seen_once = 1; "You have no desire at all to touch the thing. Man. Person."; Smell: "Up close, it's sweet-bitter. You know death."; Search: self.seen_once = 1; if (verb_word == 'search') "You see no gear or equipment on the corpse."; "No doubt there are mummified organs within, or spaces where they used to be. You don't want to know."; Repair: "You're a hunter, not a doctor. And definitely not a god."; ], has static transparent; Object -> -> pit_corpse_rags "rags" with name 'torn' 'rag' 'rags' 'clothes' 'clothing' 'fiber', parse_name [ wd num; if (self.touched_once) return -1; ! normal self.name handling wd = NextWord(); while (WordInProperty(wd, self, name) || (wd == 'cloth' or 'strip' or 'strips')) { num++; wd = NextWord(); } return num; ], description [; pit_corpse.seen_once = 1; print "The corpse is wrapped in rags gone colorless with time. The cloth is cracked and stained where it rested against flesh"; if (self.touched_once) print ", and most of the rest is torn away"; else print ", but much is merely old"; "."; ], touched_once false, before [; Take, Pull: pit_corpse.seen_once = 1; if (self.touched_once) "There's nothing left on the corpse that you want to touch."; self.touched_once = true; move strips to player; PronounNotice(strips); "The old fiber tears without too much strain. You manage to rip loose some strips from the loose hems, lying clear of the corpse. What remains behind, stained with old decay, you'd just as soon not touch."; Remove: if (second == pit_corpse) { <>; } Search: pit_corpse.seen_once = 1; "Well, there's a dead body inside the clothing."; Tie: if (second ofclass BodyPart || second == player) { if (strips in player) { print "(", (the) strips, ")^"; <>; } else { <>; } } PutOn, Insert: if (second ofclass BodyPart || second == player) { if (strips in player) { print "(", (the) strips, ")^"; <>; } } ], when_shot [ curbolt; return pit_corpse.when_shot(curbolt); ], has scenery pluralname; Object -> -> pit_corpse_flesh "rotten flesh" with name 'rotten' 'rotted' 'tatters' 'black' 'flesh', article "some", description "The flesh has dissolved away where it touches the wet ground. Above, it is better preserved -- nearly dry; but badly eaten away by elements other than water. You can see the marks of tiny scavenging teeth.", when_shot [ curbolt; return pit_corpse.when_shot(curbolt); ], before [; Take, Touch, Rub, Squeeze, Push, Pull, Turn: <>; Smell, Search, Repair: <<(action) pit_corpse>>; ], has scenery; Object -> nowater "water" with name 'standing' 'water', article "some", before [; Examine: print "A closed pit would certainly be full of water, and there's none here, so you deduce the existence of a passage leading"; if (illum > 0) print " out. Which does, in fact, exist"; else print " down and out"; ". You'd feel smug, if you didn't feel tired and bruised and bloodied and sore."; default: "There isn't any, but for a few drops trickling away down the crawl."; ], has scenery; Object -> pit_blades "stone blades" with name 'sharp' 'blades' 'blade' 'stone' 'ripple' 'ripples', description [; print "Water dripping down has left runnels across the floor, that rise by some fluke into sharp spires by the edge of the pit. They rise like the teeth of sharks"; if (wound.spot == arm) print "; no doubt you slashed your arm on one as you fell"; else print "; you are glad you avoided them as you fell"; "."; ], before [; Attack, Push, Pull: "The stone isn't thin enough to break."; Climb: "They're only a few feet high, and you'd cut yourself to batmeat."; ], has scenery pluralname; Object -> pit_mud "mud" with name 'mud', article "some", description "Thick blackish mud across the floor, studded here and there with pebbles, streaked pale where water has run.", before [; Take: "You have no desire for mud."; Touch: "It's mud."; Push, Pull, Rub: "You smear some mud back and forth, but there's just stone underneath."; ], has scenery; Object bats_2 "bats" with name 'bat' 'bats', description [; switch (self.number) { 0, 1: "(BUG) Bats not here yet."; 2: "A couple of bats are fluttering skittishly about."; 3, 4: "Several bats are fluttering skittishly about."; default: "Bats flutter everywhere, skittishly remaining just overhead."; } ], describe [; if (illum == 0) "^You can hear the rattle of bat-wings."; switch (self.number) { 0, 1: "^(BUG) Bats not here yet."; 2: "^A bat or two flutters overhead."; 3, 4: "^Several bats flutter overhead."; default: "^Bats flutter everywhere, just overhead."; } ], daemon [; if (player notin Pit) { StopDaemon(self); "^(BUG) Bats in Pit can't find you."; } self.number++; switch (self.number) { 2: move self to Pit; "^A bat flutters down from overhead. And another. You wave your arms, but they're keeping their distance."; 3: "^More bats gather."; 5: "^A stream of bats flickers overhead, around, never settling. You wave again. They seem more attracted than frightened by your hand."; 7: "^Something moves on the ground nearby. You twist around violently, but it's not approaching you; the bat is crouched over the blood-stained stone where you fell."; 11: "^A bat darts towards your face, and quickly away."; } ], number 0, before [; Examine, VagueShoot: rfalse; Listen: if (self.number <= 2) "You can hear the rattle of bat-wings."; "The air is full of rustle and rattle, wing on wing."; default: if (random(99) < 50) "The bats whirl away at your approach, staying just out of reach."; else "The bats whirl away at your approach. They stay just out of reach."; ], seen_once false, when_shot [ curbolt; move curbolt to Pit; if (self.seen_once || random(101) < 40) { " The aim is tricky; your bolt misses, and ricochets wildly around the pit."; } else { self.seen_once = true; " The aim is tricky, but your bolt tears through a small shape. It falls in a sudden gout of blood.^^More bats flutter down... not towards you, but onto the one you killed. There are excited chitters, sounds of tearing. You glance away, wincing, and see another bat licking clean the fallen crossbow bolt with its tiny pink tongue."; } ], has static pluralname;