[TDM] Implement Molten Exhale

This commit is contained in:
theelk801 2025-03-30 17:05:20 -04:00
parent fa49b5c9b2
commit abcabefbd9
3 changed files with 55 additions and 4 deletions

View file

@ -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);
}
}

View file

@ -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));

View file

@ -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<ManaCost> manaCosts = (ManaCosts<ManaCost>) 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. <i>(You may cast it any time you could cast an instant.)</i>";
} else {
@ -55,4 +65,4 @@ public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility {
}
}
}
}