Changed riddler execution
This commit is contained in:
@@ -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<br>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<br>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
|
||||
|
||||
@@ -43,4 +43,5 @@ nibble, eat
|
||||
swallow, eat
|
||||
absorb, eat
|
||||
drink, eat
|
||||
i, inventory
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ take, verb
|
||||
open, verb
|
||||
unlock, verb
|
||||
inventory, verb
|
||||
i, verb
|
||||
die, verb
|
||||
drop, verb
|
||||
attack, verb
|
||||
|
||||
@@ -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 ");
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ class Room {
|
||||
private String description;
|
||||
private HashMap<String, Room> exits; // stores exits of this room.
|
||||
private ArrayList<Item> 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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user