mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
Added subtype parameter in FilterPermanent
This commit is contained in:
parent
6a3896b1a2
commit
bd47580d6d
1 changed files with 6 additions and 0 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue