forked from External/mage
* Fixed the handling of comparing characteristics concerning split cards (related to the recent rule changes).
This commit is contained in:
parent
4b421fa722
commit
0b827b239c
6 changed files with 67 additions and 31 deletions
|
|
@ -27,6 +27,10 @@
|
|||
*/
|
||||
package mage.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.ObjectColor;
|
||||
|
|
@ -36,7 +40,6 @@ import mage.abilities.SpellAbility;
|
|||
import mage.abilities.costs.VariableCost;
|
||||
import mage.abilities.costs.mana.*;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.filter.FilterMana;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -44,11 +47,6 @@ import mage.game.permanent.token.Token;
|
|||
import mage.game.stack.Spell;
|
||||
import mage.util.functions.CopyTokenFunction;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
|
|
@ -540,13 +538,7 @@ public final class CardUtil {
|
|||
cmcObject.add(object.getConvertedManaCost());
|
||||
} else if (object instanceof Card) {
|
||||
Card card = (Card) object;
|
||||
if (card instanceof SplitCard) {
|
||||
SplitCard splitCard = (SplitCard) card;
|
||||
cmcObject.add(splitCard.getLeftHalfCard().getConvertedManaCost());
|
||||
cmcObject.add(splitCard.getRightHalfCard().getConvertedManaCost());
|
||||
} else {
|
||||
cmcObject.add(card.getConvertedManaCost());
|
||||
}
|
||||
cmcObject.add(card.getConvertedManaCost());
|
||||
}
|
||||
return cmcObject;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue