Search in sources :

Example 1 with HungryForMoreVampireToken

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

the class HungryForMoreEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Token token = new HungryForMoreVampireToken();
    token.putOntoBattlefield(1, game, source, source.getControllerId());
    game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeTargetEffect().setTargetPointer(new FixedTargets(token.getLastAddedTokenIds().stream().map(game::getPermanent).collect(Collectors.toList()), game)).setText("sacrifice that token")), source);
    return true;
}
Also used : AtTheBeginOfNextEndStepDelayedTriggeredAbility(mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility) FixedTargets(mage.target.targetpointer.FixedTargets) HungryForMoreVampireToken(mage.game.permanent.token.HungryForMoreVampireToken) Token(mage.game.permanent.token.Token) HungryForMoreVampireToken(mage.game.permanent.token.HungryForMoreVampireToken) SacrificeTargetEffect(mage.abilities.effects.common.SacrificeTargetEffect)

Aggregations

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