forked from External/mage
fixed test failure
This commit is contained in:
parent
bfc0b2094a
commit
4304b4a66a
2 changed files with 6 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ public final class GavelOfTheRighteous extends CardImpl {
|
|||
Outcome.BoostCreature,
|
||||
new OrCost(
|
||||
"Pay {3} or remove a counter from {this}",
|
||||
new GenericManaCost(3), new RemoveCountersSourceCost(null)
|
||||
new GenericManaCost(3), new RemoveCountersSourceCost()
|
||||
)
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,11 +26,15 @@ public class RemoveCountersSourceCost extends CostImpl {
|
|||
private final int amount;
|
||||
private final String name;
|
||||
|
||||
public RemoveCountersSourceCost() {
|
||||
this((Counter) null);
|
||||
}
|
||||
|
||||
public RemoveCountersSourceCost(Counter counter) {
|
||||
this.amount = counter != null ? counter.getCount() : 1;
|
||||
this.name = counter != null ? counter.getName() : "";
|
||||
this.text = new StringBuilder("remove ")
|
||||
.append((amount == 1 ? CounterType.findArticle(counter.getName()) : CardUtil.numberToText(amount)))
|
||||
.append((amount == 1 ? CounterType.findArticle(name) : CardUtil.numberToText(amount)))
|
||||
.append(name.isEmpty() ? "" : (' ' + name))
|
||||
.append(" counter")
|
||||
.append((amount != 1 ? "s" : ""))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue