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