Added subtype parameter in FilterPermanent

This commit is contained in:
Plopman 2013-09-02 19:57:46 +02:00
parent 6a3896b1a2
commit bd47580d6d

View file

@ -35,6 +35,7 @@ import mage.filter.predicate.ObjectPlayer;
import mage.filter.predicate.ObjectPlayerPredicate;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -57,6 +58,11 @@ public class FilterPermanent extends FilterObject<Permanent> {
public FilterPermanent(String name) {
super(name);
}
public FilterPermanent(String subtype, String name) {
super(name);
this.add(new SubtypePredicate(subtype));
}
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
if (!this.match(permanent, game)) {