mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Fix temporary clones keeping Remembered on Self
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user