mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
GUI, deck: improved invalid deck information (added more details in wrong commander color);
This commit is contained in:
parent
8649869ed4
commit
3f1a02aa03
3 changed files with 5 additions and 5 deletions
|
|
@ -88,13 +88,13 @@ public abstract class AbstractCommander extends Constructed {
|
|||
boolean valid = true;
|
||||
for (Card card : deck.getCards()) {
|
||||
if (!ManaUtil.isColorIdentityCompatible(colorIdentity, card.getColorIdentity())) {
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (" + colorIdentity.toString() + ')', true);
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (need " + colorIdentity + ", but get " + card.getColorIdentity() + ")", true);
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
for (Card card : deck.getSideboard()) {
|
||||
if (!ManaUtil.isColorIdentityCompatible(colorIdentity, card.getColorIdentity())) {
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (" + colorIdentity.toString() + ')', true);
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (need " + colorIdentity + ", but get " + card.getColorIdentity() + ")", true);
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public class Brawl extends Constructed {
|
|||
&& !(colorIdentity.isColorless()
|
||||
&& basicsInDeck.size() == 1
|
||||
&& basicsInDeck.contains(card.getName()))) {
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (" + colorIdentity.toString() + ')', true);
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (need " + colorIdentity + ", but get " + card.getColorIdentity() + ")", true);
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ public class Brawl extends Constructed {
|
|||
&& !(colorIdentity.isColorless()
|
||||
&& basicsInDeck.size() == 1
|
||||
&& basicsInDeck.contains(card.getName()))) {
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (" + colorIdentity.toString() + ')', true);
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (need " + colorIdentity + ", but get " + card.getColorIdentity() + ")", true);
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ public class Oathbreaker extends Constructed {
|
|||
|
||||
for (Card card : deck.getCards()) {
|
||||
if (!ManaUtil.isColorIdentityCompatible(allCommandersColor, card.getColorIdentity())) {
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (" + card.getColorIdentity() + ')', true);
|
||||
addError(DeckValidatorErrorType.OTHER, card.getName(), "Invalid color (need " + allCommandersColor + ", but get " + card.getColorIdentity() + ")", true);
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue