Search in sources :

Example 1 with EldraziScionToken

use of mage.game.permanent.token.EldraziScionToken in project mage by magefree.

the class BlightHerderEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
        Target target = new TargetCardInExile(2, 2, filter, null);
        if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
            if (controller.chooseTarget(outcome, target, source, game)) {
                Cards cardsToGraveyard = new CardsImpl(target.getTargets());
                controller.moveCards(cardsToGraveyard, Zone.GRAVEYARD, source, game);
                return new CreateTokenEffect(new EldraziScionToken(), 3).apply(game, source);
            }
        }
        return true;
    }
    return false;
}
Also used : Player(mage.players.Player) Target(mage.target.Target) TargetCardInExile(mage.target.common.TargetCardInExile) CreateTokenEffect(mage.abilities.effects.common.CreateTokenEffect) EldraziScionToken(mage.game.permanent.token.EldraziScionToken) Cards(mage.cards.Cards) CardsImpl(mage.cards.CardsImpl)

Aggregations

CreateTokenEffect (mage.abilities.effects.common.CreateTokenEffect)1 Cards (mage.cards.Cards)1 CardsImpl (mage.cards.CardsImpl)1 EldraziScionToken (mage.game.permanent.token.EldraziScionToken)1 Player (mage.players.Player)1 Target (mage.target.Target)1 TargetCardInExile (mage.target.common.TargetCardInExile)1