[NEO] various text fixes

This commit is contained in:
Evan Kranzler 2022-02-08 19:41:26 -05:00
parent 0a03eff6fa
commit 6851e553d8
37 changed files with 113 additions and 79 deletions

View file

@ -80,6 +80,6 @@ class AcquisitionOctopusTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public String getRule() { public String getRule() {
return "When {this} or equipped creature deals combat damage to a player, draw a card."; return "Whenever {this} or equipped creature deals combat damage to a player, draw a card.";
} }
} }

View file

@ -52,8 +52,8 @@ public final class AnimusOfNightsReach extends CardImpl {
// Whenever Animus of Night's Reach attacks, it gets +X/+0 until end of turn, where X is the number of creature cards in defending player's graveyard. // Whenever Animus of Night's Reach attacks, it gets +X/+0 until end of turn, where X is the number of creature cards in defending player's graveyard.
this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect( this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(
xValue, StaticValue.get(0), Duration.EndOfTurn, true) xValue, StaticValue.get(0), Duration.EndOfTurn, true
).addHint(AnimusOfNightsReachHint.instance)); ).setText("it gets +X/+0 until end of turn, where X is the number of creature cards in defending player's graveyard")).addHint(AnimusOfNightsReachHint.instance));
} }
private AnimusOfNightsReach(final AnimusOfNightsReach card) { private AnimusOfNightsReach(final AnimusOfNightsReach card) {

View file

@ -37,6 +37,7 @@ public final class ArmguardFamiliar extends CardImpl {
ability.addEffect(new GainAbilityAttachedEffect( ability.addEffect(new GainAbilityAttachedEffect(
new WardAbility(new GenericManaCost(2)), AttachmentType.EQUIPMENT new WardAbility(new GenericManaCost(2)), AttachmentType.EQUIPMENT
).setText("and has ward {2}")); ).setText("and has ward {2}"));
this.addAbility(ability);
// Reconfigure {4} // Reconfigure {4}
this.addAbility(new ReconfigureAbility("{4}")); this.addAbility(new ReconfigureAbility("{4}"));

View file

@ -41,7 +41,7 @@ public final class AtsushiTheBlazingSky extends CardImpl {
// When Atsushi, the Blazing Sky dies, choose one // When Atsushi, the Blazing Sky dies, choose one
// Exile the top two cards of your library. Until the end of your next turn, you may play those cards. // Exile the top two cards of your library. Until the end of your next turn, you may play those cards.
Ability ability = new DiesSourceTriggeredAbility(new ExileTopXMayPlayUntilEndOfTurnEffect( Ability ability = new DiesSourceTriggeredAbility(new ExileTopXMayPlayUntilEndOfTurnEffect(
3, false, Duration.UntilEndOfYourNextTurn 2, false, Duration.UntilEndOfYourNextTurn
), false); ), false);
// Create three Treasure tokens. // Create three Treasure tokens.

View file

@ -44,7 +44,7 @@ public final class BitingPalmNinja extends CardImpl {
new DoWhenCostPaid(new ReflexiveTriggeredAbility( new DoWhenCostPaid(new ReflexiveTriggeredAbility(
new ExileCardYouChooseTargetOpponentEffect(StaticFilters.FILTER_CARD_A_NON_LAND), false, new ExileCardYouChooseTargetOpponentEffect(StaticFilters.FILTER_CARD_A_NON_LAND), false,
"that player reveals their hand and you choose a nonland card from it. Exile that card" "that player reveals their hand and you choose a nonland card from it. Exile that card"
), new RemoveCountersSourceCost(CounterType.MENACE.createInstance()), "Remove a menace counter?"), false, true ), new RemoveCountersSourceCost(CounterType.MENACE.createInstance()).setText("remove a menace counter from it"), "Remove a menace counter?"), false, true
)); ));
} }

View file

@ -12,7 +12,7 @@ import mage.constants.SagaChapter;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.StaticFilters; import mage.filter.common.FilterLandCard;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
@ -24,6 +24,7 @@ import java.util.UUID;
public final class BoseijuReachesSkyward extends CardImpl { public final class BoseijuReachesSkyward extends CardImpl {
private static final FilterCard filter = new FilterCard("basic Forest cards"); private static final FilterCard filter = new FilterCard("basic Forest cards");
private static final FilterCard filter2 = new FilterLandCard("land card from your graveyard");
static { static {
filter.add(SuperType.BASIC.getPredicate()); filter.add(SuperType.BASIC.getPredicate());
@ -51,7 +52,7 @@ public final class BoseijuReachesSkyward extends CardImpl {
sagaAbility.addChapterEffect( sagaAbility.addChapterEffect(
this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_II, this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_II,
new PutOnLibraryTargetEffect(true), new PutOnLibraryTargetEffect(true),
new TargetCardInYourGraveyard(0, 1, StaticFilters.FILTER_CARD_LAND) new TargetCardInYourGraveyard(0, 1, filter2)
); );
// III Exile this Saga, then return it to the battlefield transformed under your control. // III Exile this Saga, then return it to the battlefield transformed under your control.

View file

@ -31,13 +31,16 @@ public final class DragonsparkReactor extends CardImpl {
// Whenever Dragonspark Reactor or another artifact enters the battlefield under your control, put a charge counter on Dragonspark Reactor. // Whenever Dragonspark Reactor or another artifact enters the battlefield under your control, put a charge counter on Dragonspark Reactor.
this.addAbility(new EntersBattlefieldThisOrAnotherTriggeredAbility( this.addAbility(new EntersBattlefieldThisOrAnotherTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new AddCountersSourceEffect(CounterType.CHARGE.createInstance()),
StaticFilters.FILTER_PERMANENT_ARTIFACT, false, true StaticFilters.FILTER_PERMANENT_ARTIFACT, false, true
)); ));
// {4}, Sacrifice Dragonspark Reactor: It deals damage equal to the number of charge counters on it to target player and that much damage to up to one target creature. // {4}, Sacrifice Dragonspark Reactor: It deals damage equal to the number of charge counters on it to target player and that much damage to up to one target creature.
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
new DamageTargetEffect(xValue, "it"), new GenericManaCost(4) new DamageTargetEffect(xValue).setText(
"it deals damage equal to the number of charge counters on it to target player " +
"and that much damage to up to one target creature"
), new GenericManaCost(4)
); );
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());

View file

@ -30,7 +30,7 @@ public final class ExplosiveSingularity extends CardImpl {
// As an additional cost to cast this spell, you may tap any number of untapped creatures you control. This spell costs {1} less to cast for each creature tapped this way. // As an additional cost to cast this spell, you may tap any number of untapped creatures you control. This spell costs {1} less to cast for each creature tapped this way.
this.getSpellAbility().addCost(new TapTargetCost(new TargetControlledPermanent( this.getSpellAbility().addCost(new TapTargetCost(new TargetControlledPermanent(
0, Integer.MAX_VALUE, StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES, false 0, Integer.MAX_VALUE, StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES, false
)).setText("as an additional cost to cast this spell, you may tap any number of untapped creatures you control. " + )).setText("you may tap any number of untapped creatures you control. " +
"This spell costs {1} less to cast for each creature tapped this way")); "This spell costs {1} less to cast for each creature tapped this way"));
Ability ability = new SimpleStaticAbility(Zone.ALL, new ExplosiveSingularityEffect()); Ability ability = new SimpleStaticAbility(Zone.ALL, new ExplosiveSingularityEffect());
ability.setRuleVisible(false); ability.setRuleVisible(false);

View file

@ -26,7 +26,9 @@ public final class JukaiTrainee extends CardImpl {
// Whenever Jukai Trainee blocks or becomes blocked, it gets +1/+1 until end of turn. // Whenever Jukai Trainee blocks or becomes blocked, it gets +1/+1 until end of turn.
this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility( this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(
new BoostSourceEffect(1, 1, Duration.EndOfTurn), false new BoostSourceEffect(1, 1, Duration.EndOfTurn)
.setText("it gets +1/+1 until end of turn"),
false, false
)); ));
} }

View file

@ -29,7 +29,7 @@ import java.util.UUID;
*/ */
public final class JunjiTheMidnightSky extends CardImpl { public final class JunjiTheMidnightSky extends CardImpl {
private static final FilterCard filter = new FilterCreatureCard("non-Dragon creature card"); private static final FilterCard filter = new FilterCreatureCard("non-Dragon creature card from a graveyard");
static { static {
filter.add(Predicates.not(SubType.DRAGON.getPredicate())); filter.add(Predicates.not(SubType.DRAGON.getPredicate()));
@ -60,7 +60,7 @@ public final class JunjiTheMidnightSky extends CardImpl {
// Put target non-Dragon creature card from a graveyard onto the battlefield under your control. You lose 2 life. // Put target non-Dragon creature card from a graveyard onto the battlefield under your control. You lose 2 life.
Mode mode = new Mode(new ReturnFromGraveyardToBattlefieldTargetEffect()); Mode mode = new Mode(new ReturnFromGraveyardToBattlefieldTargetEffect());
mode.addEffect(new LoseLifeSourceControllerEffect(2)); mode.addEffect(new LoseLifeSourceControllerEffect(2));
ability.addTarget(new TargetCardInGraveyard(filter)); mode.addTarget(new TargetCardInGraveyard(filter));
ability.addMode(mode); ability.addMode(mode);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
@ -11,17 +9,22 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class KindledFury extends CardImpl { public final class KindledFury extends CardImpl {
public KindledFury(UUID ownerId, CardSetInfo setInfo) { public KindledFury(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new BoostTargetEffect(
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); 1, 0, Duration.EndOfTurn
).setText("target creature gets +1/+0"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
FirstStrikeAbility.getInstance(), Duration.EndOfTurn
).setText("and gains first strike until end of turn"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
} }

View file

@ -46,7 +46,7 @@ public final class KuraTheBoundlessSky extends CardImpl {
// When Kura, the Boundless Sky dies, choose one // When Kura, the Boundless Sky dies, choose one
// Search your library for up to three land cards, reveal them, put them into your hand, then shuffle. // Search your library for up to three land cards, reveal them, put them into your hand, then shuffle.
Ability ability = new DiesSourceTriggeredAbility(new SearchLibraryPutInHandEffect( Ability ability = new DiesSourceTriggeredAbility(new SearchLibraryPutInHandEffect(
new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_LANDS) new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_LANDS), true
)); ));
// Create an X/X green Spirit creature token, where X is the number of lands you control. // Create an X/X green Spirit creature token, where X is the number of lands you control.

View file

@ -33,7 +33,7 @@ public final class NinjasKunai extends CardImpl {
// Equipped creature has "{1}, {T}, Sacrifice Ninja's Kunai: Ninja's Kunai deals 3 damage to any target." // Equipped creature has "{1}, {T}, Sacrifice Ninja's Kunai: Ninja's Kunai deals 3 damage to any target."
this.addAbility(new SimpleStaticAbility(new GainAbilityWithAttachmentEffect( this.addAbility(new SimpleStaticAbility(new GainAbilityWithAttachmentEffect(
"equipped creature has \"{1}, {T}, Sacrifice {this}: {this} deals 2 damage to any target.\"", "equipped creature has \"{1}, {T}, Sacrifice {this}: {this} deals 3 damage to any target.\"",
new NinjasKunaiEffect(), new TargetAnyTarget(), new SacrificeAttachmentCost(), new GenericManaCost(1), new TapSourceCost() new NinjasKunaiEffect(), new TargetAnyTarget(), new SacrificeAttachmentCost(), new GenericManaCost(1), new TapSourceCost()
))); )));

View file

@ -25,7 +25,7 @@ import java.util.UUID;
public final class RunawayTrashBot extends CardImpl { public final class RunawayTrashBot extends CardImpl {
private static final FilterCard filter private static final FilterCard filter
= new FilterArtifactOrEnchantmentCard("artifact and/or enchantment card in your graveyard"); = new FilterArtifactOrEnchantmentCard("artifact and/or enchantment card");
private static final DynamicValue xValue = new CardsInControllerGraveyardCount(filter); private static final DynamicValue xValue = new CardsInControllerGraveyardCount(filter);
private static final Hint hint = new ValueHint("Artifacts and enchantments in your graveyard", xValue); private static final Hint hint = new ValueHint("Artifacts and enchantments in your graveyard", xValue);

View file

@ -13,7 +13,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID; import java.util.UUID;
@ -23,6 +26,13 @@ import java.util.UUID;
*/ */
public final class SelflessSamurai extends CardImpl { public final class SelflessSamurai extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("another target creature you control");
static {
filter.add(AnotherPredicate.instance);
}
public SelflessSamurai(UUID ownerId, CardSetInfo setInfo) { public SelflessSamurai(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
@ -42,7 +52,7 @@ public final class SelflessSamurai extends CardImpl {
Ability ability = new SimpleActivatedAbility(new GainAbilityTargetEffect( Ability ability = new SimpleActivatedAbility(new GainAbilityTargetEffect(
IndestructibleAbility.getInstance(), Duration.EndOfTurn IndestructibleAbility.getInstance(), Duration.EndOfTurn
), new SacrificeSourceCost()); ), new SacrificeSourceCost());
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)); ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -21,7 +21,7 @@ import java.util.UUID;
*/ */
public final class SevenTailMentor extends CardImpl { public final class SevenTailMentor extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent("creature or Vehicle"); private static final FilterPermanent filter = new FilterControlledPermanent("creature or Vehicle you control");
static { static {
filter.add(Predicates.or( filter.add(Predicates.or(

View file

@ -43,7 +43,7 @@ public final class SilverFurMaster extends CardImpl {
// Ninjutsu abilities you activate cost {1} less to activate. // Ninjutsu abilities you activate cost {1} less to activate.
this.addAbility(new SimpleStaticAbility(new AbilitiesCostReductionControllerEffect( this.addAbility(new SimpleStaticAbility(new AbilitiesCostReductionControllerEffect(
NinjutsuAbility.class, "Ninjutsu" NinjutsuAbility.class, "Ninjutsu"
))); ).setText("ninjutsu abilities you activate cost {1} less to activate")));
// Other Ninja and Rogue creatures you control get +1/+1 // Other Ninja and Rogue creatures you control get +1/+1
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect( this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(

View file

@ -3,7 +3,6 @@ package mage.cards.s;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.costs.costadjusters.LegendaryCreatureCostAdjuster; import mage.abilities.costs.costadjusters.LegendaryCreatureCostAdjuster;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.ChannelAbility; import mage.abilities.keyword.ChannelAbility;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
@ -34,7 +33,7 @@ public final class SokenzanCrucibleOfDefiance extends CardImpl {
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());
// Channel {3}{R}, Discard Sokenzan, Crucible of Defiance: Create two colorless 1/1 Spirit creature tokens. They gain haste until end of turn. This ability costs {1} less to activate for each legendary creature you control. // Channel {3}{R}, Discard Sokenzan, Crucible of Defiance: Create two colorless 1/1 Spirit creature tokens. They gain haste until end of turn. This ability costs {1} less to activate for each legendary creature you control.
Ability ability = new ChannelAbility("{3}{R}", new CreateTokenEffect(new SpiritToken(), 2)); Ability ability = new ChannelAbility("{3}{R}", new SokenzanCrucibleOfDefianceEffect());
ability.setCostAdjuster(LegendaryCreatureCostAdjuster.instance); ability.setCostAdjuster(LegendaryCreatureCostAdjuster.instance);
this.addAbility(ability); this.addAbility(ability);
} }
@ -53,7 +52,7 @@ class SokenzanCrucibleOfDefianceEffect extends OneShotEffect {
SokenzanCrucibleOfDefianceEffect() { SokenzanCrucibleOfDefianceEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "create two colorless 1/1 Spirit creature tokens. They gain haste until end of turn. " + staticText = "create two 1/1 colorless Spirit creature tokens. They gain haste until end of turn. " +
"This ability costs {1} less to activate for each legendary creature you control"; "This ability costs {1} less to activate for each legendary creature you control";
} }

View file

@ -9,7 +9,8 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.StaticFilters; import mage.filter.FilterCard;
import mage.filter.common.FilterPermanentCard;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID; import java.util.UUID;
@ -19,6 +20,8 @@ import java.util.UUID;
*/ */
public final class SpringLeafAvenger extends CardImpl { public final class SpringLeafAvenger extends CardImpl {
private static final FilterCard filter = new FilterPermanentCard("permanent card from your graveyard");
public SpringLeafAvenger(UUID ownerId, CardSetInfo setInfo) { public SpringLeafAvenger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
@ -34,7 +37,7 @@ public final class SpringLeafAvenger extends CardImpl {
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility( Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
new ReturnFromGraveyardToHandTargetEffect(), false new ReturnFromGraveyardToHandTargetEffect(), false
); );
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_PERMANENT)); ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -28,7 +28,7 @@ import java.util.UUID;
public final class SurgehackerMech extends CardImpl { public final class SurgehackerMech extends CardImpl {
private static final FilterPermanent filter private static final FilterPermanent filter
= new FilterCreatureOrPlaneswalkerPermanent("creature or planeswalker and opponent controls"); = new FilterCreatureOrPlaneswalkerPermanent("creature or planeswalker an opponent controls");
private static final FilterPermanent filter2 private static final FilterPermanent filter2
= new FilterControlledPermanent(SubType.VEHICLE); = new FilterControlledPermanent(SubType.VEHICLE);
@ -52,7 +52,7 @@ public final class SurgehackerMech extends CardImpl {
this.addAbility(new MenaceAbility(false)); this.addAbility(new MenaceAbility(false));
// When Surgehacker Mech enters the battlefield, it deals damage equal to twice the number of Vehicles you control to target creature or planeswalker an opponent controls. // When Surgehacker Mech enters the battlefield, it deals damage equal to twice the number of Vehicles you control to target creature or planeswalker an opponent controls.
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(xValue)); Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(xValue).setText("it deals damage equal to twice the number of Vehicles you control to target creature or planeswalker an opponent controls"));
ability.addTarget(new TargetPermanent(filter)); ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability.addHint(hint)); this.addAbility(ability.addHint(hint));

View file

@ -6,7 +6,7 @@ import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
@ -64,7 +64,7 @@ public final class TheWanderingEmperor extends CardImpl {
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new SamuraiToken()), -1)); this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new SamuraiToken()), -1));
// 2: Exile target tapped creature. You gain 2 life. // 2: Exile target tapped creature. You gain 2 life.
ability = new LoyaltyAbility(new DestroyTargetEffect(), -2); ability = new LoyaltyAbility(new ExileTargetEffect(), -2);
ability.addEffect(new GainLifeEffect(2)); ability.addEffect(new GainLifeEffect(2));
ability.addTarget(new TargetPermanent(filter)); ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability); this.addAbility(ability);

View file

@ -2,6 +2,7 @@ package mage.cards.t;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
@ -51,7 +52,7 @@ public final class ThunderingRaiju extends CardImpl {
this.addAbility(HasteAbility.getInstance()); this.addAbility(HasteAbility.getInstance());
// Whenever Thundering Raiju attacks, put a +1/+1 counter on target creature you control. Then Thundering Raiju deals X damage to each opponent, where X is the number of modified creatures you control other than Thundering Raiju. // Whenever Thundering Raiju attacks, put a +1/+1 counter on target creature you control. Then Thundering Raiju deals X damage to each opponent, where X is the number of modified creatures you control other than Thundering Raiju.
Ability ability = new EntersBattlefieldTriggeredAbility( Ability ability = new AttacksTriggeredAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance()) new AddCountersTargetEffect(CounterType.P1P1.createInstance())
); );
ability.addTarget(new TargetControlledCreaturePermanent()); ability.addTarget(new TargetControlledCreaturePermanent());

View file

@ -55,7 +55,7 @@ class TributeToHorobiTokenEffect extends OneShotEffect {
public TributeToHorobiTokenEffect() { public TributeToHorobiTokenEffect() {
super(Outcome.PutCreatureInPlay); super(Outcome.PutCreatureInPlay);
this.staticText = "Each opponent creates a 1/1 black Rat Rouge creature token"; this.staticText = "Each opponent creates a 1/1 black Rat Rogue creature token";
} }
private TributeToHorobiTokenEffect(final TributeToHorobiTokenEffect effect) { private TributeToHorobiTokenEffect(final TributeToHorobiTokenEffect effect) {

View file

@ -31,12 +31,12 @@ public final class TwinshotSniper extends CardImpl {
this.addAbility(ReachAbility.getInstance()); this.addAbility(ReachAbility.getInstance());
// When Twinshot Sniper enters the battlefield, it deals 2 damage to any target. // When Twinshot Sniper enters the battlefield, it deals 2 damage to any target.
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)); Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"));
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);
// Channel {1}{R}, Discard Twinshot Sniper: It deals 2 damage to any target. // Channel {1}{R}, Discard Twinshot Sniper: It deals 2 damage to any target.
ability = new ChannelAbility("{1}{R}", new DamageTargetEffect(2)); ability = new ChannelAbility("{1}{R}", new DamageTargetEffect(2, "it"));
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -44,7 +44,7 @@ public final class TwistedEmbrace extends CardImpl {
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
// Enchant artifact or creature you control // Enchant artifact or creature you control
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE); TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE);
this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget.getTargetName())); this.addAbility(new EnchantAbility(auraTarget.getTargetName()));

View file

@ -7,8 +7,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
@ -23,16 +22,13 @@ import java.util.UUID;
*/ */
public final class VoltageSurge extends CardImpl { public final class VoltageSurge extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledArtifactPermanent("you may sacrifice an artifact");
public VoltageSurge(UUID ownerId, CardSetInfo setInfo) { public VoltageSurge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
// As an additional cost to cast this spell, you may sacrifice an artifact. // As an additional cost to cast this spell, you may sacrifice an artifact.
this.getSpellAbility().addCost(new SacrificeTargetCost( this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(
new TargetControlledPermanent(0, 1, filter, true) 0, 1, StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN, true
)); )).setText("you may sacrifice an artifact"));
// Voltage Surge deals 2 damage to target creature or planeswalker. If this spell's additional cost was paid, Voltage Surge deals 4 damage instead. // Voltage Surge deals 2 damage to target creature or planeswalker. If this spell's additional cost was paid, Voltage Surge deals 4 damage instead.
this.getSpellAbility().addEffect(new VoltageSurgeEffect()); this.getSpellAbility().addEffect(new VoltageSurgeEffect());

View file

@ -59,7 +59,7 @@ public class VerifyCardDataTest {
private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class); private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class);
private static final String FULL_ABILITIES_CHECK_SET_CODE = "VOC"; // check all abilities and output cards with wrong abilities texts; private static final String FULL_ABILITIES_CHECK_SET_CODE = "NEO"; // check all abilities and output cards with wrong abilities texts;
private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run
private static final boolean ONLY_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages private static final boolean ONLY_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages

View file

@ -9,6 +9,7 @@ import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
/** /**
* @author jeffwadsworth * @author jeffwadsworth
@ -66,6 +67,6 @@ public class BecomesTappedTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public String getTriggerPhrase() { public String getTriggerPhrase() {
return "Whenever " + filter.getMessage() + " becomes tapped, "; return "Whenever " + CardUtil.addArticle(filter.getMessage()) + " becomes tapped, ";
} }
} }

View file

@ -21,7 +21,11 @@ public class BlocksOrBecomesBlockedSourceTriggeredAbility extends TriggeredAbili
protected boolean setTargetPointer; protected boolean setTargetPointer;
public BlocksOrBecomesBlockedSourceTriggeredAbility(Effect effect, boolean optional) { 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) { public BlocksOrBecomesBlockedSourceTriggeredAbility(Effect effect, FilterPermanent filter, boolean optional) {

View file

@ -1,9 +1,6 @@
package mage.abilities.costs.common; package mage.abilities.costs.common;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.CostImpl; import mage.abilities.costs.CostImpl;
@ -16,8 +13,11 @@ import mage.players.Player;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public class ReturnToHandChosenControlledPermanentCost extends CostImpl { public class ReturnToHandChosenControlledPermanentCost extends CostImpl {
@ -31,7 +31,7 @@ public class ReturnToHandChosenControlledPermanentCost extends CostImpl {
+ (target.getTargetName().endsWith(" you control") ? "" : " you control") + (target.getTargetName().endsWith(" you control") ? "" : " you control")
+ " to their owner's hand"; + " to their owner's hand";
} else { } else {
this.text = "return " + target.getTargetName() this.text = "return " + CardUtil.addArticle(target.getTargetName())
+ (target.getTargetName().endsWith(" you control") ? "" : " you control") + (target.getTargetName().endsWith(" you control") ? "" : " you control")
+ " to its owner's hand"; + " to its owner's hand";
} }

View file

@ -67,8 +67,8 @@ public class CostsLessForExiledCardsEffect extends CostModificationEffectImpl {
public static void addCostAndEffect(Card card, FilterCard filter) { public static void addCostAndEffect(Card card, FilterCard filter) {
card.getSpellAbility().addCost(new ExileFromHandCost( card.getSpellAbility().addCost(new ExileFromHandCost(
new TargetCardInHand(0, Integer.MAX_VALUE, filter) new TargetCardInHand(0, Integer.MAX_VALUE, filter)
).setText("as an additional cost to cast this spell, you may exile any number of " ).setText("you may exile any number of " + filter.getMessage()
+ filter.getMessage() + ". This spell costs {2} less to cast for each card exiled this way")); + ". This spell costs {2} less to cast for each card exiled this way"));
Ability ability = new SimpleStaticAbility(Zone.ALL, new CostsLessForExiledCardsEffect(filter)); Ability ability = new SimpleStaticAbility(Zone.ALL, new CostsLessForExiledCardsEffect(filter));
ability.setRuleVisible(false); ability.setRuleVisible(false);
card.addAbility(ability); card.addAbility(ability);

View file

@ -1,6 +1,7 @@
package mage.abilities.effects.common; package mage.abilities.effects.common;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCost;
@ -60,7 +61,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
this.cost = cost; this.cost = cost;
this.amount = amount; this.amount = amount;
this.filter = filter; this.filter = filter;
setText();
} }
public SacrificeOpponentsUnlessPayEffect(DynamicValue genericMana, FilterPermanent filter, DynamicValue amount) { public SacrificeOpponentsUnlessPayEffect(DynamicValue genericMana, FilterPermanent filter, DynamicValue amount) {
@ -68,7 +68,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
this.genericMana = genericMana; this.genericMana = genericMana;
this.amount = amount; this.amount = amount;
this.filter = filter; this.filter = filter;
setText();
} }
public SacrificeOpponentsUnlessPayEffect(final SacrificeOpponentsUnlessPayEffect effect) { public SacrificeOpponentsUnlessPayEffect(final SacrificeOpponentsUnlessPayEffect effect) {
@ -150,31 +149,36 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
return true; return true;
} }
private void setText() { @Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("each opponent sacrifices "); sb.append("each opponent sacrifices ");
if (amount.toString().equals("X")) { switch (amount.toString()) {
sb.append(amount.toString()); case "1":
} else { sb.append(CardUtil.addArticle(filter.getMessage()));
if (amount.toString().equals("1")) { break;
if (!filter.getMessage().startsWith("a ") && !filter.getMessage().startsWith("an ")) { case "X":
sb.append('a'); sb.append("X ");
} sb.append(filter.getMessage());
} else { break;
default:
sb.append(CardUtil.numberToText(amount.toString())); sb.append(CardUtil.numberToText(amount.toString()));
}
}
sb.append(' '); sb.append(' ');
sb.append(filter.getMessage()); sb.append(filter.getMessage());
}
sb.append(" unless they pay ");
sb.append(" unless they ");
if (cost != null) { if (cost != null) {
sb.append(CardUtil.checkCostWords(cost.getText()) ? "" : "pay ");
sb.append(cost.getText()); sb.append(cost.getText());
} else { } else {
sb.append("{X}"); sb.append("pay {X}");
} }
if (genericMana != null && !genericMana.getMessage().isEmpty()) { if (genericMana != null && !genericMana.getMessage().isEmpty()) {
@ -182,6 +186,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
sb.append(genericMana.getMessage()); sb.append(genericMana.getMessage());
} }
staticText = sb.toString(); return sb.toString();
} }
} }

View file

@ -58,11 +58,11 @@ public class TapTargetEffect extends OneShotEffect {
} }
Target target = mode.getTargets().get(0); Target target = mode.getTargets().get(0);
if (target.getMaxNumberOfTargets() > 1) { if (target.getMaxNumberOfTargets() > 1 || target.getNumberOfTargets() == 0) {
if (target.getMaxNumberOfTargets() == target.getNumberOfTargets()) { if (target.getMaxNumberOfTargets() == target.getNumberOfTargets()) {
return "tap " + CardUtil.numberToText(target.getNumberOfTargets()) + " target " + target.getTargetName() + 's'; return "tap " + CardUtil.numberToText(target.getNumberOfTargets()) + " target " + target.getTargetName() + 's';
} else { } 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) { } else if (target.getMaxNumberOfTargets() == 0) {
return "tap X target " + mode.getTargets().get(0).getTargetName(); return "tap X target " + mode.getTargets().get(0).getTargetName();

View file

@ -30,7 +30,7 @@ public class GainControlAllEffect extends OneShotEffect {
this.filter = filter; this.filter = filter;
this.duration = duration; this.duration = duration;
this.controllingPlayerId = controllingPlayerId; this.controllingPlayerId = controllingPlayerId;
this.staticText = "Gain control of " + filter.getMessage(); this.staticText = "gain control of " + filter.getMessage();
} }
public GainControlAllEffect(final GainControlAllEffect effect) { public GainControlAllEffect(final GainControlAllEffect effect) {

View file

@ -54,7 +54,7 @@ class ReconfigureUnattachAbility extends ActivateAsSorceryActivatedAbility {
protected ReconfigureUnattachAbility(String manaString) { protected ReconfigureUnattachAbility(String manaString) {
super(Zone.BATTLEFIELD, new ReconfigureUnattachEffect(), new ManaCostsImpl<>(manaString)); super(Zone.BATTLEFIELD, new ReconfigureUnattachEffect(), new ManaCostsImpl<>(manaString));
this.setRuleVisible(true); this.setRuleVisible(false);
} }
private ReconfigureUnattachAbility(final ReconfigureUnattachAbility ability) { private ReconfigureUnattachAbility(final ReconfigureUnattachAbility ability) {

View file

@ -396,6 +396,12 @@ public final class StaticFilters {
FILTER_CONTROLLED_PERMANENT_LAND.setLockedFilter(true); 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"); public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_LANDS = new FilterControlledLandPermanent("lands you control");
static { static {

View file

@ -13,7 +13,7 @@ import java.util.Arrays;
public final class HumanMonkToken extends TokenImpl { public final class HumanMonkToken extends TokenImpl {
public HumanMonkToken() { 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); cardType.add(CardType.CREATURE);
color.setGreen(true); color.setGreen(true);
subtype.add(SubType.HUMAN); subtype.add(SubType.HUMAN);