! Brian Munzenberger ! CIS 487, Fall 2002 ! Dr. B. Maxim ! Inform Adventure Game (Programming Assignment 1) Constant Story "Escape From Uberstein"; Serial "021016"; Release 1; Constant Headline "^Copyright (c) 2002 by Brian Munzenberger^"; Replace ScoreSub; Include "Parser"; Include "VerbLib"; Include "Grammar"; ! ** This game does not have a score [ ScoreSub; if (deadflag == 0) "There is no score in this game."; ]; ! ** These attributes are to keep track of certain objects that can change states ! ** in the game. Attribute fuel; Attribute dead; Attribute chipped; Attribute combination; ! ** Number of bullets in the Luger Global bullets; ! ** Game initialization [ Initialise; location = PrisonCell; bullets = 10; StartDaemon(PrisonGuard); StartDaemon(PrisonSecurityGuard); StartDaemon(GuardTowerSniper); StartDaemon(RadarSecurityGuard); print "^A throbbing pain in your head brings you back to consciousness. The last thing you remember is having trouble getting the parachute to open as you bailed out of your plane as it plunged to the ground in a ball of flames.^^ The cold, hard cement against your face prompts you to sit up. Your eyes slowly begin to focus...^^"; ]; ! -- The prison cell. This is where the game starts -- Object PrisonCell "Prison Cell" with description "You are in a concrete prison cell, dimly lit by a single light bulb hanging from the ceiling. There is a cot hanging from the west wall and a toilet stands against the south wall. Cracks run up and down the east wall. The cell bars are to the north.", n_to PrisonCellDoor, has light; ! -- These are the objects in the prison cell -- Object -> PrisonCellLightBulb "light bulb" with name "light" "bulb", description "It is dimly lit, and hanging by a single wire from the high ceiling.", before [; Take: print "The light bulb is too high for you to reach.^"; rtrue; Shoot: if (LugerGun in player && bullets > 0) { print "The bulb explodes, extinguishing the light.^"; give PrisonCell ~light; bullets = bullets - 1; rtrue; } ], has scenery; Object -> PrisonCellCot "cot" with name "cot", description "It is old and worn out. It certainly would not be comfortable to sleep on.", has scenery supporter; Object -> PrisonCellToilet "toilet" with name "toilet", description "It is covered with grime and filth, very unsanitary.", has scenery container open; Object -> PrisonCellEastWall "east prison cell wall" with name "east" "prison" "cell" "wall", before [; Examine: if (PrisonCellEastWall hasnt chipped) { print "There appears to be deep running cracks through the concrete of the wall, making sections of it loose.^"; rtrue; } else { print "There is a small portion of the wall that has been chipped away.^"; rtrue; } Attack: if (PrisonCellEastWall hasnt chipped) { print "Your blow loosens a section of the wall that falls to the ground.^"; move ConcreteRock to PrisonCell; give PrisonCellEastWall chipped; rtrue; } ], has scenery; Object -> PrisonCellDoor "cell door" with name "bars" "cell" "door", description "The cell door bars are made of iron with 2 inches between them. The lock looks impossible to pick.", when_open "The cell door is open.", when_closed "The cell door is closed.", door_to [; if (location==PrisonCell) return PrisonBasementCellBlock; return PrisonCell; ], door_dir [; if (location==PrisonCell) return n_to; return s_to; ], with_key PrisonCellDoorKey, found_in PrisonCell PrisonBasementCellBlock, has static door openable lockable ~open locked; Object -> PrisonGuard "prison guard" with name "prison" "guard", before [; Examine: if (PrisonGuard hasnt dead) { print "The guard is standing at attention outside your cell, just beyond your reach. His back is turned.^"; rtrue; } else { print "He is lying unconscious on the floor. There is a large bump on the back of his head.^"; rtrue; } Attack: if (PrisonGuard hasnt dead) { print "The guard is standing too far away. You'll have to think of something else.^"; rtrue; } ], life [; Tell,Answer,Ask,AskFor: if (PrisonGuard hasnt dead) { print "The guard turns around and shouts, ~Machen Sie deine Mund zu!~ Trying hard to remember your German lessons, you think the guard just insulted you.^"; rtrue; } ], daemon [; switch (random(10)) { 1: "^The prison guard stretches his arms."; 2: "^The prison guard glances back at you, smirks, then turns away."; 3: "^The prison guard paces back and forth for a moment."; } ], has animate supporter; Object -> -> PrisonCellDoorKey "cell door key" with name "cell" "door" "key" "brass" "iron" "ring", description "It is a dull brass key on an iron key ring.", before [; Take: if (PrisonGuard hasnt dead) { print "The guard is standing too far away, you can't reach it.^"; rtrue; } ]; Object -> -> NaziUniform "Nazi uniform" with name "nazi" "uniform" "shirt" "pants" "boots" "belt" "hat" "standard" "issue", description "It is a standard issue Nazi uniform: shirt, pants, boots, belt and a hat. It looks to be just your size.", before [; Take: if (PrisonGuard hasnt dead) { print "The guard is standing too far away, you can't reach it.^"; rtrue; } ], has clothing; ! ** Player must be holding the gun to shoot. Object -> -> LugerGun "Luger handgun" with name "luger" "gun" "handgun" "Krieghoff", before [; Take: if (PrisonGuard hasnt dead) { print "The guard is standing too far away, you can't reach it.^"; rtrue; } Examine: print "It is a Krieghoff Luger handgun.^"; if (LugerGun in player) { if (bullets > 1) { print "There are ", bullets, " bullets in the clip.^"; } switch (bullets) { 0: print "There are no bullets in the clip.^"; 1: print "There is 1 bullet in the clip.^"; } } rtrue; ]; ! -- Outside the prison cell Object PrisonBasementCellBlock "Prison Basement Cell Block" with description "You are standing in the cell block hallway in the basement of the prison. There are six cells cut into the cement walls, 3 on each side. You can see power lines running along the hallway ceiling to each of the prison cells. To the south is a prison cell, and the hallway continues to the east.", s_to PrisonCellDoor, e_to PrisonBasementHallway, has light; Object PrisonBasementHallway "Prison Basement Hallway" with description "You are at the end of the prison basement hallway. There is a power box on the wall. To the north is a security checkpoint station, to the west is the prison cell block.", n_to PrisonSecurityStation, w_to PrisonBasementCellBlock, has light; Object -> PowerBox "power box" with name "power" "box", description "It is made of metal. Wires from the box run up the wall to the ceiling.", found_in PrisonBasementHallway PrisonLobby, has scenery container openable ~open; ! ** Turns on and off the basement lights in the prison Object -> -> PowerSwitch "power switch" with name "power" "switch", description "It is a large red pushbutton labeled ~KELLERLICHTER~", before [; Push: if (PrisonBasementHallway has light) { print "With a loud click, all of the basement lights turn off!^"; give PrisonBasementHallway ~light; give PrisonBasementCellBlock ~light; give PrisonSecurityStation ~light; rtrue; } else { print "The basement lights begin to flicker, then come on.^"; give PrisonBasementHallway light; give PrisonBasementCellBlock light; give PrisonSecurityStation light; rtrue; } ], has static; Object PrisonSecurityStation "Prison Security Station" with description "You are at the prison basement security station. Lockers line the west wall and a table is pushed against the east wall. To the south is the hallway leading to the cell block. There is an ascending stairway to the north.", s_to PrisonBasementHallway, n_to PrisonLobby, u_to PrisonLobby, has light; Object -> Table "table" with name "table", description "It is a small, simply designed wooden table.", found_in PrisonHallway PrisonSecurityStation RadarTowerSecondFloor, has scenery static supporter; Object -> PrisonSecurityGuard "prison security guard" with name "prison" "security" "guard", before [; Examine: if (PrisonSecurityGuard hasnt dead) { print "He is a large, mean looking man, very intimidating.^"; rtrue; } else { print "He is lying dead on the ground from a bullet wound to the chest.^"; rtrue; } Shoot: if (PrisonSecurityGuard hasnt dead && LugerGun in player && bullets > 0) { print "You draw your weapon, aim it at the security guard, and pull the trigger. BLAM! The shot strikes the security guard in the chest and he falls to the floor.^"; give PrisonSecurityGuard dead; bullets = bullets - 1; StopDaemon(PrisonSecurityGuard); rtrue; } Attack: if (PrisonSecurityGuard hasnt dead) { print "You charge at the security guard, ready to take him down. The security guard quickly draws his weapon, and before you can react, he shoots you dead.^"; deadflag=1; rtrue; } ], life [; Tell,Answer,Ask,AskFor: if (PrisonSecurityGuard hasnt dead) { print "The security guard says, ~Ich interessiere mich nicht!~^"; rtrue; } ], daemon [; if (PrisonSecurityGuard hasnt dead && location==PrisonSecurityStation) { if (NaziUniform hasnt worn) { print "The security guard discovers you and shouts, ~Achtung! The prisoner has escaped!~ He draws his weapon, and before you can react, he fires a shot. The bullet hits you in the head -- you're dead before you hit the ground.^"; deadflag=1; } else { switch (random(4)) { 1: "^The security guard looks at you and says, ~What are you doing here? Go guard the prisoner!~"; 2: "^The security guard looks perturbed. ~You better get back to your post,~ he says."; } } } ], has animate supporter; Object -> -> PrisonDoorKey "prison door key" with name "prison" "door" "key", description "It is a shiny metal key with the number 13 etched into it.", before [; Take: if (PrisonSecurityGuard hasnt dead) { print "The security guard pushes you away saying, ~Hey, you know I'm the only one allowed to have this key!~^"; rtrue; } ]; Object -> Lockers "lockers" with name "locker" "lockers", description "They are old, rusty, metal combination lockers.", before [; Unlock,Open: if (player hasnt combination) { print "You fiddle with the lock, but can't get it to open. You'll need to find the combination somewhere.^"; rtrue; } else { print "You carefully enter the combination into the lock. CLICK!^"; rfalse; } ], has scenery openable ~open container; Object -> -> Gasmask "gasmask" with name "gasmask" "mask", description "It is a model M30 gasmask with holding straps.", has clothing; Object -> -> HangarSecurityPass "hangar security pass" with name "hangar" "security" "authorization" "pass", description "It is a hangar security pass in a small leather wallet.", before [; Show,Give: if (second==HangarSecurityGuard) { print "You show the guard your hangar security pass. ~Go ahead,~ he says, and opens the door for you.^"; give HangarDoor open; rtrue; } ]; ! -- Prison Ground Floor Object PrisonLobby "Prison Ground Floor" with description "You are on the ground floor inside the prison. There is a power box on the wall. To the south is a descending stairway, to the east is the prison door, and there is a hallway to the west.", d_to PrisonSecurityStation, s_to PrisonSecurityStation, e_to PrisonDoor, w_to PrisonHallway, has light; Object -> PrisonDoor "prison door" with name "prison" "door", description "It is a large, locking metal door with a small peephole. There is a sign hanging from it saying, ~Keep door locked at all times!~ The number 13 is carved above it.", when_open "The prison door is open.", when_closed "The prison door is closed.", door_to [; if (location==PrisonLobby) return OutsidePrison; return PrisonLobby; ], door_dir [; if (location==PrisonLobby) return e_to; return w_to; ], with_key PrisonDoorKey, found_in PrisonLobby OutsidePrison, has static door openable lockable ~open locked; Object PrisonHallway "Prison Hallway" with description "You are standing in the hallway on the ground floor of the prison. A table stands against the north wall. There is a door to the south and the hallway continues to the east.", e_to PrisonLobby, s_to PrisonHallwayDoor, has light; ! ** If the player opens the gas canister without wearing the gasmask, the player dies Object -> GasCanister "gas canister" with name "gas" "can" "canister", description "A metal canister of lethal Zyclon B gas. At the top is a valve which can be opened to let the gas out.", before [; Open: print "You open the valve and hear hissing as the gas escapes. "; if (Gasmask hasnt worn) { print "A few seconds later your vision becomes blurry and you feel weak. You pass out, never to wake again...^"; deadflag=1; rtrue; } else { if (location==InsideHangar && Mechanics hasnt dead) { print "One by one, the mechanics are affected by the gas. They grab their throats, gasping for air. As their faces turn blue, they fall to the ground. After a few moments, they are are all dead. You close the canister and wait for the air to clear before continuing.^"; give Mechanics dead; rtrue; } else { print "Your gasmask protects you from the lethal fumes. Fearing that the gas will be depleted, you close the canister.^"; rtrue; } } Shoot: if (LugerGun in player && bullets > 0) { print "The shot punctures the canister, causing it to explode in front of you from the compressed gas inside. Shards of metal rip through your body.^"; bullets = bullets - 1; deadflag=1; rtrue; } ], has openable ~open; Object -> PrisonHallwayDoor "hallway door" with name "hallway" "door", description "Is is a simple wooden door with a brass doorknob.", when_open "The hallway door is open.", when_closed "The hallway door is closed.", door_to [; if (location==PrisonHallway) return PrisonBarracks; return PrisonHallway; ], door_dir [; if (location==PrisonHallway) return s_to; return n_to; ], found_in PrisonHallway PrisonBarracks, has static door openable ~open; Object PrisonBarracks "Prison Barracks" with description "You are in the prison barracks. You can see rows of bunk beds and foot lockers. There is a table and a few chairs in the center of the room. The only exit is to the north.", n_to PrisonHallwayDoor, has light; Object -> BunkBeds "bunk beds" with name "bunk" "bunks" "bed" "beds", description "They are triple stacked beds in a wooden frame. The sheets are neatly folded.", has scenery supporter; Object -> Chairs "chairs" with name "chair" "chairs", description "They are hard, wooden chairs with armrests.", found_in PrisonBarracks RadarOperationsRoom, has scenery supporter; Object -> BarracksTable "table" with name "table", description "It is a large wooden table. There are illegible markings scratched into its surface.", has scenery supporter; Object -> -> Food "plate of food" with name "plate" "of" "food" "chicken" "rice", description "It is a plate of half-eaten chicken and rice, still warm.", has edible; Object -> FootLockers "foot lockers" with name "foot" "lockers" "locker", description "They are small metal foot lockers. To your surprise, the locks are missing.", has scenery container openable ~open; Object -> -> RadarTowerPass "radar tower security pass" with name "radar" "tower" "security" "pass", description "It is a laminated security pass with leather strap.", before [; Show,Give: if (second==RadarSecurityGuard) { print "You show the guard your radar tower pass. ~Go on in,~ he says, and opens the door for you.^"; give RadarOperationsDoor open; rtrue; } ]; Object -> -> Toothbrush "toothbrush" with name "toothbrush" "tooth" "brush", description "The bristles look very used."; ! -- Outside Object OutsidePrison "Outside Prison" with description "You are standing on a concrete platform outside the prison. To the west is the prison door and to the east is the courtyard.", w_to PrisonDoor, e_to Courtyard, has light; Object Courtyard "Courtyard" with description "You are standing in the courtyard of the German base. You can feel a light breeze through your hair. In the distance, you can see a guard tower. To the south is a radar tower, to the north is an aircraft hangar, and to the west is the prison. The path to the east is blocked with barbed wire.", w_to OutsidePrison, s_to OutsideRadarTower, n_to OutsideHangar, has light; ! ** Just so the player can look at the barbed wire Object -> BarbedWire "barbed wire" with name "barbed" "wire", description "It stretches the whole length of the east perimeter of the base.", has scenery; Object -> GuardTower "guard tower" with name "guard" "tower", description "There is a german soldier at the top of the tower looking down at the courtyard. He appears to have a sniper rifle.", before [; Shoot: if (LugerGun in player && bullets > 0) { print "You fire a round at the guard tower. A moment later a shot from the sniper at the top of the guard tower rips through your neck. You're dead before you hit the ground.^"; bullets = bullets - 1; deadflag=1; rtrue; } ], has static scenery; Object OutsideRadarTower "Outside Radar Tower" with description "You are standing on a small platform outside the radar tower. You can see light coming from a window at the top of the tower. To the south is the door to the tower. To the north is the courtyard.", n_to Courtyard, s_to RadarTowerDoor, has light; Object -> RadarTowerDoor "radar tower door" with name "radar" "tower" "door", description "It's a large metal door.", when_open "The radar tower door is open.", when_closed "The radar tower door is closed.", door_to [; if (location==OutsideRadarTower) return RadarTowerGroundFloor; return OutsideRadarTower; ], door_dir [; if (location==OutsideRadarTower) return s_to; return n_to; ], found_in OutsideRadarTower RadarTowerGroundFloor, has static door openable ~open; ! -- Inside radar tower Object RadarTowerGroundFloor "Radar Tower Ground Floor" with description "You are on the ground floor of the radar tower. To the east is an ascending stairwell. The radar tower door is to the north.", n_to RadarTowerDoor, e_to RadarTowerSecondFloor, u_to RadarTowerSecondFloor, has light; Object RadarTowerSecondFloor "Radar Tower Second Floor" with description "You are on the second floor of the radar tower. There is a table against the south wall. To the west is a descending stairwell, and to the north is an ascending stairwell.", w_to RadarTowerGroundFloor, d_to RadarTowerGroundFloor, n_to RadarTowerTopFloor, u_to RadarTowerTopFloor, has light; Object RadarTowerTopFloor "Radar Tower Top Floor" with description "You are on the top floor of the radar tower. To the west is a door. To the south is a descending stairwell.", s_to RadarTowerSecondFloor, d_to RadarTowerSecondFloor, w_to RadarOperationsDoor, has light; Object -> RadarOperationsDoor "radar operations door" with name "radar" "operations" "door", description "It is a metal door with a sign reading: ~Radar Operations Center: Authorized Personnel Only!~", when_open "The door is open.", when_closed "The door is closed.", before [; Open: "The security guard stops you. ~This is a restricted area, you need a security pass to enter,~ he says."; ], door_to [; if (location==RadarTowerTopFloor) return RadarOperationsRoom; return RadarTowerTopFloor; ], door_dir [; if (location==RadarTowerTopFloor) return w_to; return e_to; ], has static door openable ~open; Object -> RadarSecurityGuard "radar security guard" with name "radar" "security" "guard", description "He stands tall and at attention. He is eyeing you carefully.", life [; Ask,AskFor,Tell,Answer: "The security guard says, ~If you've got a security pass, show it to me and then I'll let you in.~"; ], before [; Shoot: if (LugerGun in player && bullets > 0) { print "You draw your weapon to shoot the guard, but the guard lunges forward and knocks the gun from your hand. He pushes you to the ground, and before you can get up, he draws his weapon and fires a shot. You feel the sting of the bullet as it hits you in the chest...^"; deadflag=1; rtrue; } Attack: print "You charge at the guard, but he grabs you, and with a quick motion, snaps your neck. You are dead before you hit the floor.^"; deadflag=1; rtrue; ], daemon [; if (location==RadarTowerTopFloor && NaziUniform hasnt worn) { print "The security guard sees you in your allied uniform and draws his weapon. Before you can react, he fires off a round that hits you in the chest.^"; deadflag=1; } ], has animate; Object RadarOperationsRoom "Radar Operations Room" with description "You are in the radar operations room. There is a table and chairs against the north wall, a window to the west, and a map hangs from the south wall. You can hear static and some German gibberish through the speaker of the radio. The only exit is to the east.", e_to RadarOperationsDoor, has light; Object -> RadarOperationsRoomWindow "window" with name "window", description "You look out the window. You can see the prison to the west, the hangar to the north, and the guard tower far off to the east. The sun is beginning to set.", has scenery; Object -> RadarOperationsTable "table" with name "table", description "It is a large wooden table.", has scenery supporter; Object -> -> CombinationPapers "pile of papers" with name "pile" "of" "paper" "papers", before [; Examine: print "The first few pages explain how to use the radio equipment and what the communications protocols are. The last page is a listing of the combinations to the prison basement lockers! You quickly memorize the combinations.^"; give player combination; ! ** The player does not have to take the papers to remember the combination rtrue; ]; Object -> -> RadioEquipment "radio transmitter" with name "radio" "transmitter" "equipment", description "Attached to the transmitter is a microphone. The receiver has frequency and volume knobs on it. Wires run from the back of the equipment up the north wall and into the ceiling.", has static; Object -> Map "map" with name "map", description "It is encased in glass, attached securely to the wall. The map shows the german base and the surrounding area. There is a prison to the west, a hangar to the north, and a radar tower to the south. There is an airstrip and guard tower to the east. The base seems to be surrounded by tree-covered mountains. If you're going to escape, you'll need to find a quick and easy way to get to the other side of the mountains.", has scenery; ! -- Aircraft Hangar Object OutsideHangar "Outside Hangar" with description "You are standing on wooden platform outside the hangar. To the south is the courtyard. The hangar door is to the north.", s_to Courtyard, n_to HangarDoor, has light; Object -> HangarDoor "hangar door" with name "hangar" "door", description "It is a strong wood door with a window in it. A sign hanging from it reads: ~Authorized Personnel Only!~", when_open "The hangar access door is open.", when_closed "The hangar access door is closed.", before [; Open: "The security guard grabs your arm and jerks you away from the door. ~You'll have to show me your security pass before I let you in,~ he says."; ], door_to [; if (location==OutsideHangar) return InsideHangar; return OutsideHangar; ], door_dir [; if (location==OutsideHangar) return n_to; return s_to; ], has static door openable ~open; Object -> HangarSecurityGuard "hangar security guard" with name "hangar" "security" "guard", description "He looks young, and hasn't shaved in a few days.", life [; Ask,AskFor,Tell,Answer: "~Sorry, I can't let you in unless you have a security pass,~ the guard says."; ], before [; Shoot: if (LugerGun in player && bullets > 0) { print "You draw your weapon, and before the security guard can react, you shoot him in the head. His body falls to the ground in front of the door. A second later, you hear a shot ring out in the distance. A bullet strikes you in head, ending your life before you even hit the ground.^"; deadflag=1; rtrue; } ], has animate; Object InsideHangar "Inside Hangar" with description "You are inside the hangar. You see scaffolding against the walls and the skeleton of the building is in plain view high above your head. The east wall is a large aircraft loading door. Against the north wall you see shelves with various aircraft parts, a pile of tires and an electronic button. The door to the fuel room is to the west. The hangar exit door is to the south.", s_to HangarDoor, w_to HangarFuelRoomDoor, has light; Object -> AircraftLoadingDoor "aircraft loading door" with name "load" "loading" "door", description "It is a very large, metal door through which aircraft can pass in to and out of the hangar. You think that if you can get it open, you might be able to get the airplane out.", when_open "The aircraft loading door is open.", when_closed "The aircraft loading door is closed.", before [; Open: print "There is no obvious mechanism on the door that opens it.^"; rtrue; ], has static door openable ~open; ! ** Player must kill the mechanics with the gas canister Object -> Mechanics "group of mechanics" with name "group" "of" "mechanic" "mechanics", life [; Ask,Tell,AskFor,Answer: "One of the mechanics interrupts you while you're speaking, ~Go away, can't you see we're busy here?~"; ], before [; Examine: if (Mechanics has dead) { "The mechanics all lie dead on the floor."; } else { "They are wearing toolbelts and hardhats, and talking to each other. They seem to be working on the airplane."; } Shoot: if (Mechanics hasnt dead && LugerGun in player && bullets > 0) { print "You draw your weapon and open fire. One of the mechanics falls, the others scatter to the corners of the room. They begin shooting back at you. You are struck in the leg, then in the arm, and you fall to the ground. One of the mechanics runs over to you and finally finishes you off with a bullet to your head.^"; deadflag=1; rtrue; } Attack: if (Mechanics hasnt dead) { print "You start punching one of the mechanics. The others quickly pull you away and begin beating you. You fall to the ground, and they continue to beat you until you are dead...^"; deadflag=1; rtrue; } ], has animate; ! ** This button opens and closes the aircraft loading doors Object -> ElectronicSwitch "electronic button" with name "electronic" "button", description "It is a red button about two inches in diameter. Cables run from the button's metal box to the aircraft loading door.", before [; Push: if (Mechanics has dead) { if (player in Airplane) { print "You can't reach the button while you're in the airplane.~"; rtrue; } else { if (AircraftLoadingDoor has open) { print "With a loud metallic grinding sound, the aircraft loading doors slowly close.^"; give AircraftLoadingDoor ~open; rtrue; } else { print "There is a loud creak, then the aircraft loading doors slowly open with a metallic grinding sound.^"; give AircraftLoadingDoor open; rtrue; } } } else { print "One of the mechanics grabs your arm and pulls you away from the button. ~Hey, don't press that button!~ he says, ~Who let you in here anyway?~^"; rtrue; } ], has scenery; ! ** Airplane must be filled with fuel and then started before the throttle will ! ** fly the plane to freedom. Object -> Airplane "airplane" with name "aircraft" "plane" "airplane" "Focke" "Wulf" "Focke-Wulf", description "It is a single engine, one passenger German Focke-Wulf Fw 190 fighter plane.", before [; Enter: if (Mechanics hasnt dead) { print "One of the mechanics pushes you away from the plane. ~What are you doing in here? Get out now!~ he shouts.^"; rtrue; } SwitchOn: if (player in Airplane) { if (Airplane has fuel) { print "You press the ignition on the control panel and the engine comes to life with a roar!^"; give Airplane on; rtrue; } else { print "The engine does not start. According to the gauges, there is no fuel in the fuel tank.^"; rtrue; } } else { print "You have to be in the airplane's cockpit before you can start the engine.^"; rtrue; } ], has static enterable switchable container open; ! ** User must push the throttle to fly the plane to freedom. Object -> -> Throttle "throttle" with name "throttle", description "It is a small lever that, when pushed, will cause the plane to accelerate.", before [; Push: if (player in Airplane) { if (Airplane has on) { if (AircraftLoadingDoor has open) { print "You push hard on the throttle and the plane lurches forward. You steer the plane out of the hangar through the aircraft loading doors and down the runway. You glance back and see a mob of angry german soldiers amassing in the courtyard. The plane takes off and you fly over the mountains and to freedom.^"; deadflag=2; rtrue; } else { print "You're about to push the throttle when you realize you can't go anywhere yet. Maybe if the aircraft loading doors were open...^"; rtrue; } } else { print "Nothing happens. The engine must be running for the throttle to do anything useful.^"; rtrue; } } else { print "You must be in the cockpit of the airplane to push the throttle lever.^"; rtrue; } ], has static; Object -> HangarFuelRoomDoor "fuel room door" with name "fuel" "room" "door", description "It is a small door with a window. A signs above it reads, ~CAUTION: Flammable Materials Inside!~", when_open "The fuel room door is open.", when_closed "The fuel room door is closed.", door_to [; if (location==InsideHangar) return HangarFuelRoom; return InsideHangar; ], door_dir [; if (location==InsideHangar) return w_to; return e_to; ], before [; Open: if (Mechanics hasnt dead) { print "One of the mechanics intercepts you before you get to the door. ~I don't know who you are or what you're doing here,~ he says, ~but you had better leave now before I call security!~^"; rtrue; } ], found_in InsideHangar HangarFuelRoom, has static door openable ~open; Object HangarFuelRoom "Fuel Room" with description "You are in the fuel room of the hangar. Shelves line the walls. There are oil drums on the floor. The only exit is to the east.", e_to HangarFuelRoomDoor, has light; ! ** Fuel can used to fill the airplane with fuel Object -> FuelCan "fuel can" with name "fuel" "can" "canister", description "It is a large fuel canister, filled to the brim.", before [; Insert: if (second==Airplane) { print "You fill the airplane's fuel tank.^"; give Airplane fuel; rtrue; } Examine: print "It is a large fuel canister."; if (Airplane has fuel) { print " It is empty.^"; } else { print " It is filled to the top with aircraft fuel.^"; } rtrue; Shoot: if (LugerGun in player && bullets > 0) { if (Airplane hasnt fuel) { print "The shot ignites the fuel in the canister, killing you as it explodes.^"; deadflag=1; rtrue; } } ]; ! -- General objects used in the world Object ConcreteRock "concrete rock" with name "cement" "section" "wall" "concrete" "rock", description "It is a small concrete rock, could easily be used as a simple weapon.", before [; ThrowAt: switch (second) { PrisonCellLightBulb: if (PrisonCell has light) { print "The bulb explodes as the rock strikes it, extinguishing the light.^"; give PrisonCell ~light; move ConcreteRock to PrisonCell; StopDaemon(PrisonGuard); rtrue; } PrisonGuard: if (PrisonGuard hasnt dead) { print "The rock strikes the guard on the back of the head, knocking him unconscious. He falls to the ground in front of the cell door, within your reach.^"; give PrisonGuard dead; StopDaemon(PrisonGuard); move ConcreteRock to PrisonCell; rtrue; } PrisonSecurityGuard,RadarSecurityGuard,HangarSecurityGuard: if (second hasnt dead) { print "The security guard sees the rock hurling through the air and quickly dodges out of its path. Without hesitating, he draws his weapon and fires. The bullet hits you in the chest and you fall to the ground. Everything begins to go dark as the guard fires one more shot into your head.^"; deadflag=1; rtrue; } Mechanics: if (Mechanics hasnt dead) { print "The rock strikes a mechanic on the head, knocking him to the ground. As the others help him back to his feet, one of the mechanics shouts back at you, ~Hey, you be careful over there!~^"; move ConcreteRock to InsideHangar; rtrue; } } ]; ! ** The sniper tower checks to see if the player is not wearing the uniform in the ! ** outside of the base. If so, then the sniper shoots the player. Object GuardTowerSniper "guard tower sniper" with name "guard" "tower" "sniper", daemon [; switch (location) { Courtyard,OutsidePrison,OutsideRadarTower,OutsideHangar: if (NaziUniform hasnt worn) { print "You hear a shot ring out in the distance. You turn to see what is going on, and a split second later a bullet hits you between the eyes.^"; deadflag=1; } } ]; ! -- Custom verbs [ ShootSub; if (LugerGun in player) { if (bullets > 0) { print "BLAM! You fire a shot into ", (the) noun, ".^"; bullets = bullets - 1; } else { print "CLICK! You are out of ammo!^"; } } else { print "You don't have a weapon to shoot with!^"; } ]; ! ** Need to be able to shoot the gun Verb 'shoot' * noun -> Shoot;