mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fixed card-based deck generation where extra colours were kept despite no cards of that colour being included.
This commit is contained in:
@@ -62,6 +62,10 @@ public class CardThemedCommanderDeckBuilder extends CardThemedDeckBuilder {
|
||||
//do nothing as we cannot add extra colours beyond commanders
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateColors(){
|
||||
//do nothing as we cannot deviate from commander colours
|
||||
}
|
||||
/**
|
||||
* Generate a descriptive name.
|
||||
*
|
||||
|
||||
@@ -133,6 +133,19 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
return buildDeck().getMain();
|
||||
}
|
||||
|
||||
protected void updateColors(){
|
||||
//update colors
|
||||
FullDeckColors finalDeckColors = new FullDeckColors();
|
||||
for(PaperCard c:deckList){
|
||||
if(finalDeckColors.canChoseMoreColors()){
|
||||
finalDeckColors.addColorsOf(c);
|
||||
}
|
||||
}
|
||||
colors = finalDeckColors.getChosenColors();
|
||||
if (logColorsToConsole) {
|
||||
System.out.println("Final Colors: " + colors.toEnumSet().toString());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* buildDeck.
|
||||
@@ -223,6 +236,8 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
System.out.println("Post Randoms : " + deckList.size());
|
||||
}
|
||||
|
||||
updateColors();
|
||||
|
||||
addLandKeyCards();
|
||||
|
||||
List<String> duals = getDualLandList();
|
||||
|
||||
Reference in New Issue
Block a user