forked from External/mage
New commander types support:
* [KHM] fixed legendary status of mdf cards (closes #7370, #7404, #7465, #7481); * Game: added support of split cards as commander (signature spell); * Game: added support of adventure cards as commander; * Game: added support of modal double faces cards as commander;
This commit is contained in:
parent
bc72384f0d
commit
50e5809a79
9 changed files with 314 additions and 35 deletions
|
|
@ -13,8 +13,8 @@ import mage.util.CardUtil;
|
|||
import mage.util.SubTypes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
@ -127,6 +127,12 @@ public abstract class ModalDoubleFacesCard extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<SuperType> getSuperType() {
|
||||
// CardImpl's constructor can call some code on init, so you must check left/right before
|
||||
// it's a bad workaround
|
||||
return leftHalfCard != null ? leftHalfCard.getSuperType() : supertype;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<CardType> getCardType() {
|
||||
|
|
@ -154,11 +160,6 @@ public abstract class ModalDoubleFacesCard extends CardImpl {
|
|||
return leftHalfCard.hasSubtype(subtype, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<SuperType> getSuperType() {
|
||||
return EnumSet.noneOf(SuperType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Abilities<Ability> getAbilities() {
|
||||
return getInnerAbilities(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue