Add Subtype to the CardAttribute Framework

This is a massive change. I’ve refrained from unrelated refactoring
when possible but there are still a lot of changes here.
This commit is contained in:
Samuel Sandeen 2016-08-28 17:30:10 -04:00
parent a1a3c0c6a7
commit 282443c231
272 changed files with 514 additions and 493 deletions

View file

@ -6,6 +6,8 @@
package mage.game;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import mage.ObjectColor;
import mage.cards.Card;
@ -17,13 +19,16 @@ import mage.cards.Card;
public class CardAttribute implements Serializable {
protected ObjectColor color;
protected List<String> subtype;
public CardAttribute(Card card) {
color = card.getColor(null).copy();
subtype = new ArrayList<String>(card.getSubtype(null));
}
public CardAttribute(CardAttribute cardAttribute) {
this.color = cardAttribute.color;
this.subtype = cardAttribute.subtype;
}
public CardAttribute copy() {
@ -34,4 +39,8 @@ public class CardAttribute implements Serializable {
return color;
}
public List<String> getSubtype() {
return subtype;
}
}