forked from External/mage
Reworking card types in preparation for implementing Grist, the Hunger Tide (#7899)
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
parent
07e1dff10c
commit
572104b8fc
1159 changed files with 2704 additions and 2203 deletions
|
|
@ -2,9 +2,12 @@ package mage.game;
|
|||
|
||||
import mage.MageObject;
|
||||
import mage.ObjectColor;
|
||||
import mage.constants.CardType;
|
||||
import mage.util.SubTypes;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class saves changed attributes of mage objects (e.g. in command zone, graveyard, exile or
|
||||
|
|
@ -16,15 +19,18 @@ public class MageObjectAttribute implements Serializable {
|
|||
|
||||
protected ObjectColor color;
|
||||
protected SubTypes subtype;
|
||||
protected List<CardType> cardType;
|
||||
|
||||
public MageObjectAttribute(MageObject mageObject, Game game) {
|
||||
color = mageObject.getColor().copy();
|
||||
subtype = new SubTypes(mageObject.getSubtype(game));
|
||||
cardType = new ArrayList<>(mageObject.getCardType(game));
|
||||
}
|
||||
|
||||
public MageObjectAttribute(MageObjectAttribute mageObjectAttribute) {
|
||||
this.color = mageObjectAttribute.color;
|
||||
this.subtype = mageObjectAttribute.subtype;
|
||||
this.cardType = mageObjectAttribute.cardType;
|
||||
}
|
||||
|
||||
public MageObjectAttribute copy() {
|
||||
|
|
@ -39,4 +45,7 @@ public class MageObjectAttribute implements Serializable {
|
|||
return subtype;
|
||||
}
|
||||
|
||||
public List<CardType> getCardType() {
|
||||
return cardType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue