-
Notifications
You must be signed in to change notification settings - Fork 886
[SOS] Implement Postmortem Professor #14679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
muz
wants to merge
1
commit into
magefree:master
Choose a base branch
from
muz:sos_postmortem_professor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+67
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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))); | ||
| this.addAbility(ability2); | ||
| } | ||
|
|
||
| private PostmortemProfessor(final PostmortemProfessor card) { | ||
| super(card); | ||
| } | ||
|
|
||
| @Override | ||
| public PostmortemProfessor copy() { | ||
| return new PostmortemProfessor(this); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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_GRAVEYARDfor this