GUI: fixed broken add lands and random deck dialogs in deck editor (#7562);

This commit is contained in:
Oleg Agafonov 2021-02-13 20:26:06 +04:00
parent e94fd1b456
commit eb64a7bb73
7 changed files with 34 additions and 20 deletions

View file

@ -473,12 +473,13 @@ public class AddLandDialog extends MageDialog {
land_number = 0;
}
for (Card cd : cards) {
Mana m = cd.getManaCost().getMana();
red += m.getRed();
green += m.getGreen();
black += m.getBlack();
blue += m.getBlue();
white += m.getWhite();
for (String s : cd.getManaCostSymbols()) {
if (s.contains("W")) white++;
if (s.contains("U")) blue++;
if (s.contains("B")) black++;
if (s.contains("R")) red++;
if (s.contains("G")) green++;
}
}
int total = red + green + black + blue + white;