[LTC] Implement Pippin, Warden of Isengard

This commit is contained in:
theelk801 2023-06-19 16:24:07 -04:00
parent b95b7a8738
commit ad0e0bf06b
2 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,70 @@
package mage.cards.p;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.PartnerWithAbility;
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.common.FilterControlledPermanent;
import mage.game.permanent.token.FoodToken;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PippinWardenOfIsengard extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.FOOD, "Foods");
public PippinWardenOfIsengard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HALFLING);
this.subtype.add(SubType.ADVISOR);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Partner with Merry, Warden of Isengard
this.addAbility(new PartnerWithAbility("Merry, Warden of Isengard"));
// {1}, {T}: Create a Food token.
Ability ability = new SimpleActivatedAbility(new CreateTokenEffect(new FoodToken()), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
// {T}, Sacrifice four Foods: Other creatures you control get +3/+3 and gain haste until end of turn. Activate only as a sorcery.
ability = new ActivateAsSorceryActivatedAbility(new BoostControlledEffect(
3, 3, Duration.EndOfTurn, true
).setText("other creatures you control get +3/+3"), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(4, filter)));
ability.addEffect(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.EndOfTurn
).setText("and gain haste until end of turn"));
this.addAbility(ability);
}
private PippinWardenOfIsengard(final PippinWardenOfIsengard card) {
super(card);
}
@Override
public PippinWardenOfIsengard copy() {
return new PippinWardenOfIsengard(this);
}
}

View file

@ -171,6 +171,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet {
cards.add(new SetCardInfo("Path of Ancestry", 322, Rarity.COMMON, mage.cards.p.PathOfAncestry.class));
cards.add(new SetCardInfo("Path to Exile", 175, Rarity.UNCOMMON, mage.cards.p.PathToExile.class));
cards.add(new SetCardInfo("Pillar of the Paruns", 372, Rarity.MYTHIC, mage.cards.p.PillarOfTheParuns.class));
cards.add(new SetCardInfo("Pippin, Warden of Isengard", 65, Rarity.RARE, mage.cards.p.PippinWardenOfIsengard.class));
cards.add(new SetCardInfo("Plea for Power", 195, Rarity.RARE, mage.cards.p.PleaForPower.class));
cards.add(new SetCardInfo("Port Town", 323, Rarity.RARE, mage.cards.p.PortTown.class));
cards.add(new SetCardInfo("Prairie Stream", 324, Rarity.RARE, mage.cards.p.PrairieStream.class));