use FilterArtifactOrEnchantmentPermanent

This commit is contained in:
Neil Gentleman 2016-07-17 13:17:47 -07:00
parent 8d0e7e1b40
commit da07a58a85
22 changed files with 51 additions and 238 deletions

View file

@ -32,9 +32,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
import mage.target.TargetPermanent;
/**
@ -43,20 +41,12 @@ import mage.target.TargetPermanent;
*/
public class AltarsLight extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
static {
filter.add(Predicates.or(
new CardTypePredicate(CardType.ARTIFACT),
new CardTypePredicate(CardType.ENCHANTMENT)));
}
public AltarsLight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}{W}");
// Exile target artifact or enchantment.
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(filter));
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
}
public AltarsLight(final AltarsLight card) {