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;
/**
*
@ -44,6 +45,13 @@ public class FilterControlledCreaturePermanent extends FilterControlledPermanent
public FilterControlledCreaturePermanent(String name) {
super(name);
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) {

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;
/**
*
@ -45,6 +46,12 @@ public class FilterCreaturePermanent extends FilterPermanent {
public FilterCreaturePermanent(String name) {
super(name);
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) {