From defa1af186d61d6ec58ebab1ed745d70a8514f1b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 24 May 2022 19:05:45 -0400 Subject: [PATCH] [CLB] Implemented Drillworks Mole --- .../src/mage/cards/d/DrillworksMole.java | 59 +++++++++++++++++++ .../CommanderLegendsBattleForBaldursGate.java | 1 + 2 files changed, 60 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DrillworksMole.java diff --git a/Mage.Sets/src/mage/cards/d/DrillworksMole.java b/Mage.Sets/src/mage/cards/d/DrillworksMole.java new file mode 100644 index 00000000000..3228fd83ec6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DrillworksMole.java @@ -0,0 +1,59 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.CommanderPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DrillworksMole extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("commander creature you control"); + + static { + filter.add(CommanderPredicate.instance); + } + + public DrillworksMole(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); + + this.subtype.add(SubType.MOLE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}, {T}: Put a +1/+1 counter on Drillworks Mole and a +1/+1 counter on up to one target commander creature you control. + Ability ability = new SimpleActivatedAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2) + ); + ability.addCost(new TapSourceCost()); + ability.addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()) + .setText("and a +1/+1 counter on up to one target commander creature you control")); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private DrillworksMole(final DrillworksMole card) { + super(card); + } + + @Override + public DrillworksMole copy() { + return new DrillworksMole(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index a613ada4efa..fbe2039735c 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -55,6 +55,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Cultist of the Absolute", 123, Rarity.RARE, mage.cards.c.CultistOfTheAbsolute.class)); cards.add(new SetCardInfo("Displacer Kitten", 63, Rarity.RARE, mage.cards.d.DisplacerKitten.class)); cards.add(new SetCardInfo("Dread Linnorm", 225, Rarity.COMMON, mage.cards.d.DreadLinnorm.class)); + cards.add(new SetCardInfo("Drillworks Mole", 311, Rarity.UNCOMMON, mage.cards.d.DrillworksMole.class)); cards.add(new SetCardInfo("Duke Ulder Ravengard", 272, Rarity.RARE, mage.cards.d.DukeUlderRavengard.class)); cards.add(new SetCardInfo("Dungeon Delver", 67, Rarity.UNCOMMON, mage.cards.d.DungeonDelver.class)); cards.add(new SetCardInfo("Dungeoneer's Pack", 312, Rarity.UNCOMMON, mage.cards.d.DungeoneersPack.class));