From 50ea3cd715f1cc70dd7b66547009a9af4df2025e Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 3 Jun 2023 20:21:53 -0400 Subject: [PATCH] [LTR] Implement Bag End Porter --- Mage.Sets/src/mage/cards/b/BagEndPorter.java | 52 +++++++++++++++++++ .../TheLordOfTheRingsTalesOfMiddleEarth.java | 1 + 2 files changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BagEndPorter.java diff --git a/Mage.Sets/src/mage/cards/b/BagEndPorter.java b/Mage.Sets/src/mage/cards/b/BagEndPorter.java new file mode 100644 index 0000000000..f0113d3c24 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BagEndPorter.java @@ -0,0 +1,52 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BagEndPorter extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("legendary creatures you control"); + + static { + filter.add(SuperType.LEGENDARY.getPredicate()); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, null); + + public BagEndPorter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.DWARF); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever Bag End Porter attacks, it gets +X/+X until end of turn, where X is the number of legendary creatures you control. + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(xValue, xValue, Duration.EndOfTurn))); + } + + private BagEndPorter(final BagEndPorter card) { + super(card); + } + + @Override + public BagEndPorter copy() { + return new BagEndPorter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index cf64819fc7..0653f2d079 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -21,6 +21,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Aragorn and Arwen, Wed", 287, Rarity.MYTHIC, mage.cards.a.AragornAndArwenWed.class)); cards.add(new SetCardInfo("Aragorn, the Uniter", 192, Rarity.MYTHIC, mage.cards.a.AragornTheUniter.class)); cards.add(new SetCardInfo("Arwen's Gift", 39, Rarity.COMMON, mage.cards.a.ArwensGift.class)); + cards.add(new SetCardInfo("Bag End Porter", 153, Rarity.COMMON, mage.cards.b.BagEndPorter.class)); cards.add(new SetCardInfo("Barad-dur", 253, Rarity.RARE, mage.cards.b.BaradDur.class)); cards.add(new SetCardInfo("Bilbo, Retired Burglar", 196, Rarity.UNCOMMON, mage.cards.b.BilboRetiredBurglar.class)); cards.add(new SetCardInfo("Bitter Downfall", 77, Rarity.UNCOMMON, mage.cards.b.BitterDownfall.class));