|
| 1 | +package mage.cards.p; |
| 2 | + |
| 3 | +import java.util.UUID; |
| 4 | +import mage.MageInt; |
| 5 | +import mage.abilities.Ability; |
| 6 | +import mage.abilities.common.AttacksTriggeredAbility; |
| 7 | +import mage.abilities.common.CantBlockAbility; |
| 8 | +import mage.abilities.common.SimpleActivatedAbility; |
| 9 | +import mage.abilities.costs.common.ExileFromGraveCost; |
| 10 | +import mage.abilities.costs.mana.ManaCostsImpl; |
| 11 | +import mage.abilities.effects.common.GainLifeEffect; |
| 12 | +import mage.abilities.effects.common.LoseLifeOpponentsEffect; |
| 13 | +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; |
| 14 | +import mage.constants.SubType; |
| 15 | +import mage.constants.Zone; |
| 16 | +import mage.filter.FilterCard; |
| 17 | +import mage.filter.common.FilterInstantOrSorceryCard; |
| 18 | +import mage.target.common.TargetCardInYourGraveyard; |
| 19 | +import mage.cards.CardImpl; |
| 20 | +import mage.cards.CardSetInfo; |
| 21 | +import mage.constants.CardType; |
| 22 | + |
| 23 | +/** |
| 24 | + * |
| 25 | + * @author muz |
| 26 | + */ |
| 27 | +public final class PostmortemProfessor extends CardImpl { |
| 28 | + |
| 29 | + private static final FilterCard filter = new FilterInstantOrSorceryCard("an instant or sorcery card from your graveyard"); |
| 30 | + |
| 31 | + public PostmortemProfessor(UUID ownerId, CardSetInfo setInfo) { |
| 32 | + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); |
| 33 | + |
| 34 | + this.subtype.add(SubType.ZOMBIE); |
| 35 | + this.subtype.add(SubType.WARLOCK); |
| 36 | + this.power = new MageInt(2); |
| 37 | + this.toughness = new MageInt(2); |
| 38 | + |
| 39 | + // This creature can't block. |
| 40 | + this.addAbility(new CantBlockAbility()); |
| 41 | + |
| 42 | + // Whenever this creature attacks, each opponent loses 1 life and you gain 1 life. |
| 43 | + Ability ability = new AttacksTriggeredAbility(new LoseLifeOpponentsEffect(1)); |
| 44 | + ability.addEffect(new GainLifeEffect(1).concatBy("and")); |
| 45 | + this.addAbility(ability); |
| 46 | + |
| 47 | + // {1}{B}, Exile an instant or sorcery card from your graveyard: Return this card from your graveyard to the battlefield. |
| 48 | + Ability ability2 = new SimpleActivatedAbility( |
| 49 | + Zone.GRAVEYARD, |
| 50 | + new ReturnSourceFromGraveyardToBattlefieldEffect(), |
| 51 | + new ManaCostsImpl<>("{1}{B}") |
| 52 | + ); |
| 53 | + ability2.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(filter))); |
| 54 | + this.addAbility(ability2); |
| 55 | + } |
| 56 | + |
| 57 | + private PostmortemProfessor(final PostmortemProfessor card) { |
| 58 | + super(card); |
| 59 | + } |
| 60 | + |
| 61 | + @Override |
| 62 | + public PostmortemProfessor copy() { |
| 63 | + return new PostmortemProfessor(this); |
| 64 | + } |
| 65 | +} |
0 commit comments