From 6fb943c8b36eec857ec1cb87d1ce1fd562c28c14 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 5 Nov 2022 09:37:41 -0400 Subject: [PATCH] [BRO] Implement Battery Bearer --- Mage.Sets/src/mage/cards/b/BatteryBearer.java | 63 +++++++++++++++++++ Mage.Sets/src/mage/sets/TheBrothersWar.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BatteryBearer.java diff --git a/Mage.Sets/src/mage/cards/b/BatteryBearer.java b/Mage.Sets/src/mage/cards/b/BatteryBearer.java new file mode 100644 index 0000000000..bf3426256f --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BatteryBearer.java @@ -0,0 +1,63 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.mana.ConditionalColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterSpell; +import mage.filter.StaticFilters; +import mage.filter.common.FilterArtifactSpell; +import mage.filter.predicate.mageobject.ManaValuePredicate; +import mage.game.permanent.token.PowerstoneToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BatteryBearer extends CardImpl { + + private static final FilterSpell filter + = new FilterArtifactSpell("an artifact spell with mana value 6 or greater"); + + static { + filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 5)); + } + + public BatteryBearer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Creatures you control have "{T}: Add {C}. This mana can't be spent to cast a nonartifact spell." + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + new ConditionalColorlessManaAbility(1, PowerstoneToken.makeBuilder()), + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE + ))); + + // Whenever you cast an artifact spell with mana value 6 or greater, draw a card. + this.addAbility(new SpellCastControllerTriggeredAbility( + new DrawCardSourceControllerEffect(1), filter, false + )); + } + + private BatteryBearer(final BatteryBearer card) { + super(card); + } + + @Override + public BatteryBearer copy() { + return new BatteryBearer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index 4c27f39831..f3748be6db 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -51,6 +51,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Audacity", 169, Rarity.UNCOMMON, mage.cards.a.Audacity.class)); cards.add(new SetCardInfo("Autonomous Assembler", 34, Rarity.RARE, mage.cards.a.AutonomousAssembler.class)); cards.add(new SetCardInfo("Awaken the Woods", 170, Rarity.MYTHIC, mage.cards.a.AwakenTheWoods.class)); + cards.add(new SetCardInfo("Battery Bearer", 207, Rarity.UNCOMMON, mage.cards.b.BatteryBearer.class)); cards.add(new SetCardInfo("Battlefield Butcher", 86, Rarity.UNCOMMON, mage.cards.b.BattlefieldButcher.class)); cards.add(new SetCardInfo("Battlefield Forge", 257, Rarity.RARE, mage.cards.b.BattlefieldForge.class)); cards.add(new SetCardInfo("Bitter Reunion", 127, Rarity.COMMON, mage.cards.b.BitterReunion.class));