made changing descriptions and added a spicy new riddle
This commit is contained in:
@@ -4,7 +4,7 @@ New Room Description: You are in a circular room. The windows to the east are c
|
|||||||
Locked: false
|
Locked: false
|
||||||
Boarded: false
|
Boarded: false
|
||||||
Items: Lightbulb, Candlestick
|
Items: Lightbulb, Candlestick
|
||||||
Riddler: "Hello there. My name is Kevin and I am Sir Pellatt's butler. I understand that my master<comma><br>Sir Pellatt has wrongfully imprisoned you. If you answer my riddle<comma> I can give you something to<br>help you with your escape - nothing comes for free you know!", "What goes moo?", "Cows", Lockpick
|
Riddler: "Hello there. My name is Kevin and I am Sir Pellatt's butler. I understand that my master<comma><br>Sir Pellatt has wrongfully imprisoned you. If you answer my riddle<comma> I can give you something to<br>help you with your escape - nothing comes for free you know!", "What has a head<comma> a tail<comma> is brown<comma> and has no legs?", "A penny", Lockpick
|
||||||
Exit Rooms: W-Apple Hallway
|
Exit Rooms: W-Apple Hallway
|
||||||
|
|
||||||
Room name: Apple Hallway
|
Room name: Apple Hallway
|
||||||
@@ -189,7 +189,7 @@ Exit Rooms: S-Aspen Bedroom, E-Willow Bedroom
|
|||||||
|
|
||||||
Room name: 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<br>man in the corner. He seems to have something he would like to tell you.
|
Room Description: Welcome to the guest bedroom, where guests like yourself stay for the night. There is another tailored<br>man in the corner. He seems to have something he would like to tell you.
|
||||||
New Room Description:
|
New Room Description: Welcome to the guest bedroom, where guests like yourself stay for the night.
|
||||||
Locked: false
|
Locked: false
|
||||||
Boarded: false
|
Boarded: false
|
||||||
Items:
|
Items:
|
||||||
@@ -251,8 +251,8 @@ Riddler:
|
|||||||
Exit Rooms: S-Breakfast Room, E-Library, W-Conservatory
|
Exit Rooms: S-Breakfast Room, E-Library, W-Conservatory
|
||||||
|
|
||||||
Room name: Conservatory
|
Room name: Conservatory
|
||||||
Room Description: You are now in the Conservatory. The walls and ceilings are all glass, which gives you a gorgeous view of the outdoors.<br>A few potted plants lay directly in the sunlight. There is a tailored woman standing in the corner of the room.
|
Room Description: You are now in the Conservatory. The walls and ceilings are all glass, which gives you a gorgeous view of the outdoors.<br>A few potted plants lay directly in the sunlight. There is a woman in a tailored pantsuit standing in the corner of the room.
|
||||||
New Room Description:
|
New Room Description: You are now in the Conservatory. The walls and ceilings are all glass, which gives you a gorgeous view of the outdoors.<br>A few potted plants lay directly in the sunlight.
|
||||||
Locked: false
|
Locked: false
|
||||||
Boarded: false
|
Boarded: false
|
||||||
Items:
|
Items:
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class Game {
|
|||||||
room.setDescription(roomDescription.split(": ")[1].replaceAll("<br>", "\n").trim());
|
room.setDescription(roomDescription.split(": ")[1].replaceAll("<br>", "\n").trim());
|
||||||
//Read room description after riddler is removed.
|
//Read room description after riddler is removed.
|
||||||
String newRoomDescription = roomScanner.nextLine();
|
String newRoomDescription = roomScanner.nextLine();
|
||||||
room.setNewRoomDescription(newRoomDescription.split(": ")[1].replaceAll("<br>", "\n").trim());
|
room.setNewRoomDescription(newRoomDescription.substring(newRoomDescription.indexOf(":") + 1,newRoomDescription.length()).replaceAll("<br>", "\n").trim());
|
||||||
// Read the locked state
|
// Read the locked state
|
||||||
boolean locked = Boolean.parseBoolean(roomScanner.nextLine().split(": ")[1].replaceAll("<br>", "\n").trim());
|
boolean locked = Boolean.parseBoolean(roomScanner.nextLine().split(": ")[1].replaceAll("<br>", "\n").trim());
|
||||||
room.setLocked(locked);
|
room.setLocked(locked);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import com.bayviewglen.zork.Items.*;
|
|||||||
class Room {
|
class Room {
|
||||||
private String roomName;
|
private String roomName;
|
||||||
private String description;
|
private String description;
|
||||||
private String newRoomDescription;
|
private String newDescription;
|
||||||
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; //needs to altered outside of the class so that riddler can be set to null.
|
private Riddler riddler; //needs to altered outside of the class so that riddler can be set to null.
|
||||||
@@ -254,6 +254,7 @@ class Room {
|
|||||||
|
|
||||||
public void removeRiddler() {
|
public void removeRiddler() {
|
||||||
riddler = null;
|
riddler = null;
|
||||||
|
this.description = newDescription;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,7 +267,7 @@ class Room {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setNewRoomDescription(String newRoomDesc) {
|
public void setNewRoomDescription(String newRoomDesc) {
|
||||||
this.newRoomDescription = newRoomDesc;
|
this.newDescription = newRoomDesc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user