mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Revert freeform commander to singleton format (1 card copy max)
This commit is contained in:
parent
b4fdce53c4
commit
1bc022a94a
1 changed files with 13 additions and 0 deletions
|
@ -42,6 +42,19 @@ public class FreeformCommander extends Constructed {
|
|||
valid = false;
|
||||
}
|
||||
|
||||
Map<String, Integer> counts = new HashMap<>();
|
||||
countCards(counts, deck.getCards());
|
||||
countCards(counts, deck.getSideboard());
|
||||
|
||||
for (Map.Entry<String, Integer> entry : counts.entrySet()) {
|
||||
if (entry.getValue() > 1) {
|
||||
if (!basicLandNames.contains(entry.getKey())) {
|
||||
invalid.put(entry.getKey(), "Too many: " + entry.getValue());
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
generateFreeformHash();
|
||||
|
||||
if (deck.getSideboard().size() < 1 || deck.getSideboard().size() > 2) {
|
||||
|
|
Loading…
Reference in a new issue