[LTR] Implement Pippin's Bravery

This commit is contained in:
theelk801 2023-05-30 18:48:35 -04:00
parent 8d31341442
commit ab1e8e296c
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,42 @@
package mage.cards.p;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PippinsBravery extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.FOOD, "Food");
public PippinsBravery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
// You may sacrifice a Food. If you do, target creature gets +4/+4 until end of turn. Otherwise, that creature gets +2/+2 until end of turn.
this.getSpellAbility().addEffect(new DoIfCostPaid(
new BoostTargetEffect(4, 4),
new BoostTargetEffect(2, 2),
new SacrificeTargetCost(filter)
));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private PippinsBravery(final PippinsBravery card) {
super(card);
}
@Override
public PippinsBravery copy() {
return new PippinsBravery(this);
}
}

View file

@ -35,6 +35,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
cards.add(new SetCardInfo("Mount Doom", 258, Rarity.MYTHIC, mage.cards.m.MountDoom.class));
cards.add(new SetCardInfo("Mountain", 278, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Nazgul", 100, Rarity.UNCOMMON, mage.cards.n.Nazgul.class));
cards.add(new SetCardInfo("Pippin's Bravery", 182, Rarity.COMMON, mage.cards.p.PippinsBravery.class));
cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Prince Imrahil the Fair", 219, Rarity.UNCOMMON, mage.cards.p.PrinceImrahilTheFair.class));
cards.add(new SetCardInfo("Quickbeam, Upstart Ent", 183, Rarity.COMMON, mage.cards.q.QuickbeamUpstartEnt.class));