mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
bugfix
This commit is contained in:
@@ -217,7 +217,7 @@ public class GameNew {
|
||||
* their decks and other special starting conditions.
|
||||
* @param forceAnte Forces ante on or off no matter what your preferences
|
||||
*/
|
||||
public static void newGame(final GameState game, final boolean canRandomFoil, Boolean forceAnte) {
|
||||
public static void newGame(final GameState game, final boolean canRandomFoil, boolean useAnte) {
|
||||
|
||||
Card.resetUniqueNumber();
|
||||
// need this code here, otherwise observables fail
|
||||
@@ -226,7 +226,6 @@ public class GameNew {
|
||||
trigHandler.clearDelayedTrigger();
|
||||
|
||||
// friendliness
|
||||
boolean useAnte = forceAnte != null ? forceAnte : preferences.getPrefBoolean(FPref.UI_ANTE);
|
||||
final Set<CardPrinted> rAICards = new HashSet<CardPrinted>();
|
||||
|
||||
Map<Player, Set<CardPrinted>> removedAnteCards = new HashMap<Player, Set<CardPrinted>>();
|
||||
@@ -302,7 +301,7 @@ public class GameNew {
|
||||
}
|
||||
|
||||
// Deciding which cards go to ante
|
||||
if (preferences.getPrefBoolean(FPref.UI_ANTE)) {
|
||||
if (useAnte) {
|
||||
final String nl = System.getProperty("line.separator");
|
||||
final StringBuilder msg = new StringBuilder();
|
||||
for (final Player p : game.getPlayers()) {
|
||||
|
||||
@@ -50,7 +50,7 @@ public class MatchController {
|
||||
private int gamesPerMatch = 3;
|
||||
private int gamesToWinMatch = 2;
|
||||
|
||||
private Boolean forceAnte = false;
|
||||
private boolean useAnte = Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_ANTE);
|
||||
|
||||
private GameState currentGame = null;
|
||||
|
||||
@@ -68,9 +68,9 @@ public class MatchController {
|
||||
gameType = type;
|
||||
}
|
||||
|
||||
public MatchController(GameType type, Map<LobbyPlayer, PlayerStartConditions> map, Boolean forceAnte) {
|
||||
public MatchController(GameType type, Map<LobbyPlayer, PlayerStartConditions> map, boolean forceAnte) {
|
||||
this(type, map);
|
||||
this.forceAnte = forceAnte;
|
||||
this.useAnte |= forceAnte;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,7 +151,7 @@ public class MatchController {
|
||||
attachUiToMatch(this, FControl.SINGLETON_INSTANCE.getLobby().getGuiPlayer());
|
||||
|
||||
final boolean canRandomFoil = Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_FOIL) && gameType == GameType.Constructed;
|
||||
GameNew.newGame(currentGame, canRandomFoil, this.forceAnte);
|
||||
GameNew.newGame(currentGame, canRandomFoil, this.useAnte);
|
||||
|
||||
currentGame.setAge(GameAge.Mulligan);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user