From 2eb03e6382551e725a21f1efae56d105fd35bc95 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 30 May 2022 11:20:27 -0400 Subject: [PATCH] [CLB] Implemented Colossal Badger --- .../src/mage/cards/c/ColossalBadger.java | 83 +++++++++++++++++++ Mage.Sets/src/mage/cards/d/DigDeep.java | 34 ++++++++ .../CommanderLegendsBattleForBaldursGate.java | 2 + 3 files changed, 119 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ColossalBadger.java create mode 100644 Mage.Sets/src/mage/cards/d/DigDeep.java diff --git a/Mage.Sets/src/mage/cards/c/ColossalBadger.java b/Mage.Sets/src/mage/cards/c/ColossalBadger.java new file mode 100644 index 00000000000..1cedf4684f6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ColossalBadger.java @@ -0,0 +1,83 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ColossalBadger extends AdventureCard { + + public ColossalBadger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{5}{G}", "Dig Deep", "{1}{G}"); + + this.subtype.add(SubType.BADGER); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // When Colossal Badger enters the battlefield, you gain 3 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3))); + + // Dig Deep + // Choose target creature. Mill four cards, then put a +1/+1 counter on that creature for each creature card milled this way. + this.getSpellCard().getSpellAbility().addEffect(new ColossalBadgerEffect()); + this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private ColossalBadger(final ColossalBadger card) { + super(card); + } + + @Override + public ColossalBadger copy() { + return new ColossalBadger(this); + } +} + +class ColossalBadgerEffect extends OneShotEffect { + + ColossalBadgerEffect() { + super(Outcome.Benefit); + staticText = "choose target creature. Mill four cards, then put a +1/+1 counter " + + "on that creature for each creature card milled this way"; + } + + private ColossalBadgerEffect(final ColossalBadgerEffect effect) { + super(effect); + } + + @Override + public ColossalBadgerEffect copy() { + return new ColossalBadgerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + int amount = player.millCards(4, source, game).count(StaticFilters.FILTER_CARD_CREATURE, game); + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (amount > 0 && permanent != null) { + permanent.addCounters(CounterType.P1P1.createInstance(amount), source, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DigDeep.java b/Mage.Sets/src/mage/cards/d/DigDeep.java new file mode 100644 index 00000000000..77f847fa779 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DigDeep.java @@ -0,0 +1,34 @@ +package mage.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public final class DigDeep extends CardImpl { + + public DigDeep(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}"); + + this.subtype.add(SubType.ADVENTURE); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Choose target creature. Mill four cards, then put a +1/+1 counter on that creature for each creature card milled this way. + } + + private DigDeep(final DigDeep card) { + super(card); + } + + @Override + public DigDeep copy() { + return new DigDeep(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index bf16edf23db..baa719e75c9 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -80,6 +80,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Cloak of the Bat", 307, Rarity.COMMON, mage.cards.c.CloakOfTheBat.class)); cards.add(new SetCardInfo("Cloakwood Hermit", 221, Rarity.UNCOMMON, mage.cards.c.CloakwoodHermit.class)); cards.add(new SetCardInfo("Clockwork Fox", 308, Rarity.COMMON, mage.cards.c.ClockworkFox.class)); + cards.add(new SetCardInfo("Colossal Badger", 223, Rarity.COMMON, mage.cards.c.ColossalBadger.class)); cards.add(new SetCardInfo("Command Tower", 351, Rarity.COMMON, mage.cards.c.CommandTower.class)); cards.add(new SetCardInfo("Cone of Cold", 61, Rarity.UNCOMMON, mage.cards.c.ConeOfCold.class)); cards.add(new SetCardInfo("Contact Other Plane", 62, Rarity.COMMON, mage.cards.c.ContactOtherPlane.class)); @@ -89,6 +90,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Dawnbringer Cleric", 15, Rarity.COMMON, mage.cards.d.DawnbringerCleric.class)); cards.add(new SetCardInfo("Deadly Dispute", 124, Rarity.COMMON, mage.cards.d.DeadlyDispute.class)); cards.add(new SetCardInfo("Decanter of Endless Water", 309, Rarity.COMMON, mage.cards.d.DecanterOfEndlessWater.class)); + cards.add(new SetCardInfo("Dig Deep", 223, Rarity.COMMON, mage.cards.d.DigDeep.class)); cards.add(new SetCardInfo("Displacer Kitten", 63, Rarity.RARE, mage.cards.d.DisplacerKitten.class)); cards.add(new SetCardInfo("Draconic Lore", 64, Rarity.COMMON, mage.cards.d.DraconicLore.class)); cards.add(new SetCardInfo("Draconic Muralists", 224, Rarity.UNCOMMON, mage.cards.d.DraconicMuralists.class));