Fixed a sideboarding bug of Tiny Leaders Format (fixes #807).

This commit is contained in:
LevelX2 2015-03-19 00:54:04 +01:00
parent aff5f9f2e7
commit 78df43fd30
2 changed files with 7 additions and 1 deletions

View file

@ -151,7 +151,7 @@ public class TinyLeaders extends DeckValidator {
if (commander == null || commander.getManaCost().convertedManaCost() > 3) { if (commander == null || commander.getManaCost().convertedManaCost() > 3) {
if (commander == null) { if (commander == null) {
invalid.put("Leader", "Please be sure to set your leader in the NAME field in the DECK EDITOR (use the names Mardu, Sultai or Jeskai as default Commanders)"); invalid.put("Leader", "Please be sure to set your leader name in the NAME field in the DECK EDITOR (use the Sultai for a UBG (2/2) default Commander)");
} }
if (commander != null && commander.getManaCost().convertedManaCost() > 3) { if (commander != null && commander.getManaCost().convertedManaCost() > 3) {
invalid.put("Leader", "Commanders converted mana cost is greater than 3"); invalid.put("Leader", "Commanders converted mana cost is greater than 3");

View file

@ -349,6 +349,12 @@ public class TableController {
return false; return false;
} }
Deck deck = Deck.load(deckList, false, false); Deck deck = Deck.load(deckList, false, false);
if (table.getState() == TableState.SIDEBOARDING && table.getMatch() != null) {
MatchPlayer mPlayer = table.getMatch().getPlayer(playerId);
if (mPlayer != null) {
deck.setName(mPlayer.getDeck().getName());
}
}
if (!Main.isTestMode() && !table.getValidator().validate(deck)) { if (!Main.isTestMode() && !table.getValidator().validate(deck)) {
throw new InvalidDeckException("Invalid deck for this format", table.getValidator().getInvalid()); throw new InvalidDeckException("Invalid deck for this format", table.getValidator().getInvalid());
} }