Search in sources :

Example 51 with ExileTargetEffect

use of mage.abilities.effects.common.ExileTargetEffect in project mage by magefree.

the class DiregrafHordeEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    if (!new ZombieDecayedToken().putOntoBattlefield(2, game, source, source.getControllerId())) {
        return false;
    }
    ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new ExileTargetEffect(), false, "exile up to two target cards from graveyards");
    ability.addTarget(new TargetCardInGraveyard(0, 2));
    game.fireReflexiveTriggeredAbility(ability, source);
    return true;
}
Also used : TargetCardInGraveyard(mage.target.common.TargetCardInGraveyard) ReflexiveTriggeredAbility(mage.abilities.common.delayed.ReflexiveTriggeredAbility) ZombieDecayedToken(mage.game.permanent.token.ZombieDecayedToken) ExileTargetEffect(mage.abilities.effects.common.ExileTargetEffect)

Aggregations

ExileTargetEffect (mage.abilities.effects.common.ExileTargetEffect)51 Permanent (mage.game.permanent.Permanent)40 FixedTarget (mage.target.targetpointer.FixedTarget)38 AtTheBeginOfNextEndStepDelayedTriggeredAbility (mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility)31 Player (mage.players.Player)31 DelayedTriggeredAbility (mage.abilities.DelayedTriggeredAbility)26 CreateTokenCopyTargetEffect (mage.abilities.effects.common.CreateTokenCopyTargetEffect)20 Card (mage.cards.Card)20 ContinuousEffect (mage.abilities.effects.ContinuousEffect)15 GainAbilityTargetEffect (mage.abilities.effects.common.continuous.GainAbilityTargetEffect)13 Effect (mage.abilities.effects.Effect)12 OneShotEffect (mage.abilities.effects.OneShotEffect)12 FixedTargets (mage.target.targetpointer.FixedTargets)10 UUID (java.util.UUID)9 FilterControlledCreaturePermanent (mage.filter.common.FilterControlledCreaturePermanent)9 TargetPermanent (mage.target.TargetPermanent)8 ArrayList (java.util.ArrayList)6 AtTheEndOfCombatDelayedTriggeredAbility (mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility)6 FilterCreatureCard (mage.filter.common.FilterCreatureCard)6 FilterCard (mage.filter.FilterCard)5