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.filter.FilterCard;
import mage.filter.predicate.Predicate;
import mage.filter.predicate.permanent.CounterPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
@ -142,23 +143,4 @@ class MaintenanceDroidEffect extends OneShotEffect {
return false;
}
}
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() + ')';
}
}
}