some changes to payment text generation

This commit is contained in:
Evan Kranzler 2022-02-19 17:41:57 -05:00
parent fe42bc6e49
commit 4868afe0e0
8 changed files with 25 additions and 48 deletions

View file

@ -74,16 +74,10 @@ public class DoWhenCostPaid extends OneShotEffect {
if (!staticText.isEmpty()) {
return staticText;
}
return (optional ? "you may " : "") + getCostText() + ". When you do, " + CardUtil.getTextWithFirstCharLowerCase(ability.getRule());
}
private String getCostText() {
StringBuilder sb = new StringBuilder();
String costText = cost.getText();
if (!CardUtil.checkCostWords(costText)) {
sb.append("pay ");
}
return sb.append(costText).toString();
return (optional ? "you may " : "")
+ CardUtil.addCostVerb(cost.getText())
+ ". When you do, "
+ CardUtil.getTextWithFirstCharLowerCase(ability.getRule());
}
@Override