From 7a1795660a6ab869b8e66711a81e38d2081b4949 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 4 Sep 2020 01:29:31 +0400 Subject: [PATCH] Fixed missing copy fields in CardImpl (morph, modaldfc, art; related to rollback); --- Mage/src/main/java/mage/cards/CardImpl.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Mage/src/main/java/mage/cards/CardImpl.java b/Mage/src/main/java/mage/cards/CardImpl.java index 61e726ee6a..05a1b60669 100644 --- a/Mage/src/main/java/mage/cards/CardImpl.java +++ b/Mage/src/main/java/mage/cards/CardImpl.java @@ -59,7 +59,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card { protected boolean usesVariousArt = false; protected boolean splitCard; protected boolean morphCard; - protected boolean modalDFC; + protected boolean modalDFC; // modal double faces card protected List attachments = new ArrayList<>(); @@ -126,20 +126,23 @@ public abstract class CardImpl extends MageObjectImpl implements Card { ownerId = card.ownerId; cardNumber = card.cardNumber; expansionSetCode = card.expansionSetCode; + tokenSetCode = card.tokenSetCode; tokenDescriptor = card.tokenDescriptor; rarity = card.rarity; transformable = card.transformable; - if (transformable) { - secondSideCardClazz = card.secondSideCardClazz; - nightCard = card.nightCard; - } - spellAbility = null; // will be set on first getSpellAbility call if card has one. + secondSideCardClazz = card.secondSideCardClazz; + secondSideCard = null; // will be set on first getSecondCardFace call if card has one + nightCard = card.nightCard; + spellAbility = null; // will be set on first getSpellAbility call if card has one flipCard = card.flipCard; flipCardName = card.flipCardName; - splitCard = card.splitCard; usesVariousArt = card.usesVariousArt; + splitCard = card.splitCard; + morphCard = card.morphCard; + modalDFC = card.modalDFC; + this.attachments.addAll(card.attachments); }