[ELD] various text fixes

This commit is contained in:
Evan Kranzler 2020-10-07 20:57:43 -04:00
parent 6a3240fad3
commit 50a0954606
29 changed files with 80 additions and 62 deletions

View file

@ -38,7 +38,7 @@ public final class ArcanistsOwl extends CardImpl {
StaticValue.get(4), false, StaticValue.get(1), filter, StaticValue.get(4), false, StaticValue.get(1), filter,
Zone.LIBRARY, false, true, false, Zone.HAND, Zone.LIBRARY, false, true, false, Zone.HAND,
true, false, false true, false, false
).setBackInRandomOrder(true).setText("Look at the top four cards of your library. " + ).setBackInRandomOrder(true).setText("look at the top four cards of your library. " +
"You may reveal an artifact or enchantment card from among them and put it into your hand. " + "You may reveal an artifact or enchantment card from among them and put it into your hand. " +
"Put the rest on the bottom of your library in a random order.") "Put the rest on the bottom of your library in a random order.")
)); ));

View file

@ -33,9 +33,10 @@ public final class ArchonOfAbsolution extends CardImpl {
this.addAbility(ProtectionAbility.from(ObjectColor.WHITE)); this.addAbility(ProtectionAbility.from(ObjectColor.WHITE));
// Creatures can't attack you or a planeswalker you control unless their controller pays {1} for each of those creatures. // Creatures can't attack you or a planeswalker you control unless their controller pays {1} for each of those creatures.
this.addAbility(new SimpleStaticAbility( this.addAbility(new SimpleStaticAbility(new CantAttackYouUnlessPayManaAllEffect(
new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl("{1}"), true) new ManaCostsImpl("{1}"), true
)); ).setText("creatures can't attack you or a planeswalker you control " +
"unless their controller pays {1} for each of those creatures")));
} }
private ArchonOfAbsolution(final ArchonOfAbsolution card) { private ArchonOfAbsolution(final ArchonOfAbsolution card) {

View file

@ -81,6 +81,12 @@ class BanishIntoFableTriggeredAbility extends CastSourceTriggeredAbility {
public BanishIntoFableTriggeredAbility copy() { public BanishIntoFableTriggeredAbility copy() {
return new BanishIntoFableTriggeredAbility(this); return new BanishIntoFableTriggeredAbility(this);
} }
@Override
public String getRule() {
return "When you cast this spell from your hand, copy it if you control an artifact, " +
"then copy it if you control an enchantment. You may choose new targets for the copies.";
}
} }
class BanishIntoFableEffect extends OneShotEffect { class BanishIntoFableEffect extends OneShotEffect {

View file

@ -12,6 +12,7 @@ import mage.cards.AdventureCard;
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.FilterCard;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInHand;
@ -22,6 +23,8 @@ import java.util.UUID;
*/ */
public final class FaeOfWishes extends AdventureCard { public final class FaeOfWishes extends AdventureCard {
private static final FilterCard filter = new FilterCard("two cards");
public FaeOfWishes(UUID ownerId, CardSetInfo setInfo) { public FaeOfWishes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{1}{U}", "Granted", "{3}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{1}{U}", "Granted", "{3}{U}");
@ -37,7 +40,7 @@ public final class FaeOfWishes extends AdventureCard {
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
new ReturnToHandSourceEffect(true), new ManaCostsImpl("{1}{U}") new ReturnToHandSourceEffect(true), new ManaCostsImpl("{1}{U}")
); );
ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD))); ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, filter)));
this.addAbility(ability); this.addAbility(ability);
// Granted // Granted

View file

@ -8,8 +8,8 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.mana.ManaEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.mana.ManaEffect;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.abilities.mana.SimpleManaAbility; import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -84,7 +84,7 @@ enum FaeburrowElderValue implements DynamicValue {
@Override @Override
public String getMessage() { public String getMessage() {
return "for each color among permanents you control"; return "color among permanents you control";
} }
} }

View file

@ -13,6 +13,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.AttackingPredicate;
import mage.game.Game; import mage.game.Game;
@ -29,7 +30,7 @@ import java.util.UUID;
public final class FerventChampion extends CardImpl { public final class FerventChampion extends CardImpl {
private static final FilterPermanent filter private static final FilterPermanent filter
= new FilterPermanent(SubType.KNIGHT, "another target attacking Knight"); = new FilterControlledPermanent(SubType.KNIGHT, "another target attacking Knight you control");
static { static {
filter.add(AttackingPredicate.instance); filter.add(AttackingPredicate.instance);
@ -94,14 +95,14 @@ class FerventChampionEffect extends CostModificationEffectImpl {
&& abilityToModify.isControlledBy(source.getControllerId())) { && abilityToModify.isControlledBy(source.getControllerId())) {
if (game != null && game.inCheckPlayableState()) { if (game != null && game.inCheckPlayableState()) {
return !abilityToModify.getTargets().isEmpty() && return !abilityToModify.getTargets().isEmpty() &&
abilityToModify.getTargets().get(0).canTarget(source.getSourceId(), abilityToModify, game); abilityToModify.getTargets().get(0).canTarget(source.getSourceId(), abilityToModify, game);
} else { } else {
return abilityToModify return abilityToModify
.getTargets() .getTargets()
.stream() .stream()
.map(Target::getTargets) .map(Target::getTargets)
.flatMap(Collection::stream) .flatMap(Collection::stream)
.anyMatch(source.getSourceId()::equals); .anyMatch(source.getSourceId()::equals);
} }
} }

View file

@ -3,6 +3,7 @@ package mage.cards.f;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.delayed.ReflexiveTriggeredAbility; import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -35,8 +36,10 @@ public final class FlaxenIntruder extends AdventureCard {
new DestroyTargetEffect(), false, "destroy target artifact or enchantment" new DestroyTargetEffect(), false, "destroy target artifact or enchantment"
); );
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
Cost cost = new SacrificeSourceCost();
cost.setText("sacrifice it");
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DoWhenCostPaid( this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DoWhenCostPaid(
ability, new SacrificeSourceCost(), "Sacrifice {this}?" ability, cost, "Sacrifice {this}?"
), false)); ), false));
// Welcome Home // Welcome Home

View file

@ -25,7 +25,6 @@ public final class IrencragFeat extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}{R}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}{R}");
// Add seven {R}. You can cast only one more spell this turn. // Add seven {R}. You can cast only one more spell this turn.
this.getSpellAbility().addEffect(new BasicManaEffect(Mana.RedMana(7)));
this.getSpellAbility().addEffect(new IrencragFeatEffect()); this.getSpellAbility().addEffect(new IrencragFeatEffect());
} }
@ -57,6 +56,7 @@ class IrencragFeatEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
new BasicManaEffect(Mana.RedMana(7)).apply(game, source);
CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class); CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class);
if (watcher == null) { if (watcher == null) {
return false; return false;

View file

@ -88,6 +88,6 @@ class KeeperOfFablesTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public String getRule() { public String getRule() {
return "Whenever one or more non-Human creatures you control deal combat damage to a player, draw a card"; return "Whenever one or more non-Human creatures you control deal combat damage to a player, draw a card.";
} }
} }

View file

@ -31,9 +31,6 @@ public final class MemoryTheft extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
// Target opponent reveals their hand. You choose a nonland card from it. That player discards that card. You may put a card that has an Adventure that player owns from exile into that player's graveyard. // Target opponent reveals their hand. You choose a nonland card from it. That player discards that card. You may put a card that has an Adventure that player owns from exile into that player's graveyard.
this.getSpellAbility().addEffect(
new DiscardCardYouChooseTargetEffect(StaticFilters.FILTER_CARD_NON_LAND, TargetController.ANY)
);
this.getSpellAbility().addEffect(new MemoryTheftEffect()); this.getSpellAbility().addEffect(new MemoryTheftEffect());
this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addTarget(new TargetOpponent());
} }
@ -68,6 +65,9 @@ class MemoryTheftEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
new DiscardCardYouChooseTargetEffect(
StaticFilters.FILTER_CARD_NON_LAND, TargetController.ANY
).apply(game, source);
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
Player player = game.getPlayer(source.getFirstTarget()); Player player = game.getPlayer(source.getFirstTarget());
if (controller == null || player == null) { if (controller == null || player == null) {

View file

@ -44,7 +44,7 @@ public final class MidnightClock extends CardImpl {
// At the beginning of each upkeep, put an hour counter on Midnight Clock. // At the beginning of each upkeep, put an hour counter on Midnight Clock.
this.addAbility(new BeginningOfUpkeepTriggeredAbility( this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new AddCountersSourceEffect(CounterType.HOUR.createInstance()), TargetController.ANY, false new AddCountersSourceEffect(CounterType.HOUR.createInstance()), TargetController.EACH_PLAYER, false
)); ));
// When the twelfth hour counter is put on Midnight Clock, shuffle your hand and graveyard into your library, then draw seven cards. Exile Midnight Clock. // When the twelfth hour counter is put on Midnight Clock, shuffle your hand and graveyard into your library, then draw seven cards. Exile Midnight Clock.

View file

@ -27,7 +27,7 @@ import java.util.UUID;
public final class OakhameAdversary extends CardImpl { public final class OakhameAdversary extends CardImpl {
private static final FilterPermanent filter private static final FilterPermanent filter
= new FilterPermanent("your opponent controls a green permanent"); = new FilterPermanent("an opponent controls a green permanent");
static { static {
filter.add(new ColorPredicate(ObjectColor.GREEN)); filter.add(new ColorPredicate(ObjectColor.GREEN));

View file

@ -29,7 +29,7 @@ public final class QueenOfIce extends AdventureCard {
// Whenever Queen of Ice deals combat damage to a creature, tap that creature. It doesn't untap during its controller's next untap step. // Whenever Queen of Ice deals combat damage to a creature, tap that creature. It doesn't untap during its controller's next untap step.
Ability ability = new DealsDamageToACreatureTriggeredAbility( Ability ability = new DealsDamageToACreatureTriggeredAbility(
new TapTargetEffect().setText("tap that creature"), new TapTargetEffect().setText("that creature"),
true, false, true true, false, true
); );
ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect() ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect()

View file

@ -152,6 +152,6 @@ class QuestingBeastTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public String getRule() { public String getRule() {
return "Whenever {this} deals combat damage to an opponent, " + return "Whenever {this} deals combat damage to an opponent, " +
"it deals that much damage to target planeswalker that player controls"; "it deals that much damage to target planeswalker that player controls.";
} }
} }

View file

@ -50,15 +50,16 @@ public final class RowanFearlessSparkmage extends CardImpl {
// 2: Rowan, Fearless Sparkmage deals 1 damage to each of up to two target creatures. Those creatures can't block this turn. // 2: Rowan, Fearless Sparkmage deals 1 damage to each of up to two target creatures. Those creatures can't block this turn.
ability = new LoyaltyAbility(new DamageTargetEffect(1) ability = new LoyaltyAbility(new DamageTargetEffect(1)
.setText("deals 1 damage to each of up to two target creatures."), -2); .setText("{this} deals 1 damage to each of up to two target creatures."), -2);
ability.addEffect(new CantBlockTargetEffect(Duration.EndOfTurn) ability.addEffect(new CantBlockTargetEffect(Duration.EndOfTurn)
.setText("Those creatures can't block this turn.")); .setText("Those creatures can't block this turn."));
ability.addTarget(new TargetCreaturePermanent(0, 2)); ability.addTarget(new TargetCreaturePermanent(0, 2));
this.addAbility(ability); this.addAbility(ability);
// 9: Gain control of all creatures until end of turn. Untap them. They gain haste until end of turn. // 9: Gain control of all creatures until end of turn. Untap them. They gain haste until end of turn.
ability = new LoyaltyAbility(new GainControlAllEffect(Duration.EndOfTurn, filter), -9); ability = new LoyaltyAbility(new GainControlAllEffect(Duration.EndOfTurn, filter)
ability.addEffect(new UntapAllEffect(filter).setText("until end of turn. Untap them.")); .setText("gain control of all creatures until end of turn."), -9);
ability.addEffect(new UntapAllEffect(filter).setText("Untap them."));
ability.addEffect(new GainAbilityAllEffect( ability.addEffect(new GainAbilityAllEffect(
HasteAbility.getInstance(), Duration.EndOfTurn, filter HasteAbility.getInstance(), Duration.EndOfTurn, filter
).setText("They gain haste until end of turn")); ).setText("They gain haste until end of turn"));

View file

@ -70,6 +70,6 @@ class SorcerersBroomTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public String getRule() { public String getRule() {
return "Whenever you sacrifice another permanent, you may pay {3}. " + return "Whenever you sacrifice another permanent, you may pay {3}. " +
"If you do, create a token that's a copy of {this}"; "If you do, create a token that's a copy of {this}.";
} }
} }

View file

@ -8,23 +8,19 @@ import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.MenaceAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.EquippedPredicate; import mage.filter.predicate.permanent.EquippedPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID; import java.util.UUID;
import mage.abilities.keyword.EquipAbility;
import mage.constants.Outcome;
import mage.target.common.TargetControlledCreaturePermanent;
/** /**
* @author TheElk801 * @author TheElk801
@ -32,7 +28,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
public final class SyrGwynHeroOfAshvale extends CardImpl { public final class SyrGwynHeroOfAshvale extends CardImpl {
private static final FilterControlledCreaturePermanent filter private static final FilterControlledCreaturePermanent filter
= new FilterControlledCreaturePermanent("an equipped creature you control"); = new FilterControlledCreaturePermanent("equipped creature you control");
private static final FilterPermanent filter2 private static final FilterPermanent filter2
= new FilterControlledPermanent(SubType.EQUIPMENT); = new FilterControlledPermanent(SubType.EQUIPMENT);
private static final FilterControlledCreaturePermanent filter3 private static final FilterControlledCreaturePermanent filter3
@ -59,16 +55,18 @@ public final class SyrGwynHeroOfAshvale extends CardImpl {
// Whenever an equipped creature you control attacks, you draw a card and you lose 1 life. // Whenever an equipped creature you control attacks, you draw a card and you lose 1 life.
Ability ability = new AttacksCreatureYouControlTriggeredAbility( Ability ability = new AttacksCreatureYouControlTriggeredAbility(
new DrawCardSourceControllerEffect(1).setText("you draw a card and"), false, filter new DrawCardSourceControllerEffect(1).setText("you draw a card"), false, filter
); );
ability.addEffect(new LoseLifeSourceControllerEffect(1)); ability.addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and"));
this.addAbility(ability); this.addAbility(ability);
// Equipment you control have equip Knight {0}. // Equipment you control have equip Knight {0}.
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
new EquipAbility(Outcome.AddAbility, new GenericManaCost(0), new TargetControlledCreaturePermanent(filter3)), new EquipAbility(
Duration.WhileOnBattlefield, filter2 Outcome.AddAbility, new GenericManaCost(0),
))); new TargetControlledCreaturePermanent(filter3)
), Duration.WhileOnBattlefield, filter2
).setText("Equipment you control have equip Knight {0}.")));
} }
private SyrGwynHeroOfAshvale(final SyrGwynHeroOfAshvale card) { private SyrGwynHeroOfAshvale(final SyrGwynHeroOfAshvale card) {

View file

@ -29,7 +29,7 @@ public final class WeaponRack extends CardImpl {
// Weapon Rack enters the battlefield with three +1/+1 counters on it. // Weapon Rack enters the battlefield with three +1/+1 counters on it.
this.addAbility(new EntersBattlefieldAbility( this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)),
"{this} enters the battlefield with three +1/+1 counters on it" "with three +1/+1 counters on it"
)); ));
// {T}: Move a +1/+1 counter from Weapon Rack onto target creature. Activate this ability only any time you could cast a sorcery. // {T}: Move a +1/+1 counter from Weapon Rack onto target creature. Activate this ability only any time you could cast a sorcery.

View file

@ -41,7 +41,7 @@ public final class WishclawTalisman extends CardImpl {
// Wishclaw Talisman enters the battlefield with three wish counters on it. // Wishclaw Talisman enters the battlefield with three wish counters on it.
this.addAbility(new EntersBattlefieldAbility( this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.WISH.createInstance(3)), new AddCountersSourceEffect(CounterType.WISH.createInstance(3)),
"{this} enters the battlefield with three wish counters on it" "with three wish counters on it"
)); ));
// {1}, {T}, Remove a wish counter from Wishclaw Talisman: Search your library for a card, put it into your hand, then shuffle your library. An opponent gains control of Wishclaw Talisman. Activate this ability only during your turn. // {1}, {T}, Remove a wish counter from Wishclaw Talisman: Search your library for a card, put it into your hand, then shuffle your library. An opponent gains control of Wishclaw Talisman. Activate this ability only during your turn.

View file

@ -54,13 +54,13 @@ public final class WorkshopElders extends CardImpl {
// At the beginning of combat on your turn, you may have target noncreature artifact you control become a 0/0 artifact creature. If you do, put four +1/+1 counters on it. // At the beginning of combat on your turn, you may have target noncreature artifact you control become a 0/0 artifact creature. If you do, put four +1/+1 counters on it.
Ability ability = new BeginningOfCombatTriggeredAbility(new AddCardTypeTargetEffect( Ability ability = new BeginningOfCombatTriggeredAbility(new AddCardTypeTargetEffect(
Duration.EndOfGame, CardType.ARTIFACT, CardType.CREATURE Duration.EndOfGame, CardType.ARTIFACT, CardType.CREATURE
).setText("have target noncreature artifact you control become"), TargetController.YOU, true); ).setText("target noncreature artifact you control become a 0/0 artifact creature"), TargetController.YOU, true);
ability.addEffect(new SetPowerToughnessTargetEffect( ability.addEffect(new SetPowerToughnessTargetEffect(
0, 0, Duration.EndOfGame 0, 0, Duration.EndOfGame
).setText("a 0/0 artifact creature")); ).setText("If you do"));
ability.addEffect(new AddCountersTargetEffect( ability.addEffect(new AddCountersTargetEffect(
CounterType.P1P1.createInstance(4) CounterType.P1P1.createInstance(4)
).setText("If you do, put four +1/+1 counters on it")); ).setText(", put four +1/+1 counters on it"));
ability.addTarget(new TargetPermanent(filter2)); ability.addTarget(new TargetPermanent(filter2));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -44,7 +44,7 @@ public final class YorvoLordOfGarenbrig extends CardImpl {
// Yorvo, Lord of Garenbrig enters the battlefield with four +1/+1 counters on it. // Yorvo, Lord of Garenbrig enters the battlefield with four +1/+1 counters on it.
this.addAbility(new EntersBattlefieldAbility( this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(4)), new AddCountersSourceEffect(CounterType.P1P1.createInstance(4)),
"{this} enters the battlefield with four +1/+1 counters on it" "with four +1/+1 counters on it"
)); ));
// Whenever another green creature enters the battlefield under your control, put a +1/+1 counter on Yorvo. Then if that creature's power is greater than Yorvo's power, put another +1/+1 counter on Yorvo. // Whenever another green creature enters the battlefield under your control, put a +1/+1 counter on Yorvo. Then if that creature's power is greater than Yorvo's power, put another +1/+1 counter on Yorvo.

View file

@ -52,7 +52,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 = "ZNR"; // check all abilities and output cards with wrong abilities texts; private static final String FULL_ABILITIES_CHECK_SET_CODE = "ELD"; // check all abilities and output cards with wrong abilities texts;
private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: fix sample decks if it contains errors like wrong card numbers private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: fix sample decks if it contains errors like wrong card numbers
private static final HashMap<String, Set<String>> skipCheckLists = new HashMap<>(); private static final HashMap<String, Set<String>> skipCheckLists = new HashMap<>();

View file

@ -136,9 +136,10 @@ public class BeginningOfUpkeepTriggeredAbility extends TriggeredAbilityImpl {
case OPPONENT: case OPPONENT:
return sb.insert(0, generateZoneString()).insert(0, "At the beginning of each opponent's upkeep, ").toString(); return sb.insert(0, generateZoneString()).insert(0, "At the beginning of each opponent's upkeep, ").toString();
case ANY: case ANY:
return sb.insert(0, generateZoneString()).insert(0, "At the beginning of each player's upkeep, ").toString();
case ACTIVE: case ACTIVE:
return sb.insert(0, generateZoneString()).insert(0, "At the beginning of each player's upkeep, ").toString(); return sb.insert(0, generateZoneString()).insert(0, "At the beginning of each player's upkeep, ").toString();
case EACH_PLAYER:
return sb.insert(0, generateZoneString()).insert(0, "At the beginning of each upkeep, ").toString();
case CONTROLLER_ATTACHED_TO: case CONTROLLER_ATTACHED_TO:
return sb.insert(0, generateZoneString()).insert(0, "At the beginning of the upkeep of enchanted creature's controller, ").toString(); return sb.insert(0, generateZoneString()).insert(0, "At the beginning of the upkeep of enchanted creature's controller, ").toString();
} }

View file

@ -23,7 +23,7 @@ public class TapTargetCost extends CostImpl {
this.target.setNotTarget(true); // costs are never targeted this.target.setNotTarget(true); // costs are never targeted
this.target.setRequired(false); // can be cancel by user this.target.setRequired(false); // can be cancel by user
this.text this.text
= new StringBuilder("Tap ") = new StringBuilder("tap ")
.append((target.getTargetName().startsWith("a ") || target.getTargetName().startsWith("an ") || target.getTargetName().startsWith("another")) .append((target.getTargetName().startsWith("a ") || target.getTargetName().startsWith("an ") || target.getTargetName().startsWith("another"))
? "" : CardUtil.numberToText(target.getMaxNumberOfTargets()) + ' ') ? "" : CardUtil.numberToText(target.getMaxNumberOfTargets()) + ' ')
.append(target.getTargetName()).toString(); .append(target.getTargetName()).toString();

View file

@ -71,8 +71,7 @@ public class CreateTokenTargetEffect extends OneShotEffect {
if (mode.getTargets().isEmpty()) { if (mode.getTargets().isEmpty()) {
sb.append("that player"); sb.append("that player");
} } else {
else {
sb.append("target ").append(mode.getTargets().get(0).getTargetName()); sb.append("target ").append(mode.getTargets().get(0).getTargetName());
} }
@ -90,11 +89,11 @@ public class CreateTokenTargetEffect extends OneShotEffect {
} }
sb.append(token.getDescription()); sb.append(token.getDescription());
if (token.getDescription().endsWith("token")) { if (token.getDescription().endsWith("token")) {
sb.append("s "); sb.append("s");
} }
int tokenLocation = sb.indexOf("token "); int tokenLocation = sb.indexOf("token");
if (tokenLocation != -1) { if (tokenLocation != -1) {
sb.replace(tokenLocation, tokenLocation + 6, "tokens "); sb.replace(tokenLocation, tokenLocation + 6, "tokens");
} }
} }
if (attacking) { if (attacking) {

View file

@ -160,6 +160,7 @@ public class DoIfCostPaid extends OneShotEffect {
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("discard") && !costText.toLowerCase(Locale.ENGLISH).startsWith("discard")
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("sacrifice") && !costText.toLowerCase(Locale.ENGLISH).startsWith("sacrifice")
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("remove") && !costText.toLowerCase(Locale.ENGLISH).startsWith("remove")
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("tap")
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("pay")) { && !costText.toLowerCase(Locale.ENGLISH).startsWith("pay")) {
sb.append("pay "); sb.append("pay ");
} }

View file

@ -86,6 +86,7 @@ public class DoWhenCostPaid extends OneShotEffect {
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("discard") && !costText.toLowerCase(Locale.ENGLISH).startsWith("discard")
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("sacrifice") && !costText.toLowerCase(Locale.ENGLISH).startsWith("sacrifice")
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("remove") && !costText.toLowerCase(Locale.ENGLISH).startsWith("remove")
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("tap")
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("pay")) { && !costText.toLowerCase(Locale.ENGLISH).startsWith("pay")) {
sb.append("pay "); sb.append("pay ");
} }

View file

@ -88,7 +88,8 @@ public class SacrificeAllEffect extends OneShotEffect {
sb.append(amount.toString()); sb.append(amount.toString());
sb.append(' '); sb.append(' ');
} else if (!filter.getMessage().startsWith("a ")) { } else if (!filter.getMessage().startsWith("a ")) {
sb.append(CardUtil.numberToText(amount.toString(), "a ")); sb.append(CardUtil.numberToText(amount.toString(), "a"));
sb.append(' ');
} }
sb.append(filter.getMessage()); sb.append(filter.getMessage());
staticText = sb.toString(); staticText = sb.toString();

View file

@ -1,6 +1,5 @@
package mage.abilities.effects.common; package mage.abilities.effects.common;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.dynamicvalue.common.StaticValue;
@ -15,8 +14,9 @@ import mage.target.Target;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.UUID;
/** /**
*
* @author maurer.it_at_gmail.com * @author maurer.it_at_gmail.com
*/ */
public class SacrificeEffect extends OneShotEffect { public class SacrificeEffect extends OneShotEffect {
@ -98,7 +98,9 @@ public class SacrificeEffect extends OneShotEffect {
sb.append(" sacrifice "); sb.append(" sacrifice ");
} }
} }
sb.append(CardUtil.numberToText(count.toString(), "a")).append(' '); if (!filter.getMessage().startsWith("another")) {
sb.append(CardUtil.numberToText(count.toString(), "a")).append(' ');
}
sb.append(filter.getMessage()); sb.append(filter.getMessage());
staticText = sb.toString(); staticText = sb.toString();
} }