diff --git a/Mage.Sets/src/mage/cards/f/ForceOfVigor.java b/Mage.Sets/src/mage/cards/f/ForceOfVigor.java new file mode 100644 index 0000000000..ca84f4a5ee --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/ForceOfVigor.java @@ -0,0 +1,61 @@ +package mage.cards.f; + +import mage.ObjectColor; +import mage.abilities.condition.common.NotMyTurnCondition; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.ExileFromHandCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.common.FilterOwnedCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCardInHand; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ForceOfVigor extends CardImpl { + + private static final FilterOwnedCard filter + = new FilterOwnedCard("a green card from your hand"); + private static final FilterPermanent filter2 + = new FilterArtifactOrEnchantmentPermanent("artifacts and/or enchantments"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public ForceOfVigor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}{G}"); + + // If it's not your turn, you may exile a green card from your hand rather than pay this spell's mana cost. + this.addAbility(new AlternativeCostSourceAbility( + new ExileFromHandCost(new TargetCardInHand(filter)), NotMyTurnCondition.instance, + "If it's not your turn, you may exile a green card from " + + "your hand rather than pay this spell's mana cost." + )); + + // Destroy up to two target artifacts and/or enchantments. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent( + 0, 2, + StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT, false + )); + } + + private ForceOfVigor(final ForceOfVigor card) { + super(card); + } + + @Override + public ForceOfVigor copy() { + return new ForceOfVigor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons.java b/Mage.Sets/src/mage/sets/ModernHorizons.java index c40a5efb40..274491081a 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons.java @@ -46,6 +46,7 @@ public final class ModernHorizons extends ExpansionSet { cards.add(new SetCardInfo("Firebolt", 122, Rarity.UNCOMMON, mage.cards.f.Firebolt.class)); cards.add(new SetCardInfo("Flusterstorm", 255, Rarity.RARE, mage.cards.f.Flusterstorm.class)); cards.add(new SetCardInfo("Force of Negation", 52, Rarity.RARE, mage.cards.f.ForceOfNegation.class)); + cards.add(new SetCardInfo("Force of Vigor", 164, Rarity.RARE, mage.cards.f.ForceOfVigor.class)); cards.add(new SetCardInfo("Frostwalk Bastion", 240, Rarity.UNCOMMON, mage.cards.f.FrostwalkBastion.class)); cards.add(new SetCardInfo("Generous Gift", 11, Rarity.UNCOMMON, mage.cards.g.GenerousGift.class)); cards.add(new SetCardInfo("Goblin Engineer", 128, Rarity.RARE, mage.cards.g.GoblinEngineer.class));