From dc2d8145fde1f80e008c13692a74280c8dabaf1b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 20 Apr 2018 17:17:51 -0400 Subject: [PATCH] added copy methods that I accidentally removed --- .../src/main/java/mage/player/ai/ComputerPlayer.java | 2 +- .../filter/common/FilterOpponentOrPlaneswalker.java | 5 +++++ .../filter/common/FilterPlayerOrPlaneswalker.java | 5 +++++ .../target/common/TargetOpponentOrPlaneswalker.java | 5 +++++ .../target/common/TargetPlayerOrPlaneswalker.java | 12 ------------ 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index d6320f38b0..5447c4f1ce 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -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 alreadyTargetted = target.getTargets(); diff --git a/Mage/src/main/java/mage/filter/common/FilterOpponentOrPlaneswalker.java b/Mage/src/main/java/mage/filter/common/FilterOpponentOrPlaneswalker.java index 95eaa60b17..c191ec868e 100644 --- a/Mage/src/main/java/mage/filter/common/FilterOpponentOrPlaneswalker.java +++ b/Mage/src/main/java/mage/filter/common/FilterOpponentOrPlaneswalker.java @@ -25,4 +25,9 @@ public class FilterOpponentOrPlaneswalker extends FilterPermanentOrPlayer { public FilterOpponentOrPlaneswalker(final FilterOpponentOrPlaneswalker filter) { super(filter); } + + @Override + public FilterOpponentOrPlaneswalker copy() { + return new FilterOpponentOrPlaneswalker(this); + } } diff --git a/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java b/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java index e02bb5a03a..74e5711323 100644 --- a/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java +++ b/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java @@ -25,4 +25,9 @@ public class FilterPlayerOrPlaneswalker extends FilterPermanentOrPlayer { public FilterPlayerOrPlaneswalker(final FilterPlayerOrPlaneswalker filter) { super(filter); } + + @Override + public FilterPlayerOrPlaneswalker copy() { + return new FilterPlayerOrPlaneswalker(this); + } } diff --git a/Mage/src/main/java/mage/target/common/TargetOpponentOrPlaneswalker.java b/Mage/src/main/java/mage/target/common/TargetOpponentOrPlaneswalker.java index 4685e32c3b..d459300fc7 100644 --- a/Mage/src/main/java/mage/target/common/TargetOpponentOrPlaneswalker.java +++ b/Mage/src/main/java/mage/target/common/TargetOpponentOrPlaneswalker.java @@ -32,4 +32,9 @@ public class TargetOpponentOrPlaneswalker extends TargetPermanentOrPlayer { public TargetOpponentOrPlaneswalker(final TargetOpponentOrPlaneswalker target) { super(target); } + + @Override + public TargetOpponentOrPlaneswalker copy() { + return new TargetOpponentOrPlaneswalker(this); + } } diff --git a/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java b/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java index a7452ddf41..27101e8ad3 100644 --- a/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java +++ b/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java @@ -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);