Search in sources :

Example 1 with OxToken

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

the class TransmogrifyingWandEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent creature = game.getPermanent(source.getFirstTarget());
    if (creature == null) {
        return false;
    }
    Effect effect = new CreateTokenTargetEffect(new OxToken());
    effect.setTargetPointer(new FixedTarget(creature.getControllerId(), game));
    new DestroyTargetEffect().apply(game, source);
    return effect.apply(game, source);
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) Permanent(mage.game.permanent.Permanent) TargetCreaturePermanent(mage.target.common.TargetCreaturePermanent) OxToken(mage.game.permanent.token.OxToken) DestroyTargetEffect(mage.abilities.effects.common.DestroyTargetEffect) CreateTokenTargetEffect(mage.abilities.effects.common.CreateTokenTargetEffect) DestroyTargetEffect(mage.abilities.effects.common.DestroyTargetEffect) OneShotEffect(mage.abilities.effects.OneShotEffect) CreateTokenTargetEffect(mage.abilities.effects.common.CreateTokenTargetEffect) AddCountersSourceEffect(mage.abilities.effects.common.counter.AddCountersSourceEffect) Effect(mage.abilities.effects.Effect)

Aggregations

Effect (mage.abilities.effects.Effect)1 OneShotEffect (mage.abilities.effects.OneShotEffect)1 CreateTokenTargetEffect (mage.abilities.effects.common.CreateTokenTargetEffect)1 DestroyTargetEffect (mage.abilities.effects.common.DestroyTargetEffect)1 AddCountersSourceEffect (mage.abilities.effects.common.counter.AddCountersSourceEffect)1 Permanent (mage.game.permanent.Permanent)1 OxToken (mage.game.permanent.token.OxToken)1 TargetCreaturePermanent (mage.target.common.TargetCreaturePermanent)1 FixedTarget (mage.target.targetpointer.FixedTarget)1