Search in sources :

Example 11 with BecomesCreatureTargetEffect

use of mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect in project mage by magefree.

the class ObuunMulDayaAncestorToken method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent permanent = source.getSourcePermanentIfItStillExists(game);
    if (permanent == null) {
        return false;
    }
    game.addEffect(new BecomesCreatureTargetEffect(new ObuunMulDayaAncestorToken(permanent.getPower().getValue()), false, true, Duration.EndOfTurn), source);
    return true;
}
Also used : Permanent(mage.game.permanent.Permanent) TargetCreaturePermanent(mage.target.common.TargetCreaturePermanent) TargetPermanent(mage.target.TargetPermanent) BecomesCreatureTargetEffect(mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect)

Example 12 with BecomesCreatureTargetEffect

use of mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect in project mage by magefree.

the class VastwoodAnimistElementalToken method apply.

@Override
public boolean apply(Game game, Ability source) {
    int amount = new PermanentsOnBattlefieldCount(filterAllies).calculate(game, source, this);
    ContinuousEffect effect = new BecomesCreatureTargetEffect(new VastwoodAnimistElementalToken(amount), false, true, Duration.EndOfTurn);
    effect.setTargetPointer(targetPointer);
    game.addEffect(effect, source);
    return false;
}
Also used : BecomesCreatureTargetEffect(mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect) PermanentsOnBattlefieldCount(mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount) ContinuousEffect(mage.abilities.effects.ContinuousEffect)

Aggregations

BecomesCreatureTargetEffect (mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect)12 ContinuousEffect (mage.abilities.effects.ContinuousEffect)5 Permanent (mage.game.permanent.Permanent)4 Player (mage.players.Player)4 FixedTarget (mage.target.targetpointer.FixedTarget)4 CreatureToken (mage.game.permanent.token.custom.CreatureToken)3 TargetPermanent (mage.target.TargetPermanent)3 UUID (java.util.UUID)2 PermanentsOnBattlefieldCount (mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount)2 Effect (mage.abilities.effects.Effect)2 OneShotEffect (mage.abilities.effects.OneShotEffect)2 Card (mage.cards.Card)2 TargetCardInLibrary (mage.target.common.TargetCardInLibrary)2 ReflexiveTriggeredAbility (mage.abilities.common.delayed.ReflexiveTriggeredAbility)1 ConditionalOneShotEffect (mage.abilities.decorator.ConditionalOneShotEffect)1 UntapTargetEffect (mage.abilities.effects.common.UntapTargetEffect)1 AddCountersSourceEffect (mage.abilities.effects.common.counter.AddCountersSourceEffect)1 AddCountersTargetEffect (mage.abilities.effects.common.counter.AddCountersTargetEffect)1 SearchLibraryPutInPlayEffect (mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect)1 Hint (mage.abilities.hint.Hint)1