Fixed the problem where shipwarfare didn't run after Travel

This commit is contained in:
2019-03-11 19:40:13 -06:00
parent 29e0f3e683
commit 4efe650091

View File

@@ -204,14 +204,14 @@ public class TravelGUI{
try { try {
//Makes sure you can't travel to your own location. //Makes sure you can't travel to your own location.
if (response != player.getLocation() && response > 0 && 8 > response && event.getCode().equals(KeyCode.ENTER)||event.getCode().equals(KeyCode.Z)){ if (response != player.getLocation() && response > 0 && 8 > response && event.getCode().equals(KeyCode.ENTER)||event.getCode().equals(KeyCode.Z)){
System.out.println("a");
hasTraveled = seaAtlas(response); hasTraveled = seaAtlas(response);
randomEventSea(response,stage); randomEventSea(response,stage);
player.setBank((int) (player.getBank() * 1.01)); player.setBank((int) (player.getBank() * 1.01));
player.setDebt((int) (player.getDebt() * 1.01)); player.setDebt((int) (player.getDebt() * 1.01));
player.setIsPriceChanged(2); player.setIsPriceChanged(2);
shopScene = false; //shopScene = false;
stormScene = false; //stormScene = false;
} else{ } else{
if(response == player.getLocation()){ if(response == player.getLocation()){
textOut.setText(" " + "You're already here " + player.getName() + "\n"); textOut.setText(" " + "You're already here " + player.getName() + "\n");
@@ -384,7 +384,7 @@ public class TravelGUI{
quitButton.setVisible(false); quitButton.setVisible(false);
numberInput.setVisible(false); numberInput.setVisible(false);
textOut.setText(" We see a ship on the horizon " + player.getName() + "; Prepare for combat!"); textOut.setText(" We see a ship on the horizon " + player.getName() + "; Prepare for combat!");
//System.out.println(textOut.getText() + "\n " + "PLACEHOLDER FOR SHIPWARFARE"); peasantShipScene = true;
}else if (randGenNum == 2) { }else if (randGenNum == 2) {
disaster(locationOfTravel); disaster(locationOfTravel);
textOut.setText(textOut.getText() + "\n " + "We made it!"); textOut.setText(textOut.getText() + "\n " + "We made it!");