[LTR] Implement Bag End Porter

This commit is contained in:
theelk801 2023-06-03 20:21:53 -04:00
parent 98d9446ce2
commit 50ea3cd715
2 changed files with 53 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));