diff --git a/Mage.Sets/src/mage/cards/b/BoggartShenanigans.java b/Mage.Sets/src/mage/cards/b/BoggartShenanigans.java index 83bf41637b6..2fd43ed5877 100644 --- a/Mage.Sets/src/mage/cards/b/BoggartShenanigans.java +++ b/Mage.Sets/src/mage/cards/b/BoggartShenanigans.java @@ -1,7 +1,7 @@ package mage.cards.b; import mage.abilities.Ability; -import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -19,7 +19,7 @@ import java.util.UUID; */ public final class BoggartShenanigans extends CardImpl { - private static final FilterPermanent filter = new FilterControlledPermanent(SubType.GOBLIN); + private static final FilterPermanent filter = new FilterControlledPermanent(SubType.GOBLIN, "another Goblin you control"); static { filter.add(AnotherPredicate.instance); @@ -30,9 +30,9 @@ public final class BoggartShenanigans extends CardImpl { this.subtype.add(SubType.GOBLIN); // Whenever another Goblin you control dies, you may have Boggart Shenanigans deal 1 damage to target player. - Ability ability = new DiesCreatureTriggeredAbility( + Ability ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility( new DamageTargetEffect(1), true, filter, false - ).setTriggerPhrase("Whenever another Goblin you control is put into a graveyard from the battlefield, "); + ); ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DictateOfTheTwinGods.java b/Mage.Sets/src/mage/cards/d/DictateOfTheTwinGods.java index f3fba6828cc..b4006a5d982 100644 --- a/Mage.Sets/src/mage/cards/d/DictateOfTheTwinGods.java +++ b/Mage.Sets/src/mage/cards/d/DictateOfTheTwinGods.java @@ -49,7 +49,7 @@ class DictateOfTheTwinGodsEffect extends ReplacementEffectImpl { DictateOfTheTwinGodsEffect() { super(Duration.WhileOnBattlefield, Outcome.Damage); - staticText = "If a source would deal damage to a permanent or player, that source deals double that damage to that permanent or player instead"; + staticText = "If a source would deal damage to a permanent or player, it deals double that damage to that permanent or player instead"; } private DictateOfTheTwinGodsEffect(final DictateOfTheTwinGodsEffect effect) { diff --git a/Mage.Sets/src/mage/cards/j/JuriMasterOfTheRevue.java b/Mage.Sets/src/mage/cards/j/JuriMasterOfTheRevue.java index 8721932fedb..3fbe10630f1 100644 --- a/Mage.Sets/src/mage/cards/j/JuriMasterOfTheRevue.java +++ b/Mage.Sets/src/mage/cards/j/JuriMasterOfTheRevue.java @@ -42,7 +42,7 @@ public final class JuriMasterOfTheRevue extends CardImpl { // When Juri dies, it deals damage equal its power to any target. Ability ability = new DiesSourceTriggeredAbility(new DamageTargetEffect(JuriMasterOfTheRevueValue.instance) - .setText("it deals damage equal its power to any target")); + .setText("it deals damage equal to its power to any target")); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NacatlWarPride.java b/Mage.Sets/src/mage/cards/n/NacatlWarPride.java index 6a55260429e..ab4ce40056d 100644 --- a/Mage.Sets/src/mage/cards/n/NacatlWarPride.java +++ b/Mage.Sets/src/mage/cards/n/NacatlWarPride.java @@ -67,7 +67,7 @@ class NacatlWarPrideEffect extends OneShotEffect { NacatlWarPrideEffect() { super(Outcome.Benefit); - this.staticText = "create X tokens that are copies of {this} tapped and attacking, where X is the number of creatures defending player controls. Exile the tokens at the beginning of the next end step"; + this.staticText = "create X tokens that are copies of {this} and that are tapped and attacking, where X is the number of creatures defending player controls. Exile the tokens at the beginning of the next end step"; } private NacatlWarPrideEffect(final NacatlWarPrideEffect effect) { diff --git a/Mage.Sets/src/mage/cards/o/OverlaidTerrain.java b/Mage.Sets/src/mage/cards/o/OverlaidTerrain.java index 3b312a1f65c..a03fbd02129 100644 --- a/Mage.Sets/src/mage/cards/o/OverlaidTerrain.java +++ b/Mage.Sets/src/mage/cards/o/OverlaidTerrain.java @@ -14,8 +14,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterControlledLandPermanent; -import mage.filter.common.FilterLandPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -35,7 +34,7 @@ public final class OverlaidTerrain extends CardImpl { // Lands you control have "{T}: Add two mana of any one color." SimpleManaAbility manaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(2), new TapSourceCost()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(manaAbility, Duration.WhileOnBattlefield, new FilterLandPermanent(), false))); + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(manaAbility, Duration.WhileOnBattlefield, StaticFilters.FILTER_LANDS, false))); } private OverlaidTerrain(final OverlaidTerrain card) { @@ -63,7 +62,7 @@ class SacrificeAllLandEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterControlledLandPermanent(), source.getControllerId(), game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS, source.getControllerId(), game)) { permanent.sacrifice(source, game); } return true; @@ -75,4 +74,4 @@ class SacrificeAllLandEffect extends OneShotEffect { public SacrificeAllLandEffect copy() { return new SacrificeAllLandEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/s/SivvisValor.java b/Mage.Sets/src/mage/cards/s/SivvisValor.java index 922b979de44..32f32f2ac49 100644 --- a/Mage.Sets/src/mage/cards/s/SivvisValor.java +++ b/Mage.Sets/src/mage/cards/s/SivvisValor.java @@ -44,7 +44,7 @@ public final class SivvisValor extends CardImpl { // If you control a Plains, you may tap an untapped creature you control rather than pay Sivvi's Valor's mana cost. Cost cost = new TapTargetCost(new TargetControlledPermanent(1,1,filterCreature,false)); - cost.setText(" tap an untapped creature you control"); + cost.setText("tap an untapped creature you control"); this.addAbility(new AlternativeCostSourceAbility(cost, new PermanentsOnTheBattlefieldCondition(filter))); // All damage that would be dealt to target creature this turn is dealt to you instead. diff --git a/Mage.Sets/src/mage/cards/s/SongOfFreyalise.java b/Mage.Sets/src/mage/cards/s/SongOfFreyalise.java index bd96ba9d8e8..50db65f0fdd 100644 --- a/Mage.Sets/src/mage/cards/s/SongOfFreyalise.java +++ b/Mage.Sets/src/mage/cards/s/SongOfFreyalise.java @@ -41,13 +41,13 @@ public final class SongOfFreyalise extends CardImpl { // III — Put a +1/+1 counter on each creature you control. Those creatures gain vigilance, trample, and indestructible until end of turn. Effects effects = new Effects(); - effects.add(new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURES)); + effects.add(new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE)); effects.add(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES) .setText("Those creatures gain vigilance")); effects.add(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES) .setText(", trample")); effects.add(new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES) - .setText("and indestructible until end of turn")); + .setText(", and indestructible until end of turn")); sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, SagaChapter.CHAPTER_III, effects); this.addAbility(sagaAbility); } diff --git a/Mage.Sets/src/mage/cards/s/StampedeDriver.java b/Mage.Sets/src/mage/cards/s/StampedeDriver.java index 5a04d9285a5..03cf3daa8a3 100644 --- a/Mage.Sets/src/mage/cards/s/StampedeDriver.java +++ b/Mage.Sets/src/mage/cards/s/StampedeDriver.java @@ -35,10 +35,12 @@ public final class StampedeDriver extends CardImpl { this.toughness = new MageInt(1); // {1}{G}, {T}, Discard a card: Creatures you control get +1/+1 and gain trample until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{1}{G}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.EndOfTurn) + .setText("creatures you control get +1/+1"), new ManaCostsImpl<>("{1}{G}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardTargetCost(new TargetCardInHand())); - ability.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); + ability.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES) + .setText("and gain trample until end of turn")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SzarekhTheSilentKing.java b/Mage.Sets/src/mage/cards/s/SzarekhTheSilentKing.java index 386c8d0c2ac..c5eccb44bde 100644 --- a/Mage.Sets/src/mage/cards/s/SzarekhTheSilentKing.java +++ b/Mage.Sets/src/mage/cards/s/SzarekhTheSilentKing.java @@ -43,7 +43,7 @@ public final class SzarekhTheSilentKing extends CardImpl { // My Will Be Done -- Whenever Szarekh, the Silent King attacks, mill three cards. You may put an artifact creature card or Vehicle card from among the cards milled this way into your hand. this.addAbility(new AttacksTriggeredAbility( - new MillThenPutInHandEffect(3, filter) + new MillThenPutInHandEffect(3, filter).withTextOptions("the cards milled this way") ).withFlavorWord("My Will Be Done")); } diff --git a/Mage.Sets/src/mage/cards/t/TriumphOfSaintKatherine.java b/Mage.Sets/src/mage/cards/t/TriumphOfSaintKatherine.java index f73c8f85243..ea217662dfb 100644 --- a/Mage.Sets/src/mage/cards/t/TriumphOfSaintKatherine.java +++ b/Mage.Sets/src/mage/cards/t/TriumphOfSaintKatherine.java @@ -2,7 +2,7 @@ package mage.cards.t; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.MiracleAbility; @@ -32,8 +32,8 @@ public final class TriumphOfSaintKatherine extends CardImpl { // Lifelink this.addAbility(LifelinkAbility.getInstance()); - // Praesidium Protectiva -- When Triumph of Saint Katherine dies, exile it and the top six cards of your library in a face-down pile. If you do, shuffle that pile and put it back on top of your library. - this.addAbility(new DiesSourceTriggeredAbility(new TriumphOfSaintKatherineEffect()).withFlavorWord("Praesidium Protectiva")); + // Praesidium Protectiva -- When Triumph of Saint Katherine is put into your graveyard from the battlefield, exile it and the top six cards of your library in a face-down pile. If you do, shuffle that pile and put it back on top of your library. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new TriumphOfSaintKatherineEffect(), false, true).withFlavorWord("Praesidium Protectiva")); // Miracle {1}{W} this.addAbility(new MiracleAbility("{1}{W}")); diff --git a/Mage.Sets/src/mage/cards/u/UnquenchableFury.java b/Mage.Sets/src/mage/cards/u/UnquenchableFury.java index 3b00622232e..669118a1f96 100644 --- a/Mage.Sets/src/mage/cards/u/UnquenchableFury.java +++ b/Mage.Sets/src/mage/cards/u/UnquenchableFury.java @@ -1,8 +1,8 @@ package mage.cards.u; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; @@ -13,9 +13,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.ZoneChangeEvent; -import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -43,8 +40,9 @@ public final class UnquenchableFury extends CardImpl { new UnquenchableFuryEffect(), false, null, SetTargetPointer.PLAYER ), AttachmentType.AURA))); - // When Unquenchable Fury is put into your graveyard from the battlfield, return it to your hand. - this.addAbility(new UnquenchableFuryTriggeredAbility()); + // When Unquenchable Fury is put into your graveyard from the battlefield, return it to your hand. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnSourceFromGraveyardToHandEffect() + .setText("return it to your hand"), false, true)); } private UnquenchableFury(final UnquenchableFury card) { @@ -81,38 +79,3 @@ class UnquenchableFuryEffect extends OneShotEffect { && player.damage(player.getHand().size(), source, game) > 0; } } - -class UnquenchableFuryTriggeredAbility extends TriggeredAbilityImpl { - - UnquenchableFuryTriggeredAbility() { - super(Zone.BATTLEFIELD, new ReturnSourceFromGraveyardToHandEffect()); - } - - private UnquenchableFuryTriggeredAbility(final UnquenchableFuryTriggeredAbility ability) { - super(ability); - } - - @Override - public UnquenchableFuryTriggeredAbility copy() { - return new UnquenchableFuryTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.ZONE_CHANGE; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - ZoneChangeEvent zEvent = (ZoneChangeEvent) event; - Permanent permanent = zEvent.getTarget(); - return permanent != null && zEvent.isDiesEvent() - && permanent.getId().equals(this.getSourceId()) - && permanent.isOwnedBy(permanent.getControllerId()); - } - - @Override - public String getRule() { - return "When {this} is put into your graveyard from the battlfield, return it to your hand."; - } -}