From c351bb9d38b6417c2053c580fa586623517287ce Mon Sep 17 00:00:00 2001 From: Hellfish Date: Mon, 3 Oct 2011 20:46:03 +0000 Subject: [PATCH] *Added a way to force state effect checking, regardless of wether something is resolving. The only thing that uses this is Persist, currently. *Fixed Persist's interaction with Melira, Sylvok Outcast. --- src/main/java/forge/GameAction.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/forge/GameAction.java b/src/main/java/forge/GameAction.java index d977ef81ba3..46a2cad8d19 100644 --- a/src/main/java/forge/GameAction.java +++ b/src/main/java/forge/GameAction.java @@ -634,14 +634,22 @@ public class GameAction { return isGameDone; } - /** *

checkStateEffects.

*/ public final void checkStateEffects() { + checkStateEffects(false); + } - // sol(10/29) added for Phase updates, state effects shouldn't be checked during Spell Resolution - if (AllZone.getStack().getResolving()) { + /** + *

checkStateEffects.

+ * + * @param force a boolean. States wether or not state effect checking should be forced, even if a spell is in the middle of resolving. + */ + public final void checkStateEffects(boolean force) { + + // sol(10/29) added for Phase updates, state effects shouldn't be checked during Spell Resolution (except when persist-returning + if (AllZone.getStack().getResolving() && !force) { return; } @@ -1031,6 +1039,7 @@ public class GameAction { if (AllZone.getZoneOf(persistCard).is(Constant.Zone.Graveyard)) { PlayerZone ownerPlay = persistCard.getOwner().getZone(Constant.Zone.Battlefield); Card card = moveTo(ownerPlay, persistCard); + AllZone.getGameAction().checkStateEffects(true); card.addCounter(Counters.M1M1, 1); } }