text fixes

This commit is contained in:
Evan Kranzler 2021-04-25 14:26:22 -04:00
parent f74dfcb8b6
commit b0fdb4ef5a
18 changed files with 77 additions and 178 deletions

View file

@ -7,9 +7,9 @@ import mage.cards.Card;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.CardUtil;
/**
*
* @author nantuko
*/
public class SourceHasCounterCondition implements Condition {
@ -68,14 +68,13 @@ public class SourceHasCounterCondition implements Condition {
@Override
public String toString() {
if (from != -1) { //range compare
if (from != -1) {
if (to == Integer.MAX_VALUE) {
return "{this} has equal to or more than " + from + " " + this.counterType.toString() + " counters";
}
return "{this} has between " + from + " and " + to + " " + this.counterType.toString() + " counters";
} else // single compare (lte)
{
return "{this} has equal or more than " + amount + " " + this.counterType.toString() + " counters";
} else {
return "{this} has " + CardUtil.numberToText(amount) + " or more " + this.counterType.toString() + " counters on it";
}
}
}

View file

@ -3,6 +3,7 @@ package mage.abilities.effects.common;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Cards;
import mage.cards.CardsImpl;
@ -17,8 +18,6 @@ import mage.target.common.TargetCardInHand;
import mage.target.common.TargetCardInYourGraveyard;
import mage.util.CardUtil;
import java.util.Locale;
/**
* @author BetaSteward_at_googlemail.com
*/
@ -43,7 +42,6 @@ public class ExileFromZoneTargetEffect extends OneShotEffect {
this.filter = filter;
this.amount = amount;
this.withSource = withSource;
setText();
}
public ExileFromZoneTargetEffect(final ExileFromZoneTargetEffect effect) {
@ -87,8 +85,10 @@ public class ExileFromZoneTargetEffect extends OneShotEffect {
return new ExileFromZoneTargetEffect(this);
}
private void setText() {
staticText = "target player exiles " + CardUtil.numberToText(amount, "a")
+ ' ' + filter.getMessage() + " from their " + zone.toString().toLowerCase(Locale.ENGLISH);
@Override
public String getText(Mode mode) {
return "target " + mode.getTargets().get(0).getTargetName() + " exiles "
+ CardUtil.numberToText(amount, "a") + ' ' + filter.getMessage()
+ " from their " + zone.toString().toLowerCase();
}
}