From 6e49f4a21c1272d1dd7c8a94eaa7efaaf5f8154c Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Fri, 25 Jan 2019 21:53:01 -0600 Subject: [PATCH] - little fix Deadbridge Chant. Now works well with Humility, etc. --- Mage.Sets/src/mage/cards/d/DeadbridgeChant.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DeadbridgeChant.java b/Mage.Sets/src/mage/cards/d/DeadbridgeChant.java index 3437bb03a0..a7624a76ce 100644 --- a/Mage.Sets/src/mage/cards/d/DeadbridgeChant.java +++ b/Mage.Sets/src/mage/cards/d/DeadbridgeChant.java @@ -1,4 +1,3 @@ - package mage.cards.d; import java.util.UUID; @@ -21,13 +20,10 @@ import mage.players.Player; * * @author LevelX2 */ - - public final class DeadbridgeChant extends CardImpl { public DeadbridgeChant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{G}"); // When Deadbridge Chant enters the battlefield, put the top ten cards of your library into your graveyard. this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(10))); @@ -64,9 +60,10 @@ class DeadbridgeChantEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null && !player.getGraveyard().isEmpty()) { - Card card = player.getGraveyard().getRandom(game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null + && !controller.getGraveyard().isEmpty()) { + Card card = controller.getGraveyard().getRandom(game); if (card != null) { Zone targetZone = Zone.HAND; String text = " put into hand of "; @@ -74,8 +71,8 @@ class DeadbridgeChantEffect extends OneShotEffect { targetZone = Zone.BATTLEFIELD; text = " put onto battlefield for "; } - card.moveToZone(targetZone, source.getSourceId(), game, false); - game.informPlayers("Deadbridge Chant: " + card.getName() + text + player.getLogName()); + controller.moveCards(card, targetZone, source, game); + game.informPlayers("Deadbridge Chant: " + card.getName() + text + controller.getLogName()); return true; } }