MageObject target = game.getPermanent(targetId);
if (target == null) {
target = game.getLastKnownInformation(targetId, Zone.BATTLEFIELD);
}
if (target != null) {
Cost cost = new ManaCostsImpl("{2}");
if (player.chooseUse(outcome, new StringBuilder("Pay ").append(cost.getText()).append(" and put a token copy of ").append(target.getName()).append(" onto the battlefield").toString(), game)) {
cost.clearPaid();
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
if (target instanceof Permanent) {
EmptyToken token = new EmptyToken();
CardUtil.copyTo(token).from((Permanent)target);
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
return true;