use of mage.game.permanent.token.MyrToken in project mage by magefree.
the class MyrIncubatorEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && controller.searchLibrary(target, source, game)) {
if (!target.getTargets().isEmpty()) {
tokensToCreate = target.getTargets().size();
controller.moveCards(new CardsImpl(target.getTargets()), Zone.EXILED, source, game);
}
CreateTokenEffect effect = new CreateTokenEffect(new MyrToken(), tokensToCreate);
effect.apply(game, source);
controller.shuffleLibrary(source, game);
return true;
}
return false;
}
use of mage.game.permanent.token.MyrToken in project mage by magefree.
the class GenesisChamberEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (permanent != null) {
MyrToken token = new MyrToken();
token.putOntoBattlefield(1, game, source, permanent.getControllerId());
}
return true;
}
Aggregations