diff --git a/data/rooms.dat b/data/rooms.dat index ce119d5..fdac6dc 100644 --- a/data/rooms.dat +++ b/data/rooms.dat @@ -1,5 +1,5 @@ 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. +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:Lockpick,Milk diff --git a/data/synonyms.dat b/data/synonyms.dat index e35d04e..6ee72c1 100644 --- a/data/synonyms.dat +++ b/data/synonyms.dat @@ -43,4 +43,5 @@ nibble, eat swallow, eat absorb, eat drink, eat +i, inventory diff --git a/data/words.dat b/data/words.dat index e90ed99..06b83bf 100644 --- a/data/words.dat +++ b/data/words.dat @@ -10,7 +10,6 @@ take, verb open, verb unlock, verb inventory, verb -i, verb die, verb drop, verb attack, verb diff --git a/src/com/bayviewglen/zork/Game.java b/src/com/bayviewglen/zork/Game.java index 63d38c6..7ac4744 100644 --- a/src/com/bayviewglen/zork/Game.java +++ b/src/com/bayviewglen/zork/Game.java @@ -385,6 +385,8 @@ class Game { if(player.addToInventory(prize)) { player.addToInventory(prize); System.out.println("A " + prizeName + " has been added to your inventory."); + currentRoom.riddler = null; + System.out.println("I've got to go find Mr. Pellatt now. Good luck with your escape!"); }else { System.out.println("Sorry, you can't carry any more "); } diff --git a/src/com/bayviewglen/zork/Room.java b/src/com/bayviewglen/zork/Room.java index 961cb17..97a6866 100644 --- a/src/com/bayviewglen/zork/Room.java +++ b/src/com/bayviewglen/zork/Room.java @@ -27,8 +27,8 @@ class Room { private String description; private HashMap exits; // stores exits of this room. private ArrayList items; - private Riddler riddler; - private boolean locked; + Riddler riddler; //needs to altered outside of the class so that riddler can be set to null. + private boolean locked; // Otherwise you can repeatedly solve the riddle and get unlimited items private boolean boarded; /**