Search in sources :

Example 1 with PurphorossInterventionToken

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;
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) AtTheBeginOfNextEndStepDelayedTriggeredAbility(mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility) PurphorossInterventionToken(mage.game.permanent.token.PurphorossInterventionToken) PurphorossInterventionToken(mage.game.permanent.token.PurphorossInterventionToken) Token(mage.game.permanent.token.Token) SacrificeTargetEffect(mage.abilities.effects.common.SacrificeTargetEffect)

Aggregations

AtTheBeginOfNextEndStepDelayedTriggeredAbility (mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility)1 SacrificeTargetEffect (mage.abilities.effects.common.SacrificeTargetEffect)1 PurphorossInterventionToken (mage.game.permanent.token.PurphorossInterventionToken)1 Token (mage.game.permanent.token.Token)1 FixedTarget (mage.target.targetpointer.FixedTarget)1