mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +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.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() + ')';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue