fixes from VerifyCardDataTest text compare

This commit is contained in:
Susucre 2024-06-01 16:58:16 +02:00
parent 65a2b4003d
commit b85b61873f
27 changed files with 58 additions and 50 deletions

View file

@ -6,6 +6,7 @@ import mage.abilities.costs.common.PayEnergyCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -28,6 +29,7 @@ public final class AetherSpike extends CardImpl {
// Choose target spell. You get {E}{E}, then you may pay any amount of {E}. Counter that spell unless its controller pays {1} for each {E} paid this way.
this.getSpellAbility().addTarget(new TargetSpell());
this.getSpellAbility().addEffect(new InfoEffect("Choose target spell."));
this.getSpellAbility().addEffect(new GetEnergyCountersControllerEffect(2));
this.getSpellAbility().addEffect(new AetherSpikeEffect());
}

View file

@ -22,7 +22,7 @@ import java.util.UUID;
*/
public final class ArcboundCondor extends CardImpl {
private static final FilterPermanent filter = new FilterArtifactPermanent("another artifacr");
private static final FilterPermanent filter = new FilterArtifactPermanent("another artifact");
static {
filter.add(AnotherPredicate.instance);

View file

@ -42,7 +42,7 @@ public final class DrownerOfTruth extends ModalDoubleFacedCard {
new CastSourceTriggeredAbility(new CreateTokenEffect(new EldraziSpawnToken(), 2)),
ManaWasSpentCondition.COLORLESS,
"When you cast this spell, if {C} was spent to cast it, "
+ "create two 0/1 colorless Eldrazi Spawn creature tokens with \"Sacrifice this creature: Add {C}.");
+ "create two 0/1 colorless Eldrazi Spawn creature tokens with \"Sacrifice this creature: Add {C}.\"");
this.getLeftHalfCard().addAbility(ability);
// 2.

View file

@ -39,7 +39,7 @@ public final class DrownyardLurker extends CardImpl {
new CreateTokenEffect(new EldraziSpawnToken()),
new CastSourceTriggeredAbility(null, false),
new CycleTriggeredAbility(null, false)
));
).setTriggerPhrase("When you cast or cycle {this}, "));
// Cycling {2}{U}
this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{U}")));

View file

@ -36,8 +36,8 @@ public final class EldraziRepurposer extends CardImpl {
Zone.ALL,
new CreateTokenEffect(new EldraziSpawnToken()),
new CastSourceTriggeredAbility(null, false),
new DiesSourceTriggeredAbility(null, false))
);
new DiesSourceTriggeredAbility(null, false)
).setTriggerPhrase("When you cast this spell and when {this} dies, "));
}
private EldraziRepurposer(final EldraziRepurposer card) {

View file

@ -41,7 +41,7 @@ public final class EnvoyOfTheAncestors extends CardImpl {
// Modified creatures you control have lifelink.
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
LifelinkAbility.getInstance(), Duration.EndOfTurn, filter
LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, filter
)));
}

View file

@ -75,7 +75,7 @@ class ExpelTheUnworthyEffect extends OneShotEffect {
ExpelTheUnworthyEffect() {
super(Outcome.GainLife);
staticText = "Its controller gains 4 life";
staticText = ", then its controller gains life equal to its mana value";
}
private ExpelTheUnworthyEffect(final ExpelTheUnworthyEffect effect) {

View file

@ -30,7 +30,7 @@ public final class FaithfulWatchdog extends CardImpl {
// Faithful Watchdog enters the battlefield with three +1/+1 counters on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)),
"{this} enters the battlefield with three +1/+1 counters on it"
"with three +1/+1 counters on it"
));
}

View file

@ -30,7 +30,7 @@ public final class FetidGargantua extends CardImpl {
// Whenever one or more +1/+1 counters are put on Fetid Gargantua, you may draw two cards. If you do, you lose 2 life.
Ability ability = new OneOrMoreCountersAddedTriggeredAbility(new DrawCardSourceControllerEffect(2), true);
ability.addEffect(new LoseLifeSourceControllerEffect(2).concatBy("If you do, "));
ability.addEffect(new LoseLifeSourceControllerEffect(2).concatBy("If you do,"));
this.addAbility(ability);
}

View file

@ -39,7 +39,7 @@ public final class GlimpseTheImpossible extends CardImpl {
new GlimpseTheImpossibleEffect(),
TargetController.ANY,
GlimpseTheImpossibleCondition.instance
)
).setTriggerPhrase("At the beginning of the next end step, if any of those cards remain exiled, ")
)
);
}

View file

@ -62,7 +62,7 @@ class GristVoraciousLarvaTriggeredAbility extends EntersBattlefieldThisOrAnother
new ManaCostsImpl<>("{G}")
), StaticFilters.FILTER_PERMANENT_CREATURE, false, true);
setTriggerPhrase("Whenever {this} or another creature enters the battlefield under your control, "
+ "if it entered from your graveyard or was cast from your graveyard, ");
+ "if it entered from your graveyard or you cast it from your graveyard, ");
}
private GristVoraciousLarvaTriggeredAbility(final GristVoraciousLarvaTriggeredAbility ability) {

View file

@ -34,11 +34,11 @@ public final class HexgoldSlith extends CardImpl {
// When Hexgold Slith enters the battlefield, you get {E}{E}.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2)));
// Whenever Hexgold Slith attacks, you may pay {E}. If you do, it gains first strike until end of turn.
// Whenever Hexgold Slith attacks, you may pay {E}{E}. If you do, it gains first strike until end of turn.
this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid(
new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)
.setText("it gains first strike until end of turn"),
new PayEnergyCost(1)
new PayEnergyCost(2)
)));
// Whenever Hexgold Slith deals combat damage to a player, put a +1/+1 counter on it.

View file

@ -46,6 +46,7 @@ public final class HopeEnderCoatl extends CardImpl {
// When you cast this spell, counter target spell an opponent controls unless they pay {1}.
Ability ability = new CastSourceTriggeredAbility(new CounterUnlessPaysEffect(new GenericManaCost(1)));
ability.addTarget(new TargetSpell(filter));
this.addAbility(ability);
// Flying
this.addAbility(FlyingAbility.getInstance());

View file

@ -2,7 +2,7 @@ package mage.cards.p;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
import mage.abilities.costs.common.PayEnergyCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.CreateTokenEffect;
@ -23,7 +23,7 @@ public final class PhyrexianIronworks extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{R}");
// Whenever you attack, you get {E}.
this.addAbility(new AttacksTriggeredAbility(new GetEnergyCountersControllerEffect(1)));
this.addAbility(new AttacksWithCreaturesTriggeredAbility(new GetEnergyCountersControllerEffect(1), 1));
// {T}, Pay {E}{E}{E}: Create a 3/3 colorless Phyrexian Golem artifact creature token. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(new CreateTokenEffect(new PhyrexianGolemToken()), new TapSourceCost());

View file

@ -85,7 +85,7 @@ class RalMonsoonMageEffect extends OneShotEffect {
RalMonsoonMageEffect() {
super(Outcome.Benefit);
staticText = "flip a coin. If you lose the flip, {this} deals 1 damage to you. " +
"If you win the flip, you may exile {this}. If you do, return him to the battlefield transformed under his owner control";
"If you win the flip, you may exile {this}. If you do, return him to the battlefield transformed under his owner's control";
}
private RalMonsoonMageEffect(final RalMonsoonMageEffect effect) {

View file

@ -31,7 +31,7 @@ public final class RipplesOfUndeath extends CardImpl {
public RipplesOfUndeath(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
// At the beginning of your precombat main phase, mill three cards. Then you may pay {1} and 3 life. If you do, put one of the cards milled this way into your hand.
// At the beginning of your precombat main phase, mill three cards. Then you may pay {1} and 3 life. If you do, put a card from among those cards into your hand.
this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(
new RipplesOfUndeathEffect(), TargetController.YOU, false
));
@ -51,7 +51,7 @@ class RipplesOfUndeathEffect extends OneShotEffect {
RipplesOfUndeathEffect() {
super(Outcome.Benefit);
staticText = "mill three cards. Then you may pay {1} and 3 life. If you do, put one of the cards milled this way into your hand.";
staticText = "mill three cards. Then you may pay {1} and 3 life. If you do, put a card from among those cards into your hand.";
}
private RipplesOfUndeathEffect(final RipplesOfUndeathEffect effect) {

View file

@ -11,7 +11,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -36,7 +36,7 @@ public final class SarpadianSimulacrum extends CardImpl {
new ManaCostsImpl<>("{3}{R}")
);
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetAnyTarget());
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -34,7 +34,7 @@ public final class SiegeSmash extends CardImpl {
// * Target creature gets +3/+2 and gains trample until end of turn.
Mode mode = new Mode(
new BoostTargetEffect(3, 2, Duration.EndOfTurn)
.setText("Target creature gets +3/+3")
.setText("Target creature gets +3/+2")
);
mode.addEffect(
new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)

View file

@ -36,7 +36,7 @@ public final class SneakySnacker extends CardImpl {
false,
TargetController.YOU,
3
));
).setTriggerPhrase("When you draw your third card in a turn, "));
}
private SneakySnacker(final SneakySnacker card) {

View file

@ -44,7 +44,7 @@ public final class TamiyoInquisitiveStudent extends CardImpl {
this.addAbility(new DrawNthCardTriggeredAbility(
new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED, Pronoun.SHE),
false, 3
));
).setTriggerPhrase("When you draw your third card in a turn, "));
}
private TamiyoInquisitiveStudent(final TamiyoInquisitiveStudent card) {

View file

@ -62,7 +62,11 @@ public final class TamiyoSeasonedScholar extends CardImpl {
this.addAbility(ability);
// -7: Draw cards equal to half the number of cards in your library, rounded up. You get an emblem with "You have no maximum hand size."
ability = new LoyaltyAbility(new DrawCardSourceControllerEffect(xValue), -7);
ability = new LoyaltyAbility(
new DrawCardSourceControllerEffect(xValue)
.setText("Draw cards equal to half the number of cards in your library, rounded up."),
-7
);
ability.addEffect(new GetEmblemEffect(new TamiyoSeasonedScholarEmblem()));
this.addAbility(ability);
}

View file

@ -1,13 +1,6 @@
package mage.cards.t;
import java.util.UUID;
import mage.abilities.Ability;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.target.TargetPlayer;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
@ -19,13 +12,18 @@ import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
*
* @author grimreap124
*/
public final class Trenchpost extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.LOCUS,
"Locus you control");
@ -34,7 +32,7 @@ public final class Trenchpost extends CardImpl {
private static final Hint hint = new ValueHint("Locus you control", numLocus);
public Trenchpost(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[] { CardType.LAND }, "");
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.subtype.add(SubType.LOCUS);
@ -42,8 +40,11 @@ public final class Trenchpost extends CardImpl {
this.addAbility(new ColorlessManaAbility());
// {3}, {T}: Target player mills a card for each Locus you control.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new MillCardsTargetEffect(numLocus), new GenericManaCost(3));
Ability ability = new SimpleActivatedAbility(
new MillCardsTargetEffect(numLocus)
.setText("Target player mills a card for each Locus you control"),
new GenericManaCost(3)
);
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPlayer());
ability.addHint(hint);

View file

@ -35,7 +35,7 @@ public final class TwistedRiddlekeeper extends CardImpl {
// When you cast this spell, tap up to two target permanents. Put a stun counter on each of them.
Ability ability = new CastSourceTriggeredAbility(new TapTargetEffect());
ability.addEffect(new AddCountersTargetEffect(CounterType.STUN.createInstance()).setText("and put a stun counter on each of them"));
ability.addEffect(new AddCountersTargetEffect(CounterType.STUN.createInstance()).setText("Put a stun counter on each of them"));
ability.addTarget(new TargetPermanent(0, 2, StaticFilters.FILTER_PERMANENTS));
this.addAbility(ability);

View file

@ -40,7 +40,7 @@ public final class Voidpouncer extends CardImpl {
Ability ability = new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),
KickedCondition.ONCE,
"If {this} was kicked, it enters the battlefield with two +1/+1 counter and a trample counter on it and with haste.", ""
"If {this} was kicked, it enters the battlefield with two +1/+1 counters and a trample counter on it and with haste.", ""
);
ability.addEffect(new AddCountersSourceEffect(CounterType.TRAMPLE.createInstance()));
ability.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom));

View file

@ -1,30 +1,29 @@
package mage.cards.w;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.permanent.token.EldraziSpawnToken;
import mage.abilities.keyword.ReachAbility;
import mage.abilities.meta.OrTriggeredAbility;
import mage.abilities.common.CycleTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CastSourceTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.CyclingAbility;
import mage.abilities.keyword.ReachAbility;
import mage.abilities.meta.OrTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.permanent.token.EldraziSpawnToken;
import java.util.UUID;
/**
*
* @author grimreap124
*/
public final class WarpedTusker extends CardImpl {
public WarpedTusker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[] { CardType.CREATURE }, "{7}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{7}");
this.subtype.add(SubType.ELDRAZI);
this.subtype.add(SubType.BOAR);
@ -40,7 +39,8 @@ public final class WarpedTusker extends CardImpl {
Zone.ALL,
new CreateTokenEffect(new EldraziSpawnToken()),
new CastSourceTriggeredAbility(null, false),
new CycleTriggeredAbility(null, false)));
new CycleTriggeredAbility(null, false)
).setTriggerPhrase("When you cast or cycle {this}, "));
// Cycling {2}{G}
this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{G}")));

View file

@ -70,7 +70,7 @@ public class VerifyCardDataTest {
private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class);
private static final String FULL_ABILITIES_CHECK_SET_CODES = "OTJ;BIG;OTC"; // check ability text due mtgjson, can use multiple sets like MAT;CMD or * for all
private static final String FULL_ABILITIES_CHECK_SET_CODES = "MH3;M3C"; // check ability text due mtgjson, can use multiple sets like MAT;CMD or * for all
private static final boolean CHECK_ONLY_ABILITIES_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages
private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run

View file

@ -12,7 +12,7 @@ import mage.constants.SubType;
public final class ReefWormFishToken extends TokenImpl {
public ReefWormFishToken() {
super("Fish Token", "3/3 blue Fish creature token with \"When this creature dies, create a 6/6 blue Whale creature token with \"When this creature dies, create a 9/9 blue Kraken creature token.\"\"");
super("Fish Token", "3/3 blue Fish creature token with \"When this creature dies, create a 6/6 blue Whale creature token with 'When this creature dies, create a 9/9 blue Kraken creature token.'\"");
cardType.add(CardType.CREATURE);
color.setBlue(true);
subtype.add(SubType.FISH);