TargetRestictions don't need to be copied, they may be just reused

This commit is contained in:
Maxmtg
2013-06-29 21:14:42 +00:00
parent e1fb9121af
commit d375d5588c

View File

@@ -317,8 +317,7 @@ public class CardFactoryUtil {
@Override
public AbilityActivated getCopy() {
AbilityActivated res = new AbilityTransmute(getSourceCard(),
getPayCosts(), getTargetRestrictions() == null ? null : new TargetRestrictions(getTargetRestrictions()));
AbilityActivated res = new AbilityTransmute(getSourceCard(), getPayCosts(), getTargetRestrictions());
CardFactory.copySpellAbility(this, res);
res.getRestrictions().setZone(ZoneType.Hand);
return res;
@@ -353,7 +352,7 @@ public class CardFactoryUtil {
}
}
if (sameCost.size() == 0) {
if (sameCost.isEmpty()) {
return;
}