GUI, deck: improved invalid deck information (added more details in wrong commander color);

This commit is contained in:
Oleg Agafonov 2025-05-24 00:20:54 +04:00
parent 8649869ed4
commit 3f1a02aa03
3 changed files with 5 additions and 5 deletions

View file

@ -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;
}
}