mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[TLE] various text fixes
This commit is contained in:
parent
790361f59f
commit
761818c90f
20 changed files with 54 additions and 40 deletions
|
|
@ -11,7 +11,9 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -21,16 +23,11 @@ public class RemoveCountersSourceCost extends CostImpl {
|
|||
private final int amount;
|
||||
private final String name;
|
||||
|
||||
public RemoveCountersSourceCost() {
|
||||
this.amount = 1;
|
||||
this.name = "";
|
||||
this.text = "remove a counter from {this}";
|
||||
}
|
||||
|
||||
public RemoveCountersSourceCost(int amount) {
|
||||
this.amount = amount;
|
||||
this.name = "";
|
||||
this.text = "remove " + CardUtil.numberToText(amount) + " counters from {this}";
|
||||
this.text = "remove " + CardUtil.numberToText(amount, "a") +
|
||||
" counter" + (amount > 1 ? "s" : "") + " from {this}";
|
||||
}
|
||||
|
||||
public RemoveCountersSourceCost(Counter counter) {
|
||||
|
|
@ -87,7 +84,7 @@ public class RemoveCountersSourceCost extends CostImpl {
|
|||
}
|
||||
paid = true;
|
||||
}
|
||||
} else if (permanent.getCounters(game).getCount(name) >= amount){
|
||||
} else if (permanent.getCounters(game).getCount(name) >= amount) {
|
||||
permanent.removeCounters(name, amount, source, game);
|
||||
this.paid = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,19 +28,26 @@ import mage.util.CardUtil;
|
|||
public class EarthbendTargetEffect extends OneShotEffect {
|
||||
|
||||
private final DynamicValue amount;
|
||||
private final boolean withReminderText;
|
||||
|
||||
public EarthbendTargetEffect(int amount) {
|
||||
this(StaticValue.get(amount));
|
||||
this(amount, true);
|
||||
}
|
||||
|
||||
public EarthbendTargetEffect(DynamicValue amount) {
|
||||
public EarthbendTargetEffect(int amount, boolean withReminderText) {
|
||||
this(StaticValue.get(amount), withReminderText);
|
||||
}
|
||||
|
||||
public EarthbendTargetEffect(DynamicValue amount, boolean withReminderText) {
|
||||
super(Outcome.Benefit);
|
||||
this.amount = amount;
|
||||
this.withReminderText = withReminderText;
|
||||
}
|
||||
|
||||
private EarthbendTargetEffect(final EarthbendTargetEffect effect) {
|
||||
super(effect);
|
||||
this.amount = effect.amount;
|
||||
this.withReminderText = effect.withReminderText;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -85,6 +92,9 @@ public class EarthbendTargetEffect extends OneShotEffect {
|
|||
sb.append("X, where X is ");
|
||||
sb.append(amount.getMessage());
|
||||
}
|
||||
if (!withReminderText) {
|
||||
return sb.toString();
|
||||
}
|
||||
sb.append(". <i>(Target land you control becomes a 0/0 creature with haste that's still a land. Put ");
|
||||
String value = amount instanceof StaticValue
|
||||
? CardUtil.numberToText(((StaticValue) amount).getValue(), "a")
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class TargetAttackingCreature extends TargetPermanent {
|
|||
}
|
||||
|
||||
public TargetAttackingCreature(int minNumTargets, int maxNumTargets, boolean notTarget) {
|
||||
super(minNumTargets, maxNumTargets, StaticFilters.FILTER_ATTACKING_CREATURE, notTarget);
|
||||
super(minNumTargets, maxNumTargets, maxNumTargets > 1 ? StaticFilters.FILTER_ATTACKING_CREATURES : StaticFilters.FILTER_ATTACKING_CREATURE, notTarget);
|
||||
}
|
||||
|
||||
protected TargetAttackingCreature(final TargetAttackingCreature target) {
|
||||
|
|
|
|||
|
|
@ -979,7 +979,7 @@ public final class CardUtil {
|
|||
}
|
||||
if (!targetPlayerGets) {
|
||||
sb.append(add ? " on " : " from ");
|
||||
if (description.contains("up to") && !description.contains("up to one")) {
|
||||
if (description.contains("any number") || description.contains("up to") && !description.contains("up to one")) {
|
||||
sb.append("each of ");
|
||||
}
|
||||
sb.append(description);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue