Basic groundwork for extra decks (contraptions, attractions) (#10378)

* extra deck cards not counted in deck size

* extra deck handling in deckbuilder

* move responsibility for extraDeckCard boolean to CardImpl

* remove redundant field copy
This commit is contained in:
Artemis Kearney 2023-08-06 20:06:32 -05:00 committed by GitHub
parent 978ebfc873
commit 9ba0da00ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 97 additions and 47 deletions

View file

@ -77,8 +77,8 @@ public final class DeckBuilder {
addCardsToDeck(remainingCards, min, max, deckCount[index]);
min = max + 1;
}
addCardsToDeck(remainingCards, 0, 4, deckSpells - deck.getCards().size());
addCardsToDeck(remainingCards, 5, 10, deckSpells - deck.getCards().size());
addCardsToDeck(remainingCards, 0, 4, deckSpells - deck.getMaindeckCards().size());
addCardsToDeck(remainingCards, 5, 10, deckSpells - deck.getMaindeckCards().size());
addLandsToDeck(allowedColors, setsToUse, landCardPool, callback);
Deck returnedDeck = deck;
@ -174,7 +174,7 @@ public final class DeckBuilder {
}
// Add optimal basic lands to deck.
while (deck.getCards().size() < deckSize) {
while (deck.getMaindeckCards().size() < deckSize) {
ColoredManaSymbol bestColor = null;
//Default to a color in the allowed colors
if (allowedColors != null && !allowedColors.isEmpty()) {