//author: Ashley Fairweather commands = {i, n, s, e, w, look, open, take, break, fire, ride, grab, unlock, display, health,get} //This is the list of commands. In the help file, you will see descriptions of them all. room you { state {injured, partiallyHealed, fullyHealed, dead} } //You basically have three lives until you are dead. //ROOMS //Containers room MedicineCabinet{ //duplicate of BATHROOM state {closed, open} label = "medicine cabinet"; } room KitchenCupboard{ //duplicate of KITCHEN state {closed, open} label = "kitchen cupboard"; } room GunCase{ //duplicate of STORAGE ROOM state {closed, broken} label = "gun case"; } //These three, above this comment, hold as furniture that contain items. //They hold medicine bottles, ammunition, and guns. room gun1 { } room gun2 { } room gun3 { } room bottle1 { } room bottle2 { } room bottle3 { } room bottle4 { } room box1 { } room box2 { } room box3 { } //These rooms above are the actual containers for the medicine, guns, and ammunition. //BOTTLES: medicine //BOXES: ammunition //GUNS: ...guns! (you, health){ if (you.injured){ "You are on the verge of death. One more hit and you will die."; } if (you.partiallyHealed){ "You are not dying, but you are not fully healed."; } if (you.fullyHealed){ "You are at full health."; } } //displays your health (you, help){ "Here is a list of commands possible in the game:"; ""; "i - check your inventory"; "n - move north"; "s - move south"; "e - move east"; "w - move west"; ""; "look - take a look around the room."; "open - open something (e.g.: a door)"; "take - take something (e.g.: an item in the room)"; "break - break something (e.g.: glass)"; "fire - fire your gun"; "ride - trust me, you'll know when you get there"; "grab - grab something (e.g.: an object on the floor)"; "unlock - unlock something (e.g.: a lock)"; "display - display something special (e.g.: something ridiculously awesome)"; "health - displays your health"; ""; "Other rooms may require more complex commands, such as 'take [item]'"; ""; "You'll have to think carefully, but there are hints laid out in every room."; "It's also encouraged to use 'look' frequently to familiarize yourself with each"; "room's surroundings."; } //calls on a menu displaying all commands possible in the game (not per room!) //FIRST FLOOR room Hallway { label = "hallway"; (you, look){ "You are in an EMPTY HALLWAY. There are blood stains on the walls and the paint is chipping off."; "You hear distant moans coming from outside."; ""; "To the NORTH is a LIVING ROOM."; "To the EAST is a STAIRCASE leading to darkness."; "To the SOUTH is the entrance to the house, but you barracaded the door."; if (you.injured){ "You are on the VERGE OF DEATH; you have deep wounds after an attack from a ROBOT ZOMBIE BEAR."; "You clutch your wound and decide it's probably a good idea to look for MEDICINE before venturing back outside."; } } (you, n){ move you from Hallway to LivingRoom; if (you.injured){ "You stumble into a somber LIVING ROOM."; } else{ "You walk into a somber LIVING ROOM."; } } (you, s){ "The exit to the SOUTH is blocked. You barracaded the door."; } (you, w){ "You can't go that way."; } (you, e){ if (you.injured){ "You attempt to go up the STAIRS but your wound keeps you from continuing."; "You should probably stay on this level of the house."; } //I block the user from going upstairs before healing themselves. else{ move you from Hallway to UpstairsHall; "You slowly walk up the STAIRS to another dark HALLWAY."; } } } //In all of these rooms, if you are injured, you will have a different set of flavor text appear //This makes it more realistic that you are injured. room LivingRoom{ label = "living room"; (you, look){ "You are in what looks like a LIVING ROOM. There are couches with torn-up cushions and"; "there are bite marks on a table. You gulp as you see leg bones sticking out a broken television"; "screen. This house looks to have been raided by ROBOT ZOMBIE BEARS!"; ""; "There is a hint of a foul stench coming from the WEST. You're not sure what it is, but it smells bad."; "You smile to subdue your gag reflex."; ""; "To the NORTH, the door is ajar but you catch a glimpse of a SINK; the room must be a BATHROOM."; "To the WEST is a very messy DINING ROOM."; "To the SOUTH is the HALLWAY."; } (you, n){ move you from LivingRoom to Bathroom; if (you.injured){ "You limp slowly towards the BATHROOM."; } else{ "You cautiously walk into the BATHROOM."; } } (you, s){ move you from LivingRoom to Hallway; if (you.injured){ "You turn around slowly and limp towards the HALLWAY."; } else{ "You head towards the HALLWAY."; } } (you, w){ move you from LivingRoom to DiningRoom; if (you.injured){ "You stumble slowly into the dusty DINING ROOM."; } else{ "You walk slowly into the dusty DINING ROOM."; } } (you, e){ "You can't go that way."; } } room Bathroom{ label = "bathroom"; (you, look){ "You have a hard time moving around this tiny BATHROOM. There are flies hovering around the toilet;"; "you don't want to peer inside. You notice a MEDICINE CABINET over the sink."; ""; "To the SOUTH is the LIVING ROOM."; } //You can only take a bottle of medicine after opening the cabinet (you, open){ +MedicineCabinet.open; -MedicineCabinet.closed; "You OPEN the MEDICINE CABINET and peer inside. There is a wide array of pill BOTTLES inside."; if (you.injured){ "You clutch at your wound in agony and read the labels to the bottles:"; ""; "BOTTLE1: ENHANCED IBUPROFEN - 200mg - Closes wounds AND dulls the pain!"; "BOTTLE2: METHANDROSTENOLONE - 30mg - Ultra awesome steroids to clear away wounds!"; "BOTTLE3: SMELLY HERBS"; "BOTTLE4: UNLABELED"; ""; "Which should you TAKE? You can only take ONE"; } else{ "You already took something to relieve the pain. You should probably MOVE ON."; } } //This function allows you to take the medicine RIGHT AWAY. These do NOT go in your inventory as you ingest them immediately. (you, take, bottles $b){ if (MedicineCabinet contains $b){ //Steroids, Herbs, Unlabeled if (Medicine.taken){ "From your pharmaceutical knowledge, you know it's probably not a good"; "idea to mix drugs of this calibur. You decide to continue on your way."; } else{ if (Ibuprofen.untaken && $b contains Ibuprofen){ move $b from MedicineCabinet to offscreen; +Medicine.taken; -Medicine.untaken; +Ibuprofen.taken; -Ibuprofen.untaken; +you.partiallyHealed; -you.injured; "You take the ENHANCED IBUPROFEN. You are not fully healed, but you can still maneuver."; "It's probably a good time to look for a GUN now."; } if (Steroids.untaken && $b contains Steroids){ move $b from MedicineCabinet to offscreen; +Medicine.taken; -Medicine.untaken; +Steroids.taken; -Steroids.untaken; +you.fullyHealed; -you.injured; "You take the STEROIDS. You feel a little hesitant at first, due to the insane dosage, but you instantly heal."; "You are fully healed and can now search for a GUN."; } if (Herbs.untaken && $b contains Herbs){ move $b from MedicineCabinet to offscreen; +Medicine.taken; -Medicine.untaken; +Herbs.taken; -Herbs.untaken; +you.dead; -you.injured; "You eat the HERBS. Almost immediately after swallowing these herbs, you feel your insides squirm."; "As you cough up your own blood, you turn the bottle around and notice a DANGER sticker on the label."; //LOSE SCENARIO +game.lose; } if (Unlabeled.untaken && $b contains Unlabeled){ move $b from MedicineCabinet to offscreen; +Medicine.taken; -Medicine.untaken; +Unlabeled.taken; -Unlabeled.untaken; +you.fullyHealed; -you.injured; "You're not sure what you just took, but you instantly feel better...and stronger! You feel your wound close up"; "and your energy come back. You now feel able to search for a GUN."; } } } else{ "You already took that medicine. Plus, shouldn't you be finding a gun?"; "You also think to yourself, 'Maybe I shouldn't mix drugs...'"; } } (you, n){ "You can't go that way."; } (you, s){ move you from Bathroom to LivingRoom; "You head back into the LIVING ROOM."; } (you, w){ "You can't go that way."; } (you, e){ "You can't go that way."; } } room DiningRoom{ label = "dining room"; (you, look){ "You're standing in a DINING ROOM, with furniture scattered everywhere. There are chairs "; "flipped upside down and the table is cut in half. You are not sure whether or not you are scared"; "of what cut that table, or impressed at how clean the cut was. There are more blood stains in this room."; ""; "To the NORTH is the KITCHEN."; "You look to the WEST and find an EXIT. However, whoever lived here before locked it up tightly."; "There is a LOCK on the door."; } (you, n){ move you from DiningRoom to Kitchen; "You walk into the KITCHEN."; } (you, s){ "You can't go that way."; } (you, w){ if (Lock.locked){ "You shake at the LOCK but it's no use. You cannot go forward"; if (Axe.held){ "You try breaking the lock with your AXE. What are you, stupid? IT'S A BIG LOCK!"; } //I block the way. } else{ move you from DiningRoom to Outside; "You open the door and head outside...THERE IS A ROBOT ZOMBIE BEAR IN YOUR WAY."; } } (you, e){ move you from DiningRoom to LivingRoom; "You head back into the LIVING ROOM."; } //This is the unlock function. //It displays the user's goals if it does not unlock (you, unlock){ if (Keys.taken){ if (Pistol.held && PistolAmmo.taken){ +Lock.unlocked; -Lock.locked; "With your BACKYARD KEY, you UNLOCK the lock. You can now ESCAPE and go outside!"; } if (Shotgun.held && ShotgunAmmo.taken){ +Lock.unlocked; -Lock.locked; "With your BACKYARD KEY, you UNLOCK the lock. You can now ESCAPE and go outside!"; } if (RocketLauncher.held && Rockets.taken){ +Lock.unlocked; -Lock.locked; "With your BACKYARD KEY, you UNLOCK the lock. You can now ESCAPE and go outside!"; } } if (Keys.untaken){ "You should probably find a set of KEYS."; } if (Pistol.notHeld){ if (Shotgun.notHeld){ if (RocketLauncher.notHeld){ "You should probably look into getting a GUN before heading outside."; } } } if (PistolAmmo.untaken){ if (ShotgunAmmo.untaken){ if (Rockets.untaken){ "You need to load your gun with some AMMO first."; } } } } } room Kitchen{ label = "kitchen"; (you, look){ "The smell in the KITCHEN is unBEARable. You see the remains of a ROBOT ZOMBIE BEAR on the floor. "; "There is an AXE stuck in its head. You force yourself to look away from this gruesome sight and notice"; "several CUPBOARDS left open. You take note of the AXE though; you never know when you may need to GRAB it."; ""; "There are several cupboards, but you see one is ajar. You catch a glimpse of something shiny inside."; ""; "To the SOUTH is the DINING ROOM"; } //You can only take ammunition after having the cupboard open (you, open){ +KitchenCupboard.open; -KitchenCupboard.closed; "You open the KITCHEN CUPBOARD and find AMMUNITION!"; "BOX1: PISTOL AMMO"; "BOX2: SHOTGUN AMMO"; "BOX3: ROCKETS"; if (Pistol.held){ "You should probably stock up for your GUN."; } if (Shotgun.held){ "You should probably stock up for your GUN."; } if (RocketLauncher.held){ "You should probably stock up for your GUN."; } if (Pistol.notHeld){ if (Shotgun.notHeld){ if (RocketLauncher.notHeld){ "Since there is AMMUNITION here, you hope there are still GUNS available somewhere in the house."; "You take note of where the AMMUNITION is."; if (you.fullyHealed || you.partiallyHealed){ "You decide to start looking for one of these GUNS."; } else{ "Since you are still on the VERGE OF DEATH, you should probably prioritize finding"; "a way to TEND TO YOUR WOUNDS before looking for a GUN."; } } } } } //This function allows the user to take AMMUNITION for their gun! (you, take, boxes $b){ if (KitchenCupboard contains $b){ if (Ammo.taken){ "YOU DON'T NEED ANYMORE AMMO BRO."; } else{ if (Pistol.held){ if (PistolAmmo.untaken && $b contains PistolAmmo){ move $b from KitchenCupboard to offscreen; +Ammo.taken; -Ammo.untaken; +PistolAmmo.taken; -PistolAmmo.untaken; "You take the PISTOL AMMO. To be cautious, you load your gun right away. You never know what will show up."; } else{ "Take the appropriate AMMO please."; } } if (Shotgun.held){ if (ShotgunAmmo.untaken && $b contains ShotgunAmmo){ move $b from KitchenCupboard to offscreen; +Ammo.taken; -Ammo.untaken; +ShotgunAmmo.taken; -ShotgunAmmo.untaken; "You take the SHOTGUN AMMO. To be cautious, you load your SHOTGUN right away."; "You feel empowered holding such a powerful gun in your hands."; } else{ "Take the appropriate AMMO please."; } } if (RocketLauncher.held){ if (Rockets.untaken && $b contains Rockets){ move $b from KitchenCupboard to offscreen; +Ammo.taken; -Ammo.untaken; +Rockets.taken; -Rockets.untaken; "You take the ROCKETS. Since you are anxious to finally shoot ROCKETS, you load your ROCKET LAUNCHER right away."; "You are looking forward to firing this baby."; } else{ "Take the appropriate AMMO please."; } } } } else{ "YOU DON'T NEED ANYMORE AMMO BRO."; "GO FIND A WAY OUT!"; } } //Note: I had to make the command "grab", since I already use take. I'm sorry :D I laid down hints in my game for this. (you, grab){ if (Axe.notHeld){ +Axe.held; -Axe.notHeld; if (Inventory.empty){ +Inventory.notEmpty; -Inventory.empty; } "You look away as you take the AXE out of the bear's head. You hear disgusting cracking noises"; "as you take it out. When the axe is finally out, you immediately walk away from the dead bear."; "Well, at least you an AXE now."; ""; "You swing the AXE around a little and notice it's far too heavy."; "You think maybe finding a GUN would be a better idea."; } else{ "Grab what? You already took the AXE"; } } (you, n){ "You can't go that way."; } (you, s){ move you from Kitchen to DiningRoom; "You head towards the DINING ROOM."; } (you, w){ "You can't go that way."; } (you, e){ "You can't go that way."; } } //SECOND FLOOR room UpstairsHall{ label = "upstairs hall"; (you, look){ "You peer into ANOTHER HALLWAY on the upstairs level of the house. It is darker than the lower level's, "; "as there are absolutely no windows. This hallway looks very clean compared to the lower level."; "You assume ROBOT ZOMBIE BEARS cannot climb stairs."; ""; "There is also a weird object on display in the hall."; ""; "To the NORTH is what appears to be the MASTER BEDROOM; it is very large and has very nice decor."; "To the SOUTH, you see a SMALLER BEDROOM with a smaller bed, karate trophies, and many ACTION FIGURES bestowed upon a shelf."; "You assume this is a CHILD'S BEDROOM. To the EAST, you notice a GUN RACK with SEVERAL GUNS behind a DISPLAY."; } (you, n){ move you from UpstairsHall to MasterBedroom; "You move into the MASTER BEDROOM."; } (you, s){ move you from UpstairsHall to ChildBedroom; "You move into the CHILD'S BEDROOM."; } (you, e){ move you from UpstairsHall to StorageRoom; "You move into the STORAGE ROOM."; } (you, w){ move you from UpstairsHall to Hallway; "You go back down the STAIRS and return to the HALLWAY."; } //Teehee, a secret item! This doesn't actually do much in the game; it's really for the lulz. //It does not harm the narrative's progress at all, either. (you, get){ if (GenisFigure.untaken){ +RealityMarble.taken; -RealityMarble.untaken; if (Inventory.empty){ +Inventory.notEmpty; -Inventory.empty; } "You pick up the REALITY MARBLE. You smile as you remember where it comes from and hold it tight."; "You will not let Tohsaka down. Not this time."; } else{ "Sorry brah, you can only have one of these secret items in your inventory. Don't be hatin'"; //I limited the user to only being able to take one secret item. } } } room ChildBedroom{ label = "child's bedroom"; (you, look){ "You take a look around the SMALL BEDROOM. There are several ACTION FIGURES on the shelves, but one catches your eye."; "It's an action figure of GENIS from TALES OF SYMPHONIA. You feel a sense of nostalgia; you used to play as Genis in every"; "runthrough of this game. You will always think GENIS is the definition of BADASS."; ""; "To the NORTH is the HALLWAY"; } (you, n){ move you from ChildBedroom to UpstairsHall; "You return to the HALLWAY outside."; } (you, s){ "You can't go that way."; } (you, w){ "You can't go that way."; } (you, e){ "You can't go that way."; } //Here's secret item #2. Scroll up to get an explanation. (you, get){ if (RealityMarble.untaken){ +GenisFigure.taken; -GenisFigure.untaken; if (Inventory.empty){ +Inventory.notEmpty; -Inventory.empty; } "You take the GENIS ACTION FIGURE from the shelf. You have a feeling, deep down inside,"; "that this object will serve for an awesome purpose."; } else{ "Sorry brah, you can only have one of these secret items in your inventory. Don't be hatin'"; } } } room MasterBedroom{ label = "master bedroom"; //Yeah okay. I put a lot of videogame references. Don't hate. (you, look){ "You gaze around the MASTER BEDROOM. There must have been somebody living here who was seriously into interior design;"; "the way the colors blend in this room is astounding. The curtains are drape beautifully over the window, while leaving"; "a small crack of sunlight to peer inside. There are paintings hanging on the walls; looks like the child wasn't the only "; "videogame fan. There are several paintings of Luigi from Super Mario Bros. You think to yourself,"; "'But...why Luigi?' You pause for a second as you remember distant memories of playing this game..."; "you had one particular friend who was obsessed with Luigi...you mean,...WEEGEE!....WEEGEE.....weeeeegeeee"; ""; "You shake your head to destroy these annoying thoughts of the troll-like friend you once had."; ""; "To the SOUTH is the HALLWAY"; ""; if (Keys.untaken){ "When you're done shaking, you notice something SHIMMERING on the night table."; "You look closer and notice a set of KEYS. There are several KEYS on this ring."; } } (you, n){ "You can't go that way"; } (you, s){ move you from MasterBedroom to UpstairsHall; "You walk back into the HALLWAY."; } (you, e){ "You can't go that way"; } (you, w){ "You can't go that way"; } //Allows you to take a set of keys. Very essential. (you, get){ if (Keys.untaken){ +Keys.taken; -Keys.untaken; if (Inventory.empty){ +Inventory.notEmpty; -Inventory.empty; } "You grab the SET OF KEYS from the night table. You look at all of the KEYS to try and"; "familiarize yourself with them. There is a KEY that looks like it would fit into the BACK DOOR,"; "a MOTORCYCLE KEY, and several others that you wouldn't recognize. You stuff them into your pocket."; } else{ "There is nothing to take in this room."; } } } room StorageRoom{ label = "storage room"; (you, look){ if (GunCase.closed){ "You turn on the lights. You notice a large amount of GUNS hidden behind a GLASS CASE."; "You get excited as you have probably found a way to defend yourself against the ROBOT ZOMBIE BEARS."; "You try to open the case...but fail. Why is it so hard to open? You tap at the glass. The way the sound"; "bounces back from the tap makes it clear that the glass is incredibly thick. There is a lock on the GLASS CASE."; ""; "To the WEST is the HALLWAY"; } else{ "You don't notice anything special since you got your GUN here. You better head back and find AMMO."; } } (you, n){ "You can't go that way."; } (you, s){ "You can't go that way."; } (you, e){ "You can't go that way."; } (you, w){ move you from StorageRoom to UpstairsHall; "You walk back into the HALLWAY."; } //Some people will think HEY! I CAN UNLOCK THE GUN CASE, but you can't. //The goal is to actually break the glass shielding the gun case. I lay a hint in here. (you, unlock){ if (GunCase.closed){ if (Keys.taken){ "You try all of the KEYS in your KEY RING on the lock. None of them work."; "You look at the glass and think...somehow, you're going to have to BREAK the glass."; "Maybe there is an OBJECT DOWNSTAIRS that can BREAK the glass..."; } else{ "Unlock with what? You have no KEYS"; } } else{ "The gun case is broken...why unlock it?"; } } //This is what happens if you attempt to break the case. (you, break){ if (Axe.held){ +GunCase.broken; -GunCase.closed; "You load all of your pent up anger into your axe and swing at the glass as hard as possible."; "SMASH! The glass breaks."; ""; "You look at the array of GUNS:"; "GUN1: PISTOL"; "GUN2: SHOTGUN"; "GUN3: ROCKET LAUNCHER"; ""; "Which gun will you TAKE?"; } else{ "What are you going to BREAK the glass with?"; //This is what happens when you're not holding the axe. } } //This function allows the user to take a gun! (you, take, guns $g){ if (GunCase.broken){ if (GunCase contains $g){ if (Gun.taken){ "You already took a GUN. Good try, though."; } else{ //This is a moderately okay choice. if (Pistol.notHeld && $g contains Pistol){ move $g from GunCase to offscreen; +Pistol.held; -Pistol.notHeld; +Gun.taken; -Gun.untaken; if (Inventory.empty){ +Inventory.notEmpty; -Inventory.empty; } "You chose the PISTOL. It's lightweight and extremely versatile. However, you're not entirely sure"; "it will defend you very well against a bear. However, since it looks so sleek, you couldn't help"; "but take it. Now, all you have to do is find AMMO."; } //This is a good choice. if (Shotgun.notHeld && $g contains Shotgun){ move $g from GunCase to offscreen; +Shotgun.held; -Shotgun.notHeld; +Gun.taken; -Gun.untaken; if (Inventory.empty){ +Inventory.notEmpty; -Inventory.empty; } "You chose the SHOTGUN. Its power seems to radiate from it. You are certain this will kill the sh*&"; "out of any ROBOT ZOMBIE BEAR that crosses your path. Now, all you have to do is find AMMO."; } //This is a bad choice. if (RocketLauncher.notHeld && $g contains RocketLauncher){ move $g from GunCase to offscreen; +RocketLauncher.held; -RocketLauncher.notHeld; +Gun.taken; -Gun.untaken; if (Inventory.empty){ +Inventory.notEmpty; -Inventory.empty; } "You chose the ROCKET LAUNCHER. You're not really sure why you want to lug around such a huge weapon,"; "but you know you feel incredibly badass with it. YOU CAN SHOOT ROCKETS FROM THIS WEAPON! Now, all you"; "have to do is find AMMO."; } } } else{ "You already chose this gun. Plus, you should be moving on"; "to find some AMMO."; } } else{ if (GunCase.closed){ "You're going to have to try BREAKING this first."; //Restricts the user from taking a gun before breaking the glass. } } } } //OUTSIDE room Outside{ label = "outside"; (you, look){ if (RobotZombieBear.alive){ "...THERE IS A ROBOT ZOMBIE BEAR IN YOUR WAY. C'MON, DON'T YOU UNDERSTAND?! IT'S A ROBOT ZOMBIE BEAR GTFO!"; } else{ "Now that the bear is dead, you can see the backyard of the house. There is no sign of human life."; "You hear a distant sound of moans and growls. You need to hurry!"; "There is a SWEET RIDE in front of you! It's a DUCATI MONSTER, a SWEET MOTORCYCLE!"; } //Yeah, I put a bear in the way. } //This is where the fire command comes in. You get to shoot at the bear. There are several cases. (you, fire){ if (RobotZombieBear.alive || RobotZombieBear.wounded){ //The pistol sucks. Don't choose it. Although, you can still survive with it. //It has two shots. //Note: it is not actually possible to run out of ammo, but I handled it anyway. //It takes two shots to kill the bear with this. if (Pistol.held){ if (Pistol.notFired){ +Pistol.firedOnce; -Pistol.notFired; if (RobotZombieBear.alive){ +RobotZombieBear.wounded; -RobotZombieBear.alive; "You fire your PISTOL directed at the bear. It hits, but doesn't kill."; "You only have a PISTOL after all."; "The bear did not seem to be expecting you to attack, so you caught it by surprise!"; ""; "Although you caught it by surprise, it still attacks you"; ""; if (you.injured){ +you.dead; -you.injured; "The bear takes its final swipe at you, and you fall to the floor. You are dead."; "GAME OVER"; //LOSE SCENARIO +game.lose; } if (you.partiallyHealed){ +you.injured; -you.partiallyHealed; "You should probably watch out. You are almost dead."; } if (you.fullyHealed){ +you.partiallyHealed; -you.fullyHealed; "It's a good thing you got fully healed earlier on!"; } } else{ if (RobotZombieBear.wounded){ +RobotZombieBear.dead; -RobotZombieBear.wounded; "You fire your PISTOL directed at the bear. It takes its final hit and FALLS TO THE FLOOR!"; "YOU KILLED THE ROBOT ZOMBIE BEAR!"; } } } else{ if (Pistol.firedOnce){ +Pistol.firedTwice; -Pistol.firedOnce; if (RobotZombieBear.alive){ +RobotZombieBear.wounded; -RobotZombieBear.alive; "You fire your PISTOL directed at the bear. It hits, but doesn't kill."; "You only have a PISTOL after all."; "The bear did not seem to be expecting you to attack, so you caught it by surprise!"; ""; "IT TAKES A SWING AT YOU AS A COUNTERATTACK!"; ""; "You ran out of ammo! WHAT SHOULD YOU DO!?!"; ""; if (you.injured){ +you.dead; -you.injured; "The bear takes its final swipe at you, and you fall to the floor. You are dead."; "GAME OVER"; //LOSE SCENARIO +game.lose; } if (you.partiallyHealed){ +you.injured; -you.partiallyHealed; "You should probably watch out. You are almost dead."; } if (you.fullyHealed){ +you.partiallyHealed; -you.fullyHealed; "It's a good thing you got fully healed earlier on!"; } } else{ if (RobotZombieBear.wounded){ +RobotZombieBear.dead; -RobotZombieBear.wounded; "You fire your PISTOL directed at the bear. It takes its final hit and FALLS TO THE FLOOR!"; "YOU KILLED THE ROBOT ZOMBIE BEAR!"; } } } else{ if (Pistol.firedTwice){ "Your gun clicks - you have NO MORE AMMUNITION!"; ""; "THE BEAR TAKES A SWIPE AT YOU!"; ""; if (you.injured){ +you.dead; -you.injured; "The bear takes its final swipe at you, and you fall to the floor. You are dead."; "GAME OVER"; //LOSE SCENARIO +game.lose; } if (you.partiallyHealed){ +you.injured; -you.partiallyHealed; "You should probably watch out. You are almost dead."; } if (you.fullyHealed){ +you.partiallyHealed; -you.fullyHealed; "It's a good thing you got fully healed earlier on!"; } } } } } //The shotgun is awesome and will kill the bear right away. if (Shotgun.held){ +Shotgun.fired; -Shotgun.notFired; "You shoot the ROBOT ZOMBIE BEAR with your SHOTGUN."; "The bear takes the hit through its head and DIES immediately."; "Thank God you took the SHOTGUN!."; +RobotZombieBear.dead; -RobotZombieBear.alive; } //The rocket launcher WILL kill the bear...but also you. if (RocketLauncher.held){ +RocketLauncher.fired; -RocketLauncher.notFired; "You shoot a ROCKET directly at the ROBOT ZOMBIE BEAR."; "It blows up everything in front of you...INCLUDING YOURSELF."; "GAME OVER."; +RobotZombieBear.dead; +you.dead; -RobotZombieBear.alive; if (you.injured){ -you.injured; } if (you.partiallyHealed){ -you.partiallyHealed; } if (you.fullyHealed){ -you.fullyHealed; } //LOSE SCENARIO +game.lose; } } } //I made it so that, if you move around while facing the bear, you get swiped at. //I hinted at this if you move south and let the user not get hit. //You cannot escape this bear without killing it. (you, n){ if (RobotZombieBear.alive || RobotZombieBear.wounded){ "The ROBOT ZOMBIE BEAR is RIGHT IN FRONT OF YOU."; "It takes a swipe at you with its massive metallic claws."; if (you.injured){ +you.dead; -you.injured; "The bear rips out your jugular."; "GAME OVER."; //LOSE SCENARIO +game.lose; } if (you.partiallyHealed){ +you.injured; -you.partiallyHealed; "You take a hit. You are almost dead! WATCH OUT!"; } if (you.fullyHealed){ +you.partiallyHealed; -you.fullyHealed; "You take a hit. It's a good thing you fully healed yourself earlier though,"; "but you should probably watch OUT!"; } } else{ "You can't go that way!"; } } (you, w){ if (RobotZombieBear.alive || RobotZombieBear.wounded){ "The ROBOT ZOMBIE BEAR is slow, but still manages to take a"; "swing at you with its massive metallic claws."; if (you.injured){ +you.dead; -you.injured; "The bear rips out your jugular."; "GAME OVER."; //LOSE SCENARIO +game.lose; } if (you.partiallyHealed){ +you.injured; -you.partiallyHealed; "You take a hit. You are almost dead! WATCH OUT!"; } if (you.fullyHealed){ +you.partiallyHealed; -you.fullyHealed; "You take a hit. It's a good thing you fully healed yourself earlier though,"; "but you should probably watch OUT!"; } } else{ "You can't go that way."; } } //This is where the secret items come in. (you, display){ if (GenisFigure.taken){ "You take out the GENIS ACTION FIGURE and place it in front of you."; "You try to remember some of his best incantations..."; ""; "You scream outloud, 'May the merciless embrace of frost take you, ABSOLUTE!'"; ""; "The bear kind of looks at you for a minute and continues to roar. You quickly get out of the way before the bear swipes at you."; } else{ if (RealityMarble.taken){ "You take out the REALITY MARBLE and place it in front of you."; "You feel its power embrace your fingertips."; ""; "You scream outloud:"; ""; "'I am the bone of my sword,"; "Steel is my body, and fire is my blood."; "I have created over a thousand blades."; "Unknown to death."; "Nor known to life."; "Have withstood pain to create many weapons."; "Yet, those hands will never hold anything."; "So as I pray, UNLIMITED BLADE WORKS!'"; ""; "The wind blows suddenly and the bear swipes at your face. Looks like the reality marble technique doesn't actually work IRL."; } else{ "DISPLAY WHAT?! YOU'RE FIGHTING A FREAKING BEAR!"; } } } (you, s){ if (RobotZombieBear.alive || RobotZombieBear.wounded){ "Running back into the house IS NOT A GOOD IDEA."; } else{ move you from Outside to DiningRoom; "You move back inside the DINING ROOM for some strange reason."; "You should prioritize ESCAPING though."; } } //This is where you can ride off in the distance...or run off on foot. (you, ride){ if (RobotZombieBear.dead){ if (you.partiallyHealed || you.fullyHealed){ +Motorcycle.on; -Motorcycle.off; "You turn your MOTORCYCLE KEY in the ignition of the MOTORCYCLE and turn it on!"; ""; } else{ "You try to mount the motorcycle but fail. Your wounds are too deep to mount the bike."; "You look at the house and see another ROBOT ZOMBIE BEAR inside."; "You start running."; if (Unlabeled.taken){ "You take a moment to catch your breath. You are having a hard time breathing."; "It is a lot harder to run because of the added weight on your chest...wait, what?!"; "You roll up your shirt to find a plate of metal developing on your chest!"; "IT IS SURROUNDED BY...FUR?! You scream a little. You are turning into a"; "ROBOT ZOMBIE BEAR. You ponder for a minute..."; "..."; "..."; "You actually don't think this is too bad. You feel power surging through your body."; "A new power that makes you feel invincible. You continue to run with a smile."; "You will avenge your fellow human beings with this new power."; } +game.win; } } else{ "Activate what, bro? THERE'S A BEAR IN YOUR WAY!"; } if (Motorcycle.on){ "You drive off into the distance, away from the chaos...away from disaster..."; if (Unlabeled.taken){ "You take a moment to look in one of the sideview mirrors of the motorcyle."; "You scream at the sight of your face: there is an abundance of fur and your teeth are sharp."; "You stop the motorcycle."; "You curl up your clothes and look at your wound; instead of there being skin, there is a giant scrap of metal."; "You assume the sudden rush of adrenaline from the medicine made you not notice these changes."; "Your body is more muscular, more robust. You feel your mind getting overthrown with thoughts of hunger and bloodthirst."; "You feel powerful beyond belief."; "You hop back onto the motorcycle and continue on your way."; "You may be transforming into a ROBOT ZOMBIE BEAR, but for the time being, you want to avenge your"; "fellow human beings with your new ultimate power. You drive off into the distance, growling."; } +game.win; } } (you, e){ if (RobotZombieBear.alive || RobotZombieBear.wounded){ "The ROBOT ZOMBIE BEAR roars and leans its neck back."; "It seems to be preparing to headbutt you."; if (you.injured){ +you.dead; -you.injured; "The bear kills you with its MASSIVE ROBOTIC HEAD. GAME OVER."; //LOSE SCENARIO +game.lose; } if (you.partiallyHealed){ +you.injured; -you.partiallyHealed; "You take a hit. You are almost dead! WATCH OUT!"; } if (you.fullyHealed){ +you.partiallyHealed; -you.fullyHealed; "You take a hit. It's a good thing you fully healed yourself earlier though,"; "but you should probably watch OUT!"; } } else{ "You can't go that way"; } } } //SETS bottles = {bottle1, bottle2, bottle3, bottle4} boxes = {box1, box2, box3} guns = {gun1, gun2, gun3} //I think these are self-explanatory, but these are sets that contain my bottles, boxes, and guns. //OBJECTS object Axe{ state {held, notHeld} } object Ibuprofen{ state {untaken, taken} } object Steroids{ state {untaken, taken} } object Herbs{ state {untaken, taken} } object Unlabeled{ state {untaken, taken} } object Pistol{ state {held, notHeld, notFired, firedOnce, firedTwice} } object Shotgun{ state {held, notHeld, notFired, fired} } object RocketLauncher{ state {held, notHeld, notFired, fired} } object Lock{ state {locked, unlocked} } object RobotZombieBear{ state {dead, alive, wounded} } object PistolAmmo{ state {taken, untaken} } object ShotgunAmmo{ state {taken, untaken} } object Rockets{ state {taken, untaken} } object GenisFigure{ state {taken, untaken} } object RealityMarble{ state {taken, untaken} } object Keys{ state {taken, untaken} } object Motorcycle{ state {on, off} } //Placeholder. object Inventory{ state {empty, notEmpty} } //These are placeholders so that my logic doesn't make the game crash. object Medicine{ state {taken, untaken} } object Gun { state {taken, untaken} } object Ammo { state {taken, untaken} } //START STATE start{ //I initialize all of my states here. +you.injured; +MedicineCabinet.closed; +KitchenCupboard.closed; +GunCase.closed; +Lock.locked; +RobotZombieBear.alive; +Keys.untaken; +Axe.notHeld; +Inventory.empty; +Ibuprofen.untaken; +Steroids.untaken; +Herbs.untaken; +Unlabeled.untaken; +Pistol.notHeld; +Shotgun.notHeld; +RocketLauncher.notHeld; +Pistol.notFired; +Shotgun.notFired; +RocketLauncher.notFired; +PistolAmmo.untaken; +ShotgunAmmo.untaken; +Rockets.untaken; +GenisFigure.untaken; +RealityMarble.untaken; +Medicine.untaken; +Gun.untaken; +Ammo.untaken; +Motorcycle.off; move you from offscreen to Hallway; move bottle1 from offscreen to MedicineCabinet; move bottle2 from offscreen to MedicineCabinet; move bottle3 from offscreen to MedicineCabinet; move bottle4 from offscreen to MedicineCabinet; move box1 from offscreen to KitchenCupboard; move box2 from offscreen to KitchenCupboard; move box3 from offscreen to KitchenCupboard; move gun1 from offscreen to GunCase; move gun2 from offscreen to GunCase; move gun3 from offscreen to GunCase; move PistolAmmo from offscreen to box1; move ShotgunAmmo from offscreen to box2; move Rockets from offscreen to box3; move Ibuprofen from offscreen to bottle1; move Steroids from offscreen to bottle2; move Herbs from offscreen to bottle3; move Unlabeled from offscreen to bottle4; move Pistol from offscreen to gun1; move Shotgun from offscreen to gun2; move RocketLauncher from offscreen to gun3; "WELCOME TO GOLDILOCKS IN THE ROBOT ZOMBIE BEAR APOCALYPSE!"; "==========================================================="; "DO NOT FORGET TO TYPE 'help' AT ANY TIME TO DISPLAY POSSIBLE COMMANDS IN THE GAME"; ""; "You enter a deserted house in a hurry. You are running away from hungry ROBOT ZOMBIE BEARS."; "Your name is GOLDILOCKS, a female blonde-haired young woman."; "You quickly barricade the door with a piece of metal you found on the floor. You are now standing in an empty HALLWAY."; } //INVENTORY //This displays your inventory contents (you, i){ if (Pistol.held){ "You have a pistol. You don't think it's very good, but you hope it lets you survive."; } if (Shotgun.held){ "You have a shotgun. You are pretty confident that this shotgun will get you far."; } if (RocketLauncher.held){ "You have a rocket launcher. It may blow you up, but it's badass so you had to take it."; } if (Axe.held){ "You are carrying an axe. The blood of the dead robot zombie bear is still dripping from it. You try not to vomit."; } if (Keys.taken){ "You have a set of keys in your pocket. You see there's a key for a lock and another mysterious key."; } if (GenisFigure.taken){ "You are carrying a GENIS ACTION FIGURE. It's so awesome."; } if (RealityMarble.taken){ "You are carring the REALITY MARBLE. Its awesome power glows inside your pocket."; } if (Inventory.empty){ "There is nothing in your inventory"; } }