use of mage.game.permanent.token.PurphorossInterventionToken in project mage by magefree.
the class PurphorossInterventionEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Token token = new PurphorossInterventionToken(source.getManaCostsToPay().getX());
token.putOntoBattlefield(1, game, source, source.getControllerId());
token.getLastAddedTokenIds().stream().forEach(uuid -> game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeTargetEffect().setText("sacrifice this creature").setTargetPointer(new FixedTarget(uuid, game))), source));
return true;
}
Aggregations