mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
Fixed CMC compare order.
This commit is contained in:
parent
201817b331
commit
d651fb65fa
2 changed files with 4 additions and 4 deletions
|
|
@ -533,7 +533,9 @@ public class CardUtil {
|
|||
|
||||
public static Set<Integer> getCMC(MageObject object) {
|
||||
Set<Integer> cmcObject = new HashSet<>();
|
||||
if (object instanceof Card) {
|
||||
if (object instanceof Spell) {
|
||||
cmcObject.add(((Spell)object).getConvertedManaCost());
|
||||
} else if (object instanceof Card) {
|
||||
Card card = (Card) object;
|
||||
if (card instanceof SplitCard) {
|
||||
SplitCard splitCard = (SplitCard) card;
|
||||
|
|
@ -542,8 +544,6 @@ public class CardUtil {
|
|||
} else {
|
||||
cmcObject.add(card.getManaCost().convertedManaCost());
|
||||
}
|
||||
} else if (object instanceof Spell) {
|
||||
cmcObject.add(((Spell)object).getConvertedManaCost());
|
||||
}
|
||||
return cmcObject;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue