Some small fixes to rule text generation

This commit is contained in:
LevelX2 2012-09-30 09:41:39 +02:00
parent 123b3e1180
commit f35e863511
3 changed files with 4 additions and 3 deletions

View file

@ -44,8 +44,9 @@ public class PermanentsOnBattlefieldCount implements DynamicValue {
@Override @Override
public String toString() { public String toString() {
if (amount != null) if (amount != null) {
return amount.toString(); return amount.toString();
}
return ""; return "";
} }

View file

@ -94,7 +94,7 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect<PutLibraryInt
sb.append("Target ").append(mode.getTargets().get(0).getTargetName()); sb.append("Target ").append(mode.getTargets().get(0).getTargetName());
sb.append(" puts the top "); sb.append(" puts the top ");
if (message.isEmpty() || !message.equals("1")) { if (message.isEmpty()) {
if (amount.toString().equals("1")) { if (amount.toString().equals("1")) {
sb.append("card "); sb.append("card ");
} else { } else {

View file

@ -53,7 +53,7 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect<SacrificeSour
public String getText(Mode mode) { public String getText(Mode mode) {
StringBuilder sb = new StringBuilder("sacrifice {this} unless you "); StringBuilder sb = new StringBuilder("sacrifice {this} unless you ");
String costText = cost.getText(); String costText = cost.getText();
if (costText.toLowerCase().startsWith("discard") || costText.toLowerCase().startsWith("remove")) { if (costText.toLowerCase().startsWith("discard") || costText.toLowerCase().startsWith("remove") || costText.toLowerCase().startsWith("return")) {
sb.append(costText.substring(0, 1).toLowerCase()); sb.append(costText.substring(0, 1).toLowerCase());
sb.append(costText.substring(1)); sb.append(costText.substring(1));
} }