Add in color identity as a sortable option in the deck editor and draft editor

This commit is contained in:
spjspj 2021-06-18 00:36:38 +10:00
parent e15217abb2
commit ae2787f119
5 changed files with 20 additions and 1 deletions

View file

@ -18,6 +18,7 @@ import mage.constants.*;
import mage.counters.Counter;
import mage.counters.CounterType;
import mage.designations.Designation;
import mage.filter.FilterMana;
import mage.game.Game;
import mage.game.command.Emblem;
import mage.game.command.Plane;
@ -856,6 +857,14 @@ public class CardView extends SimpleCardView {
return rarity;
}
public String getColorIdentityStr() {
FilterMana filterMana = originalCard.getColorIdentity();
if (filterMana.getColorCount() == 0) {
return CardUtil.concatManaSymbols(CardInfo.SPLIT_MANA_SEPARATOR_FULL, "{C}", "");
}
return CardUtil.concatManaSymbols(CardInfo.SPLIT_MANA_SEPARATOR_FULL, filterMana.toString(), "");
}
@Override
public String getExpansionSetCode() {
if (expansionSetCode == null) {