From 5dbd5401fa21eecb768f321564f0598f00c4240a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 6 May 2015 15:57:39 +0200 Subject: [PATCH] * Dredge Ability - The effect is no longer active (e.g. for choosing the order of resolution) if not enough cards left in the library. --- Mage/src/mage/abilities/keyword/DredgeAbility.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Mage/src/mage/abilities/keyword/DredgeAbility.java b/Mage/src/mage/abilities/keyword/DredgeAbility.java index e24656c1b0..3bf8d0b04b 100644 --- a/Mage/src/mage/abilities/keyword/DredgeAbility.java +++ b/Mage/src/mage/abilities/keyword/DredgeAbility.java @@ -99,8 +99,9 @@ class DredgeEffect extends ReplacementEffectImpl { if (player != null && player.getLibrary().size() >= amount && player.chooseUse(outcome, new StringBuilder("Dredge ").append(sourceCard.getName()). append("? (").append(amount).append(" cards go from top of library to graveyard)").toString(), game)) { - if (!game.isSimulation()) + if (!game.isSimulation()) { game.informPlayers(new StringBuilder(player.getName()).append(" dreges ").append(sourceCard.getName()).toString()); + } Cards cardsToGrave = new CardsImpl(); cardsToGrave.addAll(player.getLibrary().getTopCards(game, amount)); player.moveCardsToGraveyardWithInfo(cardsToGrave, source, game, Zone.LIBRARY); @@ -118,6 +119,10 @@ class DredgeEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { - return event.getPlayerId().equals(source.getControllerId()); + if (event.getPlayerId().equals(source.getControllerId())) { + Player controller = game.getPlayer(source.getControllerId()); + return controller != null && controller.getLibrary().size() >= amount; + } + return false; } }