added copy methods that I accidentally removed

This commit is contained in:
Evan Kranzler 2018-04-20 17:17:51 -04:00
parent fe099d252f
commit dc2d8145fd
5 changed files with 16 additions and 13 deletions

View file

@ -600,7 +600,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
}
if (targets.isEmpty() && target.isRequired(source)) {
targets = game.getBattlefield().getActivePermanents(((TargetPlayerOrPlaneswalker) t.getFilter()).getPlaneswalkerFilter(), playerId, game);
targets = game.getBattlefield().getActivePermanents(((TargetPlayerOrPlaneswalker) t.getFilter()).getFilterPermanent(), playerId, game);
}
for (Permanent permanent : targets) {
List<UUID> alreadyTargetted = target.getTargets();

View file

@ -25,4 +25,9 @@ public class FilterOpponentOrPlaneswalker extends FilterPermanentOrPlayer {
public FilterOpponentOrPlaneswalker(final FilterOpponentOrPlaneswalker filter) {
super(filter);
}
@Override
public FilterOpponentOrPlaneswalker copy() {
return new FilterOpponentOrPlaneswalker(this);
}
}

View file

@ -25,4 +25,9 @@ public class FilterPlayerOrPlaneswalker extends FilterPermanentOrPlayer {
public FilterPlayerOrPlaneswalker(final FilterPlayerOrPlaneswalker filter) {
super(filter);
}
@Override
public FilterPlayerOrPlaneswalker copy() {
return new FilterPlayerOrPlaneswalker(this);
}
}

View file

@ -32,4 +32,9 @@ public class TargetOpponentOrPlaneswalker extends TargetPermanentOrPlayer {
public TargetOpponentOrPlaneswalker(final TargetOpponentOrPlaneswalker target) {
super(target);
}
@Override
public TargetOpponentOrPlaneswalker copy() {
return new TargetOpponentOrPlaneswalker(this);
}
}

View file

@ -5,14 +5,6 @@
*/
package mage.target.common;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterPlaneswalkerPermanent;
import mage.filter.common.FilterPlayerOrPlaneswalker;
/**
@ -41,10 +33,6 @@ public class TargetPlayerOrPlaneswalker extends TargetPermanentOrPlayer {
super(target);
}
public FilterPlaneswalkerPermanent getPlaneswalkerFilter() {
return filter.getPlaneswalkerFilter();
}
@Override
public TargetPlayerOrPlaneswalker copy() {
return new TargetPlayerOrPlaneswalker(this);