diff --git a/Mage.Sets/src/mage/cards/l/LoftyDenial.java b/Mage.Sets/src/mage/cards/l/LoftyDenial.java new file mode 100644 index 0000000000..30d834e78c --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LoftyDenial.java @@ -0,0 +1,53 @@ +package mage.cards.l; + +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.TargetSpell; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LoftyDenial extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent(); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter); + + public LoftyDenial(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Counter target spell unless its controller pays {1}. If you control a creature with flying, counter that spell unless its controller pays {4} instead. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new CounterUnlessPaysEffect(new GenericManaCost(4)), + new CounterUnlessPaysEffect(new GenericManaCost(1)), + condition, "counter target spell unless its controller pays {1}. " + + "If you control a creature with flying, counter that spell unless its controller pays {4} instead" + )); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + private LoftyDenial(final LoftyDenial card) { + super(card); + } + + @Override + public LoftyDenial copy() { + return new LoftyDenial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CoreSet2021.java b/Mage.Sets/src/mage/sets/CoreSet2021.java index 8ad9cc1b23..4ad9efea35 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2021.java +++ b/Mage.Sets/src/mage/sets/CoreSet2021.java @@ -87,6 +87,7 @@ public final class CoreSet2021 extends ExpansionSet { cards.add(new SetCardInfo("Liliana, Death Mage", 328, Rarity.MYTHIC, mage.cards.l.LilianaDeathMage.class)); cards.add(new SetCardInfo("Liliana, Waker of the Dead", 108, Rarity.MYTHIC, mage.cards.l.LilianaWakerOfTheDead.class)); cards.add(new SetCardInfo("Llanowar Visionary", 193, Rarity.COMMON, mage.cards.l.LlanowarVisionary.class)); + cards.add(new SetCardInfo("Lofty Denial", 56, Rarity.COMMON, mage.cards.l.LoftyDenial.class)); cards.add(new SetCardInfo("Lorescale Coatl", 221, Rarity.UNCOMMON, mage.cards.l.LorescaleCoatl.class)); cards.add(new SetCardInfo("Malefic Scythe", 112, Rarity.UNCOMMON, mage.cards.m.MaleficScythe.class)); cards.add(new SetCardInfo("Mangara, the Diplomat", 27, Rarity.MYTHIC, mage.cards.m.MangaraTheDiplomat.class));