forked from External/mage
* Create generic X MV adjuster * Update XTargetsAdjuster * Create DynamicValueTargetsAdjuster to replace VerseCounterAdjuster * Convert XTargetsAdjuster to use DynamicValueTargetsAdjuster * Genericize MV target adjuster * Converting custom classes for A and B cards, fix Back in Town to only target creature cards * Add Power and Toughness target adjusters, C cards * Set up and use Monstrosity X DynamicValue * Move Scry amount dynamic value to common, add D and E cards * Convert F to I cards * Cards K-M * N, O cards * Cards O-R * S cards (check Scrap Welder) * Cards T - Z * Rename target adjusters * Add filter messages, don't add 0 count targets * Clear blueprint targets (just in case), fix target names, Temporal Firestorm is not target * Requested renames * Aether Burst is "up to" * Review fixes * Add new cards, add source to dynamic value calculation
39 lines
1.4 KiB
Java
39 lines
1.4 KiB
Java
|
|
package mage.cards.m;
|
|
|
|
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
|
import mage.abilities.effects.common.GainLifeEffect;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.filter.StaticFilters;
|
|
import mage.target.TargetPermanent;
|
|
import mage.target.targetadjustment.XManaValueTargetAdjuster;
|
|
|
|
import java.util.UUID;
|
|
|
|
/**
|
|
* @author LoneFox
|
|
*/
|
|
public final class Molder extends CardImpl {
|
|
|
|
public Molder(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{G}");
|
|
|
|
// Destroy target artifact or enchantment with converted mana cost X. It can't be regenerated. You gain X life.
|
|
this.getSpellAbility().addEffect(new DestroyTargetEffect("Destroy target artifact or enchantment with mana value X. It can't be regenerated", true));
|
|
this.getSpellAbility().addEffect(new GainLifeEffect(ManacostVariableValue.REGULAR));
|
|
this.getSpellAbility().setTargetAdjuster(new XManaValueTargetAdjuster());
|
|
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
|
|
}
|
|
|
|
private Molder(final Molder card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public Molder copy() {
|
|
return new Molder(this);
|
|
}
|
|
}
|