diff --git a/Mage.Sets/src/mage/sets/eventide/MerrowBonegnawer.java b/Mage.Sets/src/mage/sets/eventide/MerrowBonegnawer.java index f8be8da2f87..2273adfe092 100644 --- a/Mage.Sets/src/mage/sets/eventide/MerrowBonegnawer.java +++ b/Mage.Sets/src/mage/sets/eventide/MerrowBonegnawer.java @@ -50,11 +50,11 @@ import mage.target.TargetPlayer; * @author jeffwadsworth */ public class MerrowBonegnawer extends CardImpl { - + private UUID exileId = UUID.randomUUID(); - + private static final FilterSpell filter = new FilterSpell("black spell"); - + static { filter.add(new ColorPredicate(ObjectColor.BLACK)); } @@ -69,13 +69,13 @@ public class MerrowBonegnawer extends CardImpl { this.toughness = new MageInt(1); // {tap}: Target player exiles a card from his or her graveyard. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileFromZoneTargetEffect(Zone.GRAVEYARD, exileId, "Merrow Bonegnawer", new FilterCard("a card")), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileFromZoneTargetEffect(Zone.GRAVEYARD, exileId, getIdName(), new FilterCard()), new TapSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); - + // Whenever you cast a black spell, you may untap Merrow Bonegnawer. this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), filter, true, false)); - + } public MerrowBonegnawer(final MerrowBonegnawer card) { diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/OblivionRingTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/OblivionRingTest.java index 1324dee0596..ef5dc6ae622 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/OblivionRingTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/OblivionRingTest.java @@ -92,10 +92,10 @@ public class OblivionRingTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Jace Beleren"); addCard(Zone.HAND, playerA, "Revoke Existence"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "-1: Target player draws one card", playerA); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "-1: Target player draws a card", playerA); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oblivion Ring"); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Revoke Existence", "Oblivion Ring"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-1: Target player draws one card", playerA); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-1: Target player draws a card", playerA); setStopAt(1, PhaseStep.END_TURN); execute(); diff --git a/Mage/src/mage/abilities/costs/common/TapTargetCost.java b/Mage/src/mage/abilities/costs/common/TapTargetCost.java index 749eea7aff5..8f448eaa093 100644 --- a/Mage/src/mage/abilities/costs/common/TapTargetCost.java +++ b/Mage/src/mage/abilities/costs/common/TapTargetCost.java @@ -76,7 +76,7 @@ public class TapTargetCost extends CostImpl { @Override public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - return target.canChoose(controllerId, game); + return target.canChoose(sourceId, controllerId, game); } @Override diff --git a/Mage/src/mage/abilities/effects/common/ExileFromZoneTargetEffect.java b/Mage/src/mage/abilities/effects/common/ExileFromZoneTargetEffect.java index 48be98f6899..028237b01cf 100644 --- a/Mage/src/mage/abilities/effects/common/ExileFromZoneTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/ExileFromZoneTargetEffect.java @@ -1,16 +1,16 @@ /* * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR @@ -20,7 +20,7 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. @@ -28,17 +28,18 @@ package mage.abilities.effects.common; import java.util.UUID; -import mage.constants.Outcome; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; +import mage.constants.Outcome; +import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.Game; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInYourGraveyard; +import mage.util.CardUtil; /** * @@ -110,10 +111,6 @@ public class ExileFromZoneTargetEffect extends OneShotEffect { } private void setText() { - if (amount == 1) { - staticText = "Target player exiles a " + filter.getMessage() + " from his or her " + zone.toString().toLowerCase(); - } else { - staticText = "Target player exiles " + amount + " " + filter.getMessage() + " from his or her " + zone.toString().toLowerCase(); - } + staticText = "target player exiles " + CardUtil.numberToText(exileName, "a") + filter.getMessage() + " from his or her " + zone.toString().toLowerCase(); } } diff --git a/Mage/src/mage/abilities/keyword/ConspireAbility.java b/Mage/src/mage/abilities/keyword/ConspireAbility.java index 674505173bb..cef23120fe0 100644 --- a/Mage/src/mage/abilities/keyword/ConspireAbility.java +++ b/Mage/src/mage/abilities/keyword/ConspireAbility.java @@ -158,10 +158,11 @@ public class ConspireAbility extends StaticAbility implements OptionalAdditional @Override public void addOptionalAdditionalCosts(Ability ability, Game game) { if (ability instanceof SpellAbility) { - Player player = game.getPlayer(controllerId); + Player player = game.getPlayer(getControllerId()); if (player != null) { resetConspire(ability, game); - if (player.chooseUse(Outcome.Benefit, "Pay " + conspireCost.getText(false) + " ?", ability, game)) { + if (conspireCost.canPay(ability, getSourceId(), getControllerId(), game) + && player.chooseUse(Outcome.Benefit, "Pay " + conspireCost.getText(false) + " ?", ability, game)) { activateConspire(ability, game); for (Iterator it = ((Costs) conspireCost).iterator(); it.hasNext();) { Cost cost = (Cost) it.next();