Changed rule text generation.

This commit is contained in:
LevelX2 2013-01-26 00:50:20 +01:00
parent 8e992ca08f
commit fc34c2e426

View file

@ -70,7 +70,12 @@ public class AddCardSubTypeTargetEffect extends ContinuousEffectImpl<AddCardSubT
@Override @Override
public String getText(Mode mode) { public String getText(Mode mode) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("Target ").append(mode.getTargets().get(0).getTargetName()).append(" becomes ").append(addedSubType).append(" in addition to its other types ").append(duration.toString()); if (mode.getTargets().size() > 0) {
sb.append("Target ").append(mode.getTargets().get(0).getTargetName());
} else {
sb.append("It ");
}
sb.append(" becomes ").append(addedSubType).append(" in addition to its other types ").append(duration.toString());
return sb.toString(); return sb.toString();
} }
} }