forked from External/mage
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:
parent
978ebfc873
commit
9ba0da00ff
29 changed files with 97 additions and 47 deletions
|
|
@ -95,7 +95,7 @@ public class MatchPlayer implements Serializable {
|
|||
|
||||
public Deck generateDeck(DeckValidator deckValidator) {
|
||||
// auto complete deck
|
||||
while (deck.getCards().size() < deckValidator.getDeckMinSize() && !deck.getSideboard().isEmpty()) {
|
||||
while (deck.getMaindeckCards().size() < deckValidator.getDeckMinSize() && !deck.getSideboard().isEmpty()) {
|
||||
Card card = deck.getSideboard().iterator().next();
|
||||
deck.getCards().add(card);
|
||||
deck.getSideboard().remove(card);
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ public class TournamentPlayer {
|
|||
If user fails to submit deck on time, submit deck as is if meets minimum size,
|
||||
else add basic lands per suggested land counts
|
||||
*/
|
||||
if (deck.getCards().size() < minDeckSize) {
|
||||
int[] lands = DeckBuildUtils.landCountSuggestion(minDeckSize, deck.getCards());
|
||||
if (deck.getMaindeckCards().size() < minDeckSize) {
|
||||
int[] lands = DeckBuildUtils.landCountSuggestion(minDeckSize, deck.getMaindeckCards());
|
||||
Set<String> landSets = TournamentUtil.getLandSetCodeForDeckSets(deck.getExpansionSetCodes());
|
||||
deck.getCards().addAll(TournamentUtil.getLands("Plains", lands[0], landSets));
|
||||
deck.getCards().addAll(TournamentUtil.getLands("Island", lands[1], landSets));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue