use of mage.game.permanent.token.ZombieToken in project mage by magefree.
the class CellarDoorEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null && player.getLibrary().hasCards()) {
Card card = player.getLibrary().removeFromBottom(game);
if (card != null) {
player.moveCards(card, Zone.GRAVEYARD, source, game);
if (card.isCreature(game)) {
ZombieToken token = new ZombieToken();
token.putOntoBattlefield(1, game, source, source.getControllerId());
}
}
return true;
}
return false;
}
Aggregations