From 7f22f527fe82aa161d9d48b729cfff9129e434d9 Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Thu, 29 Jan 2015 01:16:28 -0500 Subject: [PATCH] Changed Object to MageItem in FilterPermanentOrPlayer and FilterPermanentOrPlayerWithCounter since that is the more specific class that both Permanent and Player inherit from. --- Mage/src/mage/filter/common/FilterPermanentOrPlayer.java | 7 ++++--- .../filter/common/FilterPermanentOrPlayerWithCounter.java | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Mage/src/mage/filter/common/FilterPermanentOrPlayer.java b/Mage/src/mage/filter/common/FilterPermanentOrPlayer.java index dd8f284d46..fd7a7405b7 100644 --- a/Mage/src/mage/filter/common/FilterPermanentOrPlayer.java +++ b/Mage/src/mage/filter/common/FilterPermanentOrPlayer.java @@ -37,11 +37,12 @@ import mage.game.permanent.Permanent; import mage.players.Player; import java.util.UUID; +import mage.MageItem; /** * @author nantuko */ -public class FilterPermanentOrPlayer extends FilterImpl implements FilterInPlay { +public class FilterPermanentOrPlayer extends FilterImpl implements FilterInPlay { protected FilterPermanent permanentFilter; protected FilterPlayer playerFilter; @@ -63,7 +64,7 @@ public class FilterPermanentOrPlayer extends FilterImpl implements Filte } @Override - public boolean match(Object o, Game game) { + public boolean match(MageItem o, Game game) { if (o instanceof Player) { return playerFilter.match((Player) o, game); } else if (o instanceof Permanent) { @@ -73,7 +74,7 @@ public class FilterPermanentOrPlayer extends FilterImpl implements Filte } @Override - public boolean match(Object o, UUID sourceId, UUID playerId, Game game) { + public boolean match(MageItem o, UUID sourceId, UUID playerId, Game game) { if (o instanceof Player) { return playerFilter.match((Player) o, sourceId, playerId, game); } else if (o instanceof Permanent) { diff --git a/Mage/src/mage/filter/common/FilterPermanentOrPlayerWithCounter.java b/Mage/src/mage/filter/common/FilterPermanentOrPlayerWithCounter.java index 2697f975f3..44d4330b85 100644 --- a/Mage/src/mage/filter/common/FilterPermanentOrPlayerWithCounter.java +++ b/Mage/src/mage/filter/common/FilterPermanentOrPlayerWithCounter.java @@ -33,6 +33,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import java.util.UUID; +import mage.MageItem; /** * @author nantuko @@ -52,7 +53,7 @@ public class FilterPermanentOrPlayerWithCounter extends FilterPermanentOrPlayer } @Override - public boolean match(Object o, Game game) { + public boolean match(MageItem o, Game game) { if (o instanceof Player) { if (((Player)o).getCounters().size() == 0) { return false; @@ -66,7 +67,7 @@ public class FilterPermanentOrPlayerWithCounter extends FilterPermanentOrPlayer } @Override - public boolean match(Object o, UUID sourceId, UUID playerId, Game game) { + public boolean match(MageItem o, UUID sourceId, UUID playerId, Game game) { if (o instanceof Player) { return playerFilter.match((Player) o, sourceId, playerId, game); } else if (o instanceof Permanent) {