From 471bb5f76a7831fd648eb9c43d27fe37ba9f60cc Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Tue, 7 Sep 2021 18:31:56 -0500 Subject: [PATCH] [MID] Implemented Croaking Counterpart --- .../src/mage/cards/c/CroakingCounterpart.java | 56 +++++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CroakingCounterpart.java diff --git a/Mage.Sets/src/mage/cards/c/CroakingCounterpart.java b/Mage.Sets/src/mage/cards/c/CroakingCounterpart.java new file mode 100644 index 0000000000..5fb85942c3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CroakingCounterpart.java @@ -0,0 +1,56 @@ +package mage.cards.c; + +import java.util.UUID; + +import mage.ObjectColor; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TimingRule; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author weirddan455 + */ +public final class CroakingCounterpart extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Frog creature"); + + static { + filter.add(Predicates.not(SubType.FROG.getPredicate())); + } + + public CroakingCounterpart(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}{U}"); + + // Create a token that's a copy of target non-Frog creature, except it's a 1/1 green Frog. + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect( + null, null, false, 1, false, false, + null, 1, 1, false + ); + effect.setOnlyColor(ObjectColor.GREEN); + effect.setOnlySubType(SubType.FROG); + effect.setText("Create a token that's a copy of target non-Frog creature, except it's a 1/1 green Frog"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + + // Flashback {3}{G}{U} + this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{G}{U}"), TimingRule.SORCERY)); + } + + private CroakingCounterpart(final CroakingCounterpart card) { + super(card); + } + + @Override + public CroakingCounterpart copy() { + return new CroakingCounterpart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index ea8f24eec4..e2c6b69276 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -46,6 +46,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Clear Shot", 176, Rarity.UNCOMMON, mage.cards.c.ClearShot.class)); cards.add(new SetCardInfo("Consider", 44, Rarity.COMMON, mage.cards.c.Consider.class)); cards.add(new SetCardInfo("Contortionist Troupe", 178, Rarity.UNCOMMON, mage.cards.c.ContortionistTroupe.class)); + cards.add(new SetCardInfo("Croaking Counterpart", 215, Rarity.RARE, mage.cards.c.CroakingCounterpart.class)); cards.add(new SetCardInfo("Dawnhart Rejuvenator", 180, Rarity.COMMON, mage.cards.d.DawnhartRejuvenator.class)); cards.add(new SetCardInfo("Defend the Celestus", 182, Rarity.UNCOMMON, mage.cards.d.DefendTheCelestus.class)); cards.add(new SetCardInfo("Defenestrate", 95, Rarity.COMMON, mage.cards.d.Defenestrate.class));