mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Quest will now ask before overwriting quest data with a new quest.
- Quest will list the actual credits earned after winning a match.
This commit is contained in:
@@ -13,6 +13,7 @@ import javax.swing.ButtonGroup;
|
|||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JRadioButton;
|
import javax.swing.JRadioButton;
|
||||||
import javax.swing.JTextArea;
|
import javax.swing.JTextArea;
|
||||||
@@ -132,8 +133,8 @@ public class Gui_QuestOptions extends JFrame {
|
|||||||
gridLayout1.setRows(4);
|
gridLayout1.setRows(4);
|
||||||
|
|
||||||
easyRadio.setText("Easy - 50 games");
|
easyRadio.setText("Easy - 50 games");
|
||||||
hardRadio.setText("Hard - 200 games");
|
|
||||||
mediumRadio.setText("Medium - 100 games");
|
mediumRadio.setText("Medium - 100 games");
|
||||||
|
hardRadio.setText("Hard - 200 games");
|
||||||
veryHardRadio.setText("Very Hard - 300 games");
|
veryHardRadio.setText("Very Hard - 300 games");
|
||||||
realisticRadio.setText("Realistic");
|
realisticRadio.setText("Realistic");
|
||||||
fantasyRadio.setText("Fantasy");
|
fantasyRadio.setText("Fantasy");
|
||||||
@@ -207,10 +208,7 @@ public class Gui_QuestOptions extends JFrame {
|
|||||||
void newQuestButton_actionPerformed(ActionEvent e) {
|
void newQuestButton_actionPerformed(ActionEvent e) {
|
||||||
int difficulty = 0;
|
int difficulty = 0;
|
||||||
|
|
||||||
String mode = "Realistic";
|
String mode = fantasyRadio.isSelected() ? "Fantasy" : "Realistic";
|
||||||
|
|
||||||
if (fantasyRadio.isSelected())
|
|
||||||
mode = "Fantasy";
|
|
||||||
|
|
||||||
if(easyRadio.isSelected()) difficulty = 0;
|
if(easyRadio.isSelected()) difficulty = 0;
|
||||||
|
|
||||||
@@ -220,8 +218,19 @@ public class Gui_QuestOptions extends JFrame {
|
|||||||
|
|
||||||
else if(veryHardRadio.isSelected()) difficulty = 3;
|
else if(veryHardRadio.isSelected()) difficulty = 3;
|
||||||
|
|
||||||
else //user didn't select a difficulty
|
else //user didn't select a difficulty{
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (questData.hasSaveFile()){
|
||||||
|
// this will overwrite your save file!
|
||||||
|
Object[] possibleValues = {"Yes", "No"};
|
||||||
|
Object choice = JOptionPane.showOptionDialog(null, "Starting a new quest will overwrite your current quest. Continue?",
|
||||||
|
"Start New Quest?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,
|
||||||
|
null, possibleValues, possibleValues[0]);
|
||||||
|
|
||||||
|
if (!choice.equals(0))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//give the user a few cards to build a deck
|
//give the user a few cards to build a deck
|
||||||
questData.newGame(difficulty, mode);
|
questData.newGame(difficulty, mode);
|
||||||
|
|||||||
@@ -297,6 +297,8 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
|
|
||||||
sb.append("<html>");
|
sb.append("<html>");
|
||||||
|
|
||||||
|
QuestData_Prefs qdPrefs = q.qdPrefs;
|
||||||
|
|
||||||
for (String s : wins)
|
for (String s : wins)
|
||||||
{
|
{
|
||||||
if (s != null) {
|
if (s != null) {
|
||||||
@@ -307,15 +309,15 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
sb.append("! Bonus: <b>+");
|
sb.append("! Bonus: <b>+");
|
||||||
|
|
||||||
if (s.equals("Poison Counters"))
|
if (s.equals("Poison Counters"))
|
||||||
sb.append(q.qdPrefs.getMatchRewardPoisonWinBonus());
|
sb.append(qdPrefs.getMatchRewardPoisonWinBonus());
|
||||||
else if (s.equals("Milled"))
|
else if (s.equals("Milled"))
|
||||||
sb.append(q.qdPrefs.getMatchRewardMilledWinBonus());
|
sb.append(qdPrefs.getMatchRewardMilledWinBonus());
|
||||||
else if (s.equals("Battle of Wits") ||
|
else if (s.equals("Battle of Wits") ||
|
||||||
s.equals("Felidar Sovereign") || s.equals("Helix Pinnacle") || s.equals("Epic Struggle") ||
|
s.equals("Felidar Sovereign") || s.equals("Helix Pinnacle") || s.equals("Epic Struggle") ||
|
||||||
s.equals("Door to Nothingness") || s.equals("Barren Glory") || s.equals("Near-Death Experience") ||
|
s.equals("Door to Nothingness") || s.equals("Barren Glory") || s.equals("Near-Death Experience") ||
|
||||||
s.equals("Mortal Combat") || s.equals("Test of Endurance") ) {
|
s.equals("Mortal Combat") || s.equals("Test of Endurance") ) {
|
||||||
|
|
||||||
sb.append(q.qdPrefs.getMatchRewardAltWinBonus());
|
sb.append(qdPrefs.getMatchRewardAltWinBonus());
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(" credits</b>.<br>");
|
sb.append(" credits</b>.<br>");
|
||||||
@@ -329,14 +331,14 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
System.out.println("Quest, won by turn:" + i);
|
System.out.println("Quest, won by turn:" + i);
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
{
|
{
|
||||||
if (i == 1)
|
if (i == 1)
|
||||||
sb.append("Won in one turn! Bonus: <b>+1500 credits</b>.<br>");
|
creds += qdPrefs.getMatchRewardWinFirst();
|
||||||
else if (i <= 5)
|
else if (i <= 5)
|
||||||
sb.append("Won by turn 5! Bonus: <b>+250 credits</b>.<br>");
|
creds += qdPrefs.getMatchRewardWinByFifth();
|
||||||
else if (i <= 10)
|
else if (i <= 10)
|
||||||
sb.append("Won by turn 10! Bonus: <b>+50 credits</b>.<br>");
|
creds += qdPrefs.getMatchRewardWinByTen();
|
||||||
else if (i <= 15)
|
else if (i <= 15)
|
||||||
sb.append("Won by turn 15! Bonus: <b>+5 credits</b>.<br>");
|
creds += qdPrefs.getMatchRewardWinByFifteen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,14 +346,15 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
|
|
||||||
for (boolean b : mulliganedToZero)
|
for (boolean b : mulliganedToZero)
|
||||||
{
|
{
|
||||||
if (b == true)
|
if (b){
|
||||||
{
|
sb.append("Mulliganed to zero and still won! Bonus: <b>+");
|
||||||
sb.append("Mulliganed to zero and still won! Bonus: <b>+500 credits</b>.<br>");
|
sb.append(qdPrefs.getMatchMullToZero()).append(" credits</b>.<br>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (winLose.getLose()==0)
|
if (winLose.getLose()==0)
|
||||||
sb.append("You have not lost once! Bonus: <b>+10 credits</b>.<br>");
|
sb.append("You have not lost once! Bonus: <b>+");
|
||||||
|
sb.append(qdPrefs.getMatchRewardNoLosses()).append(" credits</b>.<br>");
|
||||||
|
|
||||||
if(q.getEstatesLevel() == 1)
|
if(q.getEstatesLevel() == 1)
|
||||||
sb.append("Estates bonus: <b>10%</b>.<br>");
|
sb.append("Estates bonus: <b>10%</b>.<br>");
|
||||||
|
|||||||
Reference in New Issue
Block a user