Search in sources :

Example 1 with DemonToken

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

the class ArchfiendsVesselEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent archfiendsVessel = source.getSourcePermanentIfItStillExists(game);
    if (archfiendsVessel != null) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            boolean moved = controller.moveCards(archfiendsVessel, Zone.EXILED, source, game);
            if (moved) {
                Token token = new DemonToken();
                token.putOntoBattlefield(1, game, source, controller.getId());
            }
            return true;
        }
    }
    return false;
}
Also used : DemonToken(mage.game.permanent.token.DemonToken) Player(mage.players.Player) Permanent(mage.game.permanent.Permanent) DemonToken(mage.game.permanent.token.DemonToken) Token(mage.game.permanent.token.Token)

Aggregations

Permanent (mage.game.permanent.Permanent)1 DemonToken (mage.game.permanent.token.DemonToken)1 Token (mage.game.permanent.token.Token)1 Player (mage.players.Player)1