mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
[NEO] various text fixes
This commit is contained in:
parent
0a03eff6fa
commit
6851e553d8
37 changed files with 113 additions and 79 deletions
|
|
@ -9,6 +9,7 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author jeffwadsworth
|
||||
|
|
@ -66,6 +67,6 @@ public class BecomesTappedTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public String getTriggerPhrase() {
|
||||
return "Whenever " + filter.getMessage() + " becomes tapped, ";
|
||||
return "Whenever " + CardUtil.addArticle(filter.getMessage()) + " becomes tapped, ";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@ public class BlocksOrBecomesBlockedSourceTriggeredAbility extends TriggeredAbili
|
|||
protected boolean setTargetPointer;
|
||||
|
||||
public BlocksOrBecomesBlockedSourceTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(effect, StaticFilters.FILTER_PERMANENT_CREATURE, optional, null, true);
|
||||
this(effect, optional, true);
|
||||
}
|
||||
|
||||
public BlocksOrBecomesBlockedSourceTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) {
|
||||
this(effect, StaticFilters.FILTER_PERMANENT_CREATURE, optional, null, setTargetPointer);
|
||||
}
|
||||
|
||||
public BlocksOrBecomesBlockedSourceTriggeredAbility(Effect effect, FilterPermanent filter, boolean optional) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
|
|
@ -16,8 +13,11 @@ import mage.players.Player;
|
|||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class ReturnToHandChosenControlledPermanentCost extends CostImpl {
|
||||
|
|
@ -31,7 +31,7 @@ public class ReturnToHandChosenControlledPermanentCost extends CostImpl {
|
|||
+ (target.getTargetName().endsWith(" you control") ? "" : " you control")
|
||||
+ " to their owner's hand";
|
||||
} else {
|
||||
this.text = "return " + target.getTargetName()
|
||||
this.text = "return " + CardUtil.addArticle(target.getTargetName())
|
||||
+ (target.getTargetName().endsWith(" you control") ? "" : " you control")
|
||||
+ " to its owner's hand";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ public class CostsLessForExiledCardsEffect extends CostModificationEffectImpl {
|
|||
public static void addCostAndEffect(Card card, FilterCard filter) {
|
||||
card.getSpellAbility().addCost(new ExileFromHandCost(
|
||||
new TargetCardInHand(0, Integer.MAX_VALUE, filter)
|
||||
).setText("as an additional cost to cast this spell, you may exile any number of "
|
||||
+ filter.getMessage() + ". This spell costs {2} less to cast for each card exiled this way"));
|
||||
).setText("you may exile any number of " + filter.getMessage()
|
||||
+ ". This spell costs {2} less to cast for each card exiled this way"));
|
||||
Ability ability = new SimpleStaticAbility(Zone.ALL, new CostsLessForExiledCardsEffect(filter));
|
||||
ability.setRuleVisible(false);
|
||||
card.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
|
|
@ -60,7 +61,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
|
|||
this.cost = cost;
|
||||
this.amount = amount;
|
||||
this.filter = filter;
|
||||
setText();
|
||||
}
|
||||
|
||||
public SacrificeOpponentsUnlessPayEffect(DynamicValue genericMana, FilterPermanent filter, DynamicValue amount) {
|
||||
|
|
@ -68,7 +68,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
|
|||
this.genericMana = genericMana;
|
||||
this.amount = amount;
|
||||
this.filter = filter;
|
||||
setText();
|
||||
}
|
||||
|
||||
public SacrificeOpponentsUnlessPayEffect(final SacrificeOpponentsUnlessPayEffect effect) {
|
||||
|
|
@ -150,31 +149,36 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
|
|||
return true;
|
||||
}
|
||||
|
||||
private void setText() {
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("each opponent sacrifices ");
|
||||
|
||||
if (amount.toString().equals("X")) {
|
||||
sb.append(amount.toString());
|
||||
} else {
|
||||
if (amount.toString().equals("1")) {
|
||||
if (!filter.getMessage().startsWith("a ") && !filter.getMessage().startsWith("an ")) {
|
||||
sb.append('a');
|
||||
}
|
||||
} else {
|
||||
switch (amount.toString()) {
|
||||
case "1":
|
||||
sb.append(CardUtil.addArticle(filter.getMessage()));
|
||||
break;
|
||||
case "X":
|
||||
sb.append("X ");
|
||||
sb.append(filter.getMessage());
|
||||
break;
|
||||
default:
|
||||
sb.append(CardUtil.numberToText(amount.toString()));
|
||||
}
|
||||
sb.append(' ');
|
||||
sb.append(filter.getMessage());
|
||||
}
|
||||
|
||||
sb.append(' ');
|
||||
sb.append(filter.getMessage());
|
||||
|
||||
sb.append(" unless they pay ");
|
||||
sb.append(" unless they ");
|
||||
|
||||
if (cost != null) {
|
||||
sb.append(CardUtil.checkCostWords(cost.getText()) ? "" : "pay ");
|
||||
sb.append(cost.getText());
|
||||
} else {
|
||||
sb.append("{X}");
|
||||
sb.append("pay {X}");
|
||||
}
|
||||
|
||||
if (genericMana != null && !genericMana.getMessage().isEmpty()) {
|
||||
|
|
@ -182,6 +186,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
|
|||
sb.append(genericMana.getMessage());
|
||||
}
|
||||
|
||||
staticText = sb.toString();
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,11 +58,11 @@ public class TapTargetEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
Target target = mode.getTargets().get(0);
|
||||
if (target.getMaxNumberOfTargets() > 1) {
|
||||
if (target.getMaxNumberOfTargets() > 1 || target.getNumberOfTargets() == 0) {
|
||||
if (target.getMaxNumberOfTargets() == target.getNumberOfTargets()) {
|
||||
return "tap " + CardUtil.numberToText(target.getNumberOfTargets()) + " target " + target.getTargetName() + 's';
|
||||
} else {
|
||||
return "tap up to " + CardUtil.numberToText(target.getMaxNumberOfTargets()) + " target " + target.getTargetName() + 's';
|
||||
return "tap up to " + CardUtil.numberToText(target.getMaxNumberOfTargets()) + " target " + target.getTargetName() + (target.getMaxNumberOfTargets() > 1 ? "s" : "");
|
||||
}
|
||||
} else if (target.getMaxNumberOfTargets() == 0) {
|
||||
return "tap X target " + mode.getTargets().get(0).getTargetName();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class GainControlAllEffect extends OneShotEffect {
|
|||
this.filter = filter;
|
||||
this.duration = duration;
|
||||
this.controllingPlayerId = controllingPlayerId;
|
||||
this.staticText = "Gain control of " + filter.getMessage();
|
||||
this.staticText = "gain control of " + filter.getMessage();
|
||||
}
|
||||
|
||||
public GainControlAllEffect(final GainControlAllEffect effect) {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class ReconfigureUnattachAbility extends ActivateAsSorceryActivatedAbility {
|
|||
|
||||
protected ReconfigureUnattachAbility(String manaString) {
|
||||
super(Zone.BATTLEFIELD, new ReconfigureUnattachEffect(), new ManaCostsImpl<>(manaString));
|
||||
this.setRuleVisible(true);
|
||||
this.setRuleVisible(false);
|
||||
}
|
||||
|
||||
private ReconfigureUnattachAbility(final ReconfigureUnattachAbility ability) {
|
||||
|
|
|
|||
|
|
@ -396,6 +396,12 @@ public final class StaticFilters {
|
|||
FILTER_CONTROLLED_PERMANENT_LAND.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_A_LAND = new FilterControlledLandPermanent("a land you control");
|
||||
|
||||
static {
|
||||
FILTER_CONTROLLED_PERMANENT_A_LAND.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_LANDS = new FilterControlledLandPermanent("lands you control");
|
||||
|
||||
static {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import java.util.Arrays;
|
|||
public final class HumanMonkToken extends TokenImpl {
|
||||
|
||||
public HumanMonkToken() {
|
||||
super("Human Monk token", "1/1 green Monk creature token with \"{T}: Add {G}.\"");
|
||||
super("Human Monk token", "1/1 green Human Monk creature token with \"{T}: Add {G}.\"");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add(SubType.HUMAN);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue