forked from External/mage
* New common class for flicker target effects * Update cards to ExileThenReturnTargetEffect * process game state before returning exiled card
43 lines
1.2 KiB
Java
43 lines
1.2 KiB
Java
package mage.cards.f;
|
|
|
|
import mage.abilities.effects.common.ExileThenReturnTargetEffect;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.filter.FilterPermanent;
|
|
import mage.filter.predicate.Predicates;
|
|
import mage.target.TargetPermanent;
|
|
|
|
import java.util.UUID;
|
|
|
|
/**
|
|
* @author TheElk801
|
|
*/
|
|
public final class FlickerOfFate extends CardImpl {
|
|
|
|
private static final FilterPermanent filter = new FilterPermanent("creature or enchantment");
|
|
|
|
static {
|
|
filter.add(Predicates.or(
|
|
CardType.CREATURE.getPredicate(),
|
|
CardType.ENCHANTMENT.getPredicate()
|
|
));
|
|
}
|
|
|
|
public FlickerOfFate(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
|
|
|
// Exile target creature or enchantment, then return it to the battlefield under its owner's control.
|
|
this.getSpellAbility().addEffect(new ExileThenReturnTargetEffect(false, false));
|
|
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
|
}
|
|
|
|
private FlickerOfFate(final FlickerOfFate card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public FlickerOfFate copy() {
|
|
return new FlickerOfFate(this);
|
|
}
|
|
}
|