Changed riddler execution
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
Room name: Circle Room
|
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
|
Locked: false
|
||||||
Boarded: false
|
Boarded: false
|
||||||
Items:Lockpick,Milk
|
Items:Lockpick,Milk
|
||||||
|
|||||||
@@ -43,4 +43,5 @@ nibble, eat
|
|||||||
swallow, eat
|
swallow, eat
|
||||||
absorb, eat
|
absorb, eat
|
||||||
drink, eat
|
drink, eat
|
||||||
|
i, inventory
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ take, verb
|
|||||||
open, verb
|
open, verb
|
||||||
unlock, verb
|
unlock, verb
|
||||||
inventory, verb
|
inventory, verb
|
||||||
i, verb
|
|
||||||
die, verb
|
die, verb
|
||||||
drop, verb
|
drop, verb
|
||||||
attack, verb
|
attack, verb
|
||||||
|
|||||||
@@ -385,6 +385,8 @@ class Game {
|
|||||||
if(player.addToInventory(prize)) {
|
if(player.addToInventory(prize)) {
|
||||||
player.addToInventory(prize);
|
player.addToInventory(prize);
|
||||||
System.out.println("A " + prizeName + " has been added to your inventory.");
|
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 {
|
}else {
|
||||||
System.out.println("Sorry, you can't carry any more ");
|
System.out.println("Sorry, you can't carry any more ");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ class Room {
|
|||||||
private String description;
|
private String description;
|
||||||
private HashMap<String, Room> exits; // stores exits of this room.
|
private HashMap<String, Room> exits; // stores exits of this room.
|
||||||
private ArrayList<Item> items;
|
private ArrayList<Item> items;
|
||||||
private Riddler riddler;
|
Riddler riddler; //needs to altered outside of the class so that riddler can be set to null.
|
||||||
private boolean locked;
|
private boolean locked; // Otherwise you can repeatedly solve the riddle and get unlimited items
|
||||||
private boolean boarded;
|
private boolean boarded;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user