mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Fixed bug with not counting keycards as lands in the land count causing various issues. Fixed final keyword issue causing build warnings.
This commit is contained in:
@@ -161,10 +161,10 @@ public class SimulateMatch {
|
||||
|
||||
|
||||
private static void simulateSingleMatch(Match mc, int iGame, boolean outputGamelog) {
|
||||
StopWatch sw = new StopWatch();
|
||||
final StopWatch sw = new StopWatch();
|
||||
sw.start();
|
||||
|
||||
Game g1 = mc.createGame();
|
||||
final Game g1 = mc.createGame();
|
||||
// will run match in the same thread
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
@@ -217,7 +217,7 @@ public class DeckgenUtil {
|
||||
System.out.println("Wrong card count "+deck.getMain().countAll());
|
||||
deck=buildCardGenDeck(format,isForAI);
|
||||
}
|
||||
if(deck.getMain().countAll(Predicates.compose(CardRulesPredicates.Presets.IS_LAND, PaperCard.FN_GET_RULES))>30){
|
||||
if(deck.getMain().countAll(Predicates.compose(CardRulesPredicates.Presets.IS_LAND, PaperCard.FN_GET_RULES))>27){
|
||||
System.out.println("Too many lands "+deck.getMain().countAll(Predicates.compose(CardRulesPredicates.Presets.IS_LAND, PaperCard.FN_GET_RULES)));
|
||||
deck=buildCardGenDeck(format,isForAI);
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
protected Iterable<PaperCard> onColorNonCreatures;
|
||||
protected Iterable<PaperCard> keyCards;
|
||||
|
||||
protected static final boolean logToConsole = false;
|
||||
protected static final boolean logColorsToConsole = false;
|
||||
protected static final boolean logToConsole = true;
|
||||
protected static final boolean logColorsToConsole = true;
|
||||
|
||||
|
||||
public CardThemedDeckBuilder(IDeckGenPool pool, DeckFormat format){
|
||||
@@ -313,6 +313,7 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
deckList.addAll(keyCardList);
|
||||
aiPlayables.removeAll(keyCardList);
|
||||
rankedColorList.removeAll(keyCardList);
|
||||
landsNeeded--;
|
||||
}
|
||||
// Add the deck card
|
||||
if(secondKeyCard.getRules().getMainPart().getType().isLand()) {
|
||||
@@ -321,6 +322,7 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
deckList.addAll(keyCardList);
|
||||
aiPlayables.removeAll(keyCardList);
|
||||
rankedColorList.removeAll(keyCardList);
|
||||
landsNeeded--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user