use of mage.filter.common.FilterLandCard in project mage by magefree.
the class TheMendingOfDominariaSecondEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
controller.moveCards(controller.getGraveyard().getCards(new FilterLandCard(), source.getSourceId(), source.getControllerId(), game), Zone.BATTLEFIELD, source, game, false, false, false, null);
for (Card card : controller.getGraveyard().getCards(game)) {
controller.moveCardToLibraryWithInfo(card, source, game, Zone.GRAVEYARD, true, true);
}
controller.shuffleLibrary(source, game);
}
return false;
}
use of mage.filter.common.FilterLandCard in project mage by magefree.
the class TrenchGorgerEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
TargetCardInLibrary target = new TargetCardInLibrary(0, Integer.MAX_VALUE, new FilterLandCard("any number of land cards"));
target.choose(outcome, controller.getId(), controller.getId(), game);
int count = 0;
for (UUID cardId : target.getTargets()) {
Card card = game.getCard(cardId);
if (card != null) {
controller.moveCardToExileWithInfo(card, null, "", source, game, Zone.LIBRARY, true);
count++;
}
}
controller.shuffleLibrary(source, game);
game.addEffect(new SetPowerToughnessSourceEffect(count, count, Duration.EndOfGame, SubLayer.SetPT_7b), source);
return true;
}
return false;
}
Aggregations