mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
fixed color-changing effects removing subtypes
This commit is contained in:
parent
3ead624f76
commit
21d3db39c8
7 changed files with 24 additions and 43 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue