Search in sources :

Example 1 with CorpseweftZombieToken

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

the class CorpseweftEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
        int amount = 0;
        for (Cost cost : source.getCosts()) {
            if (cost instanceof ExileFromGraveCost) {
                amount = ((ExileFromGraveCost) cost).getExiledCards().size() * 2;
                new CreateTokenEffect(new CorpseweftZombieToken(amount, amount), 1, true, false).apply(game, source);
            }
        }
        if (amount > 0) {
        }
    }
    return false;
}
Also used : Player(mage.players.Player) ExileFromGraveCost(mage.abilities.costs.common.ExileFromGraveCost) CreateTokenEffect(mage.abilities.effects.common.CreateTokenEffect) Cost(mage.abilities.costs.Cost) ExileFromGraveCost(mage.abilities.costs.common.ExileFromGraveCost) CorpseweftZombieToken(mage.game.permanent.token.CorpseweftZombieToken)

Aggregations

Cost (mage.abilities.costs.Cost)1 ExileFromGraveCost (mage.abilities.costs.common.ExileFromGraveCost)1 CreateTokenEffect (mage.abilities.effects.common.CreateTokenEffect)1 CorpseweftZombieToken (mage.game.permanent.token.CorpseweftZombieToken)1 Player (mage.players.Player)1