Copying and creating tokens from double-sided cards.

This commit is contained in:
magenoxx 2011-10-07 23:29:04 +04:00
parent 642cd84e97
commit 0c9151cc1f
7 changed files with 52 additions and 2 deletions

View file

@ -30,6 +30,7 @@ package mage.util.functions;
import mage.Constants;
import mage.abilities.Ability;
import mage.cards.Card;
import mage.game.permanent.PermanentToken;
import mage.game.permanent.token.Token;
/**
@ -79,6 +80,11 @@ public class CopyTokenFunction implements Function<Token, Card> {
target.getPower().setValue(source.getPower().getValue());
target.getToughness().setValue(source.getToughness().getValue());
if (source.canTransform()) {
target.setCanTransform(true);
target.setSecondCardFace(source.getSecondCardFace());
}
return target;
}