use of mage.abilities.effects.common.search.SearchLibraryPutInPlayTargetPlayerEffect in project mage by magefree.
the class OathOfLiegesPredicate method apply.
@Override
public boolean apply(Game game, Ability source) {
Player activePlayer = game.getPlayer(game.getActivePlayerId());
if (activePlayer != null) {
if (activePlayer.chooseUse(outcome, "Search your library for a basic land card, put that card onto the battlefield, then shuffle?", source, game)) {
Effect effect = new SearchLibraryPutInPlayTargetPlayerEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), false, false, Outcome.PutLandInPlay, true);
effect.setTargetPointer(new FixedTarget(game.getActivePlayerId()));
return effect.apply(game, source);
}
return true;
}
return false;
}
Aggregations