diff --git a/Mage.Sets/src/mage/cards/a/AncestralVision.java b/Mage.Sets/src/mage/cards/a/AncestralVision.java index a87862eb53..ee92ec5bb4 100644 --- a/Mage.Sets/src/mage/cards/a/AncestralVision.java +++ b/Mage.Sets/src/mage/cards/a/AncestralVision.java @@ -22,7 +22,7 @@ public final class AncestralVision extends CardImpl { this.color.setBlue(true); // Suspend 4-{U} - this.addAbility(new SuspendAbility(4, new ManaCostsImpl("U"), this)); + this.addAbility(new SuspendAbility(4, new ManaCostsImpl<>("{U}"), this)); // Target player draws three cards. this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new DrawCardTargetEffect(3)); diff --git a/Mage.Sets/src/mage/cards/b/BlessedDefiance.java b/Mage.Sets/src/mage/cards/b/BlessedDefiance.java index 1c23491435..f151510822 100644 --- a/Mage.Sets/src/mage/cards/b/BlessedDefiance.java +++ b/Mage.Sets/src/mage/cards/b/BlessedDefiance.java @@ -28,7 +28,7 @@ import java.util.UUID; public class BlessedDefiance extends CardImpl { public BlessedDefiance(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "W"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); // Target creature you control gets +2/+0 and gains lifelink until end of turn. When that creature dies this turn, create a 1/1 white Spirit creature token with flying. this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0) diff --git a/Mage.Sets/src/mage/cards/c/CircleOfProtectionArtifacts.java b/Mage.Sets/src/mage/cards/c/CircleOfProtectionArtifacts.java index aa1ed0ccb7..4439aa712f 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfProtectionArtifacts.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfProtectionArtifacts.java @@ -30,7 +30,7 @@ public final class CircleOfProtectionArtifacts extends CardImpl { // {2}: The next time an artifact source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("2"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{2}"))); } private CircleOfProtectionArtifacts(final CircleOfProtectionArtifacts card) { diff --git a/Mage.Sets/src/mage/cards/c/CircleOfProtectionBlack.java b/Mage.Sets/src/mage/cards/c/CircleOfProtectionBlack.java index 3f2f5a3ed2..04ae99ce2c 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfProtectionBlack.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfProtectionBlack.java @@ -33,7 +33,7 @@ public final class CircleOfProtectionBlack extends CardImpl { // {1}: The next time a black source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}"))); } private CircleOfProtectionBlack(final CircleOfProtectionBlack card) { diff --git a/Mage.Sets/src/mage/cards/c/CircleOfProtectionBlue.java b/Mage.Sets/src/mage/cards/c/CircleOfProtectionBlue.java index 9ffe0cc9ac..f842707304 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfProtectionBlue.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfProtectionBlue.java @@ -33,7 +33,7 @@ public final class CircleOfProtectionBlue extends CardImpl { // {1}: The next time a blue source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}"))); } private CircleOfProtectionBlue(final CircleOfProtectionBlue card) { diff --git a/Mage.Sets/src/mage/cards/c/CircleOfProtectionGreen.java b/Mage.Sets/src/mage/cards/c/CircleOfProtectionGreen.java index dc7be67826..642c7a5078 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfProtectionGreen.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfProtectionGreen.java @@ -33,7 +33,7 @@ public final class CircleOfProtectionGreen extends CardImpl { // {1}: The next time a green source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}"))); } private CircleOfProtectionGreen(final CircleOfProtectionGreen card) { diff --git a/Mage.Sets/src/mage/cards/c/CircleOfProtectionRed.java b/Mage.Sets/src/mage/cards/c/CircleOfProtectionRed.java index 6d9e177df4..97f0bece75 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfProtectionRed.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfProtectionRed.java @@ -33,7 +33,7 @@ public final class CircleOfProtectionRed extends CardImpl { // {1}: The next time a red source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}"))); } private CircleOfProtectionRed(final CircleOfProtectionRed card) { diff --git a/Mage.Sets/src/mage/cards/c/CircleOfProtectionShadow.java b/Mage.Sets/src/mage/cards/c/CircleOfProtectionShadow.java index 62aa70f075..a3a8f069df 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfProtectionShadow.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfProtectionShadow.java @@ -33,7 +33,7 @@ public final class CircleOfProtectionShadow extends CardImpl { // {1}: The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); effect.setText("The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage"); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}"))); } private CircleOfProtectionShadow(final CircleOfProtectionShadow card) { diff --git a/Mage.Sets/src/mage/cards/c/CircleOfProtectionWhite.java b/Mage.Sets/src/mage/cards/c/CircleOfProtectionWhite.java index dae973e381..b94573a3df 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfProtectionWhite.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfProtectionWhite.java @@ -33,7 +33,7 @@ public final class CircleOfProtectionWhite extends CardImpl { // {1}: The next time a white source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}"))); } private CircleOfProtectionWhite(final CircleOfProtectionWhite card) { diff --git a/Mage.Sets/src/mage/cards/c/Conviction.java b/Mage.Sets/src/mage/cards/c/Conviction.java index 46151f2219..f333922202 100644 --- a/Mage.Sets/src/mage/cards/c/Conviction.java +++ b/Mage.Sets/src/mage/cards/c/Conviction.java @@ -41,7 +41,7 @@ public final class Conviction extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 3, Duration.WhileOnBattlefield))); // {W}: Return Conviction to its owner's hand. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("W"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl<>("{W}"))); } private Conviction(final Conviction card) { diff --git a/Mage.Sets/src/mage/cards/d/DungeonShade.java b/Mage.Sets/src/mage/cards/d/DungeonShade.java index 67f455cbec..aa77d49b58 100644 --- a/Mage.Sets/src/mage/cards/d/DungeonShade.java +++ b/Mage.Sets/src/mage/cards/d/DungeonShade.java @@ -31,7 +31,7 @@ public final class DungeonShade extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // {B}: Dungeon Shade gets +1/+1 until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("B"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{B}"))); } private DungeonShade(final DungeonShade card) { diff --git a/Mage.Sets/src/mage/cards/e/ElementalAugury.java b/Mage.Sets/src/mage/cards/e/ElementalAugury.java index 54fb9029bf..406b8bdf36 100644 --- a/Mage.Sets/src/mage/cards/e/ElementalAugury.java +++ b/Mage.Sets/src/mage/cards/e/ElementalAugury.java @@ -24,7 +24,7 @@ public final class ElementalAugury extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{B}{R}"); // {3}: Look at the top three cards of target player's library, then put them back in any order. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ElementalAuguryEffect(), new ManaCostsImpl("3")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ElementalAuguryEffect(), new ManaCostsImpl<>("{3}")); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneBlade.java b/Mage.Sets/src/mage/cards/f/FlowstoneBlade.java index 6d1e85c878..54b85d6803 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneBlade.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneBlade.java @@ -36,7 +36,7 @@ public final class FlowstoneBlade extends CardImpl { this.addAbility(ability); // {R}: Enchanted creature gets +1/-1 until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("R"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl<>("{R}"))); } private FlowstoneBlade(final FlowstoneBlade card) { diff --git a/Mage.Sets/src/mage/cards/g/GaeasWill.java b/Mage.Sets/src/mage/cards/g/GaeasWill.java index 3ef6828f21..b8deee17ab 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()); diff --git a/Mage.Sets/src/mage/cards/g/GnarledEffigy.java b/Mage.Sets/src/mage/cards/g/GnarledEffigy.java index 702e16d7b4..f4c12c554e 100644 --- a/Mage.Sets/src/mage/cards/g/GnarledEffigy.java +++ b/Mage.Sets/src/mage/cards/g/GnarledEffigy.java @@ -25,7 +25,7 @@ public final class GnarledEffigy extends CardImpl { // {4}, {tap}: Put a -1/-1 counter on target creature. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.M1M1.createInstance()), - new ManaCostsImpl("4")); + new ManaCostsImpl<>("{4}")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/i/Imprison.java b/Mage.Sets/src/mage/cards/i/Imprison.java index bfa0a0a1d0..3c7ac35482 100644 --- a/Mage.Sets/src/mage/cards/i/Imprison.java +++ b/Mage.Sets/src/mage/cards/i/Imprison.java @@ -50,7 +50,7 @@ public final class Imprison extends CardImpl { this.addAbility(new ImprisonTriggeredAbility()); // Whenever enchanted creature attacks or blocks, you may pay {1}. If you do, tap the creature, remove it from combat, and creatures it was blocking that had become blocked by only that creature this combat become unblocked. If you don't, destroy Imprison. - this.addAbility(new AttacksOrBlocksAttachedTriggeredAbility(new DoIfCostPaid(new ImprisonUnblockEffect(), new DestroySourceEffect(), new ManaCostsImpl("1")), AttachmentType.AURA)); + this.addAbility(new AttacksOrBlocksAttachedTriggeredAbility(new DoIfCostPaid(new ImprisonUnblockEffect(), new DestroySourceEffect(), new ManaCostsImpl<>("{1}")), AttachmentType.AURA)); } private Imprison(final Imprison card) { @@ -66,7 +66,7 @@ public final class Imprison extends CardImpl { class ImprisonTriggeredAbility extends TriggeredAbilityImpl { ImprisonTriggeredAbility() { - super(Zone.BATTLEFIELD, new DoIfCostPaid(new CounterTargetEffect().setText("counter that ability"), new DestroySourceEffect(), new ManaCostsImpl("1"))); + super(Zone.BATTLEFIELD, new DoIfCostPaid(new CounterTargetEffect().setText("counter that ability"), new DestroySourceEffect(), new ManaCostsImpl<>("{1}"))); } ImprisonTriggeredAbility(final ImprisonTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/j/JabbaTheHutt.java b/Mage.Sets/src/mage/cards/j/JabbaTheHutt.java index 0c289d72f7..dd8d699164 100644 --- a/Mage.Sets/src/mage/cards/j/JabbaTheHutt.java +++ b/Mage.Sets/src/mage/cards/j/JabbaTheHutt.java @@ -58,7 +58,7 @@ public final class JabbaTheHutt extends CardImpl { this.addAbility(ability); // {R},{T}: Create a tapped 4/4 red Hunter creature token. It fights another target creature an opponent control with a bounty counter on it. Activate this ability only any time you could cast a sorcery. - ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new JabbaTheHuttEffect(), new ManaCostsImpl("R")); + ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new JabbaTheHuttEffect(), new ManaCostsImpl<>("{R}")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetOpponentsCreaturePermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/k/KillerWhale.java b/Mage.Sets/src/mage/cards/k/KillerWhale.java index 5519b5a740..0b6cffd00a 100644 --- a/Mage.Sets/src/mage/cards/k/KillerWhale.java +++ b/Mage.Sets/src/mage/cards/k/KillerWhale.java @@ -30,7 +30,7 @@ public final class KillerWhale extends CardImpl { this.addAbility(new SimpleActivatedAbility( Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), - new ManaCostsImpl("U"))); + new ManaCostsImpl<>("{U}"))); } private KillerWhale(final KillerWhale card) { diff --git a/Mage.Sets/src/mage/cards/r/RuinCrab.java b/Mage.Sets/src/mage/cards/r/RuinCrab.java index e3ea22eec1..b561a673a0 100644 --- a/Mage.Sets/src/mage/cards/r/RuinCrab.java +++ b/Mage.Sets/src/mage/cards/r/RuinCrab.java @@ -17,7 +17,7 @@ import mage.constants.TargetController; public final class RuinCrab extends CardImpl { public RuinCrab(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "U"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); this.subtype.add(SubType.CRAB); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/r/RuneOfProtectionArtifacts.java b/Mage.Sets/src/mage/cards/r/RuneOfProtectionArtifacts.java index 4ae22891d7..2b5a4e4e64 100644 --- a/Mage.Sets/src/mage/cards/r/RuneOfProtectionArtifacts.java +++ b/Mage.Sets/src/mage/cards/r/RuneOfProtectionArtifacts.java @@ -31,7 +31,7 @@ public final class RuneOfProtectionArtifacts extends CardImpl { // {W}: The next time an artifact source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}"))); // Cycling {2} ({2}, Discard this card: Draw a card.) this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); } diff --git a/Mage.Sets/src/mage/cards/r/RuneOfProtectionBlack.java b/Mage.Sets/src/mage/cards/r/RuneOfProtectionBlack.java index be10bc46f9..21f625619a 100644 --- a/Mage.Sets/src/mage/cards/r/RuneOfProtectionBlack.java +++ b/Mage.Sets/src/mage/cards/r/RuneOfProtectionBlack.java @@ -31,7 +31,7 @@ public final class RuneOfProtectionBlack extends CardImpl { // {W}: The next time a black source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}"))); // Cycling {2} ({2}, Discard this card: Draw a card.) this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); } diff --git a/Mage.Sets/src/mage/cards/r/RuneOfProtectionBlue.java b/Mage.Sets/src/mage/cards/r/RuneOfProtectionBlue.java index 2b5b3e8d4c..27aa0896ae 100644 --- a/Mage.Sets/src/mage/cards/r/RuneOfProtectionBlue.java +++ b/Mage.Sets/src/mage/cards/r/RuneOfProtectionBlue.java @@ -31,7 +31,7 @@ public final class RuneOfProtectionBlue extends CardImpl { // {W}: The next time a blue source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}"))); // Cycling {2} ({2}, Discard this card: Draw a card.) this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); } diff --git a/Mage.Sets/src/mage/cards/r/RuneOfProtectionGreen.java b/Mage.Sets/src/mage/cards/r/RuneOfProtectionGreen.java index 2e3b040804..3b56672c40 100644 --- a/Mage.Sets/src/mage/cards/r/RuneOfProtectionGreen.java +++ b/Mage.Sets/src/mage/cards/r/RuneOfProtectionGreen.java @@ -31,7 +31,7 @@ public final class RuneOfProtectionGreen extends CardImpl { // {W}: The next time a green source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}"))); // Cycling {2} ({2}, Discard this card: Draw a card.) this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); } diff --git a/Mage.Sets/src/mage/cards/r/RuneOfProtectionLands.java b/Mage.Sets/src/mage/cards/r/RuneOfProtectionLands.java index b5be55c230..62180f1edb 100644 --- a/Mage.Sets/src/mage/cards/r/RuneOfProtectionLands.java +++ b/Mage.Sets/src/mage/cards/r/RuneOfProtectionLands.java @@ -31,7 +31,7 @@ public final class RuneOfProtectionLands extends CardImpl { // {W}: The next time a land source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}"))); // Cycling {2} ({2}, Discard this card: Draw a card.) this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); } diff --git a/Mage.Sets/src/mage/cards/r/RuneOfProtectionRed.java b/Mage.Sets/src/mage/cards/r/RuneOfProtectionRed.java index 6edb2bdcb9..70ebdcce34 100644 --- a/Mage.Sets/src/mage/cards/r/RuneOfProtectionRed.java +++ b/Mage.Sets/src/mage/cards/r/RuneOfProtectionRed.java @@ -31,7 +31,7 @@ public final class RuneOfProtectionRed extends CardImpl { // {W}: The next time a red source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}"))); // Cycling {2} ({2}, Discard this card: Draw a card.) this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); } diff --git a/Mage.Sets/src/mage/cards/r/RuneOfProtectionWhite.java b/Mage.Sets/src/mage/cards/r/RuneOfProtectionWhite.java index b2e4f6148a..2b1fc47eb6 100644 --- a/Mage.Sets/src/mage/cards/r/RuneOfProtectionWhite.java +++ b/Mage.Sets/src/mage/cards/r/RuneOfProtectionWhite.java @@ -31,7 +31,7 @@ public final class RuneOfProtectionWhite extends CardImpl { // {W}: The next time a white source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}"))); // Cycling {2} ({2}, Discard this card: Draw a card.) this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); } diff --git a/Mage.Sets/src/mage/cards/s/Soothsaying.java b/Mage.Sets/src/mage/cards/s/Soothsaying.java index 99ac952642..5b5294375e 100644 --- a/Mage.Sets/src/mage/cards/s/Soothsaying.java +++ b/Mage.Sets/src/mage/cards/s/Soothsaying.java @@ -29,7 +29,7 @@ public final class Soothsaying extends CardImpl { // {X}: Look at the top X cards of your library, then put them back in any order. Effect effect = new LookLibraryControllerEffect(ManacostVariableValue.REGULAR); effect.setText("Look at the top X cards of your library, then put them back in any order"); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("X"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{X}"))); } private Soothsaying(final Soothsaying card) { diff --git a/Mage.Sets/src/mage/cards/t/ThelonsCurse.java b/Mage.Sets/src/mage/cards/t/ThelonsCurse.java index efc5fcb36c..3a1549cf6e 100644 --- a/Mage.Sets/src/mage/cards/t/ThelonsCurse.java +++ b/Mage.Sets/src/mage/cards/t/ThelonsCurse.java @@ -92,7 +92,7 @@ class ThelonsCurseEffect extends OneShotEffect { while (player.canRespond() && countBattlefield > 0 && player.chooseUse(Outcome.AIDontUseIt, "Pay {U} and untap a tapped blue creature under your control?", source, game)) { Target tappedCreatureTarget = new TargetControlledCreaturePermanent(1, 1, filter, true); if (player.choose(Outcome.Detriment, tappedCreatureTarget, source.getSourceId(), game)) { - Cost cost = new ManaCostsImpl("U"); + Cost cost = new ManaCostsImpl<>("{U}"); Permanent tappedCreature = game.getPermanent(tappedCreatureTarget.getFirstTarget()); if (cost.pay(source, game, source, player.getId(), false)) { diff --git a/Mage.Sets/src/mage/cards/t/Torture.java b/Mage.Sets/src/mage/cards/t/Torture.java index fb213678f0..da01c582ef 100644 --- a/Mage.Sets/src/mage/cards/t/Torture.java +++ b/Mage.Sets/src/mage/cards/t/Torture.java @@ -40,7 +40,7 @@ public final class Torture extends CardImpl { this.addAbility(ability); // {1}{B}: Put a -1/-1 counter on enchanted creature. - //this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersAttachedEffect(CounterType.M1M1.createInstance(), rule), new ManaCostsImpl("[1}{B}"))); + //this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersAttachedEffect(CounterType.M1M1.createInstance(), rule), new ManaCostsImpl<>("{[1}{B}}"))); this.addAbility(new SimpleActivatedAbility( Zone.BATTLEFIELD, new AddCountersAttachedEffect(CounterType.M1M1.createInstance(),"enchanted creature"), diff --git a/Mage.Sets/src/mage/cards/t/TripNoose.java b/Mage.Sets/src/mage/cards/t/TripNoose.java index 40bcb0a551..d1ccd29ca8 100644 --- a/Mage.Sets/src/mage/cards/t/TripNoose.java +++ b/Mage.Sets/src/mage/cards/t/TripNoose.java @@ -23,7 +23,7 @@ public final class TripNoose extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); // {2}, {tap}: Tap target creature. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("2")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl<>("{2}")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/w/WallOfMulch.java b/Mage.Sets/src/mage/cards/w/WallOfMulch.java index 76907a4ad5..c9f999c344 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfMulch.java +++ b/Mage.Sets/src/mage/cards/w/WallOfMulch.java @@ -41,7 +41,7 @@ public final class WallOfMulch extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); // {G}, Sacrifice a Wall: Draw a card. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("G")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{G}")); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); diff --git a/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetPriorityTest.java b/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetPriorityTest.java index 8c24dff265..5810451be4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetPriorityTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetPriorityTest.java @@ -231,7 +231,7 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI { @Test public void test_targetAmount_NormalCase() { - Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageMultiEffect(3), new ManaCostsImpl("R")); + Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageMultiEffect(3), new ManaCostsImpl<>("{R}")); ability.addTarget(new TargetCreaturePermanentAmount(3)); addCustomCardWithAbility("damage 3", playerA, ability); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); @@ -258,7 +258,7 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI { @Test public void test_targetAmount_BadCase() { // choose targets as enters battlefield (e.g. can't be canceled) - SpellAbility spell = new SpellAbility(new ManaCostsImpl("R"), "damage 3", Zone.HAND); + SpellAbility spell = new SpellAbility(new ManaCostsImpl<>("{R}"), "damage 3", Zone.HAND); Ability ability = new EntersBattlefieldTriggeredAbility(new DamageMultiEffect(3)); ability.addTarget(new TargetCreaturePermanentAmount(3)); addCustomCardWithSpell(playerA, spell, ability, CardType.ENCHANTMENT); @@ -293,7 +293,7 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI { public void test_targetAmount_Performance() { int cardsMultiplier = 3; - Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageMultiEffect(3), new ManaCostsImpl("R")); + Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageMultiEffect(3), new ManaCostsImpl<>("{R}")); ability.addTarget(new TargetCreaturePermanentAmount(3)); addCustomCardWithAbility("damage 3", playerA, ability); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); diff --git a/Mage.Tests/src/test/java/org/mage/test/commander/duel/CommanderAffinityTest.java b/Mage.Tests/src/test/java/org/mage/test/commander/duel/CommanderAffinityTest.java index d7ec8b78a4..c807c68454 100644 --- a/Mage.Tests/src/test/java/org/mage/test/commander/duel/CommanderAffinityTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/commander/duel/CommanderAffinityTest.java @@ -91,7 +91,7 @@ public class CommanderAffinityTest extends CardTestCommanderDuelBase { public void test_Gained_Affinity() { // bug: Mycosynth Golem did not allow my commander, Karn, Silver Golem, to cost 0 even though I had 7+ artifacts on the board. - Ability ability = new SimpleActivatedAbility(Zone.ALL, new CreateTokenEffect(new ArtifactWallToken(), 7), new ManaCostsImpl("R")); + Ability ability = new SimpleActivatedAbility(Zone.ALL, new CreateTokenEffect(new ArtifactWallToken(), 7), new ManaCostsImpl<>("{R}")); addCustomCardWithAbility("generate tokens", playerA, ability); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); // diff --git a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java index 982cdc8417..59229470ab 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -439,8 +439,8 @@ public class ManaCostsImpl extends ArrayList implements M if (mana == null || mana.isEmpty()) { return; } - if (mana.startsWith("{") != mana.endsWith("}")) { - throw new IllegalArgumentException("mana costs should be surrounded by braces on both sides or not at all"); + if (!mana.startsWith("{") || !mana.endsWith("}")) { + throw new IllegalArgumentException("mana costs should start and end with braces"); } if (!extractMonoHybridGenericValue && costsCache.containsKey(mana)) {