use of mage.abilities.common.EntersBattlefieldAllTriggeredAbility in project mage by magefree.
the class UnstableShapeshifterEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
Permanent targetCreature = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (targetCreature != null && permanent != null) {
Permanent blueprintPermanent = game.copyPermanent(Duration.Custom, targetCreature, permanent.getId(), source, new EmptyCopyApplier());
blueprintPermanent.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UnstableShapeshifterEffect(), filterAnotherCreature, false, SetTargetPointer.PERMANENT, ""), source.getSourceId(), game);
return true;
}
return false;
}
Aggregations