Added subtye parameter to FilterCreaturePermanent and FilterControlledCreaturePermanent

This commit is contained in:
Plopman 2013-06-28 22:25:22 +02:00
parent 918e6f4e66
commit 7dbbac4da3
2 changed files with 15 additions and 0 deletions

View file

@ -30,6 +30,7 @@ package mage.filter.common;
import mage.constants.CardType;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
/**
*
@ -46,6 +47,13 @@ public class FilterControlledCreaturePermanent extends FilterControlledPermanent
this.add(new CardTypePredicate(CardType.CREATURE));
}
public FilterControlledCreaturePermanent(String subtype, String name) {
super(name);
this.add(new CardTypePredicate(CardType.CREATURE));
this.add(new SubtypePredicate(subtype));
}
public FilterControlledCreaturePermanent(final FilterControlledCreaturePermanent filter) {
super(filter);
}

View file

@ -31,6 +31,7 @@ package mage.filter.common;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
/**
*
@ -47,6 +48,12 @@ public class FilterCreaturePermanent extends FilterPermanent {
this.add(new CardTypePredicate(CardType.CREATURE));
}
public FilterCreaturePermanent(String name, String subtype) {
super(name);
this.add(new CardTypePredicate(CardType.CREATURE));
this.add(new SubtypePredicate(subtype));
}
public FilterCreaturePermanent(final FilterCreaturePermanent filter) {
super(filter);
}