fixed enemy bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
Enemy Name: Henry Pellatt
|
Enemy Name: Henry Pellatt
|
||||||
Description: The owner of the Castle
|
Description: The owner of the Castle
|
||||||
Starting Room: Circle Room
|
Starting Room: Apple Hallway
|
||||||
Damage Given: 25
|
Damage Given: 25
|
||||||
Loot: Crowbar
|
Loot: Crowbar
|
||||||
Enemy Name: Lady Pellatt
|
Enemy Name: Lady Pellatt
|
||||||
|
|||||||
@@ -162,10 +162,12 @@ class Game {
|
|||||||
// Read the Loot
|
// Read the Loot
|
||||||
String loot = enemyScanner.nextLine().split(":")[1].trim();
|
String loot = enemyScanner.nextLine().split(":")[1].trim();
|
||||||
e.setLoot(loot);
|
e.setLoot(loot);
|
||||||
|
masterEnemyMap.put(e, e.getRoom());
|
||||||
}
|
}
|
||||||
}catch(Exception ex) {
|
}catch(Exception ex) {
|
||||||
}
|
}
|
||||||
masterEnemyMap.put(e, e.getRoom());
|
|
||||||
|
|
||||||
enemyScanner.close();
|
enemyScanner.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,11 +297,17 @@ class Game {
|
|||||||
nextRoom.setLocked(false);
|
nextRoom.setLocked(false);
|
||||||
player.removeFromInventory(new Lockpick());
|
player.removeFromInventory(new Lockpick());
|
||||||
System.out.println("After a little bit of picking, a click is heard and the door opens slightly!");
|
System.out.println("After a little bit of picking, a click is heard and the door opens slightly!");
|
||||||
|
if(!nextRoom.getBoarded())
|
||||||
|
break;
|
||||||
}else{
|
}else{
|
||||||
System.out.println("That door is already unlocked!");
|
System.out.println("That door is already unlocked!");
|
||||||
|
if(!nextRoom.getBoarded())
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
System.out.println("There is no door there!");
|
System.out.println("There is no door there!");
|
||||||
|
if(!nextRoom.getBoarded())
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}else if(!command.hasDirection()){
|
}else if(!command.hasDirection()){
|
||||||
System.out.println("In what direction do you want to go in?");
|
System.out.println("In what direction do you want to go in?");
|
||||||
|
|||||||
Reference in New Issue
Block a user