diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java index d944f8068f..720de03ebf 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java @@ -166,6 +166,12 @@ public class Commander extends Constructed { } } } + + // no needs in cards check on wrong commanders + if (!valid) { + return false; + } + for (Card card : deck.getCards()) { if (!cardHasValidColor(colorIdentity, card)) { invalid.put(card.getName(), "Invalid color (" + colorIdentity.toString() + ')'); diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/FreeformCommander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/FreeformCommander.java index 5e2ce9b0d2..4a066bf665 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/FreeformCommander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/FreeformCommander.java @@ -67,8 +67,6 @@ public class FreeformCommander extends Constructed { } } - generateFreeformHash(); - if (deck.getSideboard().size() < 1 || deck.getSideboard().size() > 2) { invalid.put("Commander", "Sideboard must contain only the commander(s)"); valid = false; @@ -116,6 +114,11 @@ public class FreeformCommander extends Constructed { } } + // no needs in cards check on wrong commanders + if (!valid) { + return false; + } + for (Card card : deck.getCards()) { if (!cardHasValidColor(colorIdentity, card)) { invalid.put(card.getName(), "Invalid color (" + colorIdentity.toString() + ')'); @@ -142,8 +145,4 @@ public class FreeformCommander extends Constructed { || cardColor.isRed() && !commander.isRed() || cardColor.isWhite() && !commander.isWhite()); } - - public void generateFreeformHash() { - return; - } } diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/PennyDreadfulCommander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/PennyDreadfulCommander.java index 6479df83be..2e8acf10d8 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/PennyDreadfulCommander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/PennyDreadfulCommander.java @@ -124,6 +124,12 @@ public class PennyDreadfulCommander extends Constructed { } } } + + // no needs in cards check on wrong commanders + if (!valid) { + return false; + } + for (Card card : deck.getCards()) { if (!cardHasValidColor(colorIdentity, card)) { invalid.put(card.getName(), "Invalid color (" + colorIdentity.toString() + ')');