forked from External/mage
[BRC] Implement Rootpath Purifier (ready for review) (#10363)
* refactor check supertype methods * change supertype to list to match card type * refactor various subtype methods * implement mageobjectattribute for supertype * a few fixes * [BRC] Implement Rootpath Purifier * a few extra fixes * more fixes * add test for purifier
This commit is contained in:
parent
a850e3660b
commit
024c3081df
98 changed files with 489 additions and 238 deletions
|
|
@ -38,9 +38,9 @@ public abstract class MageObjectImpl implements MageObject {
|
|||
private String cardNumber = "";
|
||||
private int imageNumber = 0;
|
||||
|
||||
protected List<SuperType> supertype = new ArrayList<>();
|
||||
protected List<CardType> cardType = new ArrayList<>();
|
||||
protected SubTypes subtype = new SubTypes();
|
||||
protected Set<SuperType> supertype = EnumSet.noneOf(SuperType.class);
|
||||
protected Abilities<Ability> abilities;
|
||||
|
||||
protected String text;
|
||||
|
|
@ -146,7 +146,14 @@ public abstract class MageObjectImpl implements MageObject {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Set<SuperType> getSuperType() {
|
||||
public List<SuperType> getSuperType(Game game) {
|
||||
if (game != null) {
|
||||
// dynamic
|
||||
MageObjectAttribute mageObjectAttribute = game.getState().getMageObjectAttribute(getId());
|
||||
if (mageObjectAttribute != null) {
|
||||
return mageObjectAttribute.getSuperType();
|
||||
}
|
||||
}
|
||||
return supertype;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue