* Compelling Deterrance - Fixed that static effects of the card that goes to hand did not end before the discard happens (fixes #3368);

This commit is contained in:
LevelX2 2017-05-21 00:14:06 +02:00
parent 40f192eafc
commit ca9f596e4a
2 changed files with 4 additions and 4 deletions

View file

@ -27,6 +27,7 @@
*/
package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
@ -41,8 +42,6 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetNonlandPermanent;
import java.util.UUID;
/**
*
* @author fireshoes
@ -50,7 +49,7 @@ import java.util.UUID;
public class CompellingDeterrence extends CardImpl {
public CompellingDeterrence(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
// Return target nonland permanent to its owner's hand. Then that player discards a card if you control a Zombie.
this.getSpellAbility().addEffect(new CompellingDeterrenceEffect());
@ -90,6 +89,7 @@ class CompellingDeterrenceEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && player != null) {
player.moveCards(target, Zone.HAND, source, game);
game.applyEffects();
FilterPermanent FILTER = new FilterPermanent();
FILTER.add(new SubtypePredicate("Zombie"));
if (game.getState().getBattlefield().countAll(FILTER, controller.getId(), game) > 0) {

View file

@ -54,7 +54,7 @@ public class CastOnlyDuringPhaseStepSourceEffect extends ContinuousRuleModifying
return true;
}
}
return false; // casr not prevented by this effect
return false; // cast not prevented by this effect
}
@Override