From e65867eea3d0412fc7df0217b88598decde3abcf Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 6 Nov 2022 09:11:50 -0500 Subject: [PATCH] [BRO] Implement Steel Exemplar --- Mage.Sets/src/mage/cards/s/SteelExemplar.java | 59 +++++++++++++++++++ Mage.Sets/src/mage/sets/TheBrothersWar.java | 1 + 2 files changed, 60 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SteelExemplar.java diff --git a/Mage.Sets/src/mage/cards/s/SteelExemplar.java b/Mage.Sets/src/mage/cards/s/SteelExemplar.java new file mode 100644 index 00000000000..934d5e52e1e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SteelExemplar.java @@ -0,0 +1,59 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.Condition; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.game.Game; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SteelExemplar extends CardImpl { + + public SteelExemplar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); + + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Steel Exemplar enters the battlefield with two +1/+1 counters on it unless two or more colors of mana were spent to cast it. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), + SteelExemplarCondition.instance, "{this} enters the battlefield with " + + "two +1/+1 counters on it unless two or more colors of mana were spent to cast it.", "" + )); + } + + private SteelExemplar(final SteelExemplar card) { + super(card); + } + + @Override + public SteelExemplar copy() { + return new SteelExemplar(this); + } +} + +enum SteelExemplarCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + return ColorsOfManaSpentToCastCount.getInstance().calculate(game, source, null) < 2; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index 49a993b3936..c6e544ced9c 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -214,6 +214,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Splitting the Powerstone", 63, Rarity.UNCOMMON, mage.cards.s.SplittingThePowerstone.class)); cards.add(new SetCardInfo("Spotter Thopter", 80, Rarity.UNCOMMON, mage.cards.s.SpotterThopter.class)); cards.add(new SetCardInfo("Static Net", 27, Rarity.UNCOMMON, mage.cards.s.StaticNet.class)); + cards.add(new SetCardInfo("Steel Exemplar", 246, Rarity.UNCOMMON, mage.cards.s.SteelExemplar.class)); cards.add(new SetCardInfo("Stern Lesson", 64, Rarity.COMMON, mage.cards.s.SternLesson.class)); cards.add(new SetCardInfo("Stone Retrieval Unit", 248, Rarity.COMMON, mage.cards.s.StoneRetrievalUnit.class)); cards.add(new SetCardInfo("Su-Chi Cave Guard", 249, Rarity.UNCOMMON, mage.cards.s.SuChiCaveGuard.class));