diff --git a/Mage.Sets/src/mage/cards/a/AetherTide.java b/Mage.Sets/src/mage/cards/a/AetherTide.java
index 0e618dd4de..3ada4c22e5 100644
--- a/Mage.Sets/src/mage/cards/a/AetherTide.java
+++ b/Mage.Sets/src/mage/cards/a/AetherTide.java
@@ -29,7 +29,7 @@ public final class AetherTide extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{U}");
// As an additional cost to cast Aether Tide, discard X creature cards.
- Ability ability = new SimpleStaticAbility(Zone.ALL, new InfoEffect("As an additional cost to cast {this}, discard X creature cards"));
+ Ability ability = new SimpleStaticAbility(Zone.ALL, new InfoEffect("As an additional cost to cast this spell, discard X creature cards"));
ability.setRuleAtTheTop(true);
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/a/Avarax.java b/Mage.Sets/src/mage/cards/a/Avarax.java
index e52bbf93fd..7b8dc4ba36 100644
--- a/Mage.Sets/src/mage/cards/a/Avarax.java
+++ b/Mage.Sets/src/mage/cards/a/Avarax.java
@@ -1,7 +1,5 @@
-
package mage.cards.a;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
@@ -14,38 +12,41 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
-import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.target.common.TargetCardInLibrary;
+import java.util.UUID;
+
/**
- *
* @author fireshoes
*/
public final class Avarax extends CardImpl {
-
- private static final FilterCard filter = new FilterCard("card named Avarax");
+
+ private static final FilterCard filter = new FilterCard("a card named Avarax");
static {
filter.add(new NamePredicate("Avarax"));
}
public Avarax(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
this.subtype.add(SubType.BEAST);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Haste
this.addAbility(HasteAbility.getInstance());
-
+
// When Avarax enters the battlefield, you may search your library for a card named Avarax, reveal it, and put it into your hand. If you do, shuffle your library.
- TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter);
- this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true));
-
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(
+ new TargetCardInLibrary(1, filter), true, true
+ ), true));
+
// {1}{R}: Avarax gets +1/+0 until end of turn.
- this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}")));
+ this.addAbility(new SimpleActivatedAbility(
+ new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl<>("{1}{R}")
+ ));
}
private Avarax(final Avarax card) {
diff --git a/Mage.Sets/src/mage/cards/b/BrilliantSpectrum.java b/Mage.Sets/src/mage/cards/b/BrilliantSpectrum.java
index 1d0770ff19..352f72ef6d 100644
--- a/Mage.Sets/src/mage/cards/b/BrilliantSpectrum.java
+++ b/Mage.Sets/src/mage/cards/b/BrilliantSpectrum.java
@@ -23,7 +23,7 @@ public final class BrilliantSpectrum extends CardImpl {
// Converge — Draw X cards, where X is the number of colors of mana spent to cast Brilliant Spectrum. Then discard two cards.
this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE);
Effect effect = new DrawCardSourceControllerEffect(ColorsOfManaSpentToCastCount.getInstance());
- effect.setText("Draw X cards, where X is the number of colors of mana spent to cast {this}");
+ effect.setText("Draw X cards, where X is the number of colors of mana spent to cast this spell");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new DiscardControllerEffect(2));
}
diff --git a/Mage.Sets/src/mage/cards/b/BringToLight.java b/Mage.Sets/src/mage/cards/b/BringToLight.java
index 3d725bd97b..5e229d42f1 100644
--- a/Mage.Sets/src/mage/cards/b/BringToLight.java
+++ b/Mage.Sets/src/mage/cards/b/BringToLight.java
@@ -48,7 +48,7 @@ class BringToLightEffect extends OneShotEffect {
public BringToLightEffect() {
super(Outcome.PlayForFree);
this.staticText = "Converge — Search your library for a creature, instant, or sorcery card with mana "
- + "value less than or equal to the number of colors of mana spent to cast {this}, exile that card, "
+ + "value less than or equal to the number of colors of mana spent to cast this spell, exile that card, "
+ "then shuffle. You may cast that card without paying its mana cost";
}
diff --git a/Mage.Sets/src/mage/cards/b/BuriedAlive.java b/Mage.Sets/src/mage/cards/b/BuriedAlive.java
index 5ac713c96e..d9af2768d0 100644
--- a/Mage.Sets/src/mage/cards/b/BuriedAlive.java
+++ b/Mage.Sets/src/mage/cards/b/BuriedAlive.java
@@ -42,7 +42,7 @@ class BuriedAliveEffect extends SearchEffect {
public BuriedAliveEffect() {
super(new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_CREATURE), Outcome.Detriment);
- staticText = "Search your library for up to three creature cards and put them into your graveyard. Then shuffle";
+ staticText = "search your library for up to three creature cards, put them into your graveyard, then shuffle";
}
public BuriedAliveEffect(final BuriedAliveEffect effect) {
diff --git a/Mage.Sets/src/mage/cards/c/ConfiscationCoup.java b/Mage.Sets/src/mage/cards/c/ConfiscationCoup.java
index 720ec792b8..9cabe48287 100644
--- a/Mage.Sets/src/mage/cards/c/ConfiscationCoup.java
+++ b/Mage.Sets/src/mage/cards/c/ConfiscationCoup.java
@@ -56,7 +56,7 @@ class ConfiscationCoupEffect extends OneShotEffect {
public ConfiscationCoupEffect() {
super(Outcome.GainControl);
- this.staticText = "Choose target creature or artifact. You get {E}{E}{E}{E}, then you may pay an amount of {E} equal to that permanent's mana value. If you do, gain control of it";
+ this.staticText = "Choose target artifact or creature. You get {E}{E}{E}{E}, then you may pay an amount of {E} equal to that permanent's mana value. If you do, gain control of it";
}
public ConfiscationCoupEffect(final ConfiscationCoupEffect effect) {
diff --git a/Mage.Sets/src/mage/cards/d/DeathlessBehemoth.java b/Mage.Sets/src/mage/cards/d/DeathlessBehemoth.java
index 3042c77680..82432bbcc8 100644
--- a/Mage.Sets/src/mage/cards/d/DeathlessBehemoth.java
+++ b/Mage.Sets/src/mage/cards/d/DeathlessBehemoth.java
@@ -1,11 +1,9 @@
-
package mage.cards.d;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
-import mage.abilities.effects.common.ReturnToHandSourceEffect;
+import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -13,11 +11,11 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
-import mage.filter.predicate.Predicates;
import mage.target.common.TargetControlledPermanent;
+import java.util.UUID;
+
/**
- *
* @author fireshoes
*/
public final class DeathlessBehemoth extends CardImpl {
@@ -25,13 +23,12 @@ public final class DeathlessBehemoth extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Eldrazi Scions");
static {
- filter.add(Predicates.and(
- SubType.ELDRAZI.getPredicate(),
- SubType.SCION.getPredicate()));
+ filter.add(SubType.ELDRAZI.getPredicate());
+ filter.add(SubType.SCION.getPredicate());
}
public DeathlessBehemoth(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}");
this.subtype.add(SubType.ELDRAZI);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
@@ -40,8 +37,10 @@ public final class DeathlessBehemoth extends CardImpl {
this.addAbility(VigilanceAbility.getInstance());
// Sacrifice two Eldrazi Scions: Return Deathless Behemoth from your graveyard to your hand. Activate this ability only any time you could cast a sorcery.
- this.addAbility(new ActivateAsSorceryActivatedAbility(Zone.GRAVEYARD,
- new ReturnToHandSourceEffect(), new SacrificeTargetCost(new TargetControlledPermanent(2, 2, filter, true))));
+ this.addAbility(new ActivateAsSorceryActivatedAbility(
+ Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(),
+ new SacrificeTargetCost(new TargetControlledPermanent(2, filter))
+ ));
}
private DeathlessBehemoth(final DeathlessBehemoth card) {
diff --git a/Mage.Sets/src/mage/cards/e/EmrakulsInfluence.java b/Mage.Sets/src/mage/cards/e/EmrakulsInfluence.java
index d0434d953e..41c2855aae 100644
--- a/Mage.Sets/src/mage/cards/e/EmrakulsInfluence.java
+++ b/Mage.Sets/src/mage/cards/e/EmrakulsInfluence.java
@@ -18,7 +18,7 @@ import mage.filter.predicate.mageobject.ManaValuePredicate;
*/
public final class EmrakulsInfluence extends CardImpl {
- private static final FilterSpell filterSpell = new FilterSpell("Eldrazi creature spell with mana value 7 or greater");
+ private static final FilterSpell filterSpell = new FilterSpell("an Eldrazi creature spell with mana value 7 or greater");
static {
filterSpell.add(SubType.ELDRAZI.getPredicate());
diff --git a/Mage.Sets/src/mage/cards/e/Entomb.java b/Mage.Sets/src/mage/cards/e/Entomb.java
index e9bbd6ed85..f7a8bf8f59 100644
--- a/Mage.Sets/src/mage/cards/e/Entomb.java
+++ b/Mage.Sets/src/mage/cards/e/Entomb.java
@@ -42,7 +42,7 @@ class SearchLibraryPutInGraveyard extends SearchEffect {
public SearchLibraryPutInGraveyard() {
super(new TargetCardInLibrary(new FilterCard()), Outcome.Neutral);
- staticText = "Search your library for a card and put that card into your graveyard, then shuffle";
+ staticText = "search your library for a card, put that card into your graveyard, then shuffle";
}
public SearchLibraryPutInGraveyard(final SearchLibraryPutInGraveyard effect) {
diff --git a/Mage.Sets/src/mage/cards/e/ExertInfluence.java b/Mage.Sets/src/mage/cards/e/ExertInfluence.java
index 62028babd8..c071c37ad0 100644
--- a/Mage.Sets/src/mage/cards/e/ExertInfluence.java
+++ b/Mage.Sets/src/mage/cards/e/ExertInfluence.java
@@ -48,7 +48,7 @@ class ExertInfluenceEffect extends OneShotEffect {
public ExertInfluenceEffect() {
super(Outcome.GainControl);
- this.staticText = "Gain control of target creature if its power is less than or equal to the number of colors spent to cast {this}";
+ this.staticText = "Gain control of target creature if its power is less than or equal to the number of colors spent to cast this spell";
}
public ExertInfluenceEffect(final ExertInfluenceEffect effect) {
diff --git a/Mage.Sets/src/mage/cards/g/GaddockTeeg.java b/Mage.Sets/src/mage/cards/g/GaddockTeeg.java
index cd9b4c5b05..9db17686d6 100644
--- a/Mage.Sets/src/mage/cards/g/GaddockTeeg.java
+++ b/Mage.Sets/src/mage/cards/g/GaddockTeeg.java
@@ -48,7 +48,7 @@ class GaddockTeegReplacementEffect4 extends ContinuousRuleModifyingEffectImpl {
public GaddockTeegReplacementEffect4() {
super(Duration.WhileOnBattlefield, Outcome.Detriment);
- staticText = "Noncreature spells with mana value 4 or greater can't be cast. Noncreature spells with {X} in their mana costs can't be cast";
+ staticText = "Noncreature spells with mana value 4 or greater can't be cast";
}
public GaddockTeegReplacementEffect4(final GaddockTeegReplacementEffect4 effect) {
diff --git a/Mage.Sets/src/mage/cards/g/GreenSunsZenith.java b/Mage.Sets/src/mage/cards/g/GreenSunsZenith.java
index f5f6a3bb8f..f2144fe761 100644
--- a/Mage.Sets/src/mage/cards/g/GreenSunsZenith.java
+++ b/Mage.Sets/src/mage/cards/g/GreenSunsZenith.java
@@ -16,7 +16,7 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class GreenSunsZenith extends CardImpl {
- private static final FilterCard filter = new FilterCard("green creature");
+ private static final FilterCard filter = new FilterCard("green creature card");
static {
filter.add(new ColorPredicate(ObjectColor.GREEN));
diff --git a/Mage.Sets/src/mage/cards/i/InfuseWithTheElements.java b/Mage.Sets/src/mage/cards/i/InfuseWithTheElements.java
index 67e0c8c538..d4393d7649 100644
--- a/Mage.Sets/src/mage/cards/i/InfuseWithTheElements.java
+++ b/Mage.Sets/src/mage/cards/i/InfuseWithTheElements.java
@@ -27,7 +27,7 @@ public final class InfuseWithTheElements extends CardImpl {
// Converge — Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast Infuse with the Elements.
this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE);
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), ColorsOfManaSpentToCastCount.getInstance());
- effect.setText("Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast {this}");
+ effect.setText("Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast this spell");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// That creature gains trample until end of turn.
diff --git a/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java b/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java
index 95915d4afb..72d4811349 100644
--- a/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java
+++ b/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java
@@ -72,7 +72,7 @@ class JelevaNephaliasScourgeEffect extends OneShotEffect {
public JelevaNephaliasScourgeEffect() {
super(Outcome.Benefit);
this.staticText = "each player exiles the top X cards of their library, "
- + "where X is the amount of mana spent to cast {this}";
+ + "where X is the amount of mana spent to cast this spell";
}
public JelevaNephaliasScourgeEffect(final JelevaNephaliasScourgeEffect effect) {
diff --git a/Mage.Sets/src/mage/cards/m/MercurialChemister.java b/Mage.Sets/src/mage/cards/m/MercurialChemister.java
index 648808d8df..22ad034d01 100644
--- a/Mage.Sets/src/mage/cards/m/MercurialChemister.java
+++ b/Mage.Sets/src/mage/cards/m/MercurialChemister.java
@@ -8,7 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.dynamicvalue.common.DiscardCostCardConvertedMana;
+import mage.abilities.dynamicvalue.common.DiscardCostCardManaValue;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
@@ -39,7 +39,7 @@ public final class MercurialChemister extends CardImpl {
this.addAbility(ability);
// {R}, {T}, Discard a card: Mercurial Chemister deals damage to target creature equal to the discarded card's converted mana cost.
- ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(DiscardCostCardConvertedMana.instance), new ManaCostsImpl("{R}"));
+ ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(DiscardCostCardManaValue.instance), new ManaCostsImpl("{R}"));
ability.addTarget(new TargetCreaturePermanent());
ability.addCost(new TapSourceCost());
ability.addCost(new DiscardCardCost());
diff --git a/Mage.Sets/src/mage/cards/m/MetalworkColossus.java b/Mage.Sets/src/mage/cards/m/MetalworkColossus.java
index 1415456ba9..ac9e1e7a84 100644
--- a/Mage.Sets/src/mage/cards/m/MetalworkColossus.java
+++ b/Mage.Sets/src/mage/cards/m/MetalworkColossus.java
@@ -1,7 +1,5 @@
-
package mage.cards.m;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
@@ -12,28 +10,27 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.CostModificationType;
-import mage.constants.Duration;
-import mage.constants.Outcome;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledArtifactPermanent;
+import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledPermanent;
import mage.util.CardUtil;
+import java.util.UUID;
+
/**
- *
* @author emerald000
*/
public final class MetalworkColossus extends CardImpl {
+ private static final FilterControlledPermanent filter = new FilterControlledArtifactPermanent("artifacts");
+
public MetalworkColossus(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{11}");
+ super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{11}");
this.subtype.add(SubType.CONSTRUCT);
this.power = new MageInt(10);
this.toughness = new MageInt(10);
@@ -42,7 +39,7 @@ public final class MetalworkColossus extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.ALL, new MetalworkColossusCostReductionEffect()));
// Sacrifice two artifacts: Return Metalwork Colossus from your graveyard to your hand.
- this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledArtifactPermanent("two artifacts"), true))));
+ this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new SacrificeTargetCost(new TargetControlledPermanent(2, filter))));
}
private MetalworkColossus(final MetalworkColossus card) {
@@ -58,6 +55,7 @@ public final class MetalworkColossus extends CardImpl {
class MetalworkColossusCostReductionEffect extends CostModificationEffectImpl {
private static final FilterPermanent filter = new FilterControlledArtifactPermanent("noncreature artifacts you control");
+
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
diff --git a/Mage.Sets/src/mage/cards/m/MyrSuperion.java b/Mage.Sets/src/mage/cards/m/MyrSuperion.java
index d2d1758271..383964063b 100644
--- a/Mage.Sets/src/mage/cards/m/MyrSuperion.java
+++ b/Mage.Sets/src/mage/cards/m/MyrSuperion.java
@@ -27,7 +27,7 @@ public final class MyrSuperion extends CardImpl {
this.toughness = new MageInt(6);
// Spend only mana produced by creatures to cast Myr Superion.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Spend only mana produced by creatures to cast {this}")));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Spend only mana produced by creatures to cast this spell")));
this.getSpellAbility().getManaCostsToPay().setSourceFilter(StaticFilters.FILTER_PERMANENT_CREATURES);
this.getSpellAbility().getManaCosts().setSourceFilter(StaticFilters.FILTER_PERMANENT_CREATURES);
}
diff --git a/Mage.Sets/src/mage/cards/n/NahirisWrath.java b/Mage.Sets/src/mage/cards/n/NahirisWrath.java
index 876ffb881b..eb5f70a0cb 100644
--- a/Mage.Sets/src/mage/cards/n/NahirisWrath.java
+++ b/Mage.Sets/src/mage/cards/n/NahirisWrath.java
@@ -6,7 +6,7 @@ import mage.abilities.costs.Cost;
import mage.abilities.costs.VariableCost;
import mage.abilities.costs.VariableCostImpl;
import mage.abilities.costs.common.DiscardTargetCost;
-import mage.abilities.dynamicvalue.common.DiscardCostCardConvertedMana;
+import mage.abilities.dynamicvalue.common.DiscardCostCardManaValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
@@ -34,7 +34,7 @@ public final class NahirisWrath extends CardImpl {
this.getSpellAbility().addCost(new NahirisWrathAdditionalCost());
// Nahiri's Wrath deals damage equal to the total converted mana cost of the discarded cards to each of up to X target creatures and/or planeswalkers.
- Effect effect = new DamageTargetEffect(DiscardCostCardConvertedMana.instance);
+ Effect effect = new DamageTargetEffect(DiscardCostCardManaValue.instance);
effect.setText("{this} deals damage equal to the total mana value of the discarded cards to each of up to X target creatures and/or planeswalkers");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().setTargetAdjuster(NahirisWrathAdjuster.instance);
@@ -73,7 +73,7 @@ class NahirisWrathAdditionalCost extends VariableCostImpl {
NahirisWrathAdditionalCost() {
super("cards to discard");
- this.text = "as an additional cost to cast this spell, discard X cards";
+ this.text = "discard X cards";
}
NahirisWrathAdditionalCost(final NahirisWrathAdditionalCost cost) {
diff --git a/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java b/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java
index 970ffc25ae..61bdbaf9c5 100644
--- a/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java
+++ b/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java
@@ -1,11 +1,9 @@
-
package mage.cards.p;
-import java.util.UUID;
import mage.MageInt;
-import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanentGreatestCMCCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
@@ -14,16 +12,20 @@ import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
-import mage.filter.common.FilterArtifactPermanent;
+import mage.filter.StaticFilters;
+
+import java.util.UUID;
/**
- *
* @author LevelX2
*/
public final class PadeemConsulOfInnovation extends CardImpl {
+ private static final Condition condition
+ = new ControlsPermanentGreatestCMCCondition(StaticFilters.FILTER_PERMANENT_ARTIFACT);
+
public PadeemConsulOfInnovation(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.VEDALKEN);
this.subtype.add(SubType.ARTIFICER);
@@ -31,15 +33,18 @@ public final class PadeemConsulOfInnovation extends CardImpl {
this.toughness = new MageInt(4);
// Artifacts you control have hexproof.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
- new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, new FilterArtifactPermanent(), false)));
+ this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
+ HexproofAbility.getInstance(), Duration.WhileOnBattlefield,
+ StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACTS, false
+ )));
// At the beginning of your upkeep, if you control the artifact with the highest converted mana cost or tied for the highest converted mana cost, draw a card.
- Ability ability = new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.YOU, false),
- new ControlsPermanentGreatestCMCCondition(new FilterArtifactPermanent()),
- "At the beginning of your upkeep, if you control the artifact with the highest mana value or tied for the highest mana value, draw a card.");
-
- this.addAbility(ability);
+ this.addAbility(new ConditionalInterveningIfTriggeredAbility(
+ new BeginningOfUpkeepTriggeredAbility(
+ new DrawCardSourceControllerEffect(1), TargetController.YOU, false
+ ), condition, "At the beginning of your upkeep, if you control the artifact " +
+ "with the highest mana value or tied for the highest mana value, draw a card."
+ ));
}
private PadeemConsulOfInnovation(final PadeemConsulOfInnovation card) {
diff --git a/Mage.Sets/src/mage/cards/p/Pyromancy.java b/Mage.Sets/src/mage/cards/p/Pyromancy.java
index 800e3b3262..f25926f146 100644
--- a/Mage.Sets/src/mage/cards/p/Pyromancy.java
+++ b/Mage.Sets/src/mage/cards/p/Pyromancy.java
@@ -6,7 +6,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.dynamicvalue.common.DiscardCostCardConvertedMana;
+import mage.abilities.dynamicvalue.common.DiscardCostCardManaValue;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -25,7 +25,7 @@ public final class Pyromancy extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}");
// {3}, Discard a card at random: Pyromancy deals damage to any target equal to the converted mana cost of the discarded card.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(DiscardCostCardConvertedMana.instance), new ManaCostsImpl("{3}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(DiscardCostCardManaValue.instance), new ManaCostsImpl("{3}"));
ability.addTarget(new TargetAnyTarget());
ability.addCost(new DiscardCardCost(true));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java b/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java
index b7a2a49f04..06cd03fc00 100644
--- a/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java
+++ b/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java
@@ -34,7 +34,7 @@ public final class RoilmagesTrick extends CardImpl {
this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE);
this.getSpellAbility().addEffect(new BoostAllEffect(
new SignInversionDynamicValue(ColorsOfManaSpentToCastCount.getInstance()), StaticValue.get(-0), Duration.EndOfTurn, filter, false,
- "Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast {this}.
", true));
+ "Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast this spell.
", true));
// Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
diff --git a/Mage.Sets/src/mage/cards/s/SanctumOfUgin.java b/Mage.Sets/src/mage/cards/s/SanctumOfUgin.java
index bf6b58af91..5e33ffaf26 100644
--- a/Mage.Sets/src/mage/cards/s/SanctumOfUgin.java
+++ b/Mage.Sets/src/mage/cards/s/SanctumOfUgin.java
@@ -24,7 +24,7 @@ import mage.target.common.TargetCardInLibrary;
public final class SanctumOfUgin extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("colorless creature card");
- private static final FilterSpell filterSpells = new FilterSpell("colorless spell with mana value 7 or greater");
+ private static final FilterSpell filterSpells = new FilterSpell("a colorless spell with mana value 7 or greater");
static {
filter.add(ColorlessPredicate.instance);
diff --git a/Mage.Sets/src/mage/cards/s/ShardPhoenix.java b/Mage.Sets/src/mage/cards/s/ShardPhoenix.java
index d45973fd10..0724aae57e 100644
--- a/Mage.Sets/src/mage/cards/s/ShardPhoenix.java
+++ b/Mage.Sets/src/mage/cards/s/ShardPhoenix.java
@@ -43,7 +43,7 @@ public final class ShardPhoenix extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Sacrifice Shard Phoenix: Shard Phoenix deals 2 damage to each creature without flying.
- this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageAllEffect(2, filter), new SacrificeSourceCost()));
+ this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageAllEffect(2, "it", filter), new SacrificeSourceCost()));
// {R}{R}{R}: Return Shard Phoenix from your graveyard to your hand. Activate this ability only during your upkeep.
this.addAbility(new ConditionalActivatedAbility(Zone.GRAVEYARD,
diff --git a/Mage.Sets/src/mage/cards/u/UnifiedFront.java b/Mage.Sets/src/mage/cards/u/UnifiedFront.java
index a43554f7e3..6a14374fab 100644
--- a/Mage.Sets/src/mage/cards/u/UnifiedFront.java
+++ b/Mage.Sets/src/mage/cards/u/UnifiedFront.java
@@ -23,7 +23,7 @@ public final class UnifiedFront extends CardImpl {
// Converge — Create a 1/1 white Kor Ally creature token for each color of mana spent to cast Unified Front.
getSpellAbility().setAbilityWord(AbilityWord.CONVERGE);
Effect effect = new CreateTokenEffect(new KorAllyToken(), ColorsOfManaSpentToCastCount.getInstance());
- effect.setText("Create a 1/1 white Kor Ally creature token for each color of mana spent to cast {this}");
+ effect.setText("Create a 1/1 white Kor Ally creature token for each color of mana spent to cast this spell");
getSpellAbility().addEffect(effect);
}
diff --git a/Mage.Sets/src/mage/cards/v/VoidWinnower.java b/Mage.Sets/src/mage/cards/v/VoidWinnower.java
index 16c0efe735..d985f2957e 100644
--- a/Mage.Sets/src/mage/cards/v/VoidWinnower.java
+++ b/Mage.Sets/src/mage/cards/v/VoidWinnower.java
@@ -49,7 +49,7 @@ class VoidWinnowerCantCastEffect extends ContinuousRuleModifyingEffectImpl {
public VoidWinnowerCantCastEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
- staticText = "Your opponent can't cast spells with even mana values. (Zero is even.)";
+ staticText = "Your opponents can't cast spells with even mana values. (Zero is even.)";
}
public VoidWinnowerCantCastEffect(final VoidWinnowerCantCastEffect effect) {
diff --git a/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java b/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java
index f104a610a1..5c02ce8411 100644
--- a/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java
+++ b/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java
@@ -6,7 +6,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.dynamicvalue.common.DiscardCostCardConvertedMana;
+import mage.abilities.dynamicvalue.common.DiscardCostCardManaValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
@@ -33,7 +33,7 @@ public final class VolrathTheFallen extends CardImpl {
// {1}{B}, Discard a creature card:
// Volrath the Fallen gets +X/+X until end of turn, where X is the discarded card's converted mana cost.
- Effect effect = new BoostSourceEffect(DiscardCostCardConvertedMana.instance, DiscardCostCardConvertedMana.instance, Duration.EndOfTurn);
+ Effect effect = new BoostSourceEffect(DiscardCostCardManaValue.instance, DiscardCostCardManaValue.instance, Duration.EndOfTurn);
effect.setText("{this} gets +X/+X until end of turn, where X is the discarded card's mana value");
Ability ability = new SimpleActivatedAbility(
diff --git a/Mage.Sets/src/mage/cards/w/WhirOfInvention.java b/Mage.Sets/src/mage/cards/w/WhirOfInvention.java
index 4a49f7e324..c85f1f8ab2 100644
--- a/Mage.Sets/src/mage/cards/w/WhirOfInvention.java
+++ b/Mage.Sets/src/mage/cards/w/WhirOfInvention.java
@@ -1,16 +1,15 @@
-
package mage.cards.w;
-import java.util.UUID;
import mage.abilities.effects.common.search.SearchLibraryWithLessCMCPutInPlayEffect;
import mage.abilities.keyword.ImproviseAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.filter.common.FilterArtifactCard;
+import mage.filter.StaticFilters;
+
+import java.util.UUID;
/**
- *
* @author fireshoes
*/
public final class WhirOfInvention extends CardImpl {
@@ -19,10 +18,10 @@ public final class WhirOfInvention extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}{U}{U}");
// Improvise (Your artifacts can help cast this spell. Each artifact you tap after you're done activating mana abilities pays for {1}.)
- addAbility(new ImproviseAbility());
+ this.addAbility(new ImproviseAbility());
// Search your library for an artifact card with converted mana cost X or less, put it onto the battlefield, then shuffle your library.
- this.getSpellAbility().addEffect(new SearchLibraryWithLessCMCPutInPlayEffect(new FilterArtifactCard()));
+ this.getSpellAbility().addEffect(new SearchLibraryWithLessCMCPutInPlayEffect(StaticFilters.FILTER_CARD_ARTIFACT));
}
private WhirOfInvention(final WhirOfInvention card) {
diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java
index 6a75a20ccb..62e86b767f 100644
--- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java
+++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java
@@ -241,6 +241,10 @@ public class VerifyCardDataTest {
return skipCheckLists.get(listName).contains(set);
}
+ private static boolean evergreenCheck(String s) {
+ return evergreenKeywords.contains(s) || s.startsWith("protection from") || s.startsWith("hexproof from");
+ }
+
private static boolean eqSet(Collection a, Collection b) {
if (a == null || a.isEmpty()) {
return b == null || b.isEmpty();
@@ -1493,7 +1497,7 @@ public class VerifyCardDataTest {
if (Arrays
.stream(s.split(", "))
.map(String::toLowerCase)
- .allMatch(evergreenKeywords::contains)) {
+ .allMatch(VerifyCardDataTest::evergreenCheck)) {
String replacement = Arrays
.stream(s.split(", "))
.map(CardUtil::getTextWithFirstCharUpperCase)
diff --git a/Mage/src/main/java/mage/abilities/condition/common/CardsInControllerGraveyardCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CardsInControllerGraveyardCondition.java
index fa0f86c791..84c329364a 100644
--- a/Mage/src/main/java/mage/abilities/condition/common/CardsInControllerGraveyardCondition.java
+++ b/Mage/src/main/java/mage/abilities/condition/common/CardsInControllerGraveyardCondition.java
@@ -37,9 +37,9 @@ public class CardsInControllerGraveyardCondition implements Condition {
@Override
public String toString() {
- return "there are " + CardUtil.numberToText(value, "one") + " or more "
+ return CardUtil.numberToText(value, "one") + " or more "
+ (filter == null ? "cards" : filter.getMessage())
- + " in your graveyard";
+ + " are in your graveyard";
}
}
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ColorsOfManaSpentToCastCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ColorsOfManaSpentToCastCount.java
index 30c54236a7..303b51f77c 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ColorsOfManaSpentToCastCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ColorsOfManaSpentToCastCount.java
@@ -70,7 +70,7 @@ public class ColorsOfManaSpentToCastCount implements DynamicValue {
@Override
public String getMessage() {
- return "the number of colors of mana spent to cast {this}";
+ return "the number of colors of mana spent to cast this spell";
}
}
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardManaValue.java
similarity index 80%
rename from Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java
rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardManaValue.java
index 241451d8fe..fab4ae8cf8 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardManaValue.java
@@ -11,7 +11,7 @@ import mage.game.Game;
/**
* @author LevelX2
*/
-public enum DiscardCostCardConvertedMana implements DynamicValue {
+public enum DiscardCostCardManaValue implements DynamicValue {
instance;
@Override
@@ -26,8 +26,8 @@ public enum DiscardCostCardConvertedMana implements DynamicValue {
}
@Override
- public DiscardCostCardConvertedMana copy() {
- return DiscardCostCardConvertedMana.instance;
+ public DiscardCostCardManaValue copy() {
+ return DiscardCostCardManaValue.instance;
}
@Override
@@ -37,6 +37,6 @@ public enum DiscardCostCardConvertedMana implements DynamicValue {
@Override
public String getMessage() {
- return "the discarded card's mana value";
+ return "the mana value of the discarded card";
}
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java
index 01f03e51b7..55f24bf7cd 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java
@@ -152,9 +152,9 @@ public class DamageTargetEffect extends OneShotEffect {
String message = amount.getMessage();
sb.append(this.sourceName).append(" deals ");
if (message.isEmpty() || !message.equals("1")) {
- sb.append(amount);
+ sb.append(amount).append(' ');
}
- sb.append(" damage to ");
+ sb.append("damage to ");
if (!targetDescription.isEmpty()) {
sb.append(targetDescription);
} else {
diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.java
index 811987d0ca..666422d0d9 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.java
@@ -9,6 +9,7 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
+import mage.util.CardUtil;
import java.util.UUID;
@@ -60,7 +61,7 @@ public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTarget
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder();
sb.append("Exile target ").append(mode.getTargets().get(0).getTargetName()).append(". ");
- sb.append(super.getText(mode));
+ sb.append(CardUtil.getTextWithFirstCharUpperCase(super.getText(mode)));
return sb.toString();
}
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryWithLessCMCPutInPlayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryWithLessCMCPutInPlayEffect.java
index cd7466c133..411a1565a8 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryWithLessCMCPutInPlayEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryWithLessCMCPutInPlayEffect.java
@@ -12,6 +12,7 @@ import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInLibrary;
+import mage.util.CardUtil;
/**
*
@@ -28,7 +29,7 @@ public class SearchLibraryWithLessCMCPutInPlayEffect extends OneShotEffect {
public SearchLibraryWithLessCMCPutInPlayEffect(FilterCard filter) {
super(Outcome.PutCreatureInPlay);
this.filter = filter;
- staticText = "Search your library for a " + filter.getMessage() + " with mana value X or less, put it onto the battlefield, then shuffle";
+ staticText = "Search your library for " + CardUtil.addArticle(filter.getMessage()) + " with mana value X or less, put it onto the battlefield, then shuffle";
}
public SearchLibraryWithLessCMCPutInPlayEffect(final SearchLibraryWithLessCMCPutInPlayEffect effect) {
diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java
index 146451c1aa..3878ff6ebf 100644
--- a/Mage/src/main/java/mage/filter/StaticFilters.java
+++ b/Mage/src/main/java/mage/filter/StaticFilters.java
@@ -322,6 +322,12 @@ public final class StaticFilters {
FILTER_CONTROLLED_PERMANENT_ARTIFACT.setLockedFilter(true);
}
+ public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACTS = new FilterControlledArtifactPermanent("artifacts you control");
+
+ static {
+ FILTER_CONTROLLED_PERMANENT_ARTIFACTS.setLockedFilter(true);
+ }
+
public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN = new FilterControlledArtifactPermanent("an artifact");
static {