Fixed Issue#48: Additional cost for creatures is not displayed

This commit is contained in:
magenoxx 2012-08-23 14:16:52 +04:00
parent 15371eab3f
commit afb5162e6a
3 changed files with 8 additions and 3 deletions

View file

@ -55,7 +55,7 @@ public class StitchedDrake extends CardImpl<StitchedDrake> {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// As an addition cost to cast Stitched Drake, exile a creature card from your graveyard. // As an additional cost to cast Stitched Drake, exile a creature card from your graveyard.
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")))); this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))));
} }

View file

@ -89,7 +89,7 @@ class SilvergillAdeptCost extends CostImpl<SilvergillAdeptCost> {
} }
public SilvergillAdeptCost() { public SilvergillAdeptCost() {
this.text = "As an additional cost to cast Silvergill Adept, reveal a Merfolk card from your hand or pay {3}"; this.text = "reveal a Merfolk card from your hand or pay {3}";
} }
public SilvergillAdeptCost(SilvergillAdeptCost cost) { public SilvergillAdeptCost(SilvergillAdeptCost cost) {

View file

@ -85,8 +85,13 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
if (ability.getCosts().size() > 0) { if (ability.getCosts().size() > 0) {
StringBuilder sbRule = new StringBuilder(); StringBuilder sbRule = new StringBuilder();
for (Cost cost: ability.getCosts()) { for (Cost cost: ability.getCosts()) {
if (cost.getText() != null && !cost.getText().isEmpty()) {
if (!cost.getText().startsWith("As an additional cost")) {
sbRule.append("As an additional cost to cast {this}, ");
}
sbRule.append(cost.getText()).append(".\n"); sbRule.append(cost.getText()).append(".\n");
} }
}
rules.add(sbRule.toString()); rules.add(sbRule.toString());
} }
} }