fixed color-changing effects removing subtypes

This commit is contained in:
Evan Kranzler 2017-09-26 20:30:52 -04:00
parent 3ead624f76
commit 21d3db39c8
7 changed files with 24 additions and 43 deletions

View file

@ -21,10 +21,10 @@ public class CardAttribute implements Serializable {
protected ObjectColor color;
protected SubTypeList subtype;
public CardAttribute(Card card) {
public CardAttribute(Card card, Game game) {
color = card.getColor(null).copy();
subtype = new SubTypeList();
subtype.addAll(subtype);
subtype.addAll(card.getSubtype(game));
}
public CardAttribute(CardAttribute cardAttribute) {

View file

@ -1079,8 +1079,8 @@ public class GameState implements Serializable, Copyable<GameState> {
return cardAttribute.get(cardId);
}
public CardAttribute getCreateCardAttribute(Card card) {
CardAttribute cardAtt = cardAttribute.computeIfAbsent(card.getId(), k -> new CardAttribute(card));
public CardAttribute getCreateCardAttribute(Card card, Game game) {
CardAttribute cardAtt = cardAttribute.computeIfAbsent(card.getId(), k -> new CardAttribute(card, game));
return cardAtt;
}