Search in sources :

Example 1 with MaximumHandSizeControllerEffect

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;
}
Also used : Player(mage.players.Player) UntapLandsEffect(mage.abilities.effects.common.UntapLandsEffect) MaximumHandSizeControllerEffect(mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect)

Aggregations

UntapLandsEffect (mage.abilities.effects.common.UntapLandsEffect)1 MaximumHandSizeControllerEffect (mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect)1 Player (mage.players.Player)1