From f3d643a351ec89cf165442f592ec51f8f218224e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 5 Oct 2021 08:20:37 -0400 Subject: [PATCH] [MID] a few more text fixes --- Mage.Sets/src/mage/cards/b/BereavedSurvivor.java | 2 +- .../src/mage/cards/d/DennickPiousApparition.java | 6 +++++- .../src/mage/cards/f/FrenziedTrapbreaker.java | 2 ++ Mage.Sets/src/mage/cards/l/LuminousPhantom.java | 15 +++++++++++---- Mage.Sets/src/mage/cards/p/PhantomCarriage.java | 2 +- Mage.Sets/src/mage/cards/s/SunstreakPhoenix.java | 2 +- .../test/java/mage/verify/VerifyCardDataTest.java | 2 +- .../common/CantBeCounteredControlledEffect.java | 9 +++++---- 8 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BereavedSurvivor.java b/Mage.Sets/src/mage/cards/b/BereavedSurvivor.java index 453f517c4f..69b57d3eda 100644 --- a/Mage.Sets/src/mage/cards/b/BereavedSurvivor.java +++ b/Mage.Sets/src/mage/cards/b/BereavedSurvivor.java @@ -32,7 +32,7 @@ public final class BereavedSurvivor extends CardImpl { this.addAbility(new DiesCreatureTriggeredAbility( new TransformSourceEffect(true), false, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE - )); + ).setTriggerPhrase("When another creature you control dies, ")); } private BereavedSurvivor(final BereavedSurvivor card) { diff --git a/Mage.Sets/src/mage/cards/d/DennickPiousApparition.java b/Mage.Sets/src/mage/cards/d/DennickPiousApparition.java index ec7c305155..62ec87232d 100644 --- a/Mage.Sets/src/mage/cards/d/DennickPiousApparition.java +++ b/Mage.Sets/src/mage/cards/d/DennickPiousApparition.java @@ -12,6 +12,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; +import mage.filter.StaticFilters; import java.util.UUID; @@ -36,7 +37,10 @@ public final class DennickPiousApparition extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever one or more creature cards are put into graveyards from anywhere, investigate. This ability triggers only once each turn. - this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility(new InvestigateEffect(1), false, TargetController.ANY).setTriggersOnce(true)); + this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility( + new InvestigateEffect(1), false, + StaticFilters.FILTER_CARD_CREATURE, TargetController.ANY + ).setTriggersOnce(true).setTriggerPhrase("Whenever one or more creature cards are put into graveyards from anywhere, ")); // If Dennick, Pious Apparition would be put into a graveyard from anywhere, exile it instead. this.addAbility(new PutIntoGraveFromAnywhereSourceAbility(new ExileSourceEffect().setText("exile it instead"))); diff --git a/Mage.Sets/src/mage/cards/f/FrenziedTrapbreaker.java b/Mage.Sets/src/mage/cards/f/FrenziedTrapbreaker.java index 3eaf2dae55..40af95b9df 100644 --- a/Mage.Sets/src/mage/cards/f/FrenziedTrapbreaker.java +++ b/Mage.Sets/src/mage/cards/f/FrenziedTrapbreaker.java @@ -13,6 +13,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate; import mage.target.TargetPermanent; @@ -44,6 +45,7 @@ public final class FrenziedTrapbreaker extends CardImpl { // {1}, Sacrifice Frenzied Trapbreaker: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new GenericManaCost(1)); ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); // Whenever Frenzied Trapbreaker attacks, destroy target artifact or enchantment defending player controls. diff --git a/Mage.Sets/src/mage/cards/l/LuminousPhantom.java b/Mage.Sets/src/mage/cards/l/LuminousPhantom.java index 8819843a1b..577fd9493f 100644 --- a/Mage.Sets/src/mage/cards/l/LuminousPhantom.java +++ b/Mage.Sets/src/mage/cards/l/LuminousPhantom.java @@ -10,7 +10,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.StaticFilters; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; import java.util.UUID; @@ -19,6 +21,13 @@ import java.util.UUID; */ public final class LuminousPhantom extends CardImpl { + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("another creature you control"); + + static { + filter.add(AnotherPredicate.instance); + } + public LuminousPhantom(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); @@ -34,9 +43,7 @@ public final class LuminousPhantom extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever another creature you control leaves the battlefield, you gain 1 life. - this.addAbility(new LeavesBattlefieldAllTriggeredAbility( - new GainLifeEffect(1), StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE - )); + this.addAbility(new LeavesBattlefieldAllTriggeredAbility(new GainLifeEffect(1), filter)); // If Luminous Phantom would be put into a graveyard from anywhere, exile it instead. this.addAbility(new PutIntoGraveFromAnywhereSourceAbility(new ExileSourceEffect().setText("exile it instead"))); diff --git a/Mage.Sets/src/mage/cards/p/PhantomCarriage.java b/Mage.Sets/src/mage/cards/p/PhantomCarriage.java index d590a53c76..b70df5efde 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomCarriage.java +++ b/Mage.Sets/src/mage/cards/p/PhantomCarriage.java @@ -66,7 +66,7 @@ class PhantomCarriageEffect extends SearchEffect { public PhantomCarriageEffect() { super(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), Outcome.Neutral); - staticText = "search your library for a card with flashback or disturb, put that card into your graveyard, then shuffle"; + staticText = "search your library for a card with flashback or disturb, put it into your graveyard, then shuffle"; } public PhantomCarriageEffect(final PhantomCarriageEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SunstreakPhoenix.java b/Mage.Sets/src/mage/cards/s/SunstreakPhoenix.java index 13bc276d94..99d7ad292e 100644 --- a/Mage.Sets/src/mage/cards/s/SunstreakPhoenix.java +++ b/Mage.Sets/src/mage/cards/s/SunstreakPhoenix.java @@ -37,7 +37,7 @@ public final class SunstreakPhoenix extends CardImpl { this.addAbility(new BecomesDayOrNightTriggeredAbility( Zone.GRAVEYARD, new DoIfCostPaid( - new ReturnSourceFromGraveyardToBattlefieldEffect(true), + new ReturnSourceFromGraveyardToBattlefieldEffect(true, false), new ManaCostsImpl<>("{1}{R}") ) )); diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index ec96e97b39..ed37b8723f 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 = "MIC"; // check all abilities and output cards with wrong abilities texts; + private static final String FULL_ABILITIES_CHECK_SET_CODE = "MID"; // check all abilities and output cards with wrong abilities texts; private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run private static final boolean ONLY_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages diff --git a/Mage/src/main/java/mage/abilities/effects/common/CantBeCounteredControlledEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeCounteredControlledEffect.java index 1db6300d9f..1b2eafcf90 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CantBeCounteredControlledEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CantBeCounteredControlledEffect.java @@ -1,4 +1,3 @@ - package mage.abilities.effects.common; import mage.MageObject; @@ -10,11 +9,9 @@ import mage.filter.FilterObject; import mage.filter.FilterSpell; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; /** - * * @author BetaSteward_at_googlemail.com */ public class CantBeCounteredControlledEffect extends ContinuousRuleModifyingEffectImpl { @@ -77,7 +74,11 @@ public class CantBeCounteredControlledEffect extends ContinuousRuleModifyingEffe private void setText() { StringBuilder sb = new StringBuilder(); - sb.append(filterTarget.getMessage()).append(" can't be countered"); + sb.append(filterTarget.getMessage()); + if (!filterTarget.getMessage().contains("you control")) { + sb.append(" you control"); + } + sb.append(" can't be countered"); if (filterSource != null) { sb.append(" by ").append(filterSource.getMessage()); }