Fix temporary clones keeping Remembered on Self

This commit is contained in:
tool4EvEr
2021-04-27 21:52:12 +02:00
parent d0dc16aa6f
commit 620e95cebf
2 changed files with 9 additions and 3 deletions

View File

@@ -143,6 +143,12 @@ public class CloneEffect extends SpellAbilityEffect {
tgtCard.updateStateForView();
// when clone is itself, cleanup from old abilities
if (host.equals(tgtCard)) {
tgtCard.clearImprintedCards();
tgtCard.clearRemembered();
}
// check if clone is now an Aura that needs to be attached
if (tgtCard.isAura() && !tgtCard.isInZone(ZoneType.Battlefield)) {
AttachEffect.attachAuraOnIndirectEnterBattlefield(tgtCard);
@@ -150,7 +156,7 @@ public class CloneEffect extends SpellAbilityEffect {
if (sa.hasParam("Duration")) {
final Card cloneCard = tgtCard;
// if clone is temporary, target needs old values back after
// if clone is temporary, target needs old values back after (keep Death-Mask Duplicant working)
final Iterable<Card> clonedImprinted = new CardCollection(tgtCard.getImprintedCards());
final Iterable<Object> clonedRemembered = new FCollection<>(tgtCard.getRemembered());
@@ -188,7 +194,7 @@ public class CloneEffect extends SpellAbilityEffect {
}
}
//Clear Remembered and Imprint lists
// now we can also cleanup in case target was another card
tgtCard.clearRemembered();
tgtCard.clearImprintedCards();