mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
spjspj - Fix Maintenance Droid
This commit is contained in:
parent
a6028f2e76
commit
6eead24f0a
1 changed files with 2 additions and 20 deletions
|
@ -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() + ')';
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue