[ZNR] various text fixes

This commit is contained in:
Evan Kranzler 2020-10-07 20:04:34 -04:00
parent 665528b251
commit 6a3240fad3
12 changed files with 38 additions and 21 deletions

View file

@ -23,7 +23,7 @@ public class RemoveCountersSourceCost extends CostImpl {
public RemoveCountersSourceCost(Counter counter) {
this.amount = counter.getCount();
this.name = counter.getName();
this.text = new StringBuilder("Remove ").append((amount == 1 ? "a" : CardUtil.numberToText(amount)))
this.text = new StringBuilder("remove ").append((amount == 1 ? "a" : CardUtil.numberToText(amount)))
.append(' ').append(name).append(" counter").append((amount != 1 ? "s" : ""))
.append(" from {this}").toString();

View file

@ -1,6 +1,7 @@
package mage.abilities.effects.common;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.OneShotEffect;
@ -23,7 +24,6 @@ public class MillCardsTargetEffect extends OneShotEffect {
public MillCardsTargetEffect(DynamicValue numberCards) {
super(Outcome.Discard);
this.numberCards = numberCards;
this.staticText = setText();
}
public MillCardsTargetEffect(final MillCardsTargetEffect effect) {
@ -46,8 +46,18 @@ public class MillCardsTargetEffect extends OneShotEffect {
return false;
}
private String setText() {
StringBuilder sb = new StringBuilder("target player mills ");
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("target ");
if (!mode.getTargets().isEmpty()) {
sb.append(mode.getTargets().get(0).getTargetName());
} else {
sb.append("player");
}
sb.append(" mills ");
if (numberCards.toString().equals("1")) {
sb.append("a card");
} else {