From 3eb4df5fbe869df30734f7c2c7388a8e708d3e32 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 22 Sep 2018 22:32:29 +0200 Subject: [PATCH] [GRN] Some more fixes. --- Mage.Sets/src/mage/cards/d/DeviousCoverUp.java | 8 ++++---- Mage.Sets/src/mage/cards/e/EtrataTheSilencer.java | 14 ++++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DeviousCoverUp.java b/Mage.Sets/src/mage/cards/d/DeviousCoverUp.java index 4bbb21daeb7..3bc89c7350a 100644 --- a/Mage.Sets/src/mage/cards/d/DeviousCoverUp.java +++ b/Mage.Sets/src/mage/cards/d/DeviousCoverUp.java @@ -65,8 +65,8 @@ class DeviousCoverUpEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getFirstTarget()); - if (player == null || !player.chooseUse(outcome, "Shuffle the targeted cards into your library?", source, game)) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null || !controller.chooseUse(outcome, "Shuffle the targeted cards into your library?", source, game)) { return false; } Cards cards = new CardsImpl(); @@ -76,8 +76,8 @@ class DeviousCoverUpEffect extends OneShotEffect { cards.add(card); } } - player.getLibrary().addAll(cards.getCards(game), game); - player.shuffleLibrary(source, game); + controller.putCardsOnTopOfLibrary(cards, game, source, false); + controller.shuffleLibrary(source, game); return true; } } diff --git a/Mage.Sets/src/mage/cards/e/EtrataTheSilencer.java b/Mage.Sets/src/mage/cards/e/EtrataTheSilencer.java index 19276ee723f..8d28bb9ccad 100644 --- a/Mage.Sets/src/mage/cards/e/EtrataTheSilencer.java +++ b/Mage.Sets/src/mage/cards/e/EtrataTheSilencer.java @@ -8,12 +8,12 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ShuffleIntoLibrarySourceEffect; import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.Card; -import mage.constants.SubType; -import mage.constants.SuperType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.FilterCard; @@ -102,7 +102,7 @@ class EtrataTheSilencerTriggeredAbility extends TriggeredAbilityImpl { + "and put a hit counter on that card. " + "That player loses the game if they own three or more " + "exiled cards with hit counters on them. " - + "{this}'s owner shuffles {this} into their library."; + + "{this}'s owner shuffles {this} into their library"; } } @@ -143,7 +143,13 @@ class EtrataTheSilencerEffect extends OneShotEffect { if (card != null) { card.addCounters(CounterType.HIT.createInstance(), source, game); } - if (game.getExile().getExileZone(player.getId()).count(filter, game) > 2) { + int cardsFound = 0; + for (Card exiledCard : game.getExile().getAllCards(game)) { + if (exiledCard.getCounters(game).getCount(CounterType.HIT) > 1 && exiledCard.getOwnerId().equals(player.getId())) { + cardsFound++; + } + } + if (cardsFound > 2) { player.lost(game); } return new ShuffleIntoLibrarySourceEffect().apply(game, source);