text fixes

This commit is contained in:
xenohedron 2023-09-22 23:28:07 -04:00
parent 79157a7219
commit cd5ee1c31d
9 changed files with 15 additions and 36 deletions

View file

@ -28,7 +28,7 @@ public final class CloudCover extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{U}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{U}");
// Whenever another permanent you control becomes the target of a spell or ability an opponent controls, you may return that permanent to its owner's hand. // Whenever another permanent you control becomes the target of a spell or ability an opponent controls, you may return that permanent to its owner's hand.
this.addAbility(new BecomesTargetAnyTriggeredAbility(new ReturnToHandTargetEffect(), this.addAbility(new BecomesTargetAnyTriggeredAbility(new ReturnToHandTargetEffect().setText("return that permanent to its owner's hand"),
filter, StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS, SetTargetPointer.PERMANENT, true)); filter, StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS, SetTargetPointer.PERMANENT, true));
} }

View file

@ -30,7 +30,8 @@ public final class DiffusionSliver extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Whenever a Sliver creature you control becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {2}. // Whenever a Sliver creature you control becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {2}.
this.addAbility(new BecomesTargetAnyTriggeredAbility(new CounterUnlessPaysEffect(new GenericManaCost(2)), this.addAbility(new BecomesTargetAnyTriggeredAbility(new CounterUnlessPaysEffect(new GenericManaCost(2))
.setText("counter that spell or ability unless its controller pays {2}"),
filter, StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS, SetTargetPointer.SPELL, false)); filter, StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS, SetTargetPointer.SPELL, false));
} }

View file

@ -37,7 +37,8 @@ public final class FblthpTheLost extends CardImpl {
this.addAbility(new FblthpTheLostTriggeredAbility()); this.addAbility(new FblthpTheLostTriggeredAbility());
// When Fblthp becomes the target of a spell, shuffle Fblthp into its owner's library. // When Fblthp becomes the target of a spell, shuffle Fblthp into its owner's library.
this.addAbility(new BecomesTargetSourceTriggeredAbility(new ShuffleIntoLibrarySourceEffect(), this.addAbility(new BecomesTargetSourceTriggeredAbility(
new ShuffleIntoLibrarySourceEffect().setText("shuffle {this} into its owner's library"),
StaticFilters.FILTER_SPELL_A)); StaticFilters.FILTER_SPELL_A));
} }

View file

@ -29,7 +29,7 @@ public final class ForsakenWastes extends CardImpl {
TargetController.ANY, false, true)); TargetController.ANY, false, true));
// Whenever Forsaken Wastes becomes the target of a spell, that spell's controller loses 5 life. // Whenever Forsaken Wastes becomes the target of a spell, that spell's controller loses 5 life.
this.addAbility(new BecomesTargetSourceTriggeredAbility(new LoseLifeTargetEffect(5), this.addAbility(new BecomesTargetSourceTriggeredAbility(new LoseLifeTargetEffect(5).setText("that spell's controller loses 5 life"),
StaticFilters.FILTER_SPELL_A, SetTargetPointer.PLAYER, false)); StaticFilters.FILTER_SPELL_A, SetTargetPointer.PLAYER, false));
} }

View file

@ -25,7 +25,8 @@ public final class Retromancer extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Whenever Retromancer becomes the target of a spell or ability, Retromancer deals 3 damage to that spell or ability's controller. // Whenever Retromancer becomes the target of a spell or ability, Retromancer deals 3 damage to that spell or ability's controller.
this.addAbility(new BecomesTargetSourceTriggeredAbility(new DamageTargetEffect(3), this.addAbility(new BecomesTargetSourceTriggeredAbility(new DamageTargetEffect(3)
.setText("{this} deals 3 damage to that spell or ability's controller"),
StaticFilters.FILTER_SPELL_OR_ABILITY_A, SetTargetPointer.PLAYER, false)); StaticFilters.FILTER_SPELL_OR_ABILITY_A, SetTargetPointer.PLAYER, false));
} }

View file

@ -34,7 +34,7 @@ public final class ThunderbreakRegent extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Whenever a Dragon you control becomes the target of a spell or ability your opponent controls, Thunderbreak Regent deals 3 damage to that player. // Whenever a Dragon you control becomes the target of a spell or ability your opponent controls, Thunderbreak Regent deals 3 damage to that player.
this.addAbility(new BecomesTargetAnyTriggeredAbility(new DamageTargetEffect(3), this.addAbility(new BecomesTargetAnyTriggeredAbility(new DamageTargetEffect(3).setText("{this} deals 3 damage to that player"),
filter, StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS, SetTargetPointer.PLAYER, false)); filter, StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS, SetTargetPointer.PLAYER, false));
} }

View file

@ -19,7 +19,8 @@ public final class WildDefiance extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
// Whenever a creature you control becomes the target of an instant or sorcery spell, that creature gets +3/+3 until end of turn. // Whenever a creature you control becomes the target of an instant or sorcery spell, that creature gets +3/+3 until end of turn.
this.addAbility(new BecomesTargetAnyTriggeredAbility(new BoostTargetEffect(3, 3, Duration.EndOfTurn), this.addAbility(new BecomesTargetAnyTriggeredAbility(
new BoostTargetEffect(3, 3, Duration.EndOfTurn).setText("that creature gets +3/+3 until end of turn"),
StaticFilters.FILTER_CONTROLLED_A_CREATURE, StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY)); StaticFilters.FILTER_CONTROLLED_A_CREATURE, StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY));
} }

View file

@ -10,8 +10,6 @@ import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.stack.Spell; import mage.game.stack.Spell;
import mage.players.Player; import mage.players.Player;
import mage.target.Target;
import mage.util.CardUtil;
import java.util.*; import java.util.*;
@ -63,7 +61,7 @@ public class ReturnToHandTargetEffect extends OneShotEffect {
if (staticText != null && !staticText.isEmpty()) { if (staticText != null && !staticText.isEmpty()) {
return staticText; return staticText;
} }
return "return " + getTargetPointer().describeTargets(mode.getTargets(), "") + return "return " + getTargetPointer().describeTargets(mode.getTargets(), "that creature") +
(getTargetPointer().isPlural(mode.getTargets()) ? " to their owners' hands" : " to its owner's hand"); (getTargetPointer().isPlural(mode.getTargets()) ? " to their owners' hands" : " to its owner's hand");
} }
} }

View file

@ -12,8 +12,6 @@ import mage.constants.SubLayer;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.Target;
import mage.util.CardUtil;
import java.util.UUID; import java.util.UUID;
@ -128,31 +126,10 @@ public class GainControlTargetEffect extends ContinuousEffectImpl {
@Override @Override
public String getText(Mode mode) { public String getText(Mode mode) {
if (!staticText.isEmpty()) { if (staticText != null && !staticText.isEmpty()) {
return staticText; return staticText;
} }
return "gain control of " + getTargetPointer().describeTargets(mode.getTargets(), "that creature")
if (mode.getTargets().isEmpty()) { + (duration.toString().isEmpty() || duration == Duration.EndOfGame ? "" : " " + duration.toString());
return "gain control of target permanent";
}
Target target = mode.getTargets().get(0);
StringBuilder sb = new StringBuilder("gain control of ");
if (target.getMaxNumberOfTargets() > 1) {
if (target.getMinNumberOfTargets() == 0) {
sb.append("up to ");
}
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ");
} else if (!target.getTargetName().startsWith("another")) {
if (target.getMinNumberOfTargets() == 0) {
sb.append("up to one ");
}
sb.append("target ");
}
sb.append(mode.getTargets().get(0).getTargetName());
if (!duration.toString().isEmpty() && duration != Duration.EndOfGame) {
sb.append(' ').append(duration.toString());
}
return sb.toString();
} }
} }