diff --git a/Mage.Sets/src/mage/cards/m/MoltenExhale.java b/Mage.Sets/src/mage/cards/m/MoltenExhale.java new file mode 100644 index 00000000000..b70d0407772 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MoltenExhale.java @@ -0,0 +1,40 @@ +package mage.cards.m; + +import mage.abilities.common.PayMoreToCastAsThoughtItHadFlashAbility; +import mage.abilities.costs.common.BeholdDragonCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreatureOrPlaneswalker; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MoltenExhale extends CardImpl { + + public MoltenExhale(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); + + // You may cast this spell as though it had flash if you behold a Dragon as an additional cost to cast it. + this.addAbility(new PayMoreToCastAsThoughtItHadFlashAbility( + this, new BeholdDragonCost(), "you may cast this spell as though " + + "it had flash if you behold a Dragon as an additional cost to cast it" + )); + + // Molten Exhale deals 4 damage to target creature or planeswalker. + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker()); + } + + private MoltenExhale(final MoltenExhale card) { + super(card); + } + + @Override + public MoltenExhale copy() { + return new MoltenExhale(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TarkirDragonstorm.java b/Mage.Sets/src/mage/sets/TarkirDragonstorm.java index 8ac7d91a4ea..30005dc2284 100644 --- a/Mage.Sets/src/mage/sets/TarkirDragonstorm.java +++ b/Mage.Sets/src/mage/sets/TarkirDragonstorm.java @@ -120,6 +120,7 @@ public final class TarkirDragonstorm extends ExpansionSet { cards.add(new SetCardInfo("Mardu Devotee", 16, Rarity.COMMON, mage.cards.m.MarduDevotee.class)); cards.add(new SetCardInfo("Mardu Monument", 245, Rarity.UNCOMMON, mage.cards.m.MarduMonument.class)); cards.add(new SetCardInfo("Meticulous Artisan", 112, Rarity.COMMON, mage.cards.m.MeticulousArtisan.class)); + cards.add(new SetCardInfo("Molten Exhale", 113, Rarity.COMMON, mage.cards.m.MoltenExhale.class)); cards.add(new SetCardInfo("Monastery Messenger", 208, Rarity.COMMON, mage.cards.m.MonasteryMessenger.class)); cards.add(new SetCardInfo("Mountain", 283, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mox Jasper", 246, Rarity.MYTHIC, mage.cards.m.MoxJasper.class)); diff --git a/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java b/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java index 0ba8afb443a..f27112aba7f 100644 --- a/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java +++ b/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java @@ -16,24 +16,30 @@ import mage.util.CardUtil; public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility { private final Cost costsToAdd; + private final String rule; public PayMoreToCastAsThoughtItHadFlashAbility(Card card, Cost costsToAdd) { + this(card, costsToAdd, null); + } + + public PayMoreToCastAsThoughtItHadFlashAbility(Card card, Cost costsToAdd, String rule) { super(card.getSpellAbility().getManaCosts().copy(), card.getName(), Zone.HAND, SpellAbilityType.BASE_ALTERNATE); this.costsToAdd = costsToAdd; + this.rule = rule; this.timing = TimingRule.INSTANT; this.setRuleAtTheTop(true); - if(costsToAdd instanceof ManaCosts) { + if (costsToAdd instanceof ManaCosts) { ManaCosts manaCosts = (ManaCosts) costsToAdd; CardUtil.increaseCost(this, manaCosts); - } - else { + } else { this.addCost(costsToAdd); } } protected PayMoreToCastAsThoughtItHadFlashAbility(final PayMoreToCastAsThoughtItHadFlashAbility ability) { super(ability); + this.rule = ability.rule; this.costsToAdd = ability.costsToAdd; } @@ -46,8 +52,12 @@ public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility { public String getRule(boolean all) { return getRule(); } + @Override public String getRule() { + if (rule != null && !rule.isEmpty()) { + return rule; + } if (costsToAdd instanceof ManaCosts) { return "You may cast {this} as though it had flash if you pay " + costsToAdd.getText() + " more to cast it. (You may cast it any time you could cast an instant.)"; } else { @@ -55,4 +65,4 @@ public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility { } } -} \ No newline at end of file +}