* As an additional cost to cast - fixed wrong text (reveal cost, etc);

This commit is contained in:
Oleg Agafonov 2020-04-19 21:32:51 +04:00
parent 39894c6394
commit cba3f0ee12
2 changed files with 6 additions and 2 deletions

View file

@ -73,10 +73,14 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
StringBuilder sbRule = threadLocalBuilder.get(); StringBuilder sbRule = threadLocalBuilder.get();
for (Cost cost : ability.getCosts()) { for (Cost cost : ability.getCosts()) {
if (cost.getText() != null && !cost.getText().isEmpty()) { if (cost.getText() != null && !cost.getText().isEmpty()) {
String costText = cost.getText();
if (!cost.getText().startsWith("As an additional cost")) { if (!cost.getText().startsWith("As an additional cost")) {
sbRule.append("As an additional cost to cast this spell, "); sbRule.append("As an additional cost to cast this spell, ");
if (!costText.isEmpty()) {
costText = Character.toLowerCase(costText.charAt(0)) + costText.substring(1);
} }
sbRule.append(cost.getText()).append(".<br>"); }
sbRule.append(costText).append(".<br>");
} }
} }
rules.add(sbRule.toString()); rules.add(sbRule.toString());

View file

@ -21,7 +21,7 @@ public class DiscardXTargetCost extends VariableCostImpl {
public DiscardXTargetCost(FilterCard filter, boolean additionalCostText) { public DiscardXTargetCost(FilterCard filter, boolean additionalCostText) {
super(filter.getMessage() + " to discard"); super(filter.getMessage() + " to discard");
this.text = (additionalCostText ? "as an additional cost to cast this spell, discard " : "discard ") + xText + ' ' + filter.getMessage(); this.text = (additionalCostText ? "as an additional cost to cast this spell, discard " : "Discard ") + xText + ' ' + filter.getMessage();
this.filter = filter; this.filter = filter;
} }