From daf77b2ee84c19f29abc1f6d5d5dc372b4fd2ff9 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 22 Jun 2021 09:20:05 -0400 Subject: [PATCH] [MH2] various text fixes --- .../src/mage/cards/a/AeveProgenitorOoze.java | 2 +- Mage.Sets/src/mage/cards/a/ArcusAcolyte.java | 2 +- .../a/Asmoranomardicadaistinaculdacar.java | 4 +- Mage.Sets/src/mage/cards/b/BarbedSpike.java | 2 +- .../src/mage/cards/c/ChanceEncounter.java | 2 +- Mage.Sets/src/mage/cards/d/Damn.java | 12 +++-- Mage.Sets/src/mage/cards/d/Dermotaxi.java | 9 ++-- Mage.Sets/src/mage/cards/d/DiamondLion.java | 4 +- Mage.Sets/src/mage/cards/d/DihadasPloy.java | 4 +- .../src/mage/cards/d/DiscipleOfTheSun.java | 2 +- .../mage/cards/e/EnchantresssPresence.java | 2 +- .../src/mage/cards/f/FiligreeAttendant.java | 2 +- Mage.Sets/src/mage/cards/f/FoulWatcher.java | 2 +- Mage.Sets/src/mage/cards/f/FoundryHelix.java | 8 +-- Mage.Sets/src/mage/cards/g/GaeasWill.java | 6 +-- Mage.Sets/src/mage/cards/k/Kaleidoscorch.java | 3 +- Mage.Sets/src/mage/cards/l/LateToDinner.java | 4 +- Mage.Sets/src/mage/cards/m/Monoskelion.java | 2 +- Mage.Sets/src/mage/cards/n/Necrogoyf.java | 2 +- .../src/mage/cards/p/PhantasmalDreadmaw.java | 2 +- .../src/mage/cards/r/RavingVisionary.java | 3 +- Mage.Sets/src/mage/cards/r/RiseAndShine.java | 2 +- Mage.Sets/src/mage/cards/s/ScionOfDraco.java | 1 + Mage.Sets/src/mage/cards/s/SeaDrake.java | 13 +++-- .../src/mage/cards/s/SteelDromedary.java | 13 +++-- .../src/mage/cards/t/TerritorialKavu.java | 7 +-- .../src/mage/cards/t/ThrastaTempestsRoar.java | 52 ++++++++++++------- .../src/mage/cards/t/TizerusCharger.java | 2 +- Mage.Sets/src/mage/cards/u/Upheaval.java | 2 +- .../src/mage/cards/y/YoungNecromancer.java | 2 +- .../java/mage/verify/VerifyCardDataTest.java | 2 +- .../effects/common/GainLifeEffect.java | 21 ++++---- .../common/ReturnToHandTargetEffect.java | 2 +- .../DiscardCardYouChooseTargetEffect.java | 2 +- .../main/java/mage/filter/StaticFilters.java | 6 +++ .../TargetCreatureOrPlaneswalkerAmount.java | 2 +- 36 files changed, 121 insertions(+), 87 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AeveProgenitorOoze.java b/Mage.Sets/src/mage/cards/a/AeveProgenitorOoze.java index 4afd352c44..07e16ca976 100644 --- a/Mage.Sets/src/mage/cards/a/AeveProgenitorOoze.java +++ b/Mage.Sets/src/mage/cards/a/AeveProgenitorOoze.java @@ -66,7 +66,7 @@ class AeveProgenitorOozeNonLegendaryEffect extends ContinuousEffectImpl { public AeveProgenitorOozeNonLegendaryEffect() { super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); - this.staticText = "{this} isn't legendary as long as it's a token"; + this.staticText = "{this} isn't legendary if it's a token"; } private AeveProgenitorOozeNonLegendaryEffect(final AeveProgenitorOozeNonLegendaryEffect effect) { diff --git a/Mage.Sets/src/mage/cards/a/ArcusAcolyte.java b/Mage.Sets/src/mage/cards/a/ArcusAcolyte.java index 0ae973f2d0..14489390be 100644 --- a/Mage.Sets/src/mage/cards/a/ArcusAcolyte.java +++ b/Mage.Sets/src/mage/cards/a/ArcusAcolyte.java @@ -52,7 +52,7 @@ public final class ArcusAcolyte extends CardImpl { this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( new OutlastAbility(new ManaCostsImpl<>("{G/W}")), Duration.WhileOnBattlefield, filter, true - ))); + ).setText("each other creature you control without a +1/+1 counter on it has outlast {G/W}"))); } private ArcusAcolyte(final ArcusAcolyte card) { diff --git a/Mage.Sets/src/mage/cards/a/Asmoranomardicadaistinaculdacar.java b/Mage.Sets/src/mage/cards/a/Asmoranomardicadaistinaculdacar.java index def750d9b3..9dd0609113 100644 --- a/Mage.Sets/src/mage/cards/a/Asmoranomardicadaistinaculdacar.java +++ b/Mage.Sets/src/mage/cards/a/Asmoranomardicadaistinaculdacar.java @@ -55,12 +55,12 @@ public final class Asmoranomardicadaistinaculdacar extends CardImpl { // As long as you've discarded a card this turn, you may pay {B/R} to cast this spell. this.addAbility(new AlternativeCostSourceAbility( new ManaCostsImpl<>("{B/R}"), ControllerDiscardedThisTurnCondition.instance, - "as long as you've discarded a card this turn, you may pay {B/R} to cast this spell" + "as long as you've discarded a card this turn, you may pay {B/R} to cast this spell." ).addHint(ControllerDiscardedHint.instance), new DiscardedCardWatcher()); // When Asmoranomardicadaistinaculdacar enters the battlefield, you may search your library for a card named The Underworld Cookbook, reveal it, put it into your hand, then shuffle. this.addAbility(new EntersBattlefieldTriggeredAbility( - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true) + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true), true )); // Sacrifice two Foods: Target creature deals 6 damage to itself. diff --git a/Mage.Sets/src/mage/cards/b/BarbedSpike.java b/Mage.Sets/src/mage/cards/b/BarbedSpike.java index dd91d3419d..a6e73afedc 100644 --- a/Mage.Sets/src/mage/cards/b/BarbedSpike.java +++ b/Mage.Sets/src/mage/cards/b/BarbedSpike.java @@ -32,7 +32,7 @@ public final class BarbedSpike extends CardImpl { this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(1, 0))); // Equip {2} - this.addAbility(new EquipAbility(1)); + this.addAbility(new EquipAbility(2)); } private BarbedSpike(final BarbedSpike card) { diff --git a/Mage.Sets/src/mage/cards/c/ChanceEncounter.java b/Mage.Sets/src/mage/cards/c/ChanceEncounter.java index 20801608a8..4f98a9d6c1 100644 --- a/Mage.Sets/src/mage/cards/c/ChanceEncounter.java +++ b/Mage.Sets/src/mage/cards/c/ChanceEncounter.java @@ -34,7 +34,7 @@ public final class ChanceEncounter extends CardImpl { // At the beginning of your upkeep, if Chance Encounter has ten or more luck counters on it, you win the game. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WinGameSourceControllerEffect(), TargetController.YOU, false); this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceHasCounterCondition(CounterType.LUCK, 10, Integer.MAX_VALUE), - "At the beginning of your upkeep, if {this} has ten or more luck counters on it, you win the game")); + "At the beginning of your upkeep, if {this} has ten or more luck counters on it, you win the game.")); } private ChanceEncounter(final ChanceEncounter card) { diff --git a/Mage.Sets/src/mage/cards/d/Damn.java b/Mage.Sets/src/mage/cards/d/Damn.java index 5a917b4f78..6e43afc5fb 100644 --- a/Mage.Sets/src/mage/cards/d/Damn.java +++ b/Mage.Sets/src/mage/cards/d/Damn.java @@ -8,10 +8,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.target.common.TargetCreaturePermanent; -import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; import java.util.UUID; +import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; + /** * @author jmharmon */ @@ -23,10 +24,15 @@ public final class Damn extends CardImpl { // Destroy target creature. A creature destroyed this way can’t be regenerated. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addEffect(new DestroyTargetEffect(true) + .setText("destroy target creature. A creature destroyed this way can't be regenerated")); // Overload {2}{W}{W} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of “target” with “each.”) - this.addAbility(new OverloadAbility(this, new DestroyAllEffect(FILTER_PERMANENT_CREATURES, true), new ManaCostsImpl("{2}{W}{W"))); + this.addAbility(new OverloadAbility( + this, + new DestroyAllEffect(FILTER_PERMANENT_CREATURES, true), + new ManaCostsImpl<>("{2}{W}{W") + )); } private Damn(final Damn card) { diff --git a/Mage.Sets/src/mage/cards/d/Dermotaxi.java b/Mage.Sets/src/mage/cards/d/Dermotaxi.java index 5a65bd2a42..b2448f0b5f 100644 --- a/Mage.Sets/src/mage/cards/d/Dermotaxi.java +++ b/Mage.Sets/src/mage/cards/d/Dermotaxi.java @@ -2,7 +2,7 @@ package mage.cards.d; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapTargetCost; import mage.abilities.effects.OneShotEffect; @@ -44,7 +44,10 @@ public final class Dermotaxi extends CardImpl { this.toughness = new MageInt(0); // Imprint — As Dermotaxi enters the battlefield, exile a creature card from a graveyard. - this.addAbility(new AsEntersBattlefieldAbility(new DermotaxiImprintEffect()).setAbilityWord(AbilityWord.IMPRINT)); + this.addAbility(new EntersBattlefieldAbility( + new DermotaxiImprintEffect(), null, "Imprint — As {this} " + + "enters the battlefield, exile a creature card from a graveyard.", "" + )); // Tap two untapped creatures you control: Until end of turn, Dermotaxi becomes a copy of the imprinted card, except it's a Vehicle artifact in addition to its other types. this.addAbility(new SimpleActivatedAbility( @@ -105,7 +108,7 @@ class DermotaxiCopyEffect extends OneShotEffect { DermotaxiCopyEffect() { super(Outcome.Benefit); - staticText = "until end of turn, {this} becomes a copy of the imprinted card, " + + staticText = "until end of turn, {this} becomes a copy of the exiled card, " + "except it's a Vehicle artifact in addition to its other types"; } diff --git a/Mage.Sets/src/mage/cards/d/DiamondLion.java b/Mage.Sets/src/mage/cards/d/DiamondLion.java index 17e04e94b3..af5e6761ac 100644 --- a/Mage.Sets/src/mage/cards/d/DiamondLion.java +++ b/Mage.Sets/src/mage/cards/d/DiamondLion.java @@ -5,6 +5,7 @@ import mage.Mana; import mage.abilities.costs.Cost; import mage.abilities.costs.common.DiscardHandCost; import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.mana.AddManaOfAnyColorEffect; import mage.abilities.effects.mana.BasicManaEffect; import mage.abilities.mana.ActivatedManaAbilityImpl; @@ -47,7 +48,8 @@ public final class DiamondLion extends CardImpl { class DiamondLionAbility extends ActivatedManaAbilityImpl { public DiamondLionAbility() { - super(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(3), new DiscardHandCost()); + super(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(3), new TapSourceCost()); + this.addCost(new DiscardHandCost()); this.addCost(new SacrificeSourceCost()); this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 3, 0)); } diff --git a/Mage.Sets/src/mage/cards/d/DihadasPloy.java b/Mage.Sets/src/mage/cards/d/DihadasPloy.java index 8c680cad0e..6ef4c4fa95 100644 --- a/Mage.Sets/src/mage/cards/d/DihadasPloy.java +++ b/Mage.Sets/src/mage/cards/d/DihadasPloy.java @@ -60,12 +60,12 @@ enum DihadasPloyValue implements DynamicValue { } @Override - public String getMessage() { + public String toString() { return "1"; } @Override - public String toString() { + public String getMessage() { return "cards you've discarded this turn"; } } diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfTheSun.java b/Mage.Sets/src/mage/cards/d/DiscipleOfTheSun.java index 9a36d05534..effc8327d5 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfTheSun.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfTheSun.java @@ -22,7 +22,7 @@ import java.util.UUID; */ public final class DiscipleOfTheSun extends CardImpl { - private static final FilterCard filter = new FilterPermanentCard("permanent card with mana value 3 or less"); + private static final FilterCard filter = new FilterPermanentCard("permanent card with mana value 3 or less from your graveyard"); static { filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4)); diff --git a/Mage.Sets/src/mage/cards/e/EnchantresssPresence.java b/Mage.Sets/src/mage/cards/e/EnchantresssPresence.java index dd69068daf..be5ca2872a 100644 --- a/Mage.Sets/src/mage/cards/e/EnchantresssPresence.java +++ b/Mage.Sets/src/mage/cards/e/EnchantresssPresence.java @@ -15,7 +15,7 @@ import mage.filter.FilterSpell; */ public final class EnchantresssPresence extends CardImpl { - private static final FilterSpell filter = new FilterSpell("an Enchantment spell"); + private static final FilterSpell filter = new FilterSpell("an enchantment spell"); static { filter.add(CardType.ENCHANTMENT.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/f/FiligreeAttendant.java b/Mage.Sets/src/mage/cards/f/FiligreeAttendant.java index a6cebf16be..112bbd339e 100644 --- a/Mage.Sets/src/mage/cards/f/FiligreeAttendant.java +++ b/Mage.Sets/src/mage/cards/f/FiligreeAttendant.java @@ -29,7 +29,7 @@ public final class FiligreeAttendant extends CardImpl { // Filigree Attendant's power is equal to the number of artifacts you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect( ArtifactYouControlCount.instance, Duration.EndOfGame, SubLayer.CharacteristicDefining_7a - ))); + ).setText("{this}'s power is equal to the number of artifacts you control"))); } private FiligreeAttendant(final FiligreeAttendant card) { diff --git a/Mage.Sets/src/mage/cards/f/FoulWatcher.java b/Mage.Sets/src/mage/cards/f/FoulWatcher.java index 51959963cc..71f022b921 100644 --- a/Mage.Sets/src/mage/cards/f/FoulWatcher.java +++ b/Mage.Sets/src/mage/cards/f/FoulWatcher.java @@ -40,7 +40,7 @@ public final class FoulWatcher extends CardImpl { // Delirium — Foul Watcher gets +1/+0 as long as there are four more card types among cards in your graveyard. this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance, - "{this} gets +1/+0 as long as there are four more card types among cards in your graveyard" + "{this} gets +1/+0 as long as there are four or more card types among cards in your graveyard" )).setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardHint.YOU)); } diff --git a/Mage.Sets/src/mage/cards/f/FoundryHelix.java b/Mage.Sets/src/mage/cards/f/FoundryHelix.java index 6460d9aadf..7a4fec404e 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryHelix.java +++ b/Mage.Sets/src/mage/cards/f/FoundryHelix.java @@ -1,7 +1,5 @@ package mage.cards.f; -import java.util.UUID; - import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.Cost; @@ -12,13 +10,15 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetAnyTarget; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** - * * @author weirddan455 */ public final class FoundryHelix extends CardImpl { @@ -27,7 +27,7 @@ public final class FoundryHelix extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{W}"); // As an additional cost to cast this spell, sacrifice a permanent. - this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent())); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_SHORT_TEXT))); // Foundry Helix deals 4 damage to any target. If the sacrificed permanent was an artifact, you gain 4 life. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); diff --git a/Mage.Sets/src/mage/cards/g/GaeasWill.java b/Mage.Sets/src/mage/cards/g/GaeasWill.java index 4ac73067d4..3ef6828f21 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasWill.java +++ b/Mage.Sets/src/mage/cards/g/GaeasWill.java @@ -30,7 +30,7 @@ public final class GaeasWill extends CardImpl { this.color.setGreen(true); // Suspend 4—{G} - this.addAbility(new SuspendAbility(4, new ManaCostsImpl("G"), this)); + this.addAbility(new SuspendAbility(4, new ManaCostsImpl<>("G"), this)); // Until end of turn, you may play land cards and cast spells from your graveyard. this.getSpellAbility().addEffect(new GaeasWillGraveyardEffect()); @@ -57,7 +57,7 @@ class GaeasWillGraveyardEffect extends ContinuousEffectImpl { public GaeasWillGraveyardEffect(Duration duration) { super(duration, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit); - this.staticText = "Until end of turn, you may play land cards and cast spells from your graveyard"; + this.staticText = "Until end of turn, you may play lands and cast spells from your graveyard"; } private GaeasWillGraveyardEffect(final GaeasWillGraveyardEffect effect) { @@ -84,7 +84,7 @@ class GaeassWillReplacementEffect extends ReplacementEffectImpl { public GaeassWillReplacementEffect() { super(Duration.EndOfTurn, Outcome.Detriment); - this.staticText = "If a card would be put into your graveyard from anywhere this turn, exile that card instead"; + this.staticText = "
If a card would be put into your graveyard from anywhere this turn, exile that card instead"; } public GaeassWillReplacementEffect(final GaeassWillReplacementEffect effect) { diff --git a/Mage.Sets/src/mage/cards/k/Kaleidoscorch.java b/Mage.Sets/src/mage/cards/k/Kaleidoscorch.java index b33c8799e4..8eaf49672e 100644 --- a/Mage.Sets/src/mage/cards/k/Kaleidoscorch.java +++ b/Mage.Sets/src/mage/cards/k/Kaleidoscorch.java @@ -22,7 +22,8 @@ public final class Kaleidoscorch extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); // Converge — Kaleidoscorch deals X damage to any target, where X is the number of colors of mana spent to cast this spell. - this.getSpellAbility().addEffect(new DamageTargetEffect(ColorsOfManaSpentToCastCount.getInstance())); + this.getSpellAbility().addEffect(new DamageTargetEffect(ColorsOfManaSpentToCastCount.getInstance()) + .setText("{this} deals X damage to any target, where X is the number of colors of mana spent to cast this spell")); this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE); diff --git a/Mage.Sets/src/mage/cards/l/LateToDinner.java b/Mage.Sets/src/mage/cards/l/LateToDinner.java index ad28fd0090..8d776db3f9 100644 --- a/Mage.Sets/src/mage/cards/l/LateToDinner.java +++ b/Mage.Sets/src/mage/cards/l/LateToDinner.java @@ -7,7 +7,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.StaticFilters; import mage.game.permanent.token.FoodToken; -import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInYourGraveyard; import java.util.UUID; @@ -22,7 +22,7 @@ public final class LateToDinner extends CardImpl { // Return target creature card from your graveyard to the battlefield. Create a Food token. this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken())); - this.getSpellAbility().addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); } private LateToDinner(final LateToDinner card) { diff --git a/Mage.Sets/src/mage/cards/m/Monoskelion.java b/Mage.Sets/src/mage/cards/m/Monoskelion.java index dc8fe48e1c..bcbaebec14 100644 --- a/Mage.Sets/src/mage/cards/m/Monoskelion.java +++ b/Mage.Sets/src/mage/cards/m/Monoskelion.java @@ -35,7 +35,7 @@ public final class Monoskelion extends CardImpl { )); // {1}, Remove a +1/+1 counter from Monoskelion: Monoskelion deals 1 damage to any target. - Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(1), new GenericManaCost(1)); + Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(1, "it"), new GenericManaCost(1)); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/n/Necrogoyf.java b/Mage.Sets/src/mage/cards/n/Necrogoyf.java index 7201dab97d..70434c06f7 100644 --- a/Mage.Sets/src/mage/cards/n/Necrogoyf.java +++ b/Mage.Sets/src/mage/cards/n/Necrogoyf.java @@ -38,7 +38,7 @@ public final class Necrogoyf extends CardImpl { // At the beginning of each player's upkeep, that player discards a card. this.addAbility(new BeginningOfUpkeepTriggeredAbility( Zone.BATTLEFIELD, new DiscardTargetEffect(1), - TargetController.EACH_PLAYER, false, true + TargetController.ACTIVE, false, true )); // Madness {1}{B}{B} diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalDreadmaw.java b/Mage.Sets/src/mage/cards/p/PhantasmalDreadmaw.java index 093bc7dd72..c8300a4727 100644 --- a/Mage.Sets/src/mage/cards/p/PhantasmalDreadmaw.java +++ b/Mage.Sets/src/mage/cards/p/PhantasmalDreadmaw.java @@ -28,7 +28,7 @@ public final class PhantasmalDreadmaw extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // When Phantasmal Dreadmaw becomes the target of a spell or ability, sacrifice it. - this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect())); + this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect().setText("sacrifice it"))); } private PhantasmalDreadmaw(final PhantasmalDreadmaw card) { diff --git a/Mage.Sets/src/mage/cards/r/RavingVisionary.java b/Mage.Sets/src/mage/cards/r/RavingVisionary.java index e5086f9888..860b269fbf 100644 --- a/Mage.Sets/src/mage/cards/r/RavingVisionary.java +++ b/Mage.Sets/src/mage/cards/r/RavingVisionary.java @@ -12,6 +12,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.abilities.hint.common.CardTypesInGraveyardHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; @@ -44,7 +45,7 @@ public final class RavingVisionary extends CardImpl { new ManaCostsImpl<>("{2}{U}"), DeliriumCondition.instance ); ability.addCost(new TapSourceCost()); - this.addAbility(ability.addHint(CardTypesInGraveyardHint.YOU)); + this.addAbility(ability.addHint(CardTypesInGraveyardHint.YOU).setAbilityWord(AbilityWord.DELIRIUM)); } private RavingVisionary(final RavingVisionary card) { diff --git a/Mage.Sets/src/mage/cards/r/RiseAndShine.java b/Mage.Sets/src/mage/cards/r/RiseAndShine.java index dddb5f8df1..a1606fa21e 100644 --- a/Mage.Sets/src/mage/cards/r/RiseAndShine.java +++ b/Mage.Sets/src/mage/cards/r/RiseAndShine.java @@ -45,7 +45,7 @@ public final class RiseAndShine extends CardImpl { ).setText("Target noncreature artifact you control becomes")); this.getSpellAbility().addEffect(new SetPowerToughnessTargetEffect( 0, 0, Duration.EndOfGame - ).setText("a 0/0 artifact creature")); + ).setText(" a 0/0 artifact creature")); this.getSpellAbility().addEffect(new AddCountersTargetEffect( CounterType.P1P1.createInstance(4) ).setText("Put four +1/+1 counters on each artifact that became a creature this way")); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfDraco.java b/Mage.Sets/src/mage/cards/s/ScionOfDraco.java index 7c60c36034..4e22d667d2 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfDraco.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfDraco.java @@ -36,6 +36,7 @@ public final class ScionOfDraco extends CardImpl { // Domain — This spell costs {2} less to cast for each basic land type among lands you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SpellCostReductionForEachSourceEffect(2, xValue) + .setText("this spell costs {2} less to cast for each basic land type among lands you control") ).addHint(DomainHint.instance).setAbilityWord(AbilityWord.DOMAIN)); // Flying diff --git a/Mage.Sets/src/mage/cards/s/SeaDrake.java b/Mage.Sets/src/mage/cards/s/SeaDrake.java index 762c71e836..fc9034101f 100644 --- a/Mage.Sets/src/mage/cards/s/SeaDrake.java +++ b/Mage.Sets/src/mage/cards/s/SeaDrake.java @@ -1,7 +1,6 @@ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -11,18 +10,18 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; -/** - * - * @author LoneFox +import java.util.UUID; +/** + * @author LoneFox */ public final class SeaDrake extends CardImpl { public SeaDrake(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); this.subtype.add(SubType.DRAKE); this.power = new MageInt(4); this.toughness = new MageInt(3); @@ -31,7 +30,7 @@ public final class SeaDrake extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Sea Drake enters the battlefield, return two target lands you control to their owner's hand. Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); - ability.addTarget(new TargetPermanent(2, 2, new FilterControlledLandPermanent(), false)); + ability.addTarget(new TargetPermanent(2, StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SteelDromedary.java b/Mage.Sets/src/mage/cards/s/SteelDromedary.java index ec19ff467c..e813bb3612 100644 --- a/Mage.Sets/src/mage/cards/s/SteelDromedary.java +++ b/Mage.Sets/src/mage/cards/s/SteelDromedary.java @@ -10,6 +10,7 @@ import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -39,9 +40,11 @@ public final class SteelDromedary extends CardImpl { this.toughness = new MageInt(2); // Steel Dromedary enters the battlefield tapped with two +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect( - CounterType.P1P1.createInstance(2) - ), "with two +1/+1 counters on it")); + Ability ability = new EntersBattlefieldAbility( + new TapSourceEffect(), "tapped with two +1/+1 counters on it" + ); + ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2))); + this.addAbility(ability); // Steel Dromedary doesn't untap during your untap step if it has a +1/+1 counter on it. this.addAbility(new SimpleStaticAbility(new ConditionalContinuousRuleModifyingEffect( @@ -49,7 +52,7 @@ public final class SteelDromedary extends CardImpl { ).setText("{this} doesn't untap during your untap step if it has a +1/+1 counter on it"))); // At the beginning of combat on your turn, you may move a +1/+1 counter from Steel Dromedary onto target creature. - Ability ability = new BeginningOfCombatTriggeredAbility( + ability = new BeginningOfCombatTriggeredAbility( new SteelDromedaryEffect(), TargetController.YOU, true ); ability.addTarget(new TargetCreaturePermanent()); @@ -70,7 +73,7 @@ class SteelDromedaryEffect extends OneShotEffect { SteelDromedaryEffect() { super(Outcome.Benefit); - staticText = "move a +1/+1 counter from {this} onto target creature"; + staticText = "you may move a +1/+1 counter from {this} onto target creature"; } private SteelDromedaryEffect(final SteelDromedaryEffect effect) { diff --git a/Mage.Sets/src/mage/cards/t/TerritorialKavu.java b/Mage.Sets/src/mage/cards/t/TerritorialKavu.java index 136ee8f1b1..4b5ef1fee7 100644 --- a/Mage.Sets/src/mage/cards/t/TerritorialKavu.java +++ b/Mage.Sets/src/mage/cards/t/TerritorialKavu.java @@ -15,10 +15,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.abilities.hint.common.DomainHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; +import mage.constants.*; import mage.target.common.TargetCardInGraveyard; import java.util.UUID; @@ -40,7 +37,7 @@ public final class TerritorialKavu extends CardImpl { // Domain — Territorial Kavu's power and toughness are each equal to the number of basic land types among lands you control. this.addAbility(new SimpleStaticAbility( Zone.ALL, new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame) - ).addHint(DomainHint.instance)); + ).addHint(DomainHint.instance).setAbilityWord(AbilityWord.DOMAIN)); // Whenever Territorial Kavu attacks, choose one — // • Discard a card. If you do, draw a card. diff --git a/Mage.Sets/src/mage/cards/t/ThrastaTempestsRoar.java b/Mage.Sets/src/mage/cards/t/ThrastaTempestsRoar.java index 240f941352..dba8b836b7 100644 --- a/Mage.Sets/src/mage/cards/t/ThrastaTempestsRoar.java +++ b/Mage.Sets/src/mage/cards/t/ThrastaTempestsRoar.java @@ -1,11 +1,10 @@ package mage.cards.t; -import java.util.UUID; - import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; @@ -19,13 +18,18 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.watchers.common.CastSpellLastTurnWatcher; +import java.util.UUID; + /** * @author Fubs */ public final class ThrastaTempestsRoar extends CardImpl { + private static final ValueHint hint = new ValueHint("Spells cast this turn", ThrastaDynamicValue.instance); + public ThrastaTempestsRoar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{10}{G}{G}"); addSuperType(SuperType.LEGENDARY); @@ -33,33 +37,36 @@ public final class ThrastaTempestsRoar extends CardImpl { this.power = new MageInt(7); this.toughness = new MageInt(7); - //This spell costs 3 less to cast for each other spell cast this turn - ThrastaDynamicValue spellCastCount = new ThrastaDynamicValue(); - //spellCastCount does not need -1 because cast count increases only after current spell cast/reduction. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SpellCostReductionForEachSourceEffect(3, spellCastCount)) - .addHint(new ValueHint("spell cast", spellCastCount)) - ); + // This spell costs 3 less to cast for each other spell cast this turn + this.addAbility(new SimpleStaticAbility( + Zone.ALL, new SpellCostReductionForEachSourceEffect(3, ThrastaDynamicValue.instance) + ).addHint(hint)); - //Trample, Haste, and Trample over planeswalkers + // Trample, Haste, and Trample over planeswalkers this.addAbility(TrampleAbility.getInstance()); this.addAbility(HasteAbility.getInstance()); this.addAbility(TrampleOverPlaneswalkersAbility.getInstance()); - //Thrasta has hexproof as long as it entered the battlefield this turn. - this.addAbility(new AsEntersBattlefieldAbility(new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.EndOfTurn))); + // Thrasta has hexproof as long as it entered the battlefield this turn. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield), + ThrastaCondition.instance, "{this} has hexproof as long as it entered the battlefield this turn" + ))); } - private ThrastaTempestsRoar(final mage.cards.t.ThrastaTempestsRoar card) { + private ThrastaTempestsRoar(final ThrastaTempestsRoar card) { super(card); } @Override public ThrastaTempestsRoar copy() { - return new mage.cards.t.ThrastaTempestsRoar(this); + return new ThrastaTempestsRoar(this); } } -class ThrastaDynamicValue implements DynamicValue { +enum ThrastaDynamicValue implements DynamicValue { + instance; + @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class); @@ -71,7 +78,7 @@ class ThrastaDynamicValue implements DynamicValue { @Override public ThrastaDynamicValue copy() { - return new ThrastaDynamicValue(); + return this; } @Override @@ -81,7 +88,16 @@ class ThrastaDynamicValue implements DynamicValue { @Override public String getMessage() { - return "spells cast this turn"; + return "other spell cast this turn"; } - } + +enum ThrastaCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = source.getSourcePermanentIfItStillExists(game); + return permanent != null && permanent.getTurnsOnBattlefield() == 0; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/t/TizerusCharger.java b/Mage.Sets/src/mage/cards/t/TizerusCharger.java index 856ca85927..8b863cdebd 100644 --- a/Mage.Sets/src/mage/cards/t/TizerusCharger.java +++ b/Mage.Sets/src/mage/cards/t/TizerusCharger.java @@ -40,7 +40,7 @@ public final class TizerusCharger extends CardImpl { // Tizerus Charger escapes with your choice of a +1/+1 counter or a flying counter on it. this.addAbility(new EntersBattlefieldAbility( new TizerusChargerEffect(), null, "{this} escapes " + - "with your choice of a +1/+1 counter or a flying counter on it", "" + "with your choice of a +1/+1 counter or a flying counter on it.", "" )); } diff --git a/Mage.Sets/src/mage/cards/u/Upheaval.java b/Mage.Sets/src/mage/cards/u/Upheaval.java index ed053c5db7..912831e945 100644 --- a/Mage.Sets/src/mage/cards/u/Upheaval.java +++ b/Mage.Sets/src/mage/cards/u/Upheaval.java @@ -17,7 +17,7 @@ public final class Upheaval extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}"); // Return all permanents to their owners' hands. - this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.FILTER_PERMANENT)); + this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.FILTER_PERMANENTS)); } private Upheaval(final Upheaval card) { diff --git a/Mage.Sets/src/mage/cards/y/YoungNecromancer.java b/Mage.Sets/src/mage/cards/y/YoungNecromancer.java index e630791c55..18e5554943 100644 --- a/Mage.Sets/src/mage/cards/y/YoungNecromancer.java +++ b/Mage.Sets/src/mage/cards/y/YoungNecromancer.java @@ -36,7 +36,7 @@ public final class YoungNecromancer extends CardImpl { ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); this.addAbility(new EntersBattlefieldTriggeredAbility( new DoWhenCostPaid(ability, new ExileFromGraveCost( - new TargetCardInYourGraveyard(2, StaticFilters.FILTER_CARD) + new TargetCardInYourGraveyard(2, StaticFilters.FILTER_CARD_CARDS) ), "Exile two cards from your graveyard?") )); } diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 875b6f23d7..91ef339ac8 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -56,7 +56,7 @@ public class VerifyCardDataTest { private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class); - private static final String FULL_ABILITIES_CHECK_SET_CODE = "MH1"; // check all abilities and output cards with wrong abilities texts; + private static final String FULL_ABILITIES_CHECK_SET_CODE = "MH2"; // 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/GainLifeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GainLifeEffect.java index 105097a667..ca4dbf1f80 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/GainLifeEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/GainLifeEffect.java @@ -2,16 +2,16 @@ package mage.abilities.effects.common; -import mage.constants.Outcome; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; /** - * * @author BetaSteward_at_googlemail.com */ public class GainLifeEffect extends OneShotEffect { @@ -25,9 +25,8 @@ public class GainLifeEffect extends OneShotEffect { public GainLifeEffect(DynamicValue life) { super(Outcome.GainLife); this.life = life; - setText(); } - + public GainLifeEffect(DynamicValue life, String rule) { super(Outcome.GainLife); this.life = life; @@ -53,24 +52,24 @@ public class GainLifeEffect extends OneShotEffect { return true; } - private void setText() { - if (!staticText.isEmpty()) { - return; + @Override + public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; } StringBuilder sb = new StringBuilder(); String message = life.getMessage(); sb.append("you gain "); if (message.startsWith("that")) { sb.append(message).append(' '); - } else if (message.isEmpty() || !message.equals("1")) { + } else if (message.isEmpty() || !life.toString().equals("1")) { sb.append(life).append(' '); } sb.append("life"); if (!message.isEmpty() && !message.startsWith("that")) { - sb.append(message.equals("1") ? " equal to the number of " : " for each "); + sb.append(life.toString().equals("1") ? " equal to the number of " : " for each "); sb.append(message); } - staticText = sb.toString(); + return sb.toString(); } - } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java index 34bba39ab0..355a735150 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java @@ -100,7 +100,7 @@ public class ReturnToHandTargetEffect extends OneShotEffect { sb.append("target "); } sb.append(target.getTargetName()); - if (target.getMaxNumberOfTargets() > 1 && !target.getTargetName().endsWith("s")) { + if (target.getMaxNumberOfTargets() > 1 && !target.getTargetName().endsWith("s") && !target.getTargetName().endsWith("control")) { sb.append('s'); } if (target.getMaxNumberOfTargets() > 1) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java index 82c1c4d515..803343dc73 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java @@ -155,7 +155,7 @@ public class DiscardCardYouChooseTargetEffect extends OneShotEffect { } private String setText() { - StringBuilder sb = new StringBuilder("Target "); + StringBuilder sb = new StringBuilder("target "); switch (targetController) { case OPPONENT: sb.append("opponent"); diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 3878ff6ebf..ecf6add97c 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -316,6 +316,12 @@ public final class StaticFilters { FILTER_CONTROLLED_A_PERMANENT.setLockedFilter(true); } + public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_SHORT_TEXT = new FilterControlledPermanent("permanent"); + + static { + FILTER_CONTROLLED_PERMANENT_SHORT_TEXT.setLockedFilter(true); + } + public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT = new FilterControlledArtifactPermanent(); static { diff --git a/Mage/src/main/java/mage/target/common/TargetCreatureOrPlaneswalkerAmount.java b/Mage/src/main/java/mage/target/common/TargetCreatureOrPlaneswalkerAmount.java index a0308c2915..4932e92cb4 100644 --- a/Mage/src/main/java/mage/target/common/TargetCreatureOrPlaneswalkerAmount.java +++ b/Mage/src/main/java/mage/target/common/TargetCreatureOrPlaneswalkerAmount.java @@ -9,7 +9,7 @@ import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; public class TargetCreatureOrPlaneswalkerAmount extends TargetPermanentAmount { private static final FilterCreatureOrPlaneswalkerPermanent defaultFilter - = new FilterCreatureOrPlaneswalkerPermanent("target creatures or planeswalkers"); + = new FilterCreatureOrPlaneswalkerPermanent("target creatures and/or planeswalkers"); public TargetCreatureOrPlaneswalkerAmount(int amount) { super(amount, defaultFilter);