use of mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect in project mage by magefree.
the class FinaleOfRevelationEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
int xValue = source.getManaCostsToPay().getX();
if (xValue < 10) {
player.drawCards(xValue, source, game);
} else {
player.putCardsOnTopOfLibrary(player.getGraveyard(), game, source, false);
player.shuffleLibrary(source, game);
player.drawCards(xValue, source, game);
new UntapLandsEffect(5).apply(game, source);
game.addEffect(new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.EndOfGame, MaximumHandSizeControllerEffect.HandSizeModification.SET), source);
}
return true;
}
Aggregations