Fixed a bug that copys of tokens used the increased values from cards like "Intangible Virtue" for power and toughness.

This commit is contained in:
LevelX2 2012-11-17 21:01:05 +01:00
parent e0cd7a6058
commit 1d46a90bbd

View file

@ -75,9 +75,9 @@ public class CopyTokenFunction implements Function<Token, Card> {
ability.setSourceId(target.getId()); ability.setSourceId(target.getId());
target.addAbility(ability); target.addAbility(ability);
} }
// Needed to do it this way because else the increased value from cards like "Intangible Virtue" will be copied.
target.getPower().setValue(source.getPower().getValue()); target.getPower().setValue(Integer.parseInt(source.getPower().toString()));
target.getToughness().setValue(source.getToughness().getValue()); target.getToughness().setValue(Integer.parseInt(source.getToughness().toString()));
return target; return target;
} }