Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -39,6 +39,7 @@ public class TravelGUI{
|
|||||||
private Boolean littyShipScene = false;
|
private Boolean littyShipScene = false;
|
||||||
private Boolean shopScene = false;
|
private Boolean shopScene = false;
|
||||||
private Boolean stormScene = false;
|
private Boolean stormScene = false;
|
||||||
|
private Boolean sceneContinue = false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -202,17 +203,24 @@ public class TravelGUI{
|
|||||||
//Just in case the player types something that was not intended. It will refresh the question and ask it again
|
//Just in case the player types something that was not intended. It will refresh the question and ask it again
|
||||||
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 && 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)){
|
||||||
randomEventSea(response,stage);
|
System.out.println("a");
|
||||||
hasTraveled = seaAtlas(response);
|
hasTraveled = seaAtlas(response);
|
||||||
|
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{
|
||||||
textOut.setText(" " + "You're already here " + player.getName());
|
if(response == player.getLocation()){
|
||||||
textOut.setText(textOut.getText() + ", do you wish to go to:\n\n 1) Hong Kong, 2) Shanghai, 3) Nagasaki, 4) Saigon,\n 5) Manila, 6) Singapore, or 7) Batavia?");
|
textOut.setText(" " + "You're already here " + player.getName() + "\n");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
textOut.setText(" " + player.getName() + "; Sorry but could you say that again?");
|
||||||
|
}
|
||||||
|
|
||||||
|
textOut.setText(textOut.getText() + "\n\n 1) Hong Kong, 2) Shanghai, 3) Nagasaki, 4) Saigon,\n 5) Manila, 6) Singapore, or 7) Batavia?");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
textOut.setText(" " + "Sorry, " + player.getName() + " could you say that again?");
|
textOut.setText(" " + "Sorry, " + player.getName() + " could you say that again?");
|
||||||
@@ -375,11 +383,9 @@ public class TravelGUI{
|
|||||||
continueButton.setVisible(true);
|
continueButton.setVisible(true);
|
||||||
quitButton.setVisible(false);
|
quitButton.setVisible(false);
|
||||||
numberInput.setVisible(false);
|
numberInput.setVisible(false);
|
||||||
peasantShipScene = true;
|
|
||||||
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");
|
//System.out.println(textOut.getText() + "\n " + "PLACEHOLDER FOR SHIPWARFARE");
|
||||||
}else if (randGenNum == 2) {
|
}else if (randGenNum == 2) {
|
||||||
stormScene = true;
|
|
||||||
disaster(locationOfTravel);
|
disaster(locationOfTravel);
|
||||||
textOut.setText(textOut.getText() + "\n " + "We made it!");
|
textOut.setText(textOut.getText() + "\n " + "We made it!");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user