mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix for multiple winlose dialogs in quest mode
This commit is contained in:
@@ -48,6 +48,9 @@ import javax.swing.JOptionPane;
|
|||||||
*/
|
*/
|
||||||
public class GameAction {
|
public class GameAction {
|
||||||
|
|
||||||
|
/** This variable prevents WinLose dialog from popping several times, ie on each state effect check after a win.*/
|
||||||
|
private boolean canShowWinLose = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>resetActivationsPerTurn.</p>
|
* <p>resetActivationsPerTurn.</p>
|
||||||
*/
|
*/
|
||||||
@@ -642,13 +645,14 @@ public class GameAction {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkEndGameSate()) {
|
if (canShowWinLose && checkEndGameSate()) {
|
||||||
AllZone.getDisplay().savePrefs();
|
AllZone.getDisplay().savePrefs();
|
||||||
frame.setEnabled(false);
|
frame.setEnabled(false);
|
||||||
//frame.dispose();
|
//frame.dispose();
|
||||||
Gui_WinLose gwl = new Gui_WinLose(AllZone.getMatchState(), AllZone.getQuestData(), AllZone.getQuestAssignment());
|
Gui_WinLose gwl = new Gui_WinLose(AllZone.getMatchState(), AllZone.getQuestData(), AllZone.getQuestAssignment());
|
||||||
//gwl.setAlwaysOnTop(true);
|
//gwl.setAlwaysOnTop(true);
|
||||||
gwl.toFront();
|
gwl.toFront();
|
||||||
|
canShowWinLose = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1109,6 +1113,7 @@ public class GameAction {
|
|||||||
Constant.Quest.fantasyQuest[0] = false;
|
Constant.Quest.fantasyQuest[0] = false;
|
||||||
|
|
||||||
AllZone.newGameCleanup();
|
AllZone.newGameCleanup();
|
||||||
|
canShowWinLose = true;
|
||||||
forge.card.trigger.Trigger.resetIDs();
|
forge.card.trigger.Trigger.resetIDs();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user