Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions Mage.Sets/src/mage/cards/p/PostmortemProfessor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package mage.cards.p;

import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.CantBlockAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ExileFromGraveCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterInstantOrSorceryCard;
import mage.target.common.TargetCardInYourGraveyard;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;

/**
*
* @author muz
*/
public final class PostmortemProfessor extends CardImpl {

private static final FilterCard filter = new FilterInstantOrSorceryCard("an instant or sorcery card from your graveyard");

public PostmortemProfessor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");

this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.WARLOCK);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

// This creature can't block.
this.addAbility(new CantBlockAbility());

// Whenever this creature attacks, each opponent loses 1 life and you gain 1 life.
Ability ability = new AttacksTriggeredAbility(new LoseLifeOpponentsEffect(1));
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addAbility(ability);

// {1}{B}, Exile an instant or sorcery card from your graveyard: Return this card from your graveyard to the battlefield.
Ability ability2 = new SimpleActivatedAbility(
Zone.GRAVEYARD,
new ReturnSourceFromGraveyardToBattlefieldEffect(),
new ManaCostsImpl<>("{1}{B}")
);
ability2.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(filter)));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY_FROM_YOUR_GRAVEYARD for this

this.addAbility(ability2);
}

private PostmortemProfessor(final PostmortemProfessor card) {
super(card);
}

@Override
public PostmortemProfessor copy() {
return new PostmortemProfessor(this);
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/SecretsOfStrixhaven.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ private SecretsOfStrixhaven() {
cards.add(new SetCardInfo("Plains", 273, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Planar Engineering", 158, Rarity.RARE, mage.cards.p.PlanarEngineering.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Planar Engineering", 340, Rarity.RARE, mage.cards.p.PlanarEngineering.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Postmortem Professor", 327, Rarity.RARE, mage.cards.p.PostmortemProfessor.class));
cards.add(new SetCardInfo("Practiced Offense", 25, Rarity.RARE, mage.cards.p.PracticedOffense.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Practiced Offense", 313, Rarity.RARE, mage.cards.p.PracticedOffense.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Practiced Scrollsmith", 210, Rarity.UNCOMMON, mage.cards.p.PracticedScrollsmith.class));
Expand Down
1 change: 1 addition & 0 deletions Utils/mtg-cards-data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62145,6 +62145,7 @@ Mathemagics|Secrets of Strixhaven|320|M|{X}{X}{U}{U}|Sorcery|||Target player dra
Pensive Professor|Secrets of Strixhaven|321|R|{1}{U}{U}|Creature - Human Wizard|0|2|Increment$Whenever one or more +1/+1 counters are put on this creature, draw a card.|
Wisdom of Ages|Secrets of Strixhaven|323|R|{4}{U}{U}{U}|Sorcery|||Return all instant and sorcery cards from your graveyard to your hand. You have no maximum hand size for the rest of the game.$Exile Wisdom of Ages.|
Grave Researcher|Secrets of Strixhaven|325|R|{2}{B}|Creature - Troll Warlock|3|3|At the beginning of your upkeep, surveil 1. Then if there are three or more creature cards in your graveyard, this creature becomes prepared.$Reanimate$Sorcery {B}$Put target creature card from a graveyard onto the battlefield under your control. You lose life equal to that card's mana value.|
Postmortem Professor|Secrets of Strixhaven|327|R|{1}{B}|Creature - Zombie Warlock|2|2|This creature can't block.$Whenever this creature attacks, each opponent loses 1 life and you gain 1 life.${1}{B}, Exile an instant or sorcery card from your graveyard: Return this card from your graveyard to the battlefield.|
Withering Curse|Secrets of Strixhaven|330|M|{1}{B}{B}|Sorcery|||All creatures get -2/-2 until end of turn.$Infusion -- If you gained life this turn, destroy all creatures instead.|
Emeritus of Conflict|Secrets of Strixhaven|332|M|{1}{R}|Creature - Human Wizard|2|2|First strike$Whenever you cast your third spell each turn, this creature becomes prepared.$Lightning Bolt$Instant {R}$Lightning Bolt deals 3 damage to any target.|
Flashback|Secrets of Strixhaven|333|R|{R}|Instant|||Target instant or sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost.|
Expand Down
Loading