Search in sources :

Example 1 with AkoumStonewakerElementalToken

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

the class ForceOfRageEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Token token = new AkoumStonewakerElementalToken();
    token.putOntoBattlefield(2, game, source, source.getControllerId());
    List<Permanent> permanentList = new ArrayList();
    for (UUID permId : token.getLastAddedTokenIds()) {
        permanentList.add(game.getPermanent(permId));
    }
    Effect effect = new SacrificeTargetEffect("sacrifice those tokens");
    effect.setTargetPointer(new FixedTargets(permanentList, game));
    game.addDelayedTriggeredAbility(new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(effect), source);
    return true;
}
Also used : Permanent(mage.game.permanent.Permanent) FixedTargets(mage.target.targetpointer.FixedTargets) AkoumStonewakerElementalToken(mage.game.permanent.token.AkoumStonewakerElementalToken) ArrayList(java.util.ArrayList) AkoumStonewakerElementalToken(mage.game.permanent.token.AkoumStonewakerElementalToken) Token(mage.game.permanent.token.Token) SacrificeTargetEffect(mage.abilities.effects.common.SacrificeTargetEffect) OneShotEffect(mage.abilities.effects.OneShotEffect) Effect(mage.abilities.effects.Effect) AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(mage.abilities.common.delayed.AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility) SacrificeTargetEffect(mage.abilities.effects.common.SacrificeTargetEffect) UUID(java.util.UUID)

Aggregations

ArrayList (java.util.ArrayList)1 UUID (java.util.UUID)1 AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility (mage.abilities.common.delayed.AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility)1 Effect (mage.abilities.effects.Effect)1 OneShotEffect (mage.abilities.effects.OneShotEffect)1 SacrificeTargetEffect (mage.abilities.effects.common.SacrificeTargetEffect)1 Permanent (mage.game.permanent.Permanent)1 AkoumStonewakerElementalToken (mage.game.permanent.token.AkoumStonewakerElementalToken)1 Token (mage.game.permanent.token.Token)1 FixedTargets (mage.target.targetpointer.FixedTargets)1