use of mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect in project mage by magefree.
the class AddleEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
ChoiceColor choice = new ChoiceColor();
if (controller != null && controller.choose(outcome, choice, game)) {
ObjectColor color = choice.getColor();
game.informPlayers(controller.getLogName() + " chooses " + color + '.');
FilterCard filter = new FilterCard();
filter.add(new ColorPredicate(color));
Effect effect = new DiscardCardYouChooseTargetEffect(filter);
return effect.apply(game, source);
}
return false;
}
Aggregations