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();

View File

@@ -7,6 +7,6 @@ K:ETBReplacement:Copy:ChooseCreature:Optional
SVar:ChooseCreature:DB$ ChooseCard | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True | AILogic$ Clone | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield, except it doesn't copy that creature's color and it has "At the beginning of your upkeep, you may have this creature become a copy of target creature, except it doesn't copy that creature's color and it has this ability."
SVar:DBCopy:DB$ Clone | Defined$ Remembered | Colors$ Blue | OverwriteColors$ True | AddTriggers$ VesDopUpkeepTrig | AddSVars$ VesDopCopy,VesDopUpkeepTrig
SVar:VesDopUpkeepTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ VesDopCopy | TriggerDescription$ At the beginning of your upkeep, you may have this creature become a copy of target creature, except it doesn't copy that creature's color and it has this ability.
SVar:VesDopCopy:DB$ Clone | ValidTgts$ Creature | TgtPrompt$ Select target creature to copy. | Optional$ True | Colors$ Blue | OverwriteColors$ True | GainThisAbility$ True | AddSVars$ VesDopCopy | AILogic$ CloneBestCreature | SubAbility$ DBCleanup
SVar:VesDopCopy:DB$ Clone | ValidTgts$ Creature | TgtPrompt$ Select target creature to copy. | Optional$ True | Colors$ Blue | OverwriteColors$ True | GainThisAbility$ True | AddSVars$ VesDopCopy | AILogic$ CloneBestCreature
SVar:Picture:http://www.wizards.com/global/images/magic/general/vesuvan_doppelganger.jpg
Oracle:You may have Vesuvan Doppelganger enter the battlefield as a copy of any creature on the battlefield, except it doesn't copy that creature's color and it has "At the beginning of your upkeep, you may have this creature become a copy of target creature, except it doesn't copy that creature's color and it has this ability."