Fixed rule generation exception in SetCardColorSourceEffect

This commit is contained in:
magenoxx 2012-09-26 13:09:44 +04:00
parent 72de08ed39
commit 208224f0ae

View file

@ -87,7 +87,10 @@ public class SetCardColorSourceEffect extends ContinuousEffectImpl<SetCardColorS
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder();
sb.append("{this} ").append(mode.getTargets().get(0).getTargetName());
sb.append("{this} ");
if (mode.getTargets().size() > 0) {
sb.append(mode.getTargets().get(0).getTargetName());
}
sb.append(" becomes ").append(setColor.getDescription());
sb.append(" ").append(duration.toString());
return sb.toString();