[MH3] Implement Flare of Denial

This commit is contained in:
theelk801 2024-04-30 16:25:00 -04:00
parent b2e67e3559
commit 09aac285e1
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package mage.cards.f;
import mage.ObjectColor;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.target.TargetSpell;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FlareOfDenial extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("a nontoken blue creature");
static {
filter.add(TokenPredicate.FALSE);
filter.add(new ColorPredicate(ObjectColor.BLUE));
}
public FlareOfDenial(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}");
// You may sacrifice a nontoken blue creature rather than pay this spell's mana cost.
this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(filter)));
// Counter target spell.
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell());
}
private FlareOfDenial(final FlareOfDenial card) {
super(card);
}
@Override
public FlareOfDenial copy() {
return new FlareOfDenial(this);
}
}

View file

@ -26,6 +26,7 @@ public final class ModernHorizons3 extends ExpansionSet {
cards.add(new SetCardInfo("Bloodstained Mire", 216, Rarity.RARE, mage.cards.b.BloodstainedMire.class));
cards.add(new SetCardInfo("Emrakul, the World Anew", 6, Rarity.MYTHIC, mage.cards.e.EmrakulTheWorldAnew.class));
cards.add(new SetCardInfo("Flare of Cultivation", 154, Rarity.RARE, mage.cards.f.FlareOfCultivation.class));
cards.add(new SetCardInfo("Flare of Denial", 62, Rarity.RARE, mage.cards.f.FlareOfDenial.class));
cards.add(new SetCardInfo("Flooded Strand", 220, Rarity.RARE, mage.cards.f.FloodedStrand.class));
cards.add(new SetCardInfo("Forest", 308, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Island", 305, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));