mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Some small fixes to rule text generation
This commit is contained in:
parent
123b3e1180
commit
f35e863511
3 changed files with 4 additions and 3 deletions
|
@ -44,8 +44,9 @@ public class PermanentsOnBattlefieldCount implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (amount != null)
|
||||
if (amount != null) {
|
||||
return amount.toString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect<PutLibraryInt
|
|||
|
||||
sb.append("Target ").append(mode.getTargets().get(0).getTargetName());
|
||||
sb.append(" puts the top ");
|
||||
if (message.isEmpty() || !message.equals("1")) {
|
||||
if (message.isEmpty()) {
|
||||
if (amount.toString().equals("1")) {
|
||||
sb.append("card ");
|
||||
} else {
|
||||
|
|
|
@ -53,7 +53,7 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect<SacrificeSour
|
|||
public String getText(Mode mode) {
|
||||
StringBuilder sb = new StringBuilder("sacrifice {this} unless you ");
|
||||
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(1));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue