mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
* 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:
parent
d80ba99af9
commit
10b7791cd2
2 changed files with 19 additions and 10 deletions
|
@ -151,7 +151,14 @@ 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 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) {
|
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");
|
||||||
|
|
|
@ -121,6 +121,7 @@ public abstract class GameTinyLeadersImpl extends GameImpl{
|
||||||
*/
|
*/
|
||||||
public static Card getCommanderCard(String commanderName, UUID ownerId) {
|
public static Card getCommanderCard(String commanderName, UUID ownerId) {
|
||||||
Card commander = null;
|
Card commander = null;
|
||||||
|
if (commanderName != null) {
|
||||||
switch (commanderName) {
|
switch (commanderName) {
|
||||||
case "Sultai":
|
case "Sultai":
|
||||||
commander = new DefaultCommander(ownerId, commanderName, "{U}{B}{G}");
|
commander = new DefaultCommander(ownerId, commanderName, "{U}{B}{G}");
|
||||||
|
@ -131,6 +132,7 @@ public abstract class GameTinyLeadersImpl extends GameImpl{
|
||||||
commander = cardInfo.getCard();
|
commander = cardInfo.getCard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return commander;
|
return commander;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue