mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Updated deck generation to include Legacy and Vintage - fixed a few bugs that lead to incorrect land counts and random cards being added. Fixed Snow land issue so Skred red should be more playable.
This commit is contained in:
@@ -377,6 +377,16 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
|
||||
updateMatrix(FModel.getFormats().getModern());
|
||||
}
|
||||
break;
|
||||
case LEGACY_CARDGEN_DECK:
|
||||
if(FModel.isdeckGenMatrixLoaded()) {
|
||||
updateMatrix(FModel.getFormats().get("Legacy"));
|
||||
}
|
||||
break;
|
||||
case VINTAGE_CARDGEN_DECK:
|
||||
if(FModel.isdeckGenMatrixLoaded()) {
|
||||
updateMatrix(FModel.getFormats().get("Vintage"));
|
||||
}
|
||||
break;
|
||||
case RANDOM_COMMANDER_DECK:
|
||||
updateRandomCommander();
|
||||
break;
|
||||
|
||||
@@ -250,6 +250,8 @@ public class VLobby implements ILobbyView {
|
||||
switch (selectedDeckType){
|
||||
case STANDARD_CARDGEN_DECK:
|
||||
case MODERN_CARDGEN_DECK:
|
||||
case LEGACY_CARDGEN_DECK:
|
||||
case VINTAGE_CARDGEN_DECK:
|
||||
case COLOR_DECK:
|
||||
case STANDARD_COLOR_DECK:
|
||||
case MODERN_COLOR_DECK:
|
||||
|
||||
@@ -73,6 +73,8 @@ public enum CSubmenuGauntletQuick implements ICDoc {
|
||||
if (view.getBoxStandardColorDecks().isSelected()) { allowedDeckTypes.add(DeckType.STANDARD_COLOR_DECK); }
|
||||
if (view.getBoxStandardGenDecks().isSelected()) { allowedDeckTypes.add(DeckType.STANDARD_CARDGEN_DECK); }
|
||||
if (view.getBoxModernGenDecks().isSelected()) { allowedDeckTypes.add(DeckType.MODERN_CARDGEN_DECK); }
|
||||
if (view.getBoxLegacyGenDecks().isSelected()) { allowedDeckTypes.add(DeckType.LEGACY_CARDGEN_DECK); }
|
||||
if (view.getBoxVintageGenDecks().isSelected()) { allowedDeckTypes.add(DeckType.VINTAGE_CARDGEN_DECK); }
|
||||
if (view.getBoxModernColorDecks().isSelected()) { allowedDeckTypes.add(DeckType.MODERN_COLOR_DECK); }
|
||||
if (view.getBoxThemeDecks().isSelected()) { allowedDeckTypes.add(DeckType.THEME_DECK); }
|
||||
if (view.getBoxUserDecks().isSelected()) { allowedDeckTypes.add(DeckType.CUSTOM_DECK); }
|
||||
|
||||
@@ -56,6 +56,8 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
||||
private final JCheckBox boxStandardColorDecks = new FCheckBox(DeckType.STANDARD_COLOR_DECK.toString());
|
||||
private final JCheckBox boxStandardCardgenDecks = new FCheckBox(DeckType.STANDARD_CARDGEN_DECK.toString());
|
||||
private final JCheckBox boxModernCardgenDecks = new FCheckBox(DeckType.MODERN_CARDGEN_DECK.toString());
|
||||
private final JCheckBox boxLegacyCardgenDecks = new FCheckBox(DeckType.LEGACY_CARDGEN_DECK.toString());
|
||||
private final JCheckBox boxVintageCardgenDecks = new FCheckBox(DeckType.VINTAGE_CARDGEN_DECK.toString());
|
||||
private final JCheckBox boxModernColorDecks = new FCheckBox(DeckType.MODERN_COLOR_DECK.toString());
|
||||
private final JCheckBox boxThemeDecks = new FCheckBox(DeckType.THEME_DECK.toString());
|
||||
|
||||
@@ -214,6 +216,12 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
||||
public JCheckBox getBoxModernGenDecks() {
|
||||
return boxModernCardgenDecks;
|
||||
}
|
||||
public JCheckBox getBoxLegacyGenDecks() {
|
||||
return boxLegacyCardgenDecks;
|
||||
}
|
||||
public JCheckBox getBoxVintageGenDecks() {
|
||||
return boxVintageCardgenDecks;
|
||||
}
|
||||
|
||||
/** @return {@link javax.swing.JCheckBox} */
|
||||
public JCheckBox getBoxThemeDecks() {
|
||||
|
||||
@@ -147,7 +147,8 @@ public class FDeckChooser extends FScreen {
|
||||
@Override
|
||||
public void handleEvent(FEvent e) {
|
||||
if (selectedDeckType != DeckType.STANDARD_COLOR_DECK && selectedDeckType != DeckType.STANDARD_CARDGEN_DECK
|
||||
&& selectedDeckType != DeckType.MODERN_CARDGEN_DECK && selectedDeckType != DeckType.MODERN_COLOR_DECK &&
|
||||
&& selectedDeckType != DeckType.MODERN_CARDGEN_DECK && selectedDeckType != DeckType.LEGACY_CARDGEN_DECK
|
||||
&& selectedDeckType != DeckType.VINTAGE_CARDGEN_DECK && selectedDeckType != DeckType.MODERN_COLOR_DECK &&
|
||||
selectedDeckType != DeckType.COLOR_DECK && selectedDeckType != DeckType.THEME_DECK
|
||||
&& selectedDeckType != DeckType.RANDOM_COMMANDER_DECK && selectedDeckType != DeckType.RANDOM_CARDGEN_COMMANDER_DECK) {
|
||||
FDeckViewer.show(getDeck());
|
||||
@@ -172,6 +173,12 @@ public class FDeckChooser extends FScreen {
|
||||
else if (selectedDeckType == DeckType.MODERN_CARDGEN_DECK){
|
||||
DeckgenUtil.randomSelect(lstDecks);
|
||||
}
|
||||
else if (selectedDeckType == DeckType.LEGACY_CARDGEN_DECK){
|
||||
DeckgenUtil.randomSelect(lstDecks);
|
||||
}
|
||||
else if (selectedDeckType == DeckType.VINTAGE_CARDGEN_DECK){
|
||||
DeckgenUtil.randomSelect(lstDecks);
|
||||
}
|
||||
else {
|
||||
DeckgenUtil.randomSelect(lstDecks);
|
||||
}
|
||||
@@ -280,6 +287,8 @@ public class FDeckChooser extends FScreen {
|
||||
case RANDOM_CARDGEN_COMMANDER_DECK:
|
||||
case RANDOM_COMMANDER_DECK:
|
||||
case MODERN_CARDGEN_DECK:
|
||||
case LEGACY_CARDGEN_DECK:
|
||||
case VINTAGE_CARDGEN_DECK:
|
||||
case MODERN_COLOR_DECK:
|
||||
case THEME_DECK:
|
||||
case RANDOM_DECK:
|
||||
@@ -459,6 +468,8 @@ public class FDeckChooser extends FScreen {
|
||||
if(FModel.isdeckGenMatrixLoaded()) {
|
||||
cmbDeckTypes.addItem(DeckType.STANDARD_CARDGEN_DECK);
|
||||
cmbDeckTypes.addItem(DeckType.MODERN_CARDGEN_DECK);
|
||||
cmbDeckTypes.addItem(DeckType.LEGACY_CARDGEN_DECK);
|
||||
cmbDeckTypes.addItem(DeckType.VINTAGE_CARDGEN_DECK);
|
||||
}
|
||||
cmbDeckTypes.addItem(DeckType.MODERN_COLOR_DECK);
|
||||
cmbDeckTypes.addItem(DeckType.THEME_DECK);
|
||||
@@ -666,6 +677,23 @@ public class FDeckChooser extends FScreen {
|
||||
}
|
||||
config = ItemManagerConfig.STRING_ONLY;
|
||||
break;
|
||||
case LEGACY_CARDGEN_DECK:
|
||||
maxSelections = 1;
|
||||
pool= new ArrayList<>();
|
||||
if(FModel.isdeckGenMatrixLoaded()) {
|
||||
pool = ArchetypeDeckGenerator.getMatrixDecks(FModel.getFormats().get("Legacy"), isAi);
|
||||
}
|
||||
config = ItemManagerConfig.STRING_ONLY;
|
||||
break;
|
||||
case VINTAGE_CARDGEN_DECK:
|
||||
maxSelections = 1;
|
||||
pool= new ArrayList<>();
|
||||
if(FModel.isdeckGenMatrixLoaded()) {
|
||||
pool = ArchetypeDeckGenerator.getMatrixDecks(FModel.getFormats().get("Vintage"), isAi);
|
||||
}
|
||||
config = ItemManagerConfig.STRING_ONLY;
|
||||
break;
|
||||
|
||||
case MODERN_COLOR_DECK:
|
||||
maxSelections = 3;
|
||||
pool = ColorDeckGenerator.getColorDecks(lstDecks, FModel.getFormats().getModern().getFilterPrinted(), isAi);
|
||||
@@ -1013,12 +1041,16 @@ public class FDeckChooser extends FScreen {
|
||||
DeckType.STANDARD_CARDGEN_DECK,
|
||||
DeckType.MODERN_COLOR_DECK,
|
||||
DeckType.MODERN_CARDGEN_DECK,
|
||||
DeckType.LEGACY_CARDGEN_DECK,
|
||||
DeckType.VINTAGE_CARDGEN_DECK,
|
||||
DeckType.THEME_DECK,
|
||||
DeckType.NET_DECK
|
||||
);
|
||||
if (!FModel.isdeckGenMatrixLoaded()) {
|
||||
deckTypes.remove(DeckType.STANDARD_CARDGEN_DECK);
|
||||
deckTypes.remove(DeckType.MODERN_CARDGEN_DECK);
|
||||
deckTypes.remove(DeckType.LEGACY_CARDGEN_DECK);
|
||||
deckTypes.remove(DeckType.VINTAGE_CARDGEN_DECK);
|
||||
}
|
||||
|
||||
ListChooser<DeckType> chooser = new ListChooser<DeckType>(
|
||||
|
||||
@@ -432,6 +432,8 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
||||
switch (selectedDeckType){
|
||||
case STANDARD_CARDGEN_DECK:
|
||||
case MODERN_CARDGEN_DECK:
|
||||
case LEGACY_CARDGEN_DECK:
|
||||
case VINTAGE_CARDGEN_DECK:
|
||||
case COLOR_DECK:
|
||||
case STANDARD_COLOR_DECK:
|
||||
case MODERN_COLOR_DECK:
|
||||
|
||||
@@ -91,6 +91,8 @@ public class NewGauntletScreen extends LaunchScreen {
|
||||
DeckType.STANDARD_CARDGEN_DECK,
|
||||
DeckType.MODERN_COLOR_DECK,
|
||||
DeckType.MODERN_CARDGEN_DECK,
|
||||
DeckType.LEGACY_CARDGEN_DECK,
|
||||
DeckType.VINTAGE_CARDGEN_DECK,
|
||||
DeckType.THEME_DECK
|
||||
}), null, new Callback<List<DeckType>>() {
|
||||
@Override
|
||||
|
||||
@@ -23,6 +23,8 @@ public final class CardArchetypeLDAGenerator {
|
||||
List<String> formatStrings = new ArrayList<>();
|
||||
formatStrings.add(FModel.getFormats().getStandard().getName());
|
||||
formatStrings.add(FModel.getFormats().getModern().getName());
|
||||
formatStrings.add("Legacy");
|
||||
formatStrings.add("Vintage");
|
||||
|
||||
for (String formatString : formatStrings){
|
||||
if(!initializeFormat(formatString)){
|
||||
|
||||
@@ -19,6 +19,8 @@ public enum DeckType {
|
||||
COLOR_DECK ("Random Color Decks"),
|
||||
STANDARD_CARDGEN_DECK ("Random Standard Archetype Decks"),
|
||||
MODERN_CARDGEN_DECK ("Random Modern Archetype Decks"),
|
||||
LEGACY_CARDGEN_DECK ("Random Legacy Archetype Decks"),
|
||||
VINTAGE_CARDGEN_DECK ("Random Vintage Archetype Decks"),
|
||||
STANDARD_COLOR_DECK ("Random Standard Color Decks"),
|
||||
MODERN_COLOR_DECK ("Random Modern Color Decks"),
|
||||
THEME_DECK ("Random Theme Decks"),
|
||||
@@ -38,6 +40,8 @@ public enum DeckType {
|
||||
DeckType.COLOR_DECK,
|
||||
DeckType.STANDARD_CARDGEN_DECK,
|
||||
DeckType.MODERN_CARDGEN_DECK,
|
||||
DeckType.LEGACY_CARDGEN_DECK,
|
||||
DeckType.VINTAGE_CARDGEN_DECK,
|
||||
DeckType.STANDARD_COLOR_DECK,
|
||||
DeckType.MODERN_COLOR_DECK,
|
||||
DeckType.THEME_DECK,
|
||||
|
||||
@@ -233,17 +233,22 @@ public class DeckgenUtil {
|
||||
PaperCard card = null;
|
||||
for(Pair<String, Double> pair : preSelectedCardNames){
|
||||
card = StaticData.instance().getCommonCards().getUniqueByName(pair.getLeft());
|
||||
if(!card.getRules().getType().isLand()){
|
||||
if(card != null &&!card.getRules().getType().isLand()){
|
||||
break;
|
||||
}
|
||||
}
|
||||
List<PaperCard> selectedCards = new ArrayList<>();
|
||||
int cardCount=0;
|
||||
for(Pair<String, Double> pair:preSelectedCardNames){
|
||||
String name = pair.getLeft();
|
||||
PaperCard cardToAdd = StaticData.instance().getCommonCards().getUniqueByName(name);
|
||||
//for(int i=0; i<1;++i) {
|
||||
if(!cardToAdd.getName().equals(card.getName())) {
|
||||
if(cardToAdd != null && !cardToAdd.getName().equals(card.getName())) {
|
||||
selectedCards.add(cardToAdd);
|
||||
cardCount++;
|
||||
}
|
||||
if(cardCount>120){// no need to have more than this
|
||||
break;
|
||||
}
|
||||
//}
|
||||
}
|
||||
@@ -276,7 +281,13 @@ public class DeckgenUtil {
|
||||
for(int j=0;j<keyCardCount;++j) {
|
||||
playsetList.add(card);
|
||||
}
|
||||
List<String> restrictedCardsAdded = new ArrayList<>();
|
||||
for (PaperCard c:selectedCards){
|
||||
if (format.getRestrictedCards().contains(c.getName())&&!restrictedCardsAdded.contains(c)){
|
||||
playsetList.add(c);
|
||||
restrictedCardsAdded.add(c.getName());
|
||||
continue;
|
||||
}
|
||||
for(int j=0;j<4;++j) {
|
||||
if(MyRandom.getRandom().nextInt(100)<90) {
|
||||
playsetList.add(c);
|
||||
|
||||
@@ -104,6 +104,10 @@ public class RandomDeckGenerator extends DeckProxy implements Comparable<RandomD
|
||||
return DeckgenUtil.buildLDACArchetypeDeck(FModel.getFormats().getStandard(),isAi);
|
||||
case MODERN_CARDGEN_DECK:
|
||||
return DeckgenUtil.buildLDACArchetypeDeck(FModel.getFormats().getModern(),isAi);
|
||||
case LEGACY_CARDGEN_DECK:
|
||||
return DeckgenUtil.buildLDACArchetypeDeck(FModel.getFormats().get("Legacy"),isAi);
|
||||
case VINTAGE_CARDGEN_DECK:
|
||||
return DeckgenUtil.buildLDACArchetypeDeck(FModel.getFormats().get("Vintage"),isAi);
|
||||
case STANDARD_COLOR_DECK:
|
||||
colors = new ArrayList<String>();
|
||||
count = Aggregates.randomInt(1, 3);
|
||||
|
||||
@@ -39,6 +39,12 @@ public class GauntletUtil {
|
||||
case MODERN_CARDGEN_DECK:
|
||||
deck = DeckgenUtil.buildLDACArchetypeDeck(FModel.getFormats().getModern(),true);
|
||||
break;
|
||||
case LEGACY_CARDGEN_DECK:
|
||||
deck = DeckgenUtil.buildLDACArchetypeDeck(FModel.getFormats().get("Legacy"),true);
|
||||
break;
|
||||
case VINTAGE_CARDGEN_DECK:
|
||||
deck = DeckgenUtil.buildLDACArchetypeDeck(FModel.getFormats().get("Vintage"),true);
|
||||
break;
|
||||
case MODERN_COLOR_DECK:
|
||||
deck = DeckgenUtil.getRandomColorDeck(FModel.getFormats().getModern().getFilterPrinted(),true);
|
||||
break;
|
||||
|
||||
@@ -57,11 +57,11 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
|
||||
// Views for aiPlayable
|
||||
protected Iterable<PaperCard> onColorCreaturesAndSpells;
|
||||
protected Iterable<PaperCard> keyCards;
|
||||
|
||||
protected static final boolean logToConsole = false;
|
||||
protected static final boolean logColorsToConsole = false;
|
||||
|
||||
protected Iterable<PaperCard> keyCards;
|
||||
protected Map<Integer,Integer> targetCMCs;
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
// 3. Add creatures, trying to follow mana curve
|
||||
|
||||
numSpellsNeeded = numSpellsNeeded - deckList.size(); //subtract keycard count
|
||||
addManaCurveCards(onColorCreaturesAndSpells, numSpellsNeeded , "Creatures and Spells");
|
||||
addManaCurveCards(onColorCreaturesAndSpells, numSpellsNeeded, "Creatures and Spells");
|
||||
if (logToConsole) {
|
||||
System.out.println("Post Creatures and Spells : " + deckList.size());
|
||||
}
|
||||
@@ -205,20 +205,20 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
|
||||
// 5. If there are still on-color cards, and the average cmc is low, add
|
||||
// extras.
|
||||
double avCMC=getAverageCMC(deckList);
|
||||
int maxCMC=getMaxCMC(deckList);
|
||||
double avCMC = getAverageCMC(deckList);
|
||||
int maxCMC = getMaxCMC(deckList);
|
||||
if (avCMC < 4) {
|
||||
addLowCMCCard();
|
||||
if(targetSize>60){
|
||||
if (targetSize > 60) {
|
||||
addLowCMCCard();
|
||||
}
|
||||
}
|
||||
if (avCMC < 3 && maxCMC<6) {
|
||||
if (avCMC < 3 && maxCMC < 6) {
|
||||
addLowCMCCard();
|
||||
}
|
||||
if (avCMC < 2.5 && maxCMC<5) {
|
||||
if (avCMC < 2.5 && maxCMC < 5) {
|
||||
addLowCMCCard();
|
||||
if(targetSize>60){
|
||||
if (targetSize > 60) {
|
||||
addLowCMCCard();
|
||||
}
|
||||
}
|
||||
@@ -237,8 +237,15 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
// 7. If there are still less than 22 non-land cards add off-color
|
||||
// cards. This should be avoided.
|
||||
int stillNeeds = numSpellsNeeded - deckList.size();
|
||||
if(stillNeeds>0)
|
||||
if (stillNeeds > 0)
|
||||
addCards(onColorCreaturesAndSpells, stillNeeds);
|
||||
stillNeeds = numSpellsNeeded - deckList.size();
|
||||
if (stillNeeds > 0)
|
||||
extendPlaysets(stillNeeds);
|
||||
stillNeeds = numSpellsNeeded - deckList.size();
|
||||
if (stillNeeds > 0)
|
||||
addRandomCards(stillNeeds);
|
||||
|
||||
if (logToConsole) {
|
||||
System.out.println("Post Randoms : " + deckList.size());
|
||||
}
|
||||
@@ -307,6 +314,31 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
|
||||
}
|
||||
|
||||
protected void extendPlaysets(int numSpellsNeeded){
|
||||
Map<PaperCard,Integer> currentCounts = new HashMap<>();
|
||||
List<PaperCard> cardsToAdd = new ArrayList<>();
|
||||
int i=0;
|
||||
for(PaperCard card: deckList){
|
||||
if(currentCounts.containsKey(card)){
|
||||
currentCounts.put(card, currentCounts.get(card) + 1);
|
||||
}else{
|
||||
currentCounts.put(card, 1);
|
||||
}
|
||||
}
|
||||
for(PaperCard card: currentCounts.keySet()){
|
||||
if(currentCounts.get(card)==2 || currentCounts.get(card)==3){
|
||||
cardsToAdd.add(card);
|
||||
++i;
|
||||
if(i >= numSpellsNeeded ){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
deckList.addAll(cardsToAdd);
|
||||
aiPlayables.removeAll(cardsToAdd);
|
||||
rankedColorList.removeAll(cardsToAdd);
|
||||
}
|
||||
|
||||
protected void generateTargetCMCs(){
|
||||
targetCMCs = new HashMap<>();
|
||||
targetCMCs.put(1,Math.round((MyRandom.getRandom().nextInt(12)+4)*targetSize/60));//10
|
||||
@@ -543,6 +575,16 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
return;
|
||||
}
|
||||
|
||||
int stillNeeds = targetSize - deckList.size();
|
||||
if (stillNeeds > 0)
|
||||
addCards(onColorCreaturesAndSpells, stillNeeds);
|
||||
stillNeeds = targetSize - deckList.size();
|
||||
if (stillNeeds > 0)
|
||||
extendPlaysets(stillNeeds);
|
||||
stillNeeds = targetSize - deckList.size();
|
||||
if (stillNeeds == 0)
|
||||
return;
|
||||
|
||||
Predicate<PaperCard> possibleFromFullPool = new Predicate<PaperCard>() {
|
||||
final Set<String> deckListNames = getDeckListNames();
|
||||
@Override
|
||||
@@ -603,7 +645,6 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
private void addLands(final int[] clrCnts) {
|
||||
// basic lands that are available in the deck
|
||||
final Iterable<PaperCard> basicLands = Iterables.filter(aiPlayables, Predicates.compose(CardRulesPredicates.Presets.IS_BASIC_LAND, PaperCard.FN_GET_RULES));
|
||||
final Set<PaperCard> snowLands = new HashSet<PaperCard>();
|
||||
|
||||
// total of all ClrCnts
|
||||
int totalColor = 0;
|
||||
@@ -617,10 +658,14 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
// add one of each land required first so that any rounding errors do not remove the only land of a colour
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (clrCnts[i] > 0) {
|
||||
float p = (float) clrCnts[i] / (float) totalColor;
|
||||
int nLand = Math.round(landsNeeded * p); // desired truncation to int
|
||||
if(nLand >0) {
|
||||
deckList.add(getBasicLand(i));
|
||||
landsNeeded--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// do not update landsNeeded until after the loop, because the
|
||||
@@ -634,19 +679,24 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
System.out.printf("Basics[%s]: %d/%d = %f%% = %d cards%n", MagicColor.Constant.BASIC_LANDS.get(i), clrCnts[i], totalColor, 100*p, nLand);
|
||||
}
|
||||
|
||||
PaperCard snowLand = null;
|
||||
// if appropriate snow-covered lands are available, add them
|
||||
for (final PaperCard cp : basicLands) {
|
||||
if (cp.getName().equals(MagicColor.Constant.SNOW_LANDS.get(i))) {
|
||||
snowLands.add(cp);
|
||||
nLand--;
|
||||
snowLand = cp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < nLand; j++) {
|
||||
if(snowLand!=null){
|
||||
deckList.add(snowLand);
|
||||
}else {
|
||||
deckList.add(getBasicLand(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// A common problem at this point is that p in the above loop was exactly 1/2,
|
||||
// and nLand rounded up for both colors, so that one too many lands was added.
|
||||
@@ -656,9 +706,6 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
deckList.remove(deckList.size() - 1);
|
||||
}
|
||||
|
||||
deckList.addAll(snowLands);
|
||||
aiPlayables.removeAll(snowLands);
|
||||
rankedColorList.removeAll(snowLands);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -849,7 +896,7 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
if(card.getRules().getMainPart().getType().isLand()){
|
||||
continue;
|
||||
}
|
||||
if (num +1 > 0) {
|
||||
if (num > 0) {
|
||||
cardsToAdd.add(card);
|
||||
if (logToConsole) {
|
||||
System.out.println("Extra needed[" + num + "]:" + card.getName() + " (" + card.getRules().getManaCost() + ")");
|
||||
|
||||
@@ -39,6 +39,12 @@ public class TournamentUtil {
|
||||
case MODERN_CARDGEN_DECK:
|
||||
deck = DeckgenUtil.buildCardGenDeck(FModel.getFormats().getModern(),true);
|
||||
break;
|
||||
case LEGACY_CARDGEN_DECK:
|
||||
deck = DeckgenUtil.buildLDACArchetypeDeck(FModel.getFormats().get("Legacy"),true);
|
||||
break;
|
||||
case VINTAGE_CARDGEN_DECK:
|
||||
deck = DeckgenUtil.buildLDACArchetypeDeck(FModel.getFormats().get("Vintage"),true);
|
||||
break;
|
||||
case MODERN_COLOR_DECK:
|
||||
deck = DeckgenUtil.getRandomColorDeck(FModel.getFormats().getModern().getFilterPrinted(),true);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user