fixed a build failure

This commit is contained in:
Evan Kranzler 2022-03-01 18:43:55 -05:00
parent c5a4689623
commit 3d4dd8943b

View file

@ -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() {