Search in sources :

Example 1 with BecomesCreatureAllEffect

use of mage.abilities.effects.common.continuous.BecomesCreatureAllEffect in project mage by magefree.

the class JolraelEmpressOfBeastsEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
    if (targetPlayer != null) {
        FilterPermanent filter = new FilterLandPermanent();
        filter.add(new ControllerIdPredicate(targetPlayer.getId()));
        game.addEffect(new BecomesCreatureAllEffect(new CreatureToken(3, 3), "lands", filter, Duration.EndOfTurn, false), source);
        return true;
    }
    return false;
}
Also used : TargetPlayer(mage.target.TargetPlayer) Player(mage.players.Player) FilterPermanent(mage.filter.FilterPermanent) FilterLandPermanent(mage.filter.common.FilterLandPermanent) ControllerIdPredicate(mage.filter.predicate.permanent.ControllerIdPredicate) BecomesCreatureAllEffect(mage.abilities.effects.common.continuous.BecomesCreatureAllEffect) CreatureToken(mage.game.permanent.token.custom.CreatureToken)

Aggregations

BecomesCreatureAllEffect (mage.abilities.effects.common.continuous.BecomesCreatureAllEffect)1 FilterPermanent (mage.filter.FilterPermanent)1 FilterLandPermanent (mage.filter.common.FilterLandPermanent)1 ControllerIdPredicate (mage.filter.predicate.permanent.ControllerIdPredicate)1 CreatureToken (mage.game.permanent.token.custom.CreatureToken)1 Player (mage.players.Player)1 TargetPlayer (mage.target.TargetPlayer)1