From aa2c71227270f5f528941f7a2ef431c3976d2d31 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 22 Jul 2019 19:53:15 -0400 Subject: [PATCH] more text fixes --- .../src/mage/cards/c/ChandrasFlameWave.java | 2 +- Mage.Sets/src/mage/cards/d/DragonMage.java | 2 +- .../src/mage/cards/f/FaerieMiscreant.java | 25 +++---- Mage.Sets/src/mage/cards/f/FrostLynx.java | 22 ++---- .../src/mage/cards/g/GrafdiggersCage.java | 4 +- .../src/mage/cards/g/GruesomeScourger.java | 2 +- .../src/mage/cards/i/ImpassionedOrator.java | 6 +- Mage.Sets/src/mage/cards/l/LotusField.java | 2 +- .../mage/cards/r/RienneAngelOfRebirth.java | 2 +- .../costs/AlternativeCostSourceAbility.java | 22 +++--- .../effects/common/CreateTokenEffect.java | 14 ++-- .../LookLibraryAndPickControllerEffect.java | 67 +++++++++---------- 12 files changed, 81 insertions(+), 89 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/ChandrasFlameWave.java b/Mage.Sets/src/mage/cards/c/ChandrasFlameWave.java index e5559e4b0fa..88671fa3ff9 100644 --- a/Mage.Sets/src/mage/cards/c/ChandrasFlameWave.java +++ b/Mage.Sets/src/mage/cards/c/ChandrasFlameWave.java @@ -31,7 +31,7 @@ public final class ChandrasFlameWave extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(2)); this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect( 2, StaticFilters.FILTER_PERMANENT_CREATURE - ).setText("and each creature that player controls")); + ).setText("and each creature that player controls.")); this.getSpellAbility().addEffect( new SearchLibraryGraveyardPutInHandEffect(filter, false, false) ); diff --git a/Mage.Sets/src/mage/cards/d/DragonMage.java b/Mage.Sets/src/mage/cards/d/DragonMage.java index c26c523d45e..3b76c4533cd 100644 --- a/Mage.Sets/src/mage/cards/d/DragonMage.java +++ b/Mage.Sets/src/mage/cards/d/DragonMage.java @@ -32,7 +32,7 @@ public final class DragonMage extends CardImpl { // Whenever Dragon Mage deals combat damage to a player, each player discards their hand and draws seven cards. Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardHandAllEffect(), false); Effect effect = new DrawCardAllEffect(7); - effect.setText("and draws seven cards"); + effect.setText(", then draws seven cards"); ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java index aa826d306aa..a049ddace90 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java +++ b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java @@ -1,9 +1,8 @@ - package mage.cards.f; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.Condition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -21,12 +20,11 @@ import mage.filter.predicate.permanent.ControllerPredicate; import java.util.UUID; /** - * * @author fireshoes */ public final class FaerieMiscreant extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("you control another creature named Faerie Miscreant"); + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); static { filter.add(new NamePredicate("Faerie Miscreant")); @@ -34,8 +32,10 @@ public final class FaerieMiscreant extends CardImpl { filter.add(new ControllerPredicate(TargetController.YOU)); } + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter); + public FaerieMiscreant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); this.subtype.add(SubType.FAERIE); this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); @@ -43,13 +43,14 @@ public final class FaerieMiscreant extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - + // When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card. - Ability ability = new ConditionalInterveningIfTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false), - new PermanentsOnTheBattlefieldCondition(filter), - "When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card"); - this.addAbility(ability); + this.addAbility(new ConditionalInterveningIfTriggeredAbility( + new EntersBattlefieldTriggeredAbility( + new DrawCardSourceControllerEffect(1), false + ), condition, "When {this} enters the battlefield, " + + "if you control another creature named Faerie Miscreant, draw a card." + )); } public FaerieMiscreant(final FaerieMiscreant card) { diff --git a/Mage.Sets/src/mage/cards/f/FrostLynx.java b/Mage.Sets/src/mage/cards/f/FrostLynx.java index d4ac6e7bd4c..de6127ad182 100644 --- a/Mage.Sets/src/mage/cards/f/FrostLynx.java +++ b/Mage.Sets/src/mage/cards/f/FrostLynx.java @@ -1,7 +1,5 @@ - package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -11,25 +9,17 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.TargetController; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetOpponentsCreaturePermanent; + +import java.util.UUID; /** - * * @author LevelX2 */ public final class FrostLynx extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); - - static { - filter.add(new ControllerPredicate(TargetController.OPPONENT)); - } - public FrostLynx(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.ELEMENTAL); this.subtype.add(SubType.CAT); @@ -38,8 +28,8 @@ public final class FrostLynx extends CardImpl { // When Frost Lynx enters the battlefield, tap target creature an opponent controls. It doesn't untap during its controller's next untap step. Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false); - ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("It")); - ability.addTarget(new TargetCreaturePermanent(filter)); + ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature")); + ability.addTarget(new TargetOpponentsCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GrafdiggersCage.java b/Mage.Sets/src/mage/cards/g/GrafdiggersCage.java index 39ec1664187..c31076b381e 100644 --- a/Mage.Sets/src/mage/cards/g/GrafdiggersCage.java +++ b/Mage.Sets/src/mage/cards/g/GrafdiggersCage.java @@ -82,7 +82,7 @@ class GrafdiggersCageEffect2 extends ContinuousRuleModifyingEffectImpl { public GrafdiggersCageEffect2() { super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "Players can't cast cards in graveyards or libraries"; + staticText = "Players can't cast spells from graveyards or libraries"; } public GrafdiggersCageEffect2(final GrafdiggersCageEffect2 effect) { @@ -104,7 +104,7 @@ class GrafdiggersCageEffect2 extends ContinuousRuleModifyingEffectImpl { Card card = game.getCard(event.getSourceId()); if (card != null) { Zone zone = game.getState().getZone(card.getId()); - if (zone != null && (zone == Zone.GRAVEYARD || zone == Zone.LIBRARY)) { + if (zone == Zone.GRAVEYARD || zone == Zone.LIBRARY) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GruesomeScourger.java b/Mage.Sets/src/mage/cards/g/GruesomeScourger.java index e2d5e2d5892..2d74256ce5f 100644 --- a/Mage.Sets/src/mage/cards/g/GruesomeScourger.java +++ b/Mage.Sets/src/mage/cards/g/GruesomeScourger.java @@ -32,7 +32,7 @@ public final class GruesomeScourger extends CardImpl { this.toughness = new MageInt(3); // When Gruesome Scourger enters the battlefield, it deals damage to target opponent or planeswalker equal to the number of creatures you control. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(xValue)); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(xValue, "it")); ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/ImpassionedOrator.java b/Mage.Sets/src/mage/cards/i/ImpassionedOrator.java index ef1a2f0991e..ff27dbdd290 100644 --- a/Mage.Sets/src/mage/cards/i/ImpassionedOrator.java +++ b/Mage.Sets/src/mage/cards/i/ImpassionedOrator.java @@ -1,7 +1,7 @@ package mage.cards.i; import mage.MageInt; -import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -19,7 +19,7 @@ import java.util.UUID; public final class ImpassionedOrator extends CardImpl { private static final FilterPermanent filter - = new FilterControlledCreaturePermanent("another creature you control"); + = new FilterControlledCreaturePermanent("another creature"); static { filter.add(AnotherPredicate.instance); @@ -34,7 +34,7 @@ public final class ImpassionedOrator extends CardImpl { this.toughness = new MageInt(2); // Whenever another creature enters the battlefield under your control, you gain 1 life. - this.addAbility(new EntersBattlefieldAllTriggeredAbility(new GainLifeEffect(1), filter)); + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new GainLifeEffect(1), filter)); } private ImpassionedOrator(final ImpassionedOrator card) { diff --git a/Mage.Sets/src/mage/cards/l/LotusField.java b/Mage.Sets/src/mage/cards/l/LotusField.java index 5b49ae609c3..cc9e0acdc24 100644 --- a/Mage.Sets/src/mage/cards/l/LotusField.java +++ b/Mage.Sets/src/mage/cards/l/LotusField.java @@ -31,7 +31,7 @@ public final class LotusField extends CardImpl { // When Lotus Field enters the battlefield, sacrifice two lands. this.addAbility(new EntersBattlefieldTriggeredAbility( - new SacrificeControllerEffect(StaticFilters.FILTER_LAND, 2, "") + new SacrificeControllerEffect(StaticFilters.FILTER_LANDS, 2, "") )); // {T}: Add three mana of any color. diff --git a/Mage.Sets/src/mage/cards/r/RienneAngelOfRebirth.java b/Mage.Sets/src/mage/cards/r/RienneAngelOfRebirth.java index 4da62632650..b6c73306d9d 100644 --- a/Mage.Sets/src/mage/cards/r/RienneAngelOfRebirth.java +++ b/Mage.Sets/src/mage/cards/r/RienneAngelOfRebirth.java @@ -109,7 +109,7 @@ class RienneAngelOfRebirthTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { return "Whenever another multicolored creature you control dies, " + - "return it to its owner’s hand at the beginning of the next end step."; + "return it to its owner's hand at the beginning of the next end step."; } } diff --git a/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java b/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java index 7db1c6f938f..25ba6f8f4fd 100644 --- a/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java +++ b/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java @@ -1,7 +1,6 @@ package mage.abilities.costs; -import java.util.Iterator; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.StaticAbility; @@ -16,8 +15,9 @@ import mage.game.Game; import mage.players.Player; import mage.util.CardUtil; +import java.util.Iterator; + /** - * * @author LevelX2 */ public class AlternativeCostSourceAbility extends StaticAbility implements AlternativeSourceCosts { @@ -46,14 +46,13 @@ public class AlternativeCostSourceAbility extends StaticAbility implements Alter } /** - * - * @param cost alternate cost to pay + * @param cost alternate cost to pay * @param condition only if the condition is true it's possible to use the - * alternate costs - * @param rule if != null used as rule text - * @param filter filters the cards this alternate cost can be applied to - * @param onlyMana if true only the mana costs are replaced by this costs, - * other costs stay untouched + * alternate costs + * @param rule if != null used as rule text + * @param filter filters the cards this alternate cost can be applied to + * @param onlyMana if true only the mana costs are replaced by this costs, + * other costs stay untouched */ public AlternativeCostSourceAbility(Cost cost, Condition condition, String rule, FilterCard filter, boolean onlyMana) { super(Zone.ALL, null); @@ -151,7 +150,7 @@ public class AlternativeCostSourceAbility extends StaticAbility implements Alter } for (AlternativeCost2 alternateCost : alternativeCostsToCheck) { alternateCost.activate(); - for (Iterator it = ((Costs) alternateCost).iterator(); it.hasNext();) { + for (Iterator it = ((Costs) alternateCost).iterator(); it.hasNext(); ) { Cost costDeailed = (Cost) it.next(); if (costDeailed instanceof ManaCost) { ability.getManaCostsToPay().add((ManaCost) costDeailed.copy()); @@ -222,7 +221,8 @@ public class AlternativeCostSourceAbility extends StaticAbility implements Alter if (alternativeCost.getCost() instanceof ManaCost) { sb.append("pay "); } - sb.append(alternativeCost.getText(true)); + String text = alternativeCost.getText(true); + sb.append(Character.toLowerCase(text.charAt(0)) + text.substring(1)); } ++numberCosts; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java index 803caf102fc..45c5b828205 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java @@ -1,9 +1,6 @@ package mage.abilities.effects.common; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; @@ -18,8 +15,11 @@ import mage.game.permanent.token.Token; import mage.target.targetpointer.FixedTarget; import mage.util.CardUtil; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + /** - * * @author BetaSteward_at_googlemail.com */ public class CreateTokenEffect extends OneShotEffect { @@ -134,7 +134,11 @@ public class CreateTokenEffect extends OneShotEffect { } } if (attacking) { - sb.append(" that are"); + if (amount.toString().equals("1")) { + sb.append("that's"); + } else { + sb.append(" that are"); + } if (tapped) { sb.append(" tapped and"); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java index 608124199ca..2155cbc1d4f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java @@ -29,8 +29,6 @@ */ package mage.abilities.effects.common; -import static java.lang.Integer.min; -import java.util.Locale; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.dynamicvalue.DynamicValue; @@ -45,8 +43,11 @@ import mage.players.Player; import mage.target.TargetCard; import mage.util.CardUtil; +import java.util.Locale; + +import static java.lang.Integer.min; + /** - * * @author LevelX */ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEffect { @@ -63,36 +64,35 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff //TODO: These constructors are a mess public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, - boolean mayShuffleAfter, DynamicValue numberToPick, - FilterCard pickFilter, boolean putOnTop) { + boolean mayShuffleAfter, DynamicValue numberToPick, + FilterCard pickFilter, boolean putOnTop) { this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, putOnTop, true); } public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, - boolean mayShuffleAfter, DynamicValue numberToPick, - FilterCard pickFilter, boolean putOnTop, boolean reveal) { + boolean mayShuffleAfter, DynamicValue numberToPick, + FilterCard pickFilter, boolean putOnTop, boolean reveal) { this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, Zone.LIBRARY, putOnTop, reveal); } public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, - boolean mayShuffleAfter, DynamicValue numberToPick, - FilterCard pickFilter, Zone targetZoneLookedCards, - boolean putOnTop, boolean reveal) { + boolean mayShuffleAfter, DynamicValue numberToPick, + FilterCard pickFilter, Zone targetZoneLookedCards, + boolean putOnTop, boolean reveal) { this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, targetZoneLookedCards, putOnTop, reveal, reveal); } public LookLibraryAndPickControllerEffect(int numberOfCards, - int numberToPick, FilterCard pickFilter, boolean upTo) { + int numberToPick, FilterCard pickFilter, boolean upTo) { this(new StaticValue(numberOfCards), false, new StaticValue(numberToPick), pickFilter, Zone.LIBRARY, false, true, upTo); } /** - * * @param numberOfCards * @param numberToPick * @param pickFilter @@ -102,8 +102,8 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff * @param optional */ public LookLibraryAndPickControllerEffect(int numberOfCards, - int numberToPick, FilterCard pickFilter, boolean reveal, - boolean upTo, Zone targetZonePickedCards, boolean optional) { + int numberToPick, FilterCard pickFilter, boolean reveal, + boolean upTo, Zone targetZonePickedCards, boolean optional) { this(new StaticValue(numberOfCards), false, new StaticValue(numberToPick), pickFilter, Zone.LIBRARY, false, reveal, upTo, targetZonePickedCards, optional, true, true); @@ -111,45 +111,43 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff } /** - * * @param numberOfCards * @param mayShuffleAfter * @param numberToPick * @param pickFilter * @param targetZoneLookedCards - * @param putOnTop if zone for the rest is library decide if cards go to top - * or bottom + * @param putOnTop if zone for the rest is library decide if cards go to top + * or bottom * @param reveal * @param upTo */ public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, - boolean mayShuffleAfter, DynamicValue numberToPick, - FilterCard pickFilter, Zone targetZoneLookedCards, - boolean putOnTop, boolean reveal, boolean upTo) { + boolean mayShuffleAfter, DynamicValue numberToPick, + FilterCard pickFilter, Zone targetZoneLookedCards, + boolean putOnTop, boolean reveal, boolean upTo) { this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, targetZoneLookedCards, putOnTop, reveal, upTo, Zone.HAND, false, true, true); } /** - * * @param numberOfCards * @param mayShuffleAfter * @param numberToPick * @param pickFilter * @param targetZoneLookedCards - * @param putOnTop if zone for the rest is library decide if cards go to top - * or bottom + * @param putOnTop if zone for the rest is library decide if cards go to top + * or bottom * @param reveal * @param upTo * @param targetZonePickedCards * @param optional */ public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, - boolean mayShuffleAfter, DynamicValue numberToPick, - FilterCard pickFilter, Zone targetZoneLookedCards, boolean putOnTop, - boolean reveal, boolean upTo, Zone targetZonePickedCards, - boolean optional) { + boolean mayShuffleAfter, DynamicValue numberToPick, + FilterCard pickFilter, Zone targetZoneLookedCards, boolean putOnTop, + boolean reveal, boolean upTo, Zone targetZonePickedCards, + boolean optional) { this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, targetZoneLookedCards, putOnTop, reveal, upTo, @@ -157,14 +155,13 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff } /** - * * @param numberOfCards * @param mayShuffleAfter * @param numberToPick * @param pickFilter * @param targetZoneLookedCards - * @param putOnTop if zone for the rest is library decide if cards go to top - * or bottom + * @param putOnTop if zone for the rest is library decide if cards go to top + * or bottom * @param reveal * @param upTo * @param targetZonePickedCards @@ -173,10 +170,10 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff * @param anyOrder */ public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, - boolean mayShuffleAfter, DynamicValue numberToPick, - FilterCard pickFilter, Zone targetZoneLookedCards, boolean putOnTop, - boolean reveal, boolean upTo, Zone targetZonePickedCards, - boolean optional, boolean putOnTopSelected, boolean anyOrder) { + boolean mayShuffleAfter, DynamicValue numberToPick, + FilterCard pickFilter, Zone targetZoneLookedCards, boolean putOnTop, + boolean reveal, boolean upTo, Zone targetZonePickedCards, + boolean optional, boolean putOnTopSelected, boolean anyOrder) { super(Outcome.DrawCard, numberOfCards, mayShuffleAfter, targetZoneLookedCards, putOnTop); this.numberToPick = numberToPick; @@ -334,7 +331,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff sb.append("on the bottom"); } sb.append(" of your library in "); - if (anyOrder) { + if (anyOrder && !backInRandomOrder) { sb.append("any"); } else { sb.append("a random");