diff --git a/Mage.Sets/src/mage/cards/a/AbaddonTheDespoiler.java b/Mage.Sets/src/mage/cards/a/AbaddonTheDespoiler.java index 7b0bfcfe47..a6979edb4d 100644 --- a/Mage.Sets/src/mage/cards/a/AbaddonTheDespoiler.java +++ b/Mage.Sets/src/mage/cards/a/AbaddonTheDespoiler.java @@ -55,13 +55,13 @@ public final class AbaddonTheDespoiler extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); - // Mark of the Chaos Ascendant — During your turn, spells you cast from your hand with mana value X or less have cascade, where X is the total amount of life your opponents have lost this turn. + // Mark of Chaos Ascendant — During your turn, spells you cast from your hand with mana value X or less have cascade, where X is the total amount of life your opponents have lost this turn. this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( new GainAbilitySpellsEffect(new CascadeAbility(false), filter), MyTurnCondition.instance, "during your turn, spells you cast from " + "your hand with mana value X or less have cascade, where X is the " + "total amount of life your opponents have lost this turn" - )).addHint(hint).withFlavorWord("Mark of the Chaos Ascendant")); + )).addHint(hint).withFlavorWord("Mark of Chaos Ascendant")); } private AbaddonTheDespoiler(final AbaddonTheDespoiler card) { diff --git a/Mage.Sets/src/mage/cards/b/BelakorTheDarkMaster.java b/Mage.Sets/src/mage/cards/b/BelakorTheDarkMaster.java index 45b282bf0f..0310262b8e 100644 --- a/Mage.Sets/src/mage/cards/b/BelakorTheDarkMaster.java +++ b/Mage.Sets/src/mage/cards/b/BelakorTheDarkMaster.java @@ -34,7 +34,7 @@ import java.util.UUID; public final class BelakorTheDarkMaster extends CardImpl { private static final FilterPermanent filter = new FilterControlledPermanent(SubType.DEMON, "Demons you control"); - private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, null); private static final Hint hint = new ValueHint("Demons you control", xValue); private static final FilterPermanent filter2 = new FilterControlledPermanent(SubType.DEMON, "another Demon"); diff --git a/Mage.Sets/src/mage/cards/c/CallidusAssassin.java b/Mage.Sets/src/mage/cards/c/CallidusAssassin.java index f394b70b58..9ca3b6a0d4 100644 --- a/Mage.Sets/src/mage/cards/c/CallidusAssassin.java +++ b/Mage.Sets/src/mage/cards/c/CallidusAssassin.java @@ -85,7 +85,7 @@ class CallidusAssassinApplier extends CopyApplier { @Override public String getText() { - return "except it has \"When this creature enters the battlefield, " + + return ", except it has \"When this creature enters the battlefield, " + "destroy up to one other target creature with the same name as this creature.\""; } } diff --git a/Mage.Sets/src/mage/cards/c/CanoptekWraith.java b/Mage.Sets/src/mage/cards/c/CanoptekWraith.java index 61e858d6a6..b1951287f4 100644 --- a/Mage.Sets/src/mage/cards/c/CanoptekWraith.java +++ b/Mage.Sets/src/mage/cards/c/CanoptekWraith.java @@ -56,7 +56,7 @@ public final class CanoptekWraith extends CardImpl { "pay {3} and sacrifice it" ) ), false - ).withFlavorWord("Transdimensional Scout")); + ).setTriggerPhrase("When {this} deals combat damage to a player, ").withFlavorWord("Transdimensional Scout")); } private CanoptekWraith(final CanoptekWraith card) { diff --git a/Mage.Sets/src/mage/cards/c/ChaosDefiler.java b/Mage.Sets/src/mage/cards/c/ChaosDefiler.java index 68bd4c699f..cce3b6f569 100644 --- a/Mage.Sets/src/mage/cards/c/ChaosDefiler.java +++ b/Mage.Sets/src/mage/cards/c/ChaosDefiler.java @@ -62,7 +62,7 @@ class ChaosDefilerEffect extends OneShotEffect { ChaosDefilerEffect() { super(Outcome.Benefit); staticText = "for each opponent, choose a nonland permanent " + - "that players controls. Destroy one of them chosen at random"; + "that player controls. Destroy one of them chosen at random"; } private ChaosDefilerEffect(final ChaosDefilerEffect effect) { diff --git a/Mage.Sets/src/mage/cards/d/DefendersOfHumanity.java b/Mage.Sets/src/mage/cards/d/DefendersOfHumanity.java index 4ef5fafa6b..871775e11e 100644 --- a/Mage.Sets/src/mage/cards/d/DefendersOfHumanity.java +++ b/Mage.Sets/src/mage/cards/d/DefendersOfHumanity.java @@ -1,11 +1,13 @@ package mage.cards.d; +import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.CompoundCondition; import mage.abilities.condition.Condition; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.common.ExileSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.dynamicvalue.common.GetXValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; @@ -18,9 +20,9 @@ import mage.constants.CardType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.StaticFilters; +import mage.game.permanent.token.WhiteAstartesWarriorToken; import java.util.UUID; -import mage.game.permanent.token.WhiteAstartesWarriorToken; /** * @author TheElk801 @@ -44,12 +46,14 @@ public final class DefendersOfHumanity extends CardImpl { )); // {X}{2}{W}, Exile Defenders of Humanity: Create X 2/2 white Astartes Warrior creature tokens with vigilance. Activate only if you control no creatures and only during your turn. - this.addAbility(new ActivateIfConditionActivatedAbility( + Ability ability = new ActivateIfConditionActivatedAbility( Zone.BATTLEFIELD, new CreateTokenEffect( new WhiteAstartesWarriorToken(), GetXValue.instance ), new ManaCostsImpl<>("{X}{2}{W}"), condition - ).addHint(CreaturesYouControlHint.instance).addHint(MyTurnHint.instance)); + ).addHint(CreaturesYouControlHint.instance).addHint(MyTurnHint.instance); + ability.addCost(new ExileSourceCost()); + this.addAbility(ability); } private DefendersOfHumanity(final DefendersOfHumanity card) { diff --git a/Mage.Sets/src/mage/cards/e/Exterminatus.java b/Mage.Sets/src/mage/cards/e/Exterminatus.java index 0f4fe06f7c..d68bd70bb2 100644 --- a/Mage.Sets/src/mage/cards/e/Exterminatus.java +++ b/Mage.Sets/src/mage/cards/e/Exterminatus.java @@ -19,8 +19,7 @@ import java.util.UUID; */ public final class Exterminatus extends CardImpl { - private static final FilterPermanent filter - = new FilterNonlandPermanent("nonland permanents your opponents control"); + private static final FilterPermanent filter = new FilterNonlandPermanent(); static { filter.add(TargetController.OPPONENT.getControllerPredicate()); @@ -32,7 +31,7 @@ public final class Exterminatus extends CardImpl { // Nonland permanents your opponents control lose indestructible until end of turn. this.getSpellAbility().addEffect(new LoseAbilityAllEffect( IndestructibleAbility.getInstance(), Duration.EndOfTurn, filter - )); + ).setText("nonland permanents your opponents control lose indestructible until end of turn")); // Destroy all nonland permanents. this.getSpellAbility().addEffect(new DestroyAllEffect( diff --git a/Mage.Sets/src/mage/cards/f/ForTheEmperor.java b/Mage.Sets/src/mage/cards/f/ForTheEmperor.java index 9a34d3fde2..1fc571527b 100644 --- a/Mage.Sets/src/mage/cards/f/ForTheEmperor.java +++ b/Mage.Sets/src/mage/cards/f/ForTheEmperor.java @@ -21,15 +21,17 @@ public final class ForTheEmperor extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}"); // Creatures you control get +2/+2 and gain vigilance and lifelink until end of turn. - this.getSpellAbility().addEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostControlledEffect( + 2, 2, Duration.EndOfTurn + ).setText("creatures you control get +2/+2")); this.getSpellAbility().addEffect(new GainAbilityControlledEffect( VigilanceAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE - ).setText("and gain lifelink")); + ).setText("and gain vigilance")); this.getSpellAbility().addEffect(new GainAbilityControlledEffect( LifelinkAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE - ).setText("and vigilance until end of turn")); + ).setText("and lifelink until end of turn")); } private ForTheEmperor(final ForTheEmperor card) { diff --git a/Mage.Sets/src/mage/cards/g/GenestealerPatriarch.java b/Mage.Sets/src/mage/cards/g/GenestealerPatriarch.java index 32f2affd69..7b61653b0e 100644 --- a/Mage.Sets/src/mage/cards/g/GenestealerPatriarch.java +++ b/Mage.Sets/src/mage/cards/g/GenestealerPatriarch.java @@ -4,10 +4,10 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -15,6 +15,7 @@ import mage.constants.Outcome; import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; +import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate; import mage.game.Game; @@ -32,10 +33,14 @@ import java.util.UUID; */ public final class GenestealerPatriarch extends CardImpl { - public static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls"); + public static final FilterCreaturePermanent filter + = new FilterCreaturePermanent("creature defending player controls"); + private static final FilterPermanent filter2 + = new FilterCreaturePermanent("a creature with an infection counter on it"); static { filter.add(DefendingPlayerControlsPredicate.instance); + filter2.add(CounterType.INFECTION.getPredicate()); } public GenestealerPatriarch(UUID ownerId, CardSetInfo setInfo) { @@ -45,13 +50,17 @@ public final class GenestealerPatriarch extends CardImpl { this.toughness = new MageInt(4); // Genestealer's Kiss — Whenever Genestealer Patriarch attacks, put an infection counter on target creature defending player controls. - Ability ability = new AttacksTriggeredAbility(new AddCountersTargetEffect(CounterType.INFECTION.createInstance())).withFlavorWord("Genestealer's Kiss"); + Ability ability = new AttacksTriggeredAbility( + new AddCountersTargetEffect(CounterType.INFECTION.createInstance()) + ).withFlavorWord("Genestealer's Kiss"); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); // Children of the Cult — Whenever a creature with an infection counter on it dies, you create // a token that's a copy of that creature, except it's a Tyranid in addition to its other types. - this.addAbility(new GenestealerPatriarchTriggeredAbility().withFlavorWord("Children of the Cult")); + this.addAbility(new DiesCreatureTriggeredAbility( + new GenestealerPatriarchCloneEffect(), false, filter2, false + ).withFlavorWord("Children of the Cult")); } private GenestealerPatriarch(final GenestealerPatriarch card) { @@ -68,11 +77,12 @@ class GenestealerPatriarchTriggeredAbility extends TriggeredAbilityImpl { public GenestealerPatriarchTriggeredAbility() { super(Zone.BATTLEFIELD, new GenestealerPatriarchCloneEffect()); + setTriggerPhrase("Whenever a creature with an infection counter on it dies, "); + ; } public GenestealerPatriarchTriggeredAbility(GenestealerPatriarchTriggeredAbility ability) { super(ability); - setTriggerPhrase("Whenever a creature with an infection counter on it dies, "); } @Override @@ -105,7 +115,8 @@ class GenestealerPatriarchCloneEffect extends OneShotEffect { public GenestealerPatriarchCloneEffect() { super(Outcome.PutCreatureInPlay); - staticText = "you create a token that's a copy of that creature, except it's a Tyranid in addition to its other types"; + staticText = "you create a token that's a copy of that creature, " + + "except it's a Tyranid in addition to its other types"; } public GenestealerPatriarchCloneEffect(final GenestealerPatriarchCloneEffect effect) { @@ -119,15 +130,14 @@ class GenestealerPatriarchCloneEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Card creature = game.getCard(getTargetPointer().getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); - if (creature != null && controller != null) { - CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId()); - effect.setTargetPointer(new FixedTarget(creature, game)); - effect.setAdditionalSubType(SubType.TYRANID); - effect.apply(game, source); - return true; + Permanent creature = (Permanent) getValue("creatureDied"); + if (controller == null || creature == null) { + return false; } - return false; + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId()); + effect.setSavedPermanent(creature); + effect.setAdditionalSubType(SubType.TYRANID); + return effect.apply(game, source); } } diff --git a/Mage.Sets/src/mage/cards/g/GreatUncleanOne.java b/Mage.Sets/src/mage/cards/g/GreatUncleanOne.java index c290a10f62..b54a391dce 100644 --- a/Mage.Sets/src/mage/cards/g/GreatUncleanOne.java +++ b/Mage.Sets/src/mage/cards/g/GreatUncleanOne.java @@ -37,7 +37,7 @@ public final class GreatUncleanOne extends CardImpl { ); ability.addEffect(new CreateTokenEffect( new PlaguebearerOfNurgleToken(), GreatUncleanOneValue.instance - ).setText("then for each opponent who has less life than you, " + + ).setText("Then for each opponent who has less life than you, " + "create a 1/3 black Demon creature token named Plaguebearer of Nurgle")); this.addAbility(ability.withFlavorWord("Reverberating Summons")); } diff --git a/Mage.Sets/src/mage/cards/k/KnightRampager.java b/Mage.Sets/src/mage/cards/k/KnightRampager.java index 63ed28a0e4..7c23744be1 100644 --- a/Mage.Sets/src/mage/cards/k/KnightRampager.java +++ b/Mage.Sets/src/mage/cards/k/KnightRampager.java @@ -32,11 +32,14 @@ public final class KnightRampager extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Frenzied Rampage — At the beginning of combat on your turn, choose an opponent at random. Knight Rampager attacks that player this combat if able. - this.addAbility(new BeginningOfCombatTriggeredAbility(new AttackIfAbleTargetRandomOpponentSourceEffect(), TargetController.YOU, false) - .withFlavorWord("Frenzied Rampage")); + this.addAbility(new BeginningOfCombatTriggeredAbility( + new AttackIfAbleTargetRandomOpponentSourceEffect(), TargetController.YOU, false + ).withFlavorWord("Frenzied Rampage")); // When Knight Rampager dies, it deals 4 damage to target opponent chosen at random. - Ability ability = new DiesSourceTriggeredAbility(new DamageTargetEffect(4), false); + Ability ability = new DiesSourceTriggeredAbility( + new DamageTargetEffect(4, "it"), false + ); Target target = new TargetOpponent(); target.setRandom(true); ability.addTarget(target); diff --git a/Mage.Sets/src/mage/cards/l/Lychguard.java b/Mage.Sets/src/mage/cards/l/Lychguard.java index ed74aa698e..a8d994628b 100644 --- a/Mage.Sets/src/mage/cards/l/Lychguard.java +++ b/Mage.Sets/src/mage/cards/l/Lychguard.java @@ -29,10 +29,10 @@ public final class Lychguard extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(3); - // Guardian Patrols -- {3}{B}, Sacrifice Lychguard: Return all legendary creature cards from your graveyard to your hand. + // Guardian Protocols -- {3}{B}, Sacrifice Lychguard: Return all legendary creature cards from your graveyard to your hand. Ability ability = new SimpleActivatedAbility(new LychguardEffect(), new ManaCostsImpl<>("{3}{B}")); ability.addCost(new SacrificeSourceCost()); - this.addAbility(ability); + this.addAbility(ability.withFlavorWord("Guardian Protocols")); } private Lychguard(final Lychguard card) { diff --git a/Mage.Sets/src/mage/cards/m/Mawloc.java b/Mage.Sets/src/mage/cards/m/Mawloc.java index 1e2fca82cc..2687bccf0a 100644 --- a/Mage.Sets/src/mage/cards/m/Mawloc.java +++ b/Mage.Sets/src/mage/cards/m/Mawloc.java @@ -30,7 +30,8 @@ public final class Mawloc extends CardImpl { this.addAbility(new RavenousAbility()); // Terror from the Deep -- When Mawloc enters the battlefield, it fights up to one target creature an opponent controls. If that creature would die this turn, exile it instead. - Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect()); + Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect() + .setText("it fights up to one target creature an opponent controls")); ability.addEffect(new ExileTargetIfDiesEffect()); ability.addTarget(new TargetOpponentsCreaturePermanent(0, 1)); this.addAbility(ability.withFlavorWord("Terror from the Deep")); diff --git a/Mage.Sets/src/mage/cards/n/Nexos.java b/Mage.Sets/src/mage/cards/n/Nexos.java index e1581af47e..987c7e0d72 100644 --- a/Mage.Sets/src/mage/cards/n/Nexos.java +++ b/Mage.Sets/src/mage/cards/n/Nexos.java @@ -40,7 +40,7 @@ public final class Nexos extends CardImpl { // Strategic Coordinator -- Basic lands you control have "{T}: Add {C}{C}. Spend this mana only on costs that contain {X}." this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( new NexosManaAbility(), Duration.WhileOnBattlefield, filter - ))); + )).withFlavorWord("Strategic Coordinator")); } private Nexos(final Nexos card) { diff --git a/Mage.Sets/src/mage/cards/n/NurglesRot.java b/Mage.Sets/src/mage/cards/n/NurglesRot.java index fd74c63385..48def4e0dd 100644 --- a/Mage.Sets/src/mage/cards/n/NurglesRot.java +++ b/Mage.Sets/src/mage/cards/n/NurglesRot.java @@ -34,7 +34,7 @@ public final class NurglesRot extends CardImpl { // When enchanted creature dies, return Nurgle's Rot to its owner's hand and you create a 1/3 black Demon creature token named Plaguebearer of Nurgle. Ability ability = new DiesAttachedTriggeredAbility(new ReturnToHandSourceEffect(false, true), "enchanted creature"); - ability.addEffect(new CreateTokenEffect(new PlaguebearerOfNurgleToken()).concatBy("and")); + ability.addEffect(new CreateTokenEffect(new PlaguebearerOfNurgleToken()).concatBy("and you")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/Poxwalkers.java b/Mage.Sets/src/mage/cards/p/Poxwalkers.java index fa18da354e..96147d65f3 100644 --- a/Mage.Sets/src/mage/cards/p/Poxwalkers.java +++ b/Mage.Sets/src/mage/cards/p/Poxwalkers.java @@ -40,7 +40,7 @@ public final class Poxwalkers extends CardImpl { this.addAbility(new SpellCastControllerTriggeredAbility( Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), filter, false, false - )); + ).withFlavorWord("Curse of the Walking Pox")); } private Poxwalkers(final Poxwalkers card) { diff --git a/Mage.Sets/src/mage/cards/p/PrimarisEliminator.java b/Mage.Sets/src/mage/cards/p/PrimarisEliminator.java index 95123745df..beea5f3abf 100644 --- a/Mage.Sets/src/mage/cards/p/PrimarisEliminator.java +++ b/Mage.Sets/src/mage/cards/p/PrimarisEliminator.java @@ -47,7 +47,7 @@ public final class PrimarisEliminator extends CardImpl { // * Hyperfang Round -- Creatures target player controls gets -2/-2 until end of turn. ability.addMode(new Mode(new BoostAllEffect( -2, -2, Duration.EndOfTurn, filter, false - )).addTarget(new TargetPlayer()).withFlavorWord("Hyperfang Round")); + )).addTarget(new TargetPlayer()).withFlavorWord("Hyperfrag Round")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/Psychomancer.java b/Mage.Sets/src/mage/cards/p/Psychomancer.java index b7e6104a19..cdbab016c3 100644 --- a/Mage.Sets/src/mage/cards/p/Psychomancer.java +++ b/Mage.Sets/src/mage/cards/p/Psychomancer.java @@ -14,6 +14,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.PermanentToken; +import mage.target.common.TargetOpponent; import java.util.UUID; @@ -52,6 +53,7 @@ class PsychomancerTriggeredAbility extends TriggeredAbilityImpl { PsychomancerTriggeredAbility() { super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1)); this.addEffect(new GainLifeEffect(1).concatBy("and")); + this.addTarget(new TargetOpponent()); this.setTriggerPhrase("Whenever {this} or another nontoken artifact you control is put " + "into a graveyard from the battlefield or is put into exile from the battlefield, "); this.withFlavorWord("Harbinger of Despair"); diff --git a/Mage.Sets/src/mage/cards/r/Reverberate.java b/Mage.Sets/src/mage/cards/r/Reverberate.java index 0531324a56..63b192031d 100644 --- a/Mage.Sets/src/mage/cards/r/Reverberate.java +++ b/Mage.Sets/src/mage/cards/r/Reverberate.java @@ -1,36 +1,24 @@ - - package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.common.CopyTargetSpellEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; import mage.target.TargetSpell; +import java.util.UUID; + /** - * * @author BetaSteward_at_googlemail.com */ public final class Reverberate extends CardImpl { - private static final FilterSpell filter = new FilterSpell(); - - static { - filter.add(Predicates.or( - CardType.INSTANT.getPredicate(), - CardType.SORCERY.getPredicate())); - } - public Reverberate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{R}"); - // Copy target instant or sorcery spell. You may choose new targets for the copy. - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY)); this.getSpellAbility().addEffect(new CopyTargetSpellEffect()); } diff --git a/Mage.Sets/src/mage/cards/s/ShardOfTheVoidDragon.java b/Mage.Sets/src/mage/cards/s/ShardOfTheVoidDragon.java index 4f26953fbb..e82071a39a 100644 --- a/Mage.Sets/src/mage/cards/s/ShardOfTheVoidDragon.java +++ b/Mage.Sets/src/mage/cards/s/ShardOfTheVoidDragon.java @@ -37,7 +37,7 @@ public final class ShardOfTheVoidDragon extends CardImpl { // Sphere of the Void Dragon -- Whenever Shard of the Void Dragon attacks, each opponent sacrifices a nonland permanent. this.addAbility(new AttacksTriggeredAbility( new SacrificeOpponentsEffect(StaticFilters.FILTER_PERMANENT_NON_LAND) - ).withFlavorWord("Sphere of the Void Dragon")); + ).withFlavorWord("Spear of the Void Dragon")); // Matter Absorption -- Whenever an artifact is put into a graveyard from the battlefield or is put into exile from the battlefield, put two +1/+1 counters on Shard of the Void Dragon. this.addAbility(new ShardOfTheVoidDragonTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SisterRepentia.java b/Mage.Sets/src/mage/cards/s/SisterRepentia.java index ce4d579de7..5c88c71fba 100644 --- a/Mage.Sets/src/mage/cards/s/SisterRepentia.java +++ b/Mage.Sets/src/mage/cards/s/SisterRepentia.java @@ -28,7 +28,7 @@ public final class SisterRepentia extends CardImpl { // Martyrdom -- When Sister Repentia dies, you gain 2 life and draw two cards. Ability ability = new DiesSourceTriggeredAbility(new GainLifeEffect(2)); - ability.addEffect(new DrawCardSourceControllerEffect(2)); + ability.addEffect(new DrawCardSourceControllerEffect(2).concatBy("and")); this.addAbility(ability.withFlavorWord("Martyrdom")); // Miracle {W}{B} diff --git a/Mage.Sets/src/mage/cards/s/SpaceMarineScout.java b/Mage.Sets/src/mage/cards/s/SpaceMarineScout.java index 9defcc3b57..12c1a4beb6 100644 --- a/Mage.Sets/src/mage/cards/s/SpaceMarineScout.java +++ b/Mage.Sets/src/mage/cards/s/SpaceMarineScout.java @@ -51,8 +51,8 @@ public final class SpaceMarineScout extends CardImpl { this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect( new TargetCardInLibrary(filter), true, true - )), condition, "When {this} enters the battlefield, if an opponent controls more lands than you, " - + "search your library for a basic Plains card, put it onto the battlefield tapped, then shuffle." + ), true), condition, "When {this} enters the battlefield, if an opponent controls more lands " + + "than you, you may search your library for a basic Plains card, put it onto the battlefield tapped, then shuffle." ).withFlavorWord("Concealed Position")); } diff --git a/Mage.Sets/src/mage/cards/t/TheHorusHeresy.java b/Mage.Sets/src/mage/cards/t/TheHorusHeresy.java index 9ab3ce1b82..312843d6d0 100644 --- a/Mage.Sets/src/mage/cards/t/TheHorusHeresy.java +++ b/Mage.Sets/src/mage/cards/t/TheHorusHeresy.java @@ -60,7 +60,7 @@ public final class TheHorusHeresy extends CardImpl { }); // II -- Draw a card for each creature you control but don't own. - sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new DrawCardSourceControllerEffect(xValue)); + sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new DrawCardSourceControllerEffect(xValue)); // III -- Starting with you, each player chooses a creature. Destroy each creature chosen this way. sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new TheHorusHeresyDestroyEffect()); diff --git a/Mage.Sets/src/mage/cards/t/TheirNumberIsLegion.java b/Mage.Sets/src/mage/cards/t/TheirNumberIsLegion.java index 2ad8802523..94422c4db9 100644 --- a/Mage.Sets/src/mage/cards/t/TheirNumberIsLegion.java +++ b/Mage.Sets/src/mage/cards/t/TheirNumberIsLegion.java @@ -23,7 +23,7 @@ public final class TheirNumberIsLegion extends CardImpl { // Create X tapped 2/2 black Necron Warrior artifact creature tokens, then you gain life equal to the number of artifacts you control. Exile Their Number Is Legion. this.getSpellAbility().addEffect(new CreateTokenEffect( - new NecronWarriorToken(), ManacostVariableValue.REGULAR + new NecronWarriorToken(), ManacostVariableValue.REGULAR, true, false )); this.getSpellAbility().addEffect(new GainLifeEffect(ArtifactYouControlCount.instance) .setText(", then you gain life equal to the number of artifacts you control")); diff --git a/Mage.Sets/src/mage/cards/t/TriarchPraetorian.java b/Mage.Sets/src/mage/cards/t/TriarchPraetorian.java index 70ec366ad7..a64c0e6b1a 100644 --- a/Mage.Sets/src/mage/cards/t/TriarchPraetorian.java +++ b/Mage.Sets/src/mage/cards/t/TriarchPraetorian.java @@ -31,7 +31,9 @@ public final class TriarchPraetorian extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Dynastic Codes -- When Triarch Praetorian enters the battlefield from a graveyard, you draw two cards and you lose 2 life. - Ability ability = new EntersBattlefieldFromGraveyardTriggeredAbility(new DrawCardSourceControllerEffect(2)); + Ability ability = new EntersBattlefieldFromGraveyardTriggeredAbility( + new DrawCardSourceControllerEffect(2, "you") + ); ability.addEffect(new LoseLifeSourceControllerEffect(2).concatBy("and")); this.addAbility(ability.withFlavorWord("Dynastic Codes")); diff --git a/Mage.Sets/src/mage/cards/t/TyranidHarridan.java b/Mage.Sets/src/mage/cards/t/TyranidHarridan.java index ff111b9f1f..22d0f1dea3 100644 --- a/Mage.Sets/src/mage/cards/t/TyranidHarridan.java +++ b/Mage.Sets/src/mage/cards/t/TyranidHarridan.java @@ -59,7 +59,7 @@ class TyranidHarridanTriggeredAbility extends DealsDamageToAPlayerAllTriggeredAb TyranidHarridanTriggeredAbility() { super(new CreateTokenEffect(new TyranidGargoyleToken()), filter, false, SetTargetPointer.NONE, true); - this.setTriggerPhrase("Shrieking Gargoyles"); + this.withFlavorWord("Shrieking Gargoyles"); } private TyranidHarridanTriggeredAbility(final TyranidHarridanTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/v/VexilusPraetor.java b/Mage.Sets/src/mage/cards/v/VexilusPraetor.java index 4206ff8508..ba061fc0f1 100644 --- a/Mage.Sets/src/mage/cards/v/VexilusPraetor.java +++ b/Mage.Sets/src/mage/cards/v/VexilusPraetor.java @@ -22,7 +22,7 @@ import java.util.UUID; */ public final class VexilusPraetor extends CardImpl { - private static final FilterPermanent filter = new FilterControlledPermanent("commanders you control"); + private static final FilterPermanent filter = new FilterControlledPermanent("commanders"); static { filter.add(CommanderPredicate.instance); diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index c2b7f6c09c..7f91b53e7d 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -58,7 +58,7 @@ public class VerifyCardDataTest { private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class); - private static final String FULL_ABILITIES_CHECK_SET_CODE = "J22"; // check all abilities and output cards with wrong abilities texts; + private static final String FULL_ABILITIES_CHECK_SET_CODE = "40K"; // check all abilities and output cards with wrong abilities texts; 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 diff --git a/Mage/src/main/java/mage/abilities/AbilityImpl.java b/Mage/src/main/java/mage/abilities/AbilityImpl.java index 0b873fdaf2..6be4340c52 100644 --- a/Mage/src/main/java/mage/abilities/AbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilityImpl.java @@ -2,6 +2,7 @@ package mage.abilities; import mage.MageIdentifier; import mage.MageObject; +import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.costs.*; import mage.abilities.costs.common.PayLifeCost; @@ -821,7 +822,7 @@ public abstract class AbilityImpl implements Ability { rule = ruleStart; } String prefix; - if (this instanceof TriggeredAbility) { + if (this instanceof TriggeredAbility || this instanceof EntersBattlefieldAbility) { prefix = null; } else if (abilityWord != null) { prefix = abilityWord.formatWord(); diff --git a/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java index 4b353fa888..2205aa7a0d 100644 --- a/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java +++ b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java @@ -6,9 +6,9 @@ import mage.abilities.condition.Condition; import mage.abilities.effects.Effect; import mage.abilities.effects.EntersBattlefieldEffect; import mage.constants.Zone; +import mage.util.CardUtil; /** - * * @author BetaSteward_at_googlemail.com */ public class EntersBattlefieldAbility extends StaticAbility { @@ -21,9 +21,8 @@ public class EntersBattlefieldAbility extends StaticAbility { } /** - * - * @param effect effect that happens when the permanent enters the - * battlefield + * @param effect effect that happens when the permanent enters the + * battlefield * @param optional */ public EntersBattlefieldAbility(Effect effect, boolean optional) { @@ -39,14 +38,13 @@ public class EntersBattlefieldAbility extends StaticAbility { } /** - * - * @param effect effect that happens when the permanent enters the - * battlefield + * @param effect effect that happens when the permanent enters the + * battlefield * @param optional - * @param condition only if this condition is true, the effect will happen + * @param condition only if this condition is true, the effect will happen * @param abilityRule rule for this ability (no text from effects will be - * added) - * @param effectText this text will be used for the EnterBattlefieldEffect + * added) + * @param effectText this text will be used for the EnterBattlefieldEffect */ public EntersBattlefieldAbility(Effect effect, boolean optional, Condition condition, String abilityRule, String effectText) { super(Zone.ALL, new EntersBattlefieldEffect(effect, condition, effectText, true, optional)); @@ -83,7 +81,19 @@ public class EntersBattlefieldAbility extends StaticAbility { return abilityRule; } String superRule = super.getRule(); - return (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") + " the battlefield" - + (!superRule.isEmpty() && superRule.charAt(0) == ' ' ? "" : " ") + superRule; + String prefix; + if (abilityWord != null) { + prefix = abilityWord.formatWord(); + } else if (flavorWord != null) { + prefix = CardUtil.italicizeWithEmDash(flavorWord); + } else { + prefix = null; + } + String rule = (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") + + " the battlefield" + (!superRule.isEmpty() && superRule.charAt(0) == ' ' ? "" : " ") + superRule; + if (prefix != null) { + return prefix + CardUtil.getTextWithFirstCharUpperCase(rule); + } + return rule; } } diff --git a/Mage/src/main/java/mage/game/permanent/token/BlueHorrorToken.java b/Mage/src/main/java/mage/game/permanent/token/BlueHorrorToken.java index 980103a1e8..59a7169470 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BlueHorrorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BlueHorrorToken.java @@ -15,7 +15,7 @@ import mage.target.common.TargetAnyTarget; public final class BlueHorrorToken extends TokenImpl { public BlueHorrorToken() { - super("Blue Horror", "2/2 blue and red Demon Horror creature token named Blue Horror. It has \"Whenever you cast an instant or sorcery spell, this creature deals 1 damage to any target.\""); + super("Blue Horror", "2/2 blue and red Demon Horror creature token named Blue Horror with \"Whenever you cast an instant or sorcery spell, this creature deals 1 damage to any target.\""); cardType.add(CardType.CREATURE); color.setBlue(true); color.setRed(true); diff --git a/Mage/src/main/java/mage/game/permanent/token/TyranidGargoyleToken.java b/Mage/src/main/java/mage/game/permanent/token/TyranidGargoyleToken.java index 86111bdf5d..06e8c0cac0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TyranidGargoyleToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TyranidGargoyleToken.java @@ -13,7 +13,7 @@ import java.util.Arrays; public final class TyranidGargoyleToken extends TokenImpl { public TyranidGargoyleToken() { - super("Tyranid Gargoyle Token", "1/1 blue Tyranid creature token with flying"); + super("Tyranid Gargoyle Token", "1/1 blue Tyranid Gargoyle creature token with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); subtype.add(SubType.TYRANID); diff --git a/Mage/src/main/java/mage/game/permanent/token/WhiteAstartesWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/WhiteAstartesWarriorToken.java index 2a8cfaa6d2..94bc53bd85 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WhiteAstartesWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WhiteAstartesWarriorToken.java @@ -13,7 +13,7 @@ import java.util.Arrays; public final class WhiteAstartesWarriorToken extends TokenImpl { public WhiteAstartesWarriorToken() { - super("Astartes Warrior Token", "2/2 white Astartes Warrior creature tokens with vigilance"); + super("Astartes Warrior Token", "2/2 white Astartes Warrior creature token with vigilance"); cardType.add(CardType.CREATURE); color.setWhite(true); subtype.add(SubType.ASTARTES);