array centerbuf[100] !---------------------------------------------------------------------------- !Usage: Printer centered text in the window. !Format: PrintCenter("String",LineNumber,0,wrapyesno) ! or ! PrintCenter(Array,LineNumber,1,wrapyesno) ! routine PrintCenter(t,y,isarray,wrap) { local x, l, a l = display.linelength if (not isarray) a = string(centerbuf,t,100) else a = StringLength(t) !x = ((l - a) / 2) + 1 x = ((l - a) / 2) if (y > 0) { locate x, y } else { print to x; } if (not isarray) { if (wrap) print t else print t; } else StringPrint(t) } !---------------------------------------------------------------------------- ! ObjectIs(object) ! prints a list of parenthetical attributes ! Taken out of HugoLib.h so that we can avoid the "providing light" message. ! replace ObjectIs(obj) { !! local n !! if obj is clothing: n = TestObjectIs(obj, worn, "being worn", n) !! n = TestObjectIs(obj, light, "providing light", n) !! if n: print ")"; run obj.desc_detail } !---------------------------------------------------------------------------- replace DarkWarning { print CThe(player); " can't see much in the desert night." } !---------------------------------------------------------------------------- !Remove Covegn from the crash site. Note that we don't have to remove every !component explicitly, because they're in or found_in covegn or one of the !other components. ! routine Remove_Covegn { covegn.found_in = nothing : remove covegn covegn is known !Just in case the player never looked. blood_stains.found_in = CrashSite !In case player looks. if (terminal is not moved) and (terminal not in CrashSite) { !If the player never took the terminal, leave it here. move terminal to CrashSite } } !---------------------------------------------------------------------------- !Remove Huchess from the crash site. Note that we don't have to remove every !component explicitly, because they're in or found_in huchess or one of the !other components. ! routine Remove_Huchess { remove huchess huchess is not alive huchess.found_in = nothing deactivate(huchess_health) !Because he's gone now. if (spike is not moved) { !If the player never took the spike, be sure to leave it here. move spike to CrashSite : spike is moved } huchess is known !Just in case the player never looked. } !---------------------------------------------------------------------------- ! First parm is the location to move the creature. ! Second parm is whether or not to turn on the creature_rampage fuse. routine Creature_Now_Here(loc, do_fuse, reset_attack_count) { move creature to loc fake_creature.found_in = nothing !Interaction. if (reset_attack_count) { creature.misc #3 = 0 !Reset the per-area attack counter. } Deactivate(creature_nearing) !This fuse is not in effect for now. if (do_fuse) { Activate(creature_rampage, 5) !In five turns, it will be gone. } } !---------------------------------------------------------------------------- !Call this after the creature takes off with one of the two bodies. This !will restart "creature_nearing" with a quicker fuse, and remove whoever !it took away. We can also call it with "nothing" if nobody is taken. ! routine Creature_Starts_Again(who) { Deactivate(creature_rampage) !Just in case we didn't. Deactivate(creature_chase) !Because it's not chasing us. creature.misc #1 = 6 !So it'll drop to 5 on the next round. creature.misc #2 = 0 !And work our way back up to that point. creature.misc #4 = false !It's no longer stunned. creature.misc #5 = 0 !And no free turns next time we see it. remove creature : Activate(creature_nearing) if (who = covegn) { Remove_Covegn !Perform removal of the ensign } elseif (who = huchess) { Remove_Huchess !Perform removal of the lieutenant } } !---------------------------------------------------------------------------- !Mainly adding this to give a new response to look "up" ! replace NewOMessages (obj, num, a, b) { local retval = false select obj case direction { select num case 1 { if (self = u_obj) { run sky.long_desc } elseif (self = d_obj) { "Dry, desert ground." } elseif (self = n_obj) and \ (location = CrashSite,NorthRoom,Chase_room1,\ Chase_room2,Chase_room3, Chase_room4,\ Chase_room5,Chase_room6) { run sirius_wreckage.long_desc !Main wreckage } elseif (self = n_obj) and (location = RockSite) { run crash_site.long_desc !Use crash site desc } elseif (self = e_obj) and (location = WestRoom) { run crash_site.long_desc !Use crash site desc } elseif (self = s_obj) and (location = NorthRoom) { run crash_site.long_desc !Use crash site desc } elseif (self = s_obj) and (location = CrashSite) { PrintMessage(4,1) !Mention the rocks that way } elseif (self = s_obj) and (location = SiriusDream) { "The Pod Four crash site is somewhere to the distant south, but it's too far away, lost in the night." } else { "Desert land fades into the black of night that way." } retval = true } } return (retval) } !---------------------------------------------------------------------------- routine IsCreatureConfused(maxturns) { local r = false !If the player just hit the creature, then it's confused for one round. if (creature.misc #4) { creature.misc #5 ++ !Increment number of free rounds given. if (creature.misc #5 > maxturns) { !We already had all the free rounds that we're allowed. creature.misc #4 = false !No longer stabbed/confused. creature.misc #5 = 0 !And the free-turns counter gets reset. if (creature in location) { print "" !A blank line at first. if (creature.misc #3 = 1) { "The flow of blood from the creature's wound begins to lessen after a moment. It raises heavy fists, then unleashes an unnatural, metallic shriek. Now it remembers." } else { print CThe(creature); " begins to recover even faster than before." } } } else { if (creature in location) { print "" !A blank line at first. if (creature.misc #3 = 1) { print CThe(creature); " seems momentarily confused, as though forgetting what it had been doing before." !Players aren't getting the urge to run. So provide clue. "\nThe attack may buy you a little time, but the creature doesn't seem seriously injured." } else { !Players will try to kill it. We're going to have to !give them a clue that they can leave, otherwise this !isn't going to work out. Kind of ruins (spoils) a !puzzle, but I see no other way to spur them to action. "Again, the creature seems confused, but not seriously injured. Bravery is good. Retreat is better." } } elseif (location = chase_room1, chase_room2, chase_room3, \ chase_room4, chase_room5, chase_room6) { "\nYou can hear the creature's angry cry from the "; if (running_north) { "south, "; } else { "north, "; } "drawing near, closing fast." } r = true !Creature is confused during this round. } } return (r) } !---------------------------------------------------------------------------- ! EndGame(end_type) ! called by the engine via EndGame(end_type) when endflag is not false ! (endflag is cleared previous to calling); return false to terminate ! ! Note that this was taken from HugoLib.h and modified for DISTRESS.HEX ! replace EndGame(end_type) { PrintStatusLine ! update one last time PrintEndGame(end_type) ! print appropriate ending message local r :AskAgain2 !Message(&EndGame, 1) ! ask to RESTART, RESTORE, (UNDO), or QUIT PrintMessage(6,1,end_type) r = -1 while (true) { GetInput select word[1] case "restart", "r" { if restart { r = true PrintStatusline } else { Message(&DoRestart, 2) ! failed } break } case "restore", "e" { r = Perform(&DoRestore) !if restore { ! VMessage(&DoRestore, 1) ! "Restored." ! PrintStatusline ! DescribePlace(location, true) ! return true !} else { ! VMessage(&DoRestore, 2) ! "Unable to restore." !} break } case "undo", "u" { r = Perform(&DoUndo) !if not UNDO_OFF { ! if undo { ! r = true ! PrintStatusLine ! DescribePlace(location) ! } else { ! Message(&DoUndo, 1) ! failed ! } !} else { ! Message(&DoUndo, 1) !} break } case "quit", "q" { r = 0 break } case "afterword", "afterward", "a" { if (end_type = 1) { PrintMessage(6,2) } } !Message(&EndGame, 2) ! ask again (more succinctly) PrintMessage(6,1,end_type) } if r = -1: jump AskAgain2 return r } !---------------------------------------------------------------------------- replace PrintEndGame(end_type) { Font(BOLD_ON) select end_type case 1 { print "\n******** THE END ********" } case 2 { if player_person = 2 print "\n*** YOU HAVE DIED ***" else print "\n*** "; CThe(player); \ MatchPlural(player, "has", "have"); \ " died! ***" } Font(BOLD_OFF) PrintScore(true) } !---------------------------------------------------------------------------- ! Ending #1 -- The player was killed by the creature, at the Crash Site. ! routine DoGameOver(which_ending) { local e_type = 2 !By default, the player has died. !We have to do this since GameOver happens immediately. !!! SaveCommandHist !Remember the last command typed. select (which_ending) case 1 { !No need for newline -- already did it in creature_rampage "Teeth like jagged spikes pierce your shoulder, and your arm goes limp. The creature makes deep slashes across your face and chest, before crushing your head between massive claws. The pain is over then. Satisfied, the creature lifts you easily, throws you over one shoulder, and once again lumbers off into the shadows of night." !UNDO_OFF = true } case 2 { !A somewhat different version of the death ending. This one happens !when the creature has been chasing the player north toward the main !wreckage, and the player is finally caught. "You grow weaker from blood loss. The creature is all over you -- swiping, chewing, tearing, crushing. Your life ebbs while you choke on screams that can't escape your throat under so much agony. The torture continues, but at last it is of no concern. The creature heaves your dead body over its mighty shoulder, then staggers off into the night." } case 3 { !A third version of the death ending. This one happens when at the !wreckage of the Sirius Dream, and is provided primarily for variety. "The creature lifts you from the ground. It holds you at an angle, staring up into your eyes with the blackness of its own. Your shoulders crunch, and you gag at the stench from its breath. Sharp teeth close on your head, and the agony ends as quickly as it begins. You die, and that's enough for the creature. It slings you over its shoulder, then lumbers away into the blackness of night." } case 4 { "Your knees buckle, and you fall to the ground. Blood stains the desert. Your life comes to an end on this desolate, alien world, far from Home and in the dead of night." } case 5 { "You sit for a moment on the cold, hard ground, breathing deeply. Four more? How many more after that?" "\nExactly how long you sit there, you can't remember. Ten minutes? Two hours? A thin, light line across the eastern horizon brings the hint of morning. With it come rapid-fire visions: you, pale and transparent, wrapped in strange skins; pieces of the starship, faint and wispy, collected in piles; an ad hoc shelter built from scraps of the wreckage; two creatures fallen and askew nearby, headless, the ground visible through their hazy bodies and a transparent sheet of metal marked with darker stains near their heads; Another you, looking rough, beaten, and older in phantomous form, your hair too long and unkempt, the cloak of skins torn and ragged." "\nThe black sky is turning deep blue. You look up to catch a glimpse of a large shape moving swiftly overhead, toward the southern horizon. It too is wispy, unreal, but you recognize it as a Consortium cruiser. More than that, you recognize the design. It's the VS-449 -- a conceptual model not slated for production for another six years. In a moment, it blinks from sight." "\nYou rise to your feet. You glance back at the burning wreckage, where the fires are beginning to wane. You are stranded on a world that tricks your mind with phantomous visions of events past and events yet to come, alone but for the unreasoning creatures bent on killing you. At least the phantoms are on your side. After all, the phantoms never lie." "\nIt's time to start surviving." e_type = 1 !The only winning ending. :) } endflag = e_type !Ah yes... the game is over. } !---------------------------------------------------------------------------- ! Prints an appropriate statusline as specified by global STATUSTYPE. ! This was copied from HugoLib.h, for the purposes of slight variations. ! replace PrintStatusline { display.statusline_height = 1 Font(BOLD_OFF | ITALIC_OFF | UNDERLINE_OFF | PROP_OFF) window display.statusline_height { color SL_TEXTCOLOR, SL_BGCOLOR cls locate 1, 1 if not location print "\_"; elseif not light_source print "In the dark"; else { if FORMAT & DESCFORM_F: print "\_"; print capital location.name; } } color TEXTCOLOR, BGCOLOR Font(DEFAULT_FONT) } !---------------------------------------------------------------------------- ! This comes into play when the player is running from wreckage to wreckage. ! We need to know if they're going north, or going south. ! routine running_north { local r if (old_location.misc #1 < location.misc #1) { r=true } else { r=false } return (r) } !---------------------------------------------------------------------------- routine SetCreatureToAppear(in_turns) { creature.misc #2 = 5 !Force it up to waiting enough turns! if (creature.misc #1 > in_turns) { creature.misc #1 = in_turns !So the fuse drops from here next time. } } !---------------------------------------------------------------------------- routine CreatureInFuel { if (creature in SiriusDream) and \ (creature_rampage.timer >= 3) and \ (creature.misc #6) and \ (location = SiriusDream) { return true } else { return false } } !---------------------------------------------------------------------------- !Basically, this gets called when we throw the spike and shard into the !fuel. It goes up in flame, and we lose our puddle, and the netting burns !off the pair of objects, and they come to rest in the current room. ! routine BurnThePuddle { move shard to location : move spike to location spike.misc #1 = false : spike is not switchedon shard.misc #1 = false : shard is not light fuel_puddle.found_in = nothing } !---------------------------------------------------------------------------- !Do everthing necessary to flag that the creature is now burnt and dead. ! routine CreatureIsDead { remove creature : Deactivate(creature_rampage) : Creature is not alive dead_creature.found_in = location : move tooth to location } !---------------------------------------------------------------------------- !Remember command history. Useful for making more explicit UNDO responses. !Reference idx as 1-based, and we subtract one since array is 0-based. ! !* routine SetCommandHist(list,idx,value) !* { !* if (idx >= 1) and (idx <= 10) and (list >= 1) and (list <= max_undo) { !* select (list) !* case (1) : CommandHist1[idx-1] = value !* case (2) : CommandHist2[idx-1] = value !* case (3) : CommandHist3[idx-1] = value !* case (4) : CommandHist4[idx-1] = value !* case (5) : CommandHist5[idx-1] = value !* } !* } !---------------------------------------------------------------------------- !Retrieve the command history information, too. ! !* routine GetCommandHist(list,idx) !* { !* if (idx >= 1) and (idx <= 10) and (list >= 1) and (list <= max_undo) { !* select (list) !* case (1) : return (CommandHist1[idx-1]) !* case (2) : return (CommandHist2[idx-1]) !* case (3) : return (CommandHist3[idx-1]) !* case (4) : return (CommandHist4[idx-1]) !* case (5) : return (CommandHist5[idx-1]) !* } !* return false !* } !---------------------------------------------------------------------------- !Print out the last command that we typed, useful in UNDO situations. ! !* routine PrintCommandHist(list) !* { !* local i, v !* local done = false !* local g = false !* if (list >= 1) and (list <= max_undo) { !* for (i=1; i<=10; i++) { !* v = GetCommandHist(list, i) !* if (v = "") { !* done = true !* } else { !* if (not done) { !* if (g) { print " "; } !* g = true !For next time !* print CommandWord(v); !* } !* } !* } !* } else { !* "?"; !It's an invalid list - should never happen. !* } !* } !---------------------------------------------------------------------------- !Take the last command typed and make it our most recent command. ! !* routine SaveCommandHist !* { !* local i, j !* !* !First bubble up the older command history. !* for (j=max_undo; j>1; j--) { !* for (i=1; i<=10; i++) { !* SetCommandHist(j,i,GetCommandHist(j-1,i)) !* } !* } !* !* !And then save the newest command history. !* for (i=1; i<=10; i++) { !* SetCommandHist(1,i,word[i]) !* } !* } !---------------------------------------------------------------------------- ! MPS -- This is sort of like "VerbWord" except that I'll do the translation ! based on known abbreviations, since "verbroutine" and "word[1]" may not ! be valid at this time. ! !* routine CommandWord(which) !returns word used as verb !* { !* select (which) !* case "x" { return "examine" } !* case "l" { return "look" } !* case "i","inv" { return "inventory" } !* case "z" { return "wait" } !* case "n" { return n_obj.name } !* case "s" { return s_obj.name } !* case "e" { return e_obj.name } !* case "w" { return w_obj.name } !* case "ne" { return ne_obj.name } !* case "se" { return se_obj.name } !* case "sw" { return sw_obj.name } !* case "nw" { return nw_obj.name } !* case "u" { return u_obj.name } !* case "d" { return d_obj.name } !* case "~all" { return "all" } !* case "~any" { return "any" } !* case "~all" { return "all" } !* case "~and" { return "and" } !* case "~except" { return "except" } !* case "~oops" { return "oops" } !* case else { return which } !* } !---------------------------------------------------------------------------- routine DoHintAbout { if (object = undersuit) { "It isn't important, except to keep you from roaming the desert naked." } elseif (object = netting) { "It's still a pretty large piece. It's useful, but not until you have... altered it." } elseif (object = netting_ribbons) { "Think of it like strips of fabric. You may find more than one use for the netting, so don't forget that you still have it." } elseif (object = spike) { "It's useful in more ways than one. What was its original purpose? Can that purpose still be put to good use? Also, how might its now-damaged form also be useful? One end is blunt and the other is flattened. If an action implies the use of one end, how might a different, more specific action imply the user of the other?" } elseif (object = lever) { "Did you try pushing it? Do you know why it won't stay down? What could be done to keep it down, and have you figured out a reason to do so in the first place? Keeping warm in the cold night isn't the point -- you'll be fine. The heat is needed for another reason, and it may make more sense when the time comes." } elseif (object = shard) { "Did you look at the distant rocks before coming to find this one? Did you examine the arched rock where you got this? The shard serves only two purposes, and the first allows the second to happen." } elseif (object = vellum) { "The main idea is to decrypt it somehow. It won't be of general use in the rest of your efforts, but that alone is important." } elseif (object = terminal) { "Don't be too fixated on this early on. You can't use it right away, and until then, it's of no use. Just hang onto it until then, and if you're still confused by how to use it, check out its parts." } elseif (object = term_shell) { "It's not important to you. The terminal itself is." } elseif (object = term_crack,term_fractures) { "This is only important to the extent that it proves the terminal is damaged. Don't worry about the cracks." } elseif (object = term_switch) { "It's just there for turning the terminal on and off." } elseif (object = term_screen) { "This becomes important when the terminal is powered on -- but not before then. The way you use it is described then, but if in doubt, realize that it's a touch-sensitive screen. That its purpose." } elseif (object = term_slot) { "This is one of two ways to provide power to the terminal. Once you know it's empty, it might be easier to locate something for it." } elseif (object = receptor) { "It's the dead of night, yes, but could something else -- something portable -- provide light? This is another way to provide temporary power, but it's more cumbersome and it won't last." } elseif (object = power_cell) { "If its use is a mystery to you, try again to turn on the terminal when it has no power. Yep. There you go." } elseif (object = my_abdomen, my_wounds) { "If you're injured, isn't there a way to take care of it?" } elseif (object = tooth) { "Only in death could the creature provide something useful. If the tooth seems to serve no purpose, consider this: Is there a reason the terminal has been less than fully responsive, based on how you were using it prior to now?" } else { !This should never happen, because hints are written for everything !the player can pick up, and every "piece" of each of those things. print "No hint is available for "; The(object); "." } } !---------------------------------------------------------------------------- routine DoHintGeneral { local nexthint = true local subhint = 0 !Start with the hints given whenever the creature is here. This kind of !takes priority over the normal progression of hints, because the player !probably needs to figure out what's important about this situation. if (creature in location) { if (location = SiriusDream) { if (creature.misc #6) { select (hint_num) case 0 { "Your pacing and the creature's rush has put it in an interesting position -- good for you, bad for it." } case 1 { "You don't need fire to set off the fuel." } case 2 { "If you tried taking the fuel, you may now know that it can be set off just by heat." } case 3 { "This should be possible to achieve, just with what you may already have." } case 4 { "But if you wait too long, the creature is out." } case 5 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 6 { "With the spike and the shard tied together (so the spike remains hot), throw it at or into the puddle, or at the creature, while it's standing in the fuel." nexthint = false } case else { nexthint = false } } else { select (hint_num) case 0 { "As you've found before, the creature isn't easily killed." } case 1 { "You may have noticed the puddle of fuel." } case 2 { "That won't help you unless the creature steps in it." } case 3 { "Nothing you do on purpose can bring about that event." } case 4 { "Since it didn't happen, you're either on a different plot branch, or the creature arrived before you figured out what had to be done." } case 5 { "Depending on your earlier actions, you may not have a way out of this." } case 6 { "But those actions should become obvious when you begin to make use of the terminal. Or at least, you should begin to see how those early decisions could improve." } case 7 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 8 { "You gain the ability to monitor the Pod Four crash site remotely, but only if you turned on the beacon. The site is only worth monitoring if you saved Huchess from the spike wound, and made the trip here before the creature came back for him. If he's still alive and the beacon is on, things might go a little differently. Otherwise, you are on a death-only plot branch." nexthint = false } case else { nexthint = false } } } elseif (location = Chase_room1, Chase_room2, Chase_room3, \ Chase_room4, Chase_room5, Chase_room6) { if (running_north) { !Running to the north. select (hint_num) case 0 { "You don't have a means of killing it." } case 1 { "Your focus should be to get away from it." } case 2 { "Is there any way to distract or confuse it?" } case 3 { if (parent(spike) = player) { "Yes -- you might wound it, even if you can't kill it." } else { "Nope, you don't have what you need for that." nexthint = false } } case 4 { "Attack it, if you can think of a way." } case 5 { "With the spike." } case 6 { "You'll have to unwrap it first, so it cools down." } case 7 { "Bludgeoning it gets you nowhere. Isn't there another way you can attack the creature with the spike, in a more particular, forceful way?" } case 8 { "You can stab, slice cut..." } case 9 { "But you better use the borrowed time to get away." } case 10 { "It won't be easy, and timing is everything." } case 11 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 12 { "When the chase begins, unwrap the spike. The light from the shard will last long enough if you wait to do so until the creature bounds into sight. Stab it, get away as much as you can before it catches up (three times north), stab it again, and you'll be able to reach the northern crash site right as the shard goes out. The creature will stalk the perimeter for a while, so you're safe for a time." nexthint = false } case else { nexthint = false } } else { !Running to the south. select (hint_num) case 0 { "Trying to make it back to the Pod Four wreckage?" } case 1 { "Have you figured out how long the shard will last?" } case 2 { "You had to have unwrapped it in order to stab the creature." } case 3 { "And you had to stab the creature to get away from it." } case 4 { "You won't have enough light to make it back." } case 5 { "You can't make it. If you left something behind or forgot to do something before you left, then you're in a different plot branch -- one where you can't survive. Let it play through to the end, if you can. It may at least help you next time around." : nexthint = false } case else { nexthint = false } } } elseif (location = CrashSite) and (huchess.found_in = location) { !At the crash site, and creature is after one of the others. select (hint_num) case 0 { "Your first urge is probably to try to kill it." } case 1 { "You can try, but the best you can hope for is to distract it long enough that you can get away somehow." } case 2 { "However, at present, that's not necessary. Watch. It hasn't come for you yet, after all." } case 3 { "So be afraid... but don't panic. You can't stop what it's doing, so worry about your own survival later." nexthint = false } case else { nexthint = false } } else { !Not at the crash site, so creature must be after us now. Or, !if we are there, then the others have already been taken. select (hint_num) case 0 { "You can't kill it. Not here. Not yet." } case 1 { "But you don't have to go down without a fight." } case 2 { "If you tried waiting, this is probably why -- So that you could jump ahead and find out what you're up against." } case 3 { "But it isn't necessary to have this encounter this soon, in this place -- hence waiting was unnecessary." } case 4 { "But now that you're here, at least you can put the experience to good use next time." nexthint = false } case else { nexthint = false } } !Next, give hints for when the player is at the CrashSite. This becomes !pretty complicated, because we have a LOT of stuff to have to confirm. !The other locations get a little easier to manage. } elseif (location = CrashSite) { if (netting is not moved) and (terminal is not moved) and \ (terminal not in location) and (spike is not moved) and \ (vellum in nothing) and (counter <= 10) and \ (distress_signal is not switchedon) { !When even one of the above conditions is no longer true, we !can move forward to giving other kinds of hints. This is just !the introductory hint, to keep players from asking too early. nexthint = false if (hint_num = 0) { "You may not have looked around enough yet. Take a look at what's near you. Check out the scenery. Get your bearings." } } elseif (huchess.found_in = location) and (huchess is alive) and \ (huchess_health.timer <= 12) and (not huchess.misc #1) { if (spike is not moved) { select (hint_num) case 0 { "Attempting to save the Lieutenant's life might be a good idea." } case 1 { "What's his most immediate problem?" } case 2 { "A spike through the shoulder is something you can take care of." } case 3 { "It will come out, if you try." nexthint = false } case else { nexthint = false } } elseif (netting_ribbons is not moved) { select (hint_num) case 0 { "The spike is out, but now he's worse off than before." } case 1 { "You may already have figured out what you need to do, but how?" } case else { if (hint_num < 50) { hint_num = 50 } subhint = netting_ribbons !Continue with those clues. } } else { select (hint_num) case 0 { "The spike is out, and you now have what you need." } case 1 { "Ribbons of netting can work as bandages." nexthint = false } case else { nexthint = false } } } elseif (vellum in westroom) { if (shard is not moved) { if (not westroom.misc #1) { nexthint = false if (hint_num = 0) { "You may be interested in chasing after the vellum." } } else { select (hint_num) case 0 { "When you tried to find the vellum, wasn't it too dark to see anything?" } case 1 { "It isn't lost -- but you'll need a light source to carry with you. Something small. Something portable." !If we don't have the terminal or we haven't tried to !turn it on a couple times, skip the next clue. if (terminal.misc #1 < 2) or (terminal not in player) { hint_num ++ !Skipping the next hint. } } case 2 { "By now, you know that the terminal's screen will come on for a moment. Don't get fixated on making it work right now. The terminal may have a use later, but regardless, it won't work as a light source." } case 3 { "Did you already look at the rocks in the distance?" } case 4 { "If so, then you know that the closest ones are to the south." } case 5 { "The nearest rock merits a closer look." nexthint = false } case else { nexthint = false } } } else { if (shard is light) { nexthint = false if (hint_num = 0) { "You have a light source now. The lost vellum should be easy to find, if you head west." } } elseif (spike not in player) { nexthint = false if (hint_num = 0) { "You're going to need that spike, if you intend to make more progress." } } else { if (hint_num <= 4) { select (hint_num) case 0 { "Be sure to look at the distant rocks, and at the arched rock to the south, where you found the shard." } case 1 { "These stones glow when directly heated." } case 2 { "Don't you have something capable of creating heat?" } case 3 { "Yes -- and it came from the pod's heating core. Did you look at it yet? See the lever?" } case 4 { "You may be able to hold down the lever -- just not with your hand." } } elseif (netting_ribbons is not moved) { select (hint_num) case 5 { "You're going to need something for that purpose, if you intend to make more progress." } case else { if (hint_num < 50) { hint_num = 50 } subhint = netting_ribbons !Continue with clues. } } else { select (hint_num) case 5 { "It's inset, but something next to it could apply that pressure..." } case 6 { "If both things were put together somehow." } case 7 { "The handle needs pressure to stay down, and the stone shard needs heat to work. It seems those two things are perfectly suited together." } case 8 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 9 { "Tie or wrap netting around the spike, and then around the stone shard, so that the shard presses the lever on the spike, and the spike heats the shard so it glows." nexthint = false } case else { nexthint = false } } } } } elseif (distress_signal is not switchedon) { select (hint_num) case 0 { "The chance of rescue would be nice." } case 1 { "A beacon post has been set up here." } case 2 { "If you haven't already, take a moment to examine it." } case 3 { "You forgot to turn on the distress signal." nexthint = false } case else { nexthint = false } } elseif ((terminal is not moved) and (terminal not in location)) \ or ((vellum in nothing) and (netting is moved)) { select (hint_num) case 0 { "Could either crew member have had something you overlooked?" } case 1 { "Maybe no longer in their possession... Was anything "; if (vellum in nothing) and (netting is moved) { "else to be found in the emergency netting?" } else { "to be found around the hatch?" } } case 2 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 3 { "It's not the only way, but it's the quickest and easiest. Try searching "; if (vellum in nothing) and (netting is moved) { "the emergency netting. "; } else { "or looking under the pod's hatch. "; } "Of course, later events will make it known, even if you were to take no action now." nexthint = false } case else { nexthint = false } } elseif (netting is not moved) { nexthint = false if (hint_num = 0) { "Is any of the emergency netting useful?" } } elseif (parent(vellum) ~= nothing, westroom) and (terminal is moved) { nexthint = false if (hint_num = 0) { if (not terminal.misc #1) { "What happens when you try turning the terminal on? Even if it doesn't work, it's important to know why. Try it." } elseif (not vellum.misc #1) { "Something important is printed on the vellum. Be sure to read it." } else { "If even one PrimeCom console survived in the wreckage of the\I Sirius Dream,\i it's now worth the journey north." } } } else { !If all else is okay, then give the player a clue not to wait !on the monster to come kill them, or something. nexthint = false if (hint_num = 0) { "Waiting around for the creature to attack is a bad idea." } } !Hints for the RockSite next -- basically just about getting the shard. } elseif (location = RockSite) { if (shard is moved) { nexthint = false if (hint_num = 0) { "You're done here." } } else { if (hint_num <= 1) { select (hint_num) case 0 { "The shape of the rock isn't important, but examine it. The research Covegn did is important." } case 1 { "Is there a way to take a piece of it with you?" } } else { if (vellum in nothing) and (spike is not moved) { nexthint = false if (hint_num = 2) { "Come back later, when you need a piece and have a way to get it." } } elseif (spike is not moved) { nexthint = false if (hint_num = 2) { "What you need, you don't have. Check again at the crash site. What did you forget to take?" } } else { select (hint_num) case 2 { "Notice the cracks? Maybe a solid blow to the rock would dislodge a piece." } case 3 { "You have to use something solid, though." } case 4 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 5 { "Various methods work. The key is to use the spike. Pry the cracks with the spike, or hit or chisel the rock with it. Now, you'll have a stone shard." nexthint = false } case else { nexthint = false } } } } !Hints for the WestRoom next -- basically just about getting a light. } elseif (location = WestRoom) { if (vellum not in location) { nexthint = false if (hint_num = 0) { "You're done here." } } else { if FindLight(location) { "The vellum is right here. Just pick it up." } else { select hint_num case 0 { "You won't find the sheet of vellum in the dark." } case 1 { "Is it possible to bring light with you? You can't bring the beacon post, but with some effort, something else might serve well enough." } case 2 { "Nothing you can do at the present moment will help." } case 3 { nexthint = false "If you still have need of a hint, return to the wreckage and check your options there." } case else { nexthint = false } } } !Hints for the WestRoom next -- basically just about getting a light. } elseif (location = NorthRoom) { select (hint_num) case 0 { if FindLight(location) { "It's a long way to the distant glow on the horizon. Be sure you're prepared before you set out, and that you didn't forget to do anything before you leave." } else { "It's too far to walk in the darkness. Where is your light?" nexthint = false } } case 1 { if (distress_signal is switchedon) { "You're stepping out into the unknown. Now would be a good time to save your progress. Good luck!" nexthint = false } else { "If there's to be a chance at rescue, you'll have to call for help somehow." } } case 2 { "Can the beacon post -- the light source at the crash site -- be used for any other purpose? Did you examine it?" } case 3 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 4 { "Before you make the long trip north, go back and turn on the distress signal. It's part of the beacon." } case else { nexthint = false } !Hints for the chase sequence. One of our first checks to to confirm !whether or not the creature is here, so we can assume that it's not !here with us in the current chase room, if we get to this point. } elseif (location = Chase_room1, Chase_room2, Chase_room3, \ Chase_room4, Chase_room5, Chase_room6) { if FindLight(location) { select (hint_num) case 0 { "Your best course of action is to keep going, putting distance between yourself and the creature." } case 1 { "Until it catches up, use the borrowed time to get away." } case 2 { "It isn't impossible. If in doubt, get a hint when the creature does catch up." } case else { nexthint = false } } else { select (hint_num) case 0 { "One false step, and the light won't last long enough to make the trip." } case 1 { "You're now in a plot branch where the creature has the advantage." } case 2 { "In the darkness, it has you. The best advice is to be quicker next time. If in doubt, get a hint before your light runs out." } case else { nexthint = false } } !We've made it to the northern wreckage, so here goes those hints. } elseif (location = SiriusDream) { if (parent(terminal) ~= player, location) { nexthint = false if (hint_num = 0) { "The reason you came here was to get within range of the PrimeCom console. Somehow, though, you left the terminal behind. Not good. This won't end favorably." } } elseif (player.misc #2 >= 12) and (not player.misc #3) { select (hint_num) case 0 { "You need to take care of your own wounds now." } case 1 { nexthint = false if (netting_ribbons in player) { "Bandage yourself with netting ribbons." } else { "You left the rest of netting behind? Not good." } } case else { nexthint = false } } elseif (terminal is not switchedon) and (not terminal.misc #4) { select (hint_num) case 0 { "If a PrimeCom console survived, you're probably in range." } case 1 { nexthint = false "Try turning the terminal on." } case else { nexthint = false } } elseif (parent(power_cell) ~= term_slot) { select (hint_num) case 0 { "There are two ways to get power to the terminal." } case 1 { "The solar receptor is one way. It's possible to provide a temporary charge, if you're inclined to figure out how." } case 2 { "But there is a better way." } case 3 { "Now that you know what you're lacking -- the reserve power cell -- maybe it's possible to find something nearby to help." } case 4 { "If you're thinking starship fuel can power the terminal, since a puddle of it is nearby, you're wrong. You do need a power cell." } case 5 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 6 { "Search the debris. Put what you find into the terminal's reserve slot. It should come on now." nexthint = false } case else { nexthint = false } } elseif (terminal is not switchedon) { nexthint = false if (hint_num = 0) { "The terminal should work now. Just turn it on." } } elseif (not vellum.misc #2) { select (hint_num) case 0 { "Just touch the screen to activate the menu. If you haven't already tried, select to scan for distress signals." } case 1 { nexthint = false if (distress_signal is switchedon) { if (huchess is alive) { "It's a good thing you turned on the signal!" } else { "Unfortunately, there is nothing to see. Huchess is already dead, and you're on a plot branch that can't end favorably." } } else { "You forgot to turn on the distress signal, back at the Pod Four crash site. You're on a plot branch that can't end favorably." } } case else { nexthint = false } } elseif (not terminal.misc #5) { if (parent(vellum) ~= player, location) { nexthint = false if (hint_num = 0) { "How did you manage to leave the vellum behind? You came here to decrypt the message, but you don't have the message. This won't end well for you." } } else { select (hint_num) case 0 { "The terminal has an option to decrypt the vellum." } case 1 { "In a moment of lucidity, as seen by the camera, Huchess came through with his decryption code." } case 2 { "Try to decrypt the message -- but don't be surprised if the apparent inactivity prompts the creature to attack. If you're careful, things could go differently this time." nexthint = false } case else { nexthint = false } } } elseif (tooth not in player) or \ ((not vellum.misc #3) and (not terminal.misc #6)) { select (hint_num) case 0 { "You have already established that the terminal won't work right. But, resistive use -- pressure with a stylus -- may work better than capacitive use -- touching with your finger." } case 1 { "The creature lost a fang." } case 2 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 3 { "Pick up the broken tooth and touch the screen with that." } case else { nexthint = false } } elseif (not vellum.misc #3) or (not terminal.misc #6) { nexthint = false if (hint_num = 0) { "What other PrimeCom options might now be accessible?" } } else { !If we get to this point, then *everything* is correct, and all !the player has to do now is check on Huchess. select (hint_num) case 0 { "Have you tried heading back to the Pod Four crash site, now that you've done what you came here for?" } case 1 { "At least it's possible to check it again, via the distress signal's live video." nexthint = false } case else { nexthint = false } } } !Subhints may be set above, so they're not included as an "elseif". !Basically, sometimes the same hint is needed for multiple puzzles. if (subhint = netting_ribbons) { select (hint_num) case 50 { "The answer is all around." } case 51 { "Take some of the crash netting." } case 52 { "Even the smallest piece found is too large to work with." } case 53 { "Something can be done about that, too." } case 54 { "If you looked at the pod wreckage, and if you have considered the shape of the spike, you've found two different ways to do what you need." } case 55 { PrintMessage(9,12,1) !CAUTION - next hint solves it. } case 56 { "Cut (or rip) the netting on the sharp edges (of the wreckage), or by using the "; if (spike is not moved) { "spike after it's removed." } else { "spike." } nexthint = false } case else { nexthint = false } } if (nexthint) { hint_num ++ "(Type \BHINT\b again if you need the next tip)" } else { "(No more hints available at the present time)" hint_num = 100 !So no more will show up. } } !---------------------------------------------------------------------------- !This is basically to check and see if the player can refer to something as !held -- mainly used in "DoPoint" because we need to check the part_of too. ! routine PlayerHas(obj) { if Contains(player,obj) { return true } if Contains(player,obj.part_of) { return true } if Contains(player,obj.found_in) { return true } return false }