From 05970433ff32c8fa1ff9348ec587233f703ba261 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 6 Apr 2023 09:43:38 -0400 Subject: [PATCH] [MOM] Implement Urn of Godfire --- Mage.Sets/src/mage/cards/u/UrnOfGodfire.java | 54 +++++++++++++++++++ .../src/mage/sets/MarchOfTheMachine.java | 1 + 2 files changed, 55 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/u/UrnOfGodfire.java diff --git a/Mage.Sets/src/mage/cards/u/UrnOfGodfire.java b/Mage.Sets/src/mage/cards/u/UrnOfGodfire.java new file mode 100644 index 0000000000..e91586cf21 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UrnOfGodfire.java @@ -0,0 +1,54 @@ +package mage.cards.u; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class UrnOfGodfire extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("creature or enchantment"); + + static { + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + CardType.ENCHANTMENT.getPredicate() + )); + } + + public UrnOfGodfire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + // {2}: Add one mana of any color. + this.addAbility(new AnyColorManaAbility(new GenericManaCost(2))); + + // {6}, {T}, Sacrifice Urn of Godfire: Destroy target creature or enchantment. + Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new GenericManaCost(6)); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + } + + private UrnOfGodfire(final UrnOfGodfire card) { + super(card); + } + + @Override + public UrnOfGodfire copy() { + return new UrnOfGodfire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index 0cd29c53d5..90b1550b80 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -188,6 +188,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Timberland Ancient", 210, Rarity.COMMON, mage.cards.t.TimberlandAncient.class)); cards.add(new SetCardInfo("Tranquil Cove", 275, Rarity.COMMON, mage.cards.t.TranquilCove.class)); cards.add(new SetCardInfo("Transcendent Message", 83, Rarity.RARE, mage.cards.t.TranscendentMessage.class)); + cards.add(new SetCardInfo("Urn of Godfire", 266, Rarity.COMMON, mage.cards.u.UrnOfGodfire.class)); cards.add(new SetCardInfo("Vanquish the Weak", 129, Rarity.COMMON, mage.cards.v.VanquishTheWeak.class)); cards.add(new SetCardInfo("Voldaren Thrillseeker", 171, Rarity.RARE, mage.cards.v.VoldarenThrillseeker.class)); cards.add(new SetCardInfo("War Historian", 214, Rarity.COMMON, mage.cards.w.WarHistorian.class));