From 28a4b723ffa51d7a93e5e4dfe939c909dd0533e1 Mon Sep 17 00:00:00 2001 From: jslightham <31053827+jslightham@users.noreply.github.com> Date: Wed, 29 May 2019 11:42:22 -0400 Subject: [PATCH 1/6] boarded rooms --- data/rooms.dat | 36 ++++++++++++++++++++++++++++++ data/synonyms.dat | 3 ++- src/com/bayviewglen/zork/Game.java | 33 ++++++++++++++++++++++++++- src/com/bayviewglen/zork/Room.java | 7 ++++++ 4 files changed, 77 insertions(+), 2 deletions(-) diff --git a/data/rooms.dat b/data/rooms.dat index 1b5d364..05dc8c3 100644 --- a/data/rooms.dat +++ b/data/rooms.dat @@ -1,6 +1,7 @@ Room name: Circle Room Room Description: You are in a circular room. The windows to the east are covered with boards that let in just enough light to see.
There seems to be some writing on the wall. Locked: false +Boarded: false Items:Lockpick,Milk Riddle: "Who is never hungry during Christmas?", "The turkey because he is always stuffed." Exit Rooms: W-Apple Hallway @@ -8,6 +9,7 @@ Exit Rooms: W-Apple Hallway Room name: Apple Hallway Room Description: You are in an empty hallway. Many closed doors surround you. To the west is the Circle Room and north is the Porcupine Stairs. The door to the stairs is locked. There is no key to the door. Locked: false +Boarded: false Items: Riddle: Exit Rooms: E-Circle Room, N-Porcupine Stairs (3rd Floor) @@ -15,6 +17,7 @@ Exit Rooms: E-Circle Room, N-Porcupine Stairs (3rd Floor) Room name: Porcupine Stairs (3rd Floor) Room Description: You are in the Porcupine Stairs. The stone, cold walls are trapped in darkness. Below you is the second floor and above you is the third floor. Locked: true +Boarded: false Items: Riddle: Exit Rooms: S-Apple Hallway, Down-Porcupine Stairs (2nd Floor) @@ -22,6 +25,7 @@ Exit Rooms: S-Apple Hallway, Down-Porcupine Stairs (2nd Floor) Room name: Porcupine Stairs (2nd Floor) Room Description: You are now on the second floor. The hallway is completely deserted. A few doors are left slightly ajar. Locked: false +Boarded: false Items: Riddle: Exit Rooms: S-Sir Henry Mill Pellatt's Bedroom, W-Bulb Room, E-Pipe Room, Up-Porcupine Stairs (3rd Floor) @@ -29,6 +33,7 @@ Exit Rooms: S-Sir Henry Mill Pellatt's Bedroom, W-Bulb Room, E-Pipe Room, Up-Por Room name: Bulb Room Room Description: You are in the Bulb Room. There is a ragged red rug with a noticeable lump in the middle. One window facing north is bolted shut. Locked: false +Boarded: false Items:Garlic Riddle: Exit Rooms: E-Porcupine Stairs (2nd Floor), W-Lady Pellatt's Bedroom @@ -36,6 +41,7 @@ Exit Rooms: E-Porcupine Stairs (2nd Floor), W-Lady Pellatt's Bedroom Room name: Lady Pellatt's Bedroom Room Description: You are now in Lady Pellatt's Bedroom. A four-post bed with elegant pink bedsheets lies in the middle of the room. A golden wardrobe sits along the east wall with a few robes hanging out. Locked: false +Boarded: false Items:Robes Riddle: Exit Rooms: N-Sitting Area, S-Guest Bedroom, E-Bulb Room @@ -43,6 +49,7 @@ Exit Rooms: N-Sitting Area, S-Guest Bedroom, E-Bulb Room Room name: Sitting Area Room Description: You are in a room with multiple chairs and fake plants. There are several windows, all of which are shut. A few scratches can be noted on the chairs. Locked: false +Boarded: false Items: Riddle: Exit Rooms: S-Lady Pellatt's Bedroom @@ -50,6 +57,7 @@ Exit Rooms: S-Lady Pellatt's Bedroom Room name: Pipe Room Room Description: Welcome to the Pipe Room. A misty smell fills the room. Strange items lay in a pile near the north wall. I suggest you take a look... Locked: false +Boarded: false Items: Riddle: Exit Rooms: W-Porcupine Stairs (2nd Floor), S-Landing, N-East Sitting Room, E-Round Room @@ -57,6 +65,7 @@ Exit Rooms: W-Porcupine Stairs (2nd Floor), S-Landing, N-East Sitting Room, E-Ro Room name: Round Room Room Description: You are now into the Round Room. Nothing is out of the ordinary in here... Locked: false +Boarded: false Items: Riddle: Exit Rooms: W-Pipe Room, N-Elm Bedroom, S-Oak Bedroom @@ -64,6 +73,7 @@ Exit Rooms: W-Pipe Room, N-Elm Bedroom, S-Oak Bedroom Room name: Elm Bedroom Room Description: You are in the Elm Bedroom. The walls are all wooden and a few windows face north. A bed sits in the middle of the room. A few pillows are on the ground. It looks like someone was in here... Locked: false +Boarded: false Items: Water bottle,Pen,Book Riddle: Exit Rooms: S-Round Room, W-East Sitting Room @@ -71,6 +81,7 @@ Exit Rooms: S-Round Room, W-East Sitting Room Room name: East Sitting Room Room Description: Welcome to the East Sitting Room. Boring name but not so boring room. Take a look at the paintings, admire the art. Locked: false +Boarded: false Items:Painting Riddle: Exit Rooms: S-Pipe Room, E-Elm Bedroom @@ -78,6 +89,7 @@ Exit Rooms: S-Pipe Room, E-Elm Bedroom Room name: Oak Bedroom Room Description: You are now in the Oak Bedroom. The walls are covered with pink floral wallpaper and a few socks are strewn about the room. A small four-post bedroom lies in the south-east corner of the room. Locked: false +Boarded: false Items:Socks Riddle: Exit Rooms: N-Round Room, W-Landing @@ -85,6 +97,7 @@ Exit Rooms: N-Round Room, W-Landing Room name: Landing Room Description: You are now outside on the Landing. A cold gust of wind sweeps by. There doesn't seem to be anywhere to go. It is too high to jump, and you don't have a ladder. Locked: false +Boarded: false Items: Riddle: Exit Rooms: W-Sir Henry Mill Pellatt's Bedroom, E-Oak Bedroom @@ -92,6 +105,7 @@ Exit Rooms: W-Sir Henry Mill Pellatt's Bedroom, E-Oak Bedroom Room name: Sir Henry Mill Pellatt's Bedroom Room Description: Welcome to Sir Henry Mill Pellatt's Bedroom. As the master of this castle, Sir Pellatt isn't in this room very often. Only some clothes, a bed, and a desk reside here. Oh, and don't touch his notebook. Locked: false +Boarded: false Items:Notebook Riddle: Exit Rooms: N-Porcupine Stairs (2nd Floor), E-Landing, S-Sir Henry Mill Pellatt's Bathroom, W-Linen Closet @@ -99,6 +113,7 @@ Exit Rooms: N-Porcupine Stairs (2nd Floor), E-Landing, S-Sir Henry Mill Pellatt' Room name: Sir Henry Mill Pellatt's Bathroom Room Description: You are now in Sir Henry Mill Pellatt's Bathroom. The floor mat is still quite wet. Perhaps someone just took a shower. A half-empty shaving cream bottle lies on the counter, along with a toothbrush and some toothpaste. Locked: false +Boarded: false Items:Shaving Cream,Toothbrush,Toothpaste Riddle: Exit Rooms: N-Sir Henry Mill Pellatt's Bathroom @@ -106,6 +121,7 @@ Exit Rooms: N-Sir Henry Mill Pellatt's Bathroom Room name: Linen Closet Room Description: A whiff of lavender-scented laundry detergent enters your nostrils as you step into a dark room. Ah, you must be in the Linen Closet. No one really comes in here other than the servants. I'm pretty sure Sir Pellatt and Lady Pellat don't even know this room exists. Locked: false +Boarded: false Items:Clothes Riddle: Exit Rooms: E-Sir Henry Mill Pellatt's Bedroom, W-Guest Bedroom, S-Willow Bedroom @@ -113,6 +129,7 @@ Exit Rooms: E-Sir Henry Mill Pellatt's Bedroom, W-Guest Bedroom, S-Willow Bedroo Room name: Willow Bedroom Room Description: This is the Willow Bedroom. Pretty ordinary, if you ask me. Say, doesn't this look like the Oak Bedroom? Locked: false +Boarded: false Items: Riddle: Exit Rooms: N-Linen Closet, S-Silver Stairs (2nd Floor), W-Another Sitting Area @@ -120,6 +137,7 @@ Exit Rooms: N-Linen Closet, S-Silver Stairs (2nd Floor), W-Another Sitting Area Room name: Silver Stairs (2nd Floor) Room Description: You are now in the Silver Stairs on the second floor. The bottom of the stairs is blocked by a door. Looks like you need to have something in order to open it. Better find it quick! Locked: true +Boarded: true Items: Riddle: Exit Rooms: Down-Silver Stairs (1st Floor), N-Willow Bedroom, S-Evergreen Bedroom @@ -127,6 +145,7 @@ Exit Rooms: Down-Silver Stairs (1st Floor), N-Willow Bedroom, S-Evergreen Bedroo Room name: Evergreen Bedroom Room Description: Oh look! Another bedroom! How exciting! This one's walls are even green this time. Cool! Locked: false +Boarded: false Items: Riddle: Exit Rooms: N-Silver Stairs (2nd Floor), W-Aspen Bedroom @@ -134,6 +153,7 @@ Exit Rooms: N-Silver Stairs (2nd Floor), W-Aspen Bedroom Room name: Aspen Bedroom Room Description: Jeez, how many bedrooms are there? It doesn't even look like anybody's slept here before. The curtains are blowing though. Could be a draft... Locked: false +Boarded: false Items: Riddle: Exit Rooms: E-Evergreen Bedroom, N-Another Sitting Area @@ -141,6 +161,7 @@ Exit Rooms: E-Evergreen Bedroom, N-Another Sitting Area Room name: Another Sitting Area Room Description: You are now in Another Sitting Area. Yes, that is really its name. Sir Pellatt lacks creativity. This is quite a spectactular room, however. Sitting down for a bit, get comfortable. But not too comfortable, you need to escape. Locked: false +Boarded: false Items: Riddle: Exit Rooms: S-Apsen Bedroom, E-Willow Bedroom @@ -148,6 +169,7 @@ Exit Rooms: S-Apsen Bedroom, E-Willow Bedroom Room name: Guest Bedroom Room Description: Welcome to the guest bedroom, where guests like yourself stay for the night. Except Sir Pellatt has other plans for you... It looks like there's something on the bed. Might be for you. Locked: false +Boarded: false Items: Scroll 2 Riddle: Exit Rooms: E-Linen Closet, S-Another Sitting Area @@ -155,6 +177,7 @@ Exit Rooms: E-Linen Closet, S-Another Sitting Area Room name: Silver Stairs (1st Floor) Room Description: Welcome to the First Floor. You made it this far, don't give up now. Quite a few doors are open down here. Someone even left a few lights on. Could be the servants. Locked: false +Boarded: false Items: Riddle: Exit Rooms: N-Study, S-Food Supply Closet, W-Supply Closet, Up-Silver Stairs (2nd Floor) @@ -162,6 +185,7 @@ Exit Rooms: N-Study, S-Food Supply Closet, W-Supply Closet, Up-Silver Stairs (2n Room name: Food Supply Closet Room Description: You are now in the food supply closet. Its pretty full in here. A fridge filled with dairy such as milk, cheese, and yogurt lies in front of the far wall. Cabinets lining the side walls contain snacks such as chips, granola bars, and chocolate. Go eat something, you must be famished. Locked: false +Boarded: false Items:Milk,Cheese,Yogurt,Chips,Granola Bars,Chocolate Riddle: Exit Rooms: N-Silver Stairs (1st Floor), W-Kitchen @@ -169,6 +193,7 @@ Exit Rooms: N-Silver Stairs (1st Floor), W-Kitchen Room name: Kitchen Room Description: You are in the Kitchen. The stove, toaster, and microwave along the walls are all turned off. A few pots are soaking in the sink. Warm bread rests in the oven. The sweet smell of yeast fills the room. Locked: false +Boarded: false Items:Warm Bread Riddle: Exit Rooms: E-Food Supply Closet, N-Supply Closet @@ -176,6 +201,7 @@ Exit Rooms: E-Food Supply Closet, N-Supply Closet Room name: Supply Closet Room Description: You are in the Supply Closet. A mop, bucket and a few towels lay on the ground. The space is quite small and can only hold around 3 people. Nothing interesting seems to be happening in here. Locked: false +Boarded: false Items:Mop,Bucket,Towels Riddle: Exit Rooms: E-Silver Stairs (1st Floor), S-Kitchen, N-Serving and Breakfast Room @@ -183,6 +209,7 @@ Exit Rooms: E-Silver Stairs (1st Floor), S-Kitchen, N-Serving and Breakfast Room Room name: Serving and Breakfast Room Room Description: You are now in the Serving and Breakfast Room. A small wood table covered in crumbs lies in the corner, surrounded by 4 chairs. On its left lies a counter with a sink and some butter. Around the counter are 5 high chairs. Looks like someone ate breakfast here earlier. Locked: false +Boarded: false Items:Butter Riddle: Exit Rooms: N-Dining Room, E-Study, S- Supply Closet @@ -190,6 +217,7 @@ Exit Rooms: N-Dining Room, E-Study, S- Supply Closet Room name: Dining Room Room Description: Welcome to the Dining Room. The old wood boards squeak below you. An elegant chandelier hangs in the center of the room, although it is turned off. A gigantic long wood table sits in the center of the room with 12 cushioned chairs sitting around it. A cello rests in the corner of the room, along with a small stool and a music stand. Locked: false +Boarded: false Items: Riddle: Exit Rooms: S-Serving and Breakfast Room, E-Library, W-Conservatory @@ -197,6 +225,7 @@ Exit Rooms: S-Serving and Breakfast Room, E-Library, W-Conservatory Room name: Conservatory Room Description: You are now in the Conservatory. The walls and ceilings are all glass, which gives you a gorgeous view of the outdoors. A few potted plants lay directly in the sunlight. It looks like there's a scroll on the ground. Check it out, you're running out of time. Locked: false +Boarded: false Items:Scroll 3 Riddle: Exit Rooms: E-Dining Room @@ -204,6 +233,7 @@ Exit Rooms: E-Dining Room Room name: Library Room Description: You are in the Library. Intricate designs are carved into the tall arced ceiling. Thousands and thousands of books stretch from the floor to the ceiling. A few blue couches with a lantern on a small side table sit in the far northwest corner of the room. An open novel with a dusty leather cover rests on the table. Locked: false +Boarded: false Items:Novel Riddle: Exit Rooms: W-Dining Room, S-Study, E-Great Hall @@ -211,6 +241,7 @@ Exit Rooms: W-Dining Room, S-Study, E-Great Hall Room name: Great Hall Room Description: You are in the Great Hall. This empty room gives off an eerie feeling. On the north wall, there is a fire place that looks like it is about to burn out. I don't think someone is going to light it again. Locked: false +Boarded: false Items: Riddle: Exit Rooms: S-Entry, W-Library, E-Oak Drawing Room @@ -218,6 +249,7 @@ Exit Rooms: S-Entry, W-Library, E-Oak Drawing Room Room name: Oak Drawing Room Room Description: Welcome to the Oak Drawing Room. A large red carpet covers the floor. Giant floor-to-ceiling windows face north, letting in lots of sunlight. A sword is perched on a small table in the center of the room. Interesting choice of decor... Locked: false +Boarded: false Items:Sword Riddle: Exit Rooms: W-Great hall, S-Smoking Room @@ -225,6 +257,7 @@ Exit Rooms: W-Great hall, S-Smoking Room Room name: Smoking Room Room Description: You are now in the Smoking Room. This room is too fancy for its purpose if you ask me. I don't see why the fireplace or deer heads are necessary. A leather couch faces the fireplace, and a fur blanket hangs over it. Locked: false +Boarded: false Items:Blanket Riddle: Exit Rooms: N-Oak Drawing Room, S-Billiard Room, W-Entry @@ -232,6 +265,7 @@ Exit Rooms: N-Oak Drawing Room, S-Billiard Room, W-Entry Room name: Billards Room Room Description: You are in the Billiard Room. The only thing in this room would be the pool table in the center. There aren't any balls or poles around though, so I guess no game today! Locked: false +Boarded: false Items: Riddle: Exit Rooms: N-Smoking Room @@ -239,6 +273,7 @@ Exit Rooms: N-Smoking Room Room name: Entry Room Description: Welcome to the entrance of Casa Loma. This is where you escape! Oh wait, that door is bolted shut. Plus, it doesn't even have a lock! Shucks, how will you get out now??? Locked: true +Boarded: true Items: Riddle: Exit Rooms: E-Smoking Room, N-Great Hall, W-Study @@ -246,6 +281,7 @@ Exit Rooms: E-Smoking Room, N-Great Hall, W-Study Room name: Study Room Description: You are now in the Study. The south wall has a floor-to-ceiling book shelf, towering over you. A big wooden desk, along with a cushioned chair, face the entrance. 2 lit candles illuminate the desk, and a key is visible. Locked: false +Boarded: false Items:Key Riddle: Exit Rooms: N-Library, E-Entry, W-Serving and Breakfast Room \ No newline at end of file diff --git a/data/synonyms.dat b/data/synonyms.dat index 4228c14..b94eebc 100644 --- a/data/synonyms.dat +++ b/data/synonyms.dat @@ -39,4 +39,5 @@ aid, help benefit, help scram, go hightail, go -everything, all \ No newline at end of file +everything, all +drink, eat \ No newline at end of file diff --git a/src/com/bayviewglen/zork/Game.java b/src/com/bayviewglen/zork/Game.java index d208291..470e4ca 100644 --- a/src/com/bayviewglen/zork/Game.java +++ b/src/com/bayviewglen/zork/Game.java @@ -60,6 +60,9 @@ class Game { // Read the locked state boolean locked = Boolean.parseBoolean(roomScanner.nextLine().split(":")[1].replaceAll("
", "\n").trim()); room.setLocked(locked); + // Read the boarded state + boolean boarded = Boolean.parseBoolean(roomScanner.nextLine().split(":")[1].replaceAll("
", "\n").trim()); + room.setBoarded(boarded); // Read the Items String items = roomScanner.nextLine(); try { @@ -276,6 +279,31 @@ class Game { System.out.println("In what direction do you want to go in?"); }else { System.out.println("What do you want to open the door with?"); + } + boolean hasCrowbar = false; + for(int i =0; i items; private Riddle riddle; private boolean locked; + private boolean boarded; /** * Create a room described "description". Initially, it has no exits. @@ -49,10 +50,16 @@ class Room { public void setLocked(boolean b) { locked = b; } + public void setBoarded(boolean b) { + boarded = b; + } public boolean getLocked() { return locked; } + public boolean getBoarded() { + return boarded; + } public void setExit(char direction, Room r) throws Exception { String dir = ""; From f55e19a76fe5e95779f4bf285a287a0756cae1a9 Mon Sep 17 00:00:00 2001 From: Johnathon Slightham <31053827+jslightham@users.noreply.github.com> Date: Wed, 29 May 2019 12:57:42 -0400 Subject: [PATCH 2/6] fix conflicts --- data/rooms.dat | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/data/rooms.dat b/data/rooms.dat index 3cef446..dd7a511 100644 --- a/data/rooms.dat +++ b/data/rooms.dat @@ -3,7 +3,7 @@ Room Description: You are in a circular room. The windows to the east are covere Locked: false Boarded: false Items:Lockpick,Milk -Riddle: "Who is never hungry during Christmas?", "The turkey because he is always stuffed." +Riddle: "Who is never hungry during Christmas?", "The turkey because he is always stuffed." Exit Rooms: W-Apple Hallway Room name: Apple Hallway @@ -169,14 +169,9 @@ Exit Rooms: S-Apsen Bedroom, E-Willow Bedroom Room name: Guest Bedroom Room Description: Welcome to the guest bedroom, where guests like yourself stay for the night. Except Sir Pellatt has other plans for you... There is faint writing on the west wall. Might want to take a look... Locked: false -<<<<<<< HEAD Boarded: false Items: Scroll 2 -Riddle: -======= -Items: Riddle: "What letter comes next in this sequence: o,t,t,f,f?", "s" ->>>>>>> 8e73e9e0244c32a530f67daa085e1b453b1eca7d Exit Rooms: E-Linen Closet, S-Another Sitting Area Room name: Silver Stairs (1st Floor) @@ -289,4 +284,4 @@ Locked: false Boarded: false Items:Key Riddle: -Exit Rooms: N-Library, E-Entry, W-Serving and Breakfast Room \ No newline at end of file +Exit Rooms: N-Library, E-Entry, W-Serving and Breakfast Room From 4c54b3aa501b637182ec869ff0359a240e15c83a Mon Sep 17 00:00:00 2001 From: jslightham <31053827+jslightham@users.noreply.github.com> Date: Wed, 29 May 2019 12:59:39 -0400 Subject: [PATCH 3/6] fix conflicts --- data/rooms.dat | 5 ----- 1 file changed, 5 deletions(-) diff --git a/data/rooms.dat b/data/rooms.dat index 3cef446..d7087aa 100644 --- a/data/rooms.dat +++ b/data/rooms.dat @@ -169,14 +169,9 @@ Exit Rooms: S-Apsen Bedroom, E-Willow Bedroom Room name: Guest Bedroom Room Description: Welcome to the guest bedroom, where guests like yourself stay for the night. Except Sir Pellatt has other plans for you... There is faint writing on the west wall. Might want to take a look... Locked: false -<<<<<<< HEAD Boarded: false Items: Scroll 2 -Riddle: -======= -Items: Riddle: "What letter comes next in this sequence: o,t,t,f,f?", "s" ->>>>>>> 8e73e9e0244c32a530f67daa085e1b453b1eca7d Exit Rooms: E-Linen Closet, S-Another Sitting Area Room name: Silver Stairs (1st Floor) From b7058c3beb42b2dd3faa5774dac09c005c78b63d Mon Sep 17 00:00:00 2001 From: jslightham <31053827+jslightham@users.noreply.github.com> Date: Wed, 29 May 2019 12:59:54 -0400 Subject: [PATCH 4/6] Update rooms.dat --- data/rooms.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/rooms.dat b/data/rooms.dat index dd7a511..d7087aa 100644 --- a/data/rooms.dat +++ b/data/rooms.dat @@ -3,7 +3,7 @@ Room Description: You are in a circular room. The windows to the east are covere Locked: false Boarded: false Items:Lockpick,Milk -Riddle: "Who is never hungry during Christmas?", "The turkey because he is always stuffed." +Riddle: "Who is never hungry during Christmas?", "The turkey because he is always stuffed." Exit Rooms: W-Apple Hallway Room name: Apple Hallway @@ -284,4 +284,4 @@ Locked: false Boarded: false Items:Key Riddle: -Exit Rooms: N-Library, E-Entry, W-Serving and Breakfast Room +Exit Rooms: N-Library, E-Entry, W-Serving and Breakfast Room \ No newline at end of file From 8aff29156b1cbab22df05132e83baaca328258b0 Mon Sep 17 00:00:00 2001 From: elacey Date: Wed, 29 May 2019 13:13:28 -0400 Subject: [PATCH 5/6] Updated item weights --- src/com/bayviewglen/zork/Items/Base.java | 2 +- src/com/bayviewglen/zork/Items/Cylinder.java | 2 +- src/com/bayviewglen/zork/Items/Point.java | 2 +- src/com/bayviewglen/zork/Items/Sword.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/bayviewglen/zork/Items/Base.java b/src/com/bayviewglen/zork/Items/Base.java index 1b6dcdb..7895453 100644 --- a/src/com/bayviewglen/zork/Items/Base.java +++ b/src/com/bayviewglen/zork/Items/Base.java @@ -3,7 +3,7 @@ package com.bayviewglen.zork.Items; public class Base extends Item{ public Base(){ - super(5, "Base", "A base for an ancient battering ram", false, 100, 1); + super(5, "Base", "A base for an ancient battering ram", false, 100, 30); } } diff --git a/src/com/bayviewglen/zork/Items/Cylinder.java b/src/com/bayviewglen/zork/Items/Cylinder.java index d45ba50..7803aa2 100644 --- a/src/com/bayviewglen/zork/Items/Cylinder.java +++ b/src/com/bayviewglen/zork/Items/Cylinder.java @@ -2,7 +2,7 @@ package com.bayviewglen.zork.Items; public class Cylinder extends Item{ public Cylinder(){ - super(6, "Cylinder", "A part of a battering ram meant to lay on the base and have a point attatched to the end", false, 100, 1); + super(6, "Cylinder", "A part of a battering ram meant to lay on the base and have a point attatched to the end", false, 100, 30); } } diff --git a/src/com/bayviewglen/zork/Items/Point.java b/src/com/bayviewglen/zork/Items/Point.java index 7e87b26..73d50d4 100644 --- a/src/com/bayviewglen/zork/Items/Point.java +++ b/src/com/bayviewglen/zork/Items/Point.java @@ -2,7 +2,7 @@ package com.bayviewglen.zork.Items; public class Point extends Item{ public Point() { - super(7, "Point", "A part of the battering ram that is attatched to the cylinder and smashes the door", false, 100, 1); + super(7, "Point", "A part of the battering ram that is attatched to the cylinder and smashes the door", false, 100, 30); } } diff --git a/src/com/bayviewglen/zork/Items/Sword.java b/src/com/bayviewglen/zork/Items/Sword.java index abbcf05..e1fefb3 100644 --- a/src/com/bayviewglen/zork/Items/Sword.java +++ b/src/com/bayviewglen/zork/Items/Sword.java @@ -2,7 +2,7 @@ package com.bayviewglen.zork.Items; public class Sword extends Item{ public Sword(){ - super(33, "Sword", "A steel, double-edged sword which seems to have been sharpened recently", 20, 20); + super(33, "Sword", "A steel, double-edged sword which seems to have been sharpened recently", 50, 30); } } From 81c8b92f1eee5803e240176610a5f3372b66be75 Mon Sep 17 00:00:00 2001 From: elacey Date: Wed, 29 May 2019 13:24:48 -0400 Subject: [PATCH 6/6] New items and classes added --- data/words.dat | 5 ++++- src/com/bayviewglen/zork/Items/Clock.java | 9 +++++++++ src/com/bayviewglen/zork/Items/Keyboard.java | 9 +++++++++ src/com/bayviewglen/zork/Items/Lightbulb.java | 9 +++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/com/bayviewglen/zork/Items/Clock.java create mode 100644 src/com/bayviewglen/zork/Items/Keyboard.java create mode 100644 src/com/bayviewglen/zork/Items/Lightbulb.java diff --git a/data/words.dat b/data/words.dat index 16ceeac..6345e32 100644 --- a/data/words.dat +++ b/data/words.dat @@ -58,4 +58,7 @@ i, verb unlock, verb drop, verb henrypellatt, enemy -attack, verb \ No newline at end of file +attack, verb +clock, item +keyboard, item +lightbulb, item \ No newline at end of file diff --git a/src/com/bayviewglen/zork/Items/Clock.java b/src/com/bayviewglen/zork/Items/Clock.java new file mode 100644 index 0000000..0d229a2 --- /dev/null +++ b/src/com/bayviewglen/zork/Items/Clock.java @@ -0,0 +1,9 @@ +package com.bayviewglen.zork.Items; + +public class Clock extends Item{ + + public Clock() { + super(34, "Clock", "An antique clock that is no longer working is propped up against the wall", false, 20, 10); + } + +} diff --git a/src/com/bayviewglen/zork/Items/Keyboard.java b/src/com/bayviewglen/zork/Items/Keyboard.java new file mode 100644 index 0000000..979e908 --- /dev/null +++ b/src/com/bayviewglen/zork/Items/Keyboard.java @@ -0,0 +1,9 @@ +package com.bayviewglen.zork.Items; + +public class Keyboard extends Item{ + + public Keyboard() { + super(36, "Keyboard", "An unplugged keyboard for a desktop computer is neatly placed by a wall", false, 20, 10); + } + +} diff --git a/src/com/bayviewglen/zork/Items/Lightbulb.java b/src/com/bayviewglen/zork/Items/Lightbulb.java new file mode 100644 index 0000000..cb5c058 --- /dev/null +++ b/src/com/bayviewglen/zork/Items/Lightbulb.java @@ -0,0 +1,9 @@ +package com.bayviewglen.zork.Items; + +public class Lightbulb extends Item{ + + public Lightbulb() { + super(35, "Lightbulb", "An incandescent light bulb rolls around on the floor", false, 20, 5); + } + +}