diff --git a/Mage.Sets/src/mage/sets/innistrad/DevilsPlay.java b/Mage.Sets/src/mage/sets/innistrad/DevilsPlay.java new file mode 100644 index 00000000000..f2c8fb43f88 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/DevilsPlay.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 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 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * 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. + */ +package mage.sets.innistrad; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author Loki + */ +public class DevilsPlay extends CardImpl { + + public DevilsPlay(UUID ownerId) { + super(ownerId, 140, "Devil's Play", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{R}"); + this.expansionSetCode = "ISD"; + + this.color.setRed(true); + + // Devil's Play deals X damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Flashback {X}{R}{R}{R} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{X}{R}{R}{R}"), Constants.TimingRule.SORCERY)); + } + + public DevilsPlay(final DevilsPlay card) { + super(card); + } + + @Override + public DevilsPlay copy() { + return new DevilsPlay(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/MirrorMadPhantasm.java b/Mage.Sets/src/mage/sets/innistrad/MirrorMadPhantasm.java index 802c3182d94..629f0b9d0f5 100644 --- a/Mage.Sets/src/mage/sets/innistrad/MirrorMadPhantasm.java +++ b/Mage.Sets/src/mage/sets/innistrad/MirrorMadPhantasm.java @@ -81,7 +81,7 @@ class MirrorMadPhantasmEffect extends OneShotEffect { public MirrorMadPhantasmEffect() { super(Outcome.Detriment); - this.staticText = "Mirror-Mad Phantasm's owner shuffles it into his or her library. If that player does, he or she reveals cards from the top of that library until a card named Mirror-Mad Phantasm is revealed. That player puts that card onto the battlefield and all other cards revealed this way into his or her graveyard"; + this.staticText = "{this}'s owner shuffles it into his or her library. If that player does, he or she reveals cards from the top of that library until a card named Mirror-Mad Phantasm is revealed. That player puts that card onto the battlefield and all other cards revealed this way into his or her graveyard"; } public MirrorMadPhantasmEffect(final MirrorMadPhantasmEffect effect) { diff --git a/Mage/src/mage/abilities/keyword/FlashbackAbility.java b/Mage/src/mage/abilities/keyword/FlashbackAbility.java index 69f5a6b8422..7f5f5372037 100644 --- a/Mage/src/mage/abilities/keyword/FlashbackAbility.java +++ b/Mage/src/mage/abilities/keyword/FlashbackAbility.java @@ -31,6 +31,8 @@ import mage.Constants; import mage.abilities.Ability; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; @@ -111,6 +113,10 @@ class FlashbackEffect extends OneShotEffect { if (target != null) { Player controller = game.getPlayer(target.getOwnerId()); if (controller != null) { + target.getSpellAbility().getManaCostsToPay().clear(); + for (Cost cost: source.getManaCostsToPay()) { + target.getSpellAbility().getManaCostsToPay().add((ManaCost) cost.copy()); + } return controller.cast(target.getSpellAbility(), game, true); } }