From fe3615fc03c8f83f97e07c6f424246d339ffe36e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 2 Jun 2021 08:10:38 -0400 Subject: [PATCH] [MH2] Implemented Glimmer Bairn --- Mage.Sets/src/mage/cards/g/GlimmerBairn.java | 51 ++++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons2.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GlimmerBairn.java diff --git a/Mage.Sets/src/mage/cards/g/GlimmerBairn.java b/Mage.Sets/src/mage/cards/g/GlimmerBairn.java new file mode 100644 index 0000000000..8985d02afc --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GlimmerBairn.java @@ -0,0 +1,51 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GlimmerBairn extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a token"); + + static { + filter.add(TokenPredicate.instance); + } + + public GlimmerBairn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + + this.subtype.add(SubType.OUPHE); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Sacrifice a token: Glimmer Bairn gets +2/+2 until end of turn. + this.addAbility(new SimpleActivatedAbility( + new BoostSourceEffect(2, 2, Duration.EndOfTurn), + new SacrificeTargetCost(new TargetControlledPermanent(filter)) + )); + } + + private GlimmerBairn(final GlimmerBairn card) { + super(card); + } + + @Override + public GlimmerBairn copy() { + return new GlimmerBairn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index 0bc0655da9..21c5b6bd52 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -103,6 +103,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("General Ferrous Rokiric", 198, Rarity.RARE, mage.cards.g.GeneralFerrousRokiric.class)); cards.add(new SetCardInfo("Geyadrone Dihada", 199, Rarity.MYTHIC, mage.cards.g.GeyadroneDihada.class)); cards.add(new SetCardInfo("Ghost-Lit Drifter", 45, Rarity.UNCOMMON, mage.cards.g.GhostLitDrifter.class)); + cards.add(new SetCardInfo("Glimmer Bairn", 413, Rarity.COMMON, mage.cards.g.GlimmerBairn.class)); cards.add(new SetCardInfo("Glinting Creeper", 164, Rarity.UNCOMMON, mage.cards.g.GlintingCreeper.class)); cards.add(new SetCardInfo("Glorious Enforcer", 14, Rarity.UNCOMMON, mage.cards.g.GloriousEnforcer.class)); cards.add(new SetCardInfo("Goblin Bombardment", 279, Rarity.RARE, mage.cards.g.GoblinBombardment.class));