[ CutOffPower gotlamp; if (powercut) "There's no such thing as negative energy. [BUG]"; powercut = 1; print_player_flag = 1; gotlamp = 0; if ((minilight has general) && TestScope(minilight)) gotlamp = 1; print "^The lights die,"; if (gotlamp == 0) print " leaving you in stifling blind darkness"; else print " leaving you in a stifling darkness which is pierced only by the lamp's thin beam"; print ".^^"; print (boldstring) "Darkness", "^^"; print "After several seconds, the lighting strips return to life, but they are very dim and pulsate unevenly. You find barely enough light to pick silhouettes out of the gloom. And the silence is oppressive. You realize that the constant hiss of ventilation died with the lights, and it has not returned.^"; remove powernode; move powernodebroke to WiringCloset; esguardssec.shutdown(); remove HimselfEscape; StopDaemon(deadendmetaldoor); deadendmetaldoor.number2 = 0; ! begin new stuff dimguards.startup(); sharpguards.startup(); ; ]; Constant DimPathLength 10; Array dimpath --> SecurityBranch TossJunction SouthFrontier SouthBoundary WhiteJunction CeilingHole NorthBoundary SharpCorner LabJunction NortheastCorner; Array dimpathdir --> s_to s_to w_to nw_to w_to n_to e_to se_to n_to e_to; [ OppositeDir dir; switch (dir) { n_to: return s_to; ne_to: return sw_to; e_to: return w_to; se_to: return nw_to; s_to: return n_to; sw_to: return ne_to; w_to: return e_to; nw_to: return se_to; default: return dir; } ]; [ DirWordTrio dir; switch (dir) { n_to: return dirwordlist + 0; ne_to: return dirwordlist + 6; e_to: return dirwordlist + 12; se_to: return dirwordlist + 18; s_to: return dirwordlist + 24; sw_to: return dirwordlist + 30; w_to: return dirwordlist + 36; nw_to: return dirwordlist + 42; default: return dirwordlist + 48; } ]; Array dirwordlist --> 'n//' 'north' 'northern' 'ne' 'northeast' 'northeastern' 'e//' 'east' 'eastern' 'se' 'southeast' 'southeastern' 's//' 'south' 'southern' 'sw' 'southwest' 'southwestern' 'w//' 'west' 'western' 'nw' 'northwest' 'northwestern' 'none,' 'none,' 'none,' 'none,'; ! this is really the sound of the guards; the guards themselves are ! one step behind. Object dimguards "guards" with name 'guard' 'guards' 'step' 'steps' 'footstep' 'footsteps' 'figure' 'figures', parse_name [ num wd ptr; ptr = DirWordTrio(OppositeDir(dimpathdir-->(self.number2))); num = 0; wd = NextWord(); while ((WordInProperty(wd, dimguards, name) ~= 0) || wd == (ptr-->0) or (ptr-->1) or (ptr-->2)) { num++; wd = NextWord(); } return num; ], short_name [; print "footsteps to the "; print (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)); rtrue; ], describe [; if (self hasnt general) { print "^You freeze; there is movement up the corridor, to the "; print (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)); print ". It sounds like yet another group of guards, moving slowly but steadily in the darkness.^"; give self general; } else { print "^You can hear"; if (self.agitated) print " hurried"; print " footsteps up the corridor, to the "; print (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)); print ".^"; } rtrue; ], description [; print "You can just make out the movement to the "; print (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)); ", buried in shadows. It's impossible to tell how many guards there are."; ], react_before [; Listen: if (noun == nothing) { if (sharpguards in location && sharpguards.number >= 0) rfalse; <>; } ], before [; Examine: rfalse; Listen: if (self.agitated == 0) print "You can hear nervous movement"; else print "You can hear the faintest sound of shuffling"; print_ret " to the ", (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)), "."; ShootAttack: rfalse; AttackWith: if (second ofclass PulseGun) rfalse; <>; ThrownAt: "Their attention is just what you want least."; default: print_ret "The footsteps are off to the ", (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)), "."; ], life [; Kiss: "What a bad idea."; Ask, Tell, AskFor, Answer: "It might be better to stay quiet."; ShootAttack: gun.answer_general(); self.here_counter = 0; ! they hesitate one move if (self.agitated == 0) { self.agitated = 2; sharpguards.agitated(1); "Your shot crackles down the corridor, and you hear the welcome thump of bodies diving for cover. You cannot tell if you scored a hit."; } else { self.agitated = 2; "You fire again into the shadows, in the direction of the guards."; } ], orders [; "It might be better to stay quiet."; ], startup [; self.number = 0; self.number2 = 9; move self to (dimpath-->(self.number2)); self.work_target = 0; self.here_counter = 0; StartDaemon(self); ], shutdown [; StopDaemon(self); remove self; ], number 0, ! counter number2 0, ! index in dimpath agitated 0, ! are they running? work_target 0, ! where the guards are physically here_counter 0, ! how many turns has (self in location) been true? num_missed 0, ! how long have you spent in a stand-off? daemon [ ix; ! fixed parties switch (location) { SecurityAnnex: deadflag = 3; "^Through the north doorway, you can see a huge bustle of activity -- guards examining the chair, bent over the controls, and kneeling around the unconscious figure on the floor. And, a few of them, watching the door. Several hair-triggered guards have slashed pulse-fire into you before you or they know what is happening."; InsideEntrance: deadflag = 3; "^Four guards are waiting for you at the door, guns drawn. You briefly think how little hope there was that the exit would be unguarded. Then pulse-fire slaps darkness through you."; SharpCorner: ! this is abuse of the terminology, but it works sharpguardshere.daemon(); if (deadflag) return; LabJunction: if (sharpguardshere.number ~= 2) { sharpguardshere.number = 2; if (sharpguards.number >= 0) { print "^You tear up the hall, chased by pulse-fire.^"; ! but you don't die. The guards get "knocked out" ! really because any active members get merged with ! dimguards. sharpguards.agitated(-1); ! dimguards jump ahead, if they're not already if (self.number2 > 0 && self.number2 < 7) { self.number2 = 7; move self to SharpCorner; self.work_target = NorthBoundary; } } } NortheastCorner: deadflag = 3; "^As you come around the corner, you see at least a dozen figures moving north from Security. Undoubtedly they were drawn by the gunfire. They do not hesitate."; } ! moving party if (self.work_target ~= 0 && location == self.work_target) { deadflag = 3; if (self.agitated) print_ret "^You charge ", (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)), " into the teeth of the guards. They scatter in surprise; but there are enough of them to take you down in their cross-fire."; print_ret "^There is a large group of guards here, advancing slowly ", (LanguageDirection) dimpathdir-->(self.number2), " through the darkened hallways. You press silently against the wall. Unfortunately, the hallways aren't as dark as all that, and you are spotted immediately."; } self.number++; if (self.agitated) { ! the shooting has started! Run now. self.number = 4; } if (self.number >= 3 && self in location && self.here_counter == 0) { self.number = 2; ! hack so we don't walk in on guards unexpectedly. ! note that this is always followed by here_counter++. } if (self.number >= 3) { self.number = 0; ix = dimpathdir-->(self.number2); self.work_target = parent(self); self.number2++; if (self.number2 >= DimPathLength) self.number2 = 0; move self to (dimpath-->(self.number2)); self.here_counter = 0; if (self.work_target ~= 0 && location == self.work_target) { deadflag = 3; if (self.agitated) print_ret "^You here a sharp whisper from the ", (LanguageDirection) OppositeDir(ix), ": ~There!~ Pulse-fire crackles towards you, and this time its aim is precise."; if (player in panelhole) print_ret "^The guards advancing from the ", (LanguageDirection) OppositeDir(ix), " are very close now. You consider suddenly that dangling in the middle of the corridor is about as exposed a position as you could manage. They, apparently, realize the same thing at the same time."; print_ret "^The guards advancing from the ", (LanguageDirection) OppositeDir(ix), " are very close now. You press silently against the wall. But the hallways aren't as dark as all that, and you are spotted immediately."; } if (self in location) { if (self hasnt general) { print "^You freeze; there is movement up the corridor, to the "; print (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)); print ". It sounds like yet another group of guards, moving slowly but steadily in the darkness.^"; give self general; } else { print "^You can hear footsteps approaching again, off to the "; print (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)); print ".^"; } } ! special cases switch (self.work_target) { TossJunction: if (location == DeadEndHall) { deadflag = 3; print "^A group of guards appears in the intersection to the west. They pause for a moment, and two come grimly down the hall towards the closet. They are very pleased to find you still there.^"; } if (location == WiringCloset && deadendmetaldoor has open) { deadflag = 3; print "^Two guards appear suddenly in the doorway, silhouetted against the flickering shadows. They were probably looking to discover what made the power fail; they are certainly very happy to discover you.^"; } SouthFrontier: if (location == FinalEnd) { deadflag = 3; print "^A group of guards appears in the intersection to the north. They pause for a moment, and two move tentatively down towards where you are. They make out your shape almost immediately.^"; } CeilingHole: if (location == StorageCloset) { deadflag = 3; if (cornerdoor has open) print "^The"; else print "^The door swings open, and the"; print " silhouettes of guards appear in the doorway. Two of them move cautiously into the room, and within moments they see you.^"; } } } else { if (self in location) { self.here_counter++; print "^The footsteps to the "; print (LanguageDirection) OppositeDir(dimpathdir-->(self.number2)); if (self.agitated) { ! self.number always is 2 if (self.agitated > 1) { self.agitated = 1; self.num_missed++; print " hesitate."; } else { print " are hurrying closer."; } if (self.num_missed >= 8) { deadflag = 3; if (player in panelhole) print " You twist"; else print " You duck"; " to one side -- straight into the path of a lucky shot."; } switch (random(3)) { 1: " You twist aside as shots crackle past you; they are trying to pin you down."; 2: " A pulse splashes on the wall in front of you."; default: print " Pulse-fire slices past you, and you "; if (player in panelhole) "try to hang thinner."; else "duck."; } } ! else... print " are"; if (self.number < 2) print " closing.^"; else print " nearly upon you. You can make out figures in the darkness.^"; } else { self.here_counter = 0; } } ], has animate pluralname static; ! general means heard once Object sharpguards "guards to the southeast" with name 'group' 'guard' 'guards' 'se' 'southeast' 'southeastern' 'whisper' 'whispers' 'figure' 'figures', describe [; switch (self.number) { 0: if (self hasnt general) { print "^You're about to run out of options -- the intersection to the southeast is occupied. The guards there are not moving. They're watching in both directions, with their backs to a closed metal door. They don't seem to have seen you; you slide deeper into the shadows nonetheless.^"; give self general; } else { print "^There is a group of guards huddled to the southeast.^"; } 1: if (self hasnt general) { print "^A burst of pulse-fire crackles past your face, and you fall back hastily. The intersection to the southeast is occupied; and the guards must have heard your gunfire.^"; give self general; } else { print "^Pulse-fire stitches the corridor from the southeast.^"; } -1: print "^You can see unconscious forms to the southeast.^"; default: print "^Pulse-fire stitches the corridor from the southeast.^"; } rtrue; ], description [; ! you can get off five shots, but you die on the fifth. switch (self.number) { 0: "The guards are still figures in the gloom."; 1: "The guards are up against the walls, firing at you."; 2: "There are still at least three guards standing."; 3, 4: "You can see two guards firing at you."; -1: "The guards to the southeast are crumpled and scattered across the floor. None are moving."; default: "The guards are painting. [BUG]"; } ], react_before [; Listen: if (noun == nothing) { if (self.number < 0) { rfalse; } if (dimguards in location) print_ret "You hear footsteps approaching from the west, and whispers to the southeast."; <>; } ], before [; Examine: rfalse; Listen: switch (self.number) { -1: rfalse; 0: "You hear an occasional whisper from the southeast -- just sibilants in the darkness."; default: "You hear only the crackle of pulse-fire."; } ShootAttack: rfalse; AttackWith: if (second ofclass PulseGun) rfalse; <>; ThrownAt: if (self.number) { "That won't help."; ! do better? } "Their attention is just what you want least."; default: print_ret "The guards are off to the southeast."; ], life [; Kiss: "What a bad idea."; Ask, Tell, AskFor, Answer: self.orders(); rtrue; ShootAttack: gun.answer_general(); dimguards.agitated = 1; switch (self.number) { 0: self.agitated(2); "Two of the guards are unconscious in as many heartbeats. You shift your gun, straining for a better target among the shadows, and fire again. A third figure jerks and collapses. Then pulses are raining up the corridor at you, and you flatten yourself into cover."; 1: self.number = 2; "You spray pulses down the corridor, and manage to knock down three of them. Then you are driven behind the corner by their return fire."; 2: self.number = 3; "You snap off another shot, and see another guard crumple in the southeast corridor."; 3: self.number = 4; "You line up your gun, but the shadowy figure dodges out of your line of fire."; 4: self.agitated(-1); "You swing around the corner, firing quickly but without haste. One of the remaining guards to the southeast drops; then the other."; -1: "You lay a few more pulses into the unmoving bodies, for luck."; default: "Pow. Pow pow pow. [BUG]"; } ], orders [; "It might be better to stay quiet."; ], startup [; self.number = 0; move self to NorthBoundary; move sharpguardshere to SharpCorner; ], shutdown [; StopDaemon(self); remove self; remove sharpguardshere; ], agitated [ val; if (val < 0) { self.number = -1; StopDaemon(self); } else { if (self.number == 0) { self.number = val; StartDaemon(self); } } ], number 0, ! stage of shotness number2 0, ! daemon counter daemon [; if (location ~= parent(self)) return; self.number2++; switch (self.number2) { 0, 1: ! do nothing 2, 7: print "^A shot slashes by your head, and you pull further back around the corner.^"; 3, 6: print "^Pulse-fire crackles off the wall behind you.^"; 4, 8: print "^The hail of pulses is slowing.^"; 5, 9: print "^Another burst of shots from the southeast forces you against the wall.^"; default: print "^The guards to the southeast are still shooting at you.^"; } ], has animate pluralname static; ! general means heard once Object sharpguardshere "nearby guards" with name 'nearby' 'guard' 'guards' 'body' 'bodies' 'standing', describe [; switch (sharpguards.number) { 0: print "^Six guards are standing by the door, peering into the darkness.^"; 1: print "^Six guards are standing by the door, firing into the darkness.^"; 2: print "^Three guards are standing in the angle, with three more motionless on the floor.^"; 3, 4: print "^Two guards are crouched in the angle, surrounded by unconscious bodies.^"; -1: print "^Unconscious guards litter the floor here.^"; default: print "^Some guards here. [BUG]^"; } rtrue; ], description [; switch (sharpguards.number) { -1: "They look like six unconscious guards."; default: "They look like angry guards."; } ], before [; Examine: rfalse; Search: if (sharpguards.number < 0) "You grab at a few nearby pockets, but you find nothing of immediate value."; "That's not likely right now."; Attack, Push, Pull: if (sharpguards.number < 0) "You give the nearest body a shove. It makes you feel a little better, but it's not very helpful."; "You leap at one of the guards, but she twists adroitly aside."; ThrownAt: "That won't help."; ! do better? ], life [; ShootAttack: switch (sharpguards.number) { -1: "You spray a few more pulses around, for nothing but your own satisfaction."; 2: sharpguards.number = 3; "You fire a pulse into the nearest guard; she twitches and collapses. You spin around, trying to line up on the others."; 3, 4: sharpguards.number = -1; "You fire a pulse into the nearer guard; she twitches and collapses. You spin around; the other is lining up on your back. The shot goes straight past your ear as you hurl yourself aside; then your finger tightens again, and the last guard is unconscious."; default: "Pow pow! [BUG]"; } Kiss: "What a bad idea."; Ask, Tell, AskFor, Answer: self.orders(); rtrue; ], orders [; "It might be better to stay quiet."; ], number 0, ! 1 = here, 2 = went past (can't go back) daemon [; ! not really a daemon; this is called from sharpguards.daemon. if (self.number == 2) { if (sharpguards.number < 0) { self.number = 1; "^You hurry down past the sprawled forms of the guards."; } deadflag = 3; "^You turn and dive back towards the guards. This time they are not so surprised, and their aim is steady."; } else if (self.number == 1) { if (sharpguards.number >= 0) { deadflag = 3; "^Hesitating when surrounded by armed guards is not the best idea. A shot slams directly into the back of your neck, and another into your chest, and the darkness hits like an iron hammer."; } return; } ! else self.number = 0 switch (sharpguards.number) { -1: if (self.number ~= 1) { self.number = 1; "^You hurry down past the sprawled forms of the guards."; } 0, 1: deadflag = 3; "^You hit the corner at a dead run, trying to break through the guards before they can react. You nearly do; but there are too many of them, and pulse-fire is faster than you."; default: self.number = 1; "^You hit the corner at a dead run. The remaining guards break and fall aside, trying to aim and roll for cover simultaneously."; } ], has static pluralname animate transparent; Object sharpguardsguns "guards' guns" sharpguardshere with name 'guards^' 'gun' 'guns', description "The guards' guns are the same sharp-lined model you've seen elsewhere.", before [; Examine: rfalse; Take: if (sharpguards.number < 0) "You already have a gun, and you can't waste time disarming the unconscious."; "The guards seem to have their guns well in hand."; default: if (sharpguards.number >= 0) "Those are held by the guards."; ], has scenery pluralname; [ ReachLabDoor; if (parent(dimguards) == 0) { print "^This is the wrong part of the story. [BUG]^"; } dimguards.shutdown(); sharpguards.shutdown(); labdoorguards.startup(); ]; Object labdoorguards "voices" with name 'voice' 'voices' 'guard' 'guards' 'debate' 'se' 'southeast' 'southeastern', description "You can't see the guards; they're around the curve to the southeast.", before [; Examine: rfalse; Listen: "You can hear voices coming from the southeast."; default: "The guards aren't in sight."; ], number 0, ! time counter number2 0, ! door-open counter. 0 means nothing, 2 means open on the pick's ! sufferance, 1 means closing. startup [; StartDaemon(self); move self to OutsideLab; ], shutdown [; StopDaemon(self); remove self; ], daemon [; if (location == LabJunction) { deadflag = 3; "^A large crowd is standing here, debating how to deal with you. Your reappearance presents a happy resolution to their discussion."; } if (labdoor has open && self.number2 == 1) { give labdoor ~open; self.number2 = 0; print "^The door booms shut.^"; } if (labdoor has open && labdoor hasnt locked && self.number2 == 2 && lockpick.work_target ~= labdoorplate) { self.number2 = 1; print "^The door begins to swing shut as soon as the pick loses its link.^"; } if (labdoor hasnt open) { self.number2 = 0; } if (labdoor has locked && self.number2 ~= 0) { self.number2 = 0; } self.number++; if (location == OutsideLab) { switch (self.number) { 0: ! nothing 1: print "^You spin around, ready for pursuit, but no one appears.^"; 2: print "^You hear a voice from around the curve: ~Wait.~^"; 3: print "^You hear a startled ~What?~ from the southeast.^"; 4: print "^Voices drift up the hall. ~It's only one...~ ~...armed, took down nearly...~ There appears to be some little debate.^"; 5: print "^~Look then, we'll get a pulse grenade, is that...?~^"; 6: print "^~Fine.~ ~Fine then.~ ~...Fine.~ Some of the guards sound a bit peeved.^"; 7: ! nothing 8: print "^~Here we go,~ you hear.^"; 9: deadflag = 3; "^Something small and metallic rolls around the curve. It stops at your feet. You are reaching to heave it back when a corona of pulse-fire crackles out, and snaps you back against the wall."; 10: ! nothing 11: deadflag = 3; "^Several guards hustle up the corridor in best military style. They seem surprised to see you standing; but they take care of the situation very handily."; default: "^The voices start discussing dwarven literature. [BUG]"; } } if (location == Laboratory) { if (labdoor hasnt open && labdoor has locked) { LockedInLab(); return; } if (self.number == 9 && labdoor has open) { deadflag = 3; "^You see something small and metallic rolling up the hallway, towards the door. Before you can move, a corona of pulse-fire crackles out and sprays across the room."; } if (self.number == 11) { if (labdoor has open) { deadflag = 3; "^Several guards hustle up to the door in best military style. Peering in, they seem surprised to see you standing; but they take care of the situation very handily."; } else { print "^There is a muffled pounding on the door.^"; } } if (self.number > 11) { if (labdoor has open) { deadflag = 3; "^There are several guards standing outside the door. They are quite startled by the door's sudden opening, but their guns are ready nevertheless."; } if (labdoor hasnt locked) { deadflag = 3; "^The door suddenly swings open. Several guards peer in, along with several pulse-gun muzzles."; } } } ], has animate pluralname scenery;