From f64fbf3195616bcd194f2b4a2f6e53b5fbef962d Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Tue, 23 Apr 2019 17:10:53 +0400 Subject: [PATCH] Fixed Vivien, Champion of the Wilds that it doesn't exile face down, added window for vivien's cards; --- .../mage/cards/v/VivienChampionOfTheWilds.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/v/VivienChampionOfTheWilds.java b/Mage.Sets/src/mage/cards/v/VivienChampionOfTheWilds.java index be63eb2713..af277acfcf 100644 --- a/Mage.Sets/src/mage/cards/v/VivienChampionOfTheWilds.java +++ b/Mage.Sets/src/mage/cards/v/VivienChampionOfTheWilds.java @@ -21,6 +21,7 @@ import mage.target.TargetCard; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCreaturePermanent; import mage.target.targetpointer.FixedTarget; +import mage.util.CardUtil; import java.util.UUID; @@ -57,7 +58,8 @@ public final class VivienChampionOfTheWilds extends CardImpl { ability.addTarget(new TargetCreaturePermanent(0, 1)); this.addAbility(ability); - // -2: Look at the top three cards of your library. Exile one face down and put the rest on the bottom of your library in any order. For as long as it remains exiled, you may look at that card and you may cast it if it's a creature card. + // -2: Look at the top three cards of your library. Exile one face down and put the rest on the bottom of your library in any order. + // For as long as it remains exiled, you may look at that card and you may cast it if it's a creature card. this.addAbility(new LoyaltyAbility(new VivienChampionOfTheWildsEffect(), -2)); } @@ -96,15 +98,25 @@ class VivienChampionOfTheWildsEffect extends OneShotEffect { if (player == null) { return false; } + + // select Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3)); - TargetCard target = new TargetCardInLibrary(); + FilterCard filter = new FilterCard("card to exile face down"); + TargetCard target = new TargetCardInLibrary(filter); if (!player.choose(outcome, cards, target, game)) { return false; } + + // exile Card card = game.getCard(target.getFirstTarget()); - if (!player.moveCards(card, Zone.EXILED, source, game)) { + if (!player.moveCardsToExile(card, source, game, false, + CardUtil.getCardExileZoneId(game, source), + CardUtil.createObjectRealtedWindowTitle(source, game, " (look and cast)"))) { return false; } + card.setFaceDown(true, game); + + // look and cast ContinuousEffect effect = new VivienChampionOfTheWildsLookEffect(player.getId()); effect.setTargetPointer(new FixedTarget(card, game)); game.addEffect(effect, source);