* Enigmatic Incarnation - Added process action after the sacrifice (fixes #6250).

This commit is contained in:
LevelX2 2020-07-20 22:48:07 +02:00
parent d721c0bea3
commit 601fb525a8

View file

@ -1,5 +1,6 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -22,8 +23,6 @@ import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/** /**
* @author TheElk801 * @author TheElk801
*/ */
@ -59,10 +58,10 @@ class EnigmaticIncarnationEffect extends OneShotEffect {
EnigmaticIncarnationEffect() { EnigmaticIncarnationEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "you may sacrifice another enchantment. If you do, " + staticText = "you may sacrifice another enchantment. If you do, "
"search your library for a creature card with converted mana cost " + + "search your library for a creature card with converted mana cost "
"equal to 1 plus the sacrificed enchantment's converted mana cost, " + + "equal to 1 plus the sacrificed enchantment's converted mana cost, "
"put that card onto the battlefield, then shuffle your library."; + "put that card onto the battlefield, then shuffle your library.";
} }
private EnigmaticIncarnationEffect(final EnigmaticIncarnationEffect effect) { private EnigmaticIncarnationEffect(final EnigmaticIncarnationEffect effect) {
@ -88,6 +87,7 @@ class EnigmaticIncarnationEffect extends OneShotEffect {
if (permanent == null) { if (permanent == null) {
return false; return false;
} }
game.getState().processAction(game);
int cmc = permanent.getConvertedManaCost(); int cmc = permanent.getConvertedManaCost();
if (!permanent.sacrifice(source.getSourceId(), game)) { if (!permanent.sacrifice(source.getSourceId(), game)) {
return false; return false;