Commit a484b528 authored by Hans Mackowiak's avatar Hans Mackowiak

CloneEffect: add ChoiceZone and make the choice there mandatory

parent 483a01b9
......@@ -64,11 +64,15 @@ public class CloneEffect extends SpellAbilityEffect {
Card cardToCopy = null;
if (sa.hasParam("Choices")) {
CardCollectionView choices = game.getCardsIn(ZoneType.Battlefield);
ZoneType choiceZone = ZoneType.Battlefield;
if (sa.hasParam("ChoiceZone")) {
choiceZone = ZoneType.smartValueOf(sa.getParam("ChoiceZone"));
}
CardCollectionView choices = game.getCardsIn(choiceZone);
choices = CardLists.getValidCards(choices, sa.getParam("Choices"), activator, host);
String title = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") : "Choose a card ";
cardToCopy = activator.getController().chooseSingleEntityForEffect(choices, sa, title, true);
cardToCopy = activator.getController().chooseSingleEntityForEffect(choices, sa, title, false);
} else if (sa.hasParam("Defined")) {
List<Card> cloneSources = AbilityUtils.getDefinedCards(host, sa.getParam("Defined"), sa);
if (!cloneSources.isEmpty()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment