* Crypsis - fixed rollback error on card usage;

This commit is contained in:
Oleg Agafonov 2020-01-13 10:42:20 +04:00
parent 69e52815b6
commit d78e2b91ef

View file

@ -1,7 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
@ -11,16 +9,17 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.FilterCard; import mage.filter.FilterPermanent;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class Crypsis extends CardImpl { public final class Crypsis extends CardImpl {
static final FilterCard filter = new FilterCard("creatures your opponents control"); static final FilterPermanent filter = new FilterPermanent("creatures your opponents control");
static { static {
filter.add(CardType.CREATURE.getPredicate()); filter.add(CardType.CREATURE.getPredicate());
@ -28,8 +27,7 @@ public final class Crypsis extends CardImpl {
} }
public Crypsis(UUID ownerId, CardSetInfo setInfo) { public Crypsis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
// Target creature you control gains protection from creatures your opponents control until end of turn. Untap it. // Target creature you control gains protection from creatures your opponents control until end of turn. Untap it.
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new ProtectionAbility(filter), Duration.EndOfTurn)); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new ProtectionAbility(filter), Duration.EndOfTurn));
@ -37,7 +35,7 @@ public final class Crypsis extends CardImpl {
effect.setText("Untap it."); effect.setText("Untap it.");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
} }
public Crypsis(final Crypsis card) { public Crypsis(final Crypsis card) {