From b1db62d5d00b6b14113d4e83335c9424b92fac46 Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Fri, 29 Sep 2023 00:49:00 +0200 Subject: [PATCH] [LTR] Implement Mirkwood Channeler (#11218) --- .../src/mage/cards/m/MirkwoodChanneler.java | 66 +++++++++++++++++++ .../TheLordOfTheRingsTalesOfMiddleEarth.java | 1 + 2 files changed, 67 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MirkwoodChanneler.java diff --git a/Mage.Sets/src/mage/cards/m/MirkwoodChanneler.java b/Mage.Sets/src/mage/cards/m/MirkwoodChanneler.java new file mode 100644 index 00000000000..113721ad445 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MirkwoodChanneler.java @@ -0,0 +1,66 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledPermanent; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class MirkwoodChanneler extends CardImpl { + + private static final FilterControlledPermanent filter = + new FilterControlledPermanent(SubType.ELF, "Elf you control"); + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount( + new FilterControlledPermanent(SubType.FOREST, "Forests you control"), null + ); + private static final Hint hint = new ValueHint("Forests you control", xValue); + + public MirkwoodChanneler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // At the beginning of combat on your turn, target Elf you control gains trample and gets +X/+X until end of turn, where X is the number of Forests you control. + Ability ability = new BeginningOfCombatTriggeredAbility( + new GainAbilityTargetEffect(TrampleAbility.getInstance()) + .setText("target Elf you control gains trample"), + TargetController.YOU, false + ); + ability.addEffect(new BoostTargetEffect(xValue, xValue) + .setText("and gets +X/+X until end of turn, where X is the number of Forests you control") + ); + ability.addTarget(new TargetControlledPermanent(filter)); + ability.addHint(hint); + this.addAbility(ability); + } + + private MirkwoodChanneler(final MirkwoodChanneler card) { + super(card); + } + + @Override + public MirkwoodChanneler copy() { + return new MirkwoodChanneler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index 09e739e9362..68434d37ccf 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -284,6 +284,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Mines of Moria", 753, Rarity.RARE, mage.cards.m.MinesOfMoria.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mirkwood Bats", 421, Rarity.COMMON, mage.cards.m.MirkwoodBats.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mirkwood Bats", 95, Rarity.COMMON, mage.cards.m.MirkwoodBats.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mirkwood Channeler", 828, Rarity.RARE, mage.cards.m.MirkwoodChanneler.class)); cards.add(new SetCardInfo("Mirkwood Spider", 178, Rarity.COMMON, mage.cards.m.MirkwoodSpider.class)); cards.add(new SetCardInfo("Mirror of Galadriel", 244, Rarity.UNCOMMON, mage.cards.m.MirrorOfGaladriel.class)); cards.add(new SetCardInfo("Mirrormere Guardian", 179, Rarity.COMMON, mage.cards.m.MirrormereGuardian.class));