diff --git a/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneEffect.java index 257945897e2..5dbe2964e67 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneEffect.java @@ -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); + } } } } diff --git a/forge-game/src/main/java/forge/game/ability/effects/CopyPermanentEffect.java b/forge-game/src/main/java/forge/game/ability/effects/CopyPermanentEffect.java index 5ed78d1b13f..33cbabcf1d8 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/CopyPermanentEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/CopyPermanentEffect.java @@ -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"); diff --git a/forge-gui/res/cardsfolder/d/duplicant.txt b/forge-gui/res/cardsfolder/d/duplicant.txt index 7b29f4f344b..c15b524332a 100644 --- a/forge-gui/res/cardsfolder/d/duplicant.txt +++ b/forge-gui/res/cardsfolder/d/duplicant.txt @@ -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 diff --git a/forge-gui/res/cardsfolder/m/mimic_vat.txt b/forge-gui/res/cardsfolder/m/mimic_vat.txt index 0b16e11a0cb..412dc353d7b 100644 --- a/forge-gui/res/cardsfolder/m/mimic_vat.txt +++ b/forge-gui/res/cardsfolder/m/mimic_vat.txt @@ -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