Search in sources :

Example 1 with ZombieDecayedToken

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

the class TaintedAdversaryEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Integer timesPaid = (Integer) getValue("timesPaid");
    if (timesPaid == null || timesPaid <= 0) {
        return false;
    }
    ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(timesPaid)), false, staticText);
    ability.addEffect(new CreateTokenEffect(new ZombieDecayedToken(), 2 * timesPaid));
    game.fireReflexiveTriggeredAbility(ability, source);
    return true;
}
Also used : AddCountersSourceEffect(mage.abilities.effects.common.counter.AddCountersSourceEffect) ReflexiveTriggeredAbility(mage.abilities.common.delayed.ReflexiveTriggeredAbility) CreateTokenEffect(mage.abilities.effects.common.CreateTokenEffect) ZombieDecayedToken(mage.game.permanent.token.ZombieDecayedToken)

Example 2 with ZombieDecayedToken

use of mage.game.permanent.token.ZombieDecayedToken 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

ReflexiveTriggeredAbility (mage.abilities.common.delayed.ReflexiveTriggeredAbility)2 ZombieDecayedToken (mage.game.permanent.token.ZombieDecayedToken)2 CreateTokenEffect (mage.abilities.effects.common.CreateTokenEffect)1 ExileTargetEffect (mage.abilities.effects.common.ExileTargetEffect)1 AddCountersSourceEffect (mage.abilities.effects.common.counter.AddCountersSourceEffect)1 TargetCardInGraveyard (mage.target.common.TargetCardInGraveyard)1