#!../bin/jacl
#ifid:JACL-002
#                                                              THE UNHOLY GRAIL 
# -----------------------------------------------------------------------------
# Copyright (C) Stuart Allen 1996-2008. All rights resevered.
#
# Written for the 1997 rec.art.int-fiction Interactive Fiction Competition.
#  
# -----------------------------------------------------------------------------

constant game_title		"The Unholy Grail"
constant game_author	"Stuart Allen"
constant game_release    2
constant game_build      3
constant ifid			"JACL-002"
# -----------------------------------------------------------------------------

# CONSTANTS FOR RESOURCES IN BLORB FILE
constant image_unholygrail 1
# -----------------------------------------------------------------------------


# THESE ARE USER ATTRIBUTES TO REPLACE THE SYSTEM ATTRIBUTES THAT NO
# LONG EXISTS IN JACL 2.1
attribute CUSTOM1 CUSTOM2 CUSTOM3 CUSTOM4 CUSTOM5

location control_centre : control centre
 short		the "control centre"
 has		KNOWN
 south		pool
 out		pool

{eachturn
ifall screen has ON : lisa has CUSTOM4 : lisa(parent) = control_centre
   write "^~What now, Alex?~ Lisa asks, flicking off the main screen "
   write "once again as you enter.^"
   ensure screen hasnt ON
   set SCREEN_FADE = 8
endif
if lisa hasnt CUSTOM4
   write "^Lisa quickly flicks off the main screen of the control panel "
   write "as you enter the room. Shooting up out of her chair, " 
   write "she turns to face you. "
   set lisa(status) = 3
   ensure lisa has CUSTOM4
   set SCREEN_FADE = 8
   set LISAS_SCRIPT = 1 
   write "~You startled me,~ she blurts nervously.^"
endif
}

{movement
if destination = nowhere
   write "The only exit from here is to the south.^"
else
   return false
}
  
{look
if here has VISITED
   write "You are back in the control centre.^"
   return
endif
ifall switch hasnt ON : blinds has CLOSED
   write "With the main light off and the blinds closed, only the dim "
   write "glow of the emergency lighting coupled with the many coloured "
   write "and flashing indicator lights allows you to see. The shadowy "
   write "form of the chair stands before the control panel as always.^"
   return
endall
write "Used more by Lisa than yourself, this is the main control centre "
write "for the research outpost's many instruments and sensors. A "
write "slimline high-backed chair is fixed to the floor in front of a "
write "long control panel. Above the controls stretches a wide "
write "rectangular window covered by a set of "
if blinds has CLOSED
   write "closed blinds. "
else
   write "open blinds providing a spectacular view of the ocean horizon. "
endif
write "A narrow doorway leads south from here; a light switch is attached "
write "to its frame. "
if switch hasnt ON
   write "With the main fluorescent light off, the diffuse sun light "
   write "filters unmasked through the blinds giving the room a warmer feel "
   write "than before."
endif
write ^
}

{first_hint
write "When a phosphorescent screen is turned off, the image on it doesn't "
write "fade instantly.^"
set time = false
}

{second_hint
write "The afterimage doesn't last long, however, and you would only be "
write "able to see it if the room was quite dark.^"
set time = false
}

{third_hint
write "Straight after entering the room:^"
write ">TURN OFF THE MAIN LIGHT^"
write ">CLOSE THE BLINDS^"
write ">EXAMINE THE SCREEN^"
write "...and blob's your uncle! (sorry...)^"
set time = false
}

{sit
proxy "sit in chair"
}

object whale: humpback whale whales
 static
 short		a "whale"
 parent		nowhere

{look_up_in_book
write "whale^"
write "any of various large fishlike marine mammals of the order Cetacea, "
write "which have forelimbs modified as fins, a tail with horizontal flukes, "
write "and nasal openings on top of the head, and which comprise the "
write "suborder Mysticeti, and the suborder Odontoceti.^"
}

object rec_window: wide rectangular window
 short		a "wide rectangular window"

{examine : look_through
if blinds has CLOSED
   write "The window is covered by a set of closed blinds.^"
   return
endall
write "Looking through the open blinds you can see the shallow arc of the "
write "ocean horizon spanning the heads of the lagoon.^"
}

object doorway: doorway door frame
 short		a "doorway frame"

{enter
proxy "s"
}

{look_through
write "You can see out into the docking pool.^"
}

{examine
write "There is a light switch attached to the door frame.^"
}

object blinds: blinds
 has		CLOSABLE DAMAGED PLURAL
 short		some "blinds"

{close
if blinds has CLOSED
   write "The blinds are already closed.^"
   return
endall
write "You reach over the control panel and turn the rod until the blinds "
write "close.^^" 
ensure blinds has CLOSED
look
}

{open
if blinds hasnt CLOSED
   write "The blinds are already open.^"
   return
endall
write "You reach over the control panel and turn the rod until the blinds "
write "open.^^" 
ensure blinds hasnt CLOSED
look
}

{examine
write "Cheap and incredibly "
if blinds has DAMAGED 
   write "dusty"
else
   write "shiny"
endif
write ", the blinds are currently "
if blinds has CLOSED
   write "closed. "
else
   write "open. "
endif
write "A clear plastic rod dangles from one side.^"
}

{clean
if blinds hasnt DAMAGED
   write "They are already quite clean now, thank you.^"
   return
endall
write "That's very thoughtful of you.^"
ensure blinds hasnt DAMAGED
}

object rod: plastic rod
 short		a "plastic rod"

{examine : take
write "The plastic rod is attached to the blinds and can be turned in order "
write "to open and close them.^"
}

{turn
if blinds has CLOSED
   execute "open_blinds"
else
   execute "close_blinds"
}

object light: main fluorescent light
 has		ON 
 short		a "main fluorescent light"

{turn_on 
proxy "turn on switch"
}

{turn_off
proxy "turn off switch"
}

object switch: main fluorescent light switch
 has		ON 
 short		a "light switch"

{examine
write "Simple, yet sturdy, the switch is in the "
if switch has ON
   write "on"
else
   write "off"
endif
write " position.^"
}

{turn_off_override
if switch has ON
   proxy "flick switch"
else
   write "The light main fluorescent light is already off.^" 
endif
}

{turn_on_override
if switch has ON
   write "The light main fluorescent light is already on.^" 
else
   proxy "flick switch"
endif
}

{flick : turn : press : pull : move
if switch has ON
   write "You flick the light switch into the off position causing the " 
   write "main fluorescent light to go out.^^" 
   ensure light hasnt ON
   ensure switch hasnt ON
   look
   return
endall
write "You flick the light switch back into the on position causing the "
write "main fluorescent light to flicker briefly then come on. " 
ensure light has ON
ensure switch has ON
look
}

object chair: red leather chair
 short		a "red leather chair"
 
{sit_on_override
if player has SITTING
   write "You are already sitting down.^"
   return
endall
write "You set over to the chair and sit down in it, swivelling around "
write "to face the control panel.^"
ensure player has SITTING
}

{examine 
write "The chair is made from fine-grade red leather and sits perched "
write "upon a single steel column directly in front of the control panel.^"
}

object c_pass: my civilian identification pass id card
 has		WEARABLE WORN
 long		"Your civilian identification pass is here.^"
 short		your "civilian pass"
 parent		kryten
 mass		2

{examine : read
write "Your name, Dr Alex Meadows, and your authority level are printed "
write "beneath a small photograph of you looking your worst. On the back of "
write "the pass is a bar code strip, an expiry date and your signature.^"
}

{show_to_lisa
if c_pass hasnt CUSTOM4
   write "Lisa laughs at your mocking parody of the military security "
   write "protocols that you find so much humour in following to the "
   write "letter.^" 
   ensure c_pass has CUSTOM4
   return
endall
write "Jokes are never quite as funny second time round.^"
}

{show_to_guard
write "~I'm sorry, Dr Meadows,~ the MP says stepping in front of you, ~only Dr "
write "Zuckerman, or personnel personally signed in by Dr Zuckerman, may pass "
write "this point.~^"
}

object signature: signature
 short		your "signature"
 parent		c_pass

{examine : read
write "A barely discernable squiggle.^"
}

object bar_code: bar code strip
 short		a "bar code"
 parent		c_pass

{examine
write "The thought has often crossed your mind to swipe your card at the "
write "supermarket to find out what you're worth, but so far you've resisted.^"
}

object authority: authority level
 short		your "authority level"
 parent		c_pass

{read : examine
write "Your pass clearly identifies you as a civilian.^"
}

object lisa: lisa
 has		ANIMATE FEMALE POSSESSIVE
 long		function
 short		name "Lisa"
 mass		heavy 
 quantity	20

{long
if lisa(status) = 0 
   write "Lisa is here, sitting in the chair.^"
   return
endif
if lisa(status) = 1
   write "Lisa, bound and gagged, is kneeling on the floor.^"
   return
endif
if lisa(status) = 2
   write "Lisa is standing with her pistol raised towards the middle "
   write "aged man.^"
   return
endif
if lisa(status) = 3
   write "Lisa is here, standing close by.^"
   return
endif
if lisa(status) = 4
   write "Lisa is here poining her pistol at the stranger.^"
   return
endif
}

{ask_about_speaker
write "~It's a speaker. You know, those things that sound comes out of.~^"
}

{ask_about_screen
write "~It's a radar screen. Well, more or less,~ Lisa begins to explain. ~I "
write "don't really understand all the details, but it's some sort of new "
write "ultra-low frequency design for use underwater.~^"
}

{ask_about_red_light
write "~As long as it stays off, it's nothing to worry about,~ Lisa responds "
write "rather evasively.^"
}

{ask_about_dial
write "~It's just a simple volume control,~ Lisa quips.^"
}

{untie
if lisa has CUSTOM3
   write "~Get away from her,~ the stranger "
   if stranger(parent) = hangar_north
      write "warns"
   else 
      write "calls out from across the room"
   endif
   write ". Once again, you decide to obey.^"
   return
endif
return false
}

{apologise
if lisa has CUSTOM3
   write "Lisa seems far from impressed by your attempts at reconciliation.^"
   return
endif
if here = bathroom
   write "~Don't apologise, just get out!~ Lisa exclaims.^"
   return
endif
write "~It's all right, just don't do it again,~ Lisa says with a smile.^"
}

{hug
if lisa has CUSTOM3
   write "Lisa seems far from impressed by your attempts at reconciliation.^"
   return
endif
if kryten has CUSTOM3
   write "All right, once was enough.^"
   return
endif
write "You and Lisa indulge in a friendly hug.^"
ensure kryten has CUSTOM3
}

{examine
if lisa has CUSTOM3
   write "Kneeling on the floor, bound and gagged, Lisa looks quite "
   write "understandably upset.^"
   return
endif
if lisa has CUSTOM2
   write "Barely breaking her gaze to blink, Lisa is standing with her "
   write "pistol pointed at the stranger.^"
   return
endif
write "Tall with straight black shoulder-length hair, Lisa's "
write "immaculately pressed uniform and permanent expression of intense "
write "concentration belie her generally easy going nature. Having worked "
write "together for the last three months, spending much of the time here "
write "in cramped confines, you have come to know and trust each other well. "
execute "+contents<noun1"
write ^
}

{look_up_in_book
write "You find a picture that resembles Lisa, much to your amusement, but no "
write "real reference.^"
}

{ask_about_whale
write "~We get quite a few out this way, Humpbacks mostly.~^"
ensure lisa has DAMAGED 
}

{ask_about_lisa
if lisa hasnt CUSTOM5
   write "~Hi! My name is Lisa. I'm twenty eight years old, five foot "
   write "nine inches tall and weigh fifty nine kilograms. I enjoy eating out, "
   write "watching movies and going to the beach.~^^"
   write "~Thank you, Lisa,~ you reply in the most serious voice "
   write "you can muster, ~and now contestant number two, tell me about "
   write "your favourite farm animal...~^^"
   write "At this point neither of you can refrain from laughing, thus "
   write "ending your gruelling interrogation.^"
   ensure lisa has CUSTOM5
   ensure lisa has DAMAGED
   return
endall
write "Lisa just sighs.^"
ensure lisa has DAMAGED 
}

{ask_about_research : ask_about_panel
if research hasnt CUSTOM4
   write "As you probe Lisa for further information on her work, as you have "
   write "done many times in the past, an almost pained expression comes to "
   write "her face. ~You know just about everything. All I really "
   write "have to do is keep an eye on the radar screen, along "
   write "with a few other bits and pieces, then call through to the main "
   write "base if I see anything...~ pausing as if searching for the "
   write "right word, Lisa looks to her feet, ~...unusual.~^"
   ensure research has CUSTOM4
   ensure lisa has DAMAGED 
   return
endall
write "~Honestly, Alex, I wish you would stop pestering me about it. "
write "Haven't you got some work you should be doing rather "
write "than poking your nose into mine?~ Considering "
write "Lisa's growing agitation you decide to drop the subject.^"
ensure lisa has DAMAGED
}

{ask_about_hangar_obj
write "~I believe the hangar is where Dr Zuckerman performs most of his "
write "research. I'm not sure exactly what it is that he is working on. "
write "You hear stories, of course, mostly speculation though - nothing I'd "
write "give any really credence to.~^"
}

{ask_about_wise
write "~Oh, he's all right,~ Lisa says hesitantly. ~He might seem like a bit "
write "of an ogre, but I'm sure deep down he's not such a bad guy.~^"
}

{ask_about_zuckerman
write "~Dr Zuckerman is a bit of a recluse I'm afraid. Even worse than "
write "you,~ Lisa adds with a slight chuckle. ~I've probably seen no more "
write "of him than you have - two or three times at the most, and never for "
write "long.~^"
}

{kiss
if lisa has CUSTOM3
   write "Lisa hollers a muffled curse.^"
   return
endif 
write "Do you really think that would be appropriate?^"
}

{lick
write "Classy move.^"
}

{shag
write "Hardly appropriate behaviour for a renowned scientist, is it?^"
}

{turn_on
print:
   Something you've never been able to achieve.^
.
}

{ask_about_canister
write "You describe the canister to Lisa who, after a brief lecture as to the "
write "dangers of roaming around the restricted areas of a naval base, claims "
write "to have seen nothing of the sort during her posting here.^"
ensure lisa has DAMAGED
}
  
{ask_about_blue_slide : ask_about_red_slide : ask_about_green_slide
write "~You're the expert, you tell me!~ Lisa exclaims.^"
ensure lisa has DAMAGED 
}

{ask_about_purple_slide : ask_about_cyan_slide : ask_about_white_slide
write "~You're the expert, you tell me!~ Lisa exclaims.^"
ensure lisa has DAMAGED 
}

{ask_about_vial
if vial(parent) = limbo
   return false
endall
if vial has CUSTOM3
   write "~I'll let you know if I have any new thoughts on the matter.~^"
   return
endall
write "After you finish recounting the tale of its discovery, Lisa looks at "
write "you and shrugs, ~I don't have any idea what it could be. It's probably "
write "just some mock-up cargo used as a part of a training exercise. I "
write "really wouldn't be too worried about it,~ Lisa replies.^"
ensure lisa has DAMAGED
ensure vial has CUSTOM3
}

{greet
if lisa has CUSTOM3
   write "Lisa is not exactly in a good position to respond right now.^"
   return
endall
if lisa has ON
   write "~Alex, just give me the gun then get the hell out of here,~ "
   write "Lisa replies.^"
   return
endall
if lisa has BURNING
   write "~I'll talk to you later, Alex. Right now just get the hell out of "
   write "here.~^"
   return
endall
if lisa has CUSTOM2
   write "~Come on, Alex,~ Lisa urges, ~take his gun.~^"
   return
endall
write "~Oh Alex, it's so good to see you again. I've missed you these last "
write "few minutes,~ Lisa says with rather insulting smile.^"
}

{talk_to
if lisa has CUSTOM3
   write "Lisa is not exactly in a good position to respond right now.^"
   return
endall
if lisa has ON
   write "~I'll talk to you later, Alex. Right now just give me the gun "
   write "and get the hell out of here.~^"
   return
endall
if lisa has BURNING
   write "~I'll talk to you later, Alex. Right now just get the hell out of "
   write "here.~^"
   return
endall
if lisa has CUSTOM2
   write "~Come on, Alex,~ Lisa urges, ~take his gun.~^"
   return
endall
ensure lisa has DAMAGED
if lisa hasnt CUSTOM1
   write "You and Lisa get talking about your work here on the island.^^"
   write "~You know, it has always amazed me that you were called in to "
   write "investigate this case in the first place. I presume they were "
   write "having trouble confirming the cause of the problem,~ Lisa "
   write "speculates, ~which I guess is why they called you "
   write "in. I know there was also mounting pressure from the local "
   write "government, not to mention the media, regarding the whole affair, "
   write "so the sooner they had the matter cleared up the better. You "
   write "know, come to think of it, I remember getting the distinct "
   write "impression when I first heard of your involvement that the military "
   write "thought the opinion of a civilian would be more widely accepted "
   write "than the findings of an internal investigation. I suppose they "
   write "just wanted to put an end to any negative public attention to the "
   write "work being done here at the base once and for all.~^"
   ensure lisa has CUSTOM1
   return
endif
write "You chat for a moment about nothing in particular.^"
}

{sniff
write "The familiar scent of Lisa's perfume fills your nostrils.^"
}

{listen_to
write "You hear the faint sound of Lisa breathing.^"
}

{ask_for_m_pass
if lisa has CUSTOM2
   write "~Take her gun, Alex, not her pass!~ the stranger exclaims.^"
   return
endif
write "~I can't give you my pass!~ Lisa exclaims.^"
}

{ask_for_pistol
if lisa has CUSTOM2
   write "Reluctantly you turn to Lisa and hold out your hand.^" 
   write "^~But Alex...~ Lisa whispers softly, an expression of confusion "
   write "coming over her face. Sensing your resolve, she places her pistol "
   write "in your upturned palm.^" 
   write "^~You've done the right thing, Alex,~ the stranger says as he steps "
   write "forward, taking the pistol from your hand then motioning for Lisa "
   write "to kneel down on ground. Producing a roll of thick tape from his "
   write "jacket, he tears off a short section and places it across Lisa's "
   write "mouth. Forcing her hands around behind her back he proceeds to tape "
   write "both wrists and ankles together. " 
   write "~The next question is: what am I going to do with you?~ he muses, "
   write "snapping you out of your horrified trance. ~No matter what "
   write "conclusion you arrive at in your investigation, Dr Meadows, the "
   write "truth will never be known. You are under the employment of the "
   write "military and your work will serve their purposes. Make no "
   write "mistake, they will manufacture that reality. It is what they do.~^" 
   write "^Satisfied that Lisa is now securely bound, he begins to search "
   write "around the room. ~If it's answers you want, Alex, you are going to "
   write "have to trust me. Now help me search this place.~^" 
   write "^~What for?~ you reply, still trying to comprehend what has just "
   write "happened.^"
   write "^~Anything that will shed further light on the exact nature of Dr "
   write "Zuckerman's experiments.~^"
   move pistol to stranger 
   ensure lisa hasnt CUSTOM2
   ensure lisa has CUSTOM3
   ensure stranger has POSSESSIVE
   set STRANGERS_SCRIPT = 1
   set stranger(status) = 1
   set lisa(status) = 1
   return
endif
write "Lisa dismisses your request as a bad joke"
ensure lisa has DAMAGED
if pistol has CUSTOM4
   write ", again.^"
   return
endall
write .^
ensure pistol has CUSTOM4
}

{attack
if lisa has CUSTOM3
   write "You would really attack a bound and gagged woman?^"
   return
endif
write "Assaulting a military officer"
if pistol(parent) = lisa
   write ", particularly one carrying a pistol,"
endif
write " probably isn't such a good career move.^"
}

{shoot_override : shoot_with_gun : attack_with_gun
write "In the heat of the moment you pull the trigger and stand stunned as "
write "Lisa slumps to the ground.^"
write "~You fool,~ the stranger yells as he heads for the rope.^"
write "Almost instantly the access door busts open and the MP runs into the "
write "room. Before you know what is going on, you are on the floor, blood "
write "running from a painless wound. Looking up, you notice the stranger "
write "disappearing through the opening in the roof. It is the last thing you "
write "ever see.^"
execute "+game_over"
}

object research: research project work
 short		a "research project"
 parent		nowhere
 static

object tests: human test subjects tests experiment experiments
 short		a "human tests"
 parent		nowhere
 static

object m_pass: lisas lisa's military identification pass id
 has		WEARABLE WORN
 long		"Lisa's military identification pass is here.^"
 short		a "military identification pass"
 mass		2
 parent		lisa 

{take
if lisa has CUSTOM2
   write "I don't think this is the right time to be playing with Lisa's "
   write "pass.^"
   set time = false
   return
endif
return false
}

{examine
write "Lisa's pass is very similar to your own apart from the personal "
write "details and military authorisation.^" 
}

{show_to_wise : give_to_wise
write "~Where did you get that from?~ Wise asks snatching the pass from your "
write "out-stretched hand.^^"
write "You explain the situation to Wise who leads you back out into the "
write "compound to repeat your story to the MP. "
execute "tell_about_stranger_guard"
}

{show_to_guard : give_to_guard
if lisa has CUSTOM3
   write "You show Lisa's military identification pass to the guard and "
   write "inform him of the situtation inside the hangar. "
   proxy "tell guard about stranger"
   return
endif
return false
}

{show_to_stranger
write "~Keep that hidden. If anyone else sees it they are likely to start "
write "asking questions,~ the stranger warns.^"
}

object pistol: lisas lisa's military gun issue pistol
 short		name "Lisa's pistol"
 long		"Lisa's pistol rests here.^"
 mass		8
 parent		lisa

{take
if pistol(parent) = lisa
   proxy "ask lisa for lisa's pistol"
   return
endif
return false
}

object panel: control panel instrument instruments
 short		a "long control panel"
 
{examine
write "A large circular radar screen dominates the long control panel. To its "
write "left there is a dial while to its right there is a shiny metal grill "
write "covering a small audio speaker. Above the screen there is a red, "
write "dome-shaped light.^"
}

{turn_on
write "The equipment in this room is used almost exclusively by Lisa so you "
write "wouldn't know where to begin to bring it all back up online.^"
}

object speaker: small audio speaker under shiny grill
 short		an "small audio speaker"

{examine
write "The small audio speaker is covered by a shiny metal grill.^"
}

object grill: shiny metal grill
 short		a "shiny metal grill"

{examine
write "The shiny metal grill is covering a small audio speaker.^"
}

object red_light: red dome shaped light dome-shaped
 short		a "red light"

{examine
if red_light hasnt ON
   write "The red, dome-shaped light above the screen is presently out.^"
   return
endall
write "The red, dome-shaped light above the screen is flashing on and off "
write "at a regular rate.^"
}

object screen: radar circular screen
 short		a "circular screen"

{examine
write "Two perpendicular fine white lines form a large cross hair on the "
write "screen. Markings along both the X and Y axes indicate longitude and "
write "latitude to within point zero one of an arc second.^"
if blinds has CLOSED
   if switch hasnt ON
      if WORK_PHASE = 0
         if SCREEN_FADE != 0
            write "^With the current low level of lighting, you can just "
            write "make out the rapidly fading afterimage of an unusually "
            write "large blob at precisely -171deg14'02.30~ longitude and "
            write "-23deg34'86.34~ latitude.^"
            if whale hasnt CUSTOM4
               write "^Watching you intently, Lisa points to the screen. "
               write "~It's a whale, we get a lot of them out here.~^"
               points 10 
               ensure screen has SCORED
               ensure whale has CUSTOM4
            endif
          return
endall
write "^Normally alive with the glow of pale green phosphorescent dots, the "
write "screen now appears blank.^"
}

{turn_on
write "The equipment in this room is used almost exclusively by Lisa so you "
write "wouldn't know where to begin to bring it all back up online.^"
}

object blob: large blob 
 short		a "large blob"
 parent		nowhere

{examine
write "The blob is at -171deg14'02.15~ longitude and -23deg34'86.21~ latitude.^"
}

object dial: dial
 short		a "dial"

{examine
if dial(quantity) = 1
   write "The dial is turned anticlockwise.^"
   return
endall
write "The dial is turned clockwise.^"
}

{turn
if dial(quantity) = 0 
   write "You turn the dial anticlockwise.^"
   set dial(quantity) = 1
   return
endall
write "You turn the dial clockwise.^"
set dial(quantity) = 0
}

location your_quarters : my quarters
 short		name "your quarters"
 has		KNOWN
 north		quarters
 out		quarters

{movement
if destination = nowhere
   write "The only exit from here is to the north, back into the common area.^"
else
   return false
}

{look
if here has VISITED
   write "You are back in your living quarters.^"
   return
endif
write "This small cube of space is your living quarters. A narrow bunk "
write "stretches out beneath a badly scratched window. At the foot of the "
write "bunk rests the only other piece of furniture in the room, a bright "
write "green clothes trunk.^" 
}

object your_bunk: your plain bunk bed
 has		SURFACE
 short		name "your bunk bed"
 quantity	50

{jump_on
write "You have to sleep in there don't forget.^"
set time = false
}

{lie_on : enter
write "As much as you would like to kick back and take it easy, you "
write "really should be getting on with the job.^"
set time = false
}

{look_under
write "You discover a flea circus of unparalleled magnificence.^"
}

{examine
write "Messy and unmade, just the way you like it.^"
}

{clean
write "But you like it messy.^"
}

object circus: flea circus
 short		the "flea circus"

{examine
write "There is a sign at the front gate that reads, ~ADMISSION PRICE: ONE "
write "VIVID IMAGINATION.~^"
}

{enter
write "Okay, you go. I'll wait here until you get back.^"
}

{take
write "I think it's time for a reality check.^"
set time = false
}

object your_window: your my small round window
 short		name "your round window"

{look_through : examine
write "The window appears to be made from some sort of plastic. "
write "Through the window you can see out across the lagoon to the dense, "
write "green jungle beyond.^"
}

{open
write "You have often lamented the fact that the window cannot be opened. "
write "~The ultimate in portable construction technology,~ you recall being " 
write "told by a proud engineer. ~Air lifted in by a single "
write "chopper and erected from pre-fab panels in under four hours.~ His "
write "enthusiasm for this structure clearly shows that he has never actually "
write "spent a single night in one, let alone three months.^"
}   

{return
write "Control yourself, Dr Meadows!^"
}

object trunk: bright green trunk
 has		CONTAINER CLOSED CLOSABLE
 short		a "bright green trunk"
 quantity	15
 
object your_clothes: my clothes
 has		PLURAL
 short		your "clothes"
 parent 	trunk
 mass		heavy
 
{examine
write "Just clothes.^"
}

{take
if tank has WORN
   write "Why? Didn't you know that scuba gear is the latest in fashion "
   write "wear?^"
   return
endif
if kryten has DAMAGED
   write "Don't worry, this is the tropics, your clothes will be dry in no "
   write "time.^"
   return
endif
write "What you are wearing is just fine.^"
}

{look_behind
write "The foot of your bunk is behind the trunk.^"
}

location lisas_quarters: lisas lisa's quarters
 short		name "Lisa's quarters"
 has		KNOWN
 west		quarters
 out		quarters

{look
if here has VISITED
   write "You are in Lisa's living quarters.^"
   return
endif
write "Lisa's living quarters are almost identical to your own. In fact the "
write "only difference, other than the orientation, is a tall wardrobe "
write "standing against the north wall in place of the small clothes trunk "
write "you make do with.^"
}

{smell
write "The room smells vaguely of Lisa's perfume.^"
}

object lisas_bunk: lisas lisa's bunk bed
 has		SURFACE
 short		name "Lisa's bunk bed"
 quantity	50

{lie_on : enter
write "Lisa would be far from impressed to walk in and find you lounging "
write "about in her bunk.^"
set time = false
}

{jump_on
write "The thought of Lisa catching you jumping up and down on her bed "
write "stops you.^"
set time = false
}

{look_under
write "Nothing but dust.^"
}

object lisas_window: lisas lisa's small round window
 short		name "Lisa's round window"

{look_through : examine
write "Through the window you can see out across the lagoon to the hills "
write "that line its east shore.^"
}

{open
write "The window in Lisa's living quarters is no different to the one in "
write "your own.^"
}

{return
write "Control yourself, Dr Meadows!^"
}

object wardrobe: lisas lisa's wardrobe
 has		CLOSABLE CLOSED CONTAINER
 short		name "Lisa's wardrobe"
 quantity	20

{look_behind
write "Just a wall.^"
}

object lisas_clothes: lisas lisa's clothes
 has		PLURAL
 short		name "Lisa's clothes"
 parent wardrobe

{take
write "I don't think Lisa would appreciate you walking off with her clothes.^"
set time = false
}

{examine
write "You don't find anything that suits you.^"
}

location quarters: quarters common area
 short		the "common area"
 has		KNOWN
 west		pool
 north		bathroom
 south		your_quarters
 east		lisas_quarters

{movement
if compass = north 
   if destination = nowhere
      write "That will be a bit hard with the bathroom door closed.^"	
      return
endall
if destination = nowhere
   write "You can only go in one of the four cardinal directions from here.^"
else
   return false
}

{look
if here has VISITED
   write "You have returned to the common area.^"
   return
endif
write "This space is used for both work and recreation. A writing desk "
write "stands in the southwest corner beside a comfortable-looking sofa. In "
write "the east wall, a recess forms a small yet serviceable kitchenette "
write "while to the north "
if bathroom_door has CLOSED
   write "there is a closed door. "
endall
if bathroom_door hasnt CLOSED
   write "there is an open door through which you can enter the bathroom. "
endall
write "A large poster of a blue whale, hanging on the west wall by a "
write "doorway, serves to soften the decidedly military feel of the room. "
write "Doorways to south and east lead into your and Lisa's quarters "
write "respectively.^" 
execute "+spaced_contents<desk"
}

{first_hint
write "The writing desk is where you keep all your work to date.^"
set time = false
}

{second_hint
write "There are important objects both on the desk and in its drawer.^"
set time = false
}

{third_hint
write "After opening the drawer and taking the cassette from it:^"
write "  >INSERT CASSETTE IN RECORDER^"
write "  >PRESS PLAY^"
set time = false
}

object wooden_chair: simple wooden chair
 short		a "simple wooden chair"
 long		function
 mass		25

{long
if wooden_chair hasnt TOUCHED
   write "A simple wooden chair stands before the writing desk.^"
else
   write "A simple wooden chair stands here.^"
}

{sit_on_override
if player has SITTING
   write "You are already sitting down.^"
   return
endall
write "You sit down on the simple wooden chair.^"
ensure player has SITTING
}

{examine
write "Typical of standard military furniture, the wooden chair has "
write "absolutely no aesthetic appeal whatsoever.^"
}

object sofa: comfortable-looking comfortable looking sofa lounge
 short		a "comfortable-looking sofa"

{examine
write "Although well padded, the sofa's drab grey fabric is positively "
write "uninspiring.^"
}

{feel
write "The comfortable-looking sofa could be equally well described as the "
write "comfortable-feeling sofa.^"
}

{sit_on_override
if player has SITTING
   write "You are already sitting down.^"
   return
endall
write "You sit down on the comfortable-looking sofa.^"
ensure player has SITTING
}

object bathroom_door: bathroom door
 has		CLOSABLE LOCKABLE
 short		a "bathroom door"
 
{enter
if here = quarters
   proxy "n"
else
   write "You are already in the bathroom.^"
endif
}

{unlock_override
if here = quarters
   write "You can only unlock the bathroom door from the inside.^"
   set time = false
   return
endall
write "You flip the latch into the unlocked position.^"
ensure bathroom_door hasnt LOCKED
}

{listen_to
if here = quarters
   if bathroom_door has LOCKED
      write "I'm starting to worry about you.^"
      return
endall
write "You don't hear anything out of the ordinary.^"
}

{lock_override
if here = quarters
   write "You can only lock the bathroom door from the inside.^"
   set time = false
   return
endall
write "You flip the latch into the locked position.^"
ensure bathroom_door has LOCKED
}

{close_override
ensure bathroom_door has CLOSED
if here = quarters
   write "You gently pull the door closed.^"
else
   write "You gently push the door closed.^"
endif
set quarters(north) = nowhere
set bathroom(south) = nowhere
}

{open_override
ensure bathroom_door hasnt CLOSED
if here = quarters
   write "You gently push the door open.^"
else
   write "You gently pull the door open.^"
endif
set quarters(north) = bathroom 
set bathroom(south) = quarters
}

{examine
write "The bathroom door is "
if bathroom_door has CLOSED
   write "closed."
endall
if bathroom_door hasnt CLOSED
   write "open."
endall
if here != bathroom
   write ^
   return
endall
write " There is a small latch, "
if bathroom_door has LOCKED
   write "currently in the locked position"
endall
if bathroom_door hasnt LOCKED
   write "currently in the unlocked position"
endall
write ", on the edge of the door.^"
}

{knock_on
if bathroom_door hasnt CLOSED
   write "There really isn't any need, the bathroom door is wide open.^"
   return
endall
if LISAS_SCRIPT > 28
   if LISAS_SCRIPT < 35
      if bathroom_door hasnt CUSTOM1
         write "~Hang on, I won't be a minute,~ Lisa calls from "
         write "within the bathroom.^"
         ensure bathroom_door has CUSTOM1
         return
endall 
if LISAS_SCRIPT > 28
   if LISAS_SCRIPT < 35
      write "~Go away!~"
      return
endall
return false
}

object kitchenette: kitchenette recess kitchen
 short		a "kitchenette"

{enter
write "The kitchenette is nothing more than a slight recess in the wall.^"
}

{examine
write "The kitchenette's facilities are modest, but more than enough to "
write "support your fledgling culinary skills.^"
}

object poster: lisas lisa's blue whale poster
 short		a "whale poster"

{take
write "The poster belongs to Lisa, so it would only be polite to "
write "leave it where it is.^"
}

{examine
write "A bit tattered after the trip out here, the poster was bought by Lisa "
write "shortly before leaving the mainland. Your appreciation of it grows "
write "daily.^"
}

object desk: writing desk
 has		SURFACE
 short		a "writing desk"
 quantity	30
 
{look_under
write "You stumble across that space where your knees go when you sit at it.^"
}

{examine
write "The writing desk is very neat and organised, thanks to Lisa. It has "
write "a single drawer on its left side which is "
if drawer has CLOSED
   write "closed. "
else
   write "open. "
endif
execute "+details<desk"
write ^
}

{look_in
proxy "look in drawer"
}

{open
proxy "open drawer"
}

{close
proxy "close drawer"
}

object drawer: writing desk drawer
 has		CONTAINER CLOSABLE CLOSED
 short		a "desk drawer"
 quantity	12

object report: final report
 short		your "final report"
 long		"Your final report is here.^"
 parent 	drawer
 mass		2

{eat : return
write "I can understand your want to, but don't.^"
}

{read : examine
write "It is your final report, and is essentially a summary of your "
write "notes on the microcassette.^^" 
write "In your conclusion you refer to Rotenone as the "
write "most likely cause of the deaths occurring in the local marine life. "
write "Due to the one-off, accidental nature of the spill, you reluctantly "
write "admit that you can see no reason to suspect any further occurrences "
write "and that operation at the base should proceed as normal.^^" 
write "You have held off from submitting the report due to several unanswered "
write "questions, namely the reason for there being an almost completely "
write "mature fish population in the area. Time, though, is running out. "
write "You will soon have no choice but to submit the report and return to "
write "the mainland without having all the answers.^"
if report has DAMAGED
   write "^Although still readable, you can't help but be a tad concerned "
   write "about how badly the ink has run after getting it wet.^"
}

{submit
if here = office
   proxy "give report to wise"
   return
endif
write "In order to submit the report, you will have to take it and give it "
write "to Colonel Wise.^"
set time = false
}

{insert_on_cos_desk
write "Picking up the report from his desk, Colonel Wise leans back "
execute "+report_submitted"
}

{give_to_wise : show_to_wise
write "Colonel Wise grabs the report from your hand. Leaning forward, he "
write "places it onto his desk "
execute "+report_submitted"
}

{drop_override
write "The report flutters to the ground.^"
move report to here
}

{take_override
write "You reluctantly pick your report up again.^"
move report to player
ensure report has TOUCHED
}

object cassette: microcassette tape cassette
 short		a "microcassette"
 long		"A microcassette lies nearby.^"
 parent 	drawer
 mass		2

{hint
write "To listen to the microcassette, insert it into the tape recorder and "
write "press play.^"
set time = false
}

{play
if cassette(parent) != player
   proxy "take microcassette"
   write ^
endif
if recorder is *present
   proxy "insert microcassette into recorder"
   write ^
   proxy "press play button"
else
   write "You will need the microcassette recorder to play the "
   write "cassette.^"
endif
set time = false
}

{insert_in_recorder
write "You gently insert the cassette into the recorder.^"
move cassette to recorder
}

{take : remove : remove_from_recorder
if recorder has ON
   write "You can not take the cassette out of the recorder while it is "
   write "playing.^"
   set time = false
   return
endif
return false
}

{examine
write "The words ~CASE NOTES~ are written on the tape's label.^"
}

object book: book science encyclopedia
 short		a "science encyclopedia"
 long		"Your science encyclodedia lies nearby.^"
 mass		6
 parent desk

{hint
write "You can look up various things in the encyclopedia by typing ~look up "
write "<topic> in encyclopedia~.^"
set time = false
}

{examine : open : read : look_in
if book has DAMAGED
   write "Much to your distress the book is looking worse for wear after "
   write "being in the water.^"
   return
endall
write "You bought the book during your early days at university and it has "
write "been your favourite ever since. A simple one-volume encyclopedia of "
write "science, it is the ideal reference while in the field, "
write "away from your main library at home.^"
}

object rec_speaker: microcassette cassette tape recorder's recorders speaker
 short		a "microcassette recorder's speaker"
 parent 	recorder

{examine
write "The speaker on the back of the microcassette recorder is small yet "
write "serviceable.^"
}

{listen_to
if recorder has ON
   write "You can hear a faint hiss coming from the microcassette recorder's "
   write "speaker.^"
   return
endif
write "At the moment, the microcassette recorder is silent.^"
}


object recorder: microcassette cassette tape recorder
 short		a "microcassette recorder"
 long		"There is a microcassette recorder here.^"
 parent 	desk
 mass		4

{examine
write "You use the microcassette recorder to take notes whenever you are "
write "working. It has five buttons labelled play, record, fast forward, "
write "rewind and stop. Tapes are manually inserted and removed (you couldn't "
write "afford the deluxe model at the time), while the sound comes out of a "
write "small yet serviceable speaker on its back. "
if cassette(parent) = recorder
   write "There is currently a cassette in the recorder.^"
   return
endall
write "There is currently no cassette in the recorder.^"
}

{listen_to
if recorder has ON
   write "You can hear the faint hum of the microcassette recorder's "
   write "motor.^"
   return
endif
write "At the moment, the microcassette recorder is silent.^"
}

{remove_all_from
if cassette(parent) = recorder
   execute "take_cassette"
   return
endif
return false
}

{play
proxy "press play button"
}

{turn_on : use
write "To use the microcassette recorder, simply press the button that "
write "matches the operation you require.^"
}

{turn_off
proxy "press stop button"
}

object play: play button
 short		a "play button"
 parent recorder

{press : move
if cassette(parent) != recorder
   write "Without a cassette in the recorder, there isn't much point.^"
   set time = false
   return
endall
if recorder has DAMAGED
   write "From the astounding lack of response, I don't think the recorder "
   write "survived being in the water.^"
   return
endall
if recorder has ON
   write "The cassette is already playing.^"
   set time = false
   return
endall
write "As you press the play button the tape begins to turn in the "
write "recorder.^"
ensure recorder has ON
}

object stop: stop button
 short		a "stop button"
 parent 	recorder

{press : move
if cassette(parent) != recorder
   write "Without a cassette in the recorder, there isn't much point.^"
   set time = false
   return
endall
if recorder hasnt ON
   write "The cassette is already stopped.^"
   set time = false
   return
endall
write "You press the stop button, causing the cassette to cease playing.^"
ensure recorder hasnt ON
}

object forward: fast forward button
 short		a "fast forward button"
 parent 	recorder

{press : move
if cassette(parent) != recorder
   write "Without a cassette in the recorder, there isn't much point.^"
   set time = false
   return
endall
if recorder has DAMAGED
   write "From the astounding lack of response, I don't think the recorder "
   write "survived being in the water.^"
   return
endall
if COUNTER_POSITION = 6
   write "The recorder hums indicating that you are already at the very end "
   write "of the tape.^"
   return
endall
set COUNTER_POSITION + 1
if recorder hasnt ON
   write "You press " noun1{the} ", causing the tape to skip forward "
   write "momentarily.^"
   return
endall
write "A high pitched squealing noise comes from the recorder's speaker as "
write "your skip the tape forward.^"
}

object rewind: rewind button
 short		a "rewind button"
 parent 	recorder

{press : move
if cassette(parent) != recorder
   write "Without a cassette in the recorder, there isn't much point.^"
   set time = false
   return
endall
if recorder has DAMAGED
   write "From the astounding lack of response, I don't think the recorder "
   write "survived being in the water.^"
   return
endall
if COUNTER_POSITION = 0
   write "The recorder hums indicating that you are already at the very "
   write "start of the tape.^"
   return
endall
set COUNTER_POSITION - 1
if recorder hasnt ON
   write "You press " noun1{the} ", causing the tape to skip backwards "
   write "momentarily.^"
   return
endall
write "A high pitched squealing noise comes from the recorder's speaker as "
write "your skip the tape backwards.^"
}

object record: record button
 short		a "record button"
 parent 	recorder

{press : move
if cassette(parent) != recorder
   write "Without a cassette in the recorder, there isn't much point.^"
   set time = false
   return
endall
write "The record button's resistance to be pressed reminds you that you "
write "removed the write-protect tab from the cassette.^"
}

location bathroom : bathroom
 short		the "bathroom"
 has		KNOWN
 south		quarters
 out		quarters

{eachturn
if WATER_LEVEL = 5
   write "^Water runs from the overflowing sink down a drain in the "
   write "floor.^"
endif
}

{movement
if compass = south
   if destination = false
      write "That will be a bit hard with the bathroom door closed.^"	
      return
endall
if destination = nowhere
   write "The only exit from here is back south into your quarters.^"
else
   return false
}

{look
if here has VISITED
   write "You are back in the bathroom.^"
   return
endif
write "A plain, stainless steel toilet faces a square shower cubicle in this "
write "small bathroom. In between, a mirrored vanity cabinet hangs on the wall "
write "above a sink. The only exit from here is back south into the common "
write "area.^"
}

object latch: bathroom door latch
 short		a "door latch"

{examine
write "The door latch is "
if bathroom_door has LOCKED
   write "currently in the locked position.^"
   return
endall
write "currently in the unlocked position.^"
}

{lock : close
proxy "lock bathroom door"
}

{unlock : open
proxy "unlock bathroom door"
}

object vanity: vanity cabinet mirror mirrored door
 has		CONTAINER CLOSABLE CLOSED
 short		a "vanity cabinet"
 quantity	20

{examine : look_in
if vanity hasnt CLOSED 
   write "The open vanity cabinet hangs crooked on the wall just above "
   write "the sink"  
   execute "+contents<noun1"
   write ^
   return
endall
write "You look at the vanity cabinet seeing only your own reflection in "
write "the closed mirrored door. You smile, then grimace.^"
}
   
object toothbrush: shaggy toothbrush brush
 short		a "shaggy toothbrush"
 long		"Lurking nearby is a shaggy toothbrush.^"
 mass		3
 parent		vanity

{use
write "You did that when you got up this morning.^"
set time = false
}

{examine
write "Shaggy, but useable.^"
}

object soap: bar of soap
 short		a "bar of soap"
 long		"There is a bar of soap here.^"
 mass		5
 parent 	vanity

{examine
if soap has DAMAGED
   write "Decidedly sloppy after being soaked in water.^"
   return
endall
write "It is a bar of regulation issue soap, guaranteed to remove at least "
write "four layers of skin.^"
}

object q_r_water: small quantity of rain water
 has		LIQUID
 short		a "small quantity of rain water"
 parent		nowhere
 mass		2

{taste
write "The rain water tastes wonderfully clean.^"
}

{drink_override
write "You drink the clear fresh rain water.^"
move q_r_water to limbo
}

{pour_on_contents
write "The dark brown stain doesn't appear to be water soluble.^"
}

{pour_on_label : pour_on_drum
write "If you are trying to soak the label off, don't bother, you really "
write "don't need it.^"
}

{pour_on_sink_override
if fuel(parent) != sink
   if sample(parent) != sink
      if q_s_water(parent) != sink 
	 write "You pour the quantity of rain water into the sink.^"
         set WATER_LEVEL + 1
         move q_r_water to limbo
         move r_water to sink
         return
endall
return false
}

object r_water: sink load of rain water
 has		LIQUID
 short		a "sink load of rain water"
 parent		nowhere

{taste
write "The rain water tastes wonderfully clean.^"
}

{examine
write "Crystal clear.^"
}

{drink_override
if r_water has CUSTOM4
   write "You've had quite enough water for now.^"
   return
endall
write "You drink a small amount of the water -- quite refreshing.^"
ensure r_water has CUSTOM4
}

object sink: sink
 has		CONTAINER
 short		a "sink"
 quantity	20

{fill
proxy "turn on tap"
}

{examine
write "A single tap attached to the sink, gravity fed from a rain water "
write "tank on the roof, is the only source of fresh water in the outpost. "
write "In the bottom of the sink there is a plug hole"
if plug(parent) != hole
   write ". "
endall
if plug(parent) = hole
   write " which has a rubber plug inserted into it. " 
endall
if sink_tap hasnt CLOSED
   write "Water is flowing from the tap into the sink "
endall
if sink_tap hasnt CLOSED
   if plug(parent) != hole 
      write "and down the open plug hole causing it to remain "
endall
if sink_tap hasnt CLOSED
   if plug(parent) = hole
      write "which is " 
endall
if sink_tap has CLOSED
   write "The sink is "
endall
if WATER_LEVEL = 0 
   write "empty of water"
endall
if WATER_LEVEL = 1
   write "a quarter full of rain water"
endall
if WATER_LEVEL = 2
   write "half full of rain water"
endall
if WATER_LEVEL = 3
   write "three quarters full rain water"
endall
if WATER_LEVEL = 4
   write "practically full of rain water"
endall
if WATER_LEVEL = 5
   write "completely full of rain water" 
endall
execute "+sink_contents"
if WATER_LEVEL = 5
   write "With the tap still running, the sink is now overflowing on to "
   write "the floor and down the drain.^"
   return
endall
}

object sink_tap: plain sink tap
 has		CLOSABLE CLOSED
 short		a "tap"

{examine
if sink_tap hasnt CLOSED 
   write "Water flows from the open tap.^"
else
   write "The tap is turned to the closed position.^"
}

{turn
if sink_tap hasnt CLOSED 
   execute "close_sink_tap"
else
   execute "open_sink_tap"
}

{open : turn_on
if sink_tap hasnt CLOSED 
   write "The tap is already open.^"
   return
endall
if sample(parent) = sink
   write "If you were to open the tap, water would flow into the sink mixing "
   write "with the pale yellow liquid.^"
   set time = false
   return
endall
if fuel(parent) = sink
   write "If you were to open the tap water would flow into the sink mixing "
   write "with the clear liquid.^"
   set time = false
   return
endall
write "Water begins to flow from the tap as you open it.^"
ensure sink_tap hasnt CLOSED 
execute "+sink_damage"
}

{close : turn_off
if sink_tap has CLOSED
   write "The tap is already closed.^"
   return
endif
write "You turn the tap, shutting off the water.^"
ensure sink_tap has CLOSED
}

object plug: small rubber plug
 short		a "rubber plug"
 long		"A small rubber plug rests on the ground.^"
 parent 	vanity
 mass		2

{insert_in_hole : insert_in_sink
if WATER_LEVEL = 0
   write "You place the plug into the hole in the sink.^"
else
   write "You reach into the water and replace the plug.^"
endif
move plug to hole
}

{examine
write "The small rubber plug is designed to fit the hole in your bathroom "
write "sink.^"
}

{pull
if plug(parent) = hole
   proxy "take plug"
   return
endall
return false
}

{take
if plug(parent) != hole
   return false
endall
if WATER_LEVEL > 0
   write "You reach into the water and pull out the plug.^"
   move plug to player
   return
endall
write "You reach into the sink and pull out the plug"
move plug to player
if sample(parent) = sink
   write " causing the pale yellow liquid to flow down the plug hole.^"
   move sample to limbo
   return
endall
if fuel(parent) = sink
   write " causing the clear liquid to flow down the plug hole.^"
   move fuel to limbo
   return
endall
write ^
}

{insert_in_drain
write "It'll be you mopping up the mess when half the outpost floods due "
write "to you blocking the drain (a thought that makes you change your "
write "mind).^"
set time = false
}

object hole: sink plug hole pvc piping
 short		a "plug hole"

{examine
if plug(parent) = hole
   write "The sink hole has a rubber plug in it preventing any water from "
   write "escaping"
   return
endall
write "The plug hole is extended by a short piece of PVC piping down through "
write "the floor, emptying into the lagoon.^"
}

object drain: floor drain
 short		a "floor drain"

{examine : look_through : look_in
write "The drain is nothing more than a small hole in the floor through "
write "which you can see down to the surface of the lagoon.^"
}

object toilet: toilet stainless steel
 has		CONTAINER
 short		a "toilet"
 quantity	5

{flush
loop
  if noun3(parent) = toilet
     move noun3 to lagoon_bottom
  endif
endloop
write "You pull a small lever causing the toilet to flush.^"
}

{examine : look_in
write "Stainless steel, and of simple design. "
execute "+details<noun1"
write ^
}

{use
write "You don't need to go right now.^"
}

{enter
write "Were you picked on much at school? Those days are over now, time "
write "to move on.^"
set time = false
}

object lever: small lever
 short		a "small lever"

{examine
write "The small lever can be pulled in order to flush the toilet.^"
}

{pull
proxy "flush toilet"
}

object shower: shower cubicle 
 short		a "shower cubicle"

{clean_with_toothbrush
write "Well, you sure know how to party.^"
}

{examine
write "Serviceable, but nothing to write home about.^"
}

{use : take : enter
write "You took a shower this morning, and strict water rationing allows only "
write "one a day, sorry.^"
}

location storage : storage
 short		the "storage area"
 has		KNOWN
 west		nowhere
 east		pool

{movement
if compass = west
   if destination = nowhere
      proxy "open door"
      write "^"
      set destination = walkway
      return false
   endif
endif
return false
}

{look
if here has VISITED
   write "You are in the storage area again.^"
   return
endif
write "A single incandescent bulb housed in a bare metal cage "
write "lights this stark room. Stacked wooden crates cover about two-thirds "
write "of the floor here, making movement difficult. In addition to the "
write "doorway to the east, there is a plain steel door to the west which is "
write "currently "
if steel_door has CLOSED
   write "closed."
else
   write "open."
endif
write " A short hose for refilling scuba cylinder protrudes through the "
write "north wall.^"
}

object hose: air refill hose
 short		an "air refill hose"

{hint
write "If you empty the scuba cylinder, simply type REFILL TANK while holding "
write "it in the storage area.^"
set time = false
}

{examine
write "The hose comes through the wall from a high-pressure tank outside, "
write "allowing you to refill the scuba cylinder several times without taking it "
write "back to the main base.^"
}

{pull
write "The hose doesn't have any extra slack in it.^"
}

{use
proxy "refill tank"
}

object steel_door: steel door
 has		CLOSABLE CLOSED
 short		a "steel door"
 
{close_override
ensure steel_door has CLOSED
write "With a sharp click the door pulls to.^"
set storage(west) = nowhere
set storage(out) = nowhere
set walkway(east) = nowhere
set walkway(in) = nowhere 
}

{open_override
ensure steel_door hasnt CLOSED
write "Silently the door swings open.^"
set storage(west) = walkway
set storage(out) = walkway
set walkway(east) = storage
set walkway(in) = storage
}

{examine
write "The steel door is indicative of the design philosophy of the "
write "whole outpost: simple, yet functional. "
if steel_door has CLOSED
   write "It is firmly shut.^"
   return
endall
if here = storage
   write "Beyond the open door you can see out along a walkway that leads " 
   write "to the shore.^"
   return
endall
write "Beyond the open door you can see into the storage area of the "
write "research outpost.^"
}

{enter
if here = storage
   proxy "w"
   return
endif
proxy "e"
}

object crates: stack of wooden crate crates supplies
 has		PLURAL
 short		a "wooden crates"

{examine
write "The wooden crates are filled with supplies - enough to sustain you "
write "and Lisa for over a month here at the research outpost without outside "
write "contact.^"
}

{look_behind
write "For a moment, you thought you saw Elvis.^"
}

{climb : stand_on : enter
write "There is no point to climbing all over the wooden crates. I mean "
write "that incandescent bulb isn't going to have a very good resale value if "
write "that's what you're thinking.^"
}

{open
write "There is no need to go unpacking the supplies right now.^"
}

object mask: mask goggles
 plural		scuba gear
 has		WEARABLE
 short		a "scuba mask"
 long		function
 mass		5

{long
if mask hasnt TOUCHED
   write "Perched on one of the stacked wooden crates is a scuba mask.^"
else
   write "There is a scuba mask here.^"
}

{wear
if here has UNDER_WATER
   write "Holding the mask against your face, you tilt your head back then "
   write "exhale gently through your nose, clearing the mask of water.^"
   set player(capacity) + noun1(mass)
   ensure mask has WORN
   return
endall
return false
}

{remove_override
if here has UNDER_WATER
   write "Salt water rushes unpleasantly into your eyes as you remove the "
   write "mask.^"
   ensure mask hasnt WORN
   set player(capacity) - noun1(mass)
   return
endall
return false
}

{examine
write "The mask is made from black silicon with a clear perspex face plate.^"
}

object fins: set of fin fins flippers flipper
 plural		gear scuba
 has		WEARABLE PLURAL
 short		the "scuba fins"
 long		"A set of scuba fins lie nearby.^"
 mass		5

{examine
write "The scuba fins are black with a piece of bright yellow tape wrapped "
write "around the tip of each, one with the word ~BACK~ written on it, the "
write "other with the word ~OFF~.^"
}

object tank: cylinder tank 
 plural		gear scuba
 has		WEARABLE
 short		a "scuba cylinder"
 long		"Standing upright on the ground is a scuba cylinder.^"
 mass		25

{hint
write "You use the scuba cylinder by wearing it. If the cylinder is either empty or "
write "the tap is turned off, you will automatically remove it. Also be aware "
write "that the deeper you are (check your gauge often), the faster you will "
write "use up the air in the tank due to the increased pressure.^"
set time = false
}

{turn_on
proxy "open tap"
}

{turn_off
execute "close tap"
}

{examine
write "The cylinder is made from aluminium that has been painted black. A tap at "
write "the top can be opened and closed to release the air within. Attached "
write "is a regulator and submersible pressure gauge. A simple arrangement "
write "of straps allows you to wear the cylinder on your back.^"
}

{wear : use
if here has UNDER_WATER
   write "Manoeuvring yourself around in the water, you manage to slip the "
   write "scuba cylinder onto your back."
endall
if here has ON_WATER
   write "Manoeuvring yourself around on the water, you manage to slip the "
   write "scuba cylinder on to your back."
endall
if here hasnt UNDER_WATER
   if here hasnt ON_WATER
      write "You heave the scuba cylinder over your shoulder and manage to "
      write "contort yourself enough to slip your other arm through the strap."
endall
write " Once comfortable, you place the regulator in your mouth"
if here has UNDER_WATER
   write ", exhale once sharply to clear out the water,"
endall
if tap hasnt CLOSED
   if TANK_PRESSURE > 0
      write " then begin to breathe normally.^"
      set player(quantity) + noun1(mass)
      ensure tank has WORN
      return
endall
write " only to find that no air comes out as the tap on the tank is still "
write "closed. "
write "Unable to breathe, you remove the scuba cylinder"
if here has WITHOUT_AIR
   write " and continue holding your breath.^"
   return
endall
write .^
}

{remove_override
write "Unfastening the cummerbund, you slip the scuba cylinder off your "
write "shoulder "
ensure tank hasnt WORN
set player(capacity) - noun1(mass)
if here hasnt UNDER_WATER
   write "and begin to breathe fresh air again.^"
   return
endall
write "and begin to hold your breath.^"
}

{fill : fill_with_hose
proxy "refill " noun1{names}
}

object tap: scuba cylinder tank tap
 has		CLOSABLE CLOSED
 short		a "scuba cylinder tap"
 parent		tank 
 
{examine
if tap hasnt CLOSED 
   write "The tap on the scuba cylinder is turned to the open position.^"
else
   write "The tap on the scuba cylinder is turned to the closed position.^"
endif
}

{turn
if tap hasnt CLOSED 
   execute "close_tap"
   return
endall
execute "open_tap"
}

{turn_on
execute "open_tap"
}

{turn_off
execute "close_tap"
}

{open
if tap hasnt CLOSED 
   write "The tap on the scuba cylinder is already open.^"
   return
endall
write "You turn the tap on the scuba cylinder into the open position.^"
ensure tap hasnt CLOSED 
}

{close
if tap has CLOSED
   write "The tap on the scuba cylinder is already closed.^"
   return
endall
write "You turn the tap on the scuba cylinder into the closed position" 
ensure tap has CLOSED
if tank has WORN
   write .
   execute "+tank_empty"
   return
endall
if TANK_PRESSURE > 0
   write ", pressing the purge button on the regulator to release air from "
   write "the low pressure hose.^"
   return
endall
write .^
}

object regulator: regulator
 short		a "regulator"
 parent tank 

{examine
write "Attached by a low pressure hose to the tank, the regulator has a "
write "comfortable moulded mouth piece. A large button on its front allows "
write "you to purge any water from within it.^"
}

object purge: purge button
 short		a "purge button"
 parent tank

{press : move
if tank has WORN
   write "You seal your mouth with your tongue then depress the purge "
   write "button causing a jet of air to be released from the regulator.^"
   return
endall
if here has UNDER_WATER
   write "A large cloud of bubbles rises from the regulator towards the "
   write "surface.^"
   set TANK_PRESSURE - CONSUMPTION_RATE
   if WORK_PHASE > 0
      if WORK_PHASE < 5
         if here = site
            write "^Spotting the cloud of rising bubbles, one of the divers "
            write "signals to his colleagues who all fire their spear guns "
            write "without the slightest hesitation. You have but a moment to "
            write "regret your actions.^"
            execute "+game_over"
            return
          endif
      endif
   endif
   return
endall
if tap has CLOSED : TANK_PRESSURE = 0
   write "Nothing happens.^"
   return
endif 
write "The regulator makes a loud hissing sound as you depress the purge "
write "button.^"
set TANK_PRESSURE - 1 
}

object spg: submersible pressure gauge gauges spg
 short		a "submersible pressure gauge"
 parent 	tank 

{examine : read
write "Attached by a high pressure hose to the tank, the gauge indicates "
write "that the tank contains "
if tap has CLOSED
   write "0"
endall
if tap hasnt CLOSED
   write TANK_PRESSURE
endall
write " bar of air and that you are at a depth of " CURRENT_DEPTH
if CURRENT_DEPTH = 1
   write " metre.^"
   return
endall
write " metres.^"
}

{hint
write "The submersible pressure gauge tells you your current depth in "
write "metres and how much air remains in the tank in bar. It is "
write "important to be aware of both the whole time you are underwater.^"
set time = false
}

object bulb: incandescent light bulb
 has		OUT_OF_REACH
 short		an "incandescent bulb"

{examine
write "A few moments of staring at the bulb leaves you with an annoying "
write "afterimage.^"
}

object cage: metal cage
 has		OUT_OF_REACH
 short		a "metal cage"

location lab : lab laboratory
 short		the "laboratory"
 has		KNOWN
 north		pool
 out		pool

{movement
if destination = nowhere
   write "The only exit from here is back out to the north.^"
else
   return false
}

{look
if here has VISITED
   write "You have returned to the laboratory.^"
   return
endif
write "This laboratory is where you do the majority of your work here on "
write "the island. A long bench through the centre of the room stands covered "
write "with a variety of equipment including a large biological microscope and "
write "a device for creating freeze fracture slides from bacterial samples. "
write "A tall glass-doored refrigerator stands against the far wall.^"
execute "+spaced_contents<bench"
}

{first_hint
write "The laboratory is for analysing any strange, unidentified substances "
write "that you may have come across in your travels. If you have not found "
write "any such substances, there is nothing for you to do here yet (except "
write "take the GPS unit from the bench).^"
set time = false
}

{second_hint
write "The encyclopedia in your room contains many references relevant to "
write "this part of the story. Once you have the vial containing the clear "
write "liquid, you must perform an Ames test on it using a petri dish (namely "
write "the agar within it), the yellow fluid and the syringe. Once done, you "
write "must study the results by making a slide to look at through the "
write "microscope.^" 
set time = false
}

{third_hint
write "Once you have the vial and are in the laboratory:^"
write "  >POUR THE YELLOW FLUID ON THE BROWN AGAR^"
write "  >FILL THE SYRINGE WITH THE CLEAR FLUID^"
write "  >INJECT THE CLEAR FLUID INTO THE BROWN AGAR^"
write "  >OPEN THE COMPARTMENT^"
write "  >INSERT THE FIRST PETRI DISH IN THE COMPARTMENT^"
write "  >CLOSE THE COMPARTMENT^"
write "  >PRESS THE BUTTON^"
write "Insert the slide that is produced into the slot then:^"
write "  >LOOK THROUGH THE MICROSCOPE^"
set time = false
}

object lab_equipment: equipment
 short		the "equipment"

{examine
proxy "examine bench"
}

object bench: long bench table
 has		SURFACE
 short		a "long bench"
 quantity	50

{look_under
write "Beneath the work bench there is about fifteen cubic metres of air.^"
}

{examine
write "The long bench is cluttered, yet oddly organised. "
execute "+contents<noun1"
write ^
}

object gps: gps unit
 short		a "GPS unit"
 long		"There is a GPS unit here.^"
 mass		5
 parent	 	bench
 
{examine : read
write "The GPS unit is a small, sealed plastic device. On its front there "
write "is a back-lit LCD display which "
if here hasnt OUTDOORS
   write "is currently blank due to its inability to communicate with the "
   write "satellites while indoors.^"
   return
endif
if here has UNDER_WATER
   write "is currently blank due to its inability to communicate with the "
   write "satellites while under water.^"
   return
endif   
write "reads -171deg14'02." LONGITUDE "~ longitude and "
write "-23deg34'86." LATITUDE "~ south latitude.^"
}

{hint
write "The GPS unit communicates with a series of orbiting satellite to "
write "calculate your current longitude and latitude. It is of particular "
write "use when swimming in the ocean, though only on the surface.^" 
}

attribute BUBBLES

object syringe: syringe
 short		a "syringe"
 quantity	2
 parent 	bench
 long		"A syringe rests at your feet.^"
 mass		2

{insert_in_fask
execute "liquid?<noun1"
if INDEX = false
   proxy "fill syringe with flask"
   return
endall
proxy "inject flask with syringe"
}

{insert_in_vial : insert_in_membrane
if +liquid?<noun1 = false
   proxy "fill syringe with vial"
   return
endall
proxy "inject vial with syringe"
}

{examine
write "Never having been one for injections, just the sight of the "
write "syringe is enough to make you cringe. "
if +liquid?<noun1 = false
   write "The syringe is empty, its plunger pushed all the way in.^"
   return
endall
write "The syringe appears even more sinister than ever now that it is filled "
write "with " noun3 ". "
if syringe has BUBBLES 
   write "The liquid appears to be filled with many small bubbles.^"
   return
endall
if syringe has CUSTOM4
   write "On closer examination you notice there is a large air pocket "
   write "at the top of the syringe.^"
endall
write ^
}

{flick : knock_on
if +liquid?<noun1 = false
   write "This achieves little.^"
   return
endall
if syringe has BUBBLES
   write "You flick the syringe, causing the small bubbles in the liquid to "
   write "dislodge and rise to the surface.^"
   ensure syringe hasnt BUBBLES
   ensure syringe has CUSTOM4
   return
endall
write "Once was enough.^"
}

{shake
if +liquid?<noun1 = false
   write "This achieves little.^"
   return
endall
if syringe has CUSTOM4
   write "You shake the syringe, causing the small bubbles to form in the "
   write "liquid.^"
   ensure syringe has BUBBLES
   ensure syringe hasnt CUSTOM4
   return
endif
write "This achieves little.^"
}

{open
write "The syringe would no longer be sterile if you were to remove the "
write "plunger from it.^" 
}

{fill_from_vial
if fuel(parent) != vial
   write "The vial is empty.^"
   set time = false
   return
endall
proxy "fill syringe with clear liquid"
}

{fill_with_sample
if +liquid?<noun1 = true
   write "The syringe already contains " CHILD{the} .^
   set time = false
   return
endall
write "You place the tip of the needle into the pale yellow liquid and pull "
write "back on the plunger causing the liquid to be drawn into the syringe.^"
move sample to syringe
ensure sample has OUT_OF_REACH
ensure syringe has BUBBLES
}

{fill_with_fuel
if +liquid?<noun1 = true
   write "The syringe already contains " CHILD{the} .^
   set time = false
   return
endall
if fuel(parent) = vial
   write "Puncturing the rubber membrane with the tip of the needle, you "
   write "pull back on the plunger drawing the clear liquid into the syringe.^"
endif
if fuel(parent) != vial
   write "You draw the clear liquid into the syringe.^"
endif
move fuel to syringe
ensure fuel has OUT_OF_REACH
ensure syringe has BUBBLES
}

{fill_with_r_water : fill_with_q_r_water
write "The syringe would become contaminated if you were to fill it with "
write "the rain water.^"
set time = false
}

{fill_with_s_water : fill_with_q_s_water
write "The syringe would become contaminated if you were to fill it with "
write "the sea water.^"
set time = false
}

{insert_in_vial : insert_in_membrane
proxy "fill syringe using vial"
}

{insert_on_dish_1 : insert_in_dish_1 : insert_on_agar_1 : insert_in_agar_1
proxy "inject first dish with syringe"
}

{insert_on_dish_2 : insert_in_dish_2 : insert_on_agar_2 : insert_on_agar_2
proxy "inject second dish with syringe"
}

object blue_slide: blue slide
 short		a "blue slide"
 long		"The blue slide rests nearby.^"
 mass		2
 parent		nowhere

{look_at_through_magnifying_glass
write "You are going to need a bit more magnification than that.^"
}

{examine
write "The slide, made using the freeze fracture device, contains cells "
write "from an uncontaminated sample of Salmonella bacteria.^"
}

{look_at_through_microscope
write "What a good idea.^"
}

{insert_in_microscope
proxy "insert blue slide into slot"
}

{insert_in_slot
if "+first_child<noun2" = true
   write "There is already another slide in the slot.^"
   set time = false
   return
endall
write "With a sharp click, the slide fits neatly into the slot in the base "
write "of the microscope.^"
move blue_slide to slot
}

object purple_slide: purple slide
 long		"The purple slide rests nearby.^"
 short		a "purple slide"
 mass		2
 parent		nowhere

{look_at_through_magnifying_glass
write "You are going to need a bit more magnification than that.^"
}

{examine
write "The slide, made using the freeze fracture device, contains cells "
write "from an uncontaminated sample of Salmonella bacteria.^"
}

{look_at_through_microscope
write "What a good idea.^"
}

{insert_in_microscope
proxy "insert purple slide into slot"
}

{insert_in_slot
execute "first_child<noun2"
if INDEX = true
   write "There is already another slide in the slot.^"
   set time = false
   return
endall
write "With a sharp click, the slide fits neatly into the slot in the base "
write "of the microscope.^"
move purple_slide to slot
}

object red_slide: red slide
 long		"The red slide rests nearby.^"
 short		a "red slide"
 mass		2
 parent		nowhere

{look_at_through_magnifying_glass
write "You are going to need a bit more magnification than that.^"
}

{examine
write "The slide, made using the freeze fracture device, contains nothing "
write "more than plain agar.^"
} 

{look_at_through_microscope
write "What a good idea.^"
}

{insert_in_microscope
proxy "insert red slide into slot"
}

{insert_in_slot
if "+first_child<noun2" = true
   write "There is already another slide in the slot.^"
   set time = false
   return
endall
write "With a sharp click, the slide fits neatly into the slot in the base "
write "of the microscope.^"
move red_slide to slot
}

object cyan_slide: cyan slide
 long		"The cyan slide rests nearby.^"
 short		a "cyan slide"
 mass		2
 parent		nowhere

{look_at_through_magnifying_glass
write "You are going to need a bit more magnification than that.^"
}

{examine
write "The slide, made using the freeze fracture device, contains nothing "
write "more than plain agar.^"
} 

{look_at_through_microscope
write "What a good idea.^"
}

{insert_in_microscope
proxy "insert cyan slide into slot"
}

{insert_in_slot
if "+first_child<noun2" = true
   write "There is already another slide in the slot.^"
   set time = false
   return
endall
write "With a sharp click, the slide fits neatly into the slot in the base "
write "of the microscope.^"
move cyan_slide to slot
}

object white_slide: white slide
 long		"The white slide rests nearby.^"
 short		a "white slide"
 mass		2
 parent		nowhere

{examine
write "The slide, made using the freeze fracture device, contains a pure "
write "sample of the clear liquid.^"
} 

{look_at_through_microscope
write "What a good idea.^"
}

{insert_in_microscope
proxy "insert white slide into slot"
}

{insert_in_slot
if "+first_child<noun2" = true
   write "There is already another slide in the slot.^"
   set time = false
   return
endall
write "With a sharp click, the slide fits neatly into the slot in the base "
write "of the microscope.^"
move white_slide to slot
}

object green_slide: green slide
 long		"The green slide rests nearby.^"
 short		a "green slide"
 mass		2
 parent		nowhere

{look_at_through_magnifying_glass
write "You are going to need a bit more magnification than that.^"
}

{give_to_zuckerman
if zuckerman hasnt CUSTOM5
   move green_slide to zuckerman
   write "~What's on it?~ Dr Zuckerman asks.^"
   return
endif
if writing_desk has CUSTOM1
   write "Dr Zuckerman glances briefly at the slide then places it on the "
   write "desk.^"
   move green_slide to writing_desk
   return
endif
write "~I would love to see the results of your investigation, Dr Meadows, "
write "but I'm afraid there isn't a microscope anywhere in the building,~ Dr "
write "Zuckerman informs you regretfully as he places the slide on the desk.^"
move gleen_slide to writing_desk
ensure writing_desk has CUSTOM1
set TOPICS_DISCUSSED + 1
}

{show_to_zuckerman
if zuckerman hasnt CUSTOM5
   write "~What is that?~ Dr Zuckerman asks.^"
   return
endif
if writing_desk has CUSTOM1
   write "Dr Zuckerman nods.^"
   return
endif
write "~I would love to see the results of your investigation, Dr Meadows, "
write "but I'm afraid there isn't a microscope anywhere in the building,~ Dr "
write "Zuckerman informs you regretfully.^"
ensure writing_desk has CUSTOM1
set TOPICS_DISCUSSED + 1
}

{show_to_stranger
execute "tell_about_green_slide_stranger"
}

{examine
write "The slide, made using the freeze fracture device, contains cells "
write "from the Salmonella bacteria after being contaminated with the clear "
write "liquid.^"
} 

{look_at_through_microscope
write "What a good idea.^"
}

{insert_in_microscope
proxy "insert green slide into slot"
}

{insert_in_slot
if "+first_child<noun2" = true
   write "There is already another slide in the slot.^"
   set time = false
   return
endall
write "With a sharp click, the slide fits neatly into the slot in the base "
write "of the microscope.^"
move green_slide to slot
}

object fridge: specimen fridge refrigerator
 has		CONTAINER CLOSABLE CLOSED
 short		a "specimen fridge"
 quantity	40

{examine
if fridge hasnt CLOSED
   write "The specimen fridge stands tall against the far wall of the room. "
   write "A set of frosted, double glass doors run its entire length from "
   write "top to bottom. The fridge is currently open"
   execute "+contents<noun1"
   write ^
   return
endall
write "The specimen fridge stands closed against the far wall of the room. "
write "A set of frosted, double glass doors run its entire length from "
write "top to bottom. " 
}

{look_behind
write "The specimen fridge is right up against the south wall.^"
}

{move
write "The specimen fridge is far too heavy to move.^"
}

object petri_dish: petri dish plate
 short		a "petri dish"
 parent		nowhere

{look_up_in_book
write "petri dish^"
write "a shallow circular dish, usually made from glass, used for growing "
write "bacterial cultures and performing Ames tests etc. [named after German "
write "biologist J. R. Petri, died 1921].^"
}

object dish_1: first petri dish plate
 has		CONTAINER
 plural		"dishes"
 short		the "first petri dish"
 mass		2 
 long		"The first petri dish is here.^"
 parent 	fridge
 capacity	0

{open
set time = false
write "The petri dish is a small circular plate which has no lid.^"
}

{examine
write "The dish is circular and made from Pyrex."
if agar_1(parent) = dish_1
   write " It contains a solid gel of brown agar."
endall
write ^
}

{look_up_in_book
execute "look_up_in_book_petri_dish"
}

object agar: solid gel quantity of agar agar-agar
 short		a "quantity of agar"
 parent		nowhere

{look_up_in_book
write "agar (agar-agar)^"
write "a gelatine-like product of certain seaweeds used to solidify culture "
write "medium.^"
}
	
object agar_1: solid gel quantity of brown agar agar-agar
 short		a "quantity of brown agar"
 parent dish_1

{examine
write "The agar has been poured into the petri dish and set into a solid "
write "surface on which to grow bacterial cultures. "
if agar_1 has CUSTOM2;		HAS BEEN INJECTED WITH THE CLEAR FLUID 
   if agar_1 hasnt CUSTOM1;	BUT NOT COATED WITH BACTERIA
      write "The agar's upper surface has been coated with the clear "
      write "liquid.^"
endall
if agar_1 has CUSTOM1;		HAS BEEN COATED WITH BACTERIA	
   if agar_1 hasnt CUSTOM2;	BUT NOT INJECTED WITH CLEAR FLUID
      write "The bacteria you added to the agar is slowly dying due to "
      write "its dependence on exogenous histidine in its current form. "
endall
if agar_1 has CUSTOM1;		HAS BEEN COATED WITH BACTERIA
   if agar_1 has CUSTOM2;		AND HAS BEEN INJECTED WITH CLEAR FLUID
      write "The bacteria you added to the agar is slowly dying, indicating "
      write "that the clear liquid is not mutating it into a "
      write "non-histidine-requiring state. This tells you that it is highly "
      write "unlikely that the clear liquid would act as a carcinogen in more "
      write "complex animals such as the fish surrounding the island.^"
endall
write ^
}

{look_up_in_book
execute "look_up_in_book_agar"
}

object dish_2: second petri dish  plate
 has		CONTAINER
 plural		"dishes"
 short		the "second petri dish"
 mass		2 
 capacity	0
 long		"The second petri dish is here.^"
 parent 	fridge

{open
set time = false
write "The petri dish is a small circular plate which has no lid.^"
}

{examine
write "The dish is circular and made from Pyrex."
if agar_2(parent) = dish_2
   write " It contains a solid gel of beige agar."
endall
write ^
}

{look_up_in_book
execute "look_up_in_book_petri_dish"
}

object agar_2: solid gel quantity of beige agar agar-agar
 short		a "quantity of beige agar"
 parent 	dish_2

{examine
write "The agar has been poured into the petri dish and set into a solid "
write "surface on which to grow bacterial cultures. "
if agar_2 has CUSTOM2;		HAS BEEN INJECTED WITH THE CLEAR FLUID 
   if agar_2 hasnt CUSTOM1;	BUT NOT COATED WITH BACTERIA
      write "The agar's upper surface has been coated with the clear "
      write "liquid.^"
      return
endall
if agar_2 has CUSTOM1;		HAS BEEN COATED WITH BACTERIA	
   if agar_2 hasnt CUSTOM2;	BUT NOT INJECTED WITH CLEAR FLUID
      write "The bacteria you added to the agar is slowly dying due to "
      write "its dependence on exogenous histidine in its current form. "
      return
   endif
   if agar_2 has CUSTOM2;	AND HAS BEEN INJECTED WITH CLEAR FLUID
      write "The bacteria you added to the agar is slowly dying, indicating "
      write "that the clear liquid is not mutating it into a "
      write "non-histidine-requiring state. This tells you that it is highly "
      write "unlikely that the clear liquid would act as a carcinogen in more "
      write "complex animals such as the fish surrounding the island.^"
      return
endall
}

{look_up_in_book
write "agar (agar-agar)^"
write "a gelatine-like product of certain seaweeds used to solidify culture "
write "medium.^"
}

object flask_label: concial flask label 
 short		a "flask label"
 mass		scenery
 parent		flask

{examine : read
write "The label is a small white sticker with ~Salmonella Bacteria~ hand written in "
write "pen on it.^"
}

{remove
write "It is too well stuck on.^";
}

object flask: conical flask
 has		CONTAINER
 short		a "conical flask"
 long		"A conical flask stands on the ground.^"
 mass		4
 quantity	5	
 parent 	fridge

{fill_with_stream
write "No.^"
}

{fill_with_sink_tap
if +liquid?<noun1 = true
   write "The conical flask already contains " CHILD{the} .^
   set time = false
   return
endall
if tap hasnt CLOSED
   write "You hold the conical flask under the tap until it is full.^"
   move q_r_water to flask
   return
endall
write "You hold the conical flask under the tap, which you turn on until "
write "the flask is full.^"
move q_r_water to flask
}

{fill_with_r_water
if +liquid?<noun1 = true
   if CHILD = q_r_water
      write "The conical flask is already full of rain water.^"
      set time = false
      return
   endif
endif
if CHILD != 0
   return false
endall
write "You scoop some of the rain water out of the sink with the conical "
write "flask.^"
move q_r_water to flask
}

{fill_with_s_water
if +liquid?<noun1 = true
   return false
endall
write "You scoop some of the sea water up in the conical flask.^"
move q_s_water to flask
}

{examine
write "Made from tempered Pyrex, the conical flask is large enough to hold "
write "about 250ml. "
execute "+contents<noun1"
write ^
}

{tip_up
proxy "pour yellow fluid"
}

object fracture: freeze fracture
 short		a "freeze fracture"
 parent		nowhere

{look_up_in_book
write "freeze fracture^"
write "a process of solidifying a gelatinous sample through the use "
write "liquid nitrogen. The sample is then broken, fracturing through the "
write "weaker cell wall to produce a cross section for examination under "
write "high magnification.^" 
}

object ames: ames test
 short		name "Ames test"
 parent		nowhere

{look_up_in_book
write "Ames test^"
write "a test to determine the mutagenetic potential of a chemical compound. "
write "Nutrient broth is inoculated with the appropriate Salmonella strain "
write "and incubated overnight. The culture is then added to an agar plate "
write "along with the chemical to be tested in order to assess mutagenicity.^"
write "When the culture is exposed to a mutagen, some of the bacteria undergo "
write "genetic changes due to chemical interactions resulting in reversion of "
write "bacteria to a non-histidine-requiring state. The reverted bacteria "
write "will then grow in the absence of exogenous histidine thus providing "
write "an indication of the potential of the suspect chemical to cause "
write "mutation.^"
write "There is a good correlation between mutagenicity in Salmonella and "
write "carcinogenicity in more complex organisms.^"
}

object mutagen: mutagen mutagenic mutagenicity
 short		name "mutagen"
 parent		nowhere

{look_up_in_book
write "mutagen^"
write "any substance which causes a change in a gene or chromosome (see "
write "Ames test).^"
}

object carcinogen: carcinogen carcinogenic carcinogenicity
 short		name "carcinogen"
 parent		nowhere

{look_up_in_book
write "carcinogen^"
write "any substance which tends to produce cancer in an organism.^"
}

object histidine: histidine histamine
 short		name "histidine"
 parent		nowhere

{look_up_in_book
write "histidine^"
write "[C3 H2 N2 CH2 CH(NH3+)COO-] occurring in proteins and converted into "
write "histamine (an essential amino acid in man), in most cells.^"
}

object senescence: senescence senescent
 short		name "senescence"
 parent		nowhere

{look_up_in_book
write "senescence^"
write "the process or condition of growing old or ageing. Biol. loss of the "
write "power of cell division and growth.^"
}

attribute SAMPLE_ADDED

object sample: pale yellow liquid salmonella bacterial sample
 has		LIQUID
 short		a "quantity of pale yellow liquid"
 mass		2
 parent 	flask

{sniff
write "The pale yellow liquid smells sweet.^"
}

{examine
write "The liquid is a pale yellow colour and contains a nutrient broth "
write "inoculated with Salmonella, a Histidine requiring strain of bacteria. "
write "It is used when performing an Ames test on a suspect compound in order "
write "to test its mutagenic potential. " 
if sample(parent) = syringe
   if syringe has BUBBLES
      write " The liquid appears to filled with many small bubbles."
   endif
endif
write ^
}

{inject_in_dish_2_override
proxy "inject yellow fluid in beige agar"
}

{inject_in_agar_2_override
write "You inject a small amount of the pale yellow liquid into the beige "
write "agar.^"
ensure dish_2 has SAMPLE_ADDED
}

{inject_in_dish_1_override
proxy "inject yellow fluid in brown agar"
}

{inject_in_agar_1_override
write "You inject a small amount of the pale yellow liquid into the brown "
write "agar.^"
ensure dish_1 has SAMPLE_ADDED
}

{pour_on_dish_2_override
proxy "pour yellow fluid on beige agar"
}

{pour_on_agar_2_override
write "You pour a small amount of the pale yellow liquid on to the beige "
write "agar.^"
ensure dish_2 has SAMPLE_ADDED
}

{pour_on_dish_1_override
proxy "pour yellow fluid on brown agar"
}

{pour_on_agar_1_override 
write "You pour a small amount of the pale yellow liquid on to the brown "
write "agar.^"
ensure dish_1 has SAMPLE_ADDED
}

{inject_in_lisa_override
write "If you aren't willing to inject the pale yellow liquid into yourself, "
write "then you obviously don't want to know what will happen badly enough.^"
}

{inject_in_player_override
write "You roll up your sleeve and inject the pale yellow liquid into a "
write "vein in your arm. Withdrawing the needle, then applying a firm "
write "pressure on the puncture, you begin to feel slightly dizzy. "
write "You arch over, standing with you hands on your knees, fighting "
write "the increasing feeling of nausea. Closing your eyes, you attempt "
write "to regain control of your heart rate"
endall
if syringe hasnt CUSTOM4
   if syringe hasnt BUBBLES
      write ", actively calming yourself until you begin to feel more "
      write "composed. Relieved, you stand up straight again, wipe an "
      write "abundance of sweat from your brow then take several deep "
      write "breaths, reassuring yourself that you are indeed still alive.^"
      move sample to limbo
      return
endall
write " only to find your dizziness increase and stabbing pains cause your "
write "body to convulse. Dropping to your knees you begin to have trouble "
write "breathing and soon lose consciousness...^"
execute "+game_over"
}

{taste
write "You take a small sip of the pale yellow liquid which is slightly "
write "sweet.^"
}

{drink_override
set sample(parent) = limbo
write "You drink the yellow liquid which is slightly sweet.^"
ensure sample has CUSTOM4
}

object microscope: zeiss phase contrast microscope scope
 short		a "phase-contrast microscope"
 
{hint
write "Once you have made a slide using the freeze fracture device, you "
write "can INSERT IT IN THE MICROSCOPE then LOOK THROUGH THE "
write "MICROSCOPE.^"
set time = false
}

{examine
write "Made by Carl Zeiss, the phase-contrast microscope is of a binocular "
write "design and is worth a small fortune. A slot in the base of the unit is "
write "designed to receive slides created using the freeze fracture device.^"
}

{look_through : look_in : use
if "+first_child<slot" = false
   write "With no slide in the microscope, you see nothing of interest.^"
   return
endif
write "You look into the microscope's eye pieces, slightly adjusting the "
write "focusing control until the image becomes crisp.^^"
if blue_slide(parent) = slot
   write "The fragmented cell wall and internal structure indicate that "
   write "the Salmonella bacteria has died from a histidine deficiency. This "
   write "result is exactly as would be expected since this strain of "
   write "Salmonella is chosen specifically for Ames testing due to its "
   write "dependence on histidine for survival.^"
   return
endif
if purple_slide(parent) = slot
   write "The fragmented cell wall and internal structure indicate that "
   write "the Salmonella bacteria has died from a histidine deficiency. This "
   write "result is exactly as would be expected since this strain of "
   write "Salmonella is chosen specifically for Ames testing due to its "
   write "dependence on histidine for survival.^"
   return
endif
if red_slide(parent) = slot
   write "The slide is mostly blank, devoid of any bacterial sample.^"
   return
endif
if cyan_slide(parent) = slot
   write "The slide is mostly blank, devoid of any bacterial sample.^"
   return
endif
if white_slide(parent) = slot
   write "The slide is mostly blank, devoid of any bacterial sample.^"
   return
endif
if green_slide(parent) = slot
   write "The fragmented cell wall and internal structure indicate that "
   write "the Salmonella bacteria has died from a histidine deficiency. "
   write "From this you conclude that the clear liquid does not act as a "
   write "mutagen and is therefore unlikely to be the cause of the deaths "
   write "observed in the local marine life. Some of the cells, however, "
   write "appear larger with thicker cell walls indicating the onset of "
   write "senescence. This is an odd phenomenon due to the short period "
   write "of incubation and the rate at which death due to the absence of "
   write "histidine would occur. In other words, the cells should have "
   write "died long before they grew to appear this old.^" 
   if fuel hasnt SCORED
      points 10
      ensure fuel has SCORED
}

object slot: zeiss phase contrast microscope slot scope
 short		a "microscope slot"
 parent 	microscope

{examine
if "+first_child<noun1" = false
   write "The slot in the base of the microscope is empty.^"
   return
endif
write "The slot in the base of the microscope contains " CHILD{the} .^
}

object device: freeze fracture device machine
 short		a "freeze fracture device"

{hint
write "Once you have put a substance in one of the petri dishes for testing, "
write "open the compartment on the freeze fracture device and put the dish "
write "in it. Once this is done, close the compartment and press the square "
write "button. A slide will then pop out on to the desk which can be viewed "
write "using the microscope.^"
set time = false
}

{examine
write "A very impressive looking piece of hardware, the device was supplied "
write "to you upon your request at great expense to the military. On the top " 
write "surface of the device there is a square button which, when pressed, "
write "causes a freeze fracture slide to be produced from any sample placed "
write "within the small circular compartment next to it. "
set noun1 = compartment
execute "+details<noun1"
write ^
}

{look_up_in_book
execute "look_up_in_book_fracture"
}

object button: square button
 short		a "square button"
 
{press : move
if compartment hasnt CLOSED
   write "Three high pitched beeps, reminding you that the compartment is "
   write "still open, are your only reward.^"
   return
endif
if "+first_child<compartment" = false
   write "A petri dish must be in the compartment in order to make a slide.^"
   return
endif
write "A gentle hissing noise is followed by an electric whirr, a rather "
write "alarming chunking sound, then a triumphant beep. Moments later a "
if CHILD has FUEL_ADDED
   if CHILD has SAMPLE_ADDED
      write "green slide"; Salmonella and clear liquid.
      move CHILD to limbo
      move green_slide to bench
   else
      write "white slide"; Only clear liquid.
      move CHILD to limbo
      move white_slide to bench
   endif
else ; hasnt FUEL_ADDED
   if CHILD has SAMPLE_ADDED
      if purple_slide(parent) != limbo
         write "blue slide"; Salmonella only.
         move CHILD to limbo
         move blue_slide to bench
      else
         write "purple slide"; Salmonella only.
         move CHILD to limbo
         move purple_slide to bench
      endif
   else ; hasn't FUEL_ADDED or SAMPLE_ADDED
      if cyan_slide(parent) != limbo
         write "red slide"; Nothing at all.
         move CHILD to limbo
         move red_slide to bench
      else
         write "cyan slide"; Nothing at all.
         move CHILD to limbo
         move cyan_slide to bench
      endif
   endif
endif
write " pops out on to the work bench from an opening on the side of the "
write "device.^"
}

object compartment: compartment drawer
 has		CLOSABLE CLOSED CONTAINER
 short		a "compartment"
 parent		device
 quantity	6

{examine
write "The compartment is circular in shape, designed to receive a petri "
write "dish whose contents are to be made into a slide for the microscope. "
execute "+details<noun1"
write ^
}

location pool : pool
 short		the "pool"
 has		KNOWN
 east		quarters
 north		control_centre
 south		lab
 west		storage
 down		surface

{movement
if compass = down
   write "You carefully descend the ladder into the water.^^"
   return false
else
   if destination = false
      write "You can either go in one of the four cardinal directions or "
      write "down, into the pool.^"
   else
      return false
   endif
endif
}

{look
if here has VISITED
   write "You are now back at the docking pool.^"
   return
endif
write "In the centre of the floor here there is a large circular opening. "
write "The surface of the lagoon sloshes gently against the internal walls of "
write "the opening less than a metre beneath your feet. A stainless steel "
write "ladder runs down, disappearing beneath the surface of the water while "
write "doorways allow passage in the four cardinal directions.^"
}

object dock: docking pool
 short		a "docking pool"

{examine
write "The docking pool is nothing more than a large circular opening in "
write "the floor. The surface of the lagoon can be seen through it about a "
write "metre below your feet.^"
}

{enter
proxy "d"
}

object ladder: steel ladder
 short		a "steel ladder"

{climb_down
if here = pool
   proxy "down"
   return
endall
if here = surface
   proxy "down"
   return
endall
if here = beneath_outpost
   write "The ladder only leads up from here.^"
   set time = false
}

{climb_up
if here = pool
   write "You are already at the top of the ladder.^"
   set time = false
   return
endall
if here = surface
   proxy "up"
   return
endall
if here = beneath_outpost
   proxy "up"
}

{climb
if here = pool
   proxy "down"
   return
endall 
if here = surface
   proxy "up"
   return
endall
if here = beneath_outpost 
   proxy "up"
}

{examine
write "The stainless steel ladder leads "
if here = pool
   write "down into the water.^"
   return
endif
if here = surface
   write "both back up into the outpost and further down under the water.^"
   return
endif
if here = beneath_outpost
   write "back up into the outpost.^"
   return
endif
}

object opening: large circular opening
 short		a "large circular opening"

{examine
execute "examine_dock"
}

{enter
proxy "go down"
}

location surface : surface
 short		the "surface"
 has		ON_WATER KNOWN
 short		the "lagoon surface"
 down		beneath_outpost
 up		pool

{movement
if tank has WORN
   if compass = up
      write "With great effort you heave yourself up the ladder.^^"
      return false
endall
if destination = nowhere
   write "Up and down are your only options from here.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You are, once again, floating on the surface of docking pool.^"
   return
endif
write "You are bobbing on the surface of the lagoon, surrounded by a "
write "circular wall. A stainless steel ladder runs up from here into the "
write "research outpost.^"
}

{look_down
write "The ladder descends further down, into the water.^"
}

location beneath_outpost : beneath outpost
 short		name "beneath the outpost"
 has		UNDER_WATER WITHOUT_AIR OUTDOORS KNOWN
 up		surface
 north		lagoon_bottom

{movement
if compass = down
   write "The lagoon is not that deep at this point.^"
   return
endif
if destination = false
   write "The lagoon opens up to the north towards the open ocean.^"
   return
else
   return false
}

{look
if here has VISITED
   write "You are floating in the water beneath the outpost.^"
   return
endif
write "You are floating in the warm waters of the lagoon. The white sandy "
write "floor "
if mask hasnt WORN
   write "can barely be made out below, dimmed by the shadow of the research "
   write "outpost floating above. The blurry form of the ladder can be seen "
   write "within reach, guiding you back up out of the water.^"
   return
endall
write "can be seen below, dimmed by the shadow of the research outpost "
write "floating above. There is a stainless steel ladder within reach that "
write "leads up, out of the water.^"
} 

{first_hint
write "You can only hold your breath for a few turns so you will need to "
write "use the scuba gear if you want to swim very deep.^"
set time = false
}

{third_hint
write "Once you are carrying at the SCUBA gear:^"
write "  >OPEN THE TAP^" 
write "  >WEAR THE TANK^" 
write "  >WEAR THE MASK^" 
write "  >WEAR THE FINS^"
set time = false
}

object s_water: surrounding sea water
 has 		LIQUID
 short		the "surrounding sea water"

{taste
write "Salty, as you would expect.^"
}

{drink_override
write "Given the fact that the water surrounding the island is almost "
write "certainly contaminated, that probably isn't such a good idea.^"
set time = false
}

object q_s_water: quantity of sea water
 has		LIQUID
 short		a "quantity of sea water"
 parent		nowhere
 mass		2

{taste
write "Salty, as you would expect.^"
}

{drink_override
write "Given the fact that the water surrounding the island is almost "
write "certainly contaminated, that probably isn't such a good idea.^"
set time = false
}

{pour_on_contents
write "The dark brown stain doesn't appear to be water soluble.^"
}

{pour_on_label : pour_on_drum
write "If you are trying to soak the label off, don't bother, you really "
write "don't need it.^"
}

location lagoon_bottom : lagoon bottom
 short		the "lagoon bottom" 		
 has		UNDER_WATER WITHOUT_AIR OUTDOORS KNOWN
 up			lagoon_surface
 north		mid_water
 south		beneath_outpost

{movement
if compass = east 
   if compass = west
      write "The base of the east head prevents your progress.^"
      return
endall
if compass = down
   write "You are already on the bottom of the lagoon.^"
   return
endif
return false
}

{look
if here has VISITED
   write "Once again, you are floating beneath the surface of the lagoon.^"
   return
endif
if mask hasnt WORN
   write "The shadowy image of the ground seems darker here, gently rising "
   write "to the south. To the north the ground appears to drop off, "
   write "eventually disappearing from sight all together.^"
   return
endall
write "The floor of the lagoon is rockier here, gently rising to the south. "
write "To the north a sharp drop-off marks the threshold to the deeper seas "
write "of the open ocean.^"
}

location lagoon_surface : lagoon surface
 short		the "lagoon surface"
 has		ON_WATER OUTDOORS KNOWN
 down		lagoon_bottom
 north		ocean_surface
 west		beach
 southwest	beach

{eachturn
move lagoon_obj to here
move outpost_obj to here
ensure outpost_obj hasnt OUT_OF_REACH
}

{movement
if compass = south
   write "There is no way to enter the outpost from here.^"
   return
endif
if compass = up
   write "Kicking as hard as you can, you can't manage to muster the "
   write "strength required to achieve escape velocity and leave the water.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You are back, floating on the surface of the lagoon.^"
   return
endif
write "The red tropical sun warms your face pleasingly as you float on the "
write "surface of the lagoon. A small sandy beach stretches southward of the "
write "west head while the research outpost can be seen floating to the "
write "south.^"
}

location ocean_surface : ocean surface
 short		the "ocean surface"
 has		ON_WATER CUSTOM5 OUTDOORS KNOWN
 down		mid_water	
 north		ocean_surface
 south		ocean_surface
 east		ocean_surface
 west		ocean_surface
 northeast	ocean_surface
 northwest	ocean_surface
 southeast	ocean_surface
 southwest	ocean_surface

{movement
if compass = in : compass = out
   write "You can't go that way.^"
   return
endif
if compass = up
   write "Kicking as hard as you can, you can't manage to muster the "
   write "strength required to achieve escape velocity and leave the water.^"
   return
endif
if compass = south : compass = southeast : compass = southwest
   if destination = nowhere
      write "The rock wall is quite impenetrable.^"
      return
   endif
endif
if destination = nowhere
   write "Straying that far from the lagoon is not advisable.^"
   return
endif
return false
}

{look
write "You are floating on the surface of the ocean. "
if LATITUDE < 30
   write "There is nothing but water from horizon to horizon in every " 
   write "direction.^"
   return
endall
if LATITUDE < 35 
   write "The island can be made out some distance to the south.^"
   return
endall
if LATITUDE < 40
   write "The island can be made out not far to the south.^"
   return
endall
if LONGITUDE = 36
   write "To the south, in between the heads, you can enter the lagoon.^"
   return
endall
write "The tall rocky cliffs of the north side of the island block your "
write "way to the south.^"
}

{first_hint
write "Unless you know exactly where you are going, you are unlikely to "
write "find anything of interest.^"
set time = false
}

{second_hint
write "Once you know where you are going, you will need to use the GPS unit "
write "to navigate your way there.^"
set time = false
}

{third_hint
execute "+navigation"
set time = false
}

location ocean_bottom : ocean bottom
 short		the "ocean bottom"
 has		UNDER_WATER WITHOUT_AIR CUSTOM5 OUTDOORS KNOWN
 up			mid_water
 north		ocean_bottom
 south		ocean_bottom
 east		ocean_bottom
 west		ocean_bottom
 northeast	ocean_bottom
 northwest	ocean_bottom
 southeast	ocean_bottom
 southwest	ocean_bottom

{movement
if compass = in : compass = out
   write "You can't go that way.^"
   return
endif
if compass = down
   write "You are already on the bottom.^"
   return
endif
if compass = south : compass = southeast : compass = southwest
   if destination = nowhere
      write "The rock wall is quite impenetrable.^"
      return
   endif
endif
if destination = nowhere
   write "Straying that far from the lagoon is not advisable.^"
   return
endif
return false
}

{look
write "Hovering just above the ocean floor, you can see no sign of the "
write "surface above you. The fine silt and sand is marked only occasionally "
write "by an indiscriminate rock or scattered debris. "
if LATITUDE = 40
   write "An almost shear wall of rock bars your progress south.^"
   return
endall
write "There is nothing but water to the limit of visibility in every "
write "direction.^"
}

{look_up
write "Filtered through the mass of water above your head, the sunlight "
write "here is noticeably subdued.^"
}

{first_hint
write "Unless you know exactly where you are going, you are unlikely to find "
write "anything of interest. It may also be helpful to note that the deeper "
write "you are when you go scuba diving, the more quickly you use your air.^"
set time = false
}

{second_hint
write "Once you know where you are going you will need to use the GPS to "
write "navigate your way there.^"
set time = false
}

{third_hint
execute "+navigation"
set time = false
}

object debris: rock debris
 short		the "debris"

location mid_water : mid water
 short		name "mid water"
 has		UNDER_WATER WITHOUT_AIR CUSTOM5 MID_WATER OUTDOORS KNOWN
 north		mid_water
 south		lagoon_bottom
 east		mid_water
 west		mid_water
 northeast	mid_water
 northwest	mid_water
 southeast	mid_water
 southwest	mid_water
 down		mid_water

{movement
if compass = out : compass = in
   write "You can't go that way.^"
   return
endif
if compass = south : compass = southeast : compass = southwest
   if destination = nowhere
      write "The rock wall is quite impenetrable.^"
      return
   endif
endif
if destination = nowhere
   write "Straying that far from the lagoon is not advisable.^"
else
   return false
}

{look
if tank has WORN
   write "With your buoyancy finely adjusted, you float effortlessly in mid "
   write "water. "
else
   write "Gently waving your arms to stay as still as possible, you are "
   write "floating beneath the surface of the ocean. "
endif
if mask has WORN
   write "A wide variety of marine life darts this way and that providing "
   write "you with a show of unparalleled beauty. "
else
   write "A multitude of different sized shapes swirl around you, blurred "
   write "by the salty sea water in your eyes. " 
endif
if CURRENT_DEPTH = 5
   write "Sunlight dances brightly on the choppy surface of the water several "
   write "metres above your head. "
endall
if CURRENT_DEPTH = 10
   write "Sunlight filters down from above giving the water an eerie blue "
   write "glow. "
endif
if CURRENT_DEPTH = 15
   write "Filtered through the mass of water above your head, the sunlight "
   write "here is noticeably subdued. "
endif
if CURRENT_DEPTH = 20
   write "Looking down, you can now begin to make out the sandy form of the "
   write "ocean floor. "
endall
if LATITUDE = 40
   if LONGITUDE = 36 
      if CURRENT_DEPTH = 5 
         write "To the south you can see the edge of a shelf running in "
         write "between the two heads of the lagoon.^"
         return
endall
if LATITUDE = 40
   write "An almost shear wall of rock bars your progress south.^"
   return
endall
if CURRENT_DEPTH = 20 : CURRENT_DEPTH = 5
   write ^
   return
endif
write "There is nothing but water to the limit of visibility in every "
write "direction.^"
} 

{look_up
if CURRENT_DEPTH = 5
   write "Sunlight dances brightly on the choppy surface of the water "
   write "several metres above your head.^"
   return
endif
if CURRENT_DEPTH < 20
   write "Sunlight filters down from above giving the water an eerie blue "
   write "glow.^"
   return
endif 
write "Filtered through the mass of water above your head, the sunlight "
write "here is noticeably subdued.^"
}

{look_down
if LONGITUDE = 15
   if LATITUDE = 21
      if CURRENT_DEPTH = 20
         write "You can see tall rock formation on the ocean floor.^"
         return
endall
if CURRENT_DEPTH = 20
   write "Looking down, you can now begin to make out the sandy form of the "
   write "ocean floor.^"
   return
endif
write "You see nothing other than deep blue water.^"
}

{first_hint
write "Unless you know exactly where you are going, you are unlikely to find "
write "anything of interest. It may also be helpful to note that the deeper "
write "you are when you go scuba diving, the more quickly you use your air.^"
set time = false
}

{second_hint
write "Once you know where you are going, you will need to use the GPS to "
write "navigate your way there.^"
set time = false
}

{third_hint
execute "+navigation"
set time = false
}

object sea_life: sea marine life fish
 short 		the "marine life"

{examine
write "The marine life, mostly various species of fish, never fails to "
write "amaze you with its wondrous variety of colours and shapes.^"
}

{take
write "They dart elusively out of the way as you grab.^"
}

{attack
write "They dart elusively out of the way.^"
}

object wall: rock wall cliff cliffs
 short		a "rock wall"

{examine
write "Many nooks and crannies make the rock wall a haven for all types of "
write "marine life.^"
}

{climb
if here = ocean_surface
   write "You would be torn to shreds by the waves if you attempted to "
   write "climb the wall out of the water.^"
   set time = false
   return
endif
proxy "up"
}

location site : rock formation
 short		the "rock formation"
 has		UNDER_WATER WITHOUT_AIR CUSTOM5 OUTDOORS
 up			mid_water
 north		ocean_bottom
 south		ocean_bottom
 east		ocean_bottom
 west		ocean_bottom
 northeast	ocean_bottom
 northwest	ocean_bottom
 southeast	ocean_bottom
 southwest	ocean_bottom

{movement
if compass = down
   write "You are already on the bottom.^"
   return
endif
if compass = in
   write "A suicide mission you decide not to accept, Jim.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You have arrived back at the rock formation.^"
   return
endif
write "A large rock formation breaks up the monotony of the ocean floor "
write "here. Water stretches out in every direction as far as the eye "
write "can see.^"
}
 
{eachturn
if WORK_PHASE = 4
   write "^The submarine's propellers, previously turning slowly to "
   write "counter the mild current, now spring to life. Its powerful "
   write "spotlight sweeps past as it turns, forcing you to duck down "
   write "further behind the rock formation in order to avoid being seen. "
   write "Now facing roughly to the southeast, the submarine begins to move "
   write "off, gently rising and increasing in speed as it goes.^"
   move submarine to limbo 
   set WORK_PHASE + 1
   if mask has WORN
      write "^As the silt stirred up by the submarine's propellers "
      write "begins to clear, a soft glint catches your eye. It would "
      write "appear that one of the spilled vials, having up until now been "
      write "covered by a layer of soft sand, has been inadvertently "
      write "left behind.^"
      move vial to here
    endif
endif
if WORK_PHASE = 3
   write "^With the canisters now firmly in place, one of the divers "
   write "closes the hatch to the submarine. Glancing around briefly, "
   write "he turns then follows the other divers up through an opening in "
   write "the submarine's base.^"
   move divers to limbo 
   move canister to limbo
   move vial to limbo
   ensure vial hasnt OUT_OF_REACH
   set WORK_PHASE + 1
endif
if WORK_PHASE = 2
   write "^Sudden commotion near the submarine draws your attention "
   write "back to it. It appears that one of the canisters has somehow "
   write "come open while being loaded, spilling several small glass vials " 
   write "on to the ocean floor. Divers quickly scramble to recover them, "
   write "then continue to finish loading the canister from which they "
   write "came.^" 
   set WORK_PHASE + 1
   move vial to here
endif
if WORK_PHASE = 1
   write "^As each canister is lined up with an opening in the aft "
   write "end of the submarine, the divers slowly begin to slide it along "
   write "a set of rollers until it disappears into the submarine's "
   write "interior.^"
   set WORK_PHASE + 1
endif
if WORK_PHASE = 0
   write "^Put on guard by the soft humming noise of an electric "
   write "motor, you squat down behind the rock formation. Peering out and "
   write "around, you see a group of four divers working to load several "
   write "long steel canisters, neatly stacked on the ocean floor, into an "
   write "unmarked submarine hovering nearby. The divers appear to be unaware "
   write "of your presence.^"
   move submarine to here
   set WORK_PHASE + 1
}

{look_up
write "Filtered through the mass of water above your head, the sunlight "
write "here is noticeably subdued.^"
}

{wave
if WORK_PHASE > 0
   if WORK_PHASE < 5
      write "Waving your arms wildly, "
      execute "+attention"
endall
return false
}

{first_hint
write "Just wait and keep out of sight.^"
set time = false
}

{second_hint
write "When the divers eventually go, they will accidentally leave something "
write "behind. You will only be able to see this, however, if you are "
write "wearing the scuba mask.^"
set time = false
}

{third_hint
write "Once the divers have gone (providing you are wearing the mask), "
write "simply TAKE THE VIAL.^"
set time = false
}

{examine
write "Standing upright on the ocean floor, the rock formation looks very "
write "much like something, you just aren't quite sure what. Its multitude "
write "of crags and protrusions spark your imagination, its likeness shifting "
write "in your mind from that of a kneeling man to a gnarled coastal tree, "
write "then back to a plain old rock.^"
}

{look_behind
if WORK_PHASE = 0
   write "Just more water.^" 
   return
endif
return false
}

object submarine: small submarine sub
 has		OUT_OF_REACH
 short		a "small submarine"
 long		"A small submarine hovers just off the ocean floor beyond the rock formation.^"
 mass		heavy
 parent		nowhere

{hint
write "There is nothing you can do with the submarine, just wait quietly "
write "for it to leave.^"
set time = false
}

{examine
write "The sleek black submarine is about six metres long. Its many propellers "
write "whirr constantly as its pilot attempts to keep it hovering still in "
write "the capricious currents. A powerful spotlight shines down from its "
write "underside, brightly illuminating the area where the divers are "
write "working. The cargo hold into which they are attempting to load the "
write "canisters is accessed via an opening in its aft end, while passengers "
write "enter and exit through a rectangular opening along its underside. "
write "The only other notable feature of the submarine is that it is "
write "completely devoid of any identifying markings.^"
}
 
{enter
proxy "in"
}

{take
write "The submarine is not THAT small!^"
set time = false
}

object rec_opening: rectangular opening
 short		a "rectangular opening"

{examine
write "The rectangular opening is where the divers enter and exit the "
write "submarine.^"
}

{enter
proxy "in"
}

object aft_opening: aft opening
 short		the "aft opening"

{examine
write "The divers are loading the canisters into the submarine's interior "
write "through the aft opening.^"
}

{enter
proxy "in"
}

object canister: mysterious canister canisters
 has		OUT_OF_REACH
 short		a "mysterious canister"

{examine
write "The canisters are cylindrical in shape and completely smooth except for "
write "a small clip at one end. Their brushed steel exteriors shine brightly "
write "indicating the brevity of their visit to the ocean floor.^"
}

{open : take
write "There is no way for you to get close enough to the canister without "
write "being seen by the divers (which is probably not something that you "
write "want to have happen considering the fact that they all have spear "
write "guns).^"
}

object vial: small glass vial vials
 has		OUT_OF_REACH
 long		"There is a small glass vial here.^"
 short		a "small glass vial"
 mass		4
 quantity	2
 parent		nowhere

{take
if divers(parent) = here
   write "There is no way you could get the small glass vial without being "
   write "seen by the divers.^"
   set time = false
   return
endif
return false
}

{take_override
write "You take the small glass vial.^"
ensure noun1 has TOUCHED
move vial to player
if vial hasnt SCORED
   points 10 
   ensure vial has SCORED
endif
}

{show_to_lisa
proxy "ask lisa about vial"
}

{show_to_wise
write "~Give me a closer look at it,~ Wise says holding out his hand.^"
}

{give_to_wise
write "~I think I'll hang on to this for now,~ Wise informs you as be "
write "places the vial into his top pocket.^"
move vial to wise
}

{examine
if vial(parent) != player
   write "The small glass vial is both small and made from glass.^"
   return
endif
write "The small glass vial has a metal rim at one end. A "
write "rubber membrane is stretched inside this metal rim in a fashion "
write "similar to the containers used to store pharmaceutical substances for "
write "injection. "
if fuel(parent) = vial
   write "Inside the vial you can see a clear liquid.^"
else
   write "The vial is now empty.^"
endif
}

{shake
if fuel(parent) = vial
   write "The clear liquid sloshes around inside the vial.^"
   return
endif
write "This achieves little.^"
}

{open
write "The vial has been designed in such a way that it never needs to be "
write "opened, thus remaining free from contaminants. Its contents would "
write "typically be extracted through the membrane with the use of a syringe.^"
}

{return
write "It is neither necessary nor desirable to break open the vial.^"
}

{show_to_stranger
if vial has CUSTOM5
   write "The stranger just ignores you.^"
   return
endif 
write "~I have monitored the transport of many vials such as the one you "
write "have discovered. I can not tell you much about them, as their exact "
write "source is still unknown. This is mainly due to the "
write "extraordinary lengths that the couriers have gone to in order to "
write "conceal their transport route.~^"
}

{show_to_zuckerman
if vial has CUSTOM3
   write "That would be a waste of time.^"
   set time = false
   return
endif
write "~Oh, you have one too...~ Dr Zuckerman says with a smile.^"
set TOPICS_DISCUSSED + 1
}

{inject_with_syringe
proxy "fill syringe using vial"
}

object membrane: rubber membrane
 short		a "rubber membrane"
 parent vial

{examine
write "The rubber membrane is stretched out inside a metal rim at one end "
write "of the vial allowing its contents to be extracted with the use of a "
write "syringe.^"
}

{return
write "It is neither necessary nor desirable to break the rubber membrane.^"
}

attribute FUEL_ADDED

object fuel: small quantity of perfectly clear liquid
 has		LIQUID OUT_OF_REACH
 short		a "small quantity of clear liquid"
 mass		2
 parent 	vial

{examine
write "The liquid is perfectly clear."
if fuel(parent) = syringe
   if fuel has BUBBLES
      write " It appears to be filled with many small bubbles."
   endif
endif
write ^
}

{inject_in_player_override
write "You roll up your sleeve and inject the pale yellow liquid into a "
write "vein in your arm. Withdrawing the needle, then applying a firm "
write "pressure on the puncture, you begin to feel slightly dizzy. "
write "You arch over, standing with you hands on your knees, fighting "
write "the increasing feeling of nausea. Closing your eyes, you attempt "
write "to regain control of your heart rate"
endall
if syringe hasnt CUSTOM4
   if syringe hasnt CUSTOM5
      write ", actively calming yourself until you begin to feel more "
      write "composed. Relieved, you stand up straight again, wipe an "
      write "abundance of sweat from your brow then take several deep "
      write "breaths, reassuring yourself that you are indeed still alive.^"
      move fuel to limbo
      set AGING_SCRIPT = true
      return
endall
write " only to find your dizziness increase and stabbing pains cause your "
write "body to convulse. Dropping to your knees you begin to have trouble "
write "breathing and soon lose consciousness...^"
execute "+game_over"
}

{taste
write "The clear liquid tastes indescribably foul.^"
}

{drink_override
write "The clear liquid tastes indescribably foul.^"
move fuel to limbo
set AGING_SCRIPT = true
}

{sniff
write "The clear liquid smells sort of musty or stale.^"
}

{inject_in_vial_override
write "You puncture the rubber membrane with the tip of the needle and "
write "inject the clear liquid back into the vial.^"
move fuel to noun2
ensure fuel has OUT_OF_REACH
}

{inject_in_dish_1_override
proxy "inject clear fluid in brown agar"
}

{inject_in_agar_1_override
write "You inject the clear liquid into the brown agar.^"
move fuel to limbo
ensure dish_1 has FUEL_ADDED
}

{inject_in_dish_2_override
proxy "inject clear fluid in beige agar"
}

{inject_in_agar_2_override
write "You inject the clear liquid into the beige agar.^"
move fuel to limbo
ensure dish_2 has FUEL_ADDED
}

{inject_in_lisa_override
write "If you aren't willing to inject the clear liquid into yourself, then "
write "you obviously don't want to known what will happen badly enough.^"
set time = false
}

{pour_on_dish_2_override
proxy "pour clear liquid on beige agar"
}

{pour_on_dish_1_override
proxy "pour clear liquid on brown agar"
}

{pour_on_agar_2_override
write "You pour the clear liquid onto the beige agar.^"
ensure dish_2 has FUEL_ADDED
move fuel to limbo
}

{pour_on_agar_1_override
write "You pour the clear liquid onto the brown agar.^"
ensure dish_1 has FUEL_ADDED
move fuel to limbo
}

object divers: divers
 has		OUT_OF_REACH PLURAL ANIMATE
 short		the "divers"

{wave_at : greet
execute "wave_site"
}

{yell_at
write "Yelling, as well as you can underwater, "
execute "+attention"
}

{examine
write "Working quickly and efficiently, the divers' tightly coordinated "
write "efforts make obvious their high level of training.^"
}

{attack
write "I should probably mention at this point that each of the divers is "
write "armed with a spear gun, so attacking them is a sure-fire way to end "
write "up dead.^"
}

location walkway : floating walkway
 short		the "floating walkway"
 has		OUTDOORS KNOWN
 east		nowhere
 west		beach

{eachturn
move lagoon_obj to here
move outpost_obj to here
ensure outpost_obj hasnt OUT_OF_REACH
}

{movement
if compass = east
   if destination = nowhere
      proxy "open door"
      write "^"
      set destination = storage
      return false
   endif
endif
if compass = east
   if destination = false
      write "You bang your head on the closed steel door.^"
      return
endall
if destination = false
   write "The walkway runs east-west.^"
else
   return false
}

{look
if here has VISITED
   write "You are standing on the walkway.^"
   return
endif
write "Keeping a wide stance to help stabilise yourself, you are standing "
write "on a floating walkway that leads from the research outpost in the "
write "east, to the shore of the lagoon in the west. "
if steel_door has CLOSED
   write "The door leading into the outpost is closed.^"
   return
endall
write "The door leading into the outpost is open.^"
}

{jump
write "It's hard enough to keep your balance without jumping up and down.^"
}

{examine
write "The floating walkway leads from the west shore of the lagoon to the "
write "research outpost.^"
}

object outpost_obj: floating research outpost
 short		a "research outpost"

{examine
if here = beach
   write "The research outpost is floating near the centre of the lagoon. A "
   write "long walkway connects to the beach where you are standing.^"
   return
endif
write "The research outpost is floating near the centre of the lagoon. A "
write "long walkway connects it to a beach on the west shore.^"
}

{enter
proxy "e"
}

object lagoon_obj: calm lagoon shore
 short		a "lagoon"

{enter
proxy "ne"
}

{examine
write "The lagoon is moderately calm and sheltered.^"
}

location beach : lagoon beach
 short		the "lagoon beach"
 has		OUTDOORS KNOWN
 east		walkway
 northeast	lagoon_surface
 south		trail

{eachturn
move lagoon_obj to here
move outpost_obj to here
ensure outpost_obj has OUT_OF_REACH
}

{movement
if compass = north
   write "The west head of the lagoon bars your progress.^"
   return
endif
if compass = west
   write "The bank is too steep and the palms too dense.^"
   return
endif
if destination = nowhere
   write "You can either walk south along the trail or east on to the walkway.^"
else
   return false
}

{look
if here has VISITED
   write "You have returned to the beach on the west shore of the lagoon.^"
   return
endif
write "You are standing on a beach that lines the west shore of the lagoon. "
write "Further to the west, the afternoon sun filters through a wall of tall "
write "palms that lines the bank of a steeply rising hill. To the south the "
write "beach narrows, eventually becoming nothing more than a meandering "
write "trail that gradually disappears into the jungle. A long walkway leads "
write "east from here, out across the calm waters of the lagoon to where the "
write "research outpost floats.^"
}

{listen
write "You hear the soothing sound of the lagoon waters washing up on to "
write "the beach.^"
}

object hill_obj: steeply rising hill
 short		a "steeply rising hill"

{climb : enter
write "The hill is far too steep for you to climb.^"
}

object palms: palm palms tree trees
 has		PLURAL
 short 		the "palms"

{examine
write "The afternoon sun filters through the wall of tall palms.^"
}

{climb
write "And look for coconuts no doubt.^"
set time = false
}

location trail : trail
 short		the "trail"
 has		OUTDOORS KNOWN
 north		beach
 south		estuary

{eachturn
set JUNGLE_SCRIPT + 1
if JUNGLE_SCRIPT = 15 
   write "^A butterfly flutters past on the gentle breeze, disappearing "
   write "again between the trees.^"
   set JUNGLE_SCRIPT = 0
endif
}

{movement
if compass = north
   write "You follow the trail for several minutes over a gentle rise, "
   write "finally arriving at the shore of the lagoon.^^"
   return false
endif
if compass = south
   write "The trail winds its way through the jungle for several minutes "
   write "before opening out at an estuary.^^"
   return false
endif
write "Strange noises and rustlings convince you to stick to the trail.^"
}

{look
if here has VISITED
   write "You are back on the narrow trail.^"
   return
endif
write "You are on a narrow trail that winds its way north-south through the "
write "jungle. Weird and wonderful noises fill the air, some you recognise, "
write "some you don't.^"
}

{listen
write "Strange noises emanate from the surrounding jungle. None that entice "
write "you to investigate, however.^"
}

{smell
write "The sweet smell of tropical flowers hangs in the air.^"
}

object butteryfly: butterfly
 parent		nowhere

location estuary : estuary
 short		the "estuary"
 has		OUTDOORS KNOWN
 north		trail
 east		compound
 northwest	hill
 up		hill
 south		south_beach

{look
if here has VISITED
   write "You have arrived back at the estuary.^"
   return
endif
write "The jungle thins and the trail fades as they approach the "
write "south shore of the island. Sparkling water flows down a sandy "
write "estuary from the northwest, bending to the south as it "
write "traverses the gentle slope towards the ocean. To the east lies the "
write "compound of the main military base.^"
} 

object estuary_obj: sandy estuary
 short		a "sandy estuary"

{examine
write "Sparkling water flows down the sandy estuary from the northwest, "
write "bending to the south as it traverses the gentle slope towards the "
write "ocean.^"
}

location behind_hangar : behind hangar
 short		name "behind the hangar"
 has		OUTDOORS KNOWN
 southwest	south_beach
 up			on_crate

{look
if here has VISITED
   write "You are behind the hangar again.^"
   return
endif
write "Scattered coastal bushes provide minimal cover from sight here "
write "behind the hangar. Up against the back wall of the hangar there is a "
write "rectangular crate.^"
}

{eachturn
move bushes to here
}

{first_hint
write "Examine the crate then climb on to it.^"
set time = false
}

{second_hint
write "If the crate was up-ended, it would divide the height of the hangar "
write "into two manageable steps.^"  
set time = false
}

{third_hint
write "Just type:^"
write "  >TIP CRATE OVER^"
write "  >UP^"
write "  >UP^"
set time = false
}

{jump
proxy "up"
}

object rect_crate: rectangular crate
 has		SURFACE
 short		a "rectangular crate"

{open
write "There is no obvious way to open the crate.^"
}

{move
write "You push the crate a short distance along the ground.^"
}

{turn : tip_up
if rect_crate has CUSTOM4
   write "You lean your weight against the crate and tip it back on to its "
   write "side"
   ensure rect_crate hasnt CUSTOM4
   set on_crate(up) = nowhere
   set roof_south(down) = nowhere
   execute "+contents_tumble"
   return
endif
write "Squeezing your fingers under the end of the crate, you manage to "
write "tip it up on to its end"
execute "+contents_tumble"
ensure rect_crate has CUSTOM4
if rect_crate hasnt SCORED
   points 5
   ensure rect_crate has SCORED
endif
set on_crate(up) = roof_south
set roof_south(down) = on_crate 
}

{+contents_tumble
set INDEX = 0 
loop
  if noun3(parent) = on_crate
     if noun3(mass) < heavy
        if noun3 hasnt LOCATION
           set INDEX + 1
  endall
endloop
if INDEX = 0 
   write .^
   return
endall
write " causing "
loop
  if noun3(parent) = on_crate
     if noun3(mass) < heavy
        write noun3{the}
        move noun3 to here
        set INDEX - 1
        execute "+list_structure"
  endall
endloop
write " to tumble on to the ground.^"
}

{examine
if rect_crate hasnt CUSTOM4
   write "The crate is resting up against the back wall of the hangar and "
   write "is about six feet wide and three feet tall.^"
   return
endif
write "The crate is resting up against the back wall of the hangar and is "
write "about three feet wide and six feet tall.^"
}

{climb : jump_on : enter
proxy "up"
}

{look_behind
write "Although very close to the back wall of the hangar, there is just "
write "enough room to see in behind the crate. Shielding your eyes until they "
write "adjust to the dark, you come to see that there is nothing there but "
write "bare wall.^"
}

object hangar_obj1: hangar large building
 short		a "hangar"

{enter
write "The entrance to the hangar is around the front at the north end.^"
}

location on_crate : on crate
 short		name "on the crate"
 has		OUTDOORS
 down		behind_hangar
 up		nowhere

{movement
if compass = up
   if destination = false
      write "You are unable to climb up on the roof of the hangar as the "
      write "edge of the gutter is still another ten feet above the top "
      write "of the crate.^"
      return
endall
if compass = up
   write "You jump up and hook your fingers over the edge of the guttering "
   write "then pull yourself on to the roof.^^"
   return false
endif
return false
}

{look
if here has VISITED
   write "You are standing on the crate.^"
   return
endif
write "You are standing on top of the rectangular crate with the ground "
if rect_crate hasnt CUSTOM4
   write "three feet below. The back wall of the hangar looms beside you "
   write "another ten feet beyond the top of the crate.^"
endif
if rect_crate has CUSTOM4
   write "six feet below. The back wall of the hangar stretches up another "
   write "seven feet taller than the top of the crate.^"
endif
}

{jump
proxy "up"
}

object hangar_obj3: large hangar building
 short		a "large hangar"

{climb
proxy "up"
}

{examine
if rect_crate hasnt CUSTOM4
   write "The hangar looms tall above you, its roof still another four or "
   write "five feet above your head.^"
   return
endif
write "The hangar wall stretches up beside you another seven feet above the "
write "top of the crate.^"
}

object rect_crate_2: rectangular crate crate
 short		a "rectangular crate"

{climb
proxy "down"
}

{tip_up : turn
write "You can't tip the crate up while you are standing on it.^"
set time = false
}

location roof_north : roof end of north
 short		name "north end of roof"
 has		OUTDOORS
 south		roof_south	
 down		hangar_north

{movement
if compass = down
   if destination = nowhere
      write "Without the rope tied to the ventilation pipe, the drop down "
      write "to the floor is too far.^"
      return
   endif
endif
if compass = down
   write "Cautiously, you lower yourself down the rope.^"
   return false
endif
return false
}

{look
if here has VISITED
   write "You are crouching down at the north end of the hangar's roof.^"
   return
endif
write "You are near the north end of the hangar's roof, crouching down "
write "below the ridge line in order not to be seen. A square section of "
write "sheeting has been removed beside a ventilation pipe creating an "
write "opening large enough for you to pass through into the hangar's "
write "interior."
if rope(parent) = vent
   write " A length of rope has one end tied to the ventilation pipe with "
   write "the other dangling down through the opening."
endif
write ^
}

{look_down
proxy "look through opening"
}

{listen
if lisa has BURNING
   write "Listening as carefully as you can, you are unable to make out "
   write "what the people below are saying.^"
   return
endif
write "You can hear what sounds like intermittent foot steps coming from "
write "within the hangar.^"
}

{jump : stand
write "Are you mad? You would be spotted a mile away if you did that.^"
}

object vent: vent ventilation pipe
 short		a "ventilation pipe"

{examine
write "The ventilation pipe protrudes about half a metre from the roof of "
write "the hangar and is capped with a galvanised cone to prevent rain from "
write "entering.^"
if rope(parent) = vent
   write " A length of rope has one end tied around the ventilation pipe and "
   write "the other dangling down through the opening.^"
endif
}

object rope: length of rope
 has		CUSTOM5
 short		a "length of rope"
 long		"There is a length of rope here.^"
 mass		scenery; When untied, set mass to 10, allowing it to be taken.
 parent		vent

{examine
write "The length of rope is quite thick and sturdy and about ten metres long.^"
if rope(parent) = vent
   write " One end of the rope is tied around the ventilation pipe with the "
   write "other dangling down through the opening.^"
endif
}

{pull
if rope(parent) = vent
   proxy "untie rope"
   return
endif
return false
}

{tie_to_vent
set rope(mass) = scenery
move rope to vent
move rope_end to hangar_north
set roof_north(down) = hangar_north
write "You tie the rope to the ventilation pipe allowing the other end to "
write "dangle down through the opening.^"
}

{untie
set rope(mass) = 10
move rope to here
move rope_end to limbo
set roof_north(down) = nowhere
write "You untie the rope from the ventilation pipe and pull the other end "
write "up onto the roof.^"
}

{climb
if rope(parent) = vent
   proxy "go down"
   return
endif
write "The rope leads nowhere.^"
set time to false
}

{climb_up
if rope(parent) = vent
   write "You are already at the top of the rope.^"
   return
endif
write "The rope leads nowhere.^"
set time to false
}

{climb_down
if rope(parent) = vent
   proxy "go down"
   return
endif
write "The rope leads nowhere.^"
set time to false
}

object roof_opening: roof opening
 short		an "roof opening"
  
{look_through
if lisa has BURNING
   write "Through the opening you can see the stranger, Lisa and several "
   write "officials all in quiet conversation.^"
   return
endif
write "You can see the floor of the hangar over fifteen feet below.^"
}

{enter
proxy "d"
}

location roof_south : roof south
 short		name "south end of roof"
 has		OUTDOORS
 north		roof_north
 down		on_crate

{look
if here has VISITED
   write "You are crouching down at the south end of the hangar's roof.^"
   return
endif
write "You are near the south end of the hangar's roof, crouching down "
write "below the ridge line in order not to be seen.^"
}

{jump : stand
write "Are you mad? You would be spotted a mile away if you did that.^"
}

object hangar_obj: hangar large
 short		a "hangar"
 parent		nowhere

location hangar_north : north end of hanger
 short		name "north end of hanger"
 south		hangar_south
 up			roof_north

{eachturn
move hangar_door to hangar_north
ensure hangar_door hasnt OUT_OF_REACH
move access_door to hangar_north
ensure access_door hasnt OUT_OF_REACH
if stranger has ENCOUNTERED
   if stranger(parent) = here
      if rope hasnt CUSTOM5
         write "^The stranger, obviously startled by another intrusion, "
         write "relaxes noticeably on seeing that it is just you again.^"
         ensure rope has CUSTOM5
      endif
      if stranger hasnt TRUSTING
         if random = 4
            write "^The stranger looks mistrustfully at you out of the "
            write "corner of his eye.^"
         endif
      endif
   endif
else
   execute "+stranger_encounter"
   execute "+stranger_standoff"
   ensure filing has CUSTOM5
endif
}

{movement
if compass = north
   write "The front door is closed.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You are back at the north end of the hangar.^"
   return
endif
write "This enormous space is sparsely furnished with a small writing desk "
write "and filing cabinet. The main door to the hangar stands to the north, "
write "beside which there is a smaller access door for people to come and go. "
write "What appears to be a large fish tank occupies the majority of "
write "the space to the south. Light streams in from above through a square "
write "opening in the roof."
if rope(parent) = vent
   write " A length of rope dangles down through the opening.^"
endif
}
 
{look_up
execute "examine_inside_opening"
}

{listen
write "The loudest sound you can hear is that of your heart beating.^"
}

{first_hint
write "You must either take Lisa's gun or take the stranger's gun.^" 
write "WARNING: The next clue will say whose gun to take.^"
set time = false
}

{second_hint
write "Once you have resolved the stand-off by taking Lisa's gun, you will "
write "need to get the contents of the bottom drawer of the cabinet (which "
write "is locked, permanently).^"
set time = false
}
 
{third_hint
write "Just REMOVE THE TOP DRAWER and you will be able to TAKE THE DIARY "
write "out of the bottom one.^" 
set time = false
}

object tank_view: apparent fish tank
 short		a "fish tank"

{shoot_override : shoot_with_gun : attack_with_gun
write "You quickly take aim then pull the trigger.^"
write "~Alex!~ Lisa cries as the access door bursts open and the MP runs "
write "into the room.^" 
write "Seeing you with the gun in your hand, the MP shoots. A burning pain "
write "cuts through your chest as you hit the ground, your mind spinning "
write "from the shock. Before long, the cold fluid from the now shattered "
write "fish tank spreads across the floor of the hangar to wet your clothes "
write "and hair.^"
execute "+game_over"
}
 
{examine : look_in
write "The fish tank, still some distance to the south, is standing on a "
write "metal frame.^"
}

object inside_opening: roof opening
 has		OUT_OF_REACH
 short		a "inside of the roof opening"

{look_through : examine
write "Through the opening you can see nothing but blue sky.^"
}

{enter
proxy "u"
}

attribute TRUSTING ENCOUNTERED

object stranger: stranger tall middle-aged man
 has		ANIMATE
 short		the "stranger"
 long		function
 parent		nowhere
 mass		heavy

{long		
if stranger(status) = 0
   write "The stranger is here pointing his pistol at Lisa.^"
   return
endif
if stranger(status) = 1
   write "The stranger is here, searching about the room.^"
   return
endif
if stranger(status) = 2
   write "The stranger is here, standing with his hands above his head.^"
   return
endif
if stranger(status) = 3
   write "The stranger is here examining the tank and bank of instruments.^"
   return
endif
if stranger(status) = 4
   write "The stranger is here, searching about the room.^"
   return
endif
}

{ask_about_fish_tank : ask_about_tank_view
if here = hangar_south
   write "The stranger places the palm of his hand against the glass wall "
   write "of the tank. " 
else
   write "The stranger looks at you, his face slightly contorted. "
endif
write "~Well, it's probably another one of Dr Zuckerman's tests. "
write "Your guess is as good as mine as to the nature of it, though.~^"
}

{ask_about_instruments
write "~Beats the shit out of me!~ the stranger says with a shrug.^"
}

{ask_about_rect_crate
write "~The crate has always been there,~ the stranger explains. ~I just "
write "tipped it up so that I could use it to get on to the roof. Once "
write "hanging from the gutter, I decided it would be best to kick it back "
write "over to avoid anyone noticing and thinking it suspicious.~^"
}

{examine
if lisa has CUSTOM2
   write "The stranger is standing firm with his pistol pointed directly "
   write "at Lisa's head.^"
   return
endif
write "The stranger is a tall, middle-aged man with short dark hair. He is "
write "dressed almost completely in black.^" 
}

{ask_about_compressor
write "~I presume it is for oxygenating the water, just like a domestic "
write "fish tank.~^"
}

{ask_about_submarine
write "~It's hard to say who it would have belonged to,~ the stranger "
write "begins in reply. ~There are so many people, knowingly or unknowingly, "
write "working on Dr Zuckerman's project. It is almost impossible to keep "
write "track of them all.~^"
}

{ask_about_divers : tell_about_divers
write "~It's hard to say who they were,~ the stranger says with a frown. "
write "~There are so many people, knowingly or unknowingly, working on Dr "
write "Zuckerman's project. It is almost impossible to keep track of them "
write "all.~^"
}

{shoot_override : shoot_with_gun : attack_with_gun
write "Seizing the opportunity, you take aim at the stranger and pull the "
write "trigger.^"
write "~Alex!~ Lisa cries as the access door bursts open and the MP runs "
write "into the room. You recall thinking how you would explain, but never "
write "get the chance.^"
execute "+game_over"
}

{ask_for_gun
if lisa has CUSTOM2
   write "With Lisa covering you, you walk up to the stranger and hold out "
   write "your hand.^"
   write "~You're making a big mistake,~ he says as he hands over his pistol.^"
   write "~Good work, Alex,~ Lisa says, noticeably relieved. ~Now give me the "
   write "gun and get out of here before I call the guard in. Something tells "
   write "me you don't want have to explain to him what you are doing in "
   write "here.~^"
   ensure lisa hasnt CUSTOM2
   ensure lisa has ON
   ensure lisa has POSSESSIVE
   set stranger(status) = 2
   set lisa(status) = 2
   move gun to kryten
   return
endif
write "The stranger doesn't even honour your request with a reply.^"
}

{ask_about_lisa
write "~Don't worry, she'll be fine. By the time they find her, both you and "
write "I will be far away from here. Then, by the time they catch up with us, "
write "we'll have enough evidence to close this whole operation down.~^"
}

{tell_about_vial
execute "show_to_stranger_vial"
}
 
{ask_about_vial
write "~I have monitored the transport of many vials such as the ones you "
write "describe. I can not tell you much about them, as their exact source is "
write "still as yet unknown. This is mainly due to the extraordinary lengths "
write "that the couriers have gone to in order to conceal their transport "
write "route.~^"
}

{tell_about_green_slide
if fuel has SCORED
   execute "tell_about_fuel_stranger"
   return
endif
if green_slide(parent) = limbo
   write "What green slide?^"
   return
endif
write "Perhaps if you took a look at it through the microscope you would "
write "have something of interest to tell him.^"
}

{tell_about_fuel : tell_about_ames
if stranger has TRUSTING
   write "~Yes, I recall,~ the stranger replies.^"
   return
endif
write "You tell the stranger about your discovery of the vial and "
if fuel has SCORED
   write "your experiments regarding the clear liquid within it.^^" 
   write "As you do so the stranger's eyes light up. "
   if stranger has CUSTOM5
      write "~Well, that would confirm what I was telling you about the "
      write "human test subjects.~^" 
   else
      write "~Your tests appear to confirm our findings,~ the stranger says "
      write "as he rubs his chin thoughtfully. ~You see, several of Dr "
      write "Zuckerman's experiments involved involuntary human subjects, two "
      write "of which we were fortunate enough to have the opportunity to "
      write "interview. Although neither could remember anything of the "
      write "tests themselves, both showed signs of accelerated aging.~^"
      ensure stranger has CUSTOM1
   endif
   points 5
   ensure stranger has TRUSTING 
   if diary has SCORED
      execute "+stranger_offer"
   endif
   return
endall
write "the clear liquid within it.^"
}

{ask_about_tests
write "~You see, several of Dr Zuckerman's experiments involved involuntary "
write "human subjects, two of which we were fortunate enough to have the "
write "opportunity to interview. Although neither could remember anything "
write "of the tests themselves, both showed signs of accelerated aging.~^"
}

{ask_about_stranger
if stranger hasnt CUSTOM2
   write "~Let's just say I'm a sort of public servant, a government "
   write "watchdog so to speak.~^"
   ensure stranger has CUSTOM2
   return
endif
write "The stranger just frowns.^"
}

{ask_about_zuckerman
if stranger has CUSTOM5
   write "~There's not much more I can tell you at this stage.~^"
   return
endif
write "~Over a year ago now, our department received information regarding "
write "tests being performing by Dr Zuckerman here on the island. "
if stranger hasnt CUSTOM1
   write "Tests involving involuntary human guinea pigs. F"
else
   write "As I was saying earlier, f"
endif
write "rom what we can gather the tests appear to increase the rate at which "
write "the subjects age, but for what reason we can not say. Security is "
write "high around the project, so progress has been slow. The doctor is also "
write "somewhat of a recluse, rarely straying out into the public eye, which "
write "has made monitoring his actions almost impossible.~^"
ensure stranger has CUSTOM5
}

{talk_to
if lisa has CUSTOM2
   write "~There'll be time to talk later,~ the stranger replies tensely.^"
   return
endif
if lisa has ON
   write "Lisa butts in, ~Don't talk to him, Alex. Just give me the gun "
   write "then get out of here.~ ^
   return
endif
if lisa has BURNING
   write "Lisa butts in, ~Don't talk to him, Alex. Just get out of here.~ ^
   return
endif
write "~What would you like to know, Dr Meadows?~ ^
}

{attack
if lisa has CUSTOM2
   write "Why don't you just take his gun instead.^"
   return
endif
if lisa has ON
   write "I don't think taking a cheap shot at the stranger is going to "
   write "help your situation at all.^"
   return
endif
if lisa has BURNING
   write "I don't think taking a cheap shot at the stranger is going to "
   write "help your situation at all.^"
   return
endif
write "Are you out of your mind!^"
}

object gun: strangers stranger's gun plain black pistol his mans man's
 short		the "stranger's pistol"
 long		"The stranger's pistol is lying here.^"
 parent		stranger
 mass		5

{take_override
if gun(parent) = stranger
   proxy "ask stranger for strangers pistol"
   return
endif
return false
}

{give_to_lisa
write "You hand the stranger's pistol to Lisa.^"
write "~Now get out of here,~ Lisa orders sternly. ~I'll talk to you when "
write "we both get back to the outpost.~^"
move gun to lisa
ensure lisa hasnt ON
ensure lisa has BURNING 
}

{examine
write "Never having been one for guns, you don't much like the look of it.^"
}

object rope_end: length of thick sturdy rope
 short		a "length of rope"
 mass		scenery
 
{examine
write "The rope dangles down from above through the square opening in the "
write "roof.^"
}

{take : pull
write "The rope appears to be quite firmly attached to something outside.^"
}

{climb : climb_up
proxy "go up"
}

{climb_down
write "You are already at the bottom of the rope.^"
}

object hangar_door: main door
 short		the  "main door"

{open
write "The main door to the hangar can't be opened by hand.^"
}

{examine
write "The main door is about four metres tall and almost ten metres wide.^"
}

object access_door: access door
 has		CLOSABLE CLOSED LOCKED
 short		the "access door"

{open : knock_on
if here = compound
   proxy "s"
   return
endif
if lisa has CUSTOM2
   write "You walk behind Lisa towards the access door."
   execute "+lisa_shoots"
   write "you and forces you on to the ground.^"
   execute "+busted"
   return
endif
if lisa has ON
   write "~Don't do it, Alex. You really don't want have to explain to the "
   write "guard what you were doing in here,~ Lisa says as you approach the "
   write "door.^"
   return
endif
if lisa has BURNING
   write "~I strongly suggest leaving by the rope,~ Lisa says before you "
   write "reach the door.^"
   return
endif
write "That is more than likely going to get you killed.^"
}

object filing: filing cabinet
 has		SURFACE
 short		a "filing cabinet"
 quantity	20

{examine
write "The filing cabinet is of a simple two drawer design. Its pale brown "
write "paint is badly scratched from years of apparent wear. The top drawer "
if top_drawer(parent) != filing
   write "is missing, allowing you to see into the bottom drawer.^"
   return
endif
if top_drawer has CLOSED
   write "is closed, as is the bottom one.^"
else
   write "is open while the bottom one is closed.^"
}

{look_in
if top_drawer(parent) != filing
   proxy "look in bottom drawer"
   return
endif
proxy "examine filing cabinet"
}

{open
proxy "open drawer"
}

object desk_leif: sturdy desk
 has		SURFACE
 short		a "sturdy desk"
 quantity	30
 
{examine
write "The desk's stark, yet sturdy construction is reminiscent of the "
write "design philosophy prevalent in communist Russia in the nineteen "
write "forties. "
execute "+details<noun1"
write ^
}

{clean : clean_with_toothbrush
if desk_leif hasnt CUSTOM2
   ensure desk_leif has CUSTOM2
   if desk_leif has CUSTOM1
      write "You clean away the grime further to reveal a mysterious "
      write "message: ~Made in Taiwan.~^"
      return
   endif
   write "You clean away the grime to reveal a mysterious message: ~Made in "
   write "Taiwan.~^"
   return
endall
write "What more do you expect?^"
}

{look_under
if desk_leif has CUSTOM2
   write "You can see your recently revealed message informing you that the "
   write "desk was made in Taiwan.^"
   return
endif
if desk_leif has CUSTOM1
   write "There is nothing but a streak in the grime where the stranger has "
   write "run his hand.^"
   return
endif
write "Nothing but a thin layer of grime.^"
}

object grime: grime
 short		the "grime"

{clean : clean_with_toothbrush
proxy "clean desk"
}

{examine
proxy "look under desk"
}

{look_at_through_magnifying_glass
if desk_leif hasnt CUSTOM2
   if desk_leif hasnt CUSTOM1
      write "There appears to be some writing underneath the grime.^"
endall
write "There really isn't much of it left.^"
}

object top_drawer_lock: top cabinet drawer lock keyhole
 short		the "top drawer lock"

object top_drawer: top cabinet drawer
 has		CONTAINER CLOSABLE CLOSED
 short		a "top drawer"
 long		"The top drawer of the filing cabinet is here.^"
 mass		10
 quantity	15
 parent 	filing

{examine
write "In the centre of the top drawer there is a small keyhole. "
execute "+details<noun1
write ^
}

{insert_in_filing
write "Carefully you guide the drawer back onto its railing and push it "
write "closed.^"
move top_drawer to filing
ensure top_drawer has CLOSED
ensure top_drawer has CLOSABLE
ensure bottom_drawer has CLOSED
move top_drawer_lock to hangar_north
}

{take
if top_drawer(parent) = filing
   write "Pulling the drawer out to its extreme and then angling it "
   write "upwards, you manage to remove the top drawer from its railing.^"
   move top_drawer to player
   ensure bottom_drawer hasnt CLOSED
   ensure top_drawer hasnt CLOSABLE
   ensure top_drawer hasnt CLOSED
   move top_drawer_lock to top_drawer
   return
endif
return false
}

object magazine: copy of cigar aficianado magazine
 short		a "copy of Cigar Aficionado magazine"
 mass		4
 parent		top_drawer

{examine : read : open
if magazine has DAMAGED
   write "The magazine is very, very soggy.^"
   return
endif
if magazine hasnt CUSTOM1
   write "You briefly skim through an article on the Cuban embargo.^"
   ensure magazine has CUSTOM1
   return
endif
write "The copy of Cigar Aficionado magazine is inexplicably thick and "
write "you have no desire to read it all.^"
}

object magnifying_glass: magnifying glass
 short		a "magnifying glass"
 mass		2
 parent		top_drawer

{examine
write "The magnifying glass is unusually large.^"
}

{look_through
write "You must specify what you wanted to look at through the magnifying "
write "glass.^"
}

object paper: piece of paper
 short		a "piece of paper"
 long		"There is a piece of paper nearby.^"
 mass		5
 parent		top_drawer

{give_to_stranger
write "You hand the piece of paper to the stranger.^" 
move paper to stranger
execute "show_to_stranger"
}

{show_to_stranger
if paper has CUSTOM4
   write "~I'm still none the wiser,~ he says, shaking his head.^"
   return
endif
write "The stranger looks at the piece of paper and shrugs. ~Beats me,~ he "
write "says with a faint smile. ~It does support our reports of him using "
write "human subjects in his experiments, I suppose, but it doesn't prove "
write "anything.~^" 
ensure paper has CUSTOM4
}

{examine : read
if paper has DAMAGED
   write "The ink of the paper has run too badly to read.^"
   return
endif
write "The writing on the paper is very hard to read. About the only section "
write "you can make out appears to say something about the energy obtained "
write "from fish only being good for other fish.^"
}

object bottom_drawer_lock: bottom cabinet drawer lock keyhole
 short		the "bottom drawer lock"

object bottom_drawer: bottom cabinet drawer
 has		CONTAINER CLOSED LOCKED
 short		a "bottom drawer"
 quantity	15
 parent 	filing
 mass		10

{examine : look_in
if top_drawer(parent) != filing
   write "With the top drawer removed, you are able to see into the bottom "
   write "drawer. "
   execute "+contents<noun1"
   write ^
   return
endif
write "The filing cabinet's bottom drawer, which is currently closed, has a "
write "small keyhole in its centre.^"
}

{take
write "The bottom drawer is locked and therefore can't be taken.^"
}

object diary: diary small black
 short		a "diary"
 long		"A small black diary is here.^"
 mass		5
 parent		bottom_drawer

{examine : read : look_in : open
if diary has DAMAGED
   write "Soaking wet, the diary is now unreadable.^"
   return
endif
write "Embossed in gold letters on the cover of the small black diary is "
write "the name Dr Leif Zuckerman. "
write "As you flick through the diary, you notice that it is mostly filled "
write "with cryptic fragments that mean next to nothing to you. On the last "
write "page is a scrawled appointment for next Wednesday night:^^"
style preformatted
write "     MICROBIOLOGY CONFERENCE^"
write "    HOTEL LES TERRASSES D'EZE^"
write "      MONTE CARLO 7:30 PM^"
style normal
}

{show_to_stranger
if diary has DAMAGED
   write "Soaking wet, the diary is now unreadable.^"
   return
endif
if diary has SCORED
   write "~Yes, yes, I know.~^"
   return
endif
write "The stranger begins to laugh. Unable to grasp the exact nature of the "
write "joke you can but wait. ~That stupid bastard,~ he blurts finally. ~All "
write "this time he's been looked after by the military. Top security "
write "consultants whisking him here and there as though he doesn't exist, "
write "and now, not only does he go to a public conference, but he writes it "
write "down in his diary. For a brilliant man, he's not very bright.~ "
write "Lowering his voice, the stranger continues with a more subdued tone, "
write "~That is if it isn't just a set up, of course.~^"
points 10
ensure diary has SCORED
if stranger has TRUSTING
   execute "+stranger_offer"
endif
}

{give_to_stranger
move diary to stranger
write "You hand the diary to the stranger.^" 
execute "show_to_stranger_diary"
}

location hangar_south : south end of hangar
 short		name "north end of hanger"
 north		hangar_north

{look
if here has VISITED
   write "You are back at the south end of the hangar.^"
   return
endif
write "Rows of powerful fluorescent lights along the ceiling illuminate a "
write "gigantic fish tank perched upon a steel frame in the centre of the "
write "room. Several groups of wires rise out of the top of the tank, "
write "stretching across the room to a tall bank of instruments against the "
write "west wall. A compressor housed within the steel frame pumps air into "
write "the tank, filling the room with a loud bubbling sound.^"
}

{eachturn
if stranger hasnt TRUSTING
   if stranger is *here
      set max_rand = 5
      if random = 5
         write "^The stranger looks mistrustfully at you out of the corner "
         write "of his eye.^"
      endif
   endif
endif
}

{first_hint
write "Have you discovered any other clear liquids yet? If you have, and "
write "you have performed the Ames test on it in the laboratory, then "
write "perhaps the stranger would be interested in the results.^"
set time = false
}

{second_hint
write "Once you have shown the green slide to the stranger, find the diary "
write "if you have not done so already and show it to the stranger as well.^"
set time = false
}

{third_hint
write "Once you have shown both the diary and the green slide to the "
write "stranger, you will have proven to him that you are of use to his "
write "investigation. He will then offer to send you to the "
write "convention in Monte Carlo mentioned in the diary. To accept this "
write "offer, give your final report to Colonel Wise as he suggests.^"
set time = false
}

{listen
write "You can hear only the sound of air bubbling through the water in the "
write "tank.^"
}

object tank_liquid: tank full of clear liquid 
 has		OUT_OF_REACH
 short		the "tank full of clear liquid"

{examine
write "The liquid is perfectly clear, possibly just water.^"
}

object hangar_lights: row rows of powerful fluorescent lights light
 has		OUT_OF_REACH
 short		the "rows of fluorescent lights"
 
{turn_off
write "There is no obvious way to switch the lights off.^"
}

{turn_on
write "The lights are already on.^"
}

object fish_tank: fish tank glass wall walls
 short		an "fish tank"

{examine : look_in
write "The fish tank is about three metres by six metres and divided evenly "
write "in half by a glass partition. One half of the tank is filled with "
write "fish, almost all dead, while the other appears to be filled with many "
write "young, healthy fish. Two large probes reach down into the water, one "
write "into each half. Attached to each probe is a set of wires that run " 
write "along the roof then down into the top of the bank of instruments. "
write "Large bubbles of air come from several openings in the bottom of the "
write "tank, rising to break at the surface.^"
}

{climb
write "The walls of the tank are perfectly smooth, and therefore "
write "unclimbable.^"
}

{enter
write "The tank is too high off the ground to get into.^"
}

{return
write "You would seriously hurt your hand if you attempted that.^"
}
 
{break_with_wooden_chair
write "Swinging the wooden chair with all your strength, it bounces off "
write "fish tank's wall. On closer examination you estimate the glass to be "
write "over an inch thick.^"
}

{knock_on
write "The glass walls of the fish tank sound inches thick.^"
}

object probes: probes probe
 has		OUT_OF_REACH PLURAL
 short		the "probes"

{examine
write "Like something out of a nineteen seventies sci-fi movie, the probes "
write "have flat discs circling them at intervals, gradually decreasing in "
write "diameter towards the tip.^"
}

object discs: flat discs
 has		OUT_OF_REACH PLURAL
 short		the "flat discs"

{examine
write "The discs appear to be made from some sort of translucent plastic.^"
}

object wires: wires
 has		OUT_OF_REACH PLURAL
 short 		the "wires"

{examine
write "The wires run from the tops of the probes, along the ceiling, then "
write "down into the bank of instruments.^"
}

object frame: steel frame stand
 short		a "steel frame"

{climb
write "The steel frame leads nowhere.^"
set time = false
}

object instruments: tall bank of instruments dials knobs switches buttons
 short		a "bank of instruments"

{examine
write "The bank of instruments consists of many dials, switches, knobs and "
write "buttons, none of which make the slightest bit of sense to you.^"
}

{look_behind
write "The bank of instruments is right up against the wall.^"
}

{move
write "You can't even get the bank of instruments to budge an inch.^"
}

object compressor: electrical air compressor
 short		an "air compressor"

{examine
write "The compressor is powered by electricity and is pumping large "
write "amounts of air into the tank.^"
}

{turn_off
write "There is no obvious way to switch the compressor off.^"
}

{turn_on
write "The compressor is already on.^"
}

location south_beach : south beach
 short	 	the "south beach"
 has		OUTDOORS KNOWN
 north		estuary
 northeast	behind_hangar

{eachturn
set BEACH_SCRIPT + 1
if BEACH_SCRIPT = 20
   write "^Several hundred metres away from the shore, you spot several "
   write "dolphins bobbing in and out of the water playfully, only to "
   write "lose them again moments later.^"
   set BEACH_SCRIPT = 0
endif
move bushes to here
}

{movement
if compass = south : compass = southwest : compass = southeast
   write "There is no need to go swimming here.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You are again at the south beach.^"
   return
endif
write "Stretching out before the gently rolling waves of the Pacific Ocean, "
write "this beach is undoubtedly the most beautiful on the island. Fresh " 
write "water from the surrounding hills flows down to meet the ocean here, "
write "digging deep grooves in the soft white sand. To the northeast, "
write "through a band of sparse costal bushes, you can make out the back of "
write "a large hangar.^"
}

{listen
write "The sound of gently rolling waves fills you ears.^"
}

object bushes : sparse coastal bushes
 short		the "sparse coastal bushes"

{examine
write "The bushes sparse from a life exposed to fierce tropical storms.^"
}

object dolphin: dolphin dolphins
 has		PLURAL
 short		the "dolphins"
 parent		nowhere

location hill : hill
 short		the "hill"
 has		OUTDOORS
 southeast	estuary
 down		estuary
 north		shed
 in		shed

{movement
if destination = nowhere
   write "You can enter the shed to the north or follow the stream back "
   write "down to the south-east.^"
   return
else
   return false
}

{look
if here has VISITED
   write "Once again, you are standing on the grassy hill.^"
   return
endif
write "The side of this grassy hill affords a magnificent view of the "
write "south coast of the island. Much more hospitable than the shear "
write "cliffs of the north, the long white sandy beach has been a popular "
write "spot for fishing, swimming or just lying about in the warm tropical "
write "sun. "
if here hasnt SOLVED
   write "Looking around, you almost didn't notice a small wooden shed, "
   write "partially covered in camouflage netting, standing crooked on the "
   write "north bank of the stream.^"
   ensure here has SOLVED
   return
endif
write "A small wooden shed, partially covered in camouflage netting, stands "
write "crooked on the north bank of the stream.^" 
}

object netting: camouflage netting
 short		the "camouflage netting"

{examine
write "The netting contains many strips of green and brown cloth. Although "
write "covering most of the shed, it has been pulled aside by the doorway "
write "allowing you access.^"
}

{take : remove
write "It would take more than a few men to remove the netting.^"
set time = false
}

object shed_obj: shed
 short		a "shed"

{examine : look_in
write "The wooden shed, enterable to the north, is in an obvious state of "
write "disrepair.^"
}

{enter
proxy "go north"
}

object stream: sparkling stream
 short		a "sparkling stream"

{examine
write "The stream flows from further up the hill, down past the front of "
write "the shed, then on to the southeast towards the ocean.^"
}

{drink
if stream has CUSTOM1
   write "You are still feeling a bit on the waterlogged side.^"
   set time = false
   return
endif
write "You give it your best shot, but you are full before it is finished.^"
ensure stream has CUSTOM1
}

{drink_from
write "You're not thirsty.^"
set time = false
}

location shed : disused shed
 short		the "shed"
 south		hill
 out		hill

{look
if here has VISITED
   write "You are back in the disused shed.^"
   return
endif
write "Many crooked shelves line the walls of this disused shed. Its door, "
write "long ago ripped from its hinges, lies flat on the floor beside a large "
write "red metal drum. The ground can be seen clearly beneath your feet "
write "through large gaps in the decaying floor boards.^" 
}

{first_hint
write "EXAMINE THE DRUM carefully.^"
set time = false
}

{second_hint
write "Take a LOOK IN THE HOLE.^"
set time = false
}

{third_hint
write "Don't forget to LOOK BEHIND THE DRUM.^"
set time = false
}

object boards: decaying floor boards
 has		SURFACE PLURAL
 short		the "decaying floor boards"
 quantity	100

{examine
write "The floor boards around the drum are stained a dark brown colour.^"
}

object gaps: gaps between decaying floor boards
 short		the "gaps between the floor boards"

{examine
}

object shelves: crooked shelves shelf
 has		SURFACE PLURAL
 short		the "crooked shelves"
 quantity	30

{examine
write "The shelves are lined with a variety of metal and plastic "
write "containers, all bearing warnings as to their poisonous nature.^"
}

object containers: metal plastic containers
 has		PLURAL
 short		the "metal and plastic containers"

{examine
write "Most of the containers hold substances you have never heard of.^"
}

object bullet_hole: small bullet hole
 short		a "small hole"

{examine
write "The hole is about the size of a five cent piece. The metal around "
write "its edges appears to have been pushed in with great force.^"
}

{look_through : look_in
write "At first you see nothing but blackness. However, as you continue to "
write "peer through, bobbing your head from side to side, you notice a dim "
write "spot of light. Focusing more intently, you come to realise it is "
write "another hole in the far side of the drum.^"
}

object bullet: bullet
 short		a "bullet"

{take
write "Try as you might, the bullet is too firmly embedded to remove.^"
}

object drum: red metal drum
 has		SURFACE CLOSABLE CLOSED
 short		a "red drum"
 quantity	15

{examine
write "The drum is painted red. A large label on its side reads:^^"
write ""
style preformatted
write "    WARNING Poison S2^"
write "    ROTOL^"
write "    20g/L Rotenone actives^"
write "    810g/L Toluene solvent^"
write ""
style plain
write "^The base of drum has been stained dark brown by the apparent "
write "leaking of its contents through a small hole in its side.^"
}

{look_behind : move : turn
write "Looking around behind the drum, you notice there is another hole "
write "directly opposite to, and slightly lower than, the one on the front. "
if bullet hasnt SCORED
   write "As you step back to stand up straight again, the cause of the "
   write "damage to the drum becomes evident. A bullet, firmly embedded in "
   write "the base of the wall, lines up perfectly with the two holes.^"
   points 5
   ensure bullet has SCORED
   return
endall
write "Directly in line with the two holes is a bullet, firmly embedded into "
write "the base of the wall.^"
}

{open
write "The drum is sealed tight.^"
}

object contents: drums drum's contents dark brown stain substance glue
 short		the "dark brown substance"
 
{examine
write "The dark brown substance was obviously once the contents of the drum.^"
}

object label: red metal drum label 
 short		the "drum label"

{take
write "It would be impossible to peel the label off the drum without "
write "tearing it in to a hundred pieces.^"
}

{examine : read
execute "examine_drum"
}

object rotenone: quantity of rotenone derris rotol
 short		a "quantity of rotenone"
 parent 	drum
 mass	 	2	
	
{examine
execute "examine_drum"
}

{look_up_in_book
write "rotenone^"
write "[C10 H18 O] "
write "a long-known insecticide derived from various tropical plants, "
write "especially species of Derris and Lonchocarpus. The plants have been "
write "used by natives in some cultures for hunting fish due to its effect of "
write "paralysing their respiratory systems, effectively causing them to "
write "drown. The poisonous ingredient, sometimes called derris, is a dark "
write "brown liquid extracted from the root.^"
}

object shed_door: shed door
 short		a "shed door"

{take
write "Far too heavy and useless to consider lugging around.^"
set time = false
}

{examine
write "By all accounts, a door (just not a very healthy one).^"
}

{open
write "It's sort of permanently open.^"
}

{close
write "Not without the aid of several power tools you won't.^"
}

location compound : compound
 short		the "compound"
 has		OUTDOORS KNOWN
 west		estuary
 north		office
 east		base
 south		hangar_north

{eachturn
set MPS_SCRIPT + 1
if MPS_SCRIPT = 3 
   write "^The MP indulges in an absent minded scratch.^"
endif
if MPS_SCRIPT = 6
   write "^The MP shifts his weight from one foot to the other.^"
endif
if MPS_SCRIPT = 9
   write "^The MP squints briefly into the sky.^"
   set MPS_SCRIPT = 0 
endif
}

{look
if here has VISITED
   write "You are standing in the main compound again.^"
   return
endif
write "The compound is a reasonably low-key affair, nothing more than a large "
write "cleared area of bare earth. A small hut to the north serves as the "
write "CO's office while a large hangar stands to the south. The majority of "
write "the base lies further to the east.^"
}

object hangar_obj2: hangar large building
 short		a "hangar"

{examine
write "The hangar is an enormous building guarded by an enormous MP. The "
write "front wall of the hangar has a large main door and a smaller access "
write "door for people to come and go.^" 
}

object guard: burly mp guard man
 has		ANIMATE POSSESSIVE
 short		the "MP"
 long		"A burly MP stands guard at the door to the hangar.^"
 mass		heavy

{greet
write "The MP continues to stare straight ahead.^"
}

{kiss
write "Didn't your mother warn you about kissing strange men with M16s?^"
}

{hug
write "Didn't your mother warn you about hugging strange men with M16s?^"
}

{talk_to
if guard hasnt CUSTOM4
   write "You inquire of the MP as to the possibility of taking a look "
   write "around the hangar, to which he replies, ~Only Dr Zuckerman, or "
   write "personnel personally signed in by Dr Zuckerman, may pass this "
   write "point.~^"
   ensure guard has CUSTOM4
   return
endif
write "The MP stares blankly ahead, barely acknowledging your presence.^"
}

{ask_about_hangar_obj
write "~The hangar is a restricted area, Dr Meadows, and its contents "
write "classified.~^"
}

{examine
write "The MP stands tall and straight by the door to the hangar with an "
write "M16 machine gun slung over his shoulder.^"
}

{attack
write "You have to be joking.^"
set time = false
}

{tell_about_rope : tell_about_rope_end : tell_about_stranger 
if lisa has BURNING
   write "~Yes, I am well aware of the situation, Dr Meadows,~ the MP "
   write "replies.^"
   return
endif
write "The guard gives you wary look of disbelief, quietly unlocks the "
write "door, opens it a crack, then peers through. "
if lisa has CUSTOM3
   write "Spying Lisa bound and gagged, he kicks open the door and enters the "
   write "hangar. Through the open doorway you see him, gun drawn, ordering "
   write "the stranger onto the ground. You almost hit your head against the "
   write "frame of the door as two more MPs push past you into the hangar, "
   write "eventually helping to lead the stranger and Lisa (who is "
   write "foruntately safe and sound), out into the compound.^" 
   write "Inevitably, you spend the rest of your stay on the island "
   write "explaining to Colonel Wise exactly what you were doing in the "
   write "hangar in the first place.^" 
   execute "+game_over"
   return
endif
write "Spying the stranger, he kicks open the door and enters the hangar. "
write "Through the open doorway you see him, gun drawn, ordering the "
write "stranger on to the ground. You almost hit your head against the "
write "frame of the door as two more MPs push past you into the hangar, "
write "eventually helping to lead the stranger out into the compound.^" 
write "Inevitably, you spend the rest of your stay on the island explaining "
write "to Colonel Wise exactly how you knew about the stranger in the "
write "first place.^" 
execute "+game_over"
}

{tell_about_lisa
if lisa has CUSTOM3
   proxy "tell guard about stranger"
   return
endif
return false
}

object machine_gun: guards guard's his machine rifle gun m16
 short		a "machine gun"
 parent guard
 mass		15

{examine
write "About the only thing you know about the MP's M16 is that you don't "
write "like the look of it.^"
}

location base : main base
 short		the "main base"
 has		OUTDOORS KNOWN
 west		compound
 east		pad
 up			pad

{movement
if compass = down : compass = in : compass = out
   write "You can't go that way.^"
   return
endif
if destination = nowhere
   write "Most of the structures are either private or restricted.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You have arrived back at the main base.^"
   return
endif
write "The base here is alive with people coming and going. A large tower, "
write "ultimately destined to house many meteorological instruments, is "
write "currently under construction. Sturdy tents and pre-fab structures lie "
write "to the north and south while to the east a set of roughly hewn steps "
write "lead up to a helicopter pad.^" 
}

{listen
write "All you can hear is the sound of power tools.^"
}

{look_up
write "Work is still going at the top of the tower.^"
}

object tower: meteorological tower
 short		a "meteorological tower"

{examine
write "The tower is about three quarters finished, its tall steel frame "
write "now standing over twenty metres tall.^"
}

{climb
write "I agree, that does sound like a lot of fun, but it's also a bit too "
write "dangerous.^"
set time = false
}

{move
write "Try as you might, you just can't manage to push the tower over.^"
}

location pad : helicopter pad
 short		the "helicopter pad"
 has		OUTDOORS KNOWN
 west		base
 down		base

{movement
if destination = nowhere 
   write "Back down the steps is the only way from here.^"
else
   return false
}

{look
if here has VISITED
   write "You have returned to the helicopter pad.^"
   return
endif
write "Cut into the side of a gentle hill, the helicopter pad is surfaced "
write "by nothing more than compacted earth. The surrounding area is quite "
write "barren, stripped of all vegetation over a metre tall.^"
}

object vegetation : vegetation
 short		the "vegetation"

{examine
write "Only a handfull of low-lying bushes remains.^"
}

object helicopter: helicopter
 short		a "helicopter"
 parent		nowhere

location office : colonel wises wise's office
 short		name "Colonel Wise's office"
 has		KNOWN
 south		compound
 out		compound

{eachturn
set WISES_SCRIPT + 1
if WISES_SCRIPT = 5
   write "^Emitting and enormous racket, Colonel Wise's phone barely "
   write "rings twice before he answers it with a bland, ~Wise~. " 
   write "A terse conversation ensues, through which you wait patiently "
   write "until he eventually slams the handset back down onto its cradle.^"
endif
}

{movement
if compass = south
   write "Excusing yourself to Colonel Wise, you turn to leave.^"
   return false
endif
if destination = nowhere
   write "The only exit is back out to the south.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You are back in Colonel Wise's office.^"
   return
endif
write "Leaning back in his chair, feet on his desk and hands behind "
write "his head, is Colonel Wise. Many years older now than in the "
write "black-and-white photographs that adorn the walls, he is obviously a "
write "man of great experience. The blades of a slowly turning ceiling fan "
write "cut through the golden rays of the afternoon sun casting flickering "
write "shadows across the floor.^" 
}

{first_hint
write "If you give your final report to Colonel Wise you will leave the "
write "island.^"
set time = false
}

{second_hint
write "Depending of whether you have had a better offer or not, you may "
write "only end up going home.^"
set time = false
}

{third_hint
write "Once you have shown the stranger the green slide and the diary, "
write "give Colonel Wise the report and you will be on your way to "
write "Monte Carlo.^"
set time = false
}

object photos: photos black-and-white photographs
 has		PLURAL
 short		the "photographs"

{examine
write "The photographs are mostly action shots from training exercises.^"
}

{look_behind
write "There is, quite surprisingly, a wall there.^"
}

object cos_desk: colonel colonels colonel' wise wises wise's desk
 has		SURFACE
 short		a "desk"
 quantity	30

{examine
write "The desk is not exactly what would expect a colonel to be "
write "sitting behind. "
execute "+details<noun1"
write ^
}

object telephone: colonel wises wise's telephone rap-rod phone
 short		name "Colonel Wise's telephone"
 parent 	cos_desk

{take
write "I don't think Colonel Wise would appreciate you walking off with his "
write "telephone.^"
}

object feet: colonel wises wise's feet smelly
 has		PLURAL
 short		name "Colonel Wise's feet"
 parent 	cos_desk

{take
write "Give me a break.^"
}

{examine
write "No clues there.^"
}

{move
write "Moving a man's feet off his own desk is just plain rude.^"
}

{sniff
write "Is passing out one of your favourite hobbies?^"
}

object fan: slow turning ceiling fan
 has		OUT_OF_REACH
 short		a "ceiling fan"
 
{examine
write "The slowly turning ceiling fan is made from woven bamboo.^"
}

object wise: officer colonel wise man
 has		ANIMATE POSSESSIVE
 short		name "Colonel Wise"

{ask_about_helicopter
write "~When you give me that report of yours, I will call through to the "
write "transport division and get a pilot to fly you out to the mainland.~^"
}

{greet
write "You nod your head slightly in reluctant recognition of Colonel "
write "Wise's existence. He does not repsond.^"
}

{talk_to
write "You find it hard to think of anything to say to Colonel Wise that "
write "wouldn't get you arrested.^"
}

{tell_about_bullet : tell_about_drum : tell_about_hole
if drum hasnt CUSTOM4
   write "~This is a military base, Doctor Meadows, accidents do happen. "
   write "Just be thankful it was only a metal drum and not yourself.~^"
   write "Taking Colonel Wise's point, you decide not to press the matter.^"
   ensure drum has CUSTOM4
   return
endall
write "~If you spend less time poking your nose where it isn't wanted "
write "and more time where it is, you might actually get that report finished "
write "before I have you thrown off my base for trespassing!~"
}

{attack
write "Colonel Wise is an ex-frontline Marine; you, on the other hand, are "
write "a scientist. I know who I'd put my money on.^"
}

{ask_for_vial
if vial(parent) != wise
   write "~I don't know what you're talking about,~ Colonel Wise replies.^"
else
   write "Colonel Wise doesn't even begin to look like giving the vial back.^"
}

{ask_about_hangar_obj
write "~That hangar, Dr Meadows, has absolutely nothing to do with the "
write "investigation we are paying you to perform. Perhaps you should stop "
write "asking irrelevant questions and get on with your job.~^"
}

{ask_about_zuckerman
write "Colonel Wise appears put out by your question regarding Dr Zuckerman. "
write "~Dr Zuckerman, unlike you, is a man who keeps his mind on his job,~ "
write "he replies eventually.^"
}

{ask_about_wise
write "~I don't see any need for you to know any more about me than you "
write "already do, Dr Meadows,~ Colonel Wise replies disdainfully.^"
}

{tell_about_rope : tell_about_rope_end : tell_about_stranger 
if lisa has BURNING
   write "~Yes, I am well aware of the situation, Dr Meadows,~ "
   write "Colonel Wise replies.^"
   return
endif
write "~If you have any security concerns, Dr Meadows, be sure to take them "
write "up with one of the MPs,~ Colonel Wise replies.^"
}

{tell_about_lisa
if lisa has CUSTOM3
   proxy "tell wise about stranger"
   return
endif
return false
}

object jacket: formal jacket
 has		WEARABLE WORN
 short		a "formal jacket"
 long		"Your jacket is here.^"
 mass		10
 parent		nowhere

{examine
write "Although normal to look at, the jacket has a microphone and "
write "transmitter sewn into its lining.^"
}

object transmitter : hidden microphone transmitter
 short		a "hidden microphone"
 parent		jacket

{drop
if here = van
   write "~Without you having the jacket on you, we won't be able to here a "
   write "word Zuckerman says,~ Agent Petrescu reminds you.^"
   return
endif
return false
}

object ear_piece: ear piece
 has		WEARABLE WORN
 short		an "ear piece"
 long 		"The miniature ear piece is here.^"
 mass		1
 parent		nowhere

{remove
if here = van
   write "~Leave it in, Alex, you'll need it,~ Agent Petrescu says to you.^"
   return
endif
return false
}

{drop
if here = van
   write "~Take it with you, Alex, you'll need it,~ Agent Petrescu says to "
   write "you.^"
   return
endif
return false
}

location van : van
 short		a "van"
 has		KNOWN
 out		nowhere
 east		nowhere

{eachturn
move van_obj to van 
move van_doors to van
if VAN_ABSENCE > 0
   if VAN_ABSENCE < 20
      write "^~Back already,~ Agent Petrescu says as you climb into the "
      write "van. ~Not having second thoughts, I hope.~^"
      set VAN_ABSENCE = 0
endall
if VAN_ABSENCE >= 20
   write "^~What are you doing back here, you haven't got a confession "
   write "out of Dr Zuckerman yet!~ Agent Petrescu exclaims.^"
   set VAN_ABSENCE = 0
endall
}

{movement
if destination = false
   if compass = east : compass = out
      write "The sliding door is closed.^"
      return true
   endif
   return false
endif
return false
}

{look
if here has VISITED
   write "You are back in the van.^"
   return
endif
write "You are in the back of a large white van with all manner of monitoring "
write "equipment lining the walls. A "
if van_doors has CLOSED
   write "closed,"
else
   write "open,"
endif
write " windowless sliding door to the east is the only exit from the "
write "vehicle.^"
}

{first_hint
write "There is nothing to do here, it all happens in the hotel across the "
write "road.^"
set time = false
}

object equipment: monitoring equipment
 short		the "monitoring equipment"

{turn_on : turn_off : use
write "I don't think you should be touching the monitoring equipment.^"
}

{examine
write "The monitoring equipment includes several small black-and-white "
write "video monitors, a microphone, a radio scanner and a reel-to-reel tape "
write "recorder.^"
}

object microphone: microphone desktop mic
 short		a "desktop microphone"

{turn_on : turn_off : use
write "I don't think you should be touching the monitoring equipment.^"
}

object video_monitors: black-and-white black and white video monitors
 has		PLURAL
 short 		the "black-and-white video monitors"
	
{turn_on : turn_off : use
write "I don't think you should be touching the monitoring equipment.^"
}

{examine
write "The black-and-white video monitors are all blank at the moment "
write "except for one that is showing tonight's football.^"
}

object scanner: radio scanner
 short		a "radio scanner"

{turn_on : turn_off : use
write "I don't think you should be touching the monitoring equipment.^"
}

object reel-to-reel: reel-to-reel reel to reel tape recorder
 short		a "reel-to-reel tape recorder"

{turn_on : turn_off : use
write "I don't think you should be touching the monitoring equipment.^"
}

object van_doors: sliding door
 has		CLOSED CLOSABLE
 short		the "sliding door"

{open_override
write "You open the sliding door.^"
ensure van_doors hasnt CLOSED
set van(out) = street
set van(east) = street
set street(in) = van
set street(west) = van
}

{close_override
write "You close the sliding door again.^"
ensure van_doors has CLOSED
set van(out) = nowhere
set van(east) = nowhere
set street(in) = nowhere
set street(west) = nowhere
}

object hughes: special agent hughes man
 has		ANIMATE POSSESSIVE
 short		name "Agent Hughes"
 long 		"Agent Hughes is sitting here, wearing a set of headphones.^"
 mass		heavy

{attack
write "Not a good idea.^"
set time = false
}

{ask_about_jacket : ask_about_headphones
if jacket has CUSTOM4
   write "~I've already told you about that,~ Agent Hughes snaps, obviously "
   write "keen for you to stop stalling and get on with the job.^"
   return
endif
write "~The jacket has a transmitter sewn into its lining. This allows me "
write "to hear everything that is going on around you from here in the van.~^"
ensure jacket has CUSTOM4
}

{ask_about_ear_piece
if ear_piece has CUSTOM4
   write "Agent Hughes just shakes his head.^"
   return
endif
write "~While ever you are wearing the earpiece, I will be able to communicate "
write "with you from here in the van. I'll use it to let you know when "
write "we have enough information out of Zuckerman.~^"
ensure ear_piece has CUSTOM4
}

{talk_to
if hughes has CUSTOM1
   write "~There'll be time to talk later, Alex,~ Agent Hughes responds, "
   write "cutting you short.^"
   return
endif
write "Agent Hughes swivels around in his chair to face you. "
write "~Just be sure to talk to him one scientist to another - it's the only "
write "way you are going to get him to open up. As I said earlier, once he "
write "has divulged enough information about the project, I will let you "
write "know and you can work on getting out of there.~^" 
ensure hughes has CUSTOM1
}

{ask_about_petrescu
if petrescu has CUSTOM3
   write "~What else do you expect me to say while he's sitting right next "
   write "to me!~ Agent Hughes replies.^"
   return
endif
write "~Oh, he's not a bad bloke I guess,~ Agent Hughes grins.^"
ensure petrescu has CUSTOM3
}

{ask_about_stranger : tell_about_stranger
if stranger has CUSTOM3
   write "Agents Hughes and Petrescu just shake their heads.^"
   return
endif
write "As you ask about the stranger, both Agent Hughes and Agent Petrescu "
write "begin to laugh.^"
write "~Don't worry about him,~ Agent Hughes says.^"
write "~He's just watched one too many Bond movies,~ Agent Petrescu adds.^"
ensure stranger has CUSTOM3
}

{examine
write "Quite a solid man, Agent Hughes has a mop of curly blonde hair.^"
}

{ask_about_zuckerman
if van_obj has CUSTOM1
   write "~We'll know a lot more once you go and talk to him,~ Agent Hughes "
   write "replies.^"
   return
endif
write "~We've been tracking him for some time now,~ Agent Hughes begins, "
write "~though reliable information has been hard to come by. He has managed "
write "to keep a remarkably low profile up until now, which hasn't made our "
write "job easy.~^"
}

{ask_about_van
write "~Ah, she's a wee rippa!~ Agent Hughes exclaims, much to your dismay.^"
}

{ask_about_equipment : ask_about_scannar : ask_about_microphone : ask_about_reel-to-reel :ask_about_video_monitors
write "~We don't really have time for this now, Alex,~ Agent hughes replies.^"
}

object headphones: headphones
 has		WORN
 short		the "headphones"
 parent 	hughes
 mass		5

object petrescu: special agent petrescu man
 has		ANIMATE POSSESSIVE
 short		name "Agent Petrescu"
 long		"Agent Petrescu is standing stooped in the van.^"
 mass		heavy

{thank
write "~No -- thank you, Dr Meadows,~ Agent Petrescu replies.^"
}
 
{ask_about_equipment : ask_about_scannar : ask_about_microphone : ask_about_reel-to-reel :ask_about_video_monitors
write "~Perhaps we can give you a run down on the equipment later,~ Agent "
write "Petrescu says, obviously eager for you to get going.^"
}

{ask_about_zuckerman
if van_obj has CUSTOM1
   write "~We'll know a lot more once you go and talk to him,~ Agent "
   write "Petrescu replies.^"
   return
endif
write "~We've been tracking him for some time now,~ Agent Petrescu begins, "
write "~though reliable information has been hard to come by. He has managed "
write "to keep a remarkably low profile up until now which hasn't made our "
write "job easy.~^"
}

{attack
write "Not a good idea.^"
set time = false
}

{ask_about_ear_piece
write "Agent Petrescu, admitting he's not the expert, turns to Agent Hughes"
if ear_piece has CUSTOM4
   write " who just shakes his head.^"
   return
endif
write " who replies, "
execute "ask_about_ear_piece_hughes"
}

{ask_about_jacket
if jacket has CUSTOM4
   execute "ask_about_jacket_hughes"
   write "You turn back to agent Petrescu who just shrugs.^"
   return
endif
write "Before Agent Petrescu has a chance to answer, Agent Hughes interrupts, "
execute "ask_about_jacket_hughes"
}

{talk_to
if petrescu has CUSTOM1
   write "~If we keep talking, the conference will be over before you get "
   write "in there,~ Agent Petrescu says with a smile.^"
   return
endif
write "~You're going to be fine,~ Agent Petrescu reassures you. ~Dr "
write "Zuckerman, as unethical as he may be, poses no threat. Well, not to "
write "you anyway.~^"
ensure petrescu has CUSTOM1
}
  
{ask_about_hughes
if hughes has CUSTOM3
   write "~I'm not about to change my mind in a hurry,~ Agent Petrescu "
   write "replies.^"
   return
endif
write "~He's a grumpy old bastard if you ask me,~ Agent Petrescu says with "
write "his tongue firmly embedded in his cheek.^"
ensure hughes has CUSTOM3
}

{ask_about_stranger : tell_about_stranger
execute "ask_about_stranger_hughes"
}

{examine
write "You can't help but think Agent Petrescu looks a little bit like "
write "David Duchovny.^"
}

location street : street
 short		the "street"
 has		OUTDOORS KNOWN
 in			van
 west		van
 north		driveway

{movement
if destination = false
   write "You can either go north towards the hotel or back into the van.^"
else
   return false
}

{look
if here has VISITED
   write "You are out on the street, opposite the Hotel Les Terrasses d'Eze.^"
   return
endif
write "Light from the street lamps is softened by a dense fog that is slowly "
write "beginning to roll in. To the south you can see down the steep rocky "
write "cliffs out across the Mediterranean Sea. To the west, parked against "
write "the curb, is a white Mercedes van while the Hotel Les Terrasses d'Eze "
write "lies across the road to the north. The sliding door to the van is "
write "currently "
if van_doors has CLOSED
   write "closed.^"
else
   write "open.^"
endif
} 

{look_south
write "You can see down the steep rocky cliffs out across the Mediterranean "
write "Sea.^"
}

{look_up
write "The light drizzle moistens your face.^"
}

object street_lamps: street lamps lamp
 has		OUT_OF_REACH
 short		the "street lamps"

{examine
write "Light from the street lamps is softened by a dense fog that is "
write "slowly beginning to roll in.^"
}

{climb
write "The street lamps are too slippery to climb due to the light rain.^"
}

object fog: dense fog
 short		the "dense fog"

{examine
write "The dense fog is slowly rolling in from over the sea.^"
}

object hotel_obj: hotel les terrasses d'eze
 short		the "Hotel Les Terrasses d'Eze"

{examine
write "Only five stories tall, the Hotel Les Terrasses d'Eze is quite a grand "
write "old building. Its broad structure is made almost entirely from carved "
write "stone blocks.^"
}

{enter
proxy "north"
}

object van_obj: white mercedes van
 short		a "white Mercedes van"

{open
proxy "open sliding door"
}

{close
proxy "close sliding door"
}

{enter
if here = van
   write "You are already in the van!^"
   return
endif
proxy "in"
}

{look_under
if here = van
   write "You can't see under the van while you are in it.^"
   return
endif
write "Just dirty water flowing along a shallow stone gutter.^"
}

location driveway : driveway
 short		the "driveway"
 has		OUTDOORS KNOWN
 north		lobby
 south		street
 southeast	street
 southwest	street

{eachturn
move guests to here
move hotel_obj to here
ensure hotel_obj hasnt OUT_OF_REACH
}

{movement
if compass = south : compass = southwest : compass = southeast
   write "Dodging cars, you make your way back out to the street.^"
   return false
endif 
if compass = northeast : compass = northwest : compass = down
   write "There is no pedestrian access to the underground car park from here.^"
   return
endif
if compass = north
   write "As you approach the front doors of the hotel, one of the uniformed "
   write "men opens them and bids you a good evening.^^"
   return false
endif
return false
}

{look
if here has VISITED
   write "Once again, you are standing in the hotel driveway.^"
   return
endif
write "Several uniformed men stand here escorting hotel guests from their "
write "cars into the brightly lit lobby to the north. Valet parking "
write "attendants briskly dispatch each private vehicle to the hotel's "
write "underground car park while an endless stream of hire cars come and "
write "go at a chaotic rate.^"
}

{look_east
write "To the east the driveway curls down to the entrance of the "
write "underground car park.^"
}

{look_west
write "To the west the driveway curls down to the exit of the underground "
write "car park.^"
}

{look_southwest
write "Cars enter from the street to the southwest.^"
}

{look_southeast
write "Cars exit to the street to the southeast.^"
}

object attendants: valet parking attendants
 has		ANIMATE PLURAL
 short		the "valet parking attendants"

object door_men: uniformed men doormen doorman
 has		ANIMATE PLURAL
 short		the "uniformed men"

{greet
write "One of the uniformed men bows politely and bids you a good evening.^"
}

{examine
write "The uniformed men look like something out of a story book. Brightly "
write "polished shoes and brass buttons, their presentation is impeccable.^"
}

location lobby : lobby
 short		the "lobby"
 has		KNOWN
 south		driveway
 north		ground_floor
 northeast	mezzanine
 northwest	mezzanine
 up		mezzanine
 east		concierge_desk
 west		bar
 
{movement
if compass = northeast : compass = northwest
   write "The stairs turn a half-circle as you ascend to the mezzanine level.^"
endif
return false
}

{look
if here has VISITED
   write "You have arrived back at the hotel lobby.^"
   return
endif
write "Tall marble pillars stretch from the polished floor to the "
write "ceiling several stories above your head. Ahead of you to the northeast "
write "and northwest, wide stairs turn a half circle from each side of the "
write "room, leading up to the mezzanine level. "
write "Directly north, in between the stairs, you can see the lifts. "
write "Light from an elaborate chandelier reflects brightly off the gold "
write "leaf trimmings that edge banisters and floor tiles. "
write "To the east several hotel guests are milling around the concierge "
write "desk while a dimly lit piano bar can be entered to the west.^"
}

object sign: a-frame sign
 short		an "A-frame sign"
 long		"An A-frame sign stands to one side.^"
 mass		heavy

{examine : read
style preformatted
write "The sign reads...^^"
write "   12th Annual Microbiology Conference^"
write "               third floor^"
write "             KEYNOTE SPEAKER^"
write "            Dr Leif Zuckerman^"
write "       Sponsored by the Anderson-Dale^"
write "        Centre for Genetic Research^"
}

object stairs_bottom: wide stairs
 has		PLURAL
 short		the "wide stairs"

{examine
write "The stairs are made from marble and covered with a thick, richly "
write "coloured carpet. The railings are made from a highly polished "
write "hardwood, inlaid with gold edging.^"
}

{climb : climb_up
proxy "go up"
}

{climb_down
write "You are already at the bottom of the stairs.^"
}

object chandelier: elaborate chandelier
 has		OUT_OF_REACH
 short		an "elaborate chandelier"
	
{examine
write "You can't help but think the chandelier is a little bit over the top.^"
}

location concierge_desk : concierge man desk 
 short		the "concierge desk"
 has		KNOWN
 west		lobby
 out		lobby

{movement
if destination = false
   write "The only exit from here is back west into the lobby.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You are now back at the concierge desk.^"
   return
endif
write "Several hotel guests are standing here before a long curved counter, "
write "carefully keeping an eye on their luggage. A set of wooden pigeon "
write "holes line the far wall.^"
}

{first_hint
write "You are going to need to know the name of someone who is attending the "
write "conference who is able to come down. You will also need the name of "
write "someone they would bother to come down for.^"
set time = false
}

{second_hint
write "The elderly man in the piano bar has a friend attending the "
write "conference, try to find out his name and the name of his friend.^" 
write "Once the person has been paged, you will want to make sure they come "
write "down in the lift you want. The only way to make this happen is to "
write "ensure they only have one choice.^"
set time = false
}

{third_hint
write "All you need to do is:^"
write "  >TELL THE CONCIERGE ABOUT THE FLICKERING LIGHT^"
write "  >CONCIERGE, PAGE GULLIT^"
write "  >CONCIERGE, ZOLA^"
set time = false
}

object guests: hotel guest guests
 has		PLURAL ANIMATE
 short		the "hotel guests"

object luggage: hotel guests guest's luggage
 has		OUT_OF_REACH
 short		the "guest's luggage"

{take
write "I don't think the hotel guests would appreciate that.^"
set time = false
}

object hotel_phone: hotel concierge's concierges telephone phone
 short		the "concierge's telephone"
 parent 	long_counter
 mass		heavy

{take
write "I think the concierge might having something to say about you "
write "walking off with his telephone.^"
}

object holes: pigeon holes
 has		PLURAL OUT_OF_REACH
 short		the "pigeon holes"

{examine
write "The pigeon holes contain a variety of keys and phone messages.^"
}

object keys: variety of keys key
 has		PLURAL OUT_OF_REACH
 short		the "variety of keys"

object messages: guests guest's phone messages notes message note letter
 has		PLURAL OUT_OF_REACH
 short		the "phone messages"

{read : examine
write "Only one of the messages is angled in such a way that allows you to "
write "see it clearly and it reads, ~Played your game last night and loved "
write "it, a definite ten out of ten, Dave Lebling~.^"
}

object guest_list: conference hotel guest list
 has		OUT_OF_REACH
 short		the "guest list"

{read : examine
write "The writing on the guest list is too small to read from here.^"
}

object concierge: concierge man
 has		ANIMATE
 short		the "concierge"
 long		"A single concierge stands behind the counter.^"
 mass		heavy

{ask_for_mil_key
write "~I'm sorry. I am not authorised to issue you with a MIL key,~ the "
write "concierge replies.^"
}

{tell_about_zola
if WHO_I_AM = false
   if PAGE_REQUESTED != false
      proxy "tell concierge my name is zola"
      return
endall
return false
}

{ask_for_guest_list
write "~I am sorry, the guest list is confidential so I am unable to give "
write "it to you,~ the concierge apologises.^"
}

{talk_to
if concierge has CUSTOM2
   write "The concierge doesn't appear to have time for idle conversation.^"
   return
endif
if concierge has CUSTOM4
   write "~If you know of someone who could sign you in, just ask me to "
   write "page them for you,~ the concierge reaffirms politely.^" 
   return
endif
write "You explain to the concierge how you had been invited to attend the "
write "conference this evening, only to have your bag stolen containing both "
write "your invitation and your identification.^^" 
write "~The best I can do is to have one of the other guests sign you "
write "in. If there is anyone you know who would be willing to come down, I "
write "would be happy page them for you,~ the concierge explains.^"
ensure concierge has CUSTOM4
}
 
{ask_to_page_zuckerman_override
if concierge has CUSTOM1
   write "~I am afraid Monsieur Zuckerman is currently unavailable.~^"
   return
endif
write "~One moment...~ the concierge says as he picks up the telephone.^"
write "After a few brief words, he hangs the phone up again and turns back to "
write "you. ~I am afraid Monsieur Zuckerman is currently speaking and cannot, "
write "therefore, come down at this moment.~^" 
ensure concierge has CUSTOM1
}

{greet
write "~Hello,~ the concierge replies with a smile.^"
}

{ask_to_page_ruud_override
if concierge has CUSTOM2
   write "~I have already paged him for you.~^"
   return
endif
write "~One moment...~ the concierge says as he picks up the telephone.^" 
write "After a few brief words, he hangs the phone up again and turns back "
write "to you. ~Monsieur Gullit will be down shortly.~^"
if WHO_I_AM = zola
   set GULLITS_SCRIPT = 5
endif
ensure concierge has CUSTOM2
}

{examine
write "The concierge is a tall man in his middle twenties. He is wearing a "
write "gold coloured name tag that reads, ~Frank Leboeuf~.^"
}

object knob: knob
 short		a "knob"

{turn
write "The bell is rung by tapping the knob.^"
}

{knock_on : flick
proxy "ring bell"
}

object bell: small brass bell
 short		a "small brass bell"
 parent 	long_counter
 mass		heavy

{examine
write "The small bell is nothing more than a highly polished brass dome "
write "with a knob at its peak for ringing it. You amuse yourself briefly by "
write "moving your head around, admiring your comically distorted reflection "
write "on its curved exterior.^"
}

{ring
if bell has CUSTOM4
   write "Feeling hungry?^"
   set time = false
   return
endif
write "The concierge looks at you and smiles, although you can tell he is "
write "thinking, ~Ring that bell again and I'll make you eat it.~^"
ensure bell has CUSTOM4
}

{take
write "The bell is glued quite firmly to the counter.^"
set time = false
}

{eat
if bell has CUSTOM4
   write "In an attempt to amaze the concierge with your psychic powers?^"
   set time = false
   return
endif
return false
}

object long_counter: long curved counter
 has		SURFACE
 short		a "long curved counter"
 quantity	50

location bar : bar
 short		the "bar"
 east		lobby
 south		lounge

{eachturn
set BARMANS_SCRIPT + 1
execute "+barmans_actions"
move guests to here
}

{movement
if destination = nowhere
   write "You can either go south into the lounge area or east back into "
   write "the lobby.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You have arrived back at the bar.^"
   return
endif
write "Behind the bar, rows of bottles of all shapes and sizes line the "
write "narrow glass shelves. Coloured fluorescent light reflects off the "
write "bottles and the mirrored wall behind them, filling your eyes with a "
write "dazzling display. "
write "Many round tables are surrounded by guests talking loudly. "
write "To the south you can enter a sunken lounge area.^"
}

{sit
write "I don't think you should be lounging around in bars at this point in "
write "time.^"
set time = false
}

{smell
write "All you can smell is stale tobacco.^"
}

{listen
write "Over the many loud voices you can barely hear "
execute "+song"
write " being played on the piano in the lounge to the south.^"
}

{first_hint
write "The hints in the lounge area cover this location.^"
set time = false
}

object tables: several round tables
 has		PLURAL
 short		the "round tables"

{examine
write "Each of the round tables has a candle on it and three or four "
write "chairs around it.^"
}

object tray: silver drinks tray
 has		SURFACE OUT_OF_REACH
 short		a "silver drinks tray"
 quantity	10
 parent waitress
 mass		10

{take
write "Fighting the waitress for the drinks tray in the middle of the bar "
write "is more than likely to cause a scene. ~Be sure to make your "
write "entrance discreet,~ you recall Agent Petrescu warning back in the van, "
write "so you resist.^"
set time = false
}

object ordered_drinks: ordered guest's guests variety of drinks
 has		PLURAL OUT_OF_REACH
 short 		a "variety of drinks"
 parent		nowhere	
 
{examine
write "There are no useful clues in the hotel guest's drinks.^"
}

{take
write "But they're not yours!^"
set time = false
}

object credit_card: credit card
 has		OUT_OF_REACH
 short		a "credit card"
 parent tray
 mass		2

{examine : read
if self hasnt SCORED
   write "You walk up beside the waitress, pretending to look across the room, then "
   write "glance down at the credit card on her tray. It is an American Express Gold "
   write "Card with the name ~G. Zola~ on it.^"
   move zola to lounge
   move elderly_man to limbo
   set younger_man(status) = 2
   points 5
   ensure credit_card has SCORED
else
   write "The credit card is an American Express Gold Card with the name "
   write "~G. Zola~ on it.^"
endif
}

{take
set time = false
if credit_card(parent) = try
   write "You dare not try to steal the credit card from the waitress's "
   write "drinks tray in the middle of a crowded hotel.^"
   return
endif
write "You dare not clamber over the bar and attempt to steal the credit card.^"
}

object drink: drink beer martini lager and coke red white wine champagne scotch coniac port water ale rum malibu tequila gin cherry
 short		a "drink"
 parent 	landlord
 mass		10

{order
if here = bar
   proxy "ask waiter for drink"
   return
endif
write "There is nobody here taking drinks orders.^"
set time = false
}

object landlord: barman man cocktail waiter landlord
 has		ANIMATE OUT_OF_REACH
 short		the "cocktail waiter"
 long		"Behind the bar, wearing a neatly pressed dinner suit, is a cocktail waiter.^"
 mass		heavy
 
{examine
write "The cocktail waiter is wearing a neatly pressed dinner suit. He "
write "appears to be about fifty years old, although it is hard to be sure.^"
}

{talk_to : greet
write "You should know better than to get a barman talking when you're in a "
write "hurry.^"
}

{ask_about_bottles
write "~They are made from glass,~ the cocktail waiter informs you with a "
write "polite yet insulting smile.^"
}

{ask_for_bottles : ask_for_drink : order_bottles : order_drink
if hughes has CUSTOM2
   write "Recalling Agent Hughes' reaction, you decide not to.^"
   set time = false
   return
endif
if noun2 = bottles
   write "~Planning on a big night?~"
endif
if noun2 = drink
   write "~Will that be cash or charge?~"
endif
if hughes hasnt CUSTOM2
   if ear_piece has WORN
      if jacket is *present
         write "^~You haven't got time for a drink!~ you hear Agent Hughes "
         write "exclaim through the ear piece.^"
         ensure hughes has CUSTOM2
endall
}

object bar_shelves: narrow glass shelves shelf
 has		PLURAL OUT_OF_REACH
 short		the "narrow glass shelves"

{examine
write "Rows of bottles of all shapes and sizes line the narrow "
write "glass shelves. "
if credit_card(parent) = bar_shelves
   write "Resting on one of the lower shelves is the elderly man's credit "
   write "card."
endif
write ^
}

object bottles: bottles
 has		PLURAL OUT_OF_REACH
 short		the "bottles"

object long_bar: long bar
 has		SURFACE
 short		a "bar"
 quantity	100

{examine
write "The dark wood of the bar has been highly polished. "
execute "+details<noun1"
write ^
}

{sit_on
write "I'm sure that will please the cocktail waiter.^"
}

object coaster: cardboard coaster
 has		WEARABLE
 short		a "cardboard coaster"
 long		"There is a cardboard coaster here.^"
 parent 	long_bar
 mass		1

{examine : read
write "The coaster has the hotel name and emblem on it.^"
}

{wear_override
if coaster has CUSTOM2
   write "You decide that you have made a big enough fool of "
   write "yourself for one day.^"
   return
endif
write "Tearing a small triangle out of one side of the coaster, you wedge "
write "it onto your nose. Standing up, you shout at the top of your voice, "
write "~Okay, who threw that!~"
ensure coaster has WORN
ensure coaster has CUSTOM2
}

object wooden_bowl: shallow wooden bowl
 has		CONTAINER
 short		a "shallow wooden bowl"
 long		"A shallow wooden bowl rests on the ground.^"
 quantity	1
 parent 	long_bar
 mass		4

{examine
write "The shallow wooden bowl contains the usual assortment of pretzels.^"
}

object bar_guests: bar guest guests patrons
 has		PLURAL ANIMATE
 short		the "bar guests"

{examine
write "The guests appear to be enjoying themselves.^"
}

object pretzels: pretzels
 has		PLURAL
 short		some "pretzels"
 parent	 wooden_bowl
 mass		1

{examine
write "They look edible.^"
}

{sniff
write "They smell edible.^"
}

{take : eat
set PRETZELS_EATEN + 1
if PRETZELS_EATEN = 5
   write "You have had your fill of the pretzels.^"
   set time = false
   return
endif
write "You nibble one of the pretzels from the shallow wooden bowl.^"
}

{move
write "You sift through the pretzels looking for an appealing one "
write "and fail.^"
}

location lounge : lounge
 short		the "lounge"
 north		bar
 out		bar

{eachturn
execute "+waitress_actions"
set WAITRESS_SCRIPT + 1
if SONG_PLAYED > 19 
   if SONG_PLAYED < 30
      if hughes hasnt CUSTOM5
         if jacket is *present
            if ear_piece has WORN
               write "^~You must remember this, a kiss is just a kiss...~ "
               write "your hear Agent Hughes sing horribly off key through "
               write "the earpiece.^"
               ensure hughes has CUSTOM5
endall
if SONG_PLAYED = 55
   set SONG_PLAYED = 1
endall
set SONG_PLAYED + 1
execute "+change_song"
}

{movement
if destination = nowhere
   write "The only exit from here is back north.^"
   return
endif
return false 
}

{look
if here has VISITED
   write "You have returned to the lounge area.^"
   return
endif
write "Dimly lit compared to the main bar, this area is also noticeably "
write "quieter. "
write "Low rectangular tables squat before comfortable "
write "leather chairs. "
write "A young lady, sitting at a black baby grand piano, is "
write "currently playing "
execute "+song"
write ". Large ceiling to floor windows afford a view out across the street "
write "to the south, softened by the light drizzle and fog.^"
}

{listen
write "You can hear "
execute "+song"
write " currently being played on the piano.^"
}

{first_hint
write "The elderly man has a friend who is attending the conference and "
write "is discussing this very fact with the younger man when you first "
write "arrive.^"
set time = false
}

{second_hint
write "You will also need to know the name of the elderly man. When the "
write "waitress arrives with their drinks, he gives his credit card to "
write "her. His name is on the card.^"
}

{third_hint
write "When you first arrive type:^"
write "  >LISTEN TO THE ELDERLY MAN^"
write "  >north^"
write "  >EXAMINE THE CREDIT CARD^"
set time = false
}

object square_tables: low rectangular tables
 has		PLURAL 
 short		the "low rectangular tables"

object lounges: leather lounge chairs
 short		the "leather lounge chairs"

{sit_on_override
execute "sit_bar"
}

{examine
write "The leather lounge chairs are all occupied by guests.^"
}

object large_windows: large windows window
 short		the "large windows"

{examine : look_through
write "Peering through the drizzle and fog you can see people hurrying "
write "along the cold and wet street outside.^" 
}

object zola: gianfranco mr zola elderly man
 has		ANIMATE
 short		name "Mr Zola"
 long		"Mr Zola is still sitting at one of the tables.^"
 mass		heavy
 parent		nowhere

{talk_to : greet
execute "talk_to_elderly_man"
}

{examine
execute "examine_elderly_man"
}

{listen_to
execute "listen_to_elderly_man"
}

{ask_about_ruud : tell_about_ruud
write "Mr Zola appears to resent you trying to get involved in the "
write "conversation.^"
}

object elderly_man: older elderly man elder
 has		ANIMATE
 short		the "elderly man"
 long		"Sitting at one of the tables is an elderly man.^"
 mass		heavy

{ask_about_ruud
write "Mr Zola appears to resent you trying to get involved in the "
write "conversation.^"
}

{talk_to : greet
if elderly_man hasnt CUSTOM4
   write "Barely looking up at you, the elderly man grunts a terse "
   write "reply in a heavy Italian accent.^"
   ensure elderly_man has CUSTOM4
   return
endif
write "The elderly man ignores you.^"
}

{examine
write "The elderly man is wearing a brown, and rather outdated, three "
write "piece suit.^"
}

{listen_to
if GULLITS_SCRIPT = 24 
   if ruud hasnt CUSTOM4
      write "The elderly man is currently listening to his recently "
      write "arrived friend.^"
      write "~Even if the hotel did make a mistake,~ the well dressed "
      write "gentleman says with a smile, ~it is probably for the best. I "
      write "don't know how much longer I could have listened to that insane "
      write "old man babble on about his ludicrous theories.~^"
      ensure ruud has CUSTOM4
      return
   endif
   write "All three men are currently engaged in a conversation regarding "
   write "the merits of thigh-high boots.^"
   return
endall 
if elderly_man hasnt SCORED
   write "The elderly man is telling the younger man how a friend of his, "
   write "Ruud Gullit, is attending the conference upstairs tonight.^"
   ensure elderly_man has SCORED
   points 5
   return
endif
write "The elderly man is now telling the younger man all about the '97 "
write "F.A. Cup final.^" 
}

{+default_attack
if here > van
   if noun1 has ANIMATE
      write "Spotting the melee instantly, two hotel security gruards grab "
      write "you from behind and march you unceremoniously into an office "
      write "which is locked while they wait for the police to arrive. "
      if ear_piece has WORN
         write "A mixture of anger and disbelief poors into your ear piece as "
         write "you are given the predictable ~we were never here~ speech "
         write "from a departing Agent Hughes.^"
         execute "+game_over"
         return
      endif
   endif
endif
return false
}

object younger_man: lean younger man young
 has		ANIMATE
 long		function
 short		the "younger man"
 mass		heavy

{long
if younger_man(status) = 0
   write "A younger man is sitting with the elderly man, listening "
   write "intently.^"
   return
endif
if younger_man(status) = 1
   write "Seated at the table with the elderly man is a younger man.^"
   return
endif
if younger_man(status) =2 
   write "A younger man is sitting with the Mr Zola, listening intently.^"
   return
endif
}

{examine
write "The younger man is quite lean with short dark hair. He appears to "
write "be looking at the elderly man with much admiration.^"
}

{talk_to : greet
if younger_man hasnt CUSTOM4
   write "The younger man looks up at you and smiles.^"
   ensure younger_man has CUSTOM4
   return
endif
write "The younger man pretends to be listening so intently to the elderly "
write "man that he doesn't notice you.^"
}

{listen_to
if GULLITS_SCRIPT = 24
   if ruud hasnt CUSTOM4
      write "The younger man is currently listening to the elderly man's "
      write "recently arrived friend.^"
      write "~Even if the hotel did make a mistake,~ the well dressed "
      write "gentleman says with a smile, ~it is probably for the best. I "
      write "don't know how much longer I could have listened to that insane "
      write "old man babble on about his ludicrous theories.~^"
      ensure ruud has CUSTOM4
      return
   endif
   write "All three men are currently engaged in a conversation regarding "
   write "the merits of thigh high boots.^"
   return
endall 
if elderly_man hasnt SCORED
   write "The elderly man is telling the younger man how a friend of his, "
   write "Ruud Gullit, is attending the conference upstairs tonight.^"
   ensure elderly_man has SCORED
   points 5
   return
endif
write "The elderly man is now telling the younger man all about the '97 "
write "F.A. Cup final.^" 
}

object ruud: ruud gullit well dressed man god
 has		ANIMATE
 short		the "well dressed gentleman"
 long		function
 parent		nowhere
 mass		heavy

{long
if ruud(status) = 0
   write "Standing casually nearby is a well dressed gentleman.^"
   return
endif
if ruud(status) = 1
   write "There is a well dressed gentleman seated with the other two men.^"
   return
endif
}

{talk_to : greet
write "The well dressed gentleman smiles, but says nothing.^"
}

{ask_about_zola : ask_about_elderly_man
if ruud hasnt CUSTOM5 
   write "~He is a good friend of mine from way back.~^"
   ensure ruud has CUSTOM5
   return
endif
write "~If you want to know anything more, you will have to ask him "
write "yourself.~^"
}

{attack
write "Moments later you pick yourself up off the ground and wonder what "
write "happened.^"
}

{listen_to
if GULLITS_SCRIPT = 24
   if ruud hasnt CUSTOM4
      write "~Even if the hotel did make a mistake,~ the well dressed "
      write "gentleman says with a smile, ~it is probably for the best. I "
      write "don't know how much longer I could have listened to that insane "
      write "old man babble on about his ludicrous theories.~^"
      ensure ruud has CUSTOM4
      return
   endif
   write "All three men are currently engaged in a conversation regarding "
   write "the merits of thigh-high boots.^"
   return
endif
return false
}

object piano: black yamaha baby grand piano
 short		a "piano"

{play
write "A duet perhaps?^"
set time = false
}

{examine
write "A large potted palm stands before the piano -- a black Yamaha baby "
write "grand.^"
}

{look_behind
write "There is a lady behind the piano playing "
execute "+song"
write .^
}

{listen_to
execute "listen_lounge"
}

{look_in
write "Strings and hammers.^"
}

object waitress: waitress bar lady women
 has		ANIMATE FEMALE
 short		the "waitress"
 long		function
 mass		heavy
 parent		lounge

{long
if waitress(status) = 0
   write "Standing by the table at which the men are seated is a waitress.^"
   return
endif
if waitress(status) = 1
   write "There is a waitress wandering about here taking peoples' orders.^"
   return
endif
if waitress(status) = 2
   write "Standing on the near side of the bar is a waitress.^" 
   return
endif
if waitress(status) = 3
   write "There is a waitress wandering about here delivering a tray load "
   write "of drinks.^"
   return
endif
}

{examine
write "The waitress appears to be in her mid thirties and is as impeccably "
write "dressed as the other staff members. The waitress is carrying a silver "
write "drinks tray.^"
}

{ask_for_credit_card
write "Unable to believe you would ask her to give you another guest's "
write "credit card the waitress fails to respond.^"
}

{ask_for_drink
write "~I'll be with you in a moment,~ the waitress tells you politely.^"
}

{greet
write "The waitress smiles.^"
}

{talk_to
write "In order to attend to her duties, the waitress politely excuses "
write "herself from engaging in a long conversation.^"
}
 
object plant: pot potted palm plant
 short		a "potted palm"

{look_in
write "Just a bit of dirt.^"
}

{examine
write "Almost two metres tall, the palm's flickering shadow is cast on "
write "to the open lid of the piano.^"
}

{look_behind
write "There is a baby grand piano there.^"
}

object piano_player: pianist piano player pretty women lady musician
 has		ANIMATE
 short		the "piano player"
 
{examine
write "Middle-aged and quite pretty, the lady is playing "
execute "+song"
write .^
}

{talk_to
write "She's a little busy right now.^"
set time = false
}

object candles: candles candle
 has		PLURAL LUMINOUS

{examine
write "The soft light from the candles creates a warm relaxing atmosphere "
write "here.^"
}

location mezzanine : mezzanine level
 short		the "mezzanine level" 
 north		first_floor
 northeast	lobby
 northwest	lobby
 down		lobby

{movement
if compass = east : compass = west
   write "The hallway leads only to guest's private rooms.^"
   return
endif
if destination = northwest : northeast
   write "The stairs turn a half-circle as you descend down into the "
   write "lobby.^^"
   return false
endif
return false
}

{look
if here has VISITED
   write "Once again, you are standing on the mezzanine level.^"
   return
endif
write "This mezzanine level is mostly bare marble floor space. Looking "
write "over a waist high railing that runs along its south edge, you can see "
write "down into the lobby below. Stairs in the northwest and northeast "
write "corner lead back down to the street level while the lift area can "
write "be reached to the north. To the east and west extends a long corridor "
write "with many doors along each side.^"
}

{jump
write "Over the railing?^"
}

object stairs_top: wide stairs
 has		PLURAL
 short		the "wide stairs"

{examine
execute "examine_stairs_bottom"
}

{climb : climb_down
proxy "go down"
}

{climb_up
write "You are already at the top of the stairs.^"
}

object railing: waist high railing
 short		a "waist high railing"

{examine
write "The railing matches the one on the stairs leading up here in both "
write "style and purpose.^"
}

{jump_over
write "I don't think performing a swan dive into the lobby is going to "
write "help at all.^"
set time = false
}

{climb
write "Sounds a bit dangerous to me.^"
set time = false
}

location ground_floor : ground floor
 short		the "ground floor"
 has		OUTSIDE_LIFT
 north		nowhere
 south		lobby

{movement
if +door_warning = true
   return true
endif
return false
}

{look
if here has VISITED
   write "You are back on the ground floor, standing outside the lifts.^"
   return
endif
write "You are on the ground floor standing outside a lift. "
write "There is a call button beside the lift door and a mirror on the wall to "
write "your left. "
write "Beneath the mirror there is an ornate side table. The hotel lobby "
write "can be seen to the south.^"
}

object callbuttong: call button
 short		a "call button"
 floor		0

{examine : *examine_callbutton1 : *examine_callbutton2 : *examine_callbutton3 
write "Pushing this button summons the elevator to this floor. It's "
write "currently "
if self has ON
   write "lit.^"
   return
endif
write "dark.^"
}

{press : *press_callbutton1 : *press_callbutton2: *press_callbutton3
if lift_obj(moving_to) != arrived
   write "The button lights as you press it, only to go off again when you "
   write "release it (the lift is still in trstylet).^"
   return
endif
if lift_obj(floor) = self(floor)
   if here(north) = nowhere
      write "A crisp-sounding bell rings briefly and the doors "
      write "to the lift slide open.^"
      execute "+lift_open"
      return
   endif
   write "The button lights as you press it, only to go off again when you "
   write "release it.^"
   return
endall
set lift_obj(moving_to) = self(floor)
ensure self has ON
write "The button lights up as you press it.^"
}

object mirror: large gold framed mirror
 short		a "large gold framed mirror"
 
{examine : look_in
write "It has been a long time since you have dressed up for a formal "
write "occasion and the results please you.^"
}

{look_behind
write "Not a sausage.^"
}

object vase: brass vase
 has		CONTAINER
 short		a "brass vase"
 long		"There is a brass vase resting on the ground.^"
 quantity	5
 mass		10
 parent 	side_table

object butt: cigarette butt
 long		"An old cigarette butt rests on the ground.^"
 short		a "cigarette butt"
 mass		2
 parent 	vase
 
{examine : sniff
write "Quite repugnant, really.^"
}

{eat
write "There are pretzels in the bar, you know.^"
set time = false
}

object flowers: dried flowers
 has		PLURAL
 short		some "dried flowers"
 long		"A bunch of dried flowers rest here.^"
 mass		5
 parent 	vase

{sniff
write "The flowers are dried and therefore practically odourless.^"
}

object side_table: ornate side table
 has        SURFACE
 short      a "ornate side table"
 quantity   10
 
location first_floor : first floor
 short		the "first floor"
 has		OUTSIDE_LIFT
 north		nowhere
 south		mezzanine

{movement
if +door_warning = true
   return true
endif
return false
}

{look
if here has VISITED
   write "You are back on the first floor, standing outside the lifts.^"
   return
endif
write "You are on the first floor standing outside a lift. "
write "To the south you can enter a mezzanine "
write "level that overlooks the lobby. There is a call button on the wall.^"
}

object callbutton1: call button
 short		a "call button"
 floor		1

location second_floor : second floor
 short		the "second floor"
 has		OUTSIDE_LIFT
 north		nowhere
 south		second_hallway

{look
if here has VISITED
   write "You are back on the second floor, standing outside the lifts.^"
   return
endif
write "You are on the second floor standing outside a lift. "
write "There is a call button on the wall and an "
write "east-west hallway to the south.^"
}

{movement
if +door_warning = true
   return true
endif
return false
}

object callbutton2: call button
 short		a "call button"
 floor		2

location second_hallway : second floor hallway
 short		the "second floor hallway"
 north		second_floor

{movement
if compass = east : compass = west
   write "The hallway leads only to guest's private rooms.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You are standing in the second floor hallway again.^"
   return
endif
write "This long hallway, lined with many numbered doors, heads east and "
write "west from here. A painting hangs on the south wall opposite the lift "
write "area.^"
}

object painting_1: seurat painting
 short		a "Seurat painting"

{examine
write "The painting is a print of George Seurat's ~Sunday Afternoon on the "
write "Island of la Grande Jatte~.^"
}

object doors_2: numbered second floor doors
 has		CLOSABLE CLOSED LOCKED PLURAL
 short		the "second floor doors"

{open
write "You try a few of the doors, but they are all locked.^"
}

location third_floor : third floor
 short		the "third floor"
 has		OUTSIDE_LIFT
 north		nowhere
 south		conference_room

{movement
if +door_warning = true
   return true
endif
return false
}

{look
if here has VISITED
   write "You are back on the third floor, standing outside the lifts.^"
   return
endif
write "You are on the third floor standing outside the lift. "
write "As with all the other floors, there is a "
write "call button on the north wall. South leads to a large conference room.^"
if here hasnt SCORED
   points 10 
   ensure here has SCORED
endif
}

object callbutton3: call button
 short		a "call button"
 floor		3

location conference_room : conference room
 short		the "conference room"
 north		third_floor
 southwest	backstage
 west		backstage

{movement
if compass = southwest : compass = west
   write "Looking around to make sure no one is looking, you slip "
   write "through the doorway.^"
   return false
endif
if destination = nowhere
   write "The only exits from here are either north to the lifts or "
   write "southwest through the doorway.^"
   return
endif
return false
}

{eachturn
if conference_room hasnt CUSTOM4
   write "^~Our next speaker will not be for several minutes ladies and "
   write "gentlemen, so please relax and enjoy yourselves. Tea and coffee "
   write "will be served shortly along with your choice of dessert from "
   write "the menu,~ a distinguished-looking gentlemen says from behind "
   write "the lectern, before taking his seat at a table near the front.^"
   ensure conference_room has CUSTOM4
endif
}

{look
if here has VISITED
   write "You are now in the conference room.^"
   return
endif
write "The conference room is filled with over a hundred guests. "
write "Seated in groups of four or five to a table, they sit facing towards "
write "a lectern at the south end of the room. Behind the lectern, a dark "
write "maroon curtain runs the entire width of the room, ending at a doorway "
write "in the southwest corner.^"
}

object mc: distinguished-looking distinguished gentleman man
 has		ANIMATE
 short		the "distinguished-looking gentleman"

{examine
write "The distinguished-looking gentleman is currently seated at a table "
write "near the front of the room.^"
}

{talk_to
write "The distinguished-looking gentleman looks up at you and smiles.^"
}

object lectern: lectern podium stand
 has		SURFACE
 short		a "lectern"
 quantity	20

{examine
write "The lectern is reasonably plain.^"
}

{look_behind
write "There is nothing other than the dark maroon curtain.^"
}

object curtain: dark maroon curtain
 short		a "dark maroon curtain"

{look_behind
write "The curtain is obviously for decoration only, as behind it lies "
write "nothing other than a blank wall.^"
}

{open
write "There is no apparent way (or need) to open the dark maroon curtain.^"
}

{close
write "There is no apparent way (or need) to close the dark maroon curtain.^"
}

object conference_guests: conference guest guests patrons
 has		ANIMATE PLURAL
 short		the "conference guests"

object conf_tables: conference tables table
 has		PLURAL
 short		the "tables"

location backstage : backstage area
 short		the "backstage area"
 east		conference_room
 northeast	conference_room
 south		nowhere

{movement
if compass = south 
   if destination = false
      write "The door to the south is closed.^"
      return
   endif
endif
if compass = west
   write "The door to the west is closed.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You are back, standing in the north-south hallway again.^"
   return
endif
write "You are in a north-south hallway which runs along the west side of "
write "the conference room. The conference room can be entered through a "
write "doorway to the east while there "
if south_door hasnt CLOSED
   write "is an open door to the south and closed one to the west.^"
   return
endif
write "are closed doors to the west and south.^"
}

{listen
write "You can hear the sound of many idly chatting voices coming from the "
write "other side of the doorway.^"
}

object south_door: south door
 has		CLOSABLE CLOSED
 short		the "south door"
	
{knock_on
if south_door hasnt CLOSED
   write "There really isn't any need, the south door is wide open.^"
   return
endif
if south_door has CUSTOM1
   write "There is no reply.^"
   return
endif
write "~Come in,~ you hear an elderly male voice call from beyond the door.^"
ensure south_door has CUSTOM1
}

{listen_to
write "Silence.^"
}

{open_override
ensure south_door hasnt CLOSED
set backstage(south) = z_office
set z_office(north) = backstage
write "You gently open the door.^"
}

{close_override
ensure south_door has CLOSED
set backstage(south) = nowhere
set z_office(north) = nowhere
write "You gently close the door.^"
}

object west_door: west door
 has		LOCKED CLOSABLE CLOSED
 short		the "west door"

{knock_on
write "There is no reply.^"
}

location z_office : dr doctor zuckerman's zuckermans office
 short		name "Dr Zuckerman's office"
 out		backstage
 north		backstage

{eachturn
if HUGHES_SCRIPT = 0
   set HUGHES_SCRIPT = 1
endif
if zuckerman hasnt CUSTOM4
   write "^~Dr Alex Meadows,~ Dr Zuckerman says without looking away from "
   write "the window. ~I would have been disappointed if you hadn't come,~ "
   write "he continues, slowly turning around to face you. ~It was me who "
   write "had you called to the base you know. Colonel Wise was against "
   write "the idea, of course, but in the end I managed to convince him "
   write "that the findings of a civilian would be more widely accepted by "
   write "the public. He insisted that an informed officer be permanently "
   write "assigned to keep an eye on you and make sure that your findings "
   write "were those we wanted them to be.~^" 
   write "^Pausing for a while, Dr Zuckerman's face softens slightly. ~But, "
   write "somewhere deep inside, I hoped that you would discover the "
   write "truth -- that you would come and end the loneliness of my work. "
   write "I do hope my faith in you and your reputation was not "
   write "misplaced.~^"
   ensure zuckerman has CUSTOM4
   set zuckerman(status) = 2
else
   if TOPICS_DISCUSSED = 0
      write "^~You've come a long way Dr Meadows. Tell me what's on your "
      write "mind.^"
      set TOPICS_DISCUSSED = 1
   endif
endif
}

{movement
if compass = north 
   if destination = nowhere
      write "The door is currently closed.^"
      return
   endif
endif
if destination = nowhere
   write "The only exit from here north, back into the hallway.^"
   return
endif
return false
}

{look
if here has VISITED
   write "You have returned to Dr Zuckerman's office.^"
   return
endif
write "Furnished in fine leather and mahogany, this dimly lit office has a "
write "refined feel to it. The rain, now falling harder than before, beats "
write "against an ornately framed window in the south wall. The entire "
write "east wall is given over to a bookcase before which stands a "
write "desk, large enough to endow anyone sitting behind it with an "
write "air of authority.^"
}

{no
proxy "zuckerman, no"
}

{yes
proxy "zuckerman, yes"
}

{listen
write "You hear the soothing sound of rain on the window.^"
}

{first_hint
write "How you approach this part of the game is largely up to you. All "
write "that is really required of you by the agents, is to get Dr Zuckerman "
write "to talk about the human tests he has performed.^" 
set time = false
}

{second_hint
write "Dr Zuckerman will not discuss the human tests he has performed until "
write "you have talked about several other things to gain his trust and "
write "put him at ease. This is also a good opportunity to get answers to "
write "any questions you might have that you think he may know something "
write "about.^"
set time = false
}

{third_hint
write "One of the main turning points in this game depends on whether you "
write "are still carrying the jacket when you ask him about the human tests. "
write "There is no right and wrong here, the choice is yours.^"
set time = false
}

{sit
proxy "sit in chair"
}

object jing: jing life force life-force energy prenatal congenital essence
 short		name "congenital jing"
 parent		nowhere

object bookcase: bookcase books bookshelf bookshelves book shelf shelves
 short		a "bookcase"

{examine
write "Literally thousands of books line the shelves of the bookcase.^"
}

object writing_desk: mahogany desk
 has		SURFACE
 short		a "mahogany desk"
 quantity	40

{examine : look_behind
write "Behind the desk is a fine leather chair, worthy of its place behind "
write "such an impressive piece of furniture.^"
}

object arm_chair: leather chair
 short		an "leather chair"

{sit_on
write "Sitting in a man's office chair is like sitting on his throne - not "
write "very polite.^"
}

object ornate_window: ornate_window
 has		CLOSED CLOSABLE
 short		an "ornate window"

{listen_to
write "You hear the soothing sound of rain beating against the window.^"
}

{open
write "The windows in five story buildings are best left closed, especially "
write "on cold rainy nights such as this.^"
}

attribute TALKED_ABOUT

object zuckerman: dr doctor leif zuckerman man
 has		ANIMATE
 short		name "Dr Leif Zuckerman"
 long		function
 mass		heavy

{long
if zuckerman(status) = 0
   write "Standing with his back to you, staring out the window, is Dr "
   write "Zuckerman.^"
   return
endif
if zuckerman(status) = 1
   write "Dr Zuckerman is standing here, awaiting your answer.^"
   return
endif
if zuckerman(status) = 2
   write "Dr Zuckerman is here, standing by the window.^"
   return
endif
}

{examine
if TOPICS_DISCUSSED < 4
   write "Staring back at you intently through a pair of gold rimmed "
   write "bifocals, Dr Zuckerman shuffles his feet nervously.^"
   return
endif
write "Staring back at you intently through a pair of gold rimmed bifocals, "
write "Dr Zuckerman appears more relaxed than before.^"
}

{kiss : shag
write "Settle down.^"
}

{talk_to
if zuckerman has CUSTOM1
   write "~Just answer the question, Alex: yes or no?~ Dr Zuckerman says "
   write "staring at you keenly.^"
   return
endall
if jacket has CUSTOM5
   if jacket is *present
      write "Pointing to the jacket, Dr Zuckerman refuses to answer your "
      write "question.^"
endall
if writing_desk has CUSTOM3
   write "You and Dr Zuckerman chat about nothing for a moment or two.^"
   return
endif
ensure writing_desk has CUSTOM3
write "~I see you are the keynote speaker at this conference,~ you say to "
write "Dr Zuckerman"
if TOPICS_DISCUSSED = 0
   write " in an attempt to break the ice"
endif
write .^^
write "~Yes,~ he says with a chuckle. ~The military don't know that, of "
write "course. They barely let me leave the house without an escort. Coming "
write "here is definitely something they would not approve of.~^"
ensure writing_desk has CUSTOM3
set TOPICS_DISCUSSED + 1
set REPUTATION_CURRENT = false
}

{attack
write "Let's leave the law enforcement to the professionals, okay?^"
set time = false
}

{greet
write "~Doctor,~ you say with a nod.^"
write "~Doctor,~ Dr Zuckerman replies.^"
write "(did we miss anyone)"
set TOPICS_DISCUSSED + 1
}

{tell_about_jacket : tell_about_transmitter
if jacket is *present
   write "You point to the jacket and inform Dr Zuckerman of the microphone "
   write "and transmitter sewn into its lining.^" 
   execute "+defect"
   return
endall
write "You tell Dr Zuckerman of the jacket and the microphone and transmitter "
write "sewn into its lining. ~It's okay though,~ you tell him, ~I've left it "
write "behind.~ A fact that does little to alleviate his anxiety.^"
set TOPICS_DISCUSSED + 1
}

{tell_about_van : tell_about_petrescu : tell_about_hughes
if van has CUSTOM1
   write "Dr Zuckerman indicates that he understands.^"
   return
endif
write "~There are two agents in a van down on the street,~ you inform Dr "
write "Zuckerman. ~They are here to arrest you.~^"
write "Quite understandably, this news appears to distress him greatly.^"
if jacket is *present
   execute "+defect"
   return
endif
ensure van has CUSTOM1
set TOPICS_DISCUSSED + 1
}

{ask_about_wise
if wise has CUSTOM3
   write "Dr Zuckerman shrugs, ~I don't know what else I can tell you.~^"
   return
endif
write "~An obstinate man,~ Dr Zuckerman says. ~I shan't regret it if I "
write "never see him again.~^"
ensure wise has CUSTOM3
set TOPICS_DISCUSSED + 1
}

{tell_about_ear_piece : show_ear_piece
if ear_piece has CUSTOM5
   write "Dr Zuckerman nods knowingly.^"
   return
endif
set TOPICS_DISCUSSED + 1
if ear_piece has WORN
   write "~The ear piece I am wearing "
else
   write "~I have in my possession an ear piece that "
endif
write "enables me to stay in contact with two agents in a van down on the "
write "street,~ you inform Dr Zuckerman. News that makes him obviously "
write "nervous.^" 
ensure ear_piece has CUSTOM5
if jacket is *present
   execute "+defect"
   return
endall
}

{tell_about_ames : ask_about_green_slide : tell_about_green_slide
if zuckerman has CUSTOM5
   write "Dr Zuckerman appears to ignore you.^"
   return
endif
write "Dr Zuckerman listens patiently while you explain to him the tests "
write "that you have performed on the clear liquid.^"
write "~You have been very thorough, Dr Meadows, although I would have "
write "expected nothing less,~ Dr Zuckerman begins in reply. ~When an "
write "organism is placed in contact with the clear liquid, its life force is "
write "sapped at an amazing rate. Without following the correct procedure, "
write "however, this energy will only dissipate to be lost forever.~^"
ensure zuckerman has CUSTOM5 
set TOPICS_DISCUSSED + 1
}

{ask_about_submarine : tell_about_submarine
if self has TALKED_ABOUT
   write "Dr Zuckerman seems bored with the topic.^"
   return
endif
write "Dr Zuckerman laughs. You are resourceful Dr Meadows! "
write "~Most of the logistics I left to the military. They seem to thrive "
write "on petty tasks like delivery.~^"
ensure self has TALKED_ABOUT
set TOPICS_DISCUSSED + 1
}

{ask_about_diary : tell_about_diary
if self has TALKED_ABOUT
   write "Dr Zuckerman seems bored with the topic.^"
   return
endif
write "You tell Dr Zuckerman about your discovery of his diary and the "
write "appointment for the conference within it. ~To be honest with you,~ "
write "you continue, ~I half suspected that it would turn out to be some "
write "sort of set-up.~^"
write "~Well you were right, it was a set-up. When I said that I would have "
write "been disappointed if you hadn't come, it was because I knew you would "
write "investigate beyond that which Colonel Wise had intended. In some ways "
write "I guess it was really a cry for help - just one locked in the bottom "
write "drawer of a filing cabinet in a restricted access hangar on a remote "
write "tropical island.~^"
ensure diary has TALKED_ABOUT
set TOPICS_DISCUSSED + 1
}

{ask_about_zuckerman
if writing_desk has TALKED_ABOUT
   write "~There's not much more I can tell you, Alex,~ Dr Zuckerman says.^"
   return
endif
write "~I tend to think of myself as a misunderstood man,~ Dr Zuckerman "
write "says looking slightly forlorn. ~I know a lot of people don't agree with "
write "what I am doing. They say I'm nothing more than a criminal, but one "
write "day I will be recognised for my achievements.~^" 
ensure writing_desk has TALKED_ABOUT
set TOPICS_DISCUSSED + 1
}

{ask_about_fuel : ask_about_vial : tell_about_vial : tell_about_fuel
if fuel has TALKED_ABOUT
   write "~I could talk about it all day, if I had the time,~ Dr Zuckerman "
   write "replies.^"
   return
endif
write "~The clear liquid you are referring to has one amazing property. It "
write "has the ability to efficiently conduct the energy that is the very "
write "essence of life. The Chinese studied it over two millennia ago, "
write "calling it congenital or prenatal jing. They discovered that everybody "
write "has a finite amount of this energy to conserve or to squander. "
write "Everybody except me that is.~ Taking a moment to bask in the glory of "
write "his achievement, Dr Zuckerman finally continues, ~I have an unlimited "
write "supply, and that is the key to immortality.~^"
ensure fuel has TALKED_ABOUT
set TOPICS_DISCUSSED + 1
}

{ask_about_jing
write "~Congenital jing was thought to be inherited from the parents, fused "
write "at the moment of conception. It was seen as the material that "
write "imbues an organism with the possibility of development from birth to "
write "death. The quality and quantity of this energy was said to be fixed "
write "for life, something my work is going to change.~^"
set TOPICS_DISCUSSED + 1
}

{ask_about_research
if zuckerman has CUSTOM3
   write "~You know enough for now,~ Dr Zuckerman responds.^"
   return
endif
write "~Most of my work on the island revolved around marine tests using "
write "a large fish tank in a hangar on the south side of the island. It was "
write "careless management by the military of the waste from those "
write "experiments that led to the original deaths of marine life in the "
write "waters surrounding the island, not the Rotenone.~^"
ensure zuckerman has CUSTOM3
set TOPICS_DISCUSSED + 1
}

{ask_about_rotenone : tell_about_rotenone : ask_about_drum : tell_about_drum : tell_about_contents : ask_about_contents
if rotenone has CUSTOM3
   write "~I'm sure you can piece the rest together,~ Dr Zuckerman replies.^"
   return
endif
write "~The Rotenone,~ Dr Zuckerman explains, ~was added to the water shortly "
write "before you arrived. It was supposed to draw your attention away from "
write "the real cause of the deaths and help the whole thing just blow over.~^"
ensure rotenone has CUSTOM3
set TOPICS_DISCUSSED + 1
}

{ask_about_bullet_hole : tell_about_bullet_hole : ask_about_bullet : tell_about_bullet
if writing_desk has CUSTOM4
   write "Dr Zuckerman just shakes his head.^"
   return
endif
write "~There's no such thing as delicacy in the military. `If there's a "
write "job worth doing, do it with a gun,' seems to be about the extent of "
write "Colonel Wise's mentality. It drives me mad,~ Dr Zuckerman replies.^"
ensure writing_desk has CUSTOM4
set TOPICS_DISCUSSED + 1
}

{ask_about_fish_tank : tell_about_fish_tank : ask_about_tank_liquid : tell_about_tank_liquid
if fish_tank has CUSTOM3
   write "Dr Zuckerman appears to have nothing more to say about the fish "
   write "tank.^"
   return
endif
write "~The tank,~ Dr Zuckerman begins after a moments thought, ~is a "
write "remnant of the last non... well, the last marine tests I performed. "
write "It's quite a crude setup really. I simply filled the tank with the "
write "clear liquid, divided it in two with a non-conductive sheet, then "
write "linked the two compartments together with a set of polarised probes. "
write "The fish I put in one half almost all died within the day while those "
write "in the other lived close to twice their normal life expectancy.~^"
ensure fish_tank has CUSTOM3
set TOPICS_DISCUSSED + 1
}

{tell_about_tests
write "I think the human tests are probably something you should be asking "
write "Dr Zuckerman about, not telling him about.^"
}

{ask_about_lisa
write "~Lisa is both ambitious and naive, a combination just waiting to be "
write "exploited by men like Colonel Wise,~ Dr Zuckerman replies.^"
}

{ask_about_tests
ensure zuckerman has CUSTOM2
if TOPICS_DISCUSSED < 4
   write "Dr Zuckerman appears nervous about the directness of your "
   write "question and avoids commenting on the subject.^"
   return
endif
if south_door hasnt CLOSED
   write "Glancing at you briefly, Dr Zuckerman walks across the room and "
   write "closes the door. "
   ensure south_door hasnt CLOSED
   set z_office(north) = backstage
   set backstage(south) = z_office
endif 
write "~All great advances demand sacrifice,~ Dr Zuckerman says sombrely. "
write "~All the people who were used in the tests were volunteers, terminally "
write "ill people who had their chance to make a difference before they died. "
write "If a person dies of old age, their energy is depleted. But a young "
write "person who is dying of some incurable disease, now that is a different "
write "thing altogether. Everyday people willingly sign organ donor cards so "
write "that they can have the chance to help someone else live. The only "
write "difference with my work is that energy must be donated immediately "
write "prior to death, not after, but when death is imminent anyway...~ "
write "Gazing out the window for a moment, Dr Zuckerman eventually turns back "
write "around and stares you straight in the eye, ~I don't want to die, Dr "
write "Meadows. All my life I have searched for the secret of immortality, "
write "the elixir of life, and now I have found it. Some call me mad, some "
write "immoral, but when the time comes, they too will choose their life over "
write "that of another. I am a firm believer in survival of the fittest. I "
write "have simply perfected what nature began, and for that I make no "
write "excuses. Think about it, Alex, it's analogous to discovering the Holy "
write "Grail.~^"
write "   ~The Unholy Grail don't you mean,~ you interject sternly.^"
if ear_piece has WORN
   if jacket is *present
      write "   ~That's all we needed to hear,~ Agent Hughes' voice says, "
      write "emanating from the ear piece. ~Hold tight and we'll radio for "
      write "our inside Agents to make the arrest.~^"
endall
write "   ~Come on, Dr Meadows, you and I are"
if jacket is *present
   write "...~ Dr Zuckerman continues, stopping at the sound of footsteps "
   write "running down the hallway.^" 
   write "   Neither you or Dr Zuckerman have the chance to react "
   write "before a man and a woman burst into the room, guns drawn. The woman "
   write "begins to read Dr Zuckerman his rights while the man keeps his gun "
   write "trained on him.^" 
   write "   Obviously shocked, Dr Zuckerman turns to you. ~I was a fool to have "
   write "trusted you,~ he says solemnly. ~I thought you would have taken "
   write "the side of science, but I was wrong. All the work that I have "
   write "done will have been for nothing now, all because people are unable "
   write "to accept that for something to live, something else must die. It "
   write "may be against the law of man, but not the law of nature.~^"
   write "   His hands now forced behind his back, Dr Zuckerman is placed "
   write "into handcuffs then led out of the room.^"
   write "   ~You've done well, Dr Meadows,~ the man says to you. ~If you will "
   write "follow me I will take you back to the office where we can begin "
   write "your debriefing.~^^"
   points 10
   ensure z_office has CUSTOM3
   write "^^"
   more
   clear
   write "^^"
   execute "+score"
   execute "+score_breakdown"
   execute "+game_over"
   return
endall
write " scientists. It is our job to decided what can be done, not what may "
write "be done. Don't you want to live forever?~^"
ensure zuckerman has CUSTOM1
set zuckerman(status) = 1
}

{say_yes
if REPUTATION_CURRENT = true
   write "~You are very modest, Dr Meadows,~ Dr Zuckerman replies.^"
   set REPUTATION_CURRENT = false
   return
endif
if zuckerman hasnt CUSTOM1
   write "~Yes what?~ Dr Zuckerman asks with a puzzled expression.^"
   return
endif
write "~Of course you do,~ Dr Zuckerman exclaims, his eyes noticeably "
write "brightening, ~and science can grant you that wish.~^"
write "Reaching into the inside pocket of his jacket, Dr Zuckerman produces "
write "a worn leather wallet. Zipping it open, he takes a small syringe from "
write "within and holds it up for you to see. ~This syringe contains a "
write "quantity of the clear liquid that you have studied. There is, however, "
write "one significant difference. The liquid you had in your possession was "
write "like a block of ice. Place it in contact with a living organism and it "
write "would absorb the energy from it in a matter of moments. This liquid, "
write "on the other hand, is charged and holds the warmth of life.~^"
write "Stepping closer, Dr Zuckerman begins to roll up the sleeve of your "
write "shirt. ~Join me, Dr Meadows. Accept the fruits of my labour and "
write "rejoice in the gift of eternal life.~^"
write "Shaking, you give Dr Zuckerman a nervous nod of consent and he "
write "injects the liquid into your arm.^^"
points 10
ensure z_office has CUSTOM2
write "^^"
more
clear
write "^^"
execute "+score"
execute "+score_breakdown"
execute "+game_over"
}

{say_no
if REPUTATION_CURRENT = true
   write "~Good,~ Dr Zuckerman says with a faint smile.^"
   set REPUTATION_CURRENT = false
   return
endif
if zuckerman hasnt CUSTOM1
   write "~No what?~ Dr Zuckerman asks with a puzzled expression.^"
   return
endif
write "~There is a tree outside my bedrom window. When winter comes, and the "
write "leaves fall from its branches, I always admire its ability to just let "
write "go. Let go of the very leaves that gave it life through the spring and "
write "summer, then lay dormant and wait for its chance to rise again. "
write "Perhaps this is the will of nature and it is only fear that causes me "
write "to hang on when all around says to let go. If this is the destiny you "
write "choose, then I admire you also. Maybe one day I too will choose this "
write "path, but not today. Goodbye, Dr Meadows. Goodbye.~^"
points 10
ensure z_office has CUSTOM1
write "^^"
more
clear
write "^^"
execute "+score"
execute "+score_breakdown"
execute "+game_over"
}

#                                                                 LOCAL GRAMMAR
#------------------------------------------------------------------------------

grammar tip up *present 				>tip_up
grammar tip *present					>tip_up
grammar tip over *present				>tip_up
grammar tip *present up					>tip_up
grammar tip *present over				>tip_up
grammar flip up *present 				>tip_up
grammar flip *present					>tip_up
grammar flip over *present				>tip_up
grammar flip *present up				>tip_up
grammar flip *present over				>tip_up

{+tip_up
if +darkness = true
   return true
endif
if +reach<noun1 = true
   return true
endif
if noun1(mass) => heavy
   write "You can't turn " noun1{the} " over.^
else
   write "That won't get you far.^"
endif
set time = false
}

grammar insert **held under *present	>insert_in
grammar load **held under *present		>insert_in
grammar mount **held under *present		>insert_in
grammar wedge **held under *present		>insert_in
grammar thrust **held under *present	>insert_in
grammar poke **held under *present		>insert_in
grammar put **held under *present		>insert_in
grammar place **held under *present		>insert_in

# THIS FUNCTION OVERRIDES THE LIBRARY VERSION
{+score_command
write ""
execute "+score"
write "^NOTE: It is possible to finish this story without a score of "
write "100%.^^"
if score = 0
   return
endif
execute "+score_breakdown
}

{+score_breakdown
write "So far, you have scored:^"
if screen has SCORED
   write "    10 points for seeing the blob on the radar screen^"
endif
if fuel has SCORED
   write "    10 points for viewing the green slide through the microscope^"
endif
if vial has SCORED
   write "    10 points for taking the small glass vial^"
endif
if rect_crate has SCORED
   write "     5 points for up-ending the crate behind the hangar^"
endif
if stranger has TRUSTING
   write "     5 points for telling the stranger about the green slide^"
endif
if filing has SCORED
   write "     5 points for taking the diary^"
endif
if diary has SCORED
   write "    10 points for showing the diary to the stranger^"
endif
if bullet has SCORED
   write "     5 points for finding the bullet behind the drum^"
endif
if office has SCORED
   write "    10 points for arriving in Monte Carlo^"
endif
if credit_card has SCORED
   write "     5 points for finding out the elderly man's name^"
endif
if elderly_man has SCORED
   write "     5 points for finding out the name of a conference guest^"
endif
if third_floor has SCORED
   write "    10 points for getting to the third floor^"
endif
if z_office has CUSTOM1
   write "    10 points for accepting death as a part of life^"
endif
if z_office has CUSTOM2
   write "    10 points for choosing life^"
endif
if z_office has CUSTOM3
   write "    10 points for helping to arrest Dr Zuckerman^"
endif
}

{+default_say_object_to
if noun2 = concierge
   if WHO_I_AM = false
      if PAGE_REQUESTED != false
         proxy "tell concierge my name is " noun1{names}
         return
      endif
   endif
endif
return false
}

grammar call *anywhere		>page
grammar phone *anywhere		>page
grammar page *anywhere		>page
grammar contact *anywhere	>page

{+page
set time = false
if noun1 hasnt ANIMATE
   write "You can only page people.^"
   return
endif
if here = concierge_desk
   proxy "ask concierge to page " noun1{names}
   return
endif
write "If you want to page someone, you should ask the concierge to do it "
write "for you.^"
}

grammar ring *present	>ring

{+ring
write "You can't ring " noun1{the} .^
set time = false
}

grammar flush *present	>flush

{+flush
write "You can't flush " noun1{the} .^
set time = false
}

grammar refill *held	>refill

{+refill
if noun1 != tank
   write "You can't refill " noun1{the} .^
   set time = false
   return
endif
if here != storage
   write "The hose to refill the tank from is in the storage area.^" 
   set time = false
   return
endif
if TANK_PRESSURE = 220
   write "The scuba cylinder is already full.^"
   set time = false
   return
endif
if RESERVE_PRESSURE = 0
   write "The high pressure tank is now empty.^"
   set time = false
   return
endif
if RESERVE_PRESSURE < 220
   set TANK_PRESSURE = RESERVE_PRESSURE
   set RESERVE_PRESSURE = 0 
else
   set TANK_PRESSURE = 220
   set RESERVE_PRESSURE - 220
endif
if tap has CLOSED
   write "Removing the first stage regulator from the tank you attach the "
   write "refill hose. Turning the tap you wait a few moments for the tank "
   write "fill then replace the regulator."
endif
if tap hasnt CLOSED
   write "Closing the tap on the scuba cylinder you remove the first stage "
   write "regulator then attach the refill hose. Opening the tap again, "
   write "you wait a few moments for the tank to fill then replace the "
   write "regulator."
   ensure tap has CLOSED
endif
if RESERVE_PRESSURE = 0
   write " Due to the high pressure tank running out, however, the scuba "
   write "tank is not completely full."
endif
write ^
}

grammar shoot *present	>shoot

{+shoot
if gun(parent) != kryten
   write "What did you intend to shoot " noun1{the} " with?^"
   set time = false
   return
endif
override
write "It's no wonder they don't issue guns to scientists.^"
}

{+default_say_object
if here = concierge_desk
   if noun1 has ANIMATE
      if PAGE_REQUESTED = false
         proxy "page " noun1{names}
         return
      else
         proxy "tell concierge my name is " noun1{names}
         return
      endif
   endif
endif
return false
}

{+default_object_object
if noun1 = concierge
   if noun2 has ANIMATE
      if PAGE_REQUESTED != false
         proxy "tell concierge my name is " noun2{names}
         return
      endif
   endif
endif
return false
}

grammar tell *present im *anywhere				>tell_im
grammar tell *present i'm *anywhere				>tell_im
grammar tell *present i am *anywhere			>tell_im
grammar tell *present that i am *anywhere		>tell_im
grammar tell *present that im *anywhere			>tell_im
grammar tell *present my name is *anywhere		>tell_im
grammar tell *present that my name is *anywhere	>tell_im

{+tell_im
if +can_talk<noun1 = true
   return true
endif
override
write  noun1{The} " appears to ignore you.^"
}

grammar ask *present to page *anywhere		>ask_to_page
grammar ask *present to contact *anywhere	>ask_to_page
grammar ask *present to call *anywhere		>ask_to_page
grammar ask *present to ring *anywhere		>ask_to_page
grammar tell *present to page *anywhere		>ask_to_page
grammar tell *present to call *anywhere		>ask_to_page
grammar tell *present to contact *anywhere	>ask_to_page
grammar tell *present to ring *anywhere		>ask_to_page

{+ask_to_page
if +can_talk<noun1 = true
   return true
endif
if noun1 != concierge
   write  noun1{The} " look" noun1{s} " at you and blinks.^"
   return
endall
if noun2 hasnt ANIMATE
   write "~Only people can be paged,~ the concierge says with a frown.^"
   return
endif
if noun2 = younger_man
   write "~In order to page someone, you will need to give me their name.~^"
   return
endif
if noun2 = elderly_man
   write "~In order to page someone, you will need to give me their name.~^"
   return
endif
if noun2 = door_men
   write "~In order to page someone, you will need to give me their name.~^"
   return
endif
if noun2 = waitress
   write "~In order to page someone, you will need to give me their name.~^"
   return
endif
if noun2 = guests
   write "~In order to page someone, you will need to give me their name.~^"
   return
endif
if noun2 = attendants
   write "~In order to page someone, you will need to give me their name.~^"
   return
endif
if noun2 = piano_player
   write "~In order to page someone, you will need to give me their name.~^"
   return
endif
if noun2 = landlord
   write "~In order to page someone, you will need to give me their name.~^"
   return
endif
if noun2 = concierge
   write "~But I'm already here!~ the concierge exclaims.^"
   return
endif
if WHO_I_AM = false
   write "~And who shall I say is paging?~ the concierge enquires.^"
   setstring question "say " 
   set time = false
   set PAGE_REQUESTED = noun2
   return
endif
if WHO_I_AM = noun2
   write "~You want to page yourself?~"
   return
endif
override
write "~I am sorry, there is no " noun2{the} " on the guest list,~ the "
write "concierge apologises.^"
}

grammar shoot *present with *held	>shoot_with

{+shoot_with
if noun2 = gun
   write "It's no wonder they don't issue guns to scientists.^"
   set time = false
   return
endif
write "I don't see how you can shoot " noun1{the} " with " noun2{the} .^
set time = false
}

grammar submit *held	>submit

{+submit
write "I'm afraid you will have to do that yourself.^"
set time = false
}

grammar inject *present with *present		>inject_with
grammar inoculate *present with *present	>inject_with

{+inject_with
if noun2(parent) = syringe
   proxy "inject " noun2{names} " in " noun1{names}
   return
endif
if noun2 isnt *held
   write "You are not holding " noun2{the} .^
   set time = false
   return
endif
if noun2 != syringe
   write  noun2{The} " " noun2{isnt} " for giving injections.^"
   return
endif
if +liquid?<noun2 = true
   proxy "inject " CHILD{names} " in " noun1{names}
   return
endall
write "There is nothing in the syringe.^"
}

grammar inject *present in *present		>inject_in
grammar squeeze *present in *present	>inject_in

{+inject_in
if noun1 = syringe
   proxy "inject " noun2{names} " with " noun1{names}
   return
endif
if noun1(parent) != syringe
   write "You can't inject " noun1{the} " into " noun2{the} " unless it is "
   write "in the syringe.^"
   set time = false
   return
endall
if syringe(parent) != player 
   write "You are not holding the syringe.^"
   set time = false
   return
endall
if +liquid?<noun2 = true
   write  noun2{The} " already contains " CHILD{the} . " If you were to "
   write "alse add " noun1{the} " they would mix together.^"
   set time = false
   return
endall
if noun2 = compartment
   write "Only the petri dishes containing the agar may be put into "
   write "the compartment in the freeze fracture device.^"
   return
endif
if noun2 has CONTAINER
   if noun2 hasnt CLOSED 
      override
      write "You inject " noun1{the} " in " noun2{the} .^
      move noun1 to noun2
      ensure noun1 hasnt OUT_OF_REACH
      return
endall
override
if noun2 = vial
   write "The vial would become contaminated if you were to fill it with "
   write noun1{the} .^
   set time = false
   return
endall
write "Inject " noun1{the} " into " noun2{the} "? I don't think so.^"
}

#                                                                      SYNONYMS
#------------------------------------------------------------------------------

synonym fluid		liquid
synonym doors		door
synonym elevator	lift
synonym lights		light

#                                                                     VARIABLES
#------------------------------------------------------------------------------

integer ENERGY_LEVEL		5
integer WISE_INFORMED
integer WISE_ASKED
integer WORK_PHASE
integer FLASK_TEMPERATURE	4

integer LONGITUDE			37	
integer LATITUDE			42

integer CURRENT_DEPTH
integer TANK_PRESSURE		220
integer RESERVE_PRESSURE	1000
integer WATER_LEVEL
integer COUNTER_POSITION
integer SCREEN_FADE
integer CONSUMPTION_RATE
integer LISAS_SCRIPT
integer GULLITS_SCRIPT
integer STRANGERS_SCRIPT
integer HUGHES_SCRIPT
integer AGING_SCRIPT
integer SONG_PLAYED
integer LIFT_1_POSITION	1
integer LIFT_2_POSITION	3
integer LIFT_1_TASK		42
integer LIFT_2_TASK		42
integer NEEDS_LINEFEED
integer WHO_I_AM
integer PAGE_REQUESTED
integer TOPICS_DISCUSSED
integer VAN_ABSENCE
integer WISES_SCRIPT
integer MPS_SCRIPT
integer BEACH_SCRIPT
integer JUNGLE_SCRIPT		13
integer FRANKS_SCRIPT
integer BARMANS_SCRIPT
integer WAITRESS_SCRIPT	1
integer PRETZELS_EATEN
integer REPUTATION_CURRENT	true

;                                                              GLOBAL FUNCTIONS
;------------------------------------------------------------------------------

{+waitress_actions
if WAITRESS_SCRIPT = 1
   if here = waitress(parent)
      write "^The waitress takes two drinks from a tray that she "
      write "is holding and places them onto the table occupied by the men. "
      write "Thanking the waitress, the elderly man takes a credit card from "
      write "his wallet and places it on the now empty tray. With a brief "
      write "smile, the waitress heads off to the north.^"
   endif
   move waitress to bar
   set waitress(status) = 1
   return
endall
if WAITRESS_SCRIPT = 11
   if here = waitress(parent)
      write "^The waitress heads over to the bar and begins giving the "
      write "cocktail waiter a series of orders.^"
   endif
   set waitress(status) = 2
   return
endall
if WAITRESS_SCRIPT = 12
   if here = waitress(parent)
      write "^The waitress hands the elderly man's credit card to the "
      write "cocktail waiter who places it on the shelf behind the bar.^"
   endif
   move credit_card to bar_shelves 
   return
endall
if WAITRESS_SCRIPT = 16 
   if here = waitress(parent)
      write "^Her tray now fully loaded, the waitress begins walking "
      write "about the room delivering the drinks.^"
   endif
   set waitress(status) = 3
   move ordered_drinks to tray
   return
}

{+franks_actions
if FRANKS_SCRIPT = 5 
   write "^A hotel guest walks over to the counter and gives her key to "
   write "the concierge. He places it in the appropriate pigeon hole "
   write "before she walks away.^"
   return
endif
if FRANKS_SCRIPT = 10
   write "^A rather distressed looking man asks the concierge for "
   write "directions to the bathrooms. Baffled, the concierge replies that he "
   write "doesn't understand the word bathrooms in that context. The "
   write "man, now looking even more distressed, waddles away.^"
   return
endif
if FRANKS_SCRIPT = 15 
   write "^~I trust you enjoyed your meal, Monsieur Grodas,~ the concierge "
   write "says to a recently arrived hotel guest as he passes him his key "
   write "unprompted. The guest simply smiles before disappearing back "
   write "into the crowd.^"
   return
endif
if FRANKS_SCRIPT = 20
   write "^A tall, dark man walks up to the counter and asks the concierge "
   write "for a pen and piece of paper. Scrawling a quick note, he tells "
   write "the concierge that it is for room 314, then leaves.^"
   return
endif
if FRANKS_SCRIPT = 25
   write "^A shrill ring emits from the telephone on the counter which is "
   write "answered promptly by the concierge. ~Hotel les Terrasses d'Eze,~ he "
   write "says in what is obviously his chirpiest voice. ~Of course madame, I "
   write "will send someone straight away,~ he says before hanging up.^"
}

{+barmans_actions
if BARMANS_SCRIPT = 5 
   write "^Whistling quietly along with the piano, the cocktail waiter "
   write "begins to polish some glasses.^"
   return
endif
if BARMANS_SCRIPT = 10 
   write "^The cocktail waiter begins to make a dry martini for one of the "
   write "guests. ~Just take a seat sir,~ he says with a smile, ~I'll have "
   write "the waitress bring it over to you when it is ready.~^"
   return
endif
if BARMANS_SCRIPT = 15 
   write "^Making the most of a quite moment the cocktail waiter wipes down "
   write "the top of the bar.^"
   return
endif
if BARMANS_SCRIPT = 20
   write "^Turning around to face the mirrored wall behind him, the "
   write "cocktail waiter straightens his bow tie.^"
   return
endif
if BARMANS_SCRIPT = 25 
   write "^Glancing quickly around the room, the cocktail waiter "
   if wooden_bowl(parent) = long_bar
      write "eats one of the pretzels from the bowl on the bar.^"
      return
   endif
   write "reaches for a pretzel, surprised to see the bowl missing.^"
}

{+change_song
if SONG_PLAYED = 5
   execute "+new_song"
endif
if SONG_PLAYED = 10
   execute "+new_song"
endif
if SONG_PLAYED = 15
   execute "+new_song"
endif
if SONG_PLAYED = 20
   execute "+new_song"
endif
if SONG_PLAYED = 25
   execute "+new_song"
endif
if SONG_PLAYED = 30
   execute "+new_song"
endif
if SONG_PLAYED = 35
   execute "+new_song"
endif
if SONG_PLAYED = 40
   execute "+new_song"
endif
if SONG_PLAYED = 45
   execute "+new_song"
endif
if SONG_PLAYED = 50
   execute "+new_song"
endif
}

{+new_song
write "^After a short pause, the lady behind the piano changes to playing "
execute "+song"
write .^
}

{+wise_hassle
if mask hasnt CUSTOM5
   if mask has WORN
      write " And by the way, take that dive gear off, you look "
      write "ridiculous.~^"
      ensure mask has CUSTOM5
      return
endall
if mask hasnt CUSTOM5
   if tank has WORN
      write " And by the way, take that dive gear off, you look "
      write "ridiculous.~^"
      ensure mask has CUSTOM5
      return
endall
write ~^
}

{+wise_fashion
write "^Looking you up and down, Colonel Wise begins to laugh. ~I don't "
write "recall dive gear becoming standard military wear, Dr Meadows?~"
}

{+navigation
write "To get back to the lagoon you must go:"
if LONGITUDE < 36 
   set INDEX = 36
   set INDEX - LONGITUDE  
   write "   east " INDEX " time"
   if INDEX != 1
      write "s"
   endif
    write ^
endif
if LONGITUDE > 36
   set INDEX = LONGITUDE
   set INDEX - 36 
   write "   west " INDEX " time"
   if INDEX != 1
      write "s"
   endif
    write ^
endif
if LATITUDE < 41
   set INDEX = 41
   set INDEX - LATITUDE
   write "   south " INDEX " time"
   if INDEX != 1
      write "s"
   endif
    write ^
endif
if LATITUDE > 41
   set INDEX = LATITUDE
   set INDEX - 41 
   write "   north " INDEX " time"
   if INDEX != 1
      write "s"
   endif
    write ^
endif
if screen hasnt SCORED
   return
endif
write "To be at the same co-ordinates as the blob on the radar screen you "
write "must go:"
if LONGITUDE < 15
   set INDEX = 15
   set INDEX - LONGITUDE  
   write "   east " INDEX " time"
   if INDEX != 1
      write "s"
   endif
    write ^
endif
if LONGITUDE > 15
   set INDEX = LONGITUDE
   set INDEX - 15
   write "   west " INDEX " time"
   if INDEX != 1
      write "s"
   endif
    write ^
endif
if LATITUDE < 21
   set INDEX = 21
   set INDEX - LATITUDE
   write "   south " INDEX " time"
   if INDEX != 1
      write "s"
   endif
    write ^
endif
if LATITUDE > 21
   set INDEX = LATITUDE
   set INDEX - 21 
   write "   north " INDEX " time"
   if INDEX != 1
      write "s"
   endif
    write ^
endif
if LONGITUDE = 15
   if LATITUDE = 21
      write "   absolutely nowhere"
endall
}

{+before_sit
if wooden_chair is *here
   proxy "sit in chair"
   return
endif 
return false
}

{+defect
if ear_piece has WORN
   write "^~Shit! Alex! What the hell are you doing?~ Agent Hughes voice "
   write "barks through the ear piece.^"
endif
write "^Suddenly the sound of hurried footsteps draws your attention to the "
write "hallway outside. Before you have a chance to react, a man and a woman "
write "burst into the room, guns drawn.^"
write "^~Place your hands against the far wall and stand with your legs apart. "
write "Both of you,~ the woman orders in a loud voice while the man stands on "
write "guard, gun drawn. After frisking you briefly the woman "
write "places you both in handcuffs and leads you down the lifts and out of "
write "the building. Once on the street, you meet up with a very disappointed "
write "pair of agents, Hughes and Petrescu.^"
execute "+game_over"
}

{+gullit_journey
if GULLITS_SCRIPT = 24 
   return
endif
if GULLITS_SCRIPT < 15
   set GULLITS_SCRIPT + 1
   return
endif
if GULLITS_SCRIPT = 15
   # DIRECTLY OVERRIDE ANY PREVIOUS LIFT INSTRUCTIONS
   set lift_obj(moving_to) = 3
   ensure callbutton3 has ON
   ensure 3button has ON
   set GULLITS_SCRIPT = 16
   return
endif
if GULLITS_SCRIPT = 16
   if third_floor(north) != nowhere
      set GULLITS_SCRIPT = 17
      move ruud to lift
      if here = lift
         write "^A well dressed gentleman with dreadlocks enters the lift "
         write "from outside and presses the button for the ground floor.^"
      endif
      set lift_obj(moving_to) = 0
      ensure gbutton has ON
      return
   endif
   # DON'T MOVE ONTO 17 UNTIL RUUD GETS IN THE LIFT
endif
if GULLITS_SCRIPT = 17
   if ruud(parent) = lift
      if lift(south) = ground_floor
         set GULLITS_SCRIPT = 18
         execute "+push_object<ruud<south"
         return
      endif
   endif
endall
if GULLITS_SCRIPT = 18
   set GULLITS_SCRIPT = 19
   execute "+push_object<ruud<south"
   return
endall
if GULLITS_SCRIPT = 19
   if here = lobby
      write "^The well dressed gentleman begins gazing about the room as if "
      write "looking for someone.^"
   endif
   set GULLITS_SCRIPT = 20 
   return
endall
if GULLITS_SCRIPT = 20 
   set GULLITS_SCRIPT = 21 
   execute "+push_object<ruud<west"
   return
endall
if GULLITS_SCRIPT = 21 
   if here = bar
      write "^Craning to see over the crowds, the well dressed gentleman "
      write "scans the room with his eyes.^"
   endif
   set GULLITS_SCRIPT = 22 
   return
endall
if GULLITS_SCRIPT = 22 
   set GULLITS_SCRIPT = 23 
   execute "+push_object<ruud<south"
   return
endall
if GULLITS_SCRIPT = 23 
   if here = lounge
      write "^Spotting each other from across the room, the well dressed "
      write "gentleman and the elderly man embrace like old friends. They "
      write "speak quickly for a moment, apparently concerning some "
      write "confusion as to when they had intended to meet, then sit down "
      write "around the table with the younger man.^"
   endif
   set younger_man(status) = 1
   set ruud(status) = 1
   set GULLITS_SCRIPT = 24 
endif
}

# LIFT STUFF

attribute   OUTSIDE_LIFT

integer FLOOR_MAPPING ground_floor first_floor second_floor third_floor

location lift : lift
 short		the "elevator"

{look
if here has VISITED
   write "You are back in the lift.^"
   return
endif
write "The lift is about three metres square and every bit as opulent as "
write "the rest of the hotel. There is a panel of buttons on the wall directly "
write "beneath a small metal plaque. The door to the south is currently "
if here(south) != nowhere
   write "open, "
else
   write "closed, "
endif
write "and there is the usual panel of buttons beside it.^"
}

{movement
if compass = south : compass = out
   if destination = nowhere
      write "The lift doors are currently closed.^"
      return
endall
if destination = false
   write "The only way out of the lift is to the south.^"
   return
endif
return false
}
 
object cbutton: close doors button
 short		a "close doors button"

{press : move
if lift_obj(turns_till_doors_close) = 0
   write "The doors are already closed.^"
   set time = false
   return
endif
write "The lift doors slide closed.^"
execute "+lift_close"
}

object obutton: open doors button
 short		an "open doors button"

{press : move
if lift_obj(turns_till_doors_close) > 0
   write "The doors are already open.^"
   set time = false
   return
endif
if lift_obj(moving_to) != arrived
   write "The lift doors refuse to open while the lift is in motion.^"
   return
endif
write "The lift doors slide open.^"
execute "+lift_open"
}

object gbutton: ground floor button
 short		a "ground floor button"
 floor		0

{press : move
execute +floorbuttonpress<self
}

object 1button: first floor button
 short		a "first floor button"
 floor		1

{press : move
execute +floorbuttonpress<self
}

object 2button: second floor button
 short		a "second floor button"
 floor		2

{press : move
execute +floorbuttonpress<self
}

object 3button: second floor button
 short		a "third floor button"
 floor		3

{press : move
write "The button lights as you press it, only to go off again when you "
write "release it. Stepping back, you notice the red light beside the MIL key "
write "slot flash on and off momentarily.^"
}

object lift_red: small red light led
 short		a "small red light"

{examine
write "The small red light is currently out.^"
}
 
object lift_green: small green light
 short		a "small green light"

{examine
write "The small green light is currently out.^"
}
 
object slot_1: mil key slot
 short		a "MIL key slot"

object mil_key: mil key
 short		a "MIL key"
 parent		nowhere

object lift_panel : panel of buttons
 short		a "panel of buttons"

{examine
write "The panel consists of six buttons labelled ground, one, two, three, "
write "open and close. Beneath the buttons there is a MIL key slot "
write "which has a red light to its left and a green light to its right. "
if gbutton has ON
   write "The button for the ground floor is currently lit."
endif
if 1button has ON
   write "The button for the first floor is currently lit."
endif
if 2button has ON
   write "The button for the second floor is currently lit."
endif
write ^
execute examine_display
}

string led_display	G 1 2 3

object display : led display
 short		an "LED display"

{examine
write "Above the panel is an LED display with a large red '"
write led_display[lift_obj(floor)] "'.^"
}

# Elements of lift object:
constant floor						5
constant moving_to					6
	constant arrived				42; POSSIBLE VALUE OF moving_to
constant turns_till_doors_close 	7
constant delta						8

object lift_obj: lift door doors
 short		the "lift"
 moving_to	arrived

{examine
if lift_obj(turns_till_doors_close) > 0;
   write "The lift doors are open.^"
else
   write "The lift doors are closed.^"
endif
}

{enter
if here = lift
   write "You are already in the lift.^"
   set time = false
   return
endif
proxy "east"
}

{open
if lift_obj(turns_till_doors_close) > 0;
   write "The lift doors are already open.^"
   return
endif
if here = lift
   write "(by pressing the open doors button)^"
   proxy "press open doors button"
   return
endif
write "(by pressing the call button)^"
proxy "press call button"
}

{close
if lift_obj(turns_till_doors_close) = 0;
   write "The lift doors are already closed.^"
   return
endif
if here = lift
   write "(by pressing the close doors button)^"
   proxy "press close doors button"
   return
endif
write "There is no way to close the lift doors from the outside.^"
}

{+lift_close
set lift_obj(turns_till_doors_close) = 0
set noun3 = FLOOR_MAPPING[lift_obj(floor)]
set lift(south) = nowhere
set lift(out) = nowhere
set lift(south) = nowhere
set lift(out) = nowhere
set noun3(in) = nowhere
set noun3(north) = nowhere
}

{+lift_open
set lift_obj(turns_till_doors_close) = 3;
set noun3 = FLOOR_MAPPING[lift_obj(floor)]
set lift(south) = noun3
set lift(out) = noun3
set noun3(in) = lift
set noun3(north) = lift
}

{+lift_action
if here = lift
   move lift_obj to here
endif
if here has OUTSIDE_LIFT
   move lift_obj to here
endif
if lift_obj(turns_till_doors_close) > 0
   # THE LIFT DOORS ARE OPEN...
   set lift_obj(turns_till_doors_close) - 1
   if lift_obj(turns_till_doors_close) = 0
      if here = lift : here = FLOOR_MAPPING[lift_obj(floor)]
         write "^The lift doors slide closed.^"
       endif
      execute "+lift_close"
   endif
   return # THE LIFT CAN'T DO ANYTHING ELSE UNTIL THE DOORS HAVE CLOSED
endif
if lift_obj(moving_to) != arrived
   if lift_obj(moving_to) != lift_obj(floor)
      # THE LIFT IS STILL ON ITS WAY TO SOMEWHERE
      set lift_obj(delta) = lift_obj(moving_to)
      set lift_obj(delta) - lift_obj(floor)
      if lift_obj(delta) < 0 
         set lift_obj(floor) - 1
      else
         set lift_obj(floor) + 1
      endif
      if here = lift
         write "^The lift vibrates as it slowly "
         if lift_obj(delta) < 0
            write "descends.^"
         else
            write "ascends.^"
         endif
      endif
      return
   endif
   set lift_obj(moving_to) = arrived
   if here = FLOOR_MAPPING[lift_obj(floor)]
      write "^A crisp-sounding bell rings briefly and the doors "
      write "to the lift slide open.^"
   endif
   if here = lift
      write "^Having arrived at the selected floor, the lift "
      write "gently comes to a halt and the doors open.^" 
   endif
   execute "+lift_open"
   execute "+disable_callbuttons"
endif
}

{+floorbuttonpress
if arg[0] has ON
   write "" arg[0]{The} " has already been pressed.^"
   set time = false
   return
endif
if lift_obj(moving_to) != arrived
   write "The button lights as you press it, only to go off again when you "
   write "release it (the lift is still in trstylet).^"
   return
endif
if lift_obj(floor) = arg[0](floor)
   if lift_obj(turns_till_doors_close) > 0
      write "The lift is already at " FLOOR_MAPPING[arg(floor)]{the} ".^"
      set time = false
      return
   endif
   write "A crisp-sounding bell rings briefly and the doors "
   write "to the lift slide open.^"
   execute "+lift_open"
   ensure arg[0] hasnt ON
   return
endif
write "" arg[0]{The} " lights up as you press it.^"
execute "+disable_callbuttons"
ensure arg[0] has ON
set lift_obj(moving_to) = arg[0](floor)
}

{+disable_callbuttons
ensure gbutton hasnt ON
ensure 1button hasnt ON
ensure 2button hasnt ON
ensure 3button hasnt ON
ensure callbuttong hasnt ON
ensure callbutton1 hasnt ON
ensure callbutton2 hasnt ON
ensure callbutton3 hasnt ON
}

{+door_warning
if compass = north : compass = in
   if destination = false
       write "The lift doors are closed.^"
       return
   endif
endif
return false
}

{+song
if SONG_PLAYED < 10
   write "~Who Wants to Live Forever~"
   return
endif
if SONG_PLAYED < 20
   write "~Some Enchanted Evening~"
   return
endif
if SONG_PLAYED < 30
   write "~As Time Goes By~"
   return
endif
if SONG_PLAYED < 40
   write "~Warriors of Ghengis Kahn~"
   return
endif
if SONG_PLAYED < 50
   write "~Blue Moon~"
   return
endif
if SONG_PLAYED < 60
   write "~Diamonds Are Forever~"
   return
endif
if SONG_PLAYED < 70
   write "~Ace of Spades~"
   return
endif
if SONG_PLAYED < 80
   write "~Honesty~" 
   return
endif
if SONG_PLAYED < 90
   write "~The Wild Wild Sea~"
   return
endif
write "~I'm in Love with my Car~"
}

{+attention
write "you manage to attract the attention of one of the divers. Looking up, "
write "he signals to his colleagues who all fire their spear guns without the "
write "slightest hesitation. You have but a moment to regret your actions.^"
execute "+game_over"
}

{+report_submitted
move report to wise
write "and begins to skim through its contents. "
if report has DAMAGED
   write "~Do you make a habit of bathing all your reports, Dr Meadows?~ "
   write "Colonel Wise asks as he carefully turns the soggy pages. "
endall
write "After a moment of awkward silence he places the report into one of his "
write "desk drawers then leans back into his chair again.^"
write "^~Fine,~ Colonel Wise remarks blandly with an obvious expression of "
write "relief on his face. Picking up the telephone he calls through to the "
write "transport division and after a brief conversation informs you that "
write "your flight back to the mainland will be leaving on the hour.^"
write "^Walking back to the outpost, you collect what few possessions you "
write "brought with you then head out to the helicopter pad. A few hurried "
write "signatures on the regulation paper work and you are soon in the air "
write "flying rapidly across the warm tropical waters of the Pacific Ocean.^" 
if diary has SCORED
   if stranger has TRUSTING
      more
      clear
      write "^^^HONG KONG INTERNATIONAL AIRPORT^"
      write "TUESDAY 6:27 AM^^"
      write "^A long and bumpy flight sees you arrive in Hong Kong feeling "
      write "tired and sore. Stumbling across the tarmac, you start to "
      write "consider the fact that you have absolutely no idea where "
      write "to meet your contact. This thought is soon driven from your "
      if rope(parent) != vent
         write "mind by an even more alarming thought: how did the stranger "
         write "escape the hangar after I left the rope untied? After several "
         write "hours of waiting, there is still no sign of your contact, a "
         write "fact that leads you to believe that he did not escaped at "
         write "all.^"
         execute "+game_over"
         return
      endif
      write "mind, however, by the sight of two tall men in dark grey suits "
      write "standing before you.^^"
      write "~Dr Alex Meadows?~ one of the men asks.^^"
      write "~Yes,~ you reply with a weary and nervous nod.^^"
      write "~This is agent Petrescu,~ the man continues, leading you towards "
      write "the main airport terminal, ~and I am agent Hughes.~ Reaching "
      write "into his jacket he pulls out a plane ticket and hands it to you. "
      write "~We have a connecting flight leaving for France in fifteen "
      write "minutes. A change of clothes has been arranged.~^^" 
      write "Excited as you are about your adventure ahead, if no one was "
      write "looking, you would cry.^"
      points 10
      ensure office has SCORED
      more
      clear
      style bold
      write "^^^OUTSIDE HOTEL LES TERRASSES D'EZE, MONTE CARLO, MONACO^"
      write "WEDNESDAY 8:15 PM^^"
      style plain
      set kryten(parent) = van
      look
      loop
         if noun3(parent) = kryten
            move noun3 to limbo
         endif
      endloop
      move jacket to kryten
      move ear_piece to kryten
      move hair to kryten
      move teeth to kryten
      move vial to kryten
      move green_slide to kryten
      return
endall
execute "+home_again"
}

{+home_again
more
clear
write "MEADOWS RESIDENCE, SYDNEY, AUSTRALIA^" 
write "WEDNESDAY 8:37 PM^^"
write "After a long and boring connecting flight, followed by an equally "
write "arduous taxi ride across town, you find yourself standing on the "
write "front doorstep of your home. Your brief knock is answered almost "
write "instantly and you collapse into the warm embrace of your spouse. "
write "Once inside, you wash and change while a pot of tea draws then "
write "proceed to explain all that has happened.^^"
execute "+game_over"
}

{+evicted
write "~Right, that's it,~ Colonel Wise says sharply.^" 
write "Picking up the telephone on his desk, he dials through to the "
write "transport division. After a brief conversation, he informs you that "
write "your flight back to the mainland will be leaving on the hour.^" 
write "Walking back to the outpost, you collect what few possessions you "
write "brought with you then head out to the helicopter pad. A few hurried "
write "signatures on the regulation paper work and you are soon in the air, "
write "flying rapidly across the warm tropical waters of the Pacific Ocean.^" 
execute "+home_again"
}

{+before_clean_with
if noun2 = toothbrush
   if noun1 = toilet
      write "Well, you sure know how to party.^"
      return
   endif
   if noun1 != teeth
      write "I think you've been watching too many army movies.^"
      return
endall
return false
}

{+before_attack_with
if noun1 = divers
   write "I think at this point we should take a moment to assess the "
   write "situation. We have you, wielding " noun2{the} " menacingly, and the "
   write "MP who has an M16 and many years of combat training under his belt. "
   write "I don't think it takes a rocket scientist to figure out what the "
   write "likely outcome of any altercation would be.^"
   return
endif
if noun1 = wise
   execute "attack_wise"
   return
endif
if noun1 = guard
   execute "attack_guard" 
   return
endif
if noun1 = lisa
   write "Assaulting a military officer"
   if pistol(parent) = lisa
      write ", particularly one carrying a pistol,"
   endif
   write " with " noun2{the} " probably isn't such a good career move.^"
   return
endif
return false
}

{+before_listen
if recorder is *present
   if recorder has ON
      write "You can hear the gentle hum of the microcassette recorder's "
      write "motor.^"
      return
endall
return false
}

{+default_look_at_through
if noun2 = magnifying_glass
   if here has MID_WATER
      write "You can't see anything through the magnifying glass while "
      write "underwater.^"
   endif
   if noun1 has ANIMATE
      write "You don't think that might be a tad rude?^"
      return
   endif
   if noun1 has OUT_OF_REACH
      write  noun1{The} " " noun1{is} " too far away to look at through the "
      write "magnifying glass.^"
      return
   endif
   write "You don't notice anything of any significance.^"
   return
endif
return false
}

{+default_drop
if here = lagoon_surface
   write "You drop " noun1{the} " which rapidly sink" noun1{s} " out of "
   write "view.^"
   move noun1 to lagoon_bottom
   return
endall
if here = lagoon_bottom
   write "You drop " noun1{the} .^
   move noun1 to here
   return
endif
if here = surface
   write "You drop " noun1{the} " which rapidly sink" noun1{s} " out of "
   write "view.^"
   move noun1 to beneath_outpost
   return
endall
if here = beneath_outpost 
   write "You drop " noun1{the} .^
   move noun1 to here
   return
endif
return false
}

{+before_drop_all
if here = ocean_bottom
   write "Littering the world's oceans isn't a requirement for the "
   write "completion of this story.^"
   set time = false
   return
endall
return false
}

{+before_drop
if here = ocean_bottom
   write "Littering the world's oceans isn't a requirement for the "
   write "completion of this story.^"
   set time = false
   return
endall
return false
}

{+before_examine
if here has UNDER_WATER
   if mask hasnt WORN
      write "With the salt water in your eyes, " noun1{the} " looks nothing "
      write "other than blurry.^"
      return
endall
return false
}

{+before_look_up_in
if noun1 = book
   if noun1 has DAMAGED
      write "You take extra care not to rip the pages while turning them "
      write "due to their rather soggy and fragile state.^" 
endall
return false
}

{+fill_with_vial
proxy "fill syringe using vial"
}

{+diving
if tank has WORN
   set CONSUMPTION_RATE = CURRENT_DEPTH
   set CONSUMPTION_RATE / 10
   set CONSUMPTION_RATE + 1
   set TANK_PRESSURE - CONSUMPTION_RATE
   if TANK_PRESSURE < 0 
      set TANK_PRESSURE = 0
   endif
endif
if TANK_PRESSURE = 0
   if tank has WORN
      execute "+tank_empty"
   endif
endif
if here hasnt WITHOUT_AIR
   set OXYGEN_LEFT = 5
endall
if tank has WORN
   set OXYGEN_LEFT = 5
endall
if here has WITHOUT_AIR
   if tank hasnt WORN
      set OXYGEN_LEFT - 1
   endif
endif
if OXYGEN_LEFT = 0
   execute "+out_of_air"
endif
if OXYGEN_LEFT = 1
   write "^Your lungs begin to burn as the last scraps of oxygen are "
   write "extracted from the air within them.^"
endif
}

{+tank_empty
ensure tank hasnt WORN
write "Breathing through the regulator has suddenly become more "
write "difficult. The resistance, dramatically increasing with each breath, "
write "has now reached the point where taking another is impossible. "
write "Slipping out of the scuba gear you begin "
ensure tank hasnt WORN
if here has WITHOUT_AIR
   write "to hold your breath.^"
   return
endall
write "to breathe fresh air again.^"
}

{+out_of_air
write "^The burning sensation in your lungs has now become unbearable. "
if here = beneath_outpost
   write "You swim upwards, desperate for air, gasping the moment you break "
   write "the surface.^"
   set player(parent) = surface
   set CURRENT_DEPTH = 0
   return
endall
write "Gazing desperately upward, you begin to panic as it becomes "
write "increasingly obvious to you that you are not going to reach the "
write "surface in time. You pass out, dreaming momentarily of a high mountain "
write "outcrop overlooking a green valley. A brightly coloured bird flies "
write "by, its large beating wings forcing a gentle breath of cool, clean "
write "air against your upturned face. Moments later it has passed over "
write "a distant rise, and you into the melting pot of humanity.^" 
execute "+game_over"
}

{+movement
if destination = walkway 
   if wooden_chair(parent) = player
      write "You would look a bit suspicious walking around a military base "
      write "while carrying a wooden chair.^"
      set time = false
      return
endall
if destination = on_crate
   if tank(parent) = player
      write "It would be almost impossible to climb onto the crate while "
      write "carrying the scuba cylinder.^"
      set time = false
      return
endall
if destination = on_crate
   if fins has WORN
      write "It would be almost impossible to climb onto the crate while "
      write "wearing the fins.^"
      set time = false
      return
endall
if destination = surface
   if wooden_chair(parent) = player
      write "You can't go swimming while you are carrying the wooden chair.^"
      set time = false
      return
endall
if destination = surface 
   execute "+ocean_damage"
endall
if destination = street
   move van_obj to street
   move van_doors to street
   if VAN_ABSENCE = 0
      set VAN_ABSENCE = 1
endall
if destination = hangar_south
   if lisa has CUSTOM2
      write "Determined to escape the situation, you turn and head towards "
      write "the other end of the room."
      execute "+lisa_shoots"
      write "you and forces you onto the ground.^"
      execute "+busted"
      return
   endif
   if lisa has ON
      write "Determined to escape the situation, you turn and head towards "
      write "the other end of the room.^"
      execute "+guard_called"
      write "you and forces you onto the ground.^"
      execute "+busted"
      return
   endif
endall
if destination = roof_north
   if lisa has CUSTOM2
      write "Determined to escape the situation, you head towards the rope "
      write "as begin to climb up."
      execute "+lisa_shoots"
      write "the base of the rope and orders you to climb back down. Having "
      write "no doubt that you would also be shot if you failed to obey his "
      write "orders, you slowly drop back down onto the floor.^"
      execute "+busted"
      return
   endif
   if lisa has ON
      write "Determined to escape the situation, you head towards the rope "
      write "as begin to climb up.^"
      execute "+guard_called"
      write "the base of the rope and orders, you to climb back down. Having "
      write "no doubt that he too would shoot if you failed to obey his "
      write "orders, you slowly drop back down onto the floor.^"
      execute "+busted"
      return
   endif
   if lisa has BURNING
      if top_drawer hasnt BURNING
         write "Once you are safely at the top of the rope, Lisa calls the "
         write "MP in from outside. Before long, several other officials enter "
         write "the room and begin to question the stranger once the MP has "
         write "resumed his post outside.^" 
         ensure top_drawer has BURNING
   endif
   if filing has CUSTOM5
      ensure rope hasnt CUSTOM5
   endif
endall
if destination = hangar_north
   if compass = south
      execute "show_to_guard_c_pass"
      return
   endif
   if compass = down 
      if lisa has BURNING
         write "With all the officials down there interrogating the "
         write "stranger, back in the hangar is the last place you want to be.^"
         set time = false
         return
endall
if here has CUSTOM5
   if fins hasnt WORN
      if ENERGY_LEVEL = 1 
         write "Exhaustion undermines your will to go on.^"
         set time = false
         return
      endif
   endif
   if fins hasnt WORN
      write "Kicking ferociously, your progress is slow and tiring in "
      write "the gentle yet persistent currents.^^" 
      set ENERGY_LEVEL - 2
endall
if player has SITTING 
   if destination != false
      write "(standing up first)^" 
      ensure player hasnt SITTING
      return false
endall
if lisa has DAMAGED
   if destination != false
      write "You thank Lisa for the information before turning to leave.^^" 
      ensure lisa hasnt DAMAGED
endall
if fins has WORN 
   if destination != false
      if here hasnt ON_WATER
         if here hasnt UNDER_WATER
            if here hasnt MID_WATER
               if destination hasnt ON_WATER
                  if destination hasnt UNDER_WATER
                     if destination hasnt MID_WATER
                        write "Shuffling backwards, you try your best not "
                        write "to trip over in the fins.^^" 
endall
if destination = conference_room
   if conference_room hasnt CUSTOM4
      write "As you leave the lift area, you are overwhelmed by the sound "
      write "of applause errupting from within the conference room.^^" 
endall
if destination = nowhere
   return false
endall
if compass = north
   set LATITUDE - 1
endall
if compass = northeast
   set LATITUDE - 1
   set LONGITUDE + 1
endall
if compass = east
   set LONGITUDE + 1
endall
if compass = southeast
   set LATITUDE + 1
   set LONGITUDE + 1
endall
if compass = south
   set LATITUDE + 1
   if here = control_centre
      if lisa(parent) = control_centre
         ensure screen has ON
endall
if compass = southwest
   set LATITUDE + 1
   set LONGITUDE - 1
endif
if compass = west
   set LONGITUDE - 1
endall
if compass = northwest
   set LONGITUDE - 1
   set LATITUDE - 1
endall
if compass = up
   if here has UNDER_WATER
      set CURRENT_DEPTH - 5
   endif
   if here = estuary 
      set LONGITUDE - 1
      set LATITUDE - 1
   endif
   if here = base
      set LONGITUDE + 1
endall
if compass = down
   if here = hill
      set LONGITUDE + 1
      set LATITUDE + 1
   endif
   if here = pad
      set LONGITUDE - 1
   endif
   if here has UNDER_WATER
      set CURRENT_DEPTH + 5
   endif
   if here has ON_WATER
      set CURRENT_DEPTH + 5
endall
if compass = in
   if here = hill
      set LATITUDE - 1
endall
if compass = out
   if here = shed 
      set LATITUDE + 1
endall
if destination has OUTDOORS
   move north_wall to limbo
   move south_wall to limbo
   move east_wall to limbo
   move west_wall to limbo
   if destination = behind_hangar
      move south_wall to destination
   endif
   if destination = on_crate
      move south_wall to destination
endall
if destination hasnt OUTDOORS
   move north_wall to destination
   move south_wall to destination
   move east_wall to destination
   move west_wall to destination
endall
move ground to destination
return false
}

{+bad_move
execute "+guard_called"
write "you and forces you on to the ground.^"
execute "+busted"
}

{+guard_called
write "~Guard!~ Lisa calls at the top of her voice. Almost instantly the "
write "access door to the hangar bursts open and the MP enters, gun raised. "
write "Quickly assessing the situation, he runs over to "
}

{+lisa_shoots
write " As you do so, a deafening bang echos throughout the hangar. Startled, "
write "you turn your head to see Lisa standing over the slumped body of the "
write "stranger. Almost instantly the access door bursts open and the MP "
write "enters, gun raised. Quickly assessing the situation, he runs over to "
}

{+busted
write "^Moments later you are being led handcuffed back out into the "
write "cool air of the evening. Through the gathering crowd you spot Colonel "
write "Wise, obviously pleased at the thought of you spending the next ten "
write "years in prison, far away from him and his base.^" 
execute "+game_over"
}

{+before_insert_all_on
if noun1 = rect_crate
   write "No.^"
   set time = false
   return
endall
if noun1 = drain
   write "It'll be you mopping up the mess when half the outpost floods due "
   write "to you blocking the drain (a thought that makes you change your "
   write "mind).^"
   set time = false
   return
endall
return false
}

{+before_insert_on
if noun2 = rect_crate
   write "No.^"
   set time = false
   return
endall
if noun2 hasnt SURFACE 
   write "There isn't a flat surface on " noun2 .^
   set time = false
   return
endall
if noun2 = microscope
   proxy "insert " noun1{names} " in " noun2{names}
   return
endall
if noun2 = rect_crate_2
   proxy "drop" noun1{names}
   return
endall
if noun2 = ground
   proxy "drop " noun1{names}
   return
endall
if noun2 = drain
   write "It'll be you mopping up the mess when half the outpost floods due "
   write "to you blocking the drain (a thought that makes you change your "
   write "mind).^"
   set time = false
   return
endall
return false
}

{+before_pour_in : +before_pour_on
if noun2 = compartment
   write "Only the petri dishes containing the agar may be put into "
   write "the compartment in the freeze fracture device.^"
   return
endif
return false
}

{+before_insert_in
if noun2 = device
   set noun2 = compartment
endif
if noun2 = compartment
   if noun1 = dish_1
      if agar_1(parent) != dish_1
         write "With the agar no longer in the petri dish, there is "
         write "no point.^" 
         set time = false
         return
      endif
      return false
   endif
   if noun1 = dish_2
      if agar_2(parent) != dish_2
         write "With the agar no longer in the petri dish, there "
         write "is no point.^" 
         set time = false
         return
      endif
      return false
   endif
   write "Only the petri dishes containing the agar may be put into "
   write "the compartment in the freeze fracture device.^"
   set time = false
   return
endall
return false
}

{+default_throw_at
if noun1(mass) > 4
   if noun2 = mirror
      write "I don't know if that's such a good idea, the mirror might "
      write "break.^"
      set time = false
      return
   endif
endall
return false
}

{+default_give_to
if noun1 = flowers
   write "Never mix business with pleasure.^"
   set time = false
   return
endif
if noun1 = butt
   write  noun2{The} " seems repulsed by your offer.^"
   return
endif
if noun2 = piano_player
   write "The piano player is a bit too busy to accept your offer.^"
   return
endif
return false
}

{+default_ask_for
if noun1 = piano_player
   proxy "talk to piano player"
   return
endif
if noun1 = divers
   proxy "talk to divers"
   return
endif
if noun1 = waitress
   write "The waitress refuses to hand over " noun2{the} .^
   return
endif
return false
}

{+default_ask_about
if noun1 = divers
   proxy "talk to divers"
   return
endif
if noun1 = wise
   if WISE_ASKED = 3
      write "~I've had just about enough of your ridiculous questions, Dr "
      write "Meadows,~ Colonel Wise bellows. ~Either get on with your "
      write "investigation or I'll have you thrown off my island.~^"
      set WISE_ASKED + 1
      return
   endif
   if WISE_ASKED = 4
      execute "+evicted"
      return
   endif
   write "~It's not my job to answer your questions, it's yours to answer "
   write "mine,~ Wise barks at you coldly.^"
   set WISE_ASKED + 1
   return
endall
if noun1 = zola : noun1 = elderly_man
   write "The eldery man seems less than impressed by your badgering.^"
   return
endif
if noun1 = younger_man
   if noun2 hasnt ANIMATE
      return false
   endif
   write "~How much do you ever know about another person?~ the younger man "
   write "says looking to the elderly man.^"
   return
endall
if noun1 = piano_player
   proxy "talk to piano player"
   return
endif
if noun1 = guard
   write "~I'm afraid that's not something I can help you with, Dr Meadows.^"
   return
endall
if noun1 = lisa
   write "~I probably don't know any more than you do,~ Lisa "
   write "replies with a shrug of her shoulders. "
   if noun2 = senescence : noun2 = ames : noun2 = histidine : noun2 = sample : noun2 = carcinogen : noun2 = dish_1 : noun2 = dish_2 : noun2 = agar : noun2 = agar_1 : noun2 = agar_2
      write "~Perhaps there's a reference in your encyclopedia.~^"
      return
   else
      write ^
   endif
   return
endall
return false
}

{+before_give_to
if noun2 = guard
   write "The MP is not in a position to accept gifts.^"
   return
endif
if noun2 = lisa
   if lisa has CUSTOM2
      write "Lisa is a little bit busy right now to pay any attention to "
      write "your offer.^"
      return
   endif
   if lisa has CUSTOM3
      write "Lisa doesn't exactly have a free hand to accept your offer.^"
      return
   endif
   if lisa has ON
      if noun1 != gun
         write "~Not now Alex, just give me the gun and get the hell out of "
         write "here.~^"
         return
   endif
   if lisa has BURNING
      write "~Not now Alex, just get the hell out of here.~^"
      return
endall
if noun2 = stranger
   if lisa has CUSTOM2
      write "The stranger is a little bit busy right now to pay any "
      write "attention to your offer.^"
      return
   endif
   if lisa has ON
      if noun1 = gun
         write "Seeing you go to hand the stranger his pistol back, Lisa "
         write "fires. A burning pain cuts through your chest as you hit the "
         write "ground, your mind spinning from the shock. Eyes closed, you "
         write "hear hurried footsteps, raised voices, then nothing.^" 
         execute "+game_over"
         return
      endif
      write "~Stand away from him, Alex,~ Lisa orders.^"
      return
   endif
   if lisa has BURNING
      write "~Stand away from him, Alex,~ Lisa orders.^"
      return
   endif
endall
return false
}

{+before_show_to
if noun2 = zuckerman
   set REPUTATION_CURRENT = false
   if jacket has CUSTOM5
      if jacket is *present
         write "Concerned about the jacket, Dr Zuckerman refuses to "
         write "comment.^"
      endif
   endif
   if HUGHES_SCRIPT = 0
      set HUGHES_SCRIPT = 1
   endif
   if zuckerman has CUSTOM1
      write "~Just answer the question, Alex: yes or no?~ Dr Zuckerman "
      write "says staring at you keenly.^"
      return
endall
if noun1 = teeth
   write "You smile at " noun2{the} .^
   return
endif
if noun2 = lisa
   if lisa has CUSTOM2
      write "Lisa is a little bit busy right now to pay any attention to "
      write "your offer.^"
      return
   endif
   if lisa has CUSTOM3
      write "Lisa is far from impressed. Very, very far.^"
      return
   endif
   if lisa has ON
      write "~Not now, Alex, just give me the gun and get the hell out of "
      write "here.~^"
      return
   endif
   if lisa has BURNING
      write "~Not now, Alex, just get the hell out of here.~^"
      return
endall
if noun2 = stranger
   if lisa has CUSTOM2
      write "The stranger is a little bit busy right now to pay any "
      write "attention to your offer.^"
      return
   endif
   if lisa has ON
      write "~Stand away from him, Alex,~ Lisa orders.^"
      return
   endif
   if lisa has BURNING
      write "~Stand away from him, Alex,~ Lisa orders.^"
      return
   endif
endall
return false
}

{+before_ask_about
if noun1 = lisa
   if lisa has CUSTOM2
      write "~Not now, Alex, just take his gun.~^" 
      return
   endif
   if lisa has ON
      write "~I'll talk to you later, Alex. Right now, just give me the "
      write "gun and get the hell out of here.~^"
      return
   endif
   if lisa has BURNING
      write "~I'll talk to you later, Alex. Right now, just get the hell "
      write "out of here.~^"
      return
   endif
   if lisa has CUSTOM3
      write "Lisa is not exactly in a good position to respond right now.^"
      return
endall
if noun1 = zuckerman
   set REPUTATION_CURRENT = false
   if jacket has CUSTOM5
      if jacket is *present
         write "Pointing to the jacket, Dr Zuckerman refuses to answer your "
         write "question.^"
      endif
   endif
   if HUGHES_SCRIPT = 0
      set HUGHES_SCRIPT = 1
   endif
   if zuckerman has CUSTOM1
      write "~Just answer the question, Alex: yes or no?~ Dr Zuckerman says "
      write "staring at you keenly.^"
      return
endall
if noun1 = stranger
   if lisa has CUSTOM2
      write "~There'll be time for questions later,~ he replies tensely.^"
      return
   endif
   if lisa has ON
      write "Lisa butts in, ~Don't talk to him, Alex. Just give me the gun "
      write "then get the hell out of here.~ ^
      return
   endif
   if lisa has BURNING
      write "Lisa butts in, ~Don't talk to him, Alex, just get out of "
      write "here.~^"
      return
   endif
endall
return false
}

{+default_show_to
if noun2 = lisa
   write "~Fascinating, Alex,~ Lisa says blandly.^"
   return
endall
if noun2 = guard
   write "The guard continues to stare blankly ahead.^"
   return
endall
if noun2 = wise
   write "Colonel Wise just shakes his head in disbelief, astounded that "
   write "you could think he would be even remotely interested.^"
   return
endif 
if noun2 = stranger
   write "The stranger just shrugs.^"
   return
endall
return false
}

{+default_pour_on
if noun2 = drain
   write  noun1{The} " flows through the drain and into the lagoon.^"
   move noun1 to limbo
   return
endif
return false
}

{+after_take
if noun1 = diary 
   if filing hasnt SCORED
      if diary(parent) = player
         ensure filing has SCORED
         points 5
endall
}

{+after_pour_on
if noun2 = sink
   if noun1 != q_r_water
      if noun1(parent) = sink
         if plug(parent) != hole
            write "You hear a loud gurgling sound as the last of "
            write noun1{the} " drains out of the sink.^"
            move noun1 to limbo
endall
}

{+before_tell_about
if noun1 = zuckerman
   set REPUTATION_CURRENT = false
   if jacket has CUSTOM5
      if jacket is *present
         write "Concerned about the jacket, Dr Zuckerman refuses to "
         write "comment.^"
      endif
   endif
   if HUGHES_SCRIPT = 0
      set HUGHES_SCRIPT = 1
   endif
   if zuckerman has CUSTOM1
      write "~Just answer the question, Alex: yes or no?~ Dr Zuckerman says "
      write "staring at you keenly.^"
      return
endall
if noun1 = lisa
   if lisa has CUSTOM2
      write "~Not now, Alex, just take his gun.~^"
      return
   endif
   if lisa has ON
      write "~I'll talk to you later, Alex, right now just give me the gun "
      write "and get the hell out of here.~^"
      return
   endif
   if lisa has BURNING
      write "~I'll talk to you later, Alex, right now just get the hell "
      write "out of here.~^"
      return
   endif
   if lisa has CUSTOM3
      write "Lisa is not exactly in a good position to respond right now.^"
      return
endall
if noun1 = stranger
   if lisa has CUSTOM2
      write "~There'll be time to talk later,~ the stranger replies "
      write "tensely.^"
      return
   if lisa has ON
      write "Lisa butts in, ~Don't talk to him, Alex, just give me the gun "
      write "then get out of here.~ ^
      return
   endif
   if lisa has BURNING
      write "Lisa butts in, ~Don't talk to him, Alex, just get out of "
      write "here.~^"
      return
   endif
endall
return false
}

{+sink_contents
set INDEX = 0 
loop
  if noun3(parent) = noun1
     if noun3 != r_water
        set INDEX + 1
  endall
endloop
if INDEX = 0 
   write .^
   return
endall
if sink_tap hasnt CLOSED
   if plug(parent) != hole 
      execute "+plug_out"
      return
endall
if r_water(parent) != sink
   write " but contains "
endall
if r_water(parent) = sink
   write " and contains "
endall
loop
  if noun3(parent) = noun1
     if noun3 != r_water
        set INDEX - 1
        write noun3{list}
        execute "+object_info"
        execute "+list_structure"
        if INDEX = 0
           write .^
           return
		endif
     endif
  endif
endloop
}

{+plug_out
write ". The sink contains "
loop
  if noun3(parent) = noun1
     if noun3 != r_water
        set INDEX - 1
        write noun3{list}
        execute "+object_info"
        execute "+list_structure"
        if INDEX = 0
           write .^
           return
  endall
endloop
}

{+default_tell_im
if noun1 = concierge
   if noun2 hasnt ANIMATE
      write "~You are " noun2{the} "?!~^"
      return
   endif
   if noun2 = stranger
      write "~You are " noun2{the} "?...~^"
      return
   endif
   if noun2 = piano_player : noun2 = younger_man : noun2 = elderly_man : noun2 = landlord : noun2 = waitress : noun2 = door_men : noun2 = attendants  
      write "~And do you have a name?~^"
      return
   endif
   if noun2 = guests
      write "~And do you have a name?~^"
      return
   endif
   if WHO_I_AM = false
      set WHO_I_AM = noun2
      if PAGE_REQUESTED != false
         set noun4 = PAGE_REQUESTED
         proxy "tell concierge to page " noun4{names}
         return
      endif
      write "~Pleased to meet you,~ the concierge responds with a "
      write "shallow bow.^"
      return
   endif
   if WHO_I_AM = noun2
      write "~Yes, I know.~^"
      return
   endif
   write "~But a moment ago you were "
   if WHO_I_AM = elderly_man
      write "Zola!~^"
      return
   endif
   if WHO_I_AM  = kryten
      write "Dr Meadows!~^"
      return
   endif
   if WHO_I_AM  = ruud
      write "Mr Gullit!~^"
      return
   endif
   write WHO_I_AM {the} "!~^"
   return
endif
return false
}

{+default_tell_about
if noun1 = piano_player
   proxy "talk to piano player"
   return
endif
if noun1 = divers
   proxy "talk to divers"
   return
endif
if noun1 = guard
   write "The MP stares blankly ahead.^"
   return
endif
if noun1 = lisa
   write "~Great,~ Lisa says with a smirk.^"
   return
endall
if noun1 = stranger
   write "~I'm afraid that doesn't help me, Alex,~ the stranger replies.^"
   return
endall
if noun1 = wise
   if WISE_INFORMED = 3
      write "~I think I've heard enough of your stories for one day, "
      write "Meadows.~^"
      set WISE_INFORMED + 1
      return
   endif
   if WISE_INFORMED = 4
      execute "+evicted"
      return
   endif
   write "~Fascinating story, Meadows,~ Colonel Wise replies with a blank "
   write "expression.^"
   set WISE_INFORMED + 1
   return
endif 
if noun1 = zola : noun1 = elderly_man
   write "The eldery man tries his best to ignore you.^"
   return
endif
if noun1 = younger_man
   write "The younger man is listening to intently to the older man to notice you.^"
   return
endif
return false
}

{+after_insert_in
if noun2 = sink
   if r_water(parent) = sink
      execute "+sink_damage"
endall
}

{+sink_damage
if flask(parent) = sink
   if +liquid?<flask = true
      move CHILD to limbo
endall   
if flask(parent) = sink
   move q_r_water to flask
endall
if sink grandof agar_1 
   if sink grandof agar_2 
      write "The agar begins to dissolve in the rain water, "
      write "disappearing altogether before long.^" 
      move agar_1 limbo 
      move agar_2 limbo
   endif
   if sink !grandof agar_2
      write "The agar begins to dissolve in the rain water, "
      write "disappearing altogether before long.^" 
      move agar_1 limbo 
endall
if sink grandof agar_2
   if sink !grandof agar_1
      write "The agar begins to dissolve in the rain water, "
      write "disappearing altogether before long.^" 
      move agar_2 limbo 
endall
if recorder(parent) = sink
   ensure recorder has DAMAGED
   ensure recorder hasnt ON
endall
if magazine(parent) = sink
   ensure magazine has DAMAGED
endall
if paper(parent) = sink
   ensure paper has DAMAGED
endall
if cassette(parent) = sink
   ensure cassette has DAMAGED
endall
if book(parent) = sink
   ensure book has DAMAGED
endall
if soap(parent) = sink
   ensure soap has DAMAGED
endall
if report(parent) = sink
   ensure report has DAMAGED
endall
if diary(parent) = sink
   ensure diary has DAMAGED
endall
}

{+ocean_damage
ensure hair hasnt CUSTOM4
if flask is *present
   if +liquid?<flask != false
      move CHILD to limbo
   endif
endif
if flask is *present
   move q_s_water to flask
endall
if agar_1 is *present
   if agar_2(parent) = player
      write "Floating in the sea water appears to have caused the agar "
      write "to dissolve.^"
      move agar_1 limbo 
      move agar_2 limbo
endall
if agar_1 is *present
   if agar_2 isnt *present
      write "Floating in the sea water appears to have caused the agar "
      write "to dissolve.^"
      move agar_1 limbo 
endall
if agar_2 is *present
   if agar_1 isnt *present
      write "Floating in the sea water appears to have caused the agar "
      write "to dissolve.^"
      move agar_2 limbo 
endall
if recorder is *present
   ensure recorder has DAMAGED
   ensure recorder hasnt ON
endall
if cassette is *present
   ensure cassette has DAMAGED
endall
if magazine is *present
   ensure magazine has DAMAGED
endall
if book is *present
   ensure book has DAMAGED
endall
if paper is *present
   ensure paper has DAMAGED
endall
if soap is *present
   ensure soap has DAMAGED
endall
if report is *present
   ensure report has DAMAGED
endall
if diary(parent) = sink
   ensure diary has DAMAGED
endall
ensure kryten has DAMAGED
}

{+before_sleep
if AGING_SCRIPT < 20 
   return false
endall
if here has UNDER_WATER
   write "I don't think this is the best place to sleep, no matter how "
   write "tired you feel.^"
   set time = false
   return
endall
if here has MID_WATER
   write "I don't think this is the best place to sleep, no matter how "
   write "tired you feel.^"
   set time = false
   return
endall
if here has ON_WATER
   write "I don't think this is the best place to sleep, no matter how "
   write "tired you feel.^"
   set time = false
   return
endall
execute "+endless_sleep"
}

{+endless_sleep
if here has ON_WATER
   write "Closing your eyes, you fall asleep floating face down in the "
   write "water, never to regain consciousness.^"
   execute "+game_over"
   return
endif
if here has UNDER_WATER
   write "Closing your eyes, you fall asleep and float endlessly in the "
   write "gentle ocean currents.^" 
   execute "+game_over"
   return
endif
write "Slumping to the ground, you barely close your eyes before you fall "
write "asleep, never to regain consciousness.^"
execute "+game_over"
}

{+eachturn
if VAN_ABSENCE != 0
   set VAN_ABSENCE + 1
endall
if here = concierge_desk
   set FRANKS_SCRIPT + 1
   execute "+franks_actions"
endall
if here > van
   execute "+lift_action"
endall
if here = lobby
   move guests to here
endall
if here = concierge_desk
   move guests to here
endall
if here = street
   move hotel_obj to here
   ensure hotel_obj has OUT_OF_REACH
endall
set ENERGY_LEVEL + 1
if HUGHES_SCRIPT != 0
   set HUGHES_SCRIPT + 1
endall
if HUGHES_SCRIPT = 4
   if zuckerman hasnt CUSTOM2
      if ear_piece has WORN
         write "^~Ask him about the project, about the human tests,~ Agent "
         write "Hughes voice says, emanating from the ear piece.^"
endall
if GULLITS_SCRIPT != false
   execute "+gullit_journey"
endall
if STRANGERS_SCRIPT != false
   set STRANGERS_SCRIPT + 1
   if STRANGERS_SCRIPT = 6
      if desk_leif has CUSTOM1
         if here = hangar_north
            if diary hasnt SCORED
               write "^~Have you found anything yet?~ the stranger "
               write "inquires.^"
            endif
         endif
      endif
      if desk_leif hasnt CUSTOM1
         if here = hangar_north
            write "^The stranger runs his fingers along the underside of "
            write "the desk.^"
            ensure desk_leif has CUSTOM1
         endif
      endif
   endif
   if STRANGERS_SCRIPT = 10
      set stranger(status) = 3
      execute "+push_object<stranger<south"
   endif
   if STRANGERS_SCRIPT = 15
      if fish_tank hasnt CUSTOM1
         if here = hangar_south
            write "^The stranger taps the glass wall of the fish tank.^"
            ensure fish_tank has CUSTOM1
         endif
      endif
   endif
   if STRANGERS_SCRIPT = 20
      set stranger(status) = 4
      execute "+push_object<stranger<north"
      set STRANGERS_SCRIPT = 1
endall
if LISAS_SCRIPT != false
   if LISAS_SCRIPT < 25
      set LISAS_SCRIPT + 1
endall
if LISAS_SCRIPT > 24 
   if LISAS_SCRIPT < 38
      if lisa(parent) != hangar_north
         execute "+toilet_break"
endall
if AGING_SCRIPT != false
   set AGING_SCRIPT + 1
endall
if AGING_SCRIPT = 20
   write "^You are beginning to feel oddly tired and run down.^"
endall
if AGING_SCRIPT > 20
   if AGING_SCRIPT < 30
   write "^Minute by minute now you feel yourself growing more tired and "
   write "weary.^"
endall
if AGING_SCRIPT = 30
   write "^The tiredness is now overwhelming. "
   execite "+endless_sleep"
endall
if ENERGY_LEVEL > 5
   set ENERGY_LEVEL = 5
endall
execute "+diving"
move blob to limbo
if SCREEN_FADE != 0
   if blinds has CLOSED
      if switch hasnt ON 
         if WORK_PHASE != 5
            move blob to control_centre
      endif
   endif
   set SCREEN_FADE - 1
   if SCREEN_FADE = 0
      move blob to limbo
endall
if WATER_LEVEL > 0
   if plug(parent) != hole
      set WATER_LEVEL - 1
      if WATER_LEVEL = 0
         move r_water to limbo
         set sink(quantity) - 100 
         if player(parent) = bathroom
            if sink_tap has CLOSED
               write "^You hear a loud gurgling sound as the last of "
               write "the water drains out of the sink.^"
endall 
if sink_tap hasnt CLOSED
   set WATER_LEVEL + 1 
   move r_water to sink
   set sink(quantity) + 100
   if WATER_LEVEL > 5
      set WATER_LEVEL = 5
endall
if sink_tap has CLOSED
   if WATER_LEVEL = 5
      set WATER_LEVEL = 4
endall
if petrescu has CUSTOM4
   if hughes hasnt CUSTOM4
      write "^~Can you hear me, Dr Meadows?~ you hear Agent Hughes's voice "
      write "ask, emanating from the ear piece.^^" 
      write "~Yes. Clearly,~ you reply with a nod.^^" 
      write "~Good,~ Agent Petrescu continues. ~The conference is strictly "
      write "by invitation only, so be sure to make your entrance discreet. "
      write "Remember, the reason you are here is to relate to Dr Zuckerman as "
      write "a fellow scientist. Once you have made contact, try to get him "
      write "talking about his project. When we have enough information, we "
      write "will radio two undercover agents on the inside to make the "
      write "arrest. Oh yeah, and good luck.~^"
      ensure hughes has CUSTOM4
endall
if petrescu hasnt CUSTOM4
   if here = van
      write "^~The jacket you are wearing, Dr Meadows, has a small "
      write "microphone and transmitter sewn into the lining,~ Agent Petrescu "
      write "says as he steps back to admire the fit. ~Agent Hughes will be "
      write "monitoring and recording everything from here in the van and "
      write "will prompt you as necessary through the use of this miniature "
      write "ear piece.~^^" 
      write "Taking the ear piece from Agent Petrescu's hand you place "
      write "it in your ear.^"
      ensure petrescu has CUSTOM4
endall
if wise hasnt CUSTOM4
   if here = office
      write "^~I had been expecting you a lot sooner than this,"
      write "~ Colonel Wise grumbles as you enter. ~There's a "
      write "helicopter leaving for the mainland this evening,~ he "
      write "continues after a moment's pause, strategically weighted to make "
      write "you feel as uneasy as possible. ~Under no circumstances "
      write "do I want to go to sleep tonight without your report on my desk "
      write "and your butt on that helicopter. Understood?"
      ensure wise has CUSTOM4
      execute "+wise_hassle"
endall
if mask hasnt CUSTOM5
   if mask has WORN
      if here = wise(parent)
         execute "+wise_fashion"
         ensure mask has CUSTOM5
endall
if mask hasnt CUSTOM5
   if tank has WORN
      if here = wise(parent)
         execute "+wise_fashion"
         ensure mask has CUSTOM5
endall
if mask hasnt CUSTOM5
   if tank has WORN
      if here = wise(parent)
         ensure mask has CUSTOM5
if mask hasnt CUSTOM4
   if mask has WORN
      if here = lisa(parent)
         write "^Suddenly realising what you are wearing, Lisa covers "
         write "her mouth trying hard not to laugh. ~It suits you,"
         write "~ she chortles pointing at the mask, ~but I "
         write "really think you need a long white scarf to go with it, and "
         write "perhaps some leather driving gloves.~^"
         ensure mask has CUSTOM4
endall  
if here = pool
   move ladder to pool
   move s_water to here
endall
if here = surface
   move ladder to surface
   move s_water to here
endall
if here = beneath_outpost
   move ladder to beneath_outpost
   move s_water to here
endall
if here = backstage
   move south_door to backstage
endall
if here = z_office
   move south_door to z_office
endall
if here = compound
   move hangar_door to compound
   ensure hangar_door has OUT_OF_REACH
   move access_door to compound
   ensure access_door to OUT_OF_REACH
endall
if here = storage
   move steel_door to storage
endall
if here = walkway
   move steel_door to walkway
endall
if here = quarters
   move bathroom_door to quarters
endall
if here = bathroom
   move bathroom_door to bathroom
endall
if here has CUSTOM5
   execute "+ocean"
endall
if recorder has ON
   set COUNTER_POSITION + 1
   if recorder is *present
	  write "^"
      execute "+recorder"
   endif
endif
set NEEDS_LINEFEED = false
}

{+stranger_encounter
ensure stranger has ENCOUNTERED
ensure lisa has CUSTOM2
ensure lisa hasnt POSSESSIVE
move lisa to here
set LISAS_SCRIPT = 42
move stranger to here
set lisa(status) = 4
write "^^The moment your feet hit the ground, the sound of a gun "
write "cocking from behind makes you freeze. ~Place your hands behind "
write "your head and stay facing forward,~ a calm male voice instructs.^"
write "^You obey.^"
write "^Footsteps echoing on the hard concrete floor "
write "approach slowly. A set of rough hands frisk you briefly"
if c_pass(parent) = player
   if c_pass has WORN
      write ", ripping your identification pass from your shirt.^"
      write "^~Dr Alex Meadows,~ the tall middle aged man reads out loud "
      write "as he turns you around to face him for the first time. ~So what "
      write "brings you here?~^"
      ensure c_pass hasnt WORN
      move c_pass to stranger
      return
endall
write " then spin you around to face their owner, a tall middle aged man "
write "that you don't recognise. ~So what you brings you here, Dr Meadows?~"
write " he inquires, staring at you intently.^" 
}

{+stranger_standoff
write "^Nervously you shift your weight from one foot to the other, ~I'm a "
write "scientist, working here on the island, a civilian. I just... I...~^" 
write "^~I know who you are. I presume you...~^" 
write "^The access door opening stops your assailant in mid-sentence as "
write "he spins around, leveling his pistol at the newcomer. "
write "Straining to see in the glare of the open doorway you are "
write "surprised, not to mention relieved, to see Lisa. Gun drawn, she "
write "back-heels the door closed again, never taking her eyes or aim off "
write "the stranger.^" 
write "^~Drop your weapon,~ they both yell simultaneously, now standing "
write "face to face merely metres away from each other.^"
write "^~Take his gun, Alex,~ Lisa says to you, not breaking her gaze.^"
write "^~Don't do it, Dr Meadows,~ the stranger protests, ~you don't know "
write "what's going on. I've been investigating Dr Zuckerman and his work "
write "for over a year. If I get turned in now, chances are it will "
write "have all been for nothing. He's an evil man, Alex. Don't help the "
write "military protect him any longer.~^"
}

{+stranger_offer
write "^After a lengthy pause, the stranger turns and looks you directly in "
write "in the eye. ~How would you feel about going to this conference? I "
write "mean, it makes perfect sense. If there is anyone who can make contact "
write "with Zuckerman and extract the necessary information from him, it's "
write "you. We can put a couple of agents on the inside to support you, but "
write "he would never confide in them. He is highly contemptuous of anyone "
write "outside the scientific community.~^"
write "^~I don't know,~ you reply warily. As appealing as the idea of an "
write "undercover assignment at a conference in Monte Carlo is, you are, "
write "after all, just a scientist and it might be dangerous.^" 
write "^~The fact that you are a scientist is exactly why we need you,~ the "
write "stranger interjects, making you aware of the fact that you had been "
write "thinking out loud. ~Go and submit your final report as normal. Wise "
write "will then have you flown out to the mainland where one of our "
write "operatives will rendezvous with you. He will then escort you to "
write "Monte Carlo, where you will be briefed as to what we will require. "
write "We need you, Alex. The truth needs you.~^"
}

{+toilet_break
if LISAS_SCRIPT = 25
   if lisa(parent) = player(parent)
      if lisa has DAMAGED
         write "~Excuse me, Alex, I'll be back in a moment,~"
         write " Lisa says touching you on the elbow.^"
      endif
   endif
   execute "+push_object<lisa<south"
   set LISAS_SCRIPT + 1
   if screen has ON
      ensure screen hasnt ON
      set SCREEN_FADE = 4
   return
endall
if LISAS_SCRIPT = 26
   execute "+push_object<lisa<east"
   set LISAS_SCRIPT + 1
   return
endall
if LISAS_SCRIPT = 27
   if bathroom_door has LOCKED
      if bathroom_door has CUSTOM4
         return
      endif
   endif
   if bathroom_door has LOCKED
      write "A sharp rap on the bathroom door startles you. ~" 
      write "Hey! Hurry up in there will you,~ Lisa calls from the 
      write "other side.^"
      ensure bathroom_door has CUSTOM4
      return
   endif
   if bathroom_door has CLOSED
      if player(parent) = bathroom
         if bathroom_door has CUSTOM2
            write "~Sorry,~ chirps Lisa, ~I'll come back later.~^"
	    set lisa(parent) = control_centre
            set LISAS_SCRIPT = 1
         endif
      endif
      if bathroom_door has CUSTOM3
         write "~I take it you don't want me to go in there,~"
         write " Lisa says shrugging her shoulders.^"
         set LISAS_SCRIPT = 36
         return
      endif
      if player(parent) = quarters 
         if bathroom_door has CUSTOM2
            write "~Knock it off will you,~ Lisa barks "
            write "as she re-opens the bathroom door.^"
            ensure bathroom_door hasnt CLOSED
            ensure bathroom_door has CUSTOM3
            set quarters(north) = bathroom 
            set bathroom(south) = quarters
            return
         endif
      endif
      if player(parent) = bathroom
         write "Lisa opens the bathroom door.^"
      endif
      if player(parent) = quarters
         write "Lisa opens the door to the bathroom.^"
      endif
      ensure bathroom_door hasnt CLOSED
      ensure bathroom_door has CUSTOM2
      set quarters(north) = bathroom 
      set bathroom(south) = quarters
      return
   endif
   if bathroom_door hasnt CLOSED
      ensure bathroom_door hasnt CUSTOM2
      ensure bathroom_door hasnt CUSTOM3
      execute "+push_object<lisa<north"
      set LISAS_SCRIPT + 1
      return
endall 
if LISAS_SCRIPT = 28
   if player(parent) = quarters
      write "Lisa closes the door to the bathroom.^"
      ensure bathroom_door has CLOSED
      ensure bathroom_door has LOCKED
      set quarters(north) = nowhere
      set bathroom(south) = nowhere
      set LISAS_SCRIPT + 1
      return
   endif
   if player(parent) = bathroom
      if bathroom_door hasnt CUSTOM5
         write "~Would you mind leaving,~ Lisa asks, "
         write "~I'm really not in the mood for an audience.~^"
         ensure bathroom_door has CUSTOM5
         return
      endif
      if bathroom_door has CUSTOM5
         return
      endif
   endif
   ensure bathroom_door has CLOSED
   ensure bathroom_door has LOCKED
   set quarters(north) = nowhere
   set bathroom(south) = nowhere
   set LISAS_SCRIPT + 1
   return
endall
if LISAS_SCRIPT > 28 
   if LISAS_SCRIPT < 34
      set LISAS_SCRIPT + 1
      return
endall
if LISAS_SCRIPT = 34
   set LISAS_SCRIPT + 1
   if player(parent) = quarters
      write "You hear the toilet flush from behind the closed bathroom "
      write "door.^"
   return
endall
if LISAS_SCRIPT = 35 
   if bathroom_door has CLOSED
      if player(parent) = quarters 
         if bathroom_door has CUSTOM2
            write "~Knock it off will you,~ Lisa barks as she re-opens the "
            write "bathroom door.^"
            ensure bathroom_door hasnt CLOSED
            set quarters(north) = bathroom 
            set bathroom(south) = quarters
            return
         endif
         write "Lisa opens the door to the bathroom.^"
         ensure bathroom_door has CUSTOM2
      endif
      ensure bathroom_door hasnt CLOSED
      ensure bathroom_door hasnt LOCKED
      set quarters(north) = bathroom 
      set bathroom(south) = quarters
      return
   endif
   if bathroom_door hasnt CLOSED
      execute "+push_object<lisa<south"
      set LISAS_SCRIPT + 1
      return
endall
if LISAS_SCRIPT = 36
   execute "+push_object<lisa<west"
   set LISAS_SCRIPT + 1
   return
endall
if LISAS_SCRIPT = 37
   execute "+push_object<lisa<north"
   set LISAS_SCRIPT + 1
}

{+recorder
if cassette has DAMAGED
   write "A dull, unintelligible, warble emits from the recorder. "
   write "Apparently the cassette didn't like getting wet.^"
   return
endall
if COUNTER_POSITION = 1
   write "After a brief pause you hear your own voice emanating from the "
   write "recorder. ~Initial examination of the supplied sample "
   write "of affected marine life reveals a high number of cancer related "
   write "deaths. All specimens are fully mature, suggesting a natural "
   write "immunity or resilience amongst younger fish to the as yet "
   write "unidentified toxin.~^"
endall
if COUNTER_POSITION = 2
   write "You hear a brief click from the recorder followed by your own "
   write "voice. ~Results from the toxicological analysis show extremely high "
   write "doses of Rotenone, more than sufficient to cause the various forms "
   write "of cancer found. There is not, however, any reason for the younger "
   write "fish to remain practically one hundred percent unaffected. Time "
   write "permitting, I will investigate this phenomenon further.~^"
endall
if COUNTER_POSITION = 3
   write "A short pause is followed by your voice again. ~Use of "
   write "Rotenone on the island has been confirmed. An internal "
   write "investigation by the military into the exact nature of the "
   write "contamination has been initiated, the results of which should be "
   write "available to me before the end of the week.~^"
endall
if COUNTER_POSITION = 4
   write "The recorder continues to play. ~With the source of "
   write "contamination identified and rectified, my work here is all but "
   write "done. I am still perplexed, however, by the absence of "
   write "younger specimens amongst those affected. Following several "
   write "informal discussions with local fishermen, anecdotal evidence "
   write "appears to indicate that almost all recent catches of living fish "
   write "are also devoid of younger fish. Given the deaths in adult fish, I "
   write "would have anticipated the opposite to have been so, with catches "
   write "having a relatively high percentage of young. Despite mounting "
   write "pressure from the military to have the case closed, I am going to "
   write "stall the submission of my final report in order to investigate "
   write "for another few days.~^" 
endall
if COUNTER_POSITION = 5
   write "A gentle hissing from the recorder gives way to the sound "
   write "of your voice. ~After much consideration, I have concluded that "
   write "the only possible cause of the heavily skewed age demographic must "
   write "be that the contamination has interrupted the breeding cycle. "
   write "This interruption must have occurred long enough ago to explain "
   write "the almost completely mature population. It is this theory that I "
   write "will pursue for my remaining days on the island.~^"
endall
if COUNTER_POSITION = 6
   write "The recorder's motor hums indicating the end of the cassette has "
   write "been reached. Seconds later a loud click announces that the "
   write "cassette has stopped playing.^"
   ensure recorder hasnt ON
endall
}

{+ocean
set ocean_bottom(north) = ocean_bottom
set ocean_bottom(northeast) = ocean_bottom
set ocean_bottom(east) = ocean_bottom
set ocean_bottom(southeast) = ocean_bottom
set ocean_bottom(south) = ocean_bottom
set ocean_bottom(southwest) = ocean_bottom
set ocean_bottom(west) = ocean_bottom
set ocean_bottom(northwest) = ocean_bottom
set ocean_surface(north) = ocean_surface
set ocean_surface(northeast) = ocean_surface
set ocean_surface(east) = ocean_surface
set ocean_surface(southeast) = ocean_surface
set ocean_surface(south) = ocean_surface
set ocean_surface(southwest) = ocean_surface
set ocean_surface(west) = ocean_surface
set ocean_surface(northwest) = ocean_surface
set mid_water(north) = mid_water
set mid_water(northeast) = mid_water
set mid_water(east) = mid_water
set mid_water(southeast) = mid_water
set mid_water(south) = mid_water
set mid_water(southwest) = mid_water
set mid_water(west) = mid_water
set mid_water(northwest) = mid_water
if CURRENT_DEPTH = 20
   set mid_water(down) = ocean_bottom
   if LONGITUDE = 30
      if LATITUDE = 34
         set mid_water(down) = site
endall
if CURRENT_DEPTH = 15
   set mid_water(down) = mid_water
endall
if CURRENT_DEPTH = 5
   set mid_water(up) = ocean_surface
endall
if CURRENT_DEPTH = 10
   set mid_water(up) = mid_water
endall
if LONGITUDE = 29 
   if LATITUDE = 35
       set ocean_bottom(northeast) = site
endall
if LONGITUDE = 30
   if LATITUDE = 35
      set ocean_bottom(north) = site
endall
if LONGITUDE = 31
   if LATITUDE = 35
      set ocean_bottom(northwest) = site
endall
if LONGITUDE = 29
   if LATITUDE = 34
      set ocean_bottom(east) = site
endall
if LONGITUDE = 31
   if LATITUDE = 34
      set ocean_bottom(west) = site
endall
if LONGITUDE = 29
   if LATITUDE = 33
       set ocean_bottom(southeast) = site
endall
if LONGITUDE = 30
   if LATITUDE = 33
      set ocean_bottom(south) = site
endall
if LONGITUDE = 31
   if LATITUDE = 33
      set ocean_bottom(southwest) = site
endall
if LONGITUDE = 10
   set ocean_bottom(west) = nowhere
   set ocean_bottom(southwest) = nowhere
   set ocean_bottom(northwest) = nowhere
   set ocean_surface(west) = nowhere
   set ocean_surface(southwest) = nowhere
   set ocean_surface(northwest) = nowhere
   set mid_water(west) = nowhere
   set mid_water(southwest) = nowhere
   set mid_water(northwest) = nowhere
endall
if LONGITUDE = 73 
   set ocean_bottom(east) = nowhere
   set ocean_bottom(southeast) = nowhere
   set ocean_bottom(northeast) = nowhere
   set ocean_surface(east) = nowhere
   set ocean_surface(southeast) = nowhere
   set ocean_surface(northeast) = nowhere
   set mid_water(east) = nowhere
   set mid_water(southeast) = nowhere
   set mid_water(northeast) = nowhere
endall
if LATITUDE = 14 
   set ocean_bottom(north) = nowhere
   set ocean_bottom(northwest) = nowhere
   set ocean_bottom(northeast) = nowhere
   set ocean_surface(north) = nowhere
   set ocean_surface(northwest) = nowhere
   set ocean_surface(northeast) = nowhere
   set mid_water(north) = nowhere
   set mid_water(northwest) = nowhere
   set mid_water(northeast) = nowhere
endall
if LATITUDE = 39
   move wall to limbo
endall
if LATITUDE = 40
   move wall to here 
   set ocean_bottom(south) = nowhere
   set ocean_bottom(southwest) = nowhere
   set ocean_bottom(southeast) = nowhere
   set ocean_surface(south) = nowhere
   set ocean_surface(southwest) = nowhere
   set ocean_surface(southeast) = nowhere
   set mid_water(south) = nowhere
   set mid_water(southwest) = nowhere
   set mid_water(southeast) = nowhere
   if LONGITUDE = 36 
      set ocean_surface(south) = lagoon_surface
      if CURRENT_DEPTH <= 5 
         set mid_water(south) = lagoon_bottom
         move wall to limbo
endall
ensure mid_water hasnt VISITED
ensure ocean_surface hasnt VISITED
ensure ocean_bottom hasnt VISITED
move s_water to here
}

grammar about	>about

{+about
style bold
write "THE UNHOLY GRAIL"
style plain
write " by Stuart Allen^"
write "release " GAME_VERSION ", copyright (C) 1996 - 2008^" 
write "^Special thanks to:^" 
write "* Bob Bruner, "
write "for his generous biology tuition, without which, "
write "many parts of this game would not have been possible.^" 
write "* Geoff Mutton, "
write "for his assistance with both biology and chemistry "
write "technicalities.^"
write "* Terry Dawson, "
write "for his patience and tuition with all things C-like.^"
write "* Vicki Worthington, "
write "for listening patiently and nodding politely while I talked "
write "endlessly about this game.^"
write "* Rupert Lane, for his alpha testing, beta testing and moral "
write "support.^"
write "* Mary Kuhner,^"
write "* Stephen Granade,^"
write "* Jane Kerr, ^"
write "* Paul Janzen and^"
write "* Michael Kinyon, for their invaluable beta testing.^"
write "* Paul O'Brian and^"
write "* Brent VanFossen, for their post-release bug reports.^"
write "* Eric Forgeot, for taking the time to test this game for its second "
write "release while suffering a buggy pre-release version of JACL 2 at the "
write "same time.^"
set time = false
}

{+intro
clear
image image_unholygrail
if graphics_supported = false
   style bold
   write ^ game_title
   style normal
endif
write "^Copyright (c) 2008 " game_author ".^"
write "Release " game_release " / build " game_build
write " / JACL verb.library version " library_version ".^^"

print:

   For over three months now you have been stationed at this drab
   research outpost, situated on a remote island somewhere in the
   Pacific Ocean. You have been contracted by the military as a genetics
   specialist to study recent deaths occurring in the local marine life,
   determine the cause and assess any danger to human personnel.^^
   Due to the classified nature of the majority of other projects being
   carried out on the island, being one of the few civilians involved
   hasn't made life easy. Little respect and even less information has
   led you to find solace in the tranquillity of your tropical home,
   indulging in as little contact with the main core of workers as
   possible. Lisa, however, a Naval Officer and marine biologist based
   with you, has fortunately been compassionate to your situation, acting
   more as a scientific colleague than a military chaperone.^^
.

set north_wall(parent) = here
set south_wall(parent) = here
set east_wall(parent) = here
set west_wall(parent) = here
set ground(parent) = here

style bold
write "REMOTE MILITARY BASE, SOMEWHERE IN THE PACIFIC OCEAN^"
write "MONDAY 3:42 PM^^"
style plain
look
}

object plunger: plunger
 short		a "plunger"
 parent syringe

{press : move
if +liquid?<syringe = false
   write "There is nothing in the syringe, so the plunger is already fully "
   write "depressed.^"
   return
endall
if syringe has CUSTOM5
   write "A small portion of " noun3 " squirts out of the syringe and on to "
   write "the ground.^"
   return
endall
if syringe has CUSTOM4
   write "You depress the plunger until all the air is expelled and a small "
   write "amount of " noun3 " squirts out of the syringe.^"
   ensure syringe hasnt CUSTOM4
   return
endall
write "A small portion of " noun3 " squirts out of the syringe and on to "
write "the ground.^"
}

{pull
write "Filling the syringe with air is of no use.^"
}

object kryten: myself self me alex meadows
 has		ANIMATE
 short		name "yourself"
 capacity	42
 parent		quarters
 player

{rub_with_soap : clean_with_soap : clean
write "Getting a little self conscious?^"
}

{attack
write "With government rebates, therapy isn't as expensive as it seems.^"
}

{shoot_override : shoot_with_gun : attack_with_gun
write "Realising that you have got the game into an unsolveable state, you "
write "put the gun up against your head and pull the trigger.^"
execute "+game_over"
}

{examine
write "As beautiful as ever.^" 
execute "+inventory"
}

{take
write "...seriously?^"
set time = false
}

object hair: my hair
 short		name "your hair"
 parent 	kryten

{examine
write "Your hair is dark brown"
if hair hasnt CUSTOM4
   write " and a bit on the messy side"
endif
write .^
}

object teeth: my teeth
 has		PLURAL
 short		name "your teeth"
 parent 	kryten

{clean
execute "clean_with_toothbrush_teeth"
}

{clean_with_toothbrush
write "You did that when you got up this morning.^"
set time = false
}

{examine
if kryten(parent) != bathroom
   write "You can't actually see them, but they feel okay.^"
   return
endif
if cabinet hasnt CLOSED
   write "You angle the door of the cabinet so as to see your teeth. They "
   write "seem fine.^"
   return
endif
write "Smiling into the mirror, your teeth seem fine.^"
}

{+game_over
endgame 
}   

{+title
style subheader
write here{The} ^
style normal
if here has WITHOUT_AIR
   if tank hasnt WORN
      write "(holding your breath)^"
endall
if player has SITTING
      write "(sitting)^"
endif
}

object north_wall: north north wall
 has			NO_TAB
 short          the "north wall"

object south_wall: south southern wall
 has			NO_TAB
 short          the "south wall"

object east_wall: east eastern wall
 has			NO_TAB
 short          the "east wall"

object west_wall: west western wall
 has			NO_TAB
 short          the "west wall"

object ground: ground floor
 has            SURFACE NO_TAB
 short          the "ground"

#debug "debug.library"
#include "npc.library"
#include "utils.library"
#include "verbs.library"
