Skip to content

Commit

Permalink
[GRN] Some more fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
LevelX2 committed Sep 22, 2018
1 parent b815c4c commit 3eb4df5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Mage.Sets/src/mage/cards/d/DeviousCoverUp.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public DeviousCoverUpEffect copy() {

@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();
Expand All @@ -76,8 +76,8 @@ public boolean apply(Game game, Ability source) {
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;
}
}
14 changes: 10 additions & 4 deletions Mage.Sets/src/mage/cards/e/EtrataTheSilencer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
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;
Expand Down Expand Up @@ -102,7 +102,7 @@ public String getRule() {
+ "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";
}
}

Expand Down Expand Up @@ -143,7 +143,13 @@ public boolean apply(Game game, Ability source) {
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);
Expand Down

0 comments on commit 3eb4df5

Please sign in to comment.