Fix imprint cards that are not working correctly with mutate

This commit is contained in:
Lyu Zong-Hong
2021-02-15 15:49:20 +09:00
parent 635968a637
commit 2ff7d25a85
4 changed files with 17 additions and 5 deletions

View File

@@ -743,6 +743,17 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
if (c == gameCard) continue;
hostCard.addImprintedCard(c);
}
// For Duplicant
if (sa.hasParam("ImprintLast")) {
Card lastCard = null;
for (final Card c : movedCard.getOwner().getCardsIn(destination)) {
if (hostCard.hasImprintedCard(c)) {
hostCard.removeImprintedCard(c);
lastCard = c;
}
}
hostCard.addImprintedCard(lastCard);
}
}
}
}

View File

@@ -134,7 +134,8 @@ public class CopyPermanentEffect extends TokenEffectBase {
chooser = AbilityUtils.getDefinedPlayers(sa.getHostCard(), choose, sa).get(0);
}
CardCollectionView choices = game.getCardsIn(ZoneType.Battlefield);
// For Mimic Vat with mutated creature, need to choose one imprinted card
CardCollectionView choices = sa.hasParam("Defined") ? getDefinedCardsOrTargeted(sa) : game.getCardsIn(ZoneType.Battlefield);
choices = CardLists.getValidCards(choices, sa.getParam("Choices"), activator, host);
if (!choices.isEmpty()) {
String title = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") : Localizer.getInstance().getMessage("lblChooseaCard");

View File

@@ -3,7 +3,7 @@ ManaCost:6
Types:Artifact Creature Shapeshifter
PT:2/4
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint — When CARDNAME enters the battlefield, you may exile target nontoken creature.
SVar:TrigExile:DB$ ChangeZone | Unimprint$ True | Imprint$ True | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Creature.nonToken | TgtPrompt$ Select target nontoken creature
SVar:TrigExile:DB$ ChangeZone | Unimprint$ True | Imprint$ True | ImprintLast$ True | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Creature.nonToken | TgtPrompt$ Select target nontoken creature
S:Mode$ Continuous | Affected$ Card.Self | AddType$ ImprintedCreatureType | CheckSVar$ Z | SVarCompare$ EQ1 | SetPower$ X | SetToughness$ Y | References$ X,Y,Z | Description$ As long as a card exiled with Duplicant is a creature card, Duplicant has the power, toughness, and creature types of the last creature card exiled with Duplicant. It's still a Shapeshifter.
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsImprinted | Execute$ DBCleanup
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup

View File

@@ -2,10 +2,10 @@ Name:Mimic Vat
ManaCost:3
Types:Artifact
T:Mode$ ChangesZone | ValidCard$ Creature.nonToken | Origin$ Battlefield | Destination$ Graveyard | OptionalDecider$ You | Execute$ TrigReturn | TriggerZones$ Battlefield | TriggerDescription$ Imprint — Whenever a nontoken creature dies, you may exile that card. If you do, return each other card exiled with CARDNAME to its owner's graveyard.
SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Graveyard | Defined$ Imprinted | ChangeNum$ 1 | SubAbility$ DBCleanup
SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Graveyard | Defined$ Imprinted | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True | SubAbility$ DBExile
SVar:DBExile:DB$ ChangeZone | Imprint$ True | Origin$ Graveyard | Destination$ Exile | Defined$ TriggeredNewCardLKICopy | ChangeNum$ 1 | AILogic$ MimicVat
A:AB$ CopyPermanent | Cost$ 3 T | Defined$ Imprinted.ExiledWithSource | PumpKeywords$ Haste | AtEOT$ Exile | AILogic$ MimicVat | SpellDescription$ Create a token that's a copy of a card exiled with CARDNAME. It gains haste. Exile it at the beginning of the next end step.
SVar:DBExile:DB$ ChangeZone | Imprint$ True | Origin$ Graveyard | Destination$ Exile | Defined$ TriggeredNewCardLKICopy | AILogic$ MimicVat
A:AB$ CopyPermanent | Cost$ 3 T | Defined$ Imprinted.ExiledWithSource | Choices$ Card | PumpKeywords$ Haste | AtEOT$ Exile | AILogic$ MimicVat | SpellDescription$ Create a token that's a copy of a card exiled with CARDNAME. It gains haste. Exile it at the beginning of the next end step.
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsImprinted+ExiledWithSource | Execute$ DBForget
SVar:DBForget:DB$ Pump | ForgetImprinted$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self | Destination$ Any | Execute$ DBCleanImprinted | Static$ True