use of mage.abilities.effects.common.CreateTokenCopyTargetEffect in project mage by magefree.
the class RionyaFireDancerWatcher method apply.
@Override
public boolean apply(Game game, Ability source) {
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true, RionyaFireDancerWatcher.getValue(source.getControllerId(), game) + 1);
effect.apply(game, source);
effect.exileTokensCreatedAtNextEndStep(game, source);
return true;
}
use of mage.abilities.effects.common.CreateTokenCopyTargetEffect in project mage by magefree.
the class TheScarabGodEffect3 method apply.
@Override
public boolean apply(Game game, Ability source) {
Card card = game.getCard(source.getFirstTarget());
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && card != null) {
// Also if the move to exile is replaced, the copy takes place
controller.moveCards(card, Zone.EXILED, source, game);
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, false, 1, false, false, null, 4, 4, false);
effect.setTargetPointer(new FixedTarget(card, game));
effect.setOnlySubType(SubType.ZOMBIE);
effect.setOnlyColor(ObjectColor.BLACK);
effect.apply(game, source);
return true;
}
return false;
}
use of mage.abilities.effects.common.CreateTokenCopyTargetEffect in project mage by magefree.
the class TheoreticalDuplicationTriggeredAbility method makeEffect.
private static final CreateTokenCopyTargetEffect makeEffect() {
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect();
effect.setUseLKI(true);
return effect;
}
use of mage.abilities.effects.common.CreateTokenCopyTargetEffect in project mage by magefree.
the class GhastlyMimicryEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = source.getSourcePermanentOrLKI(game);
if (permanent == null) {
return false;
}
Permanent attached = game.getPermanent(permanent.getAttachedTo());
if (attached == null) {
return false;
}
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect();
effect.setAdditionalSubType(SubType.SPIRIT);
return effect.setTargetPointer(new FixedTarget(attached, game)).apply(game, source);
}
use of mage.abilities.effects.common.CreateTokenCopyTargetEffect in project mage by magefree.
the class MirrorMarchEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
int counter = 0;
boolean wonFlip = false;
do {
wonFlip = player.flipCoin(source, game, true);
if (wonFlip) {
counter++;
}
} while (wonFlip);
if (counter > 0) {
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(player.getId(), null, true, counter);
effect.setUseLKI(true);
effect.setTargetPointer(targetPointer);
effect.apply(game, source);
effect.exileTokensCreatedAtNextEndStep(game, source);
}
return true;
}
Aggregations