From 184d6e22d74c30f3e04d5c9343c61cdfcdf7cb38 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 25 May 2021 08:40:27 -0400 Subject: [PATCH] [MH2] Implemented Bottle Golems --- Mage.Sets/src/mage/cards/b/BottleGolems.java | 45 ++++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons2.java | 1 + 2 files changed, 46 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BottleGolems.java diff --git a/Mage.Sets/src/mage/cards/b/BottleGolems.java b/Mage.Sets/src/mage/cards/b/BottleGolems.java new file mode 100644 index 00000000000..cfffa416bb1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BottleGolems.java @@ -0,0 +1,45 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BottleGolems extends CardImpl { + + private static final DynamicValue xValue = new SourcePermanentPowerCount(false); + + public BottleGolems(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.GOLEM); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // When Bottle Golems dies, you gain life equal to its power. + this.addAbility(new DiesSourceTriggeredAbility(new GainLifeEffect(xValue, "you gain life equal to its power"))); + } + + private BottleGolems(final BottleGolems card) { + super(card); + } + + @Override + public BottleGolems copy() { + return new BottleGolems(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index 1ae62ac4a32..c09e641b576 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -28,6 +28,7 @@ public final class ModernHorizons2 extends ExpansionSet { this.maxCardNumberInBooster = 303; cards.add(new SetCardInfo("Arid Mesa", 244, Rarity.RARE, mage.cards.a.AridMesa.class)); + cards.add(new SetCardInfo("Bottle Golems", 222, Rarity.COMMON, mage.cards.b.BottleGolems.class)); cards.add(new SetCardInfo("Brainstone", 223, Rarity.UNCOMMON, mage.cards.b.Brainstone.class)); cards.add(new SetCardInfo("Break Ties", 8, Rarity.COMMON, mage.cards.b.BreakTies.class)); cards.add(new SetCardInfo("Cabal Coffers", 301, Rarity.MYTHIC, mage.cards.c.CabalCoffers.class));