updated TargetPlayerOrPlaneswalker to be a subclass of TargetPlayerOrPermanent (as well as the respective filters)

This commit is contained in:
Evan Kranzler 2018-04-20 13:34:35 -04:00
parent 92bf8b77de
commit d290c7f26b
7 changed files with 31 additions and 507 deletions

View file

@ -65,7 +65,7 @@ public class TargetPermanentOrPlayer extends TargetImpl {
this.zone = Zone.ALL;
this.filter = new FilterPermanentOrPlayer();
this.targetName = filter.getMessage();
this.filterPermanent = new FilterPermanent();
this.filterPermanent = this.filter.getPermanentFilter();
}
public TargetPermanentOrPlayer(int minNumTargets, int maxNumTargets, boolean notTarget) {
@ -73,6 +73,11 @@ public class TargetPermanentOrPlayer extends TargetImpl {
this.notTarget = notTarget;
}
public TargetPermanentOrPlayer(int minNumTargets, int maxNumTargets, FilterPermanentOrPlayer filter, boolean notTarget) {
this(minNumTargets, maxNumTargets, notTarget);
this.filter = filter;
}
public TargetPermanentOrPlayer(final TargetPermanentOrPlayer target) {
super(target);
this.filter = target.filter.copy();