mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Only reset quest new cards at the beginning of the match, not the end of each game
This commit is contained in:
@@ -12,6 +12,7 @@ import forge.game.event.GameEventAnteCardsSelected;
|
|||||||
import forge.game.player.LobbyPlayer;
|
import forge.game.player.LobbyPlayer;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.properties.ForgePreferences.FPref;
|
import forge.properties.ForgePreferences.FPref;
|
||||||
|
import forge.quest.QuestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: Write javadoc for this type.
|
* TODO: Write javadoc for this type.
|
||||||
@@ -82,8 +83,14 @@ public class Match {
|
|||||||
|
|
||||||
currentGame = new Game(players, gameType, this);
|
currentGame = new Game(players, gameType, this);
|
||||||
|
|
||||||
if ( getGameType() == GameType.Quest)
|
if ( getGameType() == GameType.Quest) {
|
||||||
currentGame.subscribeToEvents(Singletons.getModel().getQuest()); // this one listens to player's mulligans ATM
|
QuestController qc = Singletons.getModel().getQuest();
|
||||||
|
// Reset new list when the Match round starts, not when each game starts
|
||||||
|
if (this.getPlayedGames().isEmpty()) {
|
||||||
|
qc.getCards().resetNewList();
|
||||||
|
}
|
||||||
|
currentGame.subscribeToEvents(qc); // this one listens to player's mulligans ATM
|
||||||
|
}
|
||||||
|
|
||||||
Singletons.getControl().attachToGame(currentGame);
|
Singletons.getControl().attachToGame(currentGame);
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,6 @@ public class QuestWinLose extends ControlWinLose {
|
|||||||
@Override
|
@Override
|
||||||
public final boolean populateCustomPanel() {
|
public final boolean populateCustomPanel() {
|
||||||
this.getView().getBtnRestart().setVisible(false);
|
this.getView().getBtnRestart().setVisible(false);
|
||||||
qData.getCards().resetNewList();
|
|
||||||
QuestController qc = Singletons.getModel().getQuest();
|
QuestController qc = Singletons.getModel().getQuest();
|
||||||
|
|
||||||
LobbyPlayer questPlayer = Singletons.getControl().getLobby().getQuestPlayer();
|
LobbyPlayer questPlayer = Singletons.getControl().getLobby().getQuestPlayer();
|
||||||
@@ -159,7 +158,7 @@ public class QuestWinLose extends ControlWinLose {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!match.isMatchOver()) {
|
if (!match.isMatchOver()) {
|
||||||
this.getView().getBtnQuit().setText("Quit (15 Credits)");
|
this.getView().getBtnQuit().setText("Quit (-15 Credits)");
|
||||||
return isAnte;
|
return isAnte;
|
||||||
} else {
|
} else {
|
||||||
this.getView().getBtnContinue().setVisible(false);
|
this.getView().getBtnContinue().setVisible(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user