Fixed deck size check

This commit is contained in:
Oleg Agafonov 2019-04-05 12:46:54 +04:00
parent ace8dc64f3
commit fed433657c
3 changed files with 9 additions and 9 deletions

View file

@ -76,7 +76,7 @@ public class Commander extends Constructed {
@Override
public int getDeckMinSize() {
return 99;
return 98;
}
@Override
@ -89,8 +89,8 @@ public class Commander extends Constructed {
boolean valid = true;
FilterMana colorIdentity = new FilterMana();
if (deck.getCards().size() + deck.getSideboard().size() != getDeckMinSize() + getSideboardMinSize()) {
invalid.put("Deck", "Must contain " + getDeckMinSize() + getSideboardMinSize() + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
if (deck.getCards().size() + deck.getSideboard().size() != 100) {
invalid.put("Deck", "Must contain " + 100 + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
valid = false;
}

View file

@ -36,7 +36,7 @@ public class FreeformCommander extends Constructed {
@Override
public int getDeckMinSize() {
return 99;
return 98;
}
@Override
@ -49,8 +49,8 @@ public class FreeformCommander extends Constructed {
boolean valid = true;
FilterMana colorIdentity = new FilterMana();
if (deck.getCards().size() + deck.getSideboard().size() != getDeckMinSize() + getSideboardMinSize()) {
invalid.put("Deck", "Must contain " + getDeckMinSize() + getSideboardMinSize() + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
if (deck.getCards().size() + deck.getSideboard().size() != 100) {
invalid.put("Deck", "Must contain " + 100 + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
valid = false;
}

View file

@ -38,7 +38,7 @@ public class PennyDreadfulCommander extends Constructed {
@Override
public int getDeckMinSize() {
return 99;
return 98;
}
@Override
@ -51,8 +51,8 @@ public class PennyDreadfulCommander extends Constructed {
boolean valid = true;
FilterMana colorIdentity = new FilterMana();
if (deck.getCards().size() + deck.getSideboard().size() != getDeckMinSize() + getSideboardMinSize()) {
invalid.put("Deck", "Must contain " + getDeckMinSize() + +getSideboardMinSize() + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
if (deck.getCards().size() + deck.getSideboard().size() != 100) {
invalid.put("Deck", "Must contain " + 100 + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
valid = false;
}