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:
Oleg Agafonov 2021-02-02 06:40:49 +04:00
parent bc72384f0d
commit 50e5809a79
9 changed files with 314 additions and 35 deletions

View file

@ -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);