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