spjspj - Fix Maintenance Droid

This commit is contained in:
spjspj 2016-09-28 01:09:54 +10:00
parent a6028f2e76
commit 6eead24f0a

View file

@ -48,6 +48,7 @@ import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.Predicate; import mage.filter.predicate.Predicate;
import mage.filter.predicate.permanent.CounterPredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
@ -143,22 +144,3 @@ class MaintenanceDroidEffect extends OneShotEffect {
} }
} }
class CounterPredicate implements Predicate<MageObject> {
private final CounterType counter;
public CounterPredicate(CounterType counter) {
this.counter = counter;
}
@Override
public boolean apply(MageObject input, Game game) {
return game.getCard(input.getId()).getCounters(game).getCount(counter) > 0;
}
@Override
public String toString() {
return "CounterType(" + counter.getName() + ')';
}
}