diff --git a/ZorkUML1.jpg b/ZorkUML1.jpg new file mode 100644 index 0000000..6194ec8 Binary files /dev/null and b/ZorkUML1.jpg differ diff --git a/data/enemies.dat b/data/enemies.dat index 1390ea3..8bb8a66 100644 --- a/data/enemies.dat +++ b/data/enemies.dat @@ -7,4 +7,9 @@ Enemy Name: Lady Pellatt Description: The wife to the owner of the Castle Starting Room: Lady Pellatt's Bedroom Damage Given: 25 -Loot: Crowbar \ No newline at end of file +Loot: Crowbar +Enemy Name: DesLauriers The Dog +Description: The cookie monster +Starting Room: Kitchen +Damage Given: 30 +Loot: Base \ No newline at end of file diff --git a/data/rooms.dat b/data/rooms.dat index 8829ab6..f0e9b95 100644 --- a/data/rooms.dat +++ b/data/rooms.dat @@ -4,7 +4,7 @@ New Room Description: You are in a circular room. The windows to the east are c Locked: false Boarded: false Items: Lightbulb, Candlestick -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 has a head a tail is brown and has no legs?", "A penny", Lockpick +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 has a head a tail is brown and has no legs?", "penny", Lockpick Exit Rooms: W-Apple Hallway Room name: Apple Hallway @@ -48,7 +48,7 @@ Room Description: You are now in Lady Pellatt's Bedroom. A four-poster bed with New Room Description: Locked: false Boarded: false -Items:Robes +Items: Robes Riddler: Exit Rooms: N-Sitting Area, S-Guest Bedroom, E-Bulb Room @@ -185,7 +185,7 @@ Locked: false Boarded: false Items: Riddler: -Exit Rooms: S-Aspen Bedroom, E-Willow Bedroom +Exit Rooms: S-Aspen Bedroom, E-Willow Bedroom, N-Guest Bedroom Room name: Guest Bedroom Room Description: Welcome to the guest bedroom, where guests like yourself stay for the night. There is another tailored
man in the corner. He seems to have something he would like to tell you. @@ -228,7 +228,7 @@ Room Description: You are in the Supply Closet. A mop, bucket and a few towels l New Room Description: Locked: false Boarded: false -Items:Mop,Bucket,Towels,Robes +Items: Mop, Bucket, Towels, Robes Riddler: Exit Rooms: E-Silver Stairs (1st Floor), S-Kitchen, N-Breakfast Room @@ -237,7 +237,7 @@ Room Description: You are now in the Breakfast Room. A small wood table covered New Room Description: Locked: false Boarded: false -Items:Butter +Items: Butter Riddler: Exit Rooms: N-Dining Room, E-Study, S-Supply Closet @@ -256,7 +256,7 @@ New Room Description: You are now in the Conservatory. The walls and ceilings ar 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?", "A tombstone", Point +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", Cylinder Exit Rooms: E-Dining Room Room name: Library @@ -264,7 +264,7 @@ Room Description: You are in the Library. Intricate designs are carved into the New Room Description: Locked: false Boarded: false -Items:Novel +Items: Novel Riddler: Exit Rooms: W-Dining Room, S-Study, E-Great Hall @@ -282,7 +282,7 @@ Room Description: Welcome to the Oak Drawing Room. A large red carpet covers the New Room Description: Locked: false Boarded: false -Items:Sword +Items: Sword Riddler: Exit Rooms: W-Great hall, S-Smoking Room @@ -291,7 +291,7 @@ Room Description: You are now in the Smoking Room. This room is too fancy for it New Room Description: Locked: false Boarded: false -Items:Blanket +Items: Blanket Riddler: Exit Rooms: N-Oak Drawing Room, S-Billiard Room, W-Entry @@ -318,6 +318,6 @@ Room Description: You are now in the Study. The south wall has a floor-to-ceilin New Room Description: Locked: false Boarded: false -Items:Key +Items: Key Riddler: Exit Rooms: N-Library, E-Entry, W-Breakfast Room \ No newline at end of file diff --git a/data/synonyms.dat b/data/synonyms.dat index 5080bf6..fdf0f34 100644 --- a/data/synonyms.dat +++ b/data/synonyms.dat @@ -58,4 +58,6 @@ cream, shavingcream water, waterbottle bottle, waterbottle bread, warmbread -ram, batteringram \ No newline at end of file +ram, batteringram +deslauriers, deslauriersthedog +dog, deslauriersthedog \ No newline at end of file diff --git a/data/words.dat b/data/words.dat index 2ac7920..63ae7a0 100644 --- a/data/words.dat +++ b/data/words.dat @@ -73,4 +73,5 @@ craft, verb batteringram, item ladypellatt, enemy use, verb -bandage, item \ No newline at end of file +bandage, item +deslauriersthedog, enemy \ No newline at end of file diff --git a/src/com/bayviewglen/zork/Combat.java b/src/com/bayviewglen/zork/Combat.java index ee0feaf..a439ef9 100644 --- a/src/com/bayviewglen/zork/Combat.java +++ b/src/com/bayviewglen/zork/Combat.java @@ -40,7 +40,7 @@ public class Combat { enemy.setHealth(enemy.getHealth()-object.getDamage()*1.5); if(enemy.getHealth() < 0) enemy.setHealth(0); - System.out.println("You hit " + enemy.getName() + " with a critical hit, doing " + object.getDamage()*1.5 + " damage! His health is now " + enemy.getHealth() + "%"); + System.out.println("You hit " + enemy.getName() + " with a critical hit, doing " + object.getDamage()*1.5 + " damage! " + enemy.getName() + "'s health is now " + enemy.getHealth() + "%"); } else { enemy.setHealth(enemy.getHealth()-object.getDamage()); diff --git a/src/com/bayviewglen/zork/Game.java b/src/com/bayviewglen/zork/Game.java index 7f677ac..611ac3e 100644 --- a/src/com/bayviewglen/zork/Game.java +++ b/src/com/bayviewglen/zork/Game.java @@ -456,7 +456,7 @@ class Game { System.out.println(message + "\n\nHere's my riddle: " + riddle); System.out.print("Enter your guess here: "); String guess = rScanner.nextLine(); - if (guess.toLowerCase().equals(answer.toLowerCase())) { + if (guess.toLowerCase().indexOf(answer.toLowerCase()) >= 0) { Item prize = currentRoom.getRiddler().getPrize(); String prizeName = prize.getName(); System.out.println("Congratulations! You solved my riddle! As your reward, you get a " + prizeName + "!"); @@ -465,7 +465,7 @@ class Game { System.out.println("I've got to go find Mr. Pellatt now. Good luck with your escape!"); currentRoom.removeRiddler(); } else { - System.out.println("Sorry, you can't carry any more, but a " + prize + " has been added to your room."); + System.out.println("Sorry, you can't carry any more, but a " + prize.getName() + " has been added to your room."); currentRoom.addItem(prize); System.out.println("I've got to go find Mr. Pellatt now. Good luck with your escape!"); currentRoom.removeRiddler();