[LTR] [LTC] Text fixes (#10569)

This commit is contained in:
xenohedron 2023-07-06 00:24:12 -04:00 committed by GitHub
parent 1ccaf06366
commit e50f8b05c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 113 additions and 145 deletions

View file

@ -52,7 +52,7 @@ public final class AragornAndArwenWed extends CardImpl {
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility( Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(
new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter) new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter)
); );
ability.addEffect(new GainLifeEffect(xValue)); ability.addEffect(new GainLifeEffect(xValue).setText("you gain 1 life for each other creature you control"));
ability.addHint(hint); ability.addHint(hint);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -23,7 +23,7 @@ public final class BombadilsSong extends CardImpl {
this.getSpellAbility().addEffect(new BoostTargetEffect(1, 1) this.getSpellAbility().addEffect(new BoostTargetEffect(1, 1)
.setText("target creature you control gets +1/+1")); .setText("target creature you control gets +1/+1"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance()) this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance())
.setText("and gains hexproof until the end of turn")); .setText("and gains hexproof until end of turn"));
this.getSpellAbility().addEffect(new TheRingTemptsYouEffect()); this.getSpellAbility().addEffect(new TheRingTemptsYouEffect());
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
} }

View file

@ -1,4 +1,3 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID; import java.util.UUID;
@ -11,7 +10,7 @@ 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.common.FilterControlledCreaturePermanent; import mage.filter.StaticFilters;
/** /**
* *
@ -28,7 +27,7 @@ public final class CombatCelebrant extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// If Combat Celebrant hasn't been exerted this turn, you may exert it as it attacks. When you do, untap all other creatures you control and after this phase, there is an additional combat phase. // If Combat Celebrant hasn't been exerted this turn, you may exert it as it attacks. When you do, untap all other creatures you control and after this phase, there is an additional combat phase.
BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), null, false)); BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(new UntapAllControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURES, null, false));
ability.addEffect(new AdditionalCombatPhaseEffect("and after this phase, there is an additional combat phase")); ability.addEffect(new AdditionalCombatPhaseEffect("and after this phase, there is an additional combat phase"));
this.addAbility(new ExertAbility(ability, true)); this.addAbility(new ExertAbility(ability, true));
} }

View file

@ -30,7 +30,7 @@ public final class CourtOfIre extends CardImpl {
Ability ability = new BeginningOfUpkeepTriggeredAbility(new ConditionalOneShotEffect( Ability ability = new BeginningOfUpkeepTriggeredAbility(new ConditionalOneShotEffect(
new DamageTargetEffect(7), new DamageTargetEffect(2), new DamageTargetEffect(7), new DamageTargetEffect(2),
MonarchIsSourceControllerCondition.instance, "{this} deals 2 damage to any target. " + MonarchIsSourceControllerCondition.instance, "{this} deals 2 damage to any target. " +
"If you're the monarch, it deals 7 damage to that player or permanent instead" "If you're the monarch, it deals 7 damage instead"
), TargetController.YOU, false); ), TargetController.YOU, false);
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);

View file

@ -33,7 +33,7 @@ public final class DawnOfANewAge extends CardImpl {
DynamicValue numberCounters = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED); DynamicValue numberCounters = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED);
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect( this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(
CounterType.HOPE.createInstance(0), numberCounters, true), CounterType.HOPE.createInstance(0), numberCounters, true),
"with a Hope counter on it for each creature you control") "with a hope counter on it for each creature you control")
); );
// At the beginning of your end step, remove a hope counter from Dawn of a New Age. If you do, draw a card. Then if Dawn of a New Age has no hope counters on it, sacrifice it and you gain 4 life. // At the beginning of your end step, remove a hope counter from Dawn of a New Age. If you do, draw a card. Then if Dawn of a New Age has no hope counters on it, sacrifice it and you gain 4 life.

View file

@ -67,6 +67,7 @@ public final class EowynShieldmaiden extends CardImpl {
+ "under your control this turn, create two " + "under your control this turn, create two "
+ "2/2 red Human Knight creature tokens with " + "2/2 red Human Knight creature tokens with "
+ "trample and haste. " + "trample and haste. "
+ "Then if you control six or more Humans, draw a card."
), new EowynShieldmaidenWatcher()); ), new EowynShieldmaidenWatcher());
} }
@ -140,7 +141,7 @@ class EowynShieldmaidenWatcher extends Watcher {
Set<MageObjectReference> setForThePlayer = this.humanEnterings.getOrDefault(playerId, new HashSet<>()); Set<MageObjectReference> setForThePlayer = this.humanEnterings.getOrDefault(playerId, new HashSet<>());
return setForThePlayer.stream().anyMatch( return setForThePlayer.stream().anyMatch(
humanMOR -> sourceMOR == null || !(humanMOR.equals(sourceMOR)) humanMOR -> !(humanMOR.equals(sourceMOR))
); );
} }
} }

View file

@ -45,7 +45,7 @@ public final class FealtyToTheRealm extends CardImpl {
Ability ability = new SimpleStaticAbility( Ability ability = new SimpleStaticAbility(
new AttacksIfAbleAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.AURA) new AttacksIfAbleAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.AURA)
); );
ability.addEffect(new CantAttackControllerAttachedEffect(AttachmentType.AURA, false)); ability.addEffect(new CantAttackControllerAttachedEffect(AttachmentType.AURA, false).setText("and can't attack you"));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,4 +1,3 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID; import java.util.UUID;
@ -13,8 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.target.Target; import mage.target.Target;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
@ -22,11 +20,6 @@ import mage.target.TargetPermanent;
* @author nantuko * @author nantuko
*/ */
public final class FiendHunter extends CardImpl { public final class FiendHunter extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {
filter.add(AnotherPredicate.instance);
}
public FiendHunter(UUID ownerId, CardSetInfo setInfo) { public FiendHunter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}");
@ -38,7 +31,7 @@ public final class FiendHunter extends CardImpl {
// When Fiend Hunter enters the battlefield, you may exile another target creature. // When Fiend Hunter enters the battlefield, you may exile another target creature.
Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), true); Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), true);
Target target = new TargetPermanent(filter); Target target = new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE);
ability1.addTarget(target); ability1.addTarget(target);
this.addAbility(ability1); this.addAbility(ability1);

View file

@ -36,7 +36,7 @@ public final class FloweringOfTheWhiteTree extends CardImpl {
// Legendary creatures you control get +2/+1 and have ward {1}. // Legendary creatures you control get +2/+1 and have ward {1}.
Ability ability = new SimpleStaticAbility(new BoostControlledEffect( Ability ability = new SimpleStaticAbility(new BoostControlledEffect(
2, 1, Duration.WhileOnBattlefield, 2, 1, Duration.WhileOnBattlefield,
StaticFilters.FILTER_CREATURE_LEGENDARY StaticFilters.FILTER_CREATURES_LEGENDARY
)); ));
ability.addEffect(new GainAbilityControlledEffect( ability.addEffect(new GainAbilityControlledEffect(
new WardAbility(new GenericManaCost(1)), Duration.WhileOnBattlefield, new WardAbility(new GenericManaCost(1)), Duration.WhileOnBattlefield,

View file

@ -34,7 +34,7 @@ public final class ForthEorlingas extends CardImpl {
)); ));
// Whenever one or more creatures you control deal combat damage to one or more players this turn, you become the monarch. // Whenever one or more creatures you control deal combat damage to one or more players this turn, you become the monarch.
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new ForthEorlingasTriggeredAbility())); this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new ForthEorlingasTriggeredAbility()).concatBy("<br>"));
} }
private ForthEorlingas(final ForthEorlingas card) { private ForthEorlingas(final ForthEorlingas card) {

View file

@ -90,7 +90,7 @@ class FrontierWarmongerTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public String getRule() { public String getRule() {
return "Whenever one or more creatures attack an opponent or a planeswalker an opponent controls, " + return "Whenever one or more creatures attack one of your opponents or a planeswalker they control, " +
"those creatures gain menace until end of turn."; "those creatures gain menace until end of turn.";
} }
} }

View file

@ -22,7 +22,7 @@ import java.util.UUID;
public final class GaladhrimAmbush extends CardImpl { public final class GaladhrimAmbush extends CardImpl {
private static final DynamicValue xValue = new AttackingCreatureCount(); private static final DynamicValue xValue = new AttackingCreatureCount();
private static final FilterPermanent filter = new FilterCreaturePermanent("non-Elf creaetures"); private static final FilterPermanent filter = new FilterCreaturePermanent("non-Elf creatures");
static { static {
filter.add(Predicates.not(SubType.ELF.getPredicate())); filter.add(Predicates.not(SubType.ELF.getPredicate()));
@ -32,12 +32,13 @@ public final class GaladhrimAmbush extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}");
// Create X 1/1 green Elf Warrior creature tokens, where X is the number of attacking creatures. // Create X 1/1 green Elf Warrior creature tokens, where X is the number of attacking creatures.
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfWarriorToken(), xValue)); this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfWarriorToken(), xValue)
.setText("create X 1/1 green Elf Warrior creature tokens, where X is the number of attacking creatures"));
// Prevent all combat damage that would be dealt this turn by non-Elf creatures. // Prevent all combat damage that would be dealt this turn by non-Elf creatures.
this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect( this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(
filter, Duration.EndOfTurn, true filter, Duration.EndOfTurn, true
)); ).concatBy("<br>"));
} }
private GaladhrimAmbush(final GaladhrimAmbush card) { private GaladhrimAmbush(final GaladhrimAmbush card) {

View file

@ -53,7 +53,7 @@ class GaladrielOfLothlorienEffect extends OneShotEffect {
GaladrielOfLothlorienEffect() { GaladrielOfLothlorienEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "reveal the top card of your library. If a land card is revealed this way, put it onto the battlefield tapped"; staticText = "you may reveal the top card of your library. If a land card is revealed this way, put it onto the battlefield tapped";
} }
private GaladrielOfLothlorienEffect(final GaladrielOfLothlorienEffect effect) { private GaladrielOfLothlorienEffect(final GaladrielOfLothlorienEffect effect) {

View file

@ -39,7 +39,7 @@ public final class GimliCounterOfKills extends CardImpl {
// Whenever a creature an opponent controls dies, Gimli, Counter of Kills deals 1 damage to that creature's controller. // Whenever a creature an opponent controls dies, Gimli, Counter of Kills deals 1 damage to that creature's controller.
this.addAbility(new DiesCreatureTriggeredAbility( this.addAbility(new DiesCreatureTriggeredAbility(
new GimliMournfulAvengerEffect(), false, new GimliCounterOfKillsEffect(), false,
StaticFilters.FILTER_OPPONENTS_PERMANENT_A_CREATURE StaticFilters.FILTER_OPPONENTS_PERMANENT_A_CREATURE
)); ));
} }

View file

@ -72,7 +72,7 @@ class GoblinDarkDwellersEffect extends OneShotEffect {
super(Outcome.PlayForFree); super(Outcome.PlayForFree);
this.staticText = "you may cast target instant or sorcery card with " this.staticText = "you may cast target instant or sorcery card with "
+ "mana value 3 or less from your graveyard without paying its mana cost. " + "mana value 3 or less from your graveyard without paying its mana cost. "
+ "If that spell would be put into your graveyard this turn, exile it instead"; + "If that spell would be put into your graveyard, exile it instead";
} }
GoblinDarkDwellersEffect(final GoblinDarkDwellersEffect effect) { GoblinDarkDwellersEffect(final GoblinDarkDwellersEffect effect) {
@ -92,7 +92,7 @@ class GoblinDarkDwellersEffect extends OneShotEffect {
if (card != null) { if (card != null) {
if (controller.chooseUse(Outcome.PlayForFree, "Cast " + card.getLogName() + '?', source, game)) { if (controller.chooseUse(Outcome.PlayForFree, "Cast " + card.getLogName() + '?', source, game)) {
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE); game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);
Boolean cardWasCast = controller.cast(controller.chooseAbilityForCast(card, game, true), boolean cardWasCast = controller.cast(controller.chooseAbilityForCast(card, game, true),
game, true, new ApprovingObject(source, game)); game, true, new ApprovingObject(source, game));
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null); game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null);
if (cardWasCast) { if (cardWasCast) {

View file

@ -60,7 +60,7 @@ class GreatOakGuardianEffect extends ContinuousEffectImpl {
public GreatOakGuardianEffect() { public GreatOakGuardianEffect() {
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
staticText = "creatures target player controls get +2/+2 until end of turn. Untap them"; staticText = "creatures target player controls get +2/+2 until end of turn";
} }
public GreatOakGuardianEffect(final GreatOakGuardianEffect effect) { public GreatOakGuardianEffect(final GreatOakGuardianEffect effect) {

View file

@ -3,6 +3,7 @@ package mage.cards.g;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -23,6 +24,9 @@ public final class GreyHavensNavigator extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// Flash
this.addAbility(FlashAbility.getInstance());
// When Grey Havens Navigator enters the battlefield, scry 1. // When Grey Havens Navigator enters the battlefield, scry 1.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(1, false))); this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(1, false)));
} }

View file

@ -2,8 +2,8 @@ package mage.cards.h;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.dynamicvalue.common.CountersSourceCount;
@ -42,7 +42,7 @@ public final class HaldirLorienLieutenant extends CardImpl {
this.toughness = new MageInt(0); this.toughness = new MageInt(0);
// Haldir, Lorien Lieutenant enters the battlefield with X +1/+1 counters on it. // Haldir, Lorien Lieutenant enters the battlefield with X +1/+1 counters on it.
this.addAbility(new SimpleStaticAbility( this.addAbility(new EntersBattlefieldAbility(
new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()) new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance())
)); ));

View file

@ -49,7 +49,7 @@ public final class HauntOfTheDeadMarshes extends CardImpl {
// {2}{B}: Return Haunt of the Dead Marshes from your graveyard to the battlefield tapped. Activate only if you control a legendary creature. // {2}{B}: Return Haunt of the Dead Marshes from your graveyard to the battlefield tapped. Activate only if you control a legendary creature.
this.addAbility(new ConditionalActivatedAbility( this.addAbility(new ConditionalActivatedAbility(
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true, false),
new ManaCostsImpl<>("{2}{B}"), condition new ManaCostsImpl<>("{2}{B}"), condition
).addHint(hint)); ).addHint(hint));
} }

View file

@ -40,7 +40,9 @@ public final class HornOfGondor extends CardImpl {
// {3}, {T}: Create X 1/1 white Human Soldier creature tokens, where X is the number of Humans you control. // {3}, {T}: Create X 1/1 white Human Soldier creature tokens, where X is the number of Humans you control.
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
new CreateTokenEffect(new HumanSoldierToken(), xValue), new GenericManaCost(3) new CreateTokenEffect(new HumanSoldierToken(), xValue)
.setText("create X 1/1 white Human Soldier creature tokens, where X is the number of Humans you control"),
new GenericManaCost(3)
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability.addHint(hint)); this.addAbility(ability.addHint(hint));

View file

@ -31,7 +31,7 @@ public final class IsildursFatefulStrike extends CardImpl {
this.supertype.add(SuperType.LEGENDARY); this.supertype.add(SuperType.LEGENDARY);
// (You may cast a legendary instant only if you control a legendary creature or planeswalker.) // (You may cast a legendary instant only if you control a legendary creature or planeswalker.)
this.addAbility(new LegendarySpellAbility()); this.addAbility(new LegendarySpellAbility(true));
// Destroy target creature. If its controller has more than four cards in hand, they exile cards from their hand equal to the difference. // Destroy target creature. If its controller has more than four cards in hand, they exile cards from their hand equal to the difference.
this.getSpellAbility().addEffect(new IsildursFatefulStrikeEffect()); this.getSpellAbility().addEffect(new IsildursFatefulStrikeEffect());

View file

@ -3,6 +3,7 @@ package mage.cards.i;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.DiesSourceTriggeredAbility; import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -22,6 +23,9 @@ public final class IthilienKingfisher extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Ithilien Kingfisher dies, draw a card. // When Ithilien Kingfisher dies, draw a card.
this.addAbility(new DiesSourceTriggeredAbility(new DrawCardSourceControllerEffect(1))); this.addAbility(new DiesSourceTriggeredAbility(new DrawCardSourceControllerEffect(1)));
} }

View file

@ -61,6 +61,7 @@ class LandrovalHorizonWitnessTriggeredAbility extends TriggeredAbilityImpl {
LandrovalHorizonWitnessTriggeredAbility() { LandrovalHorizonWitnessTriggeredAbility() {
super(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); super(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
this.addTarget(new TargetPermanent(filter)); this.addTarget(new TargetPermanent(filter));
setTriggerPhrase("Whenever two or more creatures you control attack a player, ");
} }
private LandrovalHorizonWitnessTriggeredAbility(final LandrovalHorizonWitnessTriggeredAbility ability) { private LandrovalHorizonWitnessTriggeredAbility(final LandrovalHorizonWitnessTriggeredAbility ability) {

View file

@ -36,7 +36,7 @@ public final class MirrorOfGaladriel extends CardImpl {
new ScryEffect(1, false), new GenericManaCost(5) new ScryEffect(1, false), new GenericManaCost(5)
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addEffect(new DrawCardSourceControllerEffect(1)); ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy(", then"));
ability.addEffect(new InfoEffect( ability.addEffect(new InfoEffect(
"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

@ -23,7 +23,7 @@ public final class MordorMuster extends CardImpl {
this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and")); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and"));
// Amass Orcs 1. // Amass Orcs 1.
this.getSpellAbility().addEffect(new AmassEffect(1, SubType.ORC)); this.getSpellAbility().addEffect(new AmassEffect(1, SubType.ORC).concatBy("<br>"));
} }
private MordorMuster(final MordorMuster card) { private MordorMuster(final MordorMuster card) {

View file

@ -20,7 +20,7 @@ import java.util.UUID;
*/ */
public final class MoriaMarauder extends CardImpl { public final class MoriaMarauder extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent("a Goblin or Orc"); private static final FilterPermanent filter = new FilterControlledPermanent("a Goblin or Orc you control");
static { static {
filter.add(Predicates.or( filter.add(Predicates.or(

View file

@ -5,7 +5,7 @@ import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.delayed.ReflexiveTriggeredAbility; import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
import mage.abilities.costs.OrCost; import mage.abilities.costs.OrCost;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DoWhenCostPaid; import mage.abilities.effects.common.DoWhenCostPaid;
import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -32,12 +32,12 @@ public final class NimbleHobbit extends CardImpl {
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Whenever Nimble Hobbit attacks, you may sacrifice a Food or pay {2}. When you do, tap target creature an opponent controls. // Whenever Nimble Hobbit attacks, you may sacrifice a Food or pay {2}{W}. When you do, tap target creature an opponent controls.
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new TapTargetEffect(), false); ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new TapTargetEffect(), false);
ability.addTarget(new TargetOpponentsCreaturePermanent()); ability.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(new AttacksTriggeredAbility(new DoWhenCostPaid( this.addAbility(new AttacksTriggeredAbility(new DoWhenCostPaid(
ability, new OrCost("sacrifice a Food or pay {2}", ability, new OrCost("sacrifice a Food or pay {2}{W}",
new SacrificeTargetCost(filter), new GenericManaCost(2) new SacrificeTargetCost(filter), new ManaCostsImpl<>("{2}{W}")
), "Pay the cost?"))); ), "Pay the cost?")));
} }

View file

@ -50,7 +50,7 @@ class OrcishMedicineEffect extends OneShotEffect {
OrcishMedicineEffect() { OrcishMedicineEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = ""; staticText = "target creature gains your choice of lifelink or indestructible until end of turn";
} }
private OrcishMedicineEffect(final OrcishMedicineEffect effect) { private OrcishMedicineEffect(final OrcishMedicineEffect effect) {

View file

@ -1,19 +1,13 @@
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.SacrificeEffect;
import mage.cards.CardImpl; 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.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent; import java.util.UUID;
import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetControlledPermanent;
/** /**
* *
@ -27,7 +21,7 @@ public final class PerilousResearch extends CardImpl {
// Draw two cards, then sacrifice a permanent. // Draw two cards, then sacrifice a permanent.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
this.getSpellAbility().addEffect(new PerilousResearchEffect()); this.getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_A, 1, ", then"));
} }
private PerilousResearch(final PerilousResearch card) { private PerilousResearch(final PerilousResearch card) {
@ -39,36 +33,3 @@ public final class PerilousResearch extends CardImpl {
return new PerilousResearch(this); return new PerilousResearch(this);
} }
} }
class PerilousResearchEffect extends OneShotEffect {
public PerilousResearchEffect() {
super(Outcome.Sacrifice);
this.staticText = "then sacrifice a permanent";
}
public PerilousResearchEffect(final PerilousResearchEffect effect) {
super(effect);
}
@Override
public PerilousResearchEffect copy() {
return new PerilousResearchEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
Target target = new TargetControlledPermanent();
if (target.canChoose(player.getId(), source, game) && player.choose(Outcome.Sacrifice, target, source, game)) {
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null) {
return permanent.sacrifice(source, game);
}
}
}
return false;
}
}

View file

@ -38,7 +38,7 @@ public final class RelicOfSauron extends CardImpl {
new GenericManaCost(3) new GenericManaCost(3)
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addEffect(new DiscardControllerEffect(1)); ability.addEffect(new DiscardControllerEffect(1).concatBy(", then"));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -21,7 +21,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AnotherPredicate; import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
@ -39,8 +39,8 @@ import java.util.*;
*/ */
public final class ShelobChildOfUngoliant extends CardImpl { public final class ShelobChildOfUngoliant extends CardImpl {
private static FilterControlledCreaturePermanent filterSpiders = private static final FilterControlledPermanent filterSpiders =
new FilterControlledCreaturePermanent(SubType.SPIDER, "other spiders you control"); new FilterControlledPermanent(SubType.SPIDER, "other Spiders");
static { static {
filterSpiders.add(AnotherPredicate.instance); filterSpiders.add(AnotherPredicate.instance);
@ -65,7 +65,7 @@ public final class ShelobChildOfUngoliant extends CardImpl {
Ability buff = new SimpleStaticAbility(new GainAbilityControlledEffect( Ability buff = new SimpleStaticAbility(new GainAbilityControlledEffect(
DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield,
filterSpiders filterSpiders
).setText("other Spiders you control have deathtouch")); ));
buff.addEffect(new GainAbilityControlledEffect( buff.addEffect(new GainAbilityControlledEffect(
new WardAbility(new ManaCostsImpl<>("{2}")), Duration.WhileOnBattlefield, new WardAbility(new ManaCostsImpl<>("{2}")), Duration.WhileOnBattlefield,
filterSpiders filterSpiders
@ -93,8 +93,8 @@ public final class ShelobChildOfUngoliant extends CardImpl {
} }
class ShelobChildOfUngoliantWatcher extends Watcher { class ShelobChildOfUngoliantWatcher extends Watcher {
private static FilterControlledCreaturePermanent spiderFilter = private static final FilterControlledPermanent spiderFilter =
new FilterControlledCreaturePermanent(SubType.SPIDER,"spiders you controlled"); new FilterControlledPermanent(SubType.SPIDER,"spiders you controlled");
// We store every permanent, as a non-creature may be dealt damage, // We store every permanent, as a non-creature may be dealt damage,
// then become a creature then die. // then become a creature then die.

View file

@ -1,9 +1,8 @@
package mage.cards.s; package mage.cards.s;
import mage.MageInt; import mage.MageInt;
import mage.Mana;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.mana.BasicManaEffect; import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.DefenderAbility;
import mage.abilities.mana.ActivateOncePerTurnManaAbility; import mage.abilities.mana.ActivateOncePerTurnManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -31,7 +30,7 @@ public final class ShireScarecrow extends CardImpl {
// {1}: Add one mana of any color. Activate only once each turn. // {1}: Add one mana of any color. Activate only once each turn.
this.addAbility(new ActivateOncePerTurnManaAbility( this.addAbility(new ActivateOncePerTurnManaAbility(
Zone.BATTLEFIELD, new BasicManaEffect(Mana.AnyMana(1)), new GenericManaCost(1) Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new GenericManaCost(1)
)); ));
} }

View file

@ -45,7 +45,7 @@ public final class ShireShirriff extends CardImpl {
// When you do, exile target creature an opponent controls until Shire Shirriff leaves the battlefield. // When you do, exile target creature an opponent controls until Shire Shirriff leaves the battlefield.
ReflexiveTriggeredAbility reflexive = new ReflexiveTriggeredAbility( ReflexiveTriggeredAbility reflexive = new ReflexiveTriggeredAbility(
new ExileUntilSourceLeavesEffect(), false, new ExileUntilSourceLeavesEffect(), false,
"exile target creature an opponent controls until {this} leaves the battlefield." "exile target creature an opponent controls until {this} leaves the battlefield"
); );
reflexive.addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE)); reflexive.addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));

View file

@ -52,7 +52,7 @@ public final class SongOfEarendil extends CardImpl {
this, SagaChapter.CHAPTER_II, this, SagaChapter.CHAPTER_II,
new CreateTokenEffect(new TreasureToken()), new CreateTokenEffect(new TreasureToken()),
new CreateTokenEffect(new SwanSongBirdToken()) new CreateTokenEffect(new SwanSongBirdToken())
.concatBy("and a 2/2 blue Bird creature token with flying") .setText("and a 2/2 blue Bird creature token with flying")
); );
// III-- Put a flying counter on each creature you control without flying. // III-- Put a flying counter on each creature you control without flying.

View file

@ -34,7 +34,7 @@ public final class SulfurFalls extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = " tapped unless you control a Island or a Mountain"; String abilityText = " tapped unless you control an Island or a Mountain";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());

View file

@ -48,7 +48,7 @@ public final class TaleOfTinuviel extends CardImpl {
sagaAbility.addChapterEffect( sagaAbility.addChapterEffect(
this, SagaChapter.CHAPTER_III, SagaChapter.CHAPTER_III, this, SagaChapter.CHAPTER_III, SagaChapter.CHAPTER_III,
new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn), new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn),
new TargetControlledCreaturePermanent(0, 2) new TargetControlledCreaturePermanent(0, 2, StaticFilters.FILTER_CONTROLLED_CREATURES, false)
); );
this.addAbility(sagaAbility); this.addAbility(sagaAbility);
} }

View file

@ -32,7 +32,7 @@ public final class TheBattleOfBywater extends CardImpl {
this.getSpellAbility().addEffect(new DestroyAllEffect(filter)); this.getSpellAbility().addEffect(new DestroyAllEffect(filter));
this.getSpellAbility().addEffect(new CreateTokenEffect( this.getSpellAbility().addEffect(new CreateTokenEffect(
new FoodToken(), CreaturesYouControlCount.instance new FoodToken(), CreaturesYouControlCount.instance
).concatBy("Then")); ).setText("Then create a Food token for each creature you control"));
} }
private TheBattleOfBywater(final TheBattleOfBywater card) { private TheBattleOfBywater(final TheBattleOfBywater card) {

View file

@ -1,22 +1,17 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.mana.AnyColorCardInYourGraveyardManaAbility; import mage.abilities.mana.AnyColorCardInYourGraveyardManaAbility;
import mage.abilities.mana.AnyColorPermanentTypesManaAbility;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
import mage.abilities.mana.ConditionalAnyColorManaAbility;
import mage.constants.SuperType;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.TargetController; import mage.constants.SuperType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
/** /**
* *
@ -24,7 +19,7 @@ import mage.filter.common.FilterCreaturePermanent;
*/ */
public final class TheGreyHavens extends CardImpl { public final class TheGreyHavens extends CardImpl {
private static final FilterCard filter = new FilterCreatureCard("legendary creature card"); private static final FilterCard filter = new FilterCreatureCard("legendary creature cards");
static { static {
filter.add(SuperType.LEGENDARY.getPredicate()); filter.add(SuperType.LEGENDARY.getPredicate());

View file

@ -57,7 +57,7 @@ public final class TheOneRing extends CardImpl {
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
new AddCountersSourceEffect(CounterType.BURDEN.createInstance()), new TapSourceCost() new AddCountersSourceEffect(CounterType.BURDEN.createInstance()), new TapSourceCost()
); );
ability.addEffect(new DrawCardSourceControllerEffect(xValue)); ability.addEffect(new DrawCardSourceControllerEffect(xValue).concatBy(", then"));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -32,7 +32,7 @@ import java.util.UUID;
*/ */
public final class TheWatcherInTheWater extends CardImpl { public final class TheWatcherInTheWater extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.TENTACLE); private static final FilterPermanent filter = new FilterControlledPermanent(SubType.TENTACLE, "a Tentacle you control");
private static final FilterPermanent filter2 = new FilterPermanent(SubType.KRAKEN, "Kraken"); private static final FilterPermanent filter2 = new FilterPermanent(SubType.KRAKEN, "Kraken");
public TheWatcherInTheWater(UUID ownerId, CardSetInfo setInfo) { public TheWatcherInTheWater(UUID ownerId, CardSetInfo setInfo) {

View file

@ -26,7 +26,6 @@ import mage.filter.common.FilterControlledPermanent;
import mage.game.Game; 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.game.stack.StackObject;
import mage.players.Player; import mage.players.Player;
import mage.util.CardUtil; import mage.util.CardUtil;
import mage.abilities.hint.common.CountersOnPermanentsHint; import mage.abilities.hint.common.CountersOnPermanentsHint;
@ -81,6 +80,7 @@ class TomBombadilTriggeredAbility extends TriggeredAbilityImpl {
public TomBombadilTriggeredAbility() { public TomBombadilTriggeredAbility() {
super(Zone.BATTLEFIELD, new TomBombadilEffect(), false); super(Zone.BATTLEFIELD, new TomBombadilEffect(), false);
setTriggerPhrase("Whenever the final chapter ability of a Saga you control resolves, ");
} }
public TomBombadilTriggeredAbility(final TomBombadilTriggeredAbility ability) { public TomBombadilTriggeredAbility(final TomBombadilTriggeredAbility ability) {
@ -139,10 +139,6 @@ class TomBombadilTriggeredAbility extends TriggeredAbilityImpl {
return SagaAbility.isFinalAbility(triggeredAbility, maxChapter); return SagaAbility.isFinalAbility(triggeredAbility, maxChapter);
} }
@Override
public String getRule() {
return "Whenever the final chapter ability of a Saga you control resolves, reveal cards from the top of your library until you reveal a Saga card. Put that card onto the battlefield and the rest on the bottom of your library in a random order.";
}
} }
// From PrismaticBridgeEffect // From PrismaticBridgeEffect

View file

@ -83,7 +83,7 @@ class TreasureNabberAbility extends TriggeredAbilityImpl {
@Override @Override
public String getRule() { public String getRule() {
return "Whenever an opponent taps an artifact for mana, gain control of that artifact until the end of your next turn"; return "Whenever an opponent taps an artifact for mana, gain control of that artifact until the end of your next turn.";
} }
} }

View file

@ -59,7 +59,7 @@ class VoraciousFellBeastEffect extends OneShotEffect {
VoraciousFellBeastEffect() { VoraciousFellBeastEffect() {
super(Outcome.Sacrifice); super(Outcome.Sacrifice);
this.staticText = "Each opponent sacrifices a creature. " + this.staticText = "each opponent sacrifices a creature. " +
"Create a Food token for each creature sacrificed this way"; "Create a Food token for each creature sacrificed this way";
} }

View file

@ -26,7 +26,7 @@ import java.util.UUID;
public final class WitchKingOfAngmar extends CardImpl { public final class WitchKingOfAngmar extends CardImpl {
private static final FilterCreaturePermanent filter private static final FilterCreaturePermanent filter
= new FilterCreaturePermanent("creature that dealt combat damage to this ability's controller this turn"); = new FilterCreaturePermanent("creature that dealt combat damage to that opponent this turn");
static { static {
filter.add(new DamagedPlayerThisTurnPredicate(TargetController.SOURCE_CONTROLLER, true)); filter.add(new DamagedPlayerThisTurnPredicate(TargetController.SOURCE_CONTROLLER, true));
@ -46,7 +46,8 @@ public final class WitchKingOfAngmar extends CardImpl {
// Whenever one or more creatures deal combat damage to you, each opponent sacrifices a creature that dealt combat damage to you this turn. The Ring tempts you. // Whenever one or more creatures deal combat damage to you, each opponent sacrifices a creature that dealt combat damage to you this turn. The Ring tempts you.
{ {
Ability ability = new CombatDamageDealtToYouTriggeredAbility(new SacrificeOpponentsEffect(filter)); Ability ability = new CombatDamageDealtToYouTriggeredAbility(new SacrificeOpponentsEffect(filter)
.setText("each opponent sacrifices a creature that dealt combat damage to you this turn"));
ability.addEffect(new TheRingTemptsYouEffect()); ability.addEffect(new TheRingTemptsYouEffect());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -57,7 +57,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_CODES = "MAT"; // check ability text due mtgjson, can use multiple sets like MAT;CMD or * for all private static final String FULL_ABILITIES_CHECK_SET_CODES = "LTR;LTC"; // 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 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 private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run

View file

@ -41,7 +41,7 @@ public class AttacksWithCreaturesTriggeredAbility extends TriggeredAbilityImpl {
this.filter = filter; this.filter = filter;
this.minAttackers = minAttackers; this.minAttackers = minAttackers;
this.setTargetPointer = setTargetPointer; this.setTargetPointer = setTargetPointer;
if (minAttackers == 1) { if (minAttackers == 1 && StaticFilters.FILTER_PERMANENT_CREATURES.equals(filter)) {
setTriggerPhrase("Whenever you attack, "); setTriggerPhrase("Whenever you attack, ");
} else { } else {
StringBuilder sb = new StringBuilder("Whenever you attack with "); StringBuilder sb = new StringBuilder("Whenever you attack with ");

View file

@ -129,15 +129,14 @@ public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl {
case ENCHANTED: case ENCHANTED:
return "At the beginning of enchanted player's end step, " + generateConditionString(); return "At the beginning of enchanted player's end step, " + generateConditionString();
case MONARCH: case MONARCH:
return "At the beginning the monarch's end step, " + generateConditionString(); return "At the beginning of the monarch's end step, " + generateConditionString();
} }
return ""; return "";
} }
private String generateConditionString() { private String generateConditionString() {
if (interveningIfClauseCondition == null) { if (interveningIfClauseCondition == null) {
switch (getZone()) { if (getZone() == Zone.GRAVEYARD) {
case GRAVEYARD:
return "if {this} is in your graveyard, "; return "if {this} is in your graveyard, ";
} }
return ""; return "";

View file

@ -26,7 +26,7 @@ public class BlocksOrBlockedByCreatureAttachedTriggeredAbility extends Triggered
public BlocksOrBlockedByCreatureAttachedTriggeredAbility(Effect effect, AttachmentType attachmentType, boolean selfTarget, boolean optional) { public BlocksOrBlockedByCreatureAttachedTriggeredAbility(Effect effect, AttachmentType attachmentType, boolean selfTarget, boolean optional) {
super(Zone.BATTLEFIELD, effect, optional); super(Zone.BATTLEFIELD, effect, optional);
setTriggerPhrase("Whenever " + attachmentType.verb().toLowerCase() + " creature blocks or becomes blocked, "); setTriggerPhrase("Whenever " + attachmentType.verb().toLowerCase() + " creature blocks or becomes blocked by a creature, ");
this.attachmentType = attachmentType; this.attachmentType = attachmentType;
this.selfTarget = selfTarget; this.selfTarget = selfTarget;
} }

View file

@ -14,7 +14,11 @@ import mage.game.events.GameEvent;
public class LegendarySpellAbility extends SimpleStaticAbility { public class LegendarySpellAbility extends SimpleStaticAbility {
public LegendarySpellAbility() { public LegendarySpellAbility() {
super(Zone.ALL, new LegendarySpellAbilityCheckEffect()); this(false);
}
public LegendarySpellAbility(boolean isInstant) {
super(Zone.ALL, new LegendarySpellAbilityCheckEffect(isInstant));
this.setRuleAtTheTop(true); this.setRuleAtTheTop(true);
} }
@ -44,9 +48,11 @@ class LegendarySpellAbilityCheckEffect extends ContinuousRuleModifyingEffectImpl
); );
} }
public LegendarySpellAbilityCheckEffect() { public LegendarySpellAbilityCheckEffect(boolean isInstant) {
super(Duration.EndOfGame, Outcome.Detriment); super(Duration.EndOfGame, Outcome.Detriment);
staticText = "<i>(You may cast a legendary sorcery only if you control a legendary creature or planeswalker.)</i>"; staticText = "<i>(You may cast a legendary " +
(isInstant ? "instant" : "sorcery") +
" only if you control a legendary creature or planeswalker.)</i>";
} }
private LegendarySpellAbilityCheckEffect(final LegendarySpellAbilityCheckEffect effect) { private LegendarySpellAbilityCheckEffect(final LegendarySpellAbilityCheckEffect effect) {

View file

@ -7,7 +7,6 @@ import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Layer; import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer; import mage.constants.SubLayer;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -82,7 +81,7 @@ public class BoostTargetEffect extends ContinuousEffectImpl {
return staticText; return staticText;
} }
return getTargetPointer().describeTargets(mode.getTargets(), "it") + return getTargetPointer().describeTargets(mode.getTargets(), "it") +
(getTargetPointer().isPlural(mode.getTargets()) ? " get " : " gets ") + (getTargetPointer().isPlural(mode.getTargets()) ? " each get " : " gets ") +
CardUtil.getBoostText(power, toughness, duration); CardUtil.getBoostText(power, toughness, duration);
} }
} }

View file

@ -139,11 +139,14 @@ public class GainControlTargetEffect extends ContinuousEffectImpl {
Target target = mode.getTargets().get(0); Target target = mode.getTargets().get(0);
StringBuilder sb = new StringBuilder("gain control of "); StringBuilder sb = new StringBuilder("gain control of ");
if (target.getMaxNumberOfTargets() > 1) { if (target.getMaxNumberOfTargets() > 1) {
if (target.getNumberOfTargets() < target.getMaxNumberOfTargets()) { if (target.getMinNumberOfTargets() == 0) {
sb.append("up to "); sb.append("up to ");
} }
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target "); sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ");
} else if (!target.getTargetName().startsWith("another")) { } else if (!target.getTargetName().startsWith("another")) {
if (target.getMinNumberOfTargets() == 0) {
sb.append("up to one ");
}
sb.append("target "); sb.append("target ");
} }
sb.append(mode.getTargets().get(0).getTargetName()); sb.append(mode.getTargets().get(0).getTargetName());

View file

@ -13,7 +13,6 @@ import mage.players.Player;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author LevelX2 * @author LevelX2
@ -180,7 +179,12 @@ public class AddManaInAnyCombinationEffect extends ManaEffect {
for (ColoredManaSymbol coloredManaSymbol : manaSymbols) { for (ColoredManaSymbol coloredManaSymbol : manaSymbols) {
i++; i++;
if (i > 1) { if (i > 1) {
if (i == manaSymbols.size()) {
sb.append(" and/or "); sb.append(" and/or ");
} else {
sb.append(", ");
}
} }
sb.append('{').append(coloredManaSymbol.toString()).append('}'); sb.append('{').append(coloredManaSymbol.toString()).append('}');
} }