forked from External/mage
* Fixed some problems with color changes of cards and spells - e.g. Painter's Servant (fixes #7325 fixes #6487).
This commit is contained in:
parent
f6c70d5d4a
commit
c67ce93ec4
13 changed files with 294 additions and 115 deletions
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.game;
|
||||
|
||||
import java.io.Serializable;
|
||||
import mage.ObjectColor;
|
||||
import mage.cards.Card;
|
||||
import mage.util.SubTypeList;
|
||||
|
||||
/**
|
||||
* This class saves changed attributes of cards (e.g. in graveyard, exile or
|
||||
* player hands or libraries).
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CardAttribute implements Serializable {
|
||||
|
||||
protected ObjectColor color;
|
||||
protected SubTypeList subtype;
|
||||
|
||||
public CardAttribute(Card card, Game game) {
|
||||
color = card.getColor(null).copy();
|
||||
subtype = new SubTypeList();
|
||||
subtype.addAll(card.getSubtype(game));
|
||||
}
|
||||
|
||||
public CardAttribute(CardAttribute cardAttribute) {
|
||||
this.color = cardAttribute.color;
|
||||
this.subtype = cardAttribute.subtype;
|
||||
}
|
||||
|
||||
public CardAttribute copy() {
|
||||
return new CardAttribute(this);
|
||||
}
|
||||
|
||||
public ObjectColor getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public SubTypeList getSubtype() {
|
||||
return subtype;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue