From 8117fcf42d1178aebdfb83b64ae75a7794e8511b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 19 Sep 2018 12:06:39 -0400 Subject: [PATCH] Implemented ErstwhileTrooper --- .../src/mage/cards/e/ErstwhileTrooper.java | 58 +++++++++++++++++++ Mage.Sets/src/mage/sets/GuildsOfRavnica.java | 1 + 2 files changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/ErstwhileTrooper.java diff --git a/Mage.Sets/src/mage/cards/e/ErstwhileTrooper.java b/Mage.Sets/src/mage/cards/e/ErstwhileTrooper.java new file mode 100644 index 0000000000..0714681883 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ErstwhileTrooper.java @@ -0,0 +1,58 @@ +package mage.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.target.common.TargetCardInHand; + +/** + * + * @author TheElk801 + */ +public final class ErstwhileTrooper extends CardImpl { + + public ErstwhileTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Discard a creature card: Erstwhile Trooper gets +2/+2 and gains trample until end of turn. Activate this ability only once each turn. + Ability ability = new LimitedTimesPerTurnActivatedAbility( + Zone.BATTLEFIELD, + new BoostSourceEffect( + 2, 2, Duration.EndOfTurn + ).setText("{this} gets +2/+2"), + new DiscardTargetCost(new TargetCardInHand( + StaticFilters.FILTER_CARD_CREATURE_A + )) + ); + ability.addEffect(new GainAbilitySourceEffect( + TrampleAbility.getInstance(), Duration.EndOfTurn + ).setText("and gains trample until end of turn")); + this.addAbility(ability); + } + + public ErstwhileTrooper(final ErstwhileTrooper card) { + super(card); + } + + @Override + public ErstwhileTrooper copy() { + return new ErstwhileTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java index bdc7a2a70f..725c3cd169 100644 --- a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java +++ b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java @@ -79,6 +79,7 @@ public final class GuildsOfRavnica extends ExpansionSet { cards.add(new SetCardInfo("Emmara, Soul of the Accord", 168, Rarity.RARE, mage.cards.e.EmmaraSoulOfTheAccord.class)); cards.add(new SetCardInfo("Enhanced Surveillance", 40, Rarity.UNCOMMON, mage.cards.e.EnhancedSurveillance.class)); cards.add(new SetCardInfo("Erratic Cyclops", 98, Rarity.RARE, mage.cards.e.ErraticCyclops.class)); + cards.add(new SetCardInfo("Erstwhile Trooper", 169, Rarity.COMMON, mage.cards.e.ErstwhileTrooper.class)); cards.add(new SetCardInfo("Etrata, the Silencer", 170, Rarity.RARE, mage.cards.e.EtrataTheSilencer.class)); cards.add(new SetCardInfo("Expansion // Explosion", 224, Rarity.RARE, mage.cards.e.ExpansionExplosion.class)); cards.add(new SetCardInfo("Find // Finality", 225, Rarity.RARE, mage.cards.f.FindFinality.class));