mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
fixed a build failure
This commit is contained in:
parent
c5a4689623
commit
3d4dd8943b
1 changed files with 11 additions and 5 deletions
|
@ -15,6 +15,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
@ -52,16 +53,21 @@ public final class ObsessiveCollector extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
enum ObsessiveCollectorPredicate implements ObjectSourcePlayerPredicate<Card> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectSourcePlayer<Card> input, Game game) {
|
||||
return game.getPlayer(input.getPlayerId()).getHand().size() == input.getObject().getManaValue();
|
||||
}
|
||||
}
|
||||
|
||||
class ObsessiveCollectorEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard();
|
||||
|
||||
static {
|
||||
filter.add(ObsessiveCollectorEffect::checkCard);
|
||||
}
|
||||
|
||||
private static boolean checkCard(ObjectSourcePlayer<Card> input, Game game) {
|
||||
return game.getPlayer(input.getPlayerId()).getHand().size() == input.getObject().getManaValue();
|
||||
filter.add(ObsessiveCollectorPredicate.instance);
|
||||
}
|
||||
|
||||
ObsessiveCollectorEffect() {
|
||||
|
|
Loading…
Reference in a new issue