mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
Remove an unused and functionally duplicated Filter class
This commit is contained in:
parent
76a61b0bef
commit
f1ff4dbd0e
1 changed files with 0 additions and 64 deletions
|
@ -1,64 +0,0 @@
|
|||
|
||||
package mage.filter.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterImpl;
|
||||
import mage.filter.FilterInPlay;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class FilterControlledCreatureInPlay extends FilterImpl<Object> implements FilterInPlay<Object> {
|
||||
|
||||
protected final FilterCreaturePermanent creatureFilter;
|
||||
|
||||
public FilterControlledCreatureInPlay() {
|
||||
this("creature");
|
||||
}
|
||||
|
||||
public FilterControlledCreatureInPlay(String name) {
|
||||
super(name);
|
||||
creatureFilter = new FilterCreaturePermanent();
|
||||
creatureFilter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkObjectClass(Object object) {
|
||||
return object instanceof Permanent;
|
||||
}
|
||||
|
||||
public FilterControlledCreatureInPlay(final FilterControlledCreatureInPlay filter) {
|
||||
super(filter);
|
||||
this.creatureFilter = filter.creatureFilter.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object o, Game game) {
|
||||
if (o instanceof Permanent) {
|
||||
return creatureFilter.match((Permanent) o, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object o, UUID sourceId, UUID playerId, Game game) {
|
||||
if (o instanceof Permanent) {
|
||||
return creatureFilter.match((Permanent) o, sourceId, playerId, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public FilterCreaturePermanent getCreatureFilter() {
|
||||
return this.creatureFilter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterControlledCreatureInPlay copy() {
|
||||
return new FilterControlledCreatureInPlay(this);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue