diff --git a/data/rooms.dat b/data/rooms.dat
index 9358922..59555c3 100644
--- a/data/rooms.dat
+++ b/data/rooms.dat
@@ -2,7 +2,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. You spot a man in a tailored suit moving some crates around.
Locked: false
Boarded: false
-Items: Lightbulb, Candlestick
+Items: Lightbulb, Candlestick, Notebook
Riddler: "Hello there. My name is Kevin and I am Sir Pellatt's butler. I understand that my master
Sir Pellatt has wrongfully imprisoned you. If you answer my riddle I can give you something to
help you with your escape - nothing comes for free you know!", "What goes moo?", "Cows", Lockpick
Exit Rooms: W-Apple Hallway
@@ -15,7 +15,7 @@ Riddler:
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.
The stairs in front of you lead to the second floor.
+Room Description: You are in the Porcupine Stairs. The stone and wood walls are trapped in darkness.
The stairs in front of you lead to the second floor.
Locked: true
Boarded: false
Items:
@@ -31,7 +31,7 @@ Riddler:
Exit Rooms: S-Sir Henry Mill Pellatt's Bedroom, W-Bulb Room, E-Pipe Room, Up-Porcupine Stairs (3rd Floor)
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.
+Room Description: You are in the Bulb Room. There is a ragged red rug with a noticeable lump in the middle.
After pulling up the rug, a bulb of garlic is found! There is one window facing north, but it is bolted shut.
Locked: false
Boarded: false
Items: Garlic
@@ -39,7 +39,7 @@ Riddler:
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.
+Room Description: You are now in Lady Pellatt's Bedroom. A four-poster bed with elegant pink bedsheets lies in the
middle of the room. A wardrobe with intricate gold imbibings sits along the east wall with a few robes hanging out.
Locked: false
Boarded: false
Items:Robes
@@ -47,7 +47,7 @@ Riddler:
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.
+Room Description: You are in a room with multiple Victorian-style chairs and a few fake ferns. There are several windows, all of which
are shut. The chairs seem to be quite scratched.
Locked: false
Boarded: false
Items:
@@ -55,7 +55,7 @@ Riddler:
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...
+Room Description: Welcome to the Pipe Room. Pipes lines the walls, and a misty smell of hydraulics fills your nostrils. Strange items
lay in a pile near the north wall.
Locked: false
Boarded: false
Items: Clock, Lightbulb, Keyboard
@@ -63,15 +63,15 @@ Riddler:
Exit Rooms: W-Porcupine Stairs (2nd Floor), S-Landing, N-East Sitting Room, E-Round Room
Room name: Round Room
-Room Description: You are now in the Round Room. Nothing is out of the ordinary in here...
+Room Description: You are now in the Round Room. Daffodil-yellow victorian chairs sit around a simple, round, wooden table. An elegant
mirror hangs over the fireplace.
Locked: false
Boarded: false
-Items:
+Items: Chocolate
Riddler:
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...
+Room Description: You are in the Elm Bedroom. The walls are all wooden and a few windows face north.
A bed with evergreen sheets 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: Pen, Book
@@ -79,7 +79,7 @@ Riddler:
Exit Rooms: S-Round Room, W-East Sitting Room
Room name: East Sitting Room
-Room Description: Welcome to the East Sitting Room. Boring name for a not-so-boring room.
Take a look at the paintings, admire the art.
+Room Description: Welcome to the East Sitting Room. Boring name for a not-so-boring room.
Take a look at the paintings, admire the art. Some of these works must be worth thousands!
Locked: false
Boarded: false
Items: Painting
@@ -87,7 +87,7 @@ Riddler:
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.
+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-poster bed with snow-white sheets lies in the south-east corner.
Locked: false
Boarded: false
Items: Socks
@@ -95,7 +95,7 @@ Riddler:
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.
+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. You spy the courtyard entrance beneath you, with an elegant
fountain spraying water high into the air. It is too high to jump, and you don't have a ladder.
Locked: false
Boarded: false
Items:
@@ -227,7 +227,7 @@ Room Description: You are now in the Conservatory. The walls and ceilings are al
Locked: false
Boarded: false
Items:
-Riddler: "Hey I'm Karen. Kevin is on his break but he told me to give you this riddle:
Marking mortal privation when firmly in place. An enduring summation inscribed in my face. What am I?", "tombstone"
+Riddler: "Hey I'm Karen. Kevin is on his break but he told me to give you this riddle", "Marking mortal privation when firmly in place. An enduring summation inscribed in my face. What am I?", "A tombstone", Point
Exit Rooms: E-Dining Room
Room name: Library
diff --git a/data/synonyms.dat b/data/synonyms.dat
index a6fe87d..5080bf6 100644
--- a/data/synonyms.dat
+++ b/data/synonyms.dat
@@ -12,6 +12,9 @@ benefit, help
man, riddler
butler, riddler
kevin, riddler
+karen, riddler
+lady, riddler
+woman, riddler
helper, riddler
leave, quit
move, go
@@ -24,6 +27,9 @@ peek, look
gander, look
grab, take
suicide, die
+put down, drop
+place, drop
+throw, drop
dive, jump
fall, jump
rise, jump
diff --git a/data/words.dat b/data/words.dat
index 08032e7..09b967b 100644
--- a/data/words.dat
+++ b/data/words.dat
@@ -13,6 +13,9 @@ inventory, verb
die, verb
drop, verb
attack, verb
+scream, verb
+read, verb
+play, verb
north, direction
south, direction
west, direction
@@ -27,6 +30,7 @@ d, direction
u, direction
candlestick, item
lockpick, item
+notebook, item
key, item
crowbar, item
base, item
diff --git a/src/com/bayviewglen/zork/Game.java b/src/com/bayviewglen/zork/Game.java
index c1a6329..165eac2 100644
--- a/src/com/bayviewglen/zork/Game.java
+++ b/src/com/bayviewglen/zork/Game.java
@@ -222,10 +222,6 @@ class Game {
System.out.print(currentRoom.longDescription());
System.out.println(currentRoom.itemString());
System.out.println(currentRoom.exitString());
- player.addToInventory(new Lockpick());
- player.addToInventory(new Key());
- player.addToInventory(new Crowbar());
- player.addToInventory(new Batteringram());
boolean finished = false;
while (!finished) {
if (currentCombat != null) {
@@ -296,7 +292,7 @@ class Game {
}
if(hasKey) {
player.removeFromInventory(new Key());
- System.out.println("With great force, you turn the key in the keyhole and the door unclocks! However, the key broke in the keyhole.");
+ System.out.println("With great force, you turn the key in the keyhole and the door unlocks! However, the key breaks in the keyhole and is now unusable.");
}
if(!nextRoom.getBoarded())
break;
@@ -449,6 +445,24 @@ class Game {
case "scream":
System.out.println("Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhhhhhhhhhhhhhhhhh!");
break;
+ case "read":
+ if(currentRoom.containsNotebook()) {
+ for(Item i : currentRoom.getItems()) {
+ if(i.equals(new Notebook())) {
+ System.out.println("In elegant cursive, the page reads:\n" + ((Notebook)i).getHint());
+ }
+ }
+
+ }else if(player.getInventory().contains(new Notebook())) {
+ for(Item i : player.getInventory()) {
+ if(i.equals(new Notebook())) {
+ System.out.println("In elegant cursive, the page reads:\n" + ((Notebook)i).getHint());
+ }
+ }
+ }else {
+ System.out.println("Read what?");
+ }
+ break;
case "take":
boolean hasAll = false;
for (String a : command.getOtherWords()) {
diff --git a/src/com/bayviewglen/zork/Items/Notebook.java b/src/com/bayviewglen/zork/Items/Notebook.java
index 3088060..6e40cc7 100644
--- a/src/com/bayviewglen/zork/Items/Notebook.java
+++ b/src/com/bayviewglen/zork/Items/Notebook.java
@@ -1,8 +1,13 @@
package com.bayviewglen.zork.Items;
public class Notebook extends Item{
+ private String hint;
public Notebook(){
super(15, "Notebook", "A book filled with diagrams and descriptions, belonging to Henry Pellatt", false, 50, 1);
+ hint = "Fire escape plan for Casa Loma:\n1. Acquire key to front door\n2. Make battering ram from point, cylinder, and base\n3. Use both to force front door open.\n4. P.S. Don't forget Shaving Cream!";
+ }
+ public String getHint() {
+ return hint;
}
}
diff --git a/src/com/bayviewglen/zork/Room.java b/src/com/bayviewglen/zork/Room.java
index 329be96..b206989 100644
--- a/src/com/bayviewglen/zork/Room.java
+++ b/src/com/bayviewglen/zork/Room.java
@@ -255,5 +255,13 @@ class Room {
riddler = null;
}
+
+ public boolean containsNotebook() {
+ for(Item i : this.getItems()) {
+ if(i.equals(new Notebook()))
+ return true;
+ }
+ return false;
+ }
}