use of mage.filter.common.FilterHistoricCard in project mage by magefree.
the class UrzasTomeEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
new DrawCardSourceControllerEffect(1).apply(game, source);
if (controller != null && controller.chooseUse(Outcome.Exile, "Exile a historic card from your graveyard?", source, game)) {
Cost cost = new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterHistoricCard()));
if (cost.canPay(source, source, controller.getId(), game)) {
if (cost.pay(source, game, source, controller.getId(), false, null)) {
return true;
}
}
}
if (controller != null) {
controller.discard(1, false, false, source, game);
return true;
}
return false;
}
Aggregations