!**************************************************************************** !****(INVENTORY OBJECTS)***************************************************** !**************************************************************************** class light_combo { !Make this a "class" so it can be used by the shard and spike both. before { object DoDrop,DoPutIn,DoPutOnGround { if (xobject = huchess, covegn) { return false !We already have handlers for them. } else { if (shard.misc #1) { !They're tied together. if (self = shard) { print CThe(shard); " is tied to "; The(spike); ". "; } else { print CThe(shard); " is tied to "; The(spike); ". "; } "With the spike so hot and the shard glowing for light, you have no need to drop them right now." } else { return false !It's okay to get rid of. } } } } } !---------------------------------------------------------------------------- object undersuit "undersuit" { !Note that we're not going to provide adjectives, since this is a hidden !component... I don't want to confuse the player with ambiguious !adjectives (such as colors) for other things in the same room. nouns "clothes", "clothing", "suit", "undersuit" adjectives "my", "thin" article "your" is static, clothing, hidden, worn, rippable, cuttable long_desc { "The thin undersuit is all that protects you from the chilling wind." } before { object DoGet { "You already have the undersuit. You're wearing it." } object DoDrop,DoPutIn,DoPutOnGround,DoTakeOff,DoGive,DoCut,DoRip,DoStab { "No, the undersuit is all that protects you from the cold Runoman wind." } } } !---------------------------------------------------------------------------- object netting "piece of netting" { parse_rank 2 !So this takes priority over scenery_netting nouns "net", "netting", "piece", adjectives "emergency", "spongy", "piece", "smaller", "crash" is cuttable, rippable article "a" long_desc { "It's a large strip of netting, rendered pliant now after expelling its impact gasses. \"Netting\" may be a misnomer. It feels more like spongy fabric. This piece was ripped evenly along the widely-spaced edges of the weave, which served as perforations." } before { object DoSearch { if (location = CrashSite) { perform(verbroutine,landscape_netting) !Redirection } else { return false !Default message. } } object DoStab { if (xobject = spike) { Perform(&DoCut,self,xobject) } else { !Default message } } object DoCut,DoRip { if Contains(player,self) { if (xobject = nothing) { "It's a strong material. You'll have to use something "; print "to "; word[1]; " it, or perhaps rip it on something of a suitable nature." } elseif (xobject = spike_in_huchess) { print CThe(spike); " is still lodged in the Lieutenant's shoulder. You can't do that without further injuring him." } elseif (xobject = spike) and (not Contains(player,spike)) { PrintMessage(3,13,spike) !You aren't holding the spike. } else { return false !Okay to try cutting/tearing it. } } else { "You must be holding "; print the(self); " to "; word[1]; " it." } } object DoPutIn { !We'll make "put x on..." work as a DoWrap perform(&DoWrap,self,xobject) } object DoWear { PrintMessage(3,5) } object DoTie, DoWrap { print CThe(self); " is presently too large to work with." } } after { object DoCut, DoRip { !If we make it here, then all cutting/ripping checks were okay. remove(self) !Player loses the single piece Acquire(player,netting_ribbons) !But gains the ribbons if (xobject = sharp_edges) { print "You puncture "; The(self); " on a sharp and pointed edge of the wreckage, pulling and dragging it across to create several ribbons of spongy fabric." } elseif (xobject = spike) { print "Using the flattened end of the bloodied spike, you rip "; print The(self); " into several spongy ribbons." } else { return false !Give default message instead. } } } } !---------------------------------------------------------------------------- object netting_ribbons "netting ribbons" { parse_rank 2 !So it takes priority over scenery_netting & uniform ribbons nouns "net", "netting", "fabric", "ribbons" adjectives "emergency", "spongy", "netting", "crash" is cuttable, rippable, plural article "some" long_desc { "This netting fabric has been further shredded into several strong, wide ribbons." } before { object DoSwing { !If ribbons are tied to the spike, then divert swing to that. if (spike in player) and (spike.misc #1) { perform(&DoSwing,spike,xobject) } else { "You swing a ribbon of netting around, but to no effect." } } object DoSearch { if (location = CrashSite) { perform(verbroutine,landscape_netting) !Redirection } else { return false !Default message. } } object DoCut,DoRip,DoStab { "You already cut it into manageable, wide ribbons." } object DoPutIn { !We'll make "put x on..." work as a DoWrap perform(&DoWrap,self,xobject) } object DoWear { PrintMessage(3,5) } object DoUnTie, DoUnWrap { if (xobject = nothing) { !As a courtesy, allow this to untie from spike. if (spike in player) and (spike.misc #1) { "(from the spike)" perform(&DoUnWrap,self,spike) } else { PrintMessage(1,2,self) } } elseif (xobject = shard) and (shard.misc #1) { !Change it so that we're untying shard from spike. Perform(&DoUnTie,shard,spike) } else { return false !Default "not tied to that" message. } } } } !---------------------------------------------------------------------------- object spike "spike" { inherits light_combo !MISC #1 means that the spike is wrapped in netting. misc false nouns "spike", "rod", "pipe", "pole" adjectives "heating", "core", "metal" article "a" is sharp, switchable, not switchedon is platform !To support "put netting on spike" operations - DoWrap capacity 0 !Because, once again, it can't *really* hold anything. long_desc { "It's a spike from the pod's heating core. "; if (spike is moved) { "One end has been flattened, while the other is crumpled and blunt. An activation lever is set into one side. "; if (self.misc) { "A strip of netting has been tied around the spike. It can't hold down the lever, but it does serve as a carrying handle." } else { print "" !End of the line } } else { "At present, it juts from the front and back of the Lieutenant's left shoulder. You can't get a better look while it remains there." } } desc_detail { if (self.misc #1) { if (self is switchedon) { " (tied with netting, and hot)"; } else { " (tied with netting)"; } } else { return false !No special detail. } } before { object DoSwing { !Are ribbons tied to the spike? if (spike in player) and (spike.misc #1) { "(assuming you mean to throw the spike by swinging it)" perform(&DoThrowAt,spike,xobject) } else { return false !Default handling } } object DoTie, DoWrap { !As a courtesy, if the player is trying to "tie spike to netting" !and they have the netting, we'll reverse it and let it go no. if (xobject = netting_ribbons, netting, landscape_netting) { if PlayerHas(xobject) { perform(&DoTie,xobject,object) } else { PrintMessage(3,13,xobject) } } else { return false !Other instances will fail. } } xobject DoPutIn { if (object is cuttable) or (object is rippable) { perform(&DoWrap, object, self) } elseif (object = shard) { if (self.misc #1) { perform(&DoTie,shard,self) } else { PrintMessage(3,16) !The pair won't stay together... } } else { return false !Default message handling. } } object DoSwitchOn { if (self is moved) { if (self is not switchedon) { PrintMessage(4,2) !...so quickly that you reflexively... if contains(player,self) { if (self.misc #1) { !It's wrapped in netting. "pull back from it. The spike swings for a moment from the netting you have tied around its middle, while it rapidly cools again." } else { "drop it to the ground.\n" perform(&DoDrop,self) : "\nThe lever clicks up and "; print The(self); " cools again." } } else { "yank your hand back. It remains there on the ground, cooling rapidly." } } else { return false !Default "already on" message. } } else { "You can't turn on the spike's heating mechanism while it's still lodged in Lieutenant Huchess." } } object DoSwitchOff { if (self is switchedon) { "You can't turn off the spike. The stone shard is wrapped tightly against the activation handle." } else { return false !Default "it's not on" message. } } xobject DoHit, DoCut, DoChisel, DoStab, DoTouch { if not PlayerHas(spike) { PrintMessage(3,13,spike) !You're not carrying the spike. } else { if (self is switchedon) { !If we're trying to use the spike but it's on, then we can't! PrintMessage(3,9,1) } else { return false !Can proceed as normal. } } } object DoThrowAt { if (xobject = nothing, creature, fuel_puddle) { return false !Allow those XOBJECTS to handle it. } else { if (self is switchedon) { PrintMessage(3,9,2) } else { return false !Can proceed as normal. } } } object DoUnTie, DoUnWrap { if (xobject = nothing,netting_ribbons) and (self.misc #1) { if (shard in player) and (shard.misc #1) { !Process it as "untie shard from spike" if (xobject = nothing) { "(from the shard)" } Perform(verbroutine,shard,self) } else { !Process it as "untie netting from spike" if (xobject = nothing) { "(from the netting ribbon)" } Perform(verbroutine,netting_ribbons,self) } } else { return false !Default handling } } xobject DoUnTie, DoUnWrap { if (self.misc #1) { !We're currently tied with netting. if (object = netting_ribbons) { if (self.misc #1) { if (shard.misc #1) { !We really want to untie the shard from it. Perform(&DoUnTie,shard,self) } else { "You don't need to untie the netting from the spike. It might still come in handy." } } else { return false !Default "not tied to anything" } } elseif (object = shard) { if (shard.misc #1) { !Okay to untie it "You loosen the netting around the shard, being careful not to touch the hot metal of the heating core spike. When the piece of stone is removed, the spike's lever releases. In a few moments, the spike is cold again." shard.misc #1 = false !Shard is no longer tied. self is not switchedon !And the spike isn't hot. !Should probably set a deamon to dim the shard. Activate(shard_dimming,9) !We'll dim in 9 turns. } else { return false !Default "not tied to that" } } else { return false !Default message. } } else { return false !Default "not tied with anything" message. } } } after { object DoTie, DoWrap { if (not self.misc #1) and (xobject ~= netting, netting_ribbons) { print "You can't tie "; The(self); " to anything unless something suitable is wrapped around it first." } else { return false !Continue with default message. } } xobject DoTie, DoWrap { if (self is moved) { if (object = netting_ribbons) { if (self.misc #1) { "A strip of netting is already tied "; if (shard.misc #1) { "around the spike and the stone shard." } else { print "to "; The(self); "." } } else { if FindLight(location) { if (spike not in player) { ImplicitTake(spike) } "You wrap and tie a strip of netting around the middle of the spike. The activation lever is too inset to be held down by it, but you create a loop at the other end to serve as a handle." self.misc #1 = true !Flag that it's now tied. } else { PrintMessage(4,3) } } } elseif (object = shard) { !First, see if we can implicity tie the netting to spike. if (not self.misc #1) { if (netting_ribbons in location) { ImplicitTake(netting_ribbons) } if (netting_ribbons in player) { if (self in location) { ImplicitTake(self) } if (shard in location) { ImplicitTake(shard) } if (self in player) and (shard in player) { "(first wrapping netting around the spike)" Perform(&DoWrap,netting_ribbons,spike) if (self.misc #1) { print "" } } } } if (self.misc #1) { if (shard.misc #1) { "Netting is already wrapped around the spike and the stone shard. The shard is holding the spike's lever, the spike is fully heated, and the shard responds with a bright glow." } else { if FindLight(location) { !Okay to bind them! if (spike not in player) { ImplicitTake(spike) } if (shard not in player) { ImplicitTake(shard) } "You loosen the netting around the heating core spike, so that the stone shard can fit snugly against the activation lever. When you pull the binding tightly around both, the lever clicks twice and heats the spike in a matter of moments." print "" !Spacer before the next section. "As if soaking up the heat, the stone shard begins to glow. It remains cool to the touch, but it casts a light of its own now." shard.misc #1 = true !Now the shard is tied. shard is light !And it's now glowing! self is switchedon !The spike is hot! Deactivate(shard_dimming) !Just in case. } else { !We have to prevent this, so that the player !can get stranded in the dark when running !from the monster. Otherwise, it *might* be !possible (although I doubt it) for them to !bring back the light and still escape... and !that would throw off the balance, as it is. PrintMessage(4,3) } } } else { print "You can't tie the stone shard to "; print The(self); " unless something is wrapped around or tied to "; The(self); " first." } } else { return false !Default "tie" or "wrap" messages. } } else { "You don't need to tie anything to the spike while it's still jutting from the Lieutenant's shoulder." } } } } !---------------------------------------------------------------------------- object lever "activation lever" { nouns "lever" adjectives "activation", "spike's", "inset" article "an" inherits component part_of spike is switchable, platform capacity 0 !Since it's only a platform so we can "put X on Y" long_desc { "The lever was meant to be mechanically operated. It can be pressed to activate the spike, but it won't stay on without that pressure. Originally, the spike was part of a bin containing several spikes, which were used to provide varying levels of heat for the escape pod." } before { xobject DoWrap, DoTie { perform(verbroutine,object,spike) !Redirect to the spike. } object DoPush,DoMove { if (spike is switchedon) { perform(&DoSwitchOff,spike) } else { perform(&DoSwitchOn,spike) } } object DoSwitchOn,DoSwitchOff,DoTie,DoWrap,DoUnTie,DoUnWrap { perform(verbroutine,spike,xobject) !Redirect to the spike. } xobject DoPutIn { perform(verbroutine,object,spike) !Redirect to the spike. } } } !---------------------------------------------------------------------------- object shard "stone shard" { inherits light_combo !MISC #1 means that the shared is tied to the spike. misc false nouns "stone", "shard", "glow" adjectives "rock", "stone" article "a" is not light !When light, it's really glowing. is platform !but not really - we want to support "Put x on Shard" capacity 0 !Because it really holds nothing. long_desc { "The shard is an irregularly shaped chunk of stone taken from a large desert rock. This piece is white with streaks of blue, and "; if (self is light) { "it glows from stored energy." } else { "it casts a very faint glow. Being so slight, it just isn't enough to help push back the dark." } } desc_detail { if (self is light) { if (self.misc #1) { " (tied to the spike, and glowing)"; } else { " (glowing)"; } } else { return false !No special detail. } } before { xobject DoPutIn { if (object is cuttable) or (object is rippable) { perform(&DoWrap, object, self) } elseif (object = spike) { if (spike.misc #1) { perform(&DoTie,spike,self) } else { PrintMessage(3,16) !The pair won't stay together... } } else { return false !Default message handling. } } xobject DoTie, DoWrap { if (object = spike, terminal) { !Reverse it so we're tying the shard to the other thing. Perform(&DoTie,self,object) } elseif (object = netting_ribbons) and ((spike in player) or (spike in location)) and (spike.misc #1) { !If we have the spike and the spike is wrapped and the player !attempted to wrap the shard in ribbons, assume they want to !wrap the shard to the spike. Perform(&DoTie,shard,spike) } elseif (object = netting_ribbons) { "That might work if a piece of netting is tied to something else first." } else { return false !Default handling. } } object DoTie, DoWrap { if (xobject = netting_ribbons) { if ((spike in player) or (spike in location)) and (spike.misc #1) { perform(verbroutine,self,spike) } else { return false !Default handling } } else { return false !Default handlers otherwise. } } object DoUnTie, DoUnWrap { if (xobject = nothing,netting_ribbons) and (self.misc #1) { !Process it as "untie shard from spike" if (xobject = nothing) { "(from the spike)" } Perform(verbroutine,self,spike) } else { return false !Default handling } } xobject DoUnTie, DoUnWrap { if (object = spike) { !Reverse it so that we untie shard from spike Perform(verbroutine,xobject,object) } else { return false !Default handling } } } after { object DoTouch { if (xobject = nothing) { if (self is light) { print "Even though it glows, "; The(self); " is cool to the touch." } else { "Smooth and cold." } } else { return false !Default message. } } } } !---------------------------------------------------------------------------- object vellum "sheet of printed vellum" { !MISC #1 - We have examined the vellum at least once. !MISC #2 - We have seen the full code, not just the partial one. !MISC #3 - We have decoded the vellum, and read its contents. misc false, false, false nouns "vellum", "paper", "parchment", "piece", "sheet", "valum", "vallum", "velum" adjectives "printed", "piece", "sheet" article "a" is readable, rippable long_desc { if Contains(player,self) { "Printed across the top are the words \"Active Orders\". This was a vellum print-out of the command crew's most recent directive. The bulk of it is encoded, decipherable only by a PrimeCom console and the proper decryption key." "\nAt the bottom is printed \"Copied for: Lt. J. P. Huchess\"." if (not self.misc #1) { self.misc #1 = true !Player gets a clue to go north, if both conditions met. if (terminal.misc #1 > 0) { PrintMessage(4,11) } } } else { "You can't get a clear look at "; print The(self); " unless you pick it up." } } before { object DoChase { if (location = CrashSite) and (vellum in WestRoom) { perform(&DoGo, w_obj) } else { return false !Default handling } } object DoRip { if PlayerHas(self) { "You have no reason to destroy what may be your only clue to the unexpected detour into the Runoma system." } else { PrintMessage(3,13,self) } } object DoGet { if FindLight(location) or (self is moved) { return false !Okay to pick it up. } else { PrintMessage(3,10) } } object DoTouch { if (xobject = nothing) { "It's a glossy, thick paper." } else { return false !Default message } } } } !---------------------------------------------------------------------------- object terminal "palmtop terminal" { !MISC #1 = Tried to turn on terminal at least once, while out of range. !MISC #2 = Tried to enter vellum code, but didn't use stylus (DEFUNCT) !MISC #3 = Terminal has a slight charge (from the lit shard of stone). !MISC #4 = Player knows that the terminal needs a reserve cell now. !MISC #5 = Player has tried and failed to decrypt the vellum message. !MISC #6 = Player has seen Covegn's research (the fifth menu option). !MISC #7 = How many times player has charged it with the glowing shard. misc 0, false, false, false, false, false, 0 nouns "handheld", "hand-held", "terminal", "palmtop", "unit", "device" adjectives "remote", "handheld", "hand-held", "palmtop", \ "ensigns","covegn's","ensign's","covegns" article "a" is switchable, not switchedon, container, platform, openable, not open capacity 0 !Not *really* a container. parse_rank 2 !So it appears above its components when similar names. long_desc { if (terminal is not moved) and (covegn.found_in = location) { "You can't really see it. Just the edge of the hand-held device protrudes from under the hatch." } else { print CThe(self); " fits in your hand, with an edge-to-edge screen set snugly into a sleek blue shell. A crack snakes down the length of it, "; if (self is switchedon) { "but the unit seems to work. The screen is now "; if (parent(power_cell) ~= term_slot) { "dimly "; } "lit with large words: \"Touch Anywhere for Main Menu\". "; } else { "with hairline fractures spreading out to the edges. The unit is not turned on at present. "; } "An on/off switch is set into the top of the terminal." } } initial_desc { if (covegn.found_in = location) { "The edge of Covegn's palmtop terminal is just visible under the hatch, near her body." } else { "Covegn's palmtop terminal rests near the hatch, where her body used to be." } } before { object DoOpen, DoClose { print "Aside from its on/off switch, "; The(self); " has no moving parts. You can't "; word[1]; " it." } object DoSearch, DoLookUnder { PrintMessage(9,13) !Explain what's on the bottom. } object DoSwitchOn, DoSwitchOff { if PlayerHas(self) { return false !Okay to turn it on. } else { PrintMessage(3,13,self) !Not holding it. } } object DoTouch, DoStab, DoHit { perform(verbroutine,term_screen,xobject) !Redirect to the screen. } xobject DoPutIn { if (object = power_cell) { perform(&DoPutIn, object, term_slot) } else { return false !Default messaging } } object DoRepair { if (xobject = power_cell) { perform(&DoPutIn, xobject, term_slot) } else { return false !Default messaging. } } } after { object DoSwitchOn { if (location = SiriusDream) { PrintMessage(9,9) if (self.misc #3) or (parent(power_cell) = term_slot) { "The words \"Touch Anywhere for Main Menu\" appear on the screen, broken slightly by the cracked display." } else { "It remains lit for only a moment. The words \"No Reserve - Powering Off\" appear briefly, and then the unit goes dark again.\n" PrintMessage(9,13) !Explain what's on the bottom. self is not switchedon !No power, can't turn it on. self.misc #4 = true !Player knows it needs reserve cell. } } else { self is not switchedon !Because we're out of range. if (self.misc #1 = 0) { !Terminal not yet tried to turn on. PrintMessage(9,9) "The words \"Out of Range\" appear on the cracked screen for a moment, and then the unit powers down again. These devices provide remote access to a PrimeCom console, but they only work when near one." self.misc #1 = 1 !We've tried once to turn it on. if (vellum.misc #1) { !Player gets a clue to go north, if both conditions met. PrintMessage(4,11) !Give player a clue about North. } else { !We must be doing this one first, so let's give the !player a clue that the terminal isn't supposed to !be used as a light source (so they don't get stuck !trying to make it happen). If we read the vellum !first then we'll never see this, but that's okay, !because you need to have a light source to GET the !vellum, so there is no need in saying this anyway. if (WestRoom.misc #1) { if not FindLight(player) { "\nEven if it had stayed on, the dim screen is useless as a light source. You will have to find something else instead, if you plan "; if (location = WestRoom) and (vellum in location) { "to locate the sheet of vellum in the darkness." } else { "to venture far from the crash site." } } FindLight(location) !Fixes room becoming dark!! } } } elseif (vellum.misc #1) { !This was added for version 1.3 -- now that we get the !vellum and read it, give the player a hint to go north. "Until you're near a PrimeCom console, it won't work." PrintMessage(4,11) !Clue about going north, now. } elseif (self.misc #1 = 1) { !Already tried once. "It won't stay on, because you're not in range of a PrimeCom console. Right now, you can't use it at all." self.misc #1 = 2 !We've tried once to turn it on twice. } elseif (self.misc #1 = 2) { !Already tried twice. "The terminal is of no use to you right now." self.misc #1 = 3 !We've tried once to turn it on 3 times. } else { !Okay, the player is just really persistent. So must we. "That's simply not the answer to your current problems." } } } object DoSwitchOff { "The unit powers down again when you tap the on/off switch." } xobject DoTie, DoWrap { if (object = shard, netting_ribbons) { if Contains(player,netting_ribbons) { "If you did that, you wouldn't be able to see the screen. You won't be able to tie anything to the terminal." } else { print "You have nothing to "; word[1]; " it with." } } else { PrintMessage(3,6) !Nothing is to be gained by that. } } } } !---------------------------------------------------------------------------- object term_shell "terminal shell" { inherits component part_of terminal nouns "shell", "case", "outer" adjectives "sleek", "blue" in terminal !So "take shell from terminal" gives approp. response. article "the" long_desc { "It's just the shell -- the terminal's outer case." } before { object DoGet { "If you tried removing the terminal's outer shell, it would all fall apart. You can't do that." } xobject DoTie, DoWrap { perform(verbroutine, object, terminal) } } } !---------------------------------------------------------------------------- object term_crack "crack in the screen" { inherits component part_of terminal nouns "crack" article "the" long_desc { "A crack snakes down the middle of the terminal's screen." } before { object DoHit, DoTouch { perform(verbroutine, term_screen, xobject) } xobject DoTie, DoWrap { perform(verbroutine, object, term_screen) } } } !---------------------------------------------------------------------------- object term_fractures "fractures in the screen" { inherits component part_of terminal nouns "cracks", "fractures" adjectives "hairline" article "the" is plural long_desc { "Hairline fractures spread from the crack in the terminal's screen." } before { object DoHit, DoTouch { perform(verbroutine, term_screen, xobject) } xobject DoTie, DoWrap { perform(verbroutine, object, term_screen) } } } !---------------------------------------------------------------------------- object term_switch "on/off switch" { nouns "switch", "on/off" adjectives "on/off" article "an" inherits component part_of terminal is switchable long_desc { if (terminal is not moved) and (covegn.found_in = location) { run terminal.long_desc } else { print "It's "; The(self); " for "; The(terminal); "." } } before { object DoPush, DoTouch { if (terminal is switchedon) { perform(&DoSwitchOff,terminal) } else { perform(&DoSwitchOn,terminal) } } object DoSwitchOn,DoSwitchOff { perform(verbroutine,terminal,xobject) } } } !---------------------------------------------------------------------------- object term_screen "terminal screen" { nouns "screen", "display" adjectives "terminal", "terminal's", "terminals", "cracked" article "the" inherits component part_of terminal is switchable long_desc { if (terminal is not moved) and (covegn.found_in = location) { run terminal.long_desc } else { "A crack snakes down the length of the screen, with hairline fractures spreading to the edges. "; if (terminal is switchedon) { "The words \"Touch Anywhere for Main Menu\" appear on the broken screen." } else { "The unit is not currently turned on." } } } before { object DoHit, DoStab { "It's designed to be touched, not beaten. Besides, it's already damaged enough." } xobject DoTie, DoWrap { !Wrap something to the terminal, instead. perform(verbroutine, object, terminal) } object DoSwitchOn, DoSwitchOff { perform(verbroutine,terminal) } object DoTouch { if PlayerHas(terminal) { if (terminal is switchedon) { if (xobject = nothing,tooth) { if (creature in location) { !Basically make sure the player can't use the !terminal menu while the creature is right here. print "The ravenous creature is bent on killing you. With it so close at hand, now isn't the best time to distract yourself with "; print The(terminal); "." } elseif (player.misc #2 >= 12) and (not player.misc #3) { "Blood loss is affecting your coordination. Your hand trembles as you attempt to activate the main menu. Before you even make contact, your arm falls." !We'll be nice. If the player got this far, we'll !give them a clue that they should take care of wounds. "\nFingers of pain from your abdominal wounds shoot through your body. If the active bleeding doesn't stop soon, you'll die." } else { if (xobject = nothing) and (tooth in player) and (tooth.misc #1) { "(with the tooth)" : xobject = tooth } if (xobject = nothing) { "You touch the screen with one fingertip in several places, but nothing happens. The capacitive sensitivity of the unit appears to be damaged. Finally, you find a responsive spot, and the main menu appears." } else { !We must have used the tooth. tooth.misc #1 = true !We used it. "The tooth makes a passable stylus. In fact, the screen's resistive underlay is much more responsive. The main menu appears." } terminal_mainmenu !Runs the main menu! } } elseif (xobject = spike) { if (spike is switchedon) { !Default message - result in "too hot to touch" } else { "The spike is even clumsier than your finger. It doesn't even have a point -- just a crumpled, blunt end and a wider, flattened end." } } else { "It doesn't help to touch the terminal's screen "; print "with "; The(xobject); "." } } else { "Nothing happens. The terminal isn't turned on." } } else { PrintMessage(3,13,terminal) !Not holding it. } } } } !---------------------------------------------------------------------------- object term_slot "reserve slot" { nouns "slot", "opening", "notch" adjectives "reserve","power","square","terminal","terminal's","terminals" article "a" inherits component part_of terminal is container !But only for the power cell. is openable, open capacity 0 !But it can't actually "hold" anything else. long_desc { print "A small square slot on the back of "; The(terminal); " "; if (parent(power_cell) = term_slot) { "is now fitted with a reserve power cell." } else { "is missing its reserve cell." } } before { object DoOpen { "You don't need to. It's more of a notch, really. A power cell just goes in." } object DoClose { "You can't. It's not that kind of slot." } object DoRepair { if (xobject = power_cell) { perform(&DoPutIn, xobject, self) } else { return false !Default messaging. } } xobject DoPutIn { if (object = power_cell) { "You fit the reserve cell into the slot on the back of "; print The(terminal); ". The device hums for a moment." move power_cell to term_slot power_cell is hidden !So it doesn't show up in list. } else { "That doesn't fit in the terminal's reserve cell slot." } } } } !---------------------------------------------------------------------------- object receptor "solar receptor" { nouns "receptor", "recepter", "lens" adjectives "solar", "terminal", "terminal's", "terminals" article "a" inherits component part_of terminal is platform !Only so we can support "DoPutOn" capacity 0 !But we can't *really* put anything on it. long_desc { print "Across the top of the terminal's back, the lens of "; print art(self); " points futilely into the night." } before { xobject DoTie, DoWrap { !Wrap something to the terminal, instead. perform(verbroutine, object, terminal) } object DoPoint { if (xobject = shard) and not (shard.misc #1) { perform(&DoTouch,self,xobject) !Touch receptor with shard. } else { return false !Default messages } } xobject DoPoint { if (object = shard) { perform(&DoTouch,self,object) !Touch receptor with shard. } else { return false !Default messages } } object DoTouch { if (xobject = shard) { if (shard is light) { if (shard.misc #1) { print "You find it impossible to touch the glowing shard to "; The(self); " while it's still tied to the spike. You're only holding on by the netting ribbon, after all." } else { if (terminal is switchedon) { print CThe(terminal); " is already powered on." } elseif (parent(power_cell) = term_slot) { print "No need. It's now powered by a reserve cell." } elseif (terminal.misc #3) { print CThe(terminal); " already has a slight charge." } elseif (terminal.misc #7 >= 3) { print "Nothing happens. It's no longer charging that way." } else { return false !It looks like all checks are ok! } } } else { !I considered saying that the shard is no longer glowing, !but I felt that was too much of a clue. At least let the !player work for some of it. print "You touch the rock shard to the terminal's "; print self.name; ", but nothing happens." } } else { PrintMessage(3,15) !Nothing happens. } } xobject DoPutIn { !Treat it as a "touch lens with object" instead. Perform(&DoTouch,self,object) } } after { object DoTouch { !We checked for all conditions BEFORE, so if we get here, we !touched it with a lit shard. That should be enough. terminal.misc #3 = true !Temporary power is now stored. "You touch the glowing shard to the terminal's "; print self.name; ", and it hums faintly." terminal.misc #7 ++ select (terminal.misc #7) case 1 { "\nIt won't last long. You can only provide a temporary charge that way, when the receptor isn't in direct sunlight." } case 2 { terminal.misc #4 = true !In case player doesn't yet know it. "\nThere must be a better way. The reserve slot on the back of the unit is still empty." } case 3 { print "\nThis time, it seemed to take longer. "; print The(self); " must be damaged." } } } } !---------------------------------------------------------------------------- object power_cell "power cell" { nouns "cell", "battery" adjectives "reserve", "power", "square" article "a" long_desc { "The small square power cell is made to fit most portable Consortium devices. "; if (parent(self) = term_slot) { "It is now snapped into place in the back of "; print The(terminal); "." } else { "As a reserve cell, its charges should last a very long time." } } before { object DoGet { if (xobject = nothing,terminal,term_slot) { if (parent(self) = term_slot) { print CThe(terminal); " will work better if you leave it in." } else { return false !We can get it. } } else { "No, the reserve cell is now in the slot on the back of "; print The(terminal); "." } } } } !---------------------------------------------------------------------------- !We won't put this "in" the player until they're attacked by the monster, !just to keep from complicating things too early in the game. ! object my_abdomen "your abdomen" { nouns "abdomen", "stomach" adjectives "my" inherits component part_of nothing is platform !So that "put...on..." works. capacity 0 !Because it's not really a platform. long_desc { if (self.misc #3) { "Your abdominal wounds have been tightly bandaged." } else { "Deep puncture wounds and minor burns mark your abdomen. Your undersuit is ripped and charred in front, and stained blood-red." } } before { xobject DoWrap, DoTie { perform(verbroutine,object,player) } object DoGet,DoDrop { ParseError(6) !That doesn't make any sense } } } !---------------------------------------------------------------------------- !We won't put this "in" the player until they're attacked by the monster, !just to keep from complicating things too early in the game. !It should be okay to double up on the same nouns used by Huchess's !wound, because this wound isn't put "in" the player until the end. ! object my_wounds "your wounds" { nouns "wounds", "burns", "punctures", "wound" adjectives "my" "puncture", "burn", "abdominal", "abdomen" inherits component part_of nothing is plural, platform, container !So that "put...on/in..." works. capacity 0 !Because it's not really a platform or container. long_desc { run my_abdomen.long_desc } before { object DoWrap { !We'll let "wrap wound" work implicitly. if (xobject = nothing) and (netting_ribbons in player) { "(with netting ribbons)" Perform(&DoWrap,netting_ribbons,player) } else { return false !Default handling. } } xobject DoWrap, DoTie { perform(verbroutine,object,player) } object DoUnWrap, DoUnTie { if (xobject = nothing) { perform(verbroutine,player) } else { return false !Default handling. } } object DoGet,DoDrop { ParseError(6) !That doesn't make any sense } } } !---------------------------------------------------------------------------- object tooth "tooth" { !MISC #1 means we have touched the screen at least once with the tooth. misc false nouns "tooth", "fang" adjectives "pointy", "pointed", "creature's", "creature", "creatures", "broken" article "the" initial_desc { "One of the creature's pointed fangs has fallen to the ground near its charred, lifeless body." } long_desc { "The fang is as long as a finger, but more narrow, tapering to a slightly rounded tip. Dried blood and saliva streak the dingy white." } }