mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
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:
parent
a1a3c0c6a7
commit
282443c231
272 changed files with 514 additions and 493 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue