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:
austinio7116
2018-03-02 19:49:42 +00:00
committed by maustin
parent cb5791276a
commit b67c060211
3 changed files with 7 additions and 5 deletions

View File

@@ -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();

View File

@@ -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);
}

View File

@@ -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--;
}
}