From 20d09443d54ce98b84e5eec454bbffda52466de1 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Wed, 9 Nov 2016 11:00:24 -0600 Subject: [PATCH] Changed Declaration in Stone to exile to the generic exile window instead of its own. Added card name identifier to the revealed hand in ExileCardYouChooseTargetOpponentEffect so you can see previously revealed cards when their hand is revealed multiple times. --- .../src/mage/cards/d/DeclarationInStone.java | 16 ++++++++-------- .../ExileCardYouChooseTargetOpponentEffect.java | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DeclarationInStone.java b/Mage.Sets/src/mage/cards/d/DeclarationInStone.java index 84c52c727c5..4b1db6cff5a 100644 --- a/Mage.Sets/src/mage/cards/d/DeclarationInStone.java +++ b/Mage.Sets/src/mage/cards/d/DeclarationInStone.java @@ -51,14 +51,14 @@ import mage.target.common.TargetCreaturePermanent; * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) */ public class DeclarationInStone extends CardImpl { - + public DeclarationInStone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{W}"); // Exile target creature and all other creatures its controller controls with the same name as that creature. // That player investigates for each nontoken creature exiled this way. this.getSpellAbility().addEffect(new DeclarationInStoneEffect()); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } public DeclarationInStone(final DeclarationInStone card) { @@ -72,7 +72,7 @@ public class DeclarationInStone extends CardImpl { } class DeclarationInStoneEffect extends OneShotEffect { - + private static final FilterCreaturePermanent creaturesOnly = new FilterCreaturePermanent(); private static final FilterCreaturePermanent nonTokenFilter = new FilterCreaturePermanent("nontoken creature"); static{ @@ -106,20 +106,20 @@ class DeclarationInStoneEffect extends OneShotEffect { String name = targetPermanent.getName(); for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controllerPermanentId)) { if (permanent != null && permanent.getName().equals(name)) { - + // only exile creatures (reported bug on awakened lands targetted exiling all other lands of same name) if (creaturesOnly.match(permanent, game)) { - you.moveCardToExileWithInfo(permanent, exileId, sourceObject.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); + you.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true); } - + // exiled count only matters for non-tokens - if (nonTokenFilter.match(permanent, game)) { + if (nonTokenFilter.match(permanent, game)) { exiledCount++; } } } } - + if (exiledCount > 0) { Token token = new ClueArtifactToken(); token.putOntoBattlefield(exiledCount, game, source.getSourceId(), controllerPermanentId, false, false); diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileCardYouChooseTargetOpponentEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileCardYouChooseTargetOpponentEffect.java index 69accfb8b0e..5517e52b383 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileCardYouChooseTargetOpponentEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileCardYouChooseTargetOpponentEffect.java @@ -65,9 +65,10 @@ public class ExileCardYouChooseTargetOpponentEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Player opponent = game.getPlayer(source.getFirstTarget()); + Card sourceCard = game.getCard(source.getSourceId()); if (controller != null && opponent != null) { if (!opponent.getHand().isEmpty()) { - opponent.revealCards("Exile " + filter.getMessage(), opponent.getHand(), game); + opponent.revealCards(sourceCard != null ? sourceCard.getIdName() + " (" + sourceCard.getZoneChangeCounter(game) + ")" : "Exile", opponent.getHand(), game); TargetCard target = new TargetCard(Zone.HAND, filter); if (controller.choose(Outcome.Exile, opponent.getHand(), target, game)) { Card card = opponent.getHand().get(target.getFirstTarget(), game);