* Tiny Leaders Format - Fixed a bug that happened as you did not set the Leader name to the deck name.

This commit is contained in:
LevelX2 2015-03-20 17:30:12 +01:00
parent d80ba99af9
commit 10b7791cd2
2 changed files with 19 additions and 10 deletions

View file

@ -151,7 +151,14 @@ public class TinyLeaders extends DeckValidator {
if (commander == null || commander.getManaCost().convertedManaCost() > 3) {
if (commander == null) {
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 (deck.getName() == null) {
invalid.put("Leader", "You have to save your deck with the leader card name entered to the DECK NAME field of the DECK EDITOR (top left) so that XMage knows your leader." +
"(You can use the \"Sultai\" for a UBG (2/2) default Commander.)");
} else {
invalid.put("Leader", "Leader [" + deck.getName() + "] not found. You have to enter the name of the leader card into the DECK NAME field of the DECK EDITOR (top left). Check your spelling " +
"(use the \"Sultai\" for a UBG (2/2) default Commander)");
}
}
if (commander != null && commander.getManaCost().convertedManaCost() > 3) {
invalid.put("Leader", "Commanders converted mana cost is greater than 3");

View file

@ -121,6 +121,7 @@ public abstract class GameTinyLeadersImpl extends GameImpl{
*/
public static Card getCommanderCard(String commanderName, UUID ownerId) {
Card commander = null;
if (commanderName != null) {
switch (commanderName) {
case "Sultai":
commander = new DefaultCommander(ownerId, commanderName, "{U}{B}{G}");
@ -131,6 +132,7 @@ public abstract class GameTinyLeadersImpl extends GameImpl{
commander = cardInfo.getCard();
}
}
}
return commander;
}