mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* As an additional cost to cast - fixed wrong text (reveal cost, etc);
This commit is contained in:
parent
39894c6394
commit
cba3f0ee12
2 changed files with 6 additions and 2 deletions
|
@ -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());
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue