* Conspiracy - Fixed that it doesn't revert creature types of non-permanent cards when it leaves the battlefield (fixes #3911).

This commit is contained in:
LevelX2 2017-09-08 12:14:18 +02:00
parent 634c79a0a5
commit 66c4aec499
2 changed files with 187 additions and 12 deletions

View file

@ -5,42 +5,43 @@
*/
package mage.game;
import java.io.Serializable;
import mage.ObjectColor;
import mage.cards.Card;
import mage.util.SubTypeList;
import java.io.Serializable;
/**
* This class saves changed attributes of cards (e.g. in graveyard, exile or player hands or libraries).
*
* This class saves changed attributes of cards (e.g. in graveyard, exile or
* player hands or libraries).
*
* @author LevelX2
*/
public class CardAttribute implements Serializable {
public class CardAttribute implements Serializable {
protected ObjectColor color;
protected SubTypeList subtype;
public CardAttribute(Card card) {
color = card.getColor(null).copy();
subtype = card.getSubtype(null);
subtype = new SubTypeList();
subtype.addAll(subtype);
}
public CardAttribute(CardAttribute cardAttribute) {
this.color = cardAttribute.color;
this.subtype = cardAttribute.subtype;
}
public CardAttribute copy() {
return new CardAttribute(this);
}
public ObjectColor getColor() {
return color;
return color;
}
public SubTypeList getSubtype() {
return subtype;
}
}