From 47fb7cb6dfa592321160ea5575176950427d9ef2 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 31 May 2021 18:59:17 -0400 Subject: [PATCH] [MH2] Implemented Foundation Breaker --- .../src/mage/cards/f/FoundationBreaker.java | 46 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons2.java | 1 + Utils/keywords.txt | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/f/FoundationBreaker.java diff --git a/Mage.Sets/src/mage/cards/f/FoundationBreaker.java b/Mage.Sets/src/mage/cards/f/FoundationBreaker.java new file mode 100644 index 0000000000..719cd5bd64 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FoundationBreaker.java @@ -0,0 +1,46 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.EvokeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FoundationBreaker extends CardImpl { + + public FoundationBreaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Foundation Breaker enters the battlefield, you may destroy target artifact or enchantment. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); + this.addAbility(ability); + + // Evoke {1}{G} + this.addAbility(new EvokeAbility("{1}{G}")); + } + + private FoundationBreaker(final FoundationBreaker card) { + super(card); + } + + @Override + public FoundationBreaker copy() { + return new FoundationBreaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index f48299b652..ce3a7d2a66 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -79,6 +79,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("Flametongue Yearling", 125, Rarity.UNCOMMON, mage.cards.f.FlametongueYearling.class)); cards.add(new SetCardInfo("Flay Essence", 85, Rarity.UNCOMMON, mage.cards.f.FlayEssence.class)); cards.add(new SetCardInfo("Forest", 489, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Foundation Breaker", 160, Rarity.UNCOMMON, mage.cards.f.FoundationBreaker.class)); cards.add(new SetCardInfo("Fractured Sanity", 44, Rarity.RARE, mage.cards.f.FracturedSanity.class)); cards.add(new SetCardInfo("Gaea's Will", 162, Rarity.RARE, mage.cards.g.GaeasWill.class)); cards.add(new SetCardInfo("General Ferrous Rokiric", 198, Rarity.RARE, mage.cards.g.GeneralFerrousRokiric.class)); diff --git a/Utils/keywords.txt b/Utils/keywords.txt index 74d6b1364b..16a9dd078a 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -31,7 +31,7 @@ Enchant|type| Encore|cost| Entwine|manaString| Eternalize|cost, card| -Evoke|card, manaString| +Evoke|manaString| Evolve|new| Exalted|new| Exploit|new|