diff --git a/Mage.Sets/src/mage/cards/a/AbandonHope.java b/Mage.Sets/src/mage/cards/a/AbandonHope.java
index a1adea968ab..635917a8982 100644
--- a/Mage.Sets/src/mage/cards/a/AbandonHope.java
+++ b/Mage.Sets/src/mage/cards/a/AbandonHope.java
@@ -34,7 +34,7 @@ public final class AbandonHope extends CardImpl {
this.addAbility(ability);
// Look at target opponent's hand and choose X cards from it. That player discards those cards.
- ManacostVariableValue manaX = new ManacostVariableValue();
+ ManacostVariableValue manaX = ManacostVariableValue.instance;
this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(manaX, TargetController.ANY));
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().setCostAdjuster(AbandonHopeAdjuster.instance);
diff --git a/Mage.Sets/src/mage/cards/a/AeonChronicler.java b/Mage.Sets/src/mage/cards/a/AeonChronicler.java
index 4a6d8d4b4a3..8b3f42378d0 100644
--- a/Mage.Sets/src/mage/cards/a/AeonChronicler.java
+++ b/Mage.Sets/src/mage/cards/a/AeonChronicler.java
@@ -36,7 +36,7 @@ public final class AeonChronicler extends CardImpl {
this.toughness = new MageInt(0);
// Aeon Chronicler's power and toughness are each equal to the number of cards in your hand.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInControllerHandCount(), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CardsInControllerHandCount.instance, Duration.EndOfGame)));
// Suspend X-{X}{3}{U}. X can't be 0.
this.addAbility(new SuspendAbility(Integer.MAX_VALUE, new ManaCostsImpl("{3}{U}"), this, true));
diff --git a/Mage.Sets/src/mage/cards/a/AetherMutation.java b/Mage.Sets/src/mage/cards/a/AetherMutation.java
index 4f0fad54ba3..c5b9b39587f 100644
--- a/Mage.Sets/src/mage/cards/a/AetherMutation.java
+++ b/Mage.Sets/src/mage/cards/a/AetherMutation.java
@@ -25,7 +25,7 @@ public final class AetherMutation extends CardImpl {
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// create X 1/1 green Saproling creature tokens, where X is that creature's converted mana cost.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new TargetConvertedManaCost()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetConvertedManaCost.instance));
}
public AetherMutation(final AetherMutation card) {
diff --git a/Mage.Sets/src/mage/cards/a/AgonizingDemise.java b/Mage.Sets/src/mage/cards/a/AgonizingDemise.java
index a183e73f73e..dcaab970431 100644
--- a/Mage.Sets/src/mage/cards/a/AgonizingDemise.java
+++ b/Mage.Sets/src/mage/cards/a/AgonizingDemise.java
@@ -40,7 +40,7 @@ public final class AgonizingDemise extends CardImpl {
//If Agonizing Demise was kicked, it deals damage equal to that creature's power to the creature's controller.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
- new DamageTargetControllerEffect(new TargetPermanentPowerCount()),
+ new DamageTargetControllerEffect(TargetPermanentPowerCount.instance),
KickedCondition.instance,
"if this spell was kicked, it deals damage equal to that creature's power to the creature's controller."));
diff --git a/Mage.Sets/src/mage/cards/a/AirdropCondor.java b/Mage.Sets/src/mage/cards/a/AirdropCondor.java
index 447fbfae6c7..824ef1f5721 100644
--- a/Mage.Sets/src/mage/cards/a/AirdropCondor.java
+++ b/Mage.Sets/src/mage/cards/a/AirdropCondor.java
@@ -42,7 +42,7 @@ public final class AirdropCondor extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// {1}{R}, Sacrifice a Goblin creature: Airdrop Condor deals damage equal to the sacrificed creature's power to any target.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SacrificeCostCreaturesPower()), new ManaCostsImpl("{1}{R}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(SacrificeCostCreaturesPower.instance), new ManaCostsImpl("{1}{R}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter)));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/a/AjaniCallerOfThePride.java b/Mage.Sets/src/mage/cards/a/AjaniCallerOfThePride.java
index 0dfdd6a8bf5..a3b0b04fc46 100644
--- a/Mage.Sets/src/mage/cards/a/AjaniCallerOfThePride.java
+++ b/Mage.Sets/src/mage/cards/a/AjaniCallerOfThePride.java
@@ -49,7 +49,7 @@ public final class AjaniCallerOfThePride extends CardImpl {
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
// -8: create X 2/2 white Cat creature tokens, where X is your life total.
- this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new CatToken(), new ControllerLifeCount()), -8));
+ this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new CatToken(), ControllerLifeCount.instance), -8));
}
public AjaniCallerOfThePride(final AjaniCallerOfThePride card) {
diff --git a/Mage.Sets/src/mage/cards/a/AjaniValiantProtector.java b/Mage.Sets/src/mage/cards/a/AjaniValiantProtector.java
index 00f6ca6c98f..7bec5ea3f33 100644
--- a/Mage.Sets/src/mage/cards/a/AjaniValiantProtector.java
+++ b/Mage.Sets/src/mage/cards/a/AjaniValiantProtector.java
@@ -44,7 +44,7 @@ public final class AjaniValiantProtector extends CardImpl {
this.addAbility(new LoyaltyAbility(new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.HAND, Zone.LIBRARY), 1));
// -11: Put X +1/+1 counters on target creature, where X is your life total. That creature gains trample until end of turn.
- Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(), new ControllerLifeCount());
+ Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(), ControllerLifeCount.instance);
effect.setText("Put X +1/+1 counters on target creature, where X is your life total.");
ability = new LoyaltyAbility(effect, -11);
effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
diff --git a/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java b/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java
index 8a28d2545e2..02198d974d4 100644
--- a/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java
+++ b/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java
@@ -44,7 +44,7 @@ public final class AjaniWiseCounselor extends CardImpl {
// −9: Put X +1/+1 counters on target creature, where X is your life total.
Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(
CounterType.P1P1.createInstance(),
- new ControllerLifeCount()
+ ControllerLifeCount.instance
).setText("put X +1/+1 counters on target creature, where X is your life total"), -9);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/a/AlabasterPotion.java b/Mage.Sets/src/mage/cards/a/AlabasterPotion.java
index 2e918e1fe18..9a69608a6f5 100644
--- a/Mage.Sets/src/mage/cards/a/AlabasterPotion.java
+++ b/Mage.Sets/src/mage/cards/a/AlabasterPotion.java
@@ -23,10 +23,10 @@ public final class AlabasterPotion extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}{W}");
// Choose one - Target player gains X life; or prevent the next X damage that would be dealt to any target this turn.
- this.getSpellAbility().addEffect(new GainLifeTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new GainLifeTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetPlayer());
Mode mode = new Mode();
- mode.addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue()));
+ mode.addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, ManacostVariableValue.instance));
mode.addTarget(new TargetAnyTarget());
this.getSpellAbility().addMode(mode);
}
diff --git a/Mage.Sets/src/mage/cards/a/AncientExcavation.java b/Mage.Sets/src/mage/cards/a/AncientExcavation.java
index 4965f68132a..c339ac270d0 100644
--- a/Mage.Sets/src/mage/cards/a/AncientExcavation.java
+++ b/Mage.Sets/src/mage/cards/a/AncientExcavation.java
@@ -61,7 +61,7 @@ class AncientExcavationEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
- DynamicValue numCards = new CardsInControllerHandCount();
+ DynamicValue numCards = CardsInControllerHandCount.instance;
int amount = numCards.calculate(game, source, this);
player.drawCards(amount, game);
player.discard(amount, false, source, game);
diff --git a/Mage.Sets/src/mage/cards/a/ApexHawks.java b/Mage.Sets/src/mage/cards/a/ApexHawks.java
index 796decca43d..12d41455eb8 100644
--- a/Mage.Sets/src/mage/cards/a/ApexHawks.java
+++ b/Mage.Sets/src/mage/cards/a/ApexHawks.java
@@ -35,7 +35,7 @@ public final class ApexHawks extends CardImpl {
// Apex Hawks enters the battlefield with a +1/+1 counter on it for each time it was kicked.
this.addAbility(new EntersBattlefieldAbility(
- new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new MultikickerCount(), true)
+ new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), MultikickerCount.instance, true)
,"with a +1/+1 counter on it for each time it was kicked"));
}
diff --git a/Mage.Sets/src/mage/cards/a/ArashiTheSkyAsunder.java b/Mage.Sets/src/mage/cards/a/ArashiTheSkyAsunder.java
index 7a91c68a674..e474a02af84 100644
--- a/Mage.Sets/src/mage/cards/a/ArashiTheSkyAsunder.java
+++ b/Mage.Sets/src/mage/cards/a/ArashiTheSkyAsunder.java
@@ -43,13 +43,13 @@ public final class ArashiTheSkyAsunder extends CardImpl {
this.toughness = new MageInt(5);
// {X}{G}, {tap}: Arashi, the Sky Asunder deals X damage to target creature with flying.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{G}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.instance), new ManaCostsImpl("{X}{G}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
// Channel - {X}{G}{G}, Discard Arashi: Arashi deals X damage to each creature with flying.
- this.addAbility(new ChannelAbility("{X}{G}{G}", new DamageAllEffect(new ManacostVariableValue(), filter)));
+ this.addAbility(new ChannelAbility("{X}{G}{G}", new DamageAllEffect(ManacostVariableValue.instance, filter)));
}
public ArashiTheSkyAsunder(final ArashiTheSkyAsunder card) {
diff --git a/Mage.Sets/src/mage/cards/a/ArtifactMutation.java b/Mage.Sets/src/mage/cards/a/ArtifactMutation.java
index 2aaa2ef0272..43c0240f8e0 100644
--- a/Mage.Sets/src/mage/cards/a/ArtifactMutation.java
+++ b/Mage.Sets/src/mage/cards/a/ArtifactMutation.java
@@ -25,7 +25,7 @@ public final class ArtifactMutation extends CardImpl {
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
// create X 1/1 green Saproling creature tokens, where X is that artifact's converted mana cost.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new TargetConvertedManaCost()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetConvertedManaCost.instance));
}
public ArtifactMutation(final ArtifactMutation card) {
diff --git a/Mage.Sets/src/mage/cards/a/AshenSkinZubera.java b/Mage.Sets/src/mage/cards/a/AshenSkinZubera.java
index 55f6c44791d..050b2493a30 100644
--- a/Mage.Sets/src/mage/cards/a/AshenSkinZubera.java
+++ b/Mage.Sets/src/mage/cards/a/AshenSkinZubera.java
@@ -27,7 +27,7 @@ public final class AshenSkinZubera extends CardImpl {
this.power = new MageInt(1);
this.toughness = new MageInt(2);
- Ability ability = new DiesTriggeredAbility(new DiscardTargetEffect(new ZuberasDiedDynamicValue()));
+ Ability ability = new DiesTriggeredAbility(new DiscardTargetEffect(ZuberasDiedDynamicValue.instance));
ability.addTarget(new TargetOpponent());
this.addAbility(ability, new ZuberasDiedWatcher());
}
diff --git a/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java b/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java
index 386cb7f67d7..38c00a82ce0 100644
--- a/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java
+++ b/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java
@@ -41,7 +41,7 @@ public final class AtalyaSamiteMaster extends CardImpl {
this.toughness = new MageInt(3);
// {X}, {tap}: Choose one - Prevent the next X damage that would be dealt to target creature this turn; or you gain X life. Spend only white mana on X.
- PreventDamageToTargetEffect effect = new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue());
+ PreventDamageToTargetEffect effect = new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, ManacostVariableValue.instance);
effect.setText("Prevent the next X damage that would be dealt to target creature this turn. Spend only white mana on X.");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
ability.addCost(new TapSourceCost());
@@ -55,7 +55,7 @@ public final class AtalyaSamiteMaster extends CardImpl {
// or you gain X life
Mode mode = new Mode();
- mode.addEffect(new GainLifeEffect(new ManacostVariableValue()).setText("You gain X life. Spend only white mana on X."));
+ mode.addEffect(new GainLifeEffect(ManacostVariableValue.instance).setText("You gain X life. Spend only white mana on X."));
ability.addMode(mode);
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/a/Atogatog.java b/Mage.Sets/src/mage/cards/a/Atogatog.java
index 107f7ccbbe1..0f17b1a8a08 100644
--- a/Mage.Sets/src/mage/cards/a/Atogatog.java
+++ b/Mage.Sets/src/mage/cards/a/Atogatog.java
@@ -37,7 +37,7 @@ public final class Atogatog extends CardImpl {
this.power = new MageInt(5);
this.toughness = new MageInt(5);
- DynamicValue xValue = new SacrificeCostCreaturesPower();
+ DynamicValue xValue = SacrificeCostCreaturesPower.instance;
// Sacrifice an Atog creature: Atogatog gets +X/+X until end of turn, where X is the sacrificed creature's power.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BoostSourceEffect(xValue, xValue,Duration.EndOfTurn),
diff --git a/Mage.Sets/src/mage/cards/a/AuraMutation.java b/Mage.Sets/src/mage/cards/a/AuraMutation.java
index 6586f22e633..7eaad0d970c 100644
--- a/Mage.Sets/src/mage/cards/a/AuraMutation.java
+++ b/Mage.Sets/src/mage/cards/a/AuraMutation.java
@@ -25,7 +25,7 @@ public final class AuraMutation extends CardImpl {
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent());
// create X 1/1 green Saproling creature tokens, where X is that enchantment's converted mana cost.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new TargetConvertedManaCost()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetConvertedManaCost.instance));
}
public AuraMutation(final AuraMutation card) {
diff --git a/Mage.Sets/src/mage/cards/a/AureliasFury.java b/Mage.Sets/src/mage/cards/a/AureliasFury.java
index 0f42f5d652e..01d4800511d 100644
--- a/Mage.Sets/src/mage/cards/a/AureliasFury.java
+++ b/Mage.Sets/src/mage/cards/a/AureliasFury.java
@@ -62,7 +62,7 @@ public final class AureliasFury extends CardImpl {
// Aurelia's Fury deals X damage divided as you choose among any number of target creatures and/or players.
// Tap each creature dealt damage this way. Players dealt damage this way can't cast noncreature spells this turn.
- DynamicValue xValue = new ManacostVariableValue();
+ DynamicValue xValue = ManacostVariableValue.instance;
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
this.getSpellAbility().addEffect(new AureliasFuryEffect());
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue));
diff --git a/Mage.Sets/src/mage/cards/a/AyliEternalPilgrim.java b/Mage.Sets/src/mage/cards/a/AyliEternalPilgrim.java
index d552596e349..4e6c3c32821 100644
--- a/Mage.Sets/src/mage/cards/a/AyliEternalPilgrim.java
+++ b/Mage.Sets/src/mage/cards/a/AyliEternalPilgrim.java
@@ -45,7 +45,7 @@ public final class AyliEternalPilgrim extends CardImpl {
this.addAbility(DeathtouchAbility.getInstance());
// {1}, Sacrifice another creature: You gain life equal to the sacrificed creature's toughness.
- Effect effect = new GainLifeEffect(new SacrificeCostCreaturesToughness());
+ Effect effect = new GainLifeEffect(SacrificeCostCreaturesToughness.instance);
effect.setText("You gain life equal to the sacrificed creature's toughness");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
diff --git a/Mage.Sets/src/mage/cards/b/BalduvianRage.java b/Mage.Sets/src/mage/cards/b/BalduvianRage.java
index 832c748b7c4..9f3e910722f 100644
--- a/Mage.Sets/src/mage/cards/b/BalduvianRage.java
+++ b/Mage.Sets/src/mage/cards/b/BalduvianRage.java
@@ -25,7 +25,7 @@ public final class BalduvianRage extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{R}");
// Target attacking creature gets +X/+0 until end of turn.
- this.getSpellAbility().addEffect(new BoostTargetEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new BoostTargetEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterAttackingCreature()));
// Draw a card at the beginning of the next turn's upkeep.
diff --git a/Mage.Sets/src/mage/cards/b/BallistaSquad.java b/Mage.Sets/src/mage/cards/b/BallistaSquad.java
index 232a7b75f18..b52ad56e1d1 100644
--- a/Mage.Sets/src/mage/cards/b/BallistaSquad.java
+++ b/Mage.Sets/src/mage/cards/b/BallistaSquad.java
@@ -30,7 +30,7 @@ public final class BallistaSquad extends CardImpl {
this.toughness = new MageInt(2);
// {X}{W}, {T}: Ballista Squad deals X damage to target attacking or blocking creature.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{W}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.instance), new ManaCostsImpl("{X}{W}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetAttackingOrBlockingCreature());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/b/BaneOfTheLiving.java b/Mage.Sets/src/mage/cards/b/BaneOfTheLiving.java
index e37a695bc91..a68033931f4 100644
--- a/Mage.Sets/src/mage/cards/b/BaneOfTheLiving.java
+++ b/Mage.Sets/src/mage/cards/b/BaneOfTheLiving.java
@@ -32,7 +32,7 @@ public final class BaneOfTheLiving extends CardImpl {
// Morph {X}{B}{B}
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{X}{B}{B}")));
// When Bane of the Living is turned face up, all creatures get -X/-X until end of turn.
- DynamicValue morphX = new SignInversionDynamicValue(new MorphManacostVariableValue());
+ DynamicValue morphX = new SignInversionDynamicValue(MorphManacostVariableValue.instance);
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new BoostAllEffect(morphX, morphX, Duration.EndOfTurn, new FilterCreaturePermanent("all creatures"), false, "", true)));
}
diff --git a/Mage.Sets/src/mage/cards/b/Banefire.java b/Mage.Sets/src/mage/cards/b/Banefire.java
index 29d3a6a2fcc..b74cddb4a94 100644
--- a/Mage.Sets/src/mage/cards/b/Banefire.java
+++ b/Mage.Sets/src/mage/cards/b/Banefire.java
@@ -106,7 +106,7 @@ class BaneFireEffect extends OneShotEffect {
class BanefireCantCounterEffect extends ContinuousRuleModifyingEffectImpl {
- Condition condition = new testCondition(new ManacostVariableValue(), 5);
+ Condition condition = new testCondition(ManacostVariableValue.instance, 5);
public BanefireCantCounterEffect() {
super(Duration.WhileOnStack, Outcome.Benefit);
diff --git a/Mage.Sets/src/mage/cards/b/Banshee.java b/Mage.Sets/src/mage/cards/b/Banshee.java
index b2392191ad1..3d0b460a5d5 100644
--- a/Mage.Sets/src/mage/cards/b/Banshee.java
+++ b/Mage.Sets/src/mage/cards/b/Banshee.java
@@ -32,9 +32,9 @@ public final class Banshee extends CardImpl {
this.toughness = new MageInt(1);
// {X}, {T}: Banshee deals half X damage, rounded down, to any target, and half X damage, rounded up, to you.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new HalfValue(new ManacostVariableValue(), false)).setText("Banshee deals half X damage, rounded down, to any target,"), new ManaCostsImpl("{X}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new HalfValue(ManacostVariableValue.instance, false)).setText("Banshee deals half X damage, rounded down, to any target,"), new ManaCostsImpl("{X}"));
ability.addCost(new TapSourceCost());
- ability.addEffect(new DamageControllerEffect(new HalfValue(new ManacostVariableValue(), true)).setText(" and half X damage, rounded up, to you"));
+ ability.addEffect(new DamageControllerEffect(new HalfValue(ManacostVariableValue.instance, true)).setText(" and half X damage, rounded up, to you"));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/b/BarrageTyrant.java b/Mage.Sets/src/mage/cards/b/BarrageTyrant.java
index 350f221c345..8f4b20d1274 100644
--- a/Mage.Sets/src/mage/cards/b/BarrageTyrant.java
+++ b/Mage.Sets/src/mage/cards/b/BarrageTyrant.java
@@ -45,7 +45,7 @@ public final class BarrageTyrant extends CardImpl {
this.addAbility(new DevoidAbility(this.color));
// {2}{R}, Sacrifice another colorless creature: Barrage Tyrant deals damage equal to the sacrificed creature's power to any target.
- Effect effect = new DamageTargetEffect(new SacrificeCostCreaturesPower());
+ Effect effect = new DamageTargetEffect(SacrificeCostCreaturesPower.instance);
effect.setText("{this} deals damage equal to the sacrificed creature's power to any target");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{R}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter)));
diff --git a/Mage.Sets/src/mage/cards/b/BattleAtTheBridge.java b/Mage.Sets/src/mage/cards/b/BattleAtTheBridge.java
index b7d906149ef..6aced560b88 100644
--- a/Mage.Sets/src/mage/cards/b/BattleAtTheBridge.java
+++ b/Mage.Sets/src/mage/cards/b/BattleAtTheBridge.java
@@ -27,10 +27,10 @@ public final class BattleAtTheBridge extends CardImpl {
addAbility(new ImproviseAbility());
// Target creature gets -X/-X until end of turn. You gain X life.
- DynamicValue x = new SignInversionDynamicValue(new ManacostVariableValue());
+ DynamicValue x = new SignInversionDynamicValue(ManacostVariableValue.instance);
this.getSpellAbility().addEffect(new BoostTargetEffect(x, x, Duration.EndOfTurn, true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
- this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new GainLifeEffect(ManacostVariableValue.instance));
}
public BattleAtTheBridge(final BattleAtTheBridge card) {
diff --git a/Mage.Sets/src/mage/cards/b/BelbesArmor.java b/Mage.Sets/src/mage/cards/b/BelbesArmor.java
index e1e54a3e326..d9cc57f6a26 100644
--- a/Mage.Sets/src/mage/cards/b/BelbesArmor.java
+++ b/Mage.Sets/src/mage/cards/b/BelbesArmor.java
@@ -29,8 +29,8 @@ public final class BelbesArmor extends CardImpl {
Ability ability = new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new BoostTargetEffect(
- new MultipliedValue(new ManacostVariableValue(), -1),
- new ManacostVariableValue(),
+ new MultipliedValue(ManacostVariableValue.instance, -1),
+ ManacostVariableValue.instance,
Duration.EndOfTurn
),
new ManaCostsImpl("{X}"));
diff --git a/Mage.Sets/src/mage/cards/b/Berserk.java b/Mage.Sets/src/mage/cards/b/Berserk.java
index dc4065a0c82..d1f990e57e3 100644
--- a/Mage.Sets/src/mage/cards/b/Berserk.java
+++ b/Mage.Sets/src/mage/cards/b/Berserk.java
@@ -43,7 +43,7 @@ public final class Berserk extends CardImpl {
Effect effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
effect.setText("Target creature gains trample");
this.getSpellAbility().addEffect(effect);
- effect = new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true);
+ effect = new BoostTargetEffect(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true);
effect.setText("and gets +X/+0 until end of turn, where X is its power");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new BerserkDestroyEffect());
diff --git a/Mage.Sets/src/mage/cards/b/BiomassMutation.java b/Mage.Sets/src/mage/cards/b/BiomassMutation.java
index eaf52684665..cbd6af34074 100644
--- a/Mage.Sets/src/mage/cards/b/BiomassMutation.java
+++ b/Mage.Sets/src/mage/cards/b/BiomassMutation.java
@@ -22,7 +22,7 @@ public final class BiomassMutation extends CardImpl {
// Creatures you control have base power and toughness X/X until end of turn.
- DynamicValue variableMana = new ManacostVariableValue();
+ DynamicValue variableMana = ManacostVariableValue.instance;
this.getSpellAbility().addEffect(new SetPowerToughnessAllEffect(variableMana, variableMana, Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures you control"), true));
}
diff --git a/Mage.Sets/src/mage/cards/b/BlackManaBattery.java b/Mage.Sets/src/mage/cards/b/BlackManaBattery.java
index 2423fc449b4..0aa099282e4 100644
--- a/Mage.Sets/src/mage/cards/b/BlackManaBattery.java
+++ b/Mage.Sets/src/mage/cards/b/BlackManaBattery.java
@@ -36,7 +36,7 @@ public final class BlackManaBattery extends CardImpl {
// {tap}, Remove any number of charge counters from Black Mana Battery: Add {B}, then add an additional {B} for each charge counter removed this way.
ability = new DynamicManaAbility(
Mana.BlackMana(1),
- new IntPlusDynamicValue(1, new RemovedCountersForCostValue()),
+ new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance),
new TapSourceCost(),
"Add {B}, then add {B} for each charge counter removed this way",
true, new CountersSourceCount(CounterType.CHARGE));
diff --git a/Mage.Sets/src/mage/cards/b/Blaze.java b/Mage.Sets/src/mage/cards/b/Blaze.java
index bbeead84810..d2b4c019217 100644
--- a/Mage.Sets/src/mage/cards/b/Blaze.java
+++ b/Mage.Sets/src/mage/cards/b/Blaze.java
@@ -20,7 +20,7 @@ public final class Blaze extends CardImpl {
// Blaze deals X damage to any target.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
diff --git a/Mage.Sets/src/mage/cards/b/BlazingShoal.java b/Mage.Sets/src/mage/cards/b/BlazingShoal.java
index 79e19d154d5..9f6238b97e4 100644
--- a/Mage.Sets/src/mage/cards/b/BlazingShoal.java
+++ b/Mage.Sets/src/mage/cards/b/BlazingShoal.java
@@ -38,7 +38,7 @@ public final class BlazingShoal extends CardImpl {
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter),true)));
// Target creature gets +X/+0 until end of turn.
- this.getSpellAbility().addEffect(new BoostTargetEffect(new ExileFromHandCostCardConvertedMana(), new StaticValue(0), Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new BoostTargetEffect(ExileFromHandCostCardConvertedMana.instance, new StaticValue(0), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/b/BloodChinFanatic.java b/Mage.Sets/src/mage/cards/b/BloodChinFanatic.java
index 2c5135dbebc..a05a7f28575 100644
--- a/Mage.Sets/src/mage/cards/b/BloodChinFanatic.java
+++ b/Mage.Sets/src/mage/cards/b/BloodChinFanatic.java
@@ -42,9 +42,9 @@ public final class BloodChinFanatic extends CardImpl {
this.toughness = new MageInt(3);
// {1}{B}, Sacrifice another Warrior creature: Target player loses X life and you gain X life, where X is the sacrificed creature's power.
- Effect effect = new LoseLifeTargetEffect(new SacrificeCostCreaturesPower());
+ Effect effect = new LoseLifeTargetEffect(SacrificeCostCreaturesPower.instance);
effect.setText("Target player loses X life");
- Effect effect2 = new GainLifeEffect(new SacrificeCostCreaturesPower());
+ Effect effect2 = new GainLifeEffect(SacrificeCostCreaturesPower.instance);
effect2.setText("and you gain X life, where X is the sacrificed creature's power");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}"));
ability.addEffect(effect2);
diff --git a/Mage.Sets/src/mage/cards/b/BloodcrazedPaladin.java b/Mage.Sets/src/mage/cards/b/BloodcrazedPaladin.java
index 979494a69d5..85cfe792f6c 100644
--- a/Mage.Sets/src/mage/cards/b/BloodcrazedPaladin.java
+++ b/Mage.Sets/src/mage/cards/b/BloodcrazedPaladin.java
@@ -34,7 +34,7 @@ public final class BloodcrazedPaladin extends CardImpl {
// Bloodcrazed Paladin enters the battlefield with a +1/+1 counter on it for each creature that died this turn.
Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0),
- new CreaturesDiedThisTurnCount(), true);
+ CreaturesDiedThisTurnCount.instance, true);
effect.setText("with a +1/+1 counter on it for each creature that died this turn.");
this.addAbility(new EntersBattlefieldAbility(effect), new CreaturesDiedWatcher());
}
diff --git a/Mage.Sets/src/mage/cards/b/BloodcurdlingScream.java b/Mage.Sets/src/mage/cards/b/BloodcurdlingScream.java
index 405349caa76..50d803fc36c 100644
--- a/Mage.Sets/src/mage/cards/b/BloodcurdlingScream.java
+++ b/Mage.Sets/src/mage/cards/b/BloodcurdlingScream.java
@@ -21,7 +21,7 @@ public final class BloodcurdlingScream extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}");
// Target creature gets +X/+0 until end of turn.
- this.getSpellAbility().addEffect(new BoostTargetEffect(new ExileFromHandCostCardConvertedMana(), new StaticValue(0), Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new BoostTargetEffect(ExileFromHandCostCardConvertedMana.instance, new StaticValue(0), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/b/BloodhuskRitualist.java b/Mage.Sets/src/mage/cards/b/BloodhuskRitualist.java
index 4fb929dd9f9..d3cc620816a 100644
--- a/Mage.Sets/src/mage/cards/b/BloodhuskRitualist.java
+++ b/Mage.Sets/src/mage/cards/b/BloodhuskRitualist.java
@@ -32,7 +32,7 @@ public final class BloodhuskRitualist extends CardImpl {
this.addAbility(new MultikickerAbility("{B}"));
// When Bloodhusk Ritualist enters the battlefield, target opponent discards a card for each time it was kicked.
- Ability ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(new MultikickerCount()));
+ Ability ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(MultikickerCount.instance));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/b/BloodshotCyclops.java b/Mage.Sets/src/mage/cards/b/BloodshotCyclops.java
index 80aa19dbbb8..7cbe947de4d 100644
--- a/Mage.Sets/src/mage/cards/b/BloodshotCyclops.java
+++ b/Mage.Sets/src/mage/cards/b/BloodshotCyclops.java
@@ -33,7 +33,7 @@ public final class BloodshotCyclops extends CardImpl {
// {T}, Sacrifice a creature: Bloodshot Cyclops deals damage equal to the sacrificed
// creature's power to any target.
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
- new DamageTargetEffect(new SacrificeCostCreaturesPower()),
+ new DamageTargetEffect(SacrificeCostCreaturesPower.instance),
new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
ability.addTarget(new TargetAnyTarget());
diff --git a/Mage.Sets/src/mage/cards/b/BlueManaBattery.java b/Mage.Sets/src/mage/cards/b/BlueManaBattery.java
index 9283e18893c..05ad3bfc873 100644
--- a/Mage.Sets/src/mage/cards/b/BlueManaBattery.java
+++ b/Mage.Sets/src/mage/cards/b/BlueManaBattery.java
@@ -36,7 +36,7 @@ public final class BlueManaBattery extends CardImpl {
// {tap}, Remove any number of charge counters from Blue Mana Battery: Add {U}, then add an additional {U} for each charge counter removed this way.
ability = new DynamicManaAbility(
Mana.BlueMana(1),
- new IntPlusDynamicValue(1, new RemovedCountersForCostValue()),
+ new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance),
new TapSourceCost(),
"Add {U}, then add {U} for each charge counter removed this way",
true, new CountersSourceCount(CounterType.CHARGE));
diff --git a/Mage.Sets/src/mage/cards/b/BlueSunsZenith.java b/Mage.Sets/src/mage/cards/b/BlueSunsZenith.java
index 72d74af31fb..2e94941db50 100644
--- a/Mage.Sets/src/mage/cards/b/BlueSunsZenith.java
+++ b/Mage.Sets/src/mage/cards/b/BlueSunsZenith.java
@@ -21,7 +21,7 @@ public final class BlueSunsZenith extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{U}{U}{U}");
// Target player draws X cards. Shuffle Blue Sun's Zenith into its owner's library.
- this.getSpellAbility().addEffect(new DrawCardTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DrawCardTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addEffect(ShuffleSpellEffect.getInstance());
this.getSpellAbility().addTarget(new TargetPlayer());
}
diff --git a/Mage.Sets/src/mage/cards/b/BondOfAgony.java b/Mage.Sets/src/mage/cards/b/BondOfAgony.java
index 761c1ad9886..a6da60f30ec 100644
--- a/Mage.Sets/src/mage/cards/b/BondOfAgony.java
+++ b/Mage.Sets/src/mage/cards/b/BondOfAgony.java
@@ -18,7 +18,7 @@ public final class BondOfAgony extends CardImpl {
public BondOfAgony(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}");
- DynamicValue xValue = new ManacostVariableValue();
+ DynamicValue xValue = ManacostVariableValue.instance;
// As an additional cost to cast Bond of Agony, pay X life.
// magenoxx: here we don't use PayVariableLifeCost as {X} shouldn't actually be announced
diff --git a/Mage.Sets/src/mage/cards/b/BorrowingTheEastWind.java b/Mage.Sets/src/mage/cards/b/BorrowingTheEastWind.java
index 9d5ab407c52..53f13e39bef 100644
--- a/Mage.Sets/src/mage/cards/b/BorrowingTheEastWind.java
+++ b/Mage.Sets/src/mage/cards/b/BorrowingTheEastWind.java
@@ -27,7 +27,7 @@ public final class BorrowingTheEastWind extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{G}{G}");
// Borrowing the East Wind deals X damage to each creature with horsemanship and each player.
- this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter)); }
+ this.getSpellAbility().addEffect(new DamageEverythingEffect(ManacostVariableValue.instance, filter)); }
public BorrowingTheEastWind(final BorrowingTheEastWind card) {
super(card);
diff --git a/Mage.Sets/src/mage/cards/b/BottomlessVault.java b/Mage.Sets/src/mage/cards/b/BottomlessVault.java
index 8bd5f7fa137..caad3bf15cd 100644
--- a/Mage.Sets/src/mage/cards/b/BottomlessVault.java
+++ b/Mage.Sets/src/mage/cards/b/BottomlessVault.java
@@ -44,7 +44,7 @@ public final class BottomlessVault extends CardImpl {
// {tap}, Remove any number of storage counters from Bottomless Vault: Add {B} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.BlackMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {B} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/b/BrainInAJar.java b/Mage.Sets/src/mage/cards/b/BrainInAJar.java
index 161a5c9fcc3..78969941889 100644
--- a/Mage.Sets/src/mage/cards/b/BrainInAJar.java
+++ b/Mage.Sets/src/mage/cards/b/BrainInAJar.java
@@ -118,7 +118,7 @@ class BrainInAJarScryEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
- int x = new RemovedCountersForCostValue().calculate(game, source, this);
+ int x = RemovedCountersForCostValue.instance.calculate(game, source, this);
if (x > 0) {
return controller.scry(x, source, game);
}
diff --git a/Mage.Sets/src/mage/cards/b/Braingeyser.java b/Mage.Sets/src/mage/cards/b/Braingeyser.java
index f3bd4083b03..75dad9a4f61 100644
--- a/Mage.Sets/src/mage/cards/b/Braingeyser.java
+++ b/Mage.Sets/src/mage/cards/b/Braingeyser.java
@@ -21,7 +21,7 @@ public final class Braingeyser extends CardImpl {
// Target player draws X cards.
- this.getSpellAbility().addEffect(new DrawCardTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DrawCardTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetPlayer());
}
diff --git a/Mage.Sets/src/mage/cards/b/Brightflame.java b/Mage.Sets/src/mage/cards/b/Brightflame.java
index 8e70b4a364b..54f8ab2edf0 100644
--- a/Mage.Sets/src/mage/cards/b/Brightflame.java
+++ b/Mage.Sets/src/mage/cards/b/Brightflame.java
@@ -29,7 +29,7 @@ public final class Brightflame extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}{R}{W}{W}");
// Radiance - Brightflame deals X damage to target creature and each other creature that shares a color with it. You gain life equal to the damage dealt this way.
- this.getSpellAbility().addEffect(new BrightflameEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new BrightflameEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().setAbilityWord(AbilityWord.RADIANCE);
}
diff --git a/Mage.Sets/src/mage/cards/b/BrokenAmbitions.java b/Mage.Sets/src/mage/cards/b/BrokenAmbitions.java
index 484e49a2109..b9d4be4d1a3 100644
--- a/Mage.Sets/src/mage/cards/b/BrokenAmbitions.java
+++ b/Mage.Sets/src/mage/cards/b/BrokenAmbitions.java
@@ -30,7 +30,7 @@ public final class BrokenAmbitions extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{U}");
// Counter target spell unless its controller pays {X}. Clash with an opponent. If you win, that spell's controller puts the top four cards of their library into their graveyard.
- this.getSpellAbility().addEffect(new BrokenAmbitionsEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new BrokenAmbitionsEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetSpell());
}
diff --git a/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java b/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java
index 7931708785d..7707490f2de 100644
--- a/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java
+++ b/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java
@@ -69,7 +69,7 @@ class BurnAtTheStakeEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
- int amount = (new GetXValue()).calculate(game, source, this) * 3;
+ int amount = (GetXValue.instance).calculate(game, source, this) * 3;
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
if (permanent != null) {
diff --git a/Mage.Sets/src/mage/cards/c/CabalInterrogator.java b/Mage.Sets/src/mage/cards/c/CabalInterrogator.java
index 7e8862fdb93..4fd7e496e3d 100644
--- a/Mage.Sets/src/mage/cards/c/CabalInterrogator.java
+++ b/Mage.Sets/src/mage/cards/c/CabalInterrogator.java
@@ -78,7 +78,7 @@ class CabalInterrogatorEffect extends OneShotEffect {
return false;
}
- int amountToReveal = (new ManacostVariableValue()).calculate(game, source, this);
+ int amountToReveal = (ManacostVariableValue.instance).calculate(game, source, this);
Cards revealedCards = new CardsImpl();
if (amountToReveal > 0 && targetPlayer.getHand().size() > amountToReveal) {
diff --git a/Mage.Sets/src/mage/cards/c/CacklingWitch.java b/Mage.Sets/src/mage/cards/c/CacklingWitch.java
index ec76eecd38d..37f93e1542a 100644
--- a/Mage.Sets/src/mage/cards/c/CacklingWitch.java
+++ b/Mage.Sets/src/mage/cards/c/CacklingWitch.java
@@ -33,7 +33,7 @@ public final class CacklingWitch extends CardImpl {
this.toughness = new MageInt(1);
// {X}{B}, {tap}, Discard a card: Target creature gets +X/+0 until end of turn.
- ManacostVariableValue manaX = new ManacostVariableValue();
+ ManacostVariableValue manaX = ManacostVariableValue.instance;
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BoostTargetEffect(manaX, new StaticValue(0), Duration.EndOfTurn),
new ManaCostsImpl("{X}{B}"));
diff --git a/Mage.Sets/src/mage/cards/c/CalciformPools.java b/Mage.Sets/src/mage/cards/c/CalciformPools.java
index 72702e77fde..9d123691915 100644
--- a/Mage.Sets/src/mage/cards/c/CalciformPools.java
+++ b/Mage.Sets/src/mage/cards/c/CalciformPools.java
@@ -36,7 +36,7 @@ public final class CalciformPools extends CardImpl {
this.addAbility(ability);
// {1}, Remove X storage counters from Calciform Pools: Add X mana in any combination of {W} and/or {U}.
ability = new SimpleManaAbility(Zone.BATTLEFIELD,
- new AddManaInAnyCombinationEffect(new RemovedCountersForCostValue(), ColoredManaSymbol.W, ColoredManaSymbol.U),
+ new AddManaInAnyCombinationEffect(RemovedCountersForCostValue.instance, ColoredManaSymbol.W, ColoredManaSymbol.U),
new GenericManaCost(1));
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance()));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/c/Carrion.java b/Mage.Sets/src/mage/cards/c/Carrion.java
index 335d1c595a4..befed330ea5 100644
--- a/Mage.Sets/src/mage/cards/c/Carrion.java
+++ b/Mage.Sets/src/mage/cards/c/Carrion.java
@@ -25,7 +25,7 @@ public final class Carrion extends CardImpl {
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
// Put X 0/1 black Insect creature tokens onto the battlefield, where X is the sacrificed creature's power.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new CarrionBlackInsectToken(), new SacrificeCostCreaturesPower()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new CarrionBlackInsectToken(), SacrificeCostCreaturesPower.instance));
}
public Carrion(final Carrion card) {
diff --git a/Mage.Sets/src/mage/cards/c/ChamberSentry.java b/Mage.Sets/src/mage/cards/c/ChamberSentry.java
index 60c11825020..7e8969db2a5 100644
--- a/Mage.Sets/src/mage/cards/c/ChamberSentry.java
+++ b/Mage.Sets/src/mage/cards/c/ChamberSentry.java
@@ -44,7 +44,7 @@ public final class ChamberSentry extends CardImpl {
"with a +1/+1 counter on it for each color of mana spent to cast it"));
// {X}, {T}, Remove X +1/+1 counters from Chamber Sentry: It deals X damage to any target.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue())
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.instance)
.setText("It deals X damage to any target"),
new ManaCostsImpl("{X}"));
ability.addCost(new TapSourceCost());
diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java b/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java
index 53634931b27..f8e27453659 100644
--- a/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java
+++ b/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java
@@ -82,7 +82,7 @@ enum ChampionOfStraySoulsAdjuster implements TargetAdjuster {
public void adjustTargets(Ability ability, Game game) {
for (Effect effect : ability.getEffects()) {
if (effect instanceof ReturnFromGraveyardToBattlefieldTargetEffect) {
- int xValue = new GetXValue().calculate(game, ability, null);
+ int xValue = GetXValue.instance.calculate(game, ability, null);
ability.getTargets().clear();
ability.addTarget(new TargetCardInYourGraveyard(xValue, xValue, new FilterCreatureCard("creature cards from your graveyard")));
}
diff --git a/Mage.Sets/src/mage/cards/c/ChillHaunting.java b/Mage.Sets/src/mage/cards/c/ChillHaunting.java
index 2730c08155f..d13c2420f26 100644
--- a/Mage.Sets/src/mage/cards/c/ChillHaunting.java
+++ b/Mage.Sets/src/mage/cards/c/ChillHaunting.java
@@ -28,7 +28,7 @@ public final class ChillHaunting extends CardImpl {
// Target creature gets -X/-X until end of turn.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
- DynamicValue xval = new SignInversionDynamicValue(new GetXValue());
+ DynamicValue xval = new SignInversionDynamicValue(GetXValue.instance);
this.getSpellAbility().addEffect(new BoostTargetEffect(xval, xval, Duration.EndOfTurn));
}
diff --git a/Mage.Sets/src/mage/cards/c/CinderElemental.java b/Mage.Sets/src/mage/cards/c/CinderElemental.java
index 8adeae708e2..16a0dfcae52 100644
--- a/Mage.Sets/src/mage/cards/c/CinderElemental.java
+++ b/Mage.Sets/src/mage/cards/c/CinderElemental.java
@@ -31,7 +31,7 @@ public final class CinderElemental extends CardImpl {
this.toughness = new MageInt(2);
// {X}{R}, {tap}, Sacrifice Cinder Elemental: Cinder Elemental deals X damage to any target.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{R}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.instance), new ManaCostsImpl("{X}{R}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetAnyTarget());
diff --git a/Mage.Sets/src/mage/cards/c/ClanDefiance.java b/Mage.Sets/src/mage/cards/c/ClanDefiance.java
index 49d307e93ed..7400b1fb4f7 100644
--- a/Mage.Sets/src/mage/cards/c/ClanDefiance.java
+++ b/Mage.Sets/src/mage/cards/c/ClanDefiance.java
@@ -36,16 +36,16 @@ public final class ClanDefiance extends CardImpl {
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(3);
// Clan Defiance deals X damage to target creature with flying;
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
// Clan Defiance deals X damage to target creature without flying;
Mode mode1 = new Mode();
- mode1.addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ mode1.addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
mode1.addTarget(new TargetCreaturePermanent(filter2));
this.getSpellAbility().addMode(mode1);
// and/or Clan Defiance deals X damage to target player.
Mode mode2 = new Mode();
- mode2.addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ mode2.addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
mode2.addTarget(new TargetPlayerOrPlaneswalker());
this.getSpellAbility().addMode(mode2);
diff --git a/Mage.Sets/src/mage/cards/c/ClashOfWills.java b/Mage.Sets/src/mage/cards/c/ClashOfWills.java
index 0108bc26916..a16fe93da3d 100644
--- a/Mage.Sets/src/mage/cards/c/ClashOfWills.java
+++ b/Mage.Sets/src/mage/cards/c/ClashOfWills.java
@@ -19,7 +19,7 @@ public final class ClashOfWills extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{U}");
// Counter target spell unless its controller pays {X}.
- this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetSpell());
}
diff --git a/Mage.Sets/src/mage/cards/c/ClockworkAvian.java b/Mage.Sets/src/mage/cards/c/ClockworkAvian.java
index 7eabddb97fa..696fca568a1 100644
--- a/Mage.Sets/src/mage/cards/c/ClockworkAvian.java
+++ b/Mage.Sets/src/mage/cards/c/ClockworkAvian.java
@@ -63,7 +63,7 @@ public final class ClockworkAvian extends CardImpl {
Zone.BATTLEFIELD,
new AvianAddCountersSourceEffect(
CounterType.P1P0.createInstance(),
- new ManacostVariableValue(),
+ ManacostVariableValue.instance,
true, true
),
new ManaCostsImpl("{X}"),
diff --git a/Mage.Sets/src/mage/cards/c/ClockworkBeast.java b/Mage.Sets/src/mage/cards/c/ClockworkBeast.java
index e02f4434b43..9fa1356e13e 100644
--- a/Mage.Sets/src/mage/cards/c/ClockworkBeast.java
+++ b/Mage.Sets/src/mage/cards/c/ClockworkBeast.java
@@ -59,7 +59,7 @@ public final class ClockworkBeast extends CardImpl {
Zone.BATTLEFIELD,
new BeastAddCountersSourceEffect(
CounterType.P1P0.createInstance(),
- new ManacostVariableValue(),
+ ManacostVariableValue.instance,
true, true
),
new ManaCostsImpl("{X}"),
diff --git a/Mage.Sets/src/mage/cards/c/ClockworkSteed.java b/Mage.Sets/src/mage/cards/c/ClockworkSteed.java
index fe4557ef8dd..c2975f53d2c 100644
--- a/Mage.Sets/src/mage/cards/c/ClockworkSteed.java
+++ b/Mage.Sets/src/mage/cards/c/ClockworkSteed.java
@@ -70,7 +70,7 @@ public final class ClockworkSteed extends CardImpl {
Zone.BATTLEFIELD,
new ClockworkSteedAddCountersSourceEffect(
CounterType.P1P0.createInstance(),
- new ManacostVariableValue(),
+ ManacostVariableValue.instance,
true, true
),
new ManaCostsImpl("{X}"),
diff --git a/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java b/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java
index 4480d844ced..0cd0288d2e2 100644
--- a/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java
+++ b/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java
@@ -73,7 +73,7 @@ public final class ClockworkSwarm extends CardImpl {
Zone.BATTLEFIELD,
new SwarmAddCountersSourceEffect(
CounterType.P1P0.createInstance(),
- new ManacostVariableValue(),
+ ManacostVariableValue.instance,
true, true
),
new ManaCostsImpl("{X}"),
diff --git a/Mage.Sets/src/mage/cards/c/CometStorm.java b/Mage.Sets/src/mage/cards/c/CometStorm.java
index 0c331d3d7bd..41c3de1510c 100644
--- a/Mage.Sets/src/mage/cards/c/CometStorm.java
+++ b/Mage.Sets/src/mage/cards/c/CometStorm.java
@@ -49,7 +49,7 @@ enum CometStormAdjuster implements TargetAdjuster {
@Override
public void adjustTargets(Ability ability, Game game) {
ability.getTargets().clear();
- int numbTargets = new MultikickerCount().calculate(game, ability, null) + 1;
+ int numbTargets = MultikickerCount.instance.calculate(game, ability, null) + 1;
ability.addTarget(new TargetAnyTarget(numbTargets));
}
}
diff --git a/Mage.Sets/src/mage/cards/c/Condescend.java b/Mage.Sets/src/mage/cards/c/Condescend.java
index 05ce5af84c0..26c8ceb6f9c 100644
--- a/Mage.Sets/src/mage/cards/c/Condescend.java
+++ b/Mage.Sets/src/mage/cards/c/Condescend.java
@@ -21,7 +21,7 @@ public final class Condescend extends CardImpl {
// Counter target spell unless its controller pays {X}.
- this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetSpell());
// Scry 2.
this.getSpellAbility().addEffect(new ScryEffect(2));
diff --git a/Mage.Sets/src/mage/cards/c/CopperLeafAngel.java b/Mage.Sets/src/mage/cards/c/CopperLeafAngel.java
index 8fe61fdfd93..a894eec2486 100644
--- a/Mage.Sets/src/mage/cards/c/CopperLeafAngel.java
+++ b/Mage.Sets/src/mage/cards/c/CopperLeafAngel.java
@@ -35,7 +35,7 @@ public final class CopperLeafAngel extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// {tap}, Sacrifice X lands: Put X +1/+1 counters on Copper-Leaf Angel.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(),new GetXValue(), false), new TapSourceCost());
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(),GetXValue.instance, false), new TapSourceCost());
ability.addCost(new SacrificeXTargetCost(new FilterControlledLandPermanent("lands"), false));
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/c/CorrosiveGale.java b/Mage.Sets/src/mage/cards/c/CorrosiveGale.java
index 3a4ca7d2346..e5a5ccb8e41 100644
--- a/Mage.Sets/src/mage/cards/c/CorrosiveGale.java
+++ b/Mage.Sets/src/mage/cards/c/CorrosiveGale.java
@@ -27,7 +27,7 @@ public final class CorrosiveGale extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{G/P}");
- this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filter));
+ this.getSpellAbility().addEffect(new DamageAllEffect(ManacostVariableValue.instance, filter));
}
public CorrosiveGale(final CorrosiveGale card) {
diff --git a/Mage.Sets/src/mage/cards/c/CratersClaws.java b/Mage.Sets/src/mage/cards/c/CratersClaws.java
index 7d212220f11..acdea1c74a7 100644
--- a/Mage.Sets/src/mage/cards/c/CratersClaws.java
+++ b/Mage.Sets/src/mage/cards/c/CratersClaws.java
@@ -24,8 +24,8 @@ public final class CratersClaws extends CardImpl {
// Crater's Claws deals X damage to any target.
// Ferocious — Crater's Claws deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
- new DamageTargetEffect(new IntPlusDynamicValue(2, new ManacostVariableValue())),
- new DamageTargetEffect(new ManacostVariableValue()),
+ new DamageTargetEffect(new IntPlusDynamicValue(2, ManacostVariableValue.instance)),
+ new DamageTargetEffect(ManacostVariableValue.instance),
FerociousCondition.instance,
"{this} deals X damage to any target."
+ "
Ferocious — {this} deals X plus 2 damage to that permanent or player instead if you control a creature with power 4 or greater"));
diff --git a/Mage.Sets/src/mage/cards/c/CreatureBond.java b/Mage.Sets/src/mage/cards/c/CreatureBond.java
index a1a84630738..7a6fff4437a 100644
--- a/Mage.Sets/src/mage/cards/c/CreatureBond.java
+++ b/Mage.Sets/src/mage/cards/c/CreatureBond.java
@@ -35,7 +35,7 @@ public final class CreatureBond extends CardImpl {
this.addAbility(ability);
// When enchanted creature dies, Creature Bond deals damage equal to that creature's toughness to the creature's controller.
- this.addAbility( new DiesAttachedTriggeredAbility(new DamageAttachedControllerEffect(new AttachedPermanentToughnessValue()), "enchanted creature"));
+ this.addAbility( new DiesAttachedTriggeredAbility(new DamageAttachedControllerEffect(AttachedPermanentToughnessValue.instance), "enchanted creature"));
}
public CreatureBond(final CreatureBond card) {
diff --git a/Mage.Sets/src/mage/cards/c/CrimsonHellkite.java b/Mage.Sets/src/mage/cards/c/CrimsonHellkite.java
index a929af7dfd1..f9f867142d4 100644
--- a/Mage.Sets/src/mage/cards/c/CrimsonHellkite.java
+++ b/Mage.Sets/src/mage/cards/c/CrimsonHellkite.java
@@ -43,7 +43,7 @@ public final class CrimsonHellkite extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// {X}, {tap}: Crimson Hellkite deals X damage to target creature. Spend only red mana on X.
- Effect effect = new DamageTargetEffect(new ManacostVariableValue());
+ Effect effect = new DamageTargetEffect(ManacostVariableValue.instance);
effect.setText("{this} deals X damage to target creature. Spend only red mana on X");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
ability.addCost(new TapSourceCost());
diff --git a/Mage.Sets/src/mage/cards/c/CrucibleOfTheSpiritDragon.java b/Mage.Sets/src/mage/cards/c/CrucibleOfTheSpiritDragon.java
index 1eb974792d8..0b8fe29b228 100644
--- a/Mage.Sets/src/mage/cards/c/CrucibleOfTheSpiritDragon.java
+++ b/Mage.Sets/src/mage/cards/c/CrucibleOfTheSpiritDragon.java
@@ -44,7 +44,7 @@ public final class CrucibleOfTheSpiritDragon extends CardImpl {
// {T}, Remove X storage counters from Crucible of the Spirit Dragon: Add X mana in any combination of colors. Spend this mana only to cast Dragon spells or activate abilities of Dragons.
ability = new ConditionalAnyColorManaAbility(
new TapSourceCost(),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new CrucibleOfTheSpiritDragonManaBuilder(),
false
);
diff --git a/Mage.Sets/src/mage/cards/c/CruelSadist.java b/Mage.Sets/src/mage/cards/c/CruelSadist.java
index 3be03cd96ea..63e7c85fac2 100644
--- a/Mage.Sets/src/mage/cards/c/CruelSadist.java
+++ b/Mage.Sets/src/mage/cards/c/CruelSadist.java
@@ -44,7 +44,7 @@ public final class CruelSadist extends CardImpl {
this.addAbility(ability);
// {2}{B}, {T}, Remove X +1/+1 counters from Cruel Sadist: Cruel Sadist deals X damage to target creature.
- Effect effect = new DamageTargetEffect(new RemovedCountersForCostValue());
+ Effect effect = new DamageTargetEffect(RemovedCountersForCostValue.instance);
effect.setText("{this} deals X damage to target creature");
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{B}"));
ability.addCost(new TapSourceCost());
diff --git a/Mage.Sets/src/mage/cards/c/CryptRats.java b/Mage.Sets/src/mage/cards/c/CryptRats.java
index f19332295b1..d5dfc118933 100644
--- a/Mage.Sets/src/mage/cards/c/CryptRats.java
+++ b/Mage.Sets/src/mage/cards/c/CryptRats.java
@@ -38,7 +38,7 @@ public final class CryptRats extends CardImpl {
this.toughness = new MageInt(1);
// {X}: Crypt Rats deals X damage to each creature and each player. Spend only black mana on X.
- Effect effect = new DamageEverythingEffect(new ManacostVariableValue());
+ Effect effect = new DamageEverythingEffect(ManacostVariableValue.instance);
effect.setText("{this} deals X damage to each creature and each player. Spend only black mana on X");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect,new ManaCostsImpl("{X}"));
VariableCost variableCost = ability.getManaCostsToPay().getVariableCosts().get(0);
diff --git a/Mage.Sets/src/mage/cards/c/CutRibbons.java b/Mage.Sets/src/mage/cards/c/CutRibbons.java
index 3d373dd9fbd..b29a27ae096 100644
--- a/Mage.Sets/src/mage/cards/c/CutRibbons.java
+++ b/Mage.Sets/src/mage/cards/c/CutRibbons.java
@@ -29,7 +29,7 @@ public final class CutRibbons extends SplitCard {
// Ribbons
// Each opponent loses X life.
getRightHalfCard().addAbility(new AftermathAbility().setRuleAtTheTop(true));
- getRightHalfCard().getSpellAbility().addEffect(new LoseLifeOpponentsEffect(new ManacostVariableValue()));
+ getRightHalfCard().getSpellAbility().addEffect(new LoseLifeOpponentsEffect(ManacostVariableValue.instance));
}
diff --git a/Mage.Sets/src/mage/cards/d/DamiaSageOfStone.java b/Mage.Sets/src/mage/cards/d/DamiaSageOfStone.java
index 2ca4be33812..4b750825856 100644
--- a/Mage.Sets/src/mage/cards/d/DamiaSageOfStone.java
+++ b/Mage.Sets/src/mage/cards/d/DamiaSageOfStone.java
@@ -59,7 +59,7 @@ public final class DamiaSageOfStone extends CardImpl {
class DamiaSageOfStoneTriggeredAbility extends BeginningOfUpkeepTriggeredAbility {
DamiaSageOfStoneTriggeredAbility() {
- super(new DrawCardSourceControllerEffect(new IntPlusDynamicValue(7, new MultipliedValue(new CardsInControllerHandCount(), -1))), TargetController.YOU, false);
+ super(new DrawCardSourceControllerEffect(new IntPlusDynamicValue(7, new MultipliedValue(CardsInControllerHandCount.instance, -1))), TargetController.YOU, false);
}
DamiaSageOfStoneTriggeredAbility(final DamiaSageOfStoneTriggeredAbility ability) {
diff --git a/Mage.Sets/src/mage/cards/d/DarkSalvation.java b/Mage.Sets/src/mage/cards/d/DarkSalvation.java
index 30100994acd..9c0b24555c4 100644
--- a/Mage.Sets/src/mage/cards/d/DarkSalvation.java
+++ b/Mage.Sets/src/mage/cards/d/DarkSalvation.java
@@ -34,7 +34,7 @@ public final class DarkSalvation extends CardImpl {
// Target player creates X 2/2 black Zombie creature tokens, then up to one target creature gets -1/-1 until end of turn for each Zombie that player controls.
this.getSpellAbility().addTarget(new TargetPlayer());
- Effect effect = new CreateTokenTargetEffect(new ZombieToken(), new ManacostVariableValue());
+ Effect effect = new CreateTokenTargetEffect(new ZombieToken(), ManacostVariableValue.instance);
effect.setText("Target player creates X 2/2 black Zombie creature tokens");
this.getSpellAbility().addEffect(effect);
DynamicValue value = new ZombiesControlledByTargetPlayerCount();
diff --git a/Mage.Sets/src/mage/cards/d/DawnglowInfusion.java b/Mage.Sets/src/mage/cards/d/DawnglowInfusion.java
index a6527a52fee..7faec30b05a 100644
--- a/Mage.Sets/src/mage/cards/d/DawnglowInfusion.java
+++ b/Mage.Sets/src/mage/cards/d/DawnglowInfusion.java
@@ -25,7 +25,7 @@ public final class DawnglowInfusion extends CardImpl {
// You gain X life if {G} was spent to cast Dawnglow Infusion and X life if {W} was spent to cast it.
- DynamicValue xValue = new ManacostVariableValue();
+ DynamicValue xValue = ManacostVariableValue.instance;
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new GainLifeEffect(xValue),
new ManaWasSpentCondition(ColoredManaSymbol.G), "You gain X life if {G} was spent to cast {this}"));
diff --git a/Mage.Sets/src/mage/cards/d/DeathCloud.java b/Mage.Sets/src/mage/cards/d/DeathCloud.java
index c239907ad62..1ce4f411208 100644
--- a/Mage.Sets/src/mage/cards/d/DeathCloud.java
+++ b/Mage.Sets/src/mage/cards/d/DeathCloud.java
@@ -25,7 +25,7 @@ public final class DeathCloud extends CardImpl {
// Each player loses X life, discards X cards, sacrifices X creatures, then sacrifices X lands.
- DynamicValue xValue = new ManacostVariableValue();
+ DynamicValue xValue = ManacostVariableValue.instance;
this.getSpellAbility().addEffect(new LoseLifeAllPlayersEffect(xValue));
Effect effect = new DiscardEachPlayerEffect(xValue, false);
effect.setText(", discards X cards");
diff --git a/Mage.Sets/src/mage/cards/d/DeathGrasp.java b/Mage.Sets/src/mage/cards/d/DeathGrasp.java
index e0e3426b6e5..114635e43cc 100644
--- a/Mage.Sets/src/mage/cards/d/DeathGrasp.java
+++ b/Mage.Sets/src/mage/cards/d/DeathGrasp.java
@@ -21,8 +21,8 @@ public final class DeathGrasp extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{W}{B}");
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
- this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
+ this.getSpellAbility().addEffect(new GainLifeEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
diff --git a/Mage.Sets/src/mage/cards/d/DeathMutation.java b/Mage.Sets/src/mage/cards/d/DeathMutation.java
index d24bec85c23..879b21f6d89 100644
--- a/Mage.Sets/src/mage/cards/d/DeathMutation.java
+++ b/Mage.Sets/src/mage/cards/d/DeathMutation.java
@@ -35,7 +35,7 @@ public final class DeathMutation extends CardImpl {
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetPermanent(filter));
// create X 1/1 green Saproling creature tokens, where X is that creature's converted mana cost.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new TargetConvertedManaCost()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetConvertedManaCost.instance));
}
public DeathMutation(final DeathMutation card) {
diff --git a/Mage.Sets/src/mage/cards/d/DeathWind.java b/Mage.Sets/src/mage/cards/d/DeathWind.java
index 69fbaadadfc..663ba2f6043 100644
--- a/Mage.Sets/src/mage/cards/d/DeathWind.java
+++ b/Mage.Sets/src/mage/cards/d/DeathWind.java
@@ -22,7 +22,7 @@ public final class DeathWind extends CardImpl {
// Target creature gets -X/-X until end of turn.
- DynamicValue x = new SignInversionDynamicValue(new ManacostVariableValue());
+ DynamicValue x = new SignInversionDynamicValue(ManacostVariableValue.instance);
this.getSpellAbility().addEffect(new BoostTargetEffect(x, x, Duration.EndOfTurn, true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java b/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java
index a9c707fd5a9..7ebbe2c241c 100644
--- a/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java
+++ b/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java
@@ -69,7 +69,7 @@ class DeathforgeShamanEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
- DynamicValue value = new MultikickerCount();
+ DynamicValue value = MultikickerCount.instance;
int damage = value.calculate(game, source, this) * 2;
return new DamageTargetEffect(damage).apply(game, source);
}
diff --git a/Mage.Sets/src/mage/cards/d/DeathsShadow.java b/Mage.Sets/src/mage/cards/d/DeathsShadow.java
index 2591c2d11fa..5fa0ee15d9d 100644
--- a/Mage.Sets/src/mage/cards/d/DeathsShadow.java
+++ b/Mage.Sets/src/mage/cards/d/DeathsShadow.java
@@ -28,7 +28,7 @@ public final class DeathsShadow extends CardImpl {
this.toughness = new MageInt(13);
// Death's Shadow gets -X/-X, where X is your life total.
- SignInversionDynamicValue x = new SignInversionDynamicValue(new ControllerLifeCount(), false);
+ SignInversionDynamicValue x = new SignInversionDynamicValue(ControllerLifeCount.instance, false);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(x, x, Duration.WhileOnBattlefield)));
}
diff --git a/Mage.Sets/src/mage/cards/d/DecreeOfJustice.java b/Mage.Sets/src/mage/cards/d/DecreeOfJustice.java
index 27aa099dcd8..2da79ce805e 100644
--- a/Mage.Sets/src/mage/cards/d/DecreeOfJustice.java
+++ b/Mage.Sets/src/mage/cards/d/DecreeOfJustice.java
@@ -32,7 +32,7 @@ public final class DecreeOfJustice extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{2}{W}{W}");
// Create X 4/4 white Angel creature tokens with flying.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new AngelToken(), new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new AngelToken(), ManacostVariableValue.instance));
// Cycling {2}{W}
this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{W}")));
diff --git a/Mage.Sets/src/mage/cards/d/Demonfire.java b/Mage.Sets/src/mage/cards/d/Demonfire.java
index 71711b70c12..b8dfbc7148c 100644
--- a/Mage.Sets/src/mage/cards/d/Demonfire.java
+++ b/Mage.Sets/src/mage/cards/d/Demonfire.java
@@ -31,7 +31,7 @@ public final class Demonfire extends CardImpl {
// Demonfire deals X damage to any target.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
- new DamageTargetEffect(new ManacostVariableValue()),
+ new DamageTargetEffect(ManacostVariableValue.instance),
new InvertCondition(HellbentCondition.instance),
"{this} deals X damage to any target"));
@@ -41,7 +41,7 @@ public final class Demonfire extends CardImpl {
// Hellbent - If you have no cards in hand, Demonfire can't be countered and the damage can't be prevented.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
- new DamageTargetEffect(new ManacostVariableValue(), false),
+ new DamageTargetEffect(ManacostVariableValue.instance, false),
HellbentCondition.instance,
"
Hellbent — If you have no cards in hand, this spell can't be countered and the damage can't be prevented."));
// can't be countered
diff --git a/Mage.Sets/src/mage/cards/d/DescendantOfSoramaro.java b/Mage.Sets/src/mage/cards/d/DescendantOfSoramaro.java
index aad9696a80d..ce8cde5bd0d 100644
--- a/Mage.Sets/src/mage/cards/d/DescendantOfSoramaro.java
+++ b/Mage.Sets/src/mage/cards/d/DescendantOfSoramaro.java
@@ -28,7 +28,7 @@ public final class DescendantOfSoramaro extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// {1}{U}: Look at the top X cards of your library, where X is the number of cards in your hand, then put them back in any order.
- Effect effect = new LookLibraryControllerEffect(new CardsInControllerHandCount());
+ Effect effect = new LookLibraryControllerEffect(CardsInControllerHandCount.instance);
effect.setText("Look at the top X cards of your library, where X is the number of cards in your hand, then put them back in any order");
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
effect, new ManaCostsImpl("{1}{U}")));
diff --git a/Mage.Sets/src/mage/cards/d/Detonate.java b/Mage.Sets/src/mage/cards/d/Detonate.java
index de1a4096edc..782f5af864c 100644
--- a/Mage.Sets/src/mage/cards/d/Detonate.java
+++ b/Mage.Sets/src/mage/cards/d/Detonate.java
@@ -29,7 +29,7 @@ public final class Detonate extends CardImpl {
// Destroy target artifact with converted mana cost X. It can't be regenerated. Detonate deals X damage to that artifact's controller.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetArtifactPermanent(new FilterArtifactPermanent("artifact with converted mana cost X")));
- Effect effect = new DamageTargetControllerEffect(new ManacostVariableValue());
+ Effect effect = new DamageTargetControllerEffect(ManacostVariableValue.instance);
effect.setText("{this} deals X damage to that artifact's controller");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().setTargetAdjuster(DetonateAdjuster.instance);
diff --git a/Mage.Sets/src/mage/cards/d/DevastatingDreams.java b/Mage.Sets/src/mage/cards/d/DevastatingDreams.java
index cebed2d85a4..ee0d2b5b276 100644
--- a/Mage.Sets/src/mage/cards/d/DevastatingDreams.java
+++ b/Mage.Sets/src/mage/cards/d/DevastatingDreams.java
@@ -32,10 +32,10 @@ public final class DevastatingDreams extends CardImpl {
this.getSpellAbility().addCost(new DevastatingDreamsAdditionalCost());
// Each player sacrifices X lands.
- this.getSpellAbility().addEffect(new SacrificeAllEffect(new GetXValue(), new FilterControlledLandPermanent("lands")));
+ this.getSpellAbility().addEffect(new SacrificeAllEffect(GetXValue.instance, new FilterControlledLandPermanent("lands")));
// Devastating Dreams deals X damage to each creature.
- this.getSpellAbility().addEffect(new DamageAllEffect(new GetXValue(), new FilterCreaturePermanent()));
+ this.getSpellAbility().addEffect(new DamageAllEffect(GetXValue.instance, new FilterCreaturePermanent()));
}
public DevastatingDreams(final DevastatingDreams card) {
diff --git a/Mage.Sets/src/mage/cards/d/DevastatingSummons.java b/Mage.Sets/src/mage/cards/d/DevastatingSummons.java
index e15ae2af9f5..c5521add77c 100644
--- a/Mage.Sets/src/mage/cards/d/DevastatingSummons.java
+++ b/Mage.Sets/src/mage/cards/d/DevastatingSummons.java
@@ -55,8 +55,8 @@ class DevastatingSummonsEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
DevastatingSummonsElementalToken token = new DevastatingSummonsElementalToken();
- token.getPower().modifyBaseValue(new GetXValue().calculate(game, source, this));
- token.getToughness().modifyBaseValue(new GetXValue().calculate(game, source, this));
+ token.getPower().modifyBaseValue(GetXValue.instance.calculate(game, source, this));
+ token.getToughness().modifyBaseValue(GetXValue.instance.calculate(game, source, this));
token.putOntoBattlefield(2, game, source.getSourceId(), source.getControllerId());
diff --git a/Mage.Sets/src/mage/cards/d/DevilsPlay.java b/Mage.Sets/src/mage/cards/d/DevilsPlay.java
index 111f906c868..fad1267f4cb 100644
--- a/Mage.Sets/src/mage/cards/d/DevilsPlay.java
+++ b/Mage.Sets/src/mage/cards/d/DevilsPlay.java
@@ -23,7 +23,7 @@ public final class DevilsPlay extends CardImpl {
// Devil's Play deals X damage to any target.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
// Flashback {X}{R}{R}{R}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{X}{R}{R}{R}"), TimingRule.SORCERY));
diff --git a/Mage.Sets/src/mage/cards/d/DiabolicRevelation.java b/Mage.Sets/src/mage/cards/d/DiabolicRevelation.java
index cd93dc22aa1..bdac351e7ba 100644
--- a/Mage.Sets/src/mage/cards/d/DiabolicRevelation.java
+++ b/Mage.Sets/src/mage/cards/d/DiabolicRevelation.java
@@ -58,7 +58,7 @@ class DiabolicRevelationEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
- int amount = new ManacostVariableValue().calculate(game, source, this);
+ int amount = ManacostVariableValue.instance.calculate(game, source, this);
TargetCardInLibrary target = new TargetCardInLibrary(0, amount, new FilterCard());
Player player = game.getPlayer(source.getControllerId());
diff --git a/Mage.Sets/src/mage/cards/d/DiamondValley.java b/Mage.Sets/src/mage/cards/d/DiamondValley.java
index a1a75bb9486..530bbee905c 100644
--- a/Mage.Sets/src/mage/cards/d/DiamondValley.java
+++ b/Mage.Sets/src/mage/cards/d/DiamondValley.java
@@ -25,7 +25,7 @@ public final class DiamondValley extends CardImpl {
public DiamondValley(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
- Effect effect = new GainLifeEffect(new SacrificeCostCreaturesToughness());
+ Effect effect = new GainLifeEffect(SacrificeCostCreaturesToughness.instance);
effect.setText("You gain life equal to the sacrificed creature's toughness");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
diff --git a/Mage.Sets/src/mage/cards/d/Disintegrate.java b/Mage.Sets/src/mage/cards/d/Disintegrate.java
index bcd68137633..8b0f12edb55 100644
--- a/Mage.Sets/src/mage/cards/d/Disintegrate.java
+++ b/Mage.Sets/src/mage/cards/d/Disintegrate.java
@@ -23,7 +23,7 @@ public final class Disintegrate extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}");
// Disintegrate deals X damage to any target. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "That creature"));
Effect effect = new ExileTargetIfDiesEffect();
effect.setText("If the creature would die this turn, exile it instead");
diff --git a/Mage.Sets/src/mage/cards/d/DivineOffering.java b/Mage.Sets/src/mage/cards/d/DivineOffering.java
index 8682ffefdd8..02ddd7a87e8 100644
--- a/Mage.Sets/src/mage/cards/d/DivineOffering.java
+++ b/Mage.Sets/src/mage/cards/d/DivineOffering.java
@@ -23,7 +23,7 @@ public final class DivineOffering extends CardImpl {
// Destroy target artifact. You gain life equal to its converted mana cost.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
- Effect effect = new GainLifeEffect(new TargetConvertedManaCost());
+ Effect effect = new GainLifeEffect(TargetConvertedManaCost.instance);
effect.setText("You gain life equal to its converted mana cost");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
diff --git a/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java b/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java
index 025eb357746..404fafb5f75 100644
--- a/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java
+++ b/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java
@@ -37,8 +37,8 @@ public final class DranaKalastriaBloodchief extends CardImpl {
this.toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance());
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new StaticValue(0), new SignInversionDynamicValue(new ManacostVariableValue()), Duration.EndOfTurn), new ManaCostsImpl("{X}{B}{B}"));
- ability.addEffect(new BoostSourceEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new StaticValue(0), new SignInversionDynamicValue(ManacostVariableValue.instance), Duration.EndOfTurn), new ManaCostsImpl("{X}{B}{B}"));
+ ability.addEffect(new BoostSourceEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/d/DreadSlag.java b/Mage.Sets/src/mage/cards/d/DreadSlag.java
index dd7548175b1..bebbcd720d7 100644
--- a/Mage.Sets/src/mage/cards/d/DreadSlag.java
+++ b/Mage.Sets/src/mage/cards/d/DreadSlag.java
@@ -32,7 +32,7 @@ public final class DreadSlag extends CardImpl {
// Trample
this.addAbility(TrampleAbility.getInstance());
// Dread Slag gets -4/-4 for each card in your hand.
- DynamicValue amount = new MultipliedValue(new CardsInControllerHandCount(), -4);
+ DynamicValue amount = new MultipliedValue(CardsInControllerHandCount.instance, -4);
Effect effect = new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield);
effect.setText("{this} gets -4/-4 for each card in your hand");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
diff --git a/Mage.Sets/src/mage/cards/d/DreadshipReef.java b/Mage.Sets/src/mage/cards/d/DreadshipReef.java
index 7073e04f11d..53a75729b99 100644
--- a/Mage.Sets/src/mage/cards/d/DreadshipReef.java
+++ b/Mage.Sets/src/mage/cards/d/DreadshipReef.java
@@ -36,7 +36,7 @@ public final class DreadshipReef extends CardImpl {
this.addAbility(ability);
// {1}, Remove X storage counters from Dreadship Reef: Add X mana in any combination of {U} and/or {B}.
ability = new SimpleManaAbility(Zone.BATTLEFIELD,
- new AddManaInAnyCombinationEffect(new RemovedCountersForCostValue(), ColoredManaSymbol.U, ColoredManaSymbol.B),
+ new AddManaInAnyCombinationEffect(RemovedCountersForCostValue.instance, ColoredManaSymbol.U, ColoredManaSymbol.B),
new GenericManaCost(1));
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance()));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/d/DreambornMuse.java b/Mage.Sets/src/mage/cards/d/DreambornMuse.java
index 66cc27162bd..169107a55c2 100644
--- a/Mage.Sets/src/mage/cards/d/DreambornMuse.java
+++ b/Mage.Sets/src/mage/cards/d/DreambornMuse.java
@@ -25,7 +25,7 @@ public final class DreambornMuse extends CardImpl {
this.toughness = new MageInt(2);
// At the beginning of each player's upkeep, that player puts the top X cards of their library into their graveyard, where X is the number of cards in their hand.
- PutLibraryIntoGraveTargetEffect effect = new PutLibraryIntoGraveTargetEffect(new CardsInTargetPlayerHandCount());
+ PutLibraryIntoGraveTargetEffect effect = new PutLibraryIntoGraveTargetEffect(CardsInTargetPlayerHandCount.instance);
effect.setText("that player puts the top X cards of their library into their graveyard, where X is the number of cards in their hand.");
this.addAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.ANY, false));
diff --git a/Mage.Sets/src/mage/cards/d/DregsOfSorrow.java b/Mage.Sets/src/mage/cards/d/DregsOfSorrow.java
index 082731e051d..06412ef6bf5 100644
--- a/Mage.Sets/src/mage/cards/d/DregsOfSorrow.java
+++ b/Mage.Sets/src/mage/cards/d/DregsOfSorrow.java
@@ -28,7 +28,7 @@ public final class DregsOfSorrow extends CardImpl {
// Destroy X target nonblack creatures. Draw X cards.
this.getSpellAbility().addEffect(new DestroyTargetEffect("Destroy X target nonblack creatures"));
- this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(ManacostVariableValue.instance));
this.getSpellAbility().setTargetAdjuster(DregsOfSorrowAdjuster.instance);
}
diff --git a/Mage.Sets/src/mage/cards/d/DrippingTongueZubera.java b/Mage.Sets/src/mage/cards/d/DrippingTongueZubera.java
index a5d6b4d3f33..ed36a32932b 100644
--- a/Mage.Sets/src/mage/cards/d/DrippingTongueZubera.java
+++ b/Mage.Sets/src/mage/cards/d/DrippingTongueZubera.java
@@ -27,7 +27,7 @@ public final class DrippingTongueZubera extends CardImpl {
this.power = new MageInt(1);
this.toughness = new MageInt(2);
- this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SpiritToken(), new ZuberasDiedDynamicValue()), false), new ZuberasDiedWatcher());
+ this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SpiritToken(), ZuberasDiedDynamicValue.instance), false), new ZuberasDiedWatcher());
}
public DrippingTongueZubera (final DrippingTongueZubera card) {
diff --git a/Mage.Sets/src/mage/cards/d/DwarvenHold.java b/Mage.Sets/src/mage/cards/d/DwarvenHold.java
index bfc1a8c95c1..5c8e97d9e2f 100644
--- a/Mage.Sets/src/mage/cards/d/DwarvenHold.java
+++ b/Mage.Sets/src/mage/cards/d/DwarvenHold.java
@@ -44,7 +44,7 @@ public final class DwarvenHold extends CardImpl {
// {tap}, Remove any number of storage counters from Dwarven Hold: Add {R} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.RedMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {R} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/e/Earthquake.java b/Mage.Sets/src/mage/cards/e/Earthquake.java
index d653f3182d3..da844b150df 100644
--- a/Mage.Sets/src/mage/cards/e/Earthquake.java
+++ b/Mage.Sets/src/mage/cards/e/Earthquake.java
@@ -29,7 +29,7 @@ public final class Earthquake extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}");
// Hurricane deals X damage to each creature with flying and each player.
- this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter));
+ this.getSpellAbility().addEffect(new DamageEverythingEffect(ManacostVariableValue.instance, filter));
}
public Earthquake(final Earthquake card) {
diff --git a/Mage.Sets/src/mage/cards/e/Electrodominance.java b/Mage.Sets/src/mage/cards/e/Electrodominance.java
index 2d87841a40c..4b9342fcaac 100644
--- a/Mage.Sets/src/mage/cards/e/Electrodominance.java
+++ b/Mage.Sets/src/mage/cards/e/Electrodominance.java
@@ -19,9 +19,9 @@ public final class Electrodominance extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{R}{R}");
// Electrodominance deals X damage to any target. You may cast a card with converted mana cost X or less from your hand without paying its mana cost.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
- this.getSpellAbility().addEffect(new CastWithoutPayingManaCostEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CastWithoutPayingManaCostEffect(ManacostVariableValue.instance));
}
private Electrodominance(final Electrodominance card) {
diff --git a/Mage.Sets/src/mage/cards/e/EliminateTheCompetition.java b/Mage.Sets/src/mage/cards/e/EliminateTheCompetition.java
index 03ad3ea31bb..34910dc22e6 100644
--- a/Mage.Sets/src/mage/cards/e/EliminateTheCompetition.java
+++ b/Mage.Sets/src/mage/cards/e/EliminateTheCompetition.java
@@ -50,7 +50,7 @@ enum EliminateTheCompetitionAdjuster implements TargetAdjuster {
@Override
public void adjustTargets(Ability ability, Game game) {
ability.getTargets().clear();
- int sac = new GetXValue().calculate(game, ability, null);
+ int sac = GetXValue.instance.calculate(game, ability, null);
ability.addTarget(new TargetCreaturePermanent(sac, sac));
}
}
diff --git a/Mage.Sets/src/mage/cards/e/EmberFistZubera.java b/Mage.Sets/src/mage/cards/e/EmberFistZubera.java
index 0a79c71c41e..acfe8a486ca 100644
--- a/Mage.Sets/src/mage/cards/e/EmberFistZubera.java
+++ b/Mage.Sets/src/mage/cards/e/EmberFistZubera.java
@@ -28,7 +28,7 @@ public final class EmberFistZubera extends CardImpl {
this.power = new MageInt(1);
this.toughness = new MageInt(2);
- Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(new ZuberasDiedDynamicValue()));
+ Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(ZuberasDiedDynamicValue.instance));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability, new ZuberasDiedWatcher());
}
diff --git a/Mage.Sets/src/mage/cards/e/EmptyThePits.java b/Mage.Sets/src/mage/cards/e/EmptyThePits.java
index f2bfbd27fb1..fb2337fd5e6 100644
--- a/Mage.Sets/src/mage/cards/e/EmptyThePits.java
+++ b/Mage.Sets/src/mage/cards/e/EmptyThePits.java
@@ -24,7 +24,7 @@ public final class EmptyThePits extends CardImpl {
this.addAbility(new DelveAbility());
// create X 2/2 black Zombie creature tokens tapped.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), new ManacostVariableValue(), true, false));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), ManacostVariableValue.instance, true, false));
}
public EmptyThePits(final EmptyThePits card) {
diff --git a/Mage.Sets/src/mage/cards/e/EmpyrialArmor.java b/Mage.Sets/src/mage/cards/e/EmpyrialArmor.java
index 9ae1b61d026..de4b1ffa237 100644
--- a/Mage.Sets/src/mage/cards/e/EmpyrialArmor.java
+++ b/Mage.Sets/src/mage/cards/e/EmpyrialArmor.java
@@ -38,7 +38,7 @@ public final class EmpyrialArmor extends CardImpl {
this.addAbility(ability);
// Enchanted creature gets +1/+1 for each card in your hand.
- DynamicValue xValue = new CardsInControllerHandCount();
+ DynamicValue xValue = CardsInControllerHandCount.instance;
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(xValue, xValue, Duration.WhileOnBattlefield)));
}
diff --git a/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java b/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java
index d43fe32b16d..4116555856a 100644
--- a/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java
+++ b/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java
@@ -25,7 +25,7 @@ public final class EmpyrialPlate extends CardImpl {
this.subtype.add(SubType.EQUIPMENT);
// Equipped creature gets +1/+1 for each card in your hand.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CardsInControllerHandCount(), new CardsInControllerHandCount())));
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(CardsInControllerHandCount.instance, CardsInControllerHandCount.instance)));
// Equip {2}
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2)));
diff --git a/Mage.Sets/src/mage/cards/e/EnclaveElite.java b/Mage.Sets/src/mage/cards/e/EnclaveElite.java
index 58f5df9c835..de61d1239d1 100644
--- a/Mage.Sets/src/mage/cards/e/EnclaveElite.java
+++ b/Mage.Sets/src/mage/cards/e/EnclaveElite.java
@@ -36,7 +36,7 @@ public final class EnclaveElite extends CardImpl {
// Enclave Elite enters the battlefield with a +1/+1 counter on it for each time it was kicked.
this.addAbility(new EntersBattlefieldAbility(
- new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new MultikickerCount(), true),
+ new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), MultikickerCount.instance, true),
"with a +1/+1 counter on it for each time it was kicked"));
}
diff --git a/Mage.Sets/src/mage/cards/e/EndlessSwarm.java b/Mage.Sets/src/mage/cards/e/EndlessSwarm.java
index f3eac93fad2..a33c4084634 100644
--- a/Mage.Sets/src/mage/cards/e/EndlessSwarm.java
+++ b/Mage.Sets/src/mage/cards/e/EndlessSwarm.java
@@ -22,7 +22,7 @@ public final class EndlessSwarm extends CardImpl {
// Create a 1/1 green Snake creature token for each card in your hand.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new SnakeToken(), new CardsInControllerHandCount()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new SnakeToken(), CardsInControllerHandCount.instance));
// Epic
this.getSpellAbility().addEffect(new EpicEffect());
diff --git a/Mage.Sets/src/mage/cards/e/EnergyBolt.java b/Mage.Sets/src/mage/cards/e/EnergyBolt.java
index ef5fe784bbc..216c983a537 100644
--- a/Mage.Sets/src/mage/cards/e/EnergyBolt.java
+++ b/Mage.Sets/src/mage/cards/e/EnergyBolt.java
@@ -22,10 +22,10 @@ public final class EnergyBolt extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{W}");
// Choose one - Energy Bolt deals X damage to target player; or target player gains X life.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
Mode mode = new Mode();
- mode.addEffect(new GainLifeTargetEffect(new ManacostVariableValue()));
+ mode.addEffect(new GainLifeTargetEffect(ManacostVariableValue.instance));
mode.addTarget(new TargetPlayer());
this.getSpellAbility().addMode(mode);
}
diff --git a/Mage.Sets/src/mage/cards/e/Enrage.java b/Mage.Sets/src/mage/cards/e/Enrage.java
index 83c2876c0ca..9d83d33659c 100644
--- a/Mage.Sets/src/mage/cards/e/Enrage.java
+++ b/Mage.Sets/src/mage/cards/e/Enrage.java
@@ -22,7 +22,7 @@ public final class Enrage extends CardImpl {
// Target creature gets +X/+0 until end of turn.
- this.getSpellAbility().addEffect(new BoostTargetEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new BoostTargetEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/e/EnshrinedMemories.java b/Mage.Sets/src/mage/cards/e/EnshrinedMemories.java
index 224dcc1d44b..9dbaf7728b2 100644
--- a/Mage.Sets/src/mage/cards/e/EnshrinedMemories.java
+++ b/Mage.Sets/src/mage/cards/e/EnshrinedMemories.java
@@ -20,7 +20,7 @@ public final class EnshrinedMemories extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}");
// Reveal the top X cards of your library. Put all creature cards revealed this way into your hand and the rest on the bottom of your library in any order.
- this.getSpellAbility().addEffect(new RevealLibraryPutIntoHandEffect(new ManacostVariableValue(), new FilterCreatureCard(), Zone.LIBRARY, true));
+ this.getSpellAbility().addEffect(new RevealLibraryPutIntoHandEffect(ManacostVariableValue.instance, new FilterCreatureCard(), Zone.LIBRARY, true));
}
public EnshrinedMemories(final EnshrinedMemories card) {
diff --git a/Mage.Sets/src/mage/cards/e/EntreatTheAngels.java b/Mage.Sets/src/mage/cards/e/EntreatTheAngels.java
index e398ee5b5b1..234618f3517 100644
--- a/Mage.Sets/src/mage/cards/e/EntreatTheAngels.java
+++ b/Mage.Sets/src/mage/cards/e/EntreatTheAngels.java
@@ -22,7 +22,7 @@ public final class EntreatTheAngels extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{W}{W}{W}");
// Create X 4/4 white Angel creature tokens with flying.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new AngelToken(), new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new AngelToken(), ManacostVariableValue.instance));
// Miracle {X}{W}{W}
this.addAbility(new MiracleAbility(this, new ManaCostsImpl("{X}{W}{W}")));
diff --git a/Mage.Sets/src/mage/cards/e/EntropicSpecter.java b/Mage.Sets/src/mage/cards/e/EntropicSpecter.java
index 1102b8e1ba3..0a85100ecaa 100644
--- a/Mage.Sets/src/mage/cards/e/EntropicSpecter.java
+++ b/Mage.Sets/src/mage/cards/e/EntropicSpecter.java
@@ -42,7 +42,7 @@ public final class EntropicSpecter extends CardImpl {
// Entropic Specter's power and toughness are each equal to the number of cards in the chosen player's hand.
this.addAbility(new SimpleStaticAbility(Zone.ALL,
// back to the graveyard or if the choosen player left the gane it's again a 0/0
- new SetPowerToughnessSourceEffect(new CardsInTargetPlayerHandCount(), Duration.WhileOnBattlefield, SubLayer.CharacteristicDefining_7a)));
+ new SetPowerToughnessSourceEffect(CardsInTargetPlayerHandCount.instance, Duration.WhileOnBattlefield, SubLayer.CharacteristicDefining_7a)));
// Whenever Entropic Specter deals damage to a player, that player discards a card.
this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1, false), false, true));
diff --git a/Mage.Sets/src/mage/cards/e/EverflowingChalice.java b/Mage.Sets/src/mage/cards/e/EverflowingChalice.java
index 98755ba1972..256f062d985 100644
--- a/Mage.Sets/src/mage/cards/e/EverflowingChalice.java
+++ b/Mage.Sets/src/mage/cards/e/EverflowingChalice.java
@@ -33,7 +33,7 @@ public final class EverflowingChalice extends CardImpl {
// Everflowing Chalice enters the battlefield with a charge counter on it for each time it was kicked.
this.addAbility(new EntersBattlefieldAbility(
- new AddCountersSourceEffect(CounterType.CHARGE.createInstance(0), new MultikickerCount(), true),
+ new AddCountersSourceEffect(CounterType.CHARGE.createInstance(0), MultikickerCount.instance, true),
"with a charge counter on it for each time it was kicked"));
// {T}: Add {C} for each charge counter on Everflowing Chalice.
diff --git a/Mage.Sets/src/mage/cards/e/Excise.java b/Mage.Sets/src/mage/cards/e/Excise.java
index a390e62e309..a232c410858 100644
--- a/Mage.Sets/src/mage/cards/e/Excise.java
+++ b/Mage.Sets/src/mage/cards/e/Excise.java
@@ -28,7 +28,7 @@ public final class Excise extends CardImpl {
// Excise target nonwhite attacking creature unless its controller pays {X}.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
- this.getSpellAbility().addEffect(new DoUnlessTargetPlayerOrTargetsControllerPaysEffect(new ExileTargetEffect(), new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DoUnlessTargetPlayerOrTargetsControllerPaysEffect(new ExileTargetEffect(), ManacostVariableValue.instance));
}
public Excise(final Excise card) {
diff --git a/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java b/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java
index 71a44fc473f..1b45b0e00f7 100644
--- a/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java
+++ b/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java
@@ -21,7 +21,7 @@ public final class FallOfTheTitans extends CardImpl {
// Fall of the Titans deals X damage to each of up to two target creatures and/or players.
this.getSpellAbility().addTarget(new TargetAnyTarget(0, 2));
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
// Surge {X}{R}
addAbility(new SurgeAbility(this, "{X}{R}"));
diff --git a/Mage.Sets/src/mage/cards/f/FanningTheFlames.java b/Mage.Sets/src/mage/cards/f/FanningTheFlames.java
index 4fe03dc2dac..e7d224f7e5f 100644
--- a/Mage.Sets/src/mage/cards/f/FanningTheFlames.java
+++ b/Mage.Sets/src/mage/cards/f/FanningTheFlames.java
@@ -23,7 +23,7 @@ public final class FanningTheFlames extends CardImpl {
this.addAbility(new BuybackAbility("{3}"));
// Fanning the Flames deals X damage to any target.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
diff --git a/Mage.Sets/src/mage/cards/f/Fascination.java b/Mage.Sets/src/mage/cards/f/Fascination.java
index d53a9219841..e3aa3f389d9 100644
--- a/Mage.Sets/src/mage/cards/f/Fascination.java
+++ b/Mage.Sets/src/mage/cards/f/Fascination.java
@@ -22,11 +22,11 @@ public final class Fascination extends CardImpl {
// Choose one -
// * Each player draws X cards.
- this.getSpellAbility().addEffect(new DrawCardAllEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DrawCardAllEffect(ManacostVariableValue.instance));
// * Each player puts the top X cards of their library into their graveyard.
Mode mode = new Mode();
- mode.addEffect(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(new ManacostVariableValue(), TargetController.ANY));
+ mode.addEffect(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(ManacostVariableValue.instance, TargetController.ANY));
this.getSpellAbility().addMode(mode);
}
diff --git a/Mage.Sets/src/mage/cards/f/FatalFrenzy.java b/Mage.Sets/src/mage/cards/f/FatalFrenzy.java
index a3e9ebd5d32..6b074158208 100644
--- a/Mage.Sets/src/mage/cards/f/FatalFrenzy.java
+++ b/Mage.Sets/src/mage/cards/f/FatalFrenzy.java
@@ -35,7 +35,7 @@ public final class FatalFrenzy extends CardImpl {
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)
.setText("Until end of turn, target creature you control gains trample")
);
- this.getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true)
+ this.getSpellAbility().addEffect(new BoostTargetEffect(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true)
.setText("and gets +X/+0, where X is its power.")
);
this.getSpellAbility().addEffect(new FatalFrenzyEffect());
diff --git a/Mage.Sets/src/mage/cards/f/FatefulShowdown.java b/Mage.Sets/src/mage/cards/f/FatefulShowdown.java
index 02b4db6762f..11f60f05011 100644
--- a/Mage.Sets/src/mage/cards/f/FatefulShowdown.java
+++ b/Mage.Sets/src/mage/cards/f/FatefulShowdown.java
@@ -21,7 +21,7 @@ public final class FatefulShowdown extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}{R}");
// Fateful Showdown deals damage to any target equal to the number of cards in your hand. Discard all the cards in your hand, then draw that many cards.
- Effect effect = new DamageTargetEffect(new CardsInControllerHandCount());
+ Effect effect = new DamageTargetEffect(CardsInControllerHandCount.instance);
effect.setText("{this} deals damage to any target equal to the number of cards in your hand");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetAnyTarget());
diff --git a/Mage.Sets/src/mage/cards/f/FestivalOfTheGuildpact.java b/Mage.Sets/src/mage/cards/f/FestivalOfTheGuildpact.java
index 414368c1abb..be5027f5187 100644
--- a/Mage.Sets/src/mage/cards/f/FestivalOfTheGuildpact.java
+++ b/Mage.Sets/src/mage/cards/f/FestivalOfTheGuildpact.java
@@ -20,7 +20,7 @@ public final class FestivalOfTheGuildpact extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}");
// Prevent the next X damage that would be dealt to you this turn.
- this.getSpellAbility().addEffect(new PreventDamageToControllerEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new PreventDamageToControllerEffect(Duration.EndOfTurn, false, true, ManacostVariableValue.instance));
// Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
diff --git a/Mage.Sets/src/mage/cards/f/FinalStrike.java b/Mage.Sets/src/mage/cards/f/FinalStrike.java
index 4cd4c7f1670..6881b640206 100644
--- a/Mage.Sets/src/mage/cards/f/FinalStrike.java
+++ b/Mage.Sets/src/mage/cards/f/FinalStrike.java
@@ -26,7 +26,7 @@ public final class FinalStrike extends CardImpl {
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
// Final Strike deals damage to target opponent equal to the sacrificed creature's power.
- Effect effect = new DamageTargetEffect(new SacrificeCostCreaturesPower());
+ Effect effect = new DamageTargetEffect(SacrificeCostCreaturesPower.instance);
effect.setText("{this} deals damage to target opponent or planeswalker equal to the sacrificed creature's power");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker());
diff --git a/Mage.Sets/src/mage/cards/f/FireCovenant.java b/Mage.Sets/src/mage/cards/f/FireCovenant.java
index ae9870a467a..80f8f729097 100644
--- a/Mage.Sets/src/mage/cards/f/FireCovenant.java
+++ b/Mage.Sets/src/mage/cards/f/FireCovenant.java
@@ -25,7 +25,7 @@ public final class FireCovenant extends CardImpl {
this.getSpellAbility().addCost(new PayVariableLifeCost(true));
// Fire Covenant deals X damage divided as you choose among any number of target creatures.
- DynamicValue xValue = new GetXValue();
+ DynamicValue xValue = GetXValue.instance;
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(xValue));
}
diff --git a/Mage.Sets/src/mage/cards/f/Firestorm.java b/Mage.Sets/src/mage/cards/f/Firestorm.java
index ba503d37905..b489ee21b62 100644
--- a/Mage.Sets/src/mage/cards/f/Firestorm.java
+++ b/Mage.Sets/src/mage/cards/f/Firestorm.java
@@ -48,7 +48,7 @@ enum FirestormAdjuster implements TargetAdjuster {
@Override
public void adjustTargets(Ability ability, Game game) {
- int xValue = new GetXValue().calculate(game, ability, null);
+ int xValue = GetXValue.instance.calculate(game, ability, null);
if (xValue > 0) {
Target target = new TargetAnyTarget(xValue);
ability.addTarget(target);
@@ -70,7 +70,7 @@ class FirestormEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player you = game.getPlayer(source.getControllerId());
- int amount = (new GetXValue()).calculate(game, source, this);
+ int amount = (GetXValue.instance).calculate(game, source, this);
if (you != null) {
if (!source.getTargets().isEmpty()) {
for (UUID targetId : this.getTargetPointer().getTargets(game, source)) {
diff --git a/Mage.Sets/src/mage/cards/f/Fling.java b/Mage.Sets/src/mage/cards/f/Fling.java
index 422ec3263ee..67de60eca99 100644
--- a/Mage.Sets/src/mage/cards/f/Fling.java
+++ b/Mage.Sets/src/mage/cards/f/Fling.java
@@ -22,7 +22,7 @@ public final class Fling extends CardImpl {
public Fling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
- Effect effect = new DamageTargetEffect(new SacrificeCostCreaturesPower());
+ Effect effect = new DamageTargetEffect(SacrificeCostCreaturesPower.instance);
effect.setText("{this} deals damage equal to the sacrificed creature's power to any target");
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
this.getSpellAbility().addTarget(new TargetAnyTarget());
diff --git a/Mage.Sets/src/mage/cards/f/FloatingDreamZubera.java b/Mage.Sets/src/mage/cards/f/FloatingDreamZubera.java
index a5aa32a32a1..f2e77e0b509 100644
--- a/Mage.Sets/src/mage/cards/f/FloatingDreamZubera.java
+++ b/Mage.Sets/src/mage/cards/f/FloatingDreamZubera.java
@@ -25,7 +25,7 @@ public final class FloatingDreamZubera extends CardImpl {
this.power = new MageInt(1);
this.toughness = new MageInt(2);
- this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(new ZuberasDiedDynamicValue())), new ZuberasDiedWatcher());
+ this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(ZuberasDiedDynamicValue.instance)), new ZuberasDiedWatcher());
}
public FloatingDreamZubera(final FloatingDreamZubera card) {
diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneSlide.java b/Mage.Sets/src/mage/cards/f/FlowstoneSlide.java
index 479d9f124be..fe68ae63e8b 100644
--- a/Mage.Sets/src/mage/cards/f/FlowstoneSlide.java
+++ b/Mage.Sets/src/mage/cards/f/FlowstoneSlide.java
@@ -20,8 +20,8 @@ public final class FlowstoneSlide extends CardImpl {
public FlowstoneSlide(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{2}{R}{R}");
- DynamicValue xPos = new ManacostVariableValue();
- DynamicValue xNeg = new SignInversionDynamicValue(new ManacostVariableValue());
+ DynamicValue xPos = ManacostVariableValue.instance;
+ DynamicValue xNeg = new SignInversionDynamicValue(ManacostVariableValue.instance);
// All creatures get +X/-X until end of turn.
this.getSpellAbility().addEffect(new BoostAllEffect(xPos, xNeg, Duration.EndOfTurn));
diff --git a/Mage.Sets/src/mage/cards/f/ForceLightning.java b/Mage.Sets/src/mage/cards/f/ForceLightning.java
index 64b07aa29d1..46793dcd5d9 100644
--- a/Mage.Sets/src/mage/cards/f/ForceLightning.java
+++ b/Mage.Sets/src/mage/cards/f/ForceLightning.java
@@ -24,7 +24,7 @@ public final class ForceLightning extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{R}");
// Force Lightning deals X damage to any target.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
// Scry X.
diff --git a/Mage.Sets/src/mage/cards/f/FountainOfCho.java b/Mage.Sets/src/mage/cards/f/FountainOfCho.java
index 566c64e58f9..1686099ab5e 100644
--- a/Mage.Sets/src/mage/cards/f/FountainOfCho.java
+++ b/Mage.Sets/src/mage/cards/f/FountainOfCho.java
@@ -34,7 +34,7 @@ public final class FountainOfCho extends CardImpl {
// {T}, Remove any number of storage counters from Fountain of Cho: Add {W} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.WhiteMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {W} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/f/FreyaliseSupplicant.java b/Mage.Sets/src/mage/cards/f/FreyaliseSupplicant.java
index 3343f039e4c..92a0ce7e204 100644
--- a/Mage.Sets/src/mage/cards/f/FreyaliseSupplicant.java
+++ b/Mage.Sets/src/mage/cards/f/FreyaliseSupplicant.java
@@ -43,7 +43,7 @@ public final class FreyaliseSupplicant extends CardImpl {
this.toughness = new MageInt(1);
// {tap}, Sacrifice a red or white creature: Freyalise Supplicant deals damage to any target equal to half the sacrificed creature's power, rounded down.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new HalfValue(new SacrificeCostCreaturesPower(), false)), new TapSourceCost());
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new HalfValue(SacrificeCostCreaturesPower.instance, false)), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter)));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/f/FungalReaches.java b/Mage.Sets/src/mage/cards/f/FungalReaches.java
index 92598fdd615..69f0a3cbe66 100644
--- a/Mage.Sets/src/mage/cards/f/FungalReaches.java
+++ b/Mage.Sets/src/mage/cards/f/FungalReaches.java
@@ -38,7 +38,7 @@ public final class FungalReaches extends CardImpl {
// {1}, Remove X storage counters from Fungal Reaches: Add X mana in any combination of {R} and/or {G}.
ability = new SimpleManaAbility(Zone.BATTLEFIELD,
- new AddManaInAnyCombinationEffect(new RemovedCountersForCostValue(), ColoredManaSymbol.R, ColoredManaSymbol.G),
+ new AddManaInAnyCombinationEffect(RemovedCountersForCostValue.instance, ColoredManaSymbol.R, ColoredManaSymbol.G),
new GenericManaCost(1));
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance()));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/f/FungalSprouting.java b/Mage.Sets/src/mage/cards/f/FungalSprouting.java
index d363b9a9ed4..66923625376 100644
--- a/Mage.Sets/src/mage/cards/f/FungalSprouting.java
+++ b/Mage.Sets/src/mage/cards/f/FungalSprouting.java
@@ -19,7 +19,7 @@ public final class FungalSprouting extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
// create X 1/1 green Saproling creature tokens, where X is the greatest power among creatures you control.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new GreatestPowerAmongControlledCreaturesValue()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), GreatestPowerAmongControlledCreaturesValue.instance));
}
public FungalSprouting(final FungalSprouting card) {
diff --git a/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java b/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java
index 629686108cc..f5137eb43b0 100644
--- a/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java
+++ b/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java
@@ -41,7 +41,7 @@ public final class GeralfsMasterpiece extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Geralf's Masterpiece gets -1/-1 for each card in your hand.
- DynamicValue count = new SignInversionDynamicValue(new CardsInControllerHandCount());
+ DynamicValue count = new SignInversionDynamicValue(CardsInControllerHandCount.instance);
Effect effect = new BoostSourceEffect(count, count, Duration.WhileOnBattlefield);
effect.setText("{this} gets -1/-1 for each card in your hand");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
diff --git a/Mage.Sets/src/mage/cards/g/GerrardsWisdom.java b/Mage.Sets/src/mage/cards/g/GerrardsWisdom.java
index 23e378f90a5..27694f04d26 100644
--- a/Mage.Sets/src/mage/cards/g/GerrardsWisdom.java
+++ b/Mage.Sets/src/mage/cards/g/GerrardsWisdom.java
@@ -20,7 +20,7 @@ public final class GerrardsWisdom extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}{W}");
// You gain 2 life for each card in your hand.
- this.getSpellAbility().addEffect(new GainLifeEffect(new MultipliedValue(new CardsInControllerHandCount(), 2),
+ this.getSpellAbility().addEffect(new GainLifeEffect(new MultipliedValue(CardsInControllerHandCount.instance, 2),
"You gain 2 life for each card in your hand"));
}
diff --git a/Mage.Sets/src/mage/cards/g/GhituFire.java b/Mage.Sets/src/mage/cards/g/GhituFire.java
index 4da3bde52b3..02c5fb90c3d 100644
--- a/Mage.Sets/src/mage/cards/g/GhituFire.java
+++ b/Mage.Sets/src/mage/cards/g/GhituFire.java
@@ -23,7 +23,7 @@ public final class GhituFire extends CardImpl {
public GhituFire(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}");
- Effect effect = new DamageTargetEffect(new ManacostVariableValue());
+ Effect effect = new DamageTargetEffect(ManacostVariableValue.instance);
// You may cast Ghitu Fire as though it had flash if you pay {2} more to cast it.
Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}"));
ability.addEffect(effect);
diff --git a/Mage.Sets/src/mage/cards/g/GhoulcallerGisa.java b/Mage.Sets/src/mage/cards/g/GhoulcallerGisa.java
index 273ee197600..89b9458fc49 100644
--- a/Mage.Sets/src/mage/cards/g/GhoulcallerGisa.java
+++ b/Mage.Sets/src/mage/cards/g/GhoulcallerGisa.java
@@ -40,7 +40,7 @@ public final class GhoulcallerGisa extends CardImpl {
this.toughness = new MageInt(4);
// {B}, {tap}, Sacrifice another creature: create X 2/2 black Zombie creature tokens, where X is the sacrificed creature's power.
- DynamicValue xValue = new SacrificeCostCreaturesPower();
+ DynamicValue xValue = SacrificeCostCreaturesPower.instance;
Token zombie = new ZombieToken();
zombie.setTokenType(2);
Effect effect = new CreateTokenEffect(zombie, xValue);
diff --git a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java
index 2b0eab220b3..df6f0f4eaee 100644
--- a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java
+++ b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java
@@ -57,7 +57,7 @@ class GigantoplasmApplyToPermanent extends ApplyToPermanent {
@Override
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
- DynamicValue variableMana = new ManacostVariableValue();
+ DynamicValue variableMana = ManacostVariableValue.instance;
Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b);
effect.setText("This creature has base power and toughness X/X");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
@@ -67,7 +67,7 @@ class GigantoplasmApplyToPermanent extends ApplyToPermanent {
@Override
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
- DynamicValue variableMana = new ManacostVariableValue();
+ DynamicValue variableMana = ManacostVariableValue.instance;
Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b);
effect.setText("This creature has base power and toughness X/X");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
diff --git a/Mage.Sets/src/mage/cards/g/GnarlidPack.java b/Mage.Sets/src/mage/cards/g/GnarlidPack.java
index 24ce6b741ac..63e7c60edb7 100644
--- a/Mage.Sets/src/mage/cards/g/GnarlidPack.java
+++ b/Mage.Sets/src/mage/cards/g/GnarlidPack.java
@@ -31,7 +31,7 @@ public final class GnarlidPack extends CardImpl {
// Gnarlid Pack enters the battlefield with a +1/+1 counter on it for each time it was kicked.
this.addAbility(new EntersBattlefieldAbility(
- new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new MultikickerCount(), true),
+ new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), MultikickerCount.instance, true),
"with a +1/+1 counter on it for each time it was kicked"));
}
diff --git a/Mage.Sets/src/mage/cards/g/GoblinDynamo.java b/Mage.Sets/src/mage/cards/g/GoblinDynamo.java
index 557ca2341d0..207bfd0dfb8 100644
--- a/Mage.Sets/src/mage/cards/g/GoblinDynamo.java
+++ b/Mage.Sets/src/mage/cards/g/GoblinDynamo.java
@@ -35,7 +35,7 @@ public final class GoblinDynamo extends CardImpl {
this.addAbility(ability);
//{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to any target.
- ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{R}"));
+ ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new DamageTargetEffect(ManacostVariableValue.instance), new ManaCostsImpl("{X}{R}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/g/GoblinGoliath.java b/Mage.Sets/src/mage/cards/g/GoblinGoliath.java
index b8ac5dc92cf..a6a7c02f607 100644
--- a/Mage.Sets/src/mage/cards/g/GoblinGoliath.java
+++ b/Mage.Sets/src/mage/cards/g/GoblinGoliath.java
@@ -34,7 +34,7 @@ public final class GoblinGoliath extends CardImpl {
this.toughness = new MageInt(4);
// When Goblin Goliath enters the battlefield, create a number of 1/1 red Goblin creature tokens equal to the number of opponents you have.
- Effect effect = new CreateTokenEffect(new GoblinToken(), new OpponentsCount());
+ Effect effect = new CreateTokenEffect(new GoblinToken(), OpponentsCount.instance);
effect.setText("create a number of 1/1 red Goblin creature tokens equal to the number of opponents you have");
this.addAbility(new EntersBattlefieldTriggeredAbility(effect));
diff --git a/Mage.Sets/src/mage/cards/g/GoblinOffensive.java b/Mage.Sets/src/mage/cards/g/GoblinOffensive.java
index 58cb3f35e5e..326309a34a2 100644
--- a/Mage.Sets/src/mage/cards/g/GoblinOffensive.java
+++ b/Mage.Sets/src/mage/cards/g/GoblinOffensive.java
@@ -19,7 +19,7 @@ public final class GoblinOffensive extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{1}{R}{R}");
// create X 1/1 red Goblin creature tokens.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken(), new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken(), ManacostVariableValue.instance));
}
public GoblinOffensive(final GoblinOffensive card) {
diff --git a/Mage.Sets/src/mage/cards/g/GreatDefender.java b/Mage.Sets/src/mage/cards/g/GreatDefender.java
index 44d18590fe4..369c3eafd6f 100644
--- a/Mage.Sets/src/mage/cards/g/GreatDefender.java
+++ b/Mage.Sets/src/mage/cards/g/GreatDefender.java
@@ -22,7 +22,7 @@ public final class GreatDefender extends CardImpl {
// Target creature gets +0/+X until end of turn, where X is its converted mana cost.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
- this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), new TargetConvertedManaCost(), Duration.EndOfTurn, true)
+ this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), TargetConvertedManaCost.instance, Duration.EndOfTurn, true)
.setText("Target creature gets +0/+X until end of turn, where X is its converted mana cost.")
);
}
diff --git a/Mage.Sets/src/mage/cards/g/GreaterGood.java b/Mage.Sets/src/mage/cards/g/GreaterGood.java
index 7aa69e4d2bf..7fc94447bc5 100644
--- a/Mage.Sets/src/mage/cards/g/GreaterGood.java
+++ b/Mage.Sets/src/mage/cards/g/GreaterGood.java
@@ -26,7 +26,7 @@ public final class GreaterGood extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}");
// Sacrifice a creature: Draw cards equal to the sacrificed creature's power, then discard three cards.
- Effect effect = new DrawCardSourceControllerEffect(new SacrificeCostCreaturesPower());
+ Effect effect = new DrawCardSourceControllerEffect(SacrificeCostCreaturesPower.instance);
effect.setText("Draw cards equal to the sacrificed creature's power");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect,
new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
diff --git a/Mage.Sets/src/mage/cards/g/GreelMindRaker.java b/Mage.Sets/src/mage/cards/g/GreelMindRaker.java
index f3543a1950d..bc79a60e01e 100644
--- a/Mage.Sets/src/mage/cards/g/GreelMindRaker.java
+++ b/Mage.Sets/src/mage/cards/g/GreelMindRaker.java
@@ -36,7 +36,7 @@ public final class GreelMindRaker extends CardImpl {
this.toughness = new MageInt(3);
// {X}{B}, {tap}, Discard two cards: Target player discards X cards at random.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(new ManacostVariableValue(), true), new ManaCostsImpl("{X}{B}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(ManacostVariableValue.instance, true), new ManaCostsImpl("{X}{B}"));
ability.addCost(new TapSourceCost());
ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard())));
ability.addTarget(new TargetPlayer());
diff --git a/Mage.Sets/src/mage/cards/g/GreenManaBattery.java b/Mage.Sets/src/mage/cards/g/GreenManaBattery.java
index d0bf8cdfc0b..9669605db22 100644
--- a/Mage.Sets/src/mage/cards/g/GreenManaBattery.java
+++ b/Mage.Sets/src/mage/cards/g/GreenManaBattery.java
@@ -36,7 +36,7 @@ public final class GreenManaBattery extends CardImpl {
// {tap}, Remove any number of charge counters from Green Mana Battery: Add {G}, then add an additional {G} for each charge counter removed this way.
ability = new DynamicManaAbility(
Mana.GreenMana(1),
- new IntPlusDynamicValue(1, new RemovedCountersForCostValue()),
+ new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance),
new TapSourceCost(),
"Add {G}, then add {G} for each charge counter removed this way",
true, new CountersSourceCount(CounterType.CHARGE));
diff --git a/Mage.Sets/src/mage/cards/g/GrimStrider.java b/Mage.Sets/src/mage/cards/g/GrimStrider.java
index 52027151678..816259aad66 100644
--- a/Mage.Sets/src/mage/cards/g/GrimStrider.java
+++ b/Mage.Sets/src/mage/cards/g/GrimStrider.java
@@ -29,7 +29,7 @@ public final class GrimStrider extends CardImpl {
this.toughness = new MageInt(6);
// Grim Strider gets -1/-1 for each card in your hand.
- DynamicValue count = new SignInversionDynamicValue(new CardsInControllerHandCount());
+ DynamicValue count = new SignInversionDynamicValue(CardsInControllerHandCount.instance);
Effect effect = new BoostSourceEffect(count, count, Duration.WhileOnBattlefield);
effect.setText("{this} gets -1/-1 for each card in your hand");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
diff --git a/Mage.Sets/src/mage/cards/g/GyrusWakerOfCorpses.java b/Mage.Sets/src/mage/cards/g/GyrusWakerOfCorpses.java
index b7224b44243..298ef39c257 100644
--- a/Mage.Sets/src/mage/cards/g/GyrusWakerOfCorpses.java
+++ b/Mage.Sets/src/mage/cards/g/GyrusWakerOfCorpses.java
@@ -57,7 +57,7 @@ public final class GyrusWakerOfCorpses extends CardImpl {
this.toughness = new MageInt(0);
// Gyrus, Walker of Corpses enters the battlefield with a number of +1/+1 counters on it equal to the amount of mana spent to cast it.
- Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new ManaSpentToCastCount(), true);
+ Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), ManaSpentToCastCount.instance, true);
effect.setText("with a number of +1/+1 counters on it equal to the amount of mana spent to cast it");
this.addAbility(new EntersBattlefieldAbility(effect));
diff --git a/Mage.Sets/src/mage/cards/h/HailOfArrows.java b/Mage.Sets/src/mage/cards/h/HailOfArrows.java
index 6fadd26e165..90020cd2c28 100644
--- a/Mage.Sets/src/mage/cards/h/HailOfArrows.java
+++ b/Mage.Sets/src/mage/cards/h/HailOfArrows.java
@@ -20,8 +20,8 @@ public final class HailOfArrows extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{W}");
// Hail of Arrows deals X damage divided as you choose among any number of target attacking creatures.
- this.getSpellAbility().addEffect(new DamageMultiEffect(new ManacostVariableValue()));
- this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(new ManacostVariableValue(), new FilterAttackingCreature()));
+ this.getSpellAbility().addEffect(new DamageMultiEffect(ManacostVariableValue.instance));
+ this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(ManacostVariableValue.instance, new FilterAttackingCreature()));
}
public HailOfArrows(final HailOfArrows card) {
diff --git a/Mage.Sets/src/mage/cards/h/HarvestPyre.java b/Mage.Sets/src/mage/cards/h/HarvestPyre.java
index 859ec2c1325..1c4f36caecd 100644
--- a/Mage.Sets/src/mage/cards/h/HarvestPyre.java
+++ b/Mage.Sets/src/mage/cards/h/HarvestPyre.java
@@ -26,7 +26,7 @@ public final class HarvestPyre extends CardImpl {
// Harvest Pyre deals X damage to target creature.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
- this.getSpellAbility().addEffect(new DamageTargetEffect(new GetXValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(GetXValue.instance));
}
public HarvestPyre(final HarvestPyre card) {
diff --git a/Mage.Sets/src/mage/cards/h/Hatred.java b/Mage.Sets/src/mage/cards/h/Hatred.java
index fd01727fbda..1d096e1cb6a 100644
--- a/Mage.Sets/src/mage/cards/h/Hatred.java
+++ b/Mage.Sets/src/mage/cards/h/Hatred.java
@@ -26,7 +26,7 @@ public final class Hatred extends CardImpl {
this.getSpellAbility().addCost(new PayVariableLifeCost(true));
// Target creature gets +X/+0 until end of turn.
- DynamicValue xValue = new GetXValue();
+ DynamicValue xValue = GetXValue.instance;
this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, new StaticValue(0), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/h/HauntingMisery.java b/Mage.Sets/src/mage/cards/h/HauntingMisery.java
index aa4f0f4de2d..a6a2d25197f 100644
--- a/Mage.Sets/src/mage/cards/h/HauntingMisery.java
+++ b/Mage.Sets/src/mage/cards/h/HauntingMisery.java
@@ -24,7 +24,7 @@ public final class HauntingMisery extends CardImpl {
this.getSpellAbility().addCost(new ExileXFromYourGraveCost(new FilterCreatureCard()));
// Haunting Misery deals X damage to target player.
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
- this.getSpellAbility().addEffect(new DamageTargetEffect(new GetXValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(GetXValue.instance));
}
public HauntingMisery(final HauntingMisery card) {
diff --git a/Mage.Sets/src/mage/cards/h/HeatRay.java b/Mage.Sets/src/mage/cards/h/HeatRay.java
index d05f13cf840..571dcae460c 100644
--- a/Mage.Sets/src/mage/cards/h/HeatRay.java
+++ b/Mage.Sets/src/mage/cards/h/HeatRay.java
@@ -19,7 +19,7 @@ public final class HeatRay extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{R}");
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/h/HeavenEarth.java b/Mage.Sets/src/mage/cards/h/HeavenEarth.java
index d823619d35c..51dad694db3 100644
--- a/Mage.Sets/src/mage/cards/h/HeavenEarth.java
+++ b/Mage.Sets/src/mage/cards/h/HeavenEarth.java
@@ -33,13 +33,13 @@ public final class HeavenEarth extends SplitCard {
// Falling
// Falling deals X damage to each creature with flying.
- getLeftHalfCard().getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filterFlying));
+ getLeftHalfCard().getSpellAbility().addEffect(new DamageAllEffect(ManacostVariableValue.instance, filterFlying));
// to
// Earth
// Earth deals X damage to each creature without flying.
getRightHalfCard().addAbility(new AftermathAbility().setRuleAtTheTop(true));
- getRightHalfCard().getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filterWithouFlying));
+ getRightHalfCard().getSpellAbility().addEffect(new DamageAllEffect(ManacostVariableValue.instance, filterWithouFlying));
}
public HeavenEarth(final HeavenEarth card) {
diff --git a/Mage.Sets/src/mage/cards/h/HelixPinnacle.java b/Mage.Sets/src/mage/cards/h/HelixPinnacle.java
index dc62fe13770..268d7f125b0 100644
--- a/Mage.Sets/src/mage/cards/h/HelixPinnacle.java
+++ b/Mage.Sets/src/mage/cards/h/HelixPinnacle.java
@@ -34,7 +34,7 @@ public final class HelixPinnacle extends CardImpl {
// {X}: Put X tower counters on Helix Pinnacle.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
- new AddCountersSourceEffect(CounterType.TOWER.createInstance(), new ManacostVariableValue(), true),
+ new AddCountersSourceEffect(CounterType.TOWER.createInstance(), ManacostVariableValue.instance, true),
new ManaCostsImpl("{X}")));
// At the beginning of your upkeep, if there are 100 or more tower counters on Helix Pinnacle, you win the game.
diff --git a/Mage.Sets/src/mage/cards/h/HelmOfObedience.java b/Mage.Sets/src/mage/cards/h/HelmOfObedience.java
index 4221686f3a2..bad8be25926 100644
--- a/Mage.Sets/src/mage/cards/h/HelmOfObedience.java
+++ b/Mage.Sets/src/mage/cards/h/HelmOfObedience.java
@@ -49,7 +49,7 @@ public final class HelmOfObedience extends CardImpl {
class HelmOfObedienceEffect extends OneShotEffect {
- private static final ManacostVariableValue amount = new ManacostVariableValue();
+ private static final ManacostVariableValue amount = ManacostVariableValue.instance;
public HelmOfObedienceEffect() {
super(Outcome.Detriment);
diff --git a/Mage.Sets/src/mage/cards/h/HollowTrees.java b/Mage.Sets/src/mage/cards/h/HollowTrees.java
index 8213814aa0d..9922ba6e365 100644
--- a/Mage.Sets/src/mage/cards/h/HollowTrees.java
+++ b/Mage.Sets/src/mage/cards/h/HollowTrees.java
@@ -44,7 +44,7 @@ public final class HollowTrees extends CardImpl {
// {tap}, Remove any number of storage counters from Hollow Trees: Add {G} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.GreenMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {G} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/h/HowlFromBeyond.java b/Mage.Sets/src/mage/cards/h/HowlFromBeyond.java
index b580479cfbf..ec2c6e9dd4a 100644
--- a/Mage.Sets/src/mage/cards/h/HowlFromBeyond.java
+++ b/Mage.Sets/src/mage/cards/h/HowlFromBeyond.java
@@ -23,7 +23,7 @@ public final class HowlFromBeyond extends CardImpl {
// Target creature gets +X/+0 until end of turn.
- this.getSpellAbility().addEffect(new BoostTargetEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new BoostTargetEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/h/HuatliWarriorPoet.java b/Mage.Sets/src/mage/cards/h/HuatliWarriorPoet.java
index 2cc5bf6d79b..2cf27ec2004 100644
--- a/Mage.Sets/src/mage/cards/h/HuatliWarriorPoet.java
+++ b/Mage.Sets/src/mage/cards/h/HuatliWarriorPoet.java
@@ -45,7 +45,7 @@ public final class HuatliWarriorPoet extends CardImpl {
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3));
// +2: You gain life equal to the greatest power among creatures you control.
- this.addAbility(new LoyaltyAbility(new GainLifeEffect(new GreatestPowerAmongControlledCreaturesValue(), "You gain life equal to the greatest power among creatures you control"), 2));
+ this.addAbility(new LoyaltyAbility(new GainLifeEffect(GreatestPowerAmongControlledCreaturesValue.instance, "You gain life equal to the greatest power among creatures you control"), 2));
// 0: Create a 3/3 green Dinosaur creature token with trample.
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new DinosaurToken()), 0));
diff --git a/Mage.Sets/src/mage/cards/h/HuntToExtinction.java b/Mage.Sets/src/mage/cards/h/HuntToExtinction.java
index 33ba56f4003..772bd5dce90 100644
--- a/Mage.Sets/src/mage/cards/h/HuntToExtinction.java
+++ b/Mage.Sets/src/mage/cards/h/HuntToExtinction.java
@@ -34,10 +34,10 @@ public final class HuntToExtinction extends CardImpl {
this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent(0, 1));
// Hunt to Extinction deals X damage to each creature.
- this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent()));
+ this.getSpellAbility().addEffect(new DamageAllEffect(ManacostVariableValue.instance, new FilterCreaturePermanent()));
// Hunt to Exctinction deals an additional X damage to each creature with a bounty counter on it.
- Effect effect = new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent(filter));
+ Effect effect = new DamageAllEffect(ManacostVariableValue.instance, new FilterCreaturePermanent(filter));
effect.setText("Hunt to Exctinction deals an additional X damage to each creature with a bounty counter on it");
this.getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/cards/h/Hurricane.java b/Mage.Sets/src/mage/cards/h/Hurricane.java
index cc1418ce236..b6630989b26 100644
--- a/Mage.Sets/src/mage/cards/h/Hurricane.java
+++ b/Mage.Sets/src/mage/cards/h/Hurricane.java
@@ -28,7 +28,7 @@ public final class Hurricane extends CardImpl {
// Hurricane deals X damage to each creature with flying and each player.
- this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter));
+ this.getSpellAbility().addEffect(new DamageEverythingEffect(ManacostVariableValue.instance, filter));
}
public Hurricane(final Hurricane card) {
diff --git a/Mage.Sets/src/mage/cards/i/IcatianStore.java b/Mage.Sets/src/mage/cards/i/IcatianStore.java
index 6e9aa335462..91a3dfecb24 100644
--- a/Mage.Sets/src/mage/cards/i/IcatianStore.java
+++ b/Mage.Sets/src/mage/cards/i/IcatianStore.java
@@ -44,7 +44,7 @@ public final class IcatianStore extends CardImpl {
// {tap}, Remove any number of storage counters from Icatian Store: Add {W} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.WhiteMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {W} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/i/Illuminate.java b/Mage.Sets/src/mage/cards/i/Illuminate.java
index 642379fd37b..558226bcf18 100644
--- a/Mage.Sets/src/mage/cards/i/Illuminate.java
+++ b/Mage.Sets/src/mage/cards/i/Illuminate.java
@@ -28,14 +28,14 @@ public final class Illuminate extends CardImpl {
kickerAbility.addKickerCost("{3}{U}");
this.addAbility(kickerAbility);
// Illuminate deals X damage to target creature. If Illuminate was kicked with its {2}{R} kicker, it deals X damage to that creature's controller. If Illuminate was kicked with its {3}{U} kicker, you draw X cards.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
- new DamageTargetControllerEffect(new ManacostVariableValue()),
+ new DamageTargetControllerEffect(ManacostVariableValue.instance),
new KickedCostCondition("{2}{R}"),
"if this spell was kicked with its {2}{R} kicker, it deals X damage to that creature's controller."));
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
- new DrawCardSourceControllerEffect(new ManacostVariableValue()),
+ new DrawCardSourceControllerEffect(ManacostVariableValue.instance),
new KickedCostCondition("{3}{U}"),
" if this spell was kicked with its {3}{U} kicker, you draw X cards."));
diff --git a/Mage.Sets/src/mage/cards/i/InfusedArrows.java b/Mage.Sets/src/mage/cards/i/InfusedArrows.java
index 5975fdc4fa6..904cde89546 100644
--- a/Mage.Sets/src/mage/cards/i/InfusedArrows.java
+++ b/Mage.Sets/src/mage/cards/i/InfusedArrows.java
@@ -32,7 +32,7 @@ public final class InfusedArrows extends CardImpl {
// Sunburst
this.addAbility(new SunburstAbility(this));
// {tap}, Remove X charge counters from Infused Arrows: Target creature gets -X/-X until end of turn.
- DynamicValue value = new SignInversionDynamicValue(new RemovedCountersForCostValue());
+ DynamicValue value = new SignInversionDynamicValue(RemovedCountersForCostValue.instance);
Effect effect = new BoostTargetEffect(value, value, Duration.EndOfTurn);
effect.setText("Target creature gets -X/-X until end of turn");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
diff --git a/Mage.Sets/src/mage/cards/i/InnerCalmOuterStrength.java b/Mage.Sets/src/mage/cards/i/InnerCalmOuterStrength.java
index 90e6f848e8a..7dbf40bb737 100644
--- a/Mage.Sets/src/mage/cards/i/InnerCalmOuterStrength.java
+++ b/Mage.Sets/src/mage/cards/i/InnerCalmOuterStrength.java
@@ -25,7 +25,7 @@ public final class InnerCalmOuterStrength extends CardImpl {
this.subtype.add(SubType.ARCANE);
// Target creature gets +X/+X until end of turn, where X is the number of cards in your hand.
- DynamicValue xValue= new CardsInControllerHandCount();
+ DynamicValue xValue= CardsInControllerHandCount.instance;
Effect effect = new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true);
effect.setText("Target creature gets +X/+X until end of turn, where X is the number of cards in your hand");
this.getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/cards/i/InnerFire.java b/Mage.Sets/src/mage/cards/i/InnerFire.java
index d7f2671f735..42a4da2dd46 100644
--- a/Mage.Sets/src/mage/cards/i/InnerFire.java
+++ b/Mage.Sets/src/mage/cards/i/InnerFire.java
@@ -20,7 +20,7 @@ public final class InnerFire extends CardImpl {
// Add {R} for each card in your hand.
- this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana(1), new CardsInControllerHandCount()));
+ this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana(1), CardsInControllerHandCount.instance));
}
public InnerFire(final InnerFire card) {
diff --git a/Mage.Sets/src/mage/cards/i/InsidiousDreams.java b/Mage.Sets/src/mage/cards/i/InsidiousDreams.java
index 53429733745..b163be9b12d 100644
--- a/Mage.Sets/src/mage/cards/i/InsidiousDreams.java
+++ b/Mage.Sets/src/mage/cards/i/InsidiousDreams.java
@@ -74,7 +74,7 @@ class InsidiousDreamsEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
- int amount = new GetXValue().calculate(game, source, this);
+ int amount = GetXValue.instance.calculate(game, source, this);
if (controller != null && sourceObject != null) {
TargetCardInLibrary target = new TargetCardInLibrary(0, amount, new FilterCard());
diff --git a/Mage.Sets/src/mage/cards/i/InspiredSphinx.java b/Mage.Sets/src/mage/cards/i/InspiredSphinx.java
index f3e793d77e6..22e2f94442c 100644
--- a/Mage.Sets/src/mage/cards/i/InspiredSphinx.java
+++ b/Mage.Sets/src/mage/cards/i/InspiredSphinx.java
@@ -33,7 +33,7 @@ public final class InspiredSphinx extends CardImpl {
// When Inspired Sphinx enters the battlefield, draw cards equal to the number of opponents you have.
this.addAbility(new EntersBattlefieldTriggeredAbility(
- new DrawCardSourceControllerEffect(new OpponentsCount()).setText("draw cards equal to the number of opponents you have")
+ new DrawCardSourceControllerEffect(OpponentsCount.instance).setText("draw cards equal to the number of opponents you have")
));
// {3}{U}: Create a colorless 1/1 Thopter artifact creature token with flying.
diff --git a/Mage.Sets/src/mage/cards/i/InvokeTheFiremind.java b/Mage.Sets/src/mage/cards/i/InvokeTheFiremind.java
index 9e74d88bb52..a61d8a4d1f8 100644
--- a/Mage.Sets/src/mage/cards/i/InvokeTheFiremind.java
+++ b/Mage.Sets/src/mage/cards/i/InvokeTheFiremind.java
@@ -21,9 +21,9 @@ public final class InvokeTheFiremind extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{U}{U}{R}");
- this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(ManacostVariableValue.instance));
Mode mode = new Mode();
- mode.addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ mode.addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
mode.addTarget(new TargetAnyTarget());
this.getSpellAbility().addMode(mode);
}
diff --git a/Mage.Sets/src/mage/cards/j/JaradGolgariLichLord.java b/Mage.Sets/src/mage/cards/j/JaradGolgariLichLord.java
index f3226b55642..e895731ea58 100644
--- a/Mage.Sets/src/mage/cards/j/JaradGolgariLichLord.java
+++ b/Mage.Sets/src/mage/cards/j/JaradGolgariLichLord.java
@@ -53,7 +53,7 @@ public final class JaradGolgariLichLord extends CardImpl {
this.addAbility(ability);
// {1}{B}{G}, Sacrifice another creature: Each opponent loses life equal to the sacrificed creature's power.
- ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeOpponentsEffect(new SacrificeCostCreaturesPower()), new ManaCostsImpl("{1}{B}{G}"));
+ ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeOpponentsEffect(SacrificeCostCreaturesPower.instance), new ManaCostsImpl("{1}{B}{G}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java b/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java
index b1e6320f946..7f04db05596 100644
--- a/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java
+++ b/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java
@@ -25,7 +25,7 @@ public final class JayasImmolatingInferno extends CardImpl {
this.addAbility(new LegendarySpellAbility());
// Jaya's Immolating Inferno deals X damage to each of up to three targets.
- Effect effect = new DamageTargetEffect(new ManacostVariableValue());
+ Effect effect = new DamageTargetEffect(ManacostVariableValue.instance);
effect.setText("{this} deals X damage to each of up to three targets");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetAnyTarget(1, 3));
diff --git a/Mage.Sets/src/mage/cards/j/JiwariTheEarthAflame.java b/Mage.Sets/src/mage/cards/j/JiwariTheEarthAflame.java
index fb3d834a8e4..e72e7debbfe 100644
--- a/Mage.Sets/src/mage/cards/j/JiwariTheEarthAflame.java
+++ b/Mage.Sets/src/mage/cards/j/JiwariTheEarthAflame.java
@@ -44,13 +44,13 @@ public final class JiwariTheEarthAflame extends CardImpl {
this.toughness = new MageInt(3);
// {X}{R}, {tap}: Jiwari, the Earth Aflame deals X damage to target creature without flying.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{R}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.instance), new ManaCostsImpl("{X}{R}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
// Channel - {X}{R}{R}{R}, Discard Jiwari: Jiwari deals X damage to each creature without flying.
- this.addAbility(new ChannelAbility("{X}{R}{R}{R}", new DamageAllEffect(new ManacostVariableValue(), filter)));
+ this.addAbility(new ChannelAbility("{X}{R}{R}{R}", new DamageAllEffect(ManacostVariableValue.instance, filter)));
}
public JiwariTheEarthAflame(final JiwariTheEarthAflame card) {
diff --git a/Mage.Sets/src/mage/cards/j/JoragaWarcaller.java b/Mage.Sets/src/mage/cards/j/JoragaWarcaller.java
index c7751476a84..ca2464b6589 100644
--- a/Mage.Sets/src/mage/cards/j/JoragaWarcaller.java
+++ b/Mage.Sets/src/mage/cards/j/JoragaWarcaller.java
@@ -48,7 +48,7 @@ public final class JoragaWarcaller extends CardImpl {
// Joraga Warcaller enters the battlefield with a +1/+1 counter on it for each time it was kicked.
this.addAbility(new EntersBattlefieldAbility(
- new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new MultikickerCount(), true),
+ new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), MultikickerCount.instance, true),
"with a +1/+1 counter on it for each time it was kicked"));
diff --git a/Mage.Sets/src/mage/cards/j/JushiApprentice.java b/Mage.Sets/src/mage/cards/j/JushiApprentice.java
index 88ac5754ba5..c6f19a2652c 100644
--- a/Mage.Sets/src/mage/cards/j/JushiApprentice.java
+++ b/Mage.Sets/src/mage/cards/j/JushiApprentice.java
@@ -71,7 +71,7 @@ class TomoyaTheRevealer extends TokenImpl {
toughness = new MageInt(3);
// {3}{U}{U},{T} : Target player draws X cards, where X is the number of cards in your hand.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(new CardsInControllerHandCount()), new ManaCostsImpl("{3}{U}{U}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(CardsInControllerHandCount.instance), new ManaCostsImpl("{3}{U}{U}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/k/KaerveksTorch.java b/Mage.Sets/src/mage/cards/k/KaerveksTorch.java
index 9c299f3f2d2..f003c596253 100644
--- a/Mage.Sets/src/mage/cards/k/KaerveksTorch.java
+++ b/Mage.Sets/src/mage/cards/k/KaerveksTorch.java
@@ -34,7 +34,7 @@ public final class KaerveksTorch extends CardImpl {
// As long as Kaervek's Torch is on the stack, spells that target it cost {2} more to cast.
this.addAbility(new SimpleStaticAbility(Zone.STACK, new KaerveksTorchCostIncreaseEffect()));
// Kaervek's Torch deals X damage to any target.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
diff --git a/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java b/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java
index a8249cef2d2..06e5e8d550b 100644
--- a/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java
+++ b/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java
@@ -37,7 +37,7 @@ public final class KagemaroFirstToSuffer extends CardImpl {
this.power = new MageInt(0);
this.toughness = new MageInt(0);
- DynamicValue xValue = new CardsInControllerHandCount();
+ DynamicValue xValue = CardsInControllerHandCount.instance;
// Kagemaro, First to Suffer's power and toughness are each equal to the number of cards in your hand.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame)));
// {B}, Sacrifice Kagemaro: All creatures get -X/-X until end of turn, where X is the number of cards in your hand.
diff --git a/Mage.Sets/src/mage/cards/k/KagemarosClutch.java b/Mage.Sets/src/mage/cards/k/KagemarosClutch.java
index 1736f8cd3ee..679f3bfc1aa 100644
--- a/Mage.Sets/src/mage/cards/k/KagemarosClutch.java
+++ b/Mage.Sets/src/mage/cards/k/KagemarosClutch.java
@@ -40,7 +40,7 @@ public final class KagemarosClutch extends CardImpl {
this.addAbility(ability);
// Enchanted creature gets -X/-X, where X is the number of cards in your hand.
- DynamicValue xMinusValue = new SignInversionDynamicValue(new CardsInControllerHandCount());
+ DynamicValue xMinusValue = new SignInversionDynamicValue(CardsInControllerHandCount.instance);
Effect effect = new BoostEnchantedEffect(xMinusValue, xMinusValue, Duration.WhileOnBattlefield);
effect.setText("Enchanted creature gets -X/-X, where X is the number of cards in your hand");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
diff --git a/Mage.Sets/src/mage/cards/k/KessigWolfRun.java b/Mage.Sets/src/mage/cards/k/KessigWolfRun.java
index 87a7e9e7ddb..3dfb9a59d9f 100644
--- a/Mage.Sets/src/mage/cards/k/KessigWolfRun.java
+++ b/Mage.Sets/src/mage/cards/k/KessigWolfRun.java
@@ -33,7 +33,7 @@ public final class KessigWolfRun extends CardImpl {
// {X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{X}{R}{G}"));
ability.addCost(new TapSourceCost());
- ability.addEffect(new BoostTargetEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
+ ability.addEffect(new BoostTargetEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/k/KhabalGhoul.java b/Mage.Sets/src/mage/cards/k/KhabalGhoul.java
index 28fc3288234..06a0fe4e253 100644
--- a/Mage.Sets/src/mage/cards/k/KhabalGhoul.java
+++ b/Mage.Sets/src/mage/cards/k/KhabalGhoul.java
@@ -28,7 +28,7 @@ public final class KhabalGhoul extends CardImpl {
// At the beginning of each end step, put a +1/+1 counter on Khabal Ghoul for each creature that died this turn.
this.addAbility(new BeginningOfEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(),
- new CreaturesDiedThisTurnCount(), true), TargetController.ANY, false), new CreaturesDiedWatcher());
+ CreaturesDiedThisTurnCount.instance, true), TargetController.ANY, false), new CreaturesDiedWatcher());
}
public KhabalGhoul(final KhabalGhoul card) {
diff --git a/Mage.Sets/src/mage/cards/k/KheruDreadmaw.java b/Mage.Sets/src/mage/cards/k/KheruDreadmaw.java
index 270eaeacf41..2c5328e31ac 100644
--- a/Mage.Sets/src/mage/cards/k/KheruDreadmaw.java
+++ b/Mage.Sets/src/mage/cards/k/KheruDreadmaw.java
@@ -37,7 +37,7 @@ public final class KheruDreadmaw extends CardImpl {
this.addAbility(DefenderAbility.getInstance());
// {1}{G}, Sacrifice another creature: You gain life equal to the sacrificed creature's toughness.
- Effect effect = new GainLifeEffect(new SacrificeCostCreaturesToughness());
+ Effect effect = new GainLifeEffect(SacrificeCostCreaturesToughness.instance);
effect.setText("You gain life equal to the sacrificed creature's toughness");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}{G}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
diff --git a/Mage.Sets/src/mage/cards/k/KillingWave.java b/Mage.Sets/src/mage/cards/k/KillingWave.java
index 9027d41357a..0f146aac56d 100644
--- a/Mage.Sets/src/mage/cards/k/KillingWave.java
+++ b/Mage.Sets/src/mage/cards/k/KillingWave.java
@@ -61,7 +61,7 @@ class KillingWaveEffect extends OneShotEffect {
return false;
}
- int amount = (new ManacostVariableValue()).calculate(game, source, this);
+ int amount = (ManacostVariableValue.instance).calculate(game, source, this);
if (amount > 0) {
List sacrifices = new LinkedList<>();
Map lifePaidAmounts = new HashMap<>();
diff --git a/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java b/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java
index 8724a8582e7..0b71aea401f 100644
--- a/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java
+++ b/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java
@@ -30,7 +30,7 @@ public final class KitsuneLoreweaver extends CardImpl {
this.toughness = new MageInt(1);
// {1}{W}: Kitsune Loreweaver gets +0/+X until end of turn, where X is the number of cards in your hand.
- Effect effect = new BoostSourceEffect(new StaticValue(0), new CardsInControllerHandCount(), Duration.EndOfTurn, true);
+ Effect effect = new BoostSourceEffect(new StaticValue(0), CardsInControllerHandCount.instance, Duration.EndOfTurn, true);
effect.setText("{this} gets +0/+X until end of turn, where X is the number of cards in your hand");
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{W}")));
}
diff --git a/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java b/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java
index f352b996234..0349e3bd190 100644
--- a/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java
+++ b/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java
@@ -43,7 +43,7 @@ public final class KiyomaroFirstToStand extends CardImpl {
this.toughness = new MageInt(0);
// Kiyomaro, First to Stand's power and toughness are each equal to the number of cards in your hand.
- DynamicValue xValue= new CardsInControllerHandCount();
+ DynamicValue xValue= CardsInControllerHandCount.instance;
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame)));
// As long as you have four or more cards in hand, Kiyomaro has vigilance.
diff --git a/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java b/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java
index 7da7179e698..8b2a45c4c39 100644
--- a/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java
+++ b/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java
@@ -32,7 +32,7 @@ public final class KnollspineInvocation extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}");
// {X}, Discard a card with converted mana cost X: Knollspine Invocation deals X damage to any target.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue(), true), new ManaCostsImpl<>("{X}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.instance, true), new ManaCostsImpl<>("{X}"));
ability.addCost(new DiscardTargetCost(new TargetCardInHand(filter)));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/k/KorozdaGuildmage.java b/Mage.Sets/src/mage/cards/k/KorozdaGuildmage.java
index 726ead90abc..872488a84d0 100644
--- a/Mage.Sets/src/mage/cards/k/KorozdaGuildmage.java
+++ b/Mage.Sets/src/mage/cards/k/KorozdaGuildmage.java
@@ -53,7 +53,7 @@ public final class KorozdaGuildmage extends CardImpl {
this.addAbility(ability);
// {2}{B}{G}, Sacrifice a nontoken creature: create X 1/1 green Saproling creature tokens, where X is the sacrificed creature's toughness.
- ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken(),new SacrificeCostCreaturesToughness()),new ManaCostsImpl("{2}{B}{G}"));
+ ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken(),SacrificeCostCreaturesToughness.instance),new ManaCostsImpl("{2}{B}{G}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,filter, true)));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/k/KravTheUnredeemed.java b/Mage.Sets/src/mage/cards/k/KravTheUnredeemed.java
index 8a08d9630de..136033ed407 100644
--- a/Mage.Sets/src/mage/cards/k/KravTheUnredeemed.java
+++ b/Mage.Sets/src/mage/cards/k/KravTheUnredeemed.java
@@ -76,7 +76,7 @@ class KravTheUnredeemedEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
- int xValue = new GetXValue().calculate(game, source, this);
+ int xValue = GetXValue.instance.calculate(game, source, this);
new DrawCardTargetEffect(xValue).apply(game, source);
new GainLifeTargetEffect(xValue).apply(game, source);
new AddCountersSourceEffect(CounterType.P1P1.createInstance(xValue)).apply(game, source);
diff --git a/Mage.Sets/src/mage/cards/k/KryShield.java b/Mage.Sets/src/mage/cards/k/KryShield.java
index 8fc55fc5dc4..eb321f215e2 100644
--- a/Mage.Sets/src/mage/cards/k/KryShield.java
+++ b/Mage.Sets/src/mage/cards/k/KryShield.java
@@ -31,7 +31,7 @@ public final class KryShield extends CardImpl {
Effect effect = new PreventDamageByTargetEffect(Duration.EndOfTurn);
effect.setText("Prevent all damage that would be dealt this turn by target creature you control");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
- ability.addEffect(new BoostTargetEffect(new StaticValue(0), new TargetConvertedManaCost(), Duration.EndOfTurn, true)
+ ability.addEffect(new BoostTargetEffect(new StaticValue(0), TargetConvertedManaCost.instance, Duration.EndOfTurn, true)
.setText("That creature gets +0/+X until end of turn, where X is its converted mana cost"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetControlledCreaturePermanent());
diff --git a/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java b/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java
index 7c86ccbe4fd..30171595ff4 100644
--- a/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java
+++ b/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java
@@ -35,7 +35,7 @@ public final class LatullaKeldonOverseer extends CardImpl {
this.toughness = new MageInt(3);
// {X}{R}, {tap}, Discard two cards: Latulla, Keldon Overseer deals X damage to any target.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{R}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.instance), new ManaCostsImpl("{X}{R}"));
ability.addCost(new TapSourceCost());
ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, 2, new FilterCard("two cards"))));
ability.addTarget(new TargetAnyTarget());
diff --git a/Mage.Sets/src/mage/cards/l/LavaclawReaches.java b/Mage.Sets/src/mage/cards/l/LavaclawReaches.java
index e1c3f7b6fd1..9988c05f7d4 100644
--- a/Mage.Sets/src/mage/cards/l/LavaclawReaches.java
+++ b/Mage.Sets/src/mage/cards/l/LavaclawReaches.java
@@ -60,7 +60,7 @@ class LavaclawReachesToken extends TokenImpl {
color.setBlack(true);
power = new MageInt(2);
toughness = new MageInt(2);
- addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn), new ManaCostsImpl("{X}")));
+ addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn), new ManaCostsImpl("{X}")));
}
public LavaclawReachesToken(final LavaclawReachesToken token) {
super(token);
diff --git a/Mage.Sets/src/mage/cards/l/Lavalanche.java b/Mage.Sets/src/mage/cards/l/Lavalanche.java
index bbb74ff71da..231134ea215 100644
--- a/Mage.Sets/src/mage/cards/l/Lavalanche.java
+++ b/Mage.Sets/src/mage/cards/l/Lavalanche.java
@@ -29,7 +29,7 @@ public final class Lavalanche extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{R}{G}");
// Lavalanche deals X damage to target player and each creature he or she controls.
- this.getSpellAbility().addEffect(new LavalancheEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new LavalancheEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
}
diff --git a/Mage.Sets/src/mage/cards/l/Lich.java b/Mage.Sets/src/mage/cards/l/Lich.java
index a04b2c81a1a..e77d1031f57 100644
--- a/Mage.Sets/src/mage/cards/l/Lich.java
+++ b/Mage.Sets/src/mage/cards/l/Lich.java
@@ -41,7 +41,7 @@ public final class Lich extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}{B}{B}");
// As Lich enters the battlefield, you lose life equal to your life total.
- this.addAbility(new EntersBattlefieldAbility(new LoseLifeSourceControllerEffect(new ControllerLifeCount()), null, "As Lich enters the battlefield, you lose life equal to your life total.", null));
+ this.addAbility(new EntersBattlefieldAbility(new LoseLifeSourceControllerEffect(ControllerLifeCount.instance), null, "As Lich enters the battlefield, you lose life equal to your life total.", null));
// You don't lose the game for having 0 or less life.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontLoseByZeroOrLessLifeEffect(Duration.WhileOnBattlefield)));
diff --git a/Mage.Sets/src/mage/cards/l/LifecraftAwakening.java b/Mage.Sets/src/mage/cards/l/LifecraftAwakening.java
index 7aabdf3f900..a6ff60b5017 100644
--- a/Mage.Sets/src/mage/cards/l/LifecraftAwakening.java
+++ b/Mage.Sets/src/mage/cards/l/LifecraftAwakening.java
@@ -39,7 +39,7 @@ public final class LifecraftAwakening extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{G}");
// Put X +1/+1 counters on target artifact you control. If it isn't a creature or Vehicle, it becomes a 0/0 Construct artifact creature.
- ManacostVariableValue manaX = new ManacostVariableValue();
+ ManacostVariableValue manaX = ManacostVariableValue.instance;
getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(), manaX));
getSpellAbility().addTarget(new TargetArtifactPermanent(filter));
getSpellAbility().addEffect(new LifecraftAwakeningEffect());
diff --git a/Mage.Sets/src/mage/cards/l/LightkeeperOfEmeria.java b/Mage.Sets/src/mage/cards/l/LightkeeperOfEmeria.java
index 05cad39bf7e..2b3be08030a 100644
--- a/Mage.Sets/src/mage/cards/l/LightkeeperOfEmeria.java
+++ b/Mage.Sets/src/mage/cards/l/LightkeeperOfEmeria.java
@@ -35,7 +35,7 @@ public final class LightkeeperOfEmeria extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// When Lightkeeper of Emeria enters the battlefield, you gain 2 life for each time it was kicked.
- Effect effect = new GainLifeEffect(new MultipliedValue(new MultikickerCount(), 2));
+ Effect effect = new GainLifeEffect(new MultipliedValue(MultikickerCount.instance, 2));
effect.setText("you gain 2 life for each time it was kicked");
this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false));
}
diff --git a/Mage.Sets/src/mage/cards/l/LiquidFire.java b/Mage.Sets/src/mage/cards/l/LiquidFire.java
index 04b40d14139..32737ce082b 100644
--- a/Mage.Sets/src/mage/cards/l/LiquidFire.java
+++ b/Mage.Sets/src/mage/cards/l/LiquidFire.java
@@ -30,7 +30,7 @@ public final class LiquidFire extends CardImpl {
// As an additional cost to cast Liquid Fire, choose a number between 0 and 5.
this.getSpellAbility().addCost(new LiquidFireCost());
// Liquid Fire deals X damage to target creature and 5 minus X damage to that creature's controller, where X is the chosen number.
- DynamicValue choiceValue = new GetXValue();
+ DynamicValue choiceValue = GetXValue.instance;
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new LiquidFireEffect(choiceValue));
diff --git a/Mage.Sets/src/mage/cards/l/LogicKnot.java b/Mage.Sets/src/mage/cards/l/LogicKnot.java
index 49b6eaff913..daa6d03ee13 100644
--- a/Mage.Sets/src/mage/cards/l/LogicKnot.java
+++ b/Mage.Sets/src/mage/cards/l/LogicKnot.java
@@ -24,7 +24,7 @@ public final class LogicKnot extends CardImpl {
this.addAbility(new DelveAbility());
// Counter target spell unless its controller pays {X}.
- this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetSpell());
}
diff --git a/Mage.Sets/src/mage/cards/m/MageRingNetwork.java b/Mage.Sets/src/mage/cards/m/MageRingNetwork.java
index 3edaf7279c8..21506a8beca 100644
--- a/Mage.Sets/src/mage/cards/m/MageRingNetwork.java
+++ b/Mage.Sets/src/mage/cards/m/MageRingNetwork.java
@@ -39,7 +39,7 @@ public final class MageRingNetwork extends CardImpl {
// {T}, Remove any number of storage counters from Mage-Ring Network: Add {C} for each storage counter removed this way.
ability = new DynamicManaAbility(
Mana.ColorlessMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {C} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/m/Magmaquake.java b/Mage.Sets/src/mage/cards/m/Magmaquake.java
index 98e00ba168f..4522a2d70b7 100644
--- a/Mage.Sets/src/mage/cards/m/Magmaquake.java
+++ b/Mage.Sets/src/mage/cards/m/Magmaquake.java
@@ -34,7 +34,7 @@ public final class Magmaquake extends CardImpl {
// Magmaquake deals X damage to each creature without flying and each planeswalker.
- this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filter));
+ this.getSpellAbility().addEffect(new DamageAllEffect(ManacostVariableValue.instance, filter));
}
public Magmaquake(final Magmaquake card) {
diff --git a/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java b/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java
index 9f05a441e61..b75bb70a686 100644
--- a/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java
+++ b/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java
@@ -30,7 +30,7 @@ public final class MaliciousAdvice extends CardImpl {
Effect effect = new TapTargetEffect();
effect.setText("X target artifacts, creatures, and/or lands.");
this.getSpellAbility().addEffect(effect);
- this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(ManacostVariableValue.instance));
this.getSpellAbility().setTargetAdjuster(MaliciousAdviceAdjuster.instance);
}
diff --git a/Mage.Sets/src/mage/cards/m/Malignus.java b/Mage.Sets/src/mage/cards/m/Malignus.java
index 7db53127549..156ede533cf 100644
--- a/Mage.Sets/src/mage/cards/m/Malignus.java
+++ b/Mage.Sets/src/mage/cards/m/Malignus.java
@@ -74,7 +74,7 @@ class HighestLifeTotalAmongOpponentsCount implements DynamicValue {
@Override
public DynamicValue copy() {
- return new CardsInControllerHandCount();
+ return CardsInControllerHandCount.instance;
}
@Override
diff --git a/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java b/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java
index 7d5a219f10c..866ab25de72 100644
--- a/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java
+++ b/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java
@@ -52,12 +52,12 @@ public final class MarathWillOfTheWild extends CardImpl {
this.toughness = new MageInt(0);
// Marath, Will of the Wild enters the battlefield with a number of +1/+1 counters on it equal to the amount of mana spent to cast it.
- Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new ManaSpentToCastCount(), true);
+ Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), ManaSpentToCastCount.instance, true);
effect.setText("with a number of +1/+1 counters on it equal to the amount of mana spent to cast it");
this.addAbility(new EntersBattlefieldAbility(effect));
// {X}, Remove X +1/+1 counters from Marath: Choose one - Put X +1/+1 counters on target creature;
- effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new ManacostVariableValue());
+ effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), ManacostVariableValue.instance);
effect.setText("Put X +1/+1 counters on target creature");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
ability.addCost(new MarathWillOfTheWildRemoveCountersCost());
@@ -65,7 +65,7 @@ public final class MarathWillOfTheWild extends CardImpl {
// or Marath deals X damage to any target;
Mode mode = new Mode();
- mode.addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ mode.addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
mode.addTarget(new TargetAnyTarget());
ability.addMode(mode);
@@ -132,7 +132,7 @@ class MarathWillOfTheWildCreateTokenEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
- int amount = new ManacostVariableValue().calculate(game, source, this);
+ int amount = ManacostVariableValue.instance.calculate(game, source, this);
Token token = new MarathWillOfTheWildElementalToken();
token.getPower().modifyBaseValue(amount);
token.getToughness().modifyBaseValue(amount);
@@ -165,7 +165,7 @@ class MarathWillOfTheWildRemoveCountersCost extends CostImpl {
@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
- int amount = new ManacostVariableValue().calculate(game, ability, null);
+ int amount = ManacostVariableValue.instance.calculate(game, ability, null);
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null && permanent.getCounters(game).getCount(CounterType.P1P1) >= amount) {
permanent.removeCounters(CounterType.P1P1.getName(), amount, game);
diff --git a/Mage.Sets/src/mage/cards/m/MarchOfTheMultitudes.java b/Mage.Sets/src/mage/cards/m/MarchOfTheMultitudes.java
index b15c38640f8..1f6f9fe5a4d 100644
--- a/Mage.Sets/src/mage/cards/m/MarchOfTheMultitudes.java
+++ b/Mage.Sets/src/mage/cards/m/MarchOfTheMultitudes.java
@@ -24,7 +24,7 @@ public final class MarchOfTheMultitudes extends CardImpl {
// Create X 1/1 white Soldier creature tokens with lifelink.
this.getSpellAbility().addEffect(new CreateTokenEffect(
new SoldierLifelinkToken(),
- new ManacostVariableValue()
+ ManacostVariableValue.instance
));
}
diff --git a/Mage.Sets/src/mage/cards/m/Maro.java b/Mage.Sets/src/mage/cards/m/Maro.java
index e611397388c..68bd5c1faf2 100644
--- a/Mage.Sets/src/mage/cards/m/Maro.java
+++ b/Mage.Sets/src/mage/cards/m/Maro.java
@@ -27,7 +27,7 @@ public final class Maro extends CardImpl {
this.toughness = new MageInt(0);
// Maro's power and toughness are each equal to the number of cards in your hand.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInControllerHandCount(), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CardsInControllerHandCount.instance, Duration.EndOfGame)));
}
public Maro(final Maro card) {
diff --git a/Mage.Sets/src/mage/cards/m/MarshalsAnthem.java b/Mage.Sets/src/mage/cards/m/MarshalsAnthem.java
index 7ed4417d513..9fc03f6d555 100644
--- a/Mage.Sets/src/mage/cards/m/MarshalsAnthem.java
+++ b/Mage.Sets/src/mage/cards/m/MarshalsAnthem.java
@@ -65,7 +65,7 @@ enum MarshalsAnthemAdjuster implements TargetAdjuster {
@Override
public void adjustTargets(Ability ability, Game game) {
ability.getTargets().clear();
- int numbTargets = new MultikickerCount().calculate(game, ability, null);
+ int numbTargets = MultikickerCount.instance.calculate(game, ability, null);
if (numbTargets > 0) {
ability.addTarget(new TargetCardInYourGraveyard(0, numbTargets, filter));
}
diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfAshes.java b/Mage.Sets/src/mage/cards/m/MartyrOfAshes.java
index 9a99586b08a..c43c8a45e2d 100644
--- a/Mage.Sets/src/mage/cards/m/MartyrOfAshes.java
+++ b/Mage.Sets/src/mage/cards/m/MartyrOfAshes.java
@@ -48,7 +48,7 @@ public final class MartyrOfAshes extends CardImpl {
this.toughness = new MageInt(1);
// {2}, Reveal X red cards from your hand, Sacrifice Martyr of Ashes: Martyr of Ashes deals X damage to each creature without flying.
- Effect effect = new DamageAllEffect(new RevealTargetFromHandCostCount(), filterCreature);
+ Effect effect = new DamageAllEffect(RevealTargetFromHandCostCount.instance, filterCreature);
effect.setText("Martyr of Ashes deals X damage to each creature without flying.");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filterHand)));
diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfFrost.java b/Mage.Sets/src/mage/cards/m/MartyrOfFrost.java
index 44e48efe62c..5ec56acb5ae 100644
--- a/Mage.Sets/src/mage/cards/m/MartyrOfFrost.java
+++ b/Mage.Sets/src/mage/cards/m/MartyrOfFrost.java
@@ -42,7 +42,7 @@ public final class MartyrOfFrost extends CardImpl {
this.toughness = new MageInt(1);
// {2}, Reveal X blue cards from your hand, Sacrifice Martyr of Frost: Counter target spell unless its controller pays {X}.
- Effect effect = new CounterUnlessPaysEffect(new RevealTargetFromHandCostCount());
+ Effect effect = new CounterUnlessPaysEffect(RevealTargetFromHandCostCount.instance);
effect.setText("Counter target spell unless its controller pays {X}.");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)));
diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfSands.java b/Mage.Sets/src/mage/cards/m/MartyrOfSands.java
index 5076f87b2fb..d6c7baa4635 100644
--- a/Mage.Sets/src/mage/cards/m/MartyrOfSands.java
+++ b/Mage.Sets/src/mage/cards/m/MartyrOfSands.java
@@ -43,7 +43,7 @@ public final class MartyrOfSands extends CardImpl {
this.toughness = new MageInt(1);
// {1}, Reveal X white cards from your hand, Sacrifice Martyr of Sands: You gain three times X life.
- Effect effect = new GainLifeEffect(new MultipliedValue(new RevealTargetFromHandCostCount(), 3));
+ Effect effect = new GainLifeEffect(new MultipliedValue(RevealTargetFromHandCostCount.instance, 3));
effect.setText("You gain three times X life.");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}"));
ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)));
diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfSpores.java b/Mage.Sets/src/mage/cards/m/MartyrOfSpores.java
index 160441a376f..4bb1335d443 100644
--- a/Mage.Sets/src/mage/cards/m/MartyrOfSpores.java
+++ b/Mage.Sets/src/mage/cards/m/MartyrOfSpores.java
@@ -43,7 +43,7 @@ public final class MartyrOfSpores extends CardImpl {
this.toughness = new MageInt(1);
// {1}, Reveal X green cards from your hand, Sacrifice Martyr of Spores: Target creature gets +X/+X until end of turn.
- Effect effect = new BoostTargetEffect(new RevealTargetFromHandCostCount(), new RevealTargetFromHandCostCount(), Duration.EndOfTurn, true);
+ Effect effect = new BoostTargetEffect(RevealTargetFromHandCostCount.instance, RevealTargetFromHandCostCount.instance, Duration.EndOfTurn, true);
effect.setText("Target creature gets +X/+X until end of turn.");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1));
ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)));
diff --git a/Mage.Sets/src/mage/cards/m/MasterTheWay.java b/Mage.Sets/src/mage/cards/m/MasterTheWay.java
index 9325793aa83..e3fc9243cf4 100644
--- a/Mage.Sets/src/mage/cards/m/MasterTheWay.java
+++ b/Mage.Sets/src/mage/cards/m/MasterTheWay.java
@@ -23,7 +23,7 @@ public final class MasterTheWay extends CardImpl {
// Draw a card. Master the Way deals damage to any target equal to the number of cards in your hand.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
- Effect effect = new DamageTargetEffect(new CardsInControllerHandCount());
+ Effect effect = new DamageTargetEffect(CardsInControllerHandCount.instance);
effect.setText("{this} deals damage to any target equal to the number of cards in your hand");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetAnyTarget());
diff --git a/Mage.Sets/src/mage/cards/m/MasumaroFirstToLive.java b/Mage.Sets/src/mage/cards/m/MasumaroFirstToLive.java
index e7721a06a81..3e67265849d 100644
--- a/Mage.Sets/src/mage/cards/m/MasumaroFirstToLive.java
+++ b/Mage.Sets/src/mage/cards/m/MasumaroFirstToLive.java
@@ -32,7 +32,7 @@ public final class MasumaroFirstToLive extends CardImpl {
this.toughness = new MageInt(0);
// Masumaro, First to Live's power and toughness are each equal to twice the number of cards in your hand.
- DynamicValue xValue= new MultipliedValue(new CardsInControllerHandCount(), 2);
+ DynamicValue xValue= new MultipliedValue(CardsInControllerHandCount.instance, 2);
Effect effect = new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame);
effect.setText("{this}'s power and toughness are each equal to twice the number of cards in your hand");
this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));
diff --git a/Mage.Sets/src/mage/cards/m/MeishinTheMindCage.java b/Mage.Sets/src/mage/cards/m/MeishinTheMindCage.java
index 2d29f4215a1..a88e657705d 100644
--- a/Mage.Sets/src/mage/cards/m/MeishinTheMindCage.java
+++ b/Mage.Sets/src/mage/cards/m/MeishinTheMindCage.java
@@ -26,7 +26,7 @@ public final class MeishinTheMindCage extends CardImpl {
addSuperType(SuperType.LEGENDARY);
// All creatures get -X/-0, where X is the number of cards in your hand.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new SignInversionDynamicValue(new CardsInControllerHandCount()), new StaticValue(0), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, false, "All creatures get -X/-0, where X is the number of cards in your hand")));
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new SignInversionDynamicValue(CardsInControllerHandCount.instance), new StaticValue(0), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, false, "All creatures get -X/-0, where X is the number of cards in your hand")));
}
public MeishinTheMindCage(final MeishinTheMindCage card) {
diff --git a/Mage.Sets/src/mage/cards/m/MercadianBazaar.java b/Mage.Sets/src/mage/cards/m/MercadianBazaar.java
index dc03c83a538..aadd3bbe450 100644
--- a/Mage.Sets/src/mage/cards/m/MercadianBazaar.java
+++ b/Mage.Sets/src/mage/cards/m/MercadianBazaar.java
@@ -34,7 +34,7 @@ public final class MercadianBazaar extends CardImpl {
// {tap}, Remove any number of storage counters from Mercadian Bazaar: Add {R} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.RedMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {R} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/m/MercurialChemister.java b/Mage.Sets/src/mage/cards/m/MercurialChemister.java
index 9365da620db..b3390f455ec 100644
--- a/Mage.Sets/src/mage/cards/m/MercurialChemister.java
+++ b/Mage.Sets/src/mage/cards/m/MercurialChemister.java
@@ -39,7 +39,7 @@ public final class MercurialChemister extends CardImpl {
this.addAbility(ability);
// {R}, {T}, Discard a card: Mercurial Chemister deals damage to target creature equal to the discarded card's converted mana cost.
- ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new DiscardCostCardConvertedMana()), new ManaCostsImpl("{R}"));
+ ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(DiscardCostCardConvertedMana.instance), new ManaCostsImpl("{R}"));
ability.addTarget(new TargetCreaturePermanent());
ability.addCost(new TapSourceCost());
ability.addCost(new DiscardCardCost());
diff --git a/Mage.Sets/src/mage/cards/m/MeteorShower.java b/Mage.Sets/src/mage/cards/m/MeteorShower.java
index 9c8031c50df..2fa2390c042 100644
--- a/Mage.Sets/src/mage/cards/m/MeteorShower.java
+++ b/Mage.Sets/src/mage/cards/m/MeteorShower.java
@@ -21,7 +21,7 @@ public final class MeteorShower extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}");
// Meteor Shower deals X plus 1 damage divided as you choose among any number of target creatures and/or players.
- DynamicValue xValue = new IntPlusDynamicValue(1, new ManacostVariableValue());
+ DynamicValue xValue = new IntPlusDynamicValue(1, ManacostVariableValue.instance);
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue));
}
diff --git a/Mage.Sets/src/mage/cards/m/MilitantAngel.java b/Mage.Sets/src/mage/cards/m/MilitantAngel.java
index 790f1e62c17..c1ff666a0dd 100644
--- a/Mage.Sets/src/mage/cards/m/MilitantAngel.java
+++ b/Mage.Sets/src/mage/cards/m/MilitantAngel.java
@@ -33,7 +33,7 @@ public final class MilitantAngel extends CardImpl {
this.addAbility(LifelinkAbility.getInstance());
// When Militant Angel enters the battlefield, create a number of 2/2 white Knight creature tokens with vigilance equal to the number of opponents you attacked this turn.
- Effect effect = new CreateTokenEffect(new KnightToken(), new AttackedThisTurnOpponentsCount());
+ Effect effect = new CreateTokenEffect(new KnightToken(), AttackedThisTurnOpponentsCount.instance);
effect.setText("create a number of 2/2 white Knight creature tokens with vigilance equal to the number of opponents you attacked this turn");
this.addAbility(new EntersBattlefieldTriggeredAbility(effect));
}
diff --git a/Mage.Sets/src/mage/cards/m/MindShatter.java b/Mage.Sets/src/mage/cards/m/MindShatter.java
index 244b241f933..8e048a27ab7 100644
--- a/Mage.Sets/src/mage/cards/m/MindShatter.java
+++ b/Mage.Sets/src/mage/cards/m/MindShatter.java
@@ -19,7 +19,7 @@ public final class MindShatter extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{B}");
// Target player discards X cards at random.
- this.getSpellAbility().addEffect(new DiscardTargetEffect(new ManacostVariableValue(), true));
+ this.getSpellAbility().addEffect(new DiscardTargetEffect(ManacostVariableValue.instance, true));
this.getSpellAbility().addTarget(new TargetPlayer());
}
diff --git a/Mage.Sets/src/mage/cards/m/MindSpring.java b/Mage.Sets/src/mage/cards/m/MindSpring.java
index f327dde9c9e..58b59946328 100644
--- a/Mage.Sets/src/mage/cards/m/MindSpring.java
+++ b/Mage.Sets/src/mage/cards/m/MindSpring.java
@@ -18,7 +18,7 @@ public final class MindSpring extends CardImpl {
public MindSpring(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{U}{U}");
- this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(ManacostVariableValue.instance));
}
public MindSpring(final MindSpring card) {
diff --git a/Mage.Sets/src/mage/cards/m/MindTwist.java b/Mage.Sets/src/mage/cards/m/MindTwist.java
index 1b1b377ffcd..bddc25745ab 100644
--- a/Mage.Sets/src/mage/cards/m/MindTwist.java
+++ b/Mage.Sets/src/mage/cards/m/MindTwist.java
@@ -20,7 +20,7 @@ public final class MindTwist extends CardImpl {
// Target player discards X cards at random.
- this.getSpellAbility().addEffect(new DiscardTargetEffect(new ManacostVariableValue(), true));
+ this.getSpellAbility().addEffect(new DiscardTargetEffect(ManacostVariableValue.instance, true));
this.getSpellAbility().addTarget(new TargetPlayer());
}
diff --git a/Mage.Sets/src/mage/cards/m/MindWarp.java b/Mage.Sets/src/mage/cards/m/MindWarp.java
index c82cf55fb61..3db8935245e 100644
--- a/Mage.Sets/src/mage/cards/m/MindWarp.java
+++ b/Mage.Sets/src/mage/cards/m/MindWarp.java
@@ -28,7 +28,7 @@ public final class MindWarp extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{3}{B}");
// Look at target player's hand and choose X cards from it. That player discards those cards.
- this.getSpellAbility().addEffect(new MindWarpEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new MindWarpEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetPlayer());
}
diff --git a/Mage.Sets/src/mage/cards/m/Mindswipe.java b/Mage.Sets/src/mage/cards/m/Mindswipe.java
index fbfa217fd31..1650b14967c 100644
--- a/Mage.Sets/src/mage/cards/m/Mindswipe.java
+++ b/Mage.Sets/src/mage/cards/m/Mindswipe.java
@@ -29,7 +29,7 @@ public final class Mindswipe extends CardImpl {
// Counter target spell unless its controller pays {X}. Mindswipe deals X damage to that spell's controller.
- Effect effect = new CounterUnlessPaysEffect(new ManacostVariableValue());
+ Effect effect = new CounterUnlessPaysEffect(ManacostVariableValue.instance);
effect.setText("Counter target spell unless its controller pays {X}.");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetSpell());
@@ -74,7 +74,7 @@ class MindswipeEffect extends OneShotEffect {
Spell spell = (Spell) object;
Player spellController = game.getPlayer(spell.getControllerId());
if (spellController != null) {
- int damage = new ManacostVariableValue().calculate(game, source, this);
+ int damage = ManacostVariableValue.instance.calculate(game, source, this);
spellController.damage(damage, source.getSourceId(), game, false, true);
}
return true;
diff --git a/Mage.Sets/src/mage/cards/m/MirrorEntity.java b/Mage.Sets/src/mage/cards/m/MirrorEntity.java
index b5246cc7e3b..9174db87c9e 100644
--- a/Mage.Sets/src/mage/cards/m/MirrorEntity.java
+++ b/Mage.Sets/src/mage/cards/m/MirrorEntity.java
@@ -40,7 +40,7 @@ public final class MirrorEntity extends CardImpl {
// Changeling
this.addAbility(ChangelingAbility.getInstance());
// {X}: Until end of turn, creatures you control have base power and toughness X/X and gain all creature types.
- DynamicValue variableMana = new ManacostVariableValue();
+ DynamicValue variableMana = ManacostVariableValue.instance;
Effect effect = new SetPowerToughnessAllEffect(variableMana, variableMana, Duration.EndOfTurn, filter, true);
effect.setText("Until end of turn, creatures you control have base power and toughness X/X");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new VariableManaCost());
diff --git a/Mage.Sets/src/mage/cards/m/Molder.java b/Mage.Sets/src/mage/cards/m/Molder.java
index ca23233ac7c..cffc75b81a1 100644
--- a/Mage.Sets/src/mage/cards/m/Molder.java
+++ b/Mage.Sets/src/mage/cards/m/Molder.java
@@ -28,7 +28,7 @@ public final class Molder extends CardImpl {
// Destroy target artifact or enchantment with converted mana cost X. It can't be regenerated. You gain X life.
this.getSpellAbility().addEffect(new DestroyTargetEffect("Destroy target artifact or enchantment with converted mana cost X.", true));
- this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new GainLifeEffect(ManacostVariableValue.instance));
this.getSpellAbility().setTargetAdjuster(MolderAdjuster.instance);
}
diff --git a/Mage.Sets/src/mage/cards/m/MoltenSlagheap.java b/Mage.Sets/src/mage/cards/m/MoltenSlagheap.java
index a6e3ef4dea9..5d339c274aa 100644
--- a/Mage.Sets/src/mage/cards/m/MoltenSlagheap.java
+++ b/Mage.Sets/src/mage/cards/m/MoltenSlagheap.java
@@ -36,7 +36,7 @@ public final class MoltenSlagheap extends CardImpl {
this.addAbility(ability);
// {1}, Remove X storage counters from Molten Slagheap: Add X mana in any combination of {B} and/or {R}.
ability = new SimpleManaAbility(Zone.BATTLEFIELD,
- new AddManaInAnyCombinationEffect(new RemovedCountersForCostValue(), ColoredManaSymbol.B, ColoredManaSymbol.R),
+ new AddManaInAnyCombinationEffect(RemovedCountersForCostValue.instance, ColoredManaSymbol.B, ColoredManaSymbol.R),
new GenericManaCost(1));
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance()));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/m/MonstrousOnslaught.java b/Mage.Sets/src/mage/cards/m/MonstrousOnslaught.java
index 77087fd6242..28f7226af55 100644
--- a/Mage.Sets/src/mage/cards/m/MonstrousOnslaught.java
+++ b/Mage.Sets/src/mage/cards/m/MonstrousOnslaught.java
@@ -21,7 +21,7 @@ public final class MonstrousOnslaught extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
// Monstrous Onslaught deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast Monstrous Onslaught.
- DynamicValue xValue = new GreatestPowerAmongControlledCreaturesValue();
+ DynamicValue xValue = GreatestPowerAmongControlledCreaturesValue.instance;
Effect effect = new DamageMultiEffect(xValue);
effect.setText("{this} deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast {this}");
this.getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/cards/m/MultaniMaroSorcerer.java b/Mage.Sets/src/mage/cards/m/MultaniMaroSorcerer.java
index 63949d9ba94..d2e45d955e9 100644
--- a/Mage.Sets/src/mage/cards/m/MultaniMaroSorcerer.java
+++ b/Mage.Sets/src/mage/cards/m/MultaniMaroSorcerer.java
@@ -33,7 +33,7 @@ public final class MultaniMaroSorcerer extends CardImpl {
this.addAbility(ShroudAbility.getInstance());
// Multani, Maro-Sorcerer's power and toughness are each equal to the total number of cards in all players' hands.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInAllHandsCount(), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CardsInAllHandsCount.instance, Duration.EndOfGame)));
}
public MultaniMaroSorcerer(final MultaniMaroSorcerer card) {
diff --git a/Mage.Sets/src/mage/cards/m/MycosynthFiend.java b/Mage.Sets/src/mage/cards/m/MycosynthFiend.java
index ddeaa5a4785..99d1ecdfb52 100644
--- a/Mage.Sets/src/mage/cards/m/MycosynthFiend.java
+++ b/Mage.Sets/src/mage/cards/m/MycosynthFiend.java
@@ -27,7 +27,7 @@ public final class MycosynthFiend extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(2);
- DynamicValue value = new OpponentsPoisonCountersCount();
+ DynamicValue value = OpponentsPoisonCountersCount.instance;
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(value, value, Duration.WhileOnBattlefield)));
}
diff --git a/Mage.Sets/src/mage/cards/n/NahirisWrath.java b/Mage.Sets/src/mage/cards/n/NahirisWrath.java
index 0d4a764c73c..3777758cfe7 100644
--- a/Mage.Sets/src/mage/cards/n/NahirisWrath.java
+++ b/Mage.Sets/src/mage/cards/n/NahirisWrath.java
@@ -34,7 +34,7 @@ public final class NahirisWrath extends CardImpl {
this.getSpellAbility().addCost(new NahirisWrathAdditionalCost());
// Nahiri's Wrath deals damage equal to the total converted mana cost of the discarded cards to each of up to X target creatures and/or planeswalkers.
- Effect effect = new DamageTargetEffect(new DiscardCostCardConvertedMana());
+ Effect effect = new DamageTargetEffect(DiscardCostCardConvertedMana.instance);
effect.setText("{this} deals damage equal to the total converted mana cost of the discarded cards to each of up to X target creatures and/or planeswalkers");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().setTargetAdjuster(NahirisWrathAdjuster.instance);
diff --git a/Mage.Sets/src/mage/cards/n/Necrologia.java b/Mage.Sets/src/mage/cards/n/Necrologia.java
index 1d35c3bebab..d1c3dc8a265 100644
--- a/Mage.Sets/src/mage/cards/n/Necrologia.java
+++ b/Mage.Sets/src/mage/cards/n/Necrologia.java
@@ -29,7 +29,7 @@ public final class Necrologia extends CardImpl {
this.getSpellAbility().addCost(new PayVariableLifeCost(true));
// Draw X cards.
- this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new GetXValue()));
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(GetXValue.instance));
}
public Necrologia(final Necrologia card) {
diff --git a/Mage.Sets/src/mage/cards/n/NecropolisFiend.java b/Mage.Sets/src/mage/cards/n/NecropolisFiend.java
index db6e9c26c82..e1b5a829d9b 100644
--- a/Mage.Sets/src/mage/cards/n/NecropolisFiend.java
+++ b/Mage.Sets/src/mage/cards/n/NecropolisFiend.java
@@ -53,7 +53,7 @@ public final class NecropolisFiend extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// {X}, {T}, Exile X cards from your graveyard: Target creature gets -X/-X until end of turn.
- DynamicValue xValue = new SignInversionDynamicValue(new ManacostVariableValue());
+ DynamicValue xValue = new SignInversionDynamicValue(ManacostVariableValue.instance);
Effect effect = new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn);
effect.setText("Target creature gets -X/-X until end of turn");
Ability ability = new SimpleActivatedAbility(
diff --git a/Mage.Sets/src/mage/cards/n/NightmarishEnd.java b/Mage.Sets/src/mage/cards/n/NightmarishEnd.java
index ccf1c13d351..c597bc8f7a2 100644
--- a/Mage.Sets/src/mage/cards/n/NightmarishEnd.java
+++ b/Mage.Sets/src/mage/cards/n/NightmarishEnd.java
@@ -24,7 +24,7 @@ public final class NightmarishEnd extends CardImpl {
// Target creature gets -X/-X until end of turn, where X is the number of cards in your hand.
- DynamicValue xValue = new SignInversionDynamicValue(new CardsInControllerHandCount());
+ DynamicValue xValue = new SignInversionDynamicValue(CardsInControllerHandCount.instance);
Effect effect = new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true);
effect.setText("Target creature gets -X/-X until end of turn, where X is the number of cards in your hand");
this.getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/cards/n/NostalgicDreams.java b/Mage.Sets/src/mage/cards/n/NostalgicDreams.java
index 5570440c6d3..a9d8eec1aef 100644
--- a/Mage.Sets/src/mage/cards/n/NostalgicDreams.java
+++ b/Mage.Sets/src/mage/cards/n/NostalgicDreams.java
@@ -55,7 +55,7 @@ enum NostalgicDreamsAdjuster implements TargetAdjuster {
public void adjustTargets(Ability ability, Game game) {
ability.getTargets().clear();
ability.addTarget(new TargetCardInYourGraveyard(
- new GetXValue().calculate(game, ability, null),
+ GetXValue.instance.calculate(game, ability, null),
StaticFilters.FILTER_CARD_FROM_YOUR_GRAVEYARD
));
}
diff --git a/Mage.Sets/src/mage/cards/n/NourishingShoal.java b/Mage.Sets/src/mage/cards/n/NourishingShoal.java
index f6459c10858..aa39d1d90fa 100644
--- a/Mage.Sets/src/mage/cards/n/NourishingShoal.java
+++ b/Mage.Sets/src/mage/cards/n/NourishingShoal.java
@@ -36,7 +36,7 @@ public final class NourishingShoal extends CardImpl {
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter), true)));
// You gain X life.
- this.getSpellAbility().addEffect(new GainLifeEffect(new ExileFromHandCostCardConvertedMana()));
+ this.getSpellAbility().addEffect(new GainLifeEffect(ExileFromHandCostCardConvertedMana.instance));
}
diff --git a/Mage.Sets/src/mage/cards/o/OboroEnvoy.java b/Mage.Sets/src/mage/cards/o/OboroEnvoy.java
index c4990fe881e..fa6d5891b0c 100644
--- a/Mage.Sets/src/mage/cards/o/OboroEnvoy.java
+++ b/Mage.Sets/src/mage/cards/o/OboroEnvoy.java
@@ -39,7 +39,7 @@ public final class OboroEnvoy extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// {2}, Return a land you control to its owner's hand: Target creature gets -X/-0 until end of turn, where X is the number of cards in your hand.
- Effect effect = new BoostTargetEffect(new SignInversionDynamicValue(new CardsInControllerHandCount()), new StaticValue(-0), Duration.EndOfTurn, true);
+ Effect effect = new BoostTargetEffect(new SignInversionDynamicValue(CardsInControllerHandCount.instance), new StaticValue(-0), Duration.EndOfTurn, true);
effect.setText("Target creature gets -X/-0 until end of turn, where X is the number of cards in your hand");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))));
diff --git a/Mage.Sets/src/mage/cards/o/OnwardVictory.java b/Mage.Sets/src/mage/cards/o/OnwardVictory.java
index 5d04b761f92..e5d5aa698d1 100644
--- a/Mage.Sets/src/mage/cards/o/OnwardVictory.java
+++ b/Mage.Sets/src/mage/cards/o/OnwardVictory.java
@@ -25,7 +25,7 @@ public final class OnwardVictory extends SplitCard {
// Onward
// Target creature gets +X/+0 until end of turn where X is its power.
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
- getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true));
+ getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true));
// to
// Victory
diff --git a/Mage.Sets/src/mage/cards/o/OracleOfNectars.java b/Mage.Sets/src/mage/cards/o/OracleOfNectars.java
index 0c8bd66cd1b..94f72f3ee72 100644
--- a/Mage.Sets/src/mage/cards/o/OracleOfNectars.java
+++ b/Mage.Sets/src/mage/cards/o/OracleOfNectars.java
@@ -30,7 +30,7 @@ public final class OracleOfNectars extends CardImpl {
this.toughness = new MageInt(2);
// {X}, {tap}: You gain X life.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(ManacostVariableValue.instance), new ManaCostsImpl("{X}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/o/OverbeingOfMyth.java b/Mage.Sets/src/mage/cards/o/OverbeingOfMyth.java
index c2b78462c69..6484e923032 100644
--- a/Mage.Sets/src/mage/cards/o/OverbeingOfMyth.java
+++ b/Mage.Sets/src/mage/cards/o/OverbeingOfMyth.java
@@ -33,7 +33,7 @@ public final class OverbeingOfMyth extends CardImpl {
this.toughness = new MageInt(0);
// Overbeing of Myth's power and toughness are each equal to the number of cards in your hand.
- DynamicValue number = new CardsInControllerHandCount();
+ DynamicValue number = CardsInControllerHandCount.instance;
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(number, Duration.EndOfGame)));
// At the beginning of your draw step, draw an additional card.
diff --git a/Mage.Sets/src/mage/cards/o/Overrule.java b/Mage.Sets/src/mage/cards/o/Overrule.java
index 19b922b8467..5f92d8fd352 100644
--- a/Mage.Sets/src/mage/cards/o/Overrule.java
+++ b/Mage.Sets/src/mage/cards/o/Overrule.java
@@ -20,11 +20,11 @@ public final class Overrule extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{W}{U}");
// Counter target spell unless its controller pays {X}.
- this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetSpell());
// You gain X life.
- this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new GainLifeEffect(ManacostVariableValue.instance));
}
public Overrule(final Overrule card) {
diff --git a/Mage.Sets/src/mage/cards/p/PainKami.java b/Mage.Sets/src/mage/cards/p/PainKami.java
index f682910a9b7..68c11d11539 100644
--- a/Mage.Sets/src/mage/cards/p/PainKami.java
+++ b/Mage.Sets/src/mage/cards/p/PainKami.java
@@ -28,7 +28,7 @@ public final class PainKami extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(2);
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{R}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.instance), new ManaCostsImpl("{X}{R}"));
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/p/Painbringer.java b/Mage.Sets/src/mage/cards/p/Painbringer.java
index 02af94d9bc2..bc415a2ba1a 100644
--- a/Mage.Sets/src/mage/cards/p/Painbringer.java
+++ b/Mage.Sets/src/mage/cards/p/Painbringer.java
@@ -35,7 +35,7 @@ public final class Painbringer extends CardImpl {
this.toughness = new MageInt(1);
// {tap}, Exile any number of cards from your graveyard: Target creature gets -X/-X until end of turn, where X is the number of cards exiled this way.
- DynamicValue X = new SignInversionDynamicValue(new GetXValue());
+ DynamicValue X = new SignInversionDynamicValue(GetXValue.instance);
Effect effect = new BoostTargetEffect(X, X, Duration.EndOfTurn);
effect.setText("Target creature gets -X/-X until end of turn, where X is the number of cards exiled this way");
Ability ability = new SimpleActivatedAbility(effect, new TapSourceCost());
diff --git a/Mage.Sets/src/mage/cards/p/Panacea.java b/Mage.Sets/src/mage/cards/p/Panacea.java
index 70de0178e61..099c2d61c00 100644
--- a/Mage.Sets/src/mage/cards/p/Panacea.java
+++ b/Mage.Sets/src/mage/cards/p/Panacea.java
@@ -25,7 +25,7 @@ public final class Panacea extends CardImpl {
// {X}{X}, {tap}: Prevent the next X damage that would be dealt to any target this turn.
Ability ability = new SimpleActivatedAbility(
- new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue()),
+ new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, ManacostVariableValue.instance),
new ManaCostsImpl("{X}{X}")
);
ability.addCost(new TapSourceCost());
diff --git a/Mage.Sets/src/mage/cards/p/PeemaAetherSeer.java b/Mage.Sets/src/mage/cards/p/PeemaAetherSeer.java
index 4d87ffe9848..84b1f2598e8 100644
--- a/Mage.Sets/src/mage/cards/p/PeemaAetherSeer.java
+++ b/Mage.Sets/src/mage/cards/p/PeemaAetherSeer.java
@@ -34,7 +34,7 @@ public final class PeemaAetherSeer extends CardImpl {
this.toughness = new MageInt(2);
// When Peema Aether-Seer enters the battlefield, you get an amount of {E} equal to the greatest power among creatures you control.
- Effect effect = new GetEnergyCountersControllerEffect(new GreatestPowerAmongControlledCreaturesValue());
+ Effect effect = new GetEnergyCountersControllerEffect(GreatestPowerAmongControlledCreaturesValue.instance);
effect.setText("you get an amount of {E} equal to the greatest power among creatures you control");
this.addAbility(new EntersBattlefieldTriggeredAbility(effect));
diff --git a/Mage.Sets/src/mage/cards/p/PetalmaneBaku.java b/Mage.Sets/src/mage/cards/p/PetalmaneBaku.java
index 85812a645e7..167b6d2ba11 100644
--- a/Mage.Sets/src/mage/cards/p/PetalmaneBaku.java
+++ b/Mage.Sets/src/mage/cards/p/PetalmaneBaku.java
@@ -37,7 +37,7 @@ public final class PetalmaneBaku extends CardImpl {
// {1}, Remove X ki counters from Petalmane Baku: Add X mana of any one color.
Ability ability = new DynamicManaAbility(
new Mana(0, 0, 0, 0, 0, 0, 1, 0),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new ManaCostsImpl<>("{1}"),
"Add X mana of any one color",
true, new CountersSourceCount(CounterType.KI));
diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianSwarmlord.java b/Mage.Sets/src/mage/cards/p/PhyrexianSwarmlord.java
index 4f2f1f4e2dc..3dd4288d02e 100644
--- a/Mage.Sets/src/mage/cards/p/PhyrexianSwarmlord.java
+++ b/Mage.Sets/src/mage/cards/p/PhyrexianSwarmlord.java
@@ -30,7 +30,7 @@ public final class PhyrexianSwarmlord extends CardImpl {
this.addAbility(InfectAbility.getInstance());
this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep",
- new CreateTokenEffect(new InsectInfectToken(), new OpponentsPoisonCountersCount())));
+ new CreateTokenEffect(new InsectInfectToken(), OpponentsPoisonCountersCount.instance)));
}
public PhyrexianSwarmlord(final PhyrexianSwarmlord card) {
diff --git a/Mage.Sets/src/mage/cards/p/PresenceOfTheWise.java b/Mage.Sets/src/mage/cards/p/PresenceOfTheWise.java
index 0129a82eb5f..7c7037e939f 100644
--- a/Mage.Sets/src/mage/cards/p/PresenceOfTheWise.java
+++ b/Mage.Sets/src/mage/cards/p/PresenceOfTheWise.java
@@ -20,7 +20,7 @@ public final class PresenceOfTheWise extends CardImpl {
// You gain 2 life for each card in your hand.
this.getSpellAbility().addEffect(new GainLifeEffect(
- new MultipliedValue(new CardsInControllerHandCount(), 2),"You gain 2 life for each card in your hand"));
+ new MultipliedValue(CardsInControllerHandCount.instance, 2),"You gain 2 life for each card in your hand"));
}
public PresenceOfTheWise(final PresenceOfTheWise card) {
diff --git a/Mage.Sets/src/mage/cards/p/ProfaneCommand.java b/Mage.Sets/src/mage/cards/p/ProfaneCommand.java
index 769dbf2bbfb..9e9b5172f90 100644
--- a/Mage.Sets/src/mage/cards/p/ProfaneCommand.java
+++ b/Mage.Sets/src/mage/cards/p/ProfaneCommand.java
@@ -38,7 +38,7 @@ public final class ProfaneCommand extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{B}");
- DynamicValue xValue = new ManacostVariableValue();
+ DynamicValue xValue = ManacostVariableValue.instance;
// Choose two -
this.getSpellAbility().getModes().setMinModes(2);
this.getSpellAbility().getModes().setMaxModes(2);
diff --git a/Mage.Sets/src/mage/cards/p/Prosperity.java b/Mage.Sets/src/mage/cards/p/Prosperity.java
index edb928d7bc5..17d84d0b325 100644
--- a/Mage.Sets/src/mage/cards/p/Prosperity.java
+++ b/Mage.Sets/src/mage/cards/p/Prosperity.java
@@ -19,7 +19,7 @@ public final class Prosperity extends CardImpl {
// Each player draws X cards.
- this.getSpellAbility().addEffect(new DrawCardAllEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DrawCardAllEffect(ManacostVariableValue.instance));
}
public Prosperity(final Prosperity card) {
diff --git a/Mage.Sets/src/mage/cards/p/ProsshSkyraiderOfKher.java b/Mage.Sets/src/mage/cards/p/ProsshSkyraiderOfKher.java
index 3b3e48838b3..bc9badb09fe 100644
--- a/Mage.Sets/src/mage/cards/p/ProsshSkyraiderOfKher.java
+++ b/Mage.Sets/src/mage/cards/p/ProsshSkyraiderOfKher.java
@@ -38,7 +38,7 @@ public final class ProsshSkyraiderOfKher extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// When you cast Prossh, Skyraider of Kher, create X 0/1 red Kobold creature tokens named Kobolds of Kher Keep, where X is the amount of mana spent to cast Prossh.
- this.addAbility(new CastSourceTriggeredAbility(new CreateTokenEffect(new ProsshKoboldToken(), new ManaSpentToCastCount()), false));
+ this.addAbility(new CastSourceTriggeredAbility(new CreateTokenEffect(new ProsshKoboldToken(), ManaSpentToCastCount.instance), false));
// Sacrifice another creature: Prossh gets +1/+0 until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true))));
diff --git a/Mage.Sets/src/mage/cards/p/PsychicDrain.java b/Mage.Sets/src/mage/cards/p/PsychicDrain.java
index 6deb03654bf..8008a2e7fb3 100644
--- a/Mage.Sets/src/mage/cards/p/PsychicDrain.java
+++ b/Mage.Sets/src/mage/cards/p/PsychicDrain.java
@@ -21,9 +21,9 @@ public final class PsychicDrain extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{U}{B}");
// Target player puts the top X cards of their library into their graveyard and you gain X life.
- this.getSpellAbility().addEffect(new PutLibraryIntoGraveTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new PutLibraryIntoGraveTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetPlayer());
- Effect effect = new GainLifeEffect(new ManacostVariableValue());
+ Effect effect = new GainLifeEffect(ManacostVariableValue.instance);
effect.setText("and you gain X life");
this.getSpellAbility().addEffect(effect);
}
diff --git a/Mage.Sets/src/mage/cards/p/PsychosisCrawler.java b/Mage.Sets/src/mage/cards/p/PsychosisCrawler.java
index 9df5371fa95..74128f25f30 100644
--- a/Mage.Sets/src/mage/cards/p/PsychosisCrawler.java
+++ b/Mage.Sets/src/mage/cards/p/PsychosisCrawler.java
@@ -28,7 +28,7 @@ public final class PsychosisCrawler extends CardImpl {
this.power = new MageInt(0);
this.toughness = new MageInt(0);
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInControllerHandCount(), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CardsInControllerHandCount.instance, Duration.EndOfGame)));
this.addAbility(new DrawCardControllerTriggeredAbility(new LoseLifeOpponentsEffect(1), false));
}
diff --git a/Mage.Sets/src/mage/cards/p/PullFromTomorrow.java b/Mage.Sets/src/mage/cards/p/PullFromTomorrow.java
index 2a2760fdebb..bc190746707 100644
--- a/Mage.Sets/src/mage/cards/p/PullFromTomorrow.java
+++ b/Mage.Sets/src/mage/cards/p/PullFromTomorrow.java
@@ -20,7 +20,7 @@ public final class PullFromTomorrow extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}{U}");
// Draw X cards, then discard a card.
- getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new ManacostVariableValue()));
+ getSpellAbility().addEffect(new DrawCardSourceControllerEffect(ManacostVariableValue.instance));
Effect effect = new DiscardControllerEffect(1);
effect.setText(", then discard a card");
getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/cards/p/Pyromancy.java b/Mage.Sets/src/mage/cards/p/Pyromancy.java
index b1d4d0a3cfb..4cc770be5a9 100644
--- a/Mage.Sets/src/mage/cards/p/Pyromancy.java
+++ b/Mage.Sets/src/mage/cards/p/Pyromancy.java
@@ -25,7 +25,7 @@ public final class Pyromancy extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}");
// {3}, Discard a card at random: Pyromancy deals damage to any target equal to the converted mana cost of the discarded card.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new DiscardCostCardConvertedMana()), new ManaCostsImpl("{3}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(DiscardCostCardConvertedMana.instance), new ManaCostsImpl("{3}"));
ability.addTarget(new TargetAnyTarget());
ability.addCost(new DiscardCardCost(true));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/q/QuagVampires.java b/Mage.Sets/src/mage/cards/q/QuagVampires.java
index 4cd03cf178e..ebea1544997 100644
--- a/Mage.Sets/src/mage/cards/q/QuagVampires.java
+++ b/Mage.Sets/src/mage/cards/q/QuagVampires.java
@@ -36,7 +36,7 @@ public final class QuagVampires extends CardImpl {
// Quag Vampires enters the battlefield with a +1/+1 counter on it for each time it was kicked.
this.addAbility(new EntersBattlefieldAbility(
- new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new MultikickerCount(), true),
+ new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), MultikickerCount.instance, true),
"with a +1/+1 counter on it for each time it was kicked"));
}
diff --git a/Mage.Sets/src/mage/cards/r/RakdossReturn.java b/Mage.Sets/src/mage/cards/r/RakdossReturn.java
index 5d9276caf36..a24d77837ed 100644
--- a/Mage.Sets/src/mage/cards/r/RakdossReturn.java
+++ b/Mage.Sets/src/mage/cards/r/RakdossReturn.java
@@ -28,7 +28,7 @@ public final class RakdossReturn extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{R}");
// Rakdos's Return deals X damage to target opponent or planeswalker. That player or that planeswalker’s controller discards X cards.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addEffect(new RakdossReturnEffect());
this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker());
}
@@ -65,7 +65,7 @@ class RakdossReturnEffect extends OneShotEffect {
if (player == null) {
return false;
}
- Effect effect = new DiscardTargetEffect(new ManacostVariableValue());
+ Effect effect = new DiscardTargetEffect(ManacostVariableValue.instance);
effect.setTargetPointer(new FixedTarget(player.getId(), game));
return effect.apply(game, source);
}
diff --git a/Mage.Sets/src/mage/cards/r/RalsStaticaster.java b/Mage.Sets/src/mage/cards/r/RalsStaticaster.java
index d5b83f25404..87de152208a 100644
--- a/Mage.Sets/src/mage/cards/r/RalsStaticaster.java
+++ b/Mage.Sets/src/mage/cards/r/RalsStaticaster.java
@@ -48,7 +48,7 @@ public final class RalsStaticaster extends CardImpl {
// Whenever Ral's Staticaster attacks, if you control a Ral planeswalker, Ral's Staticaster gets +1/+0 for each card in your hand until end of turn.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new AttacksTriggeredAbility(new BoostSourceEffect(
- new CardsInControllerHandCount(), new StaticValue(0),
+ CardsInControllerHandCount.instance, new StaticValue(0),
Duration.EndOfTurn, true), false),
new PermanentsOnTheBattlefieldCondition(filter),
"Whenever {this} attacks, if you control a Ral planeswalker, "
diff --git a/Mage.Sets/src/mage/cards/r/RashidaScalebane.java b/Mage.Sets/src/mage/cards/r/RashidaScalebane.java
index 2e690465339..af3c5daf3d0 100644
--- a/Mage.Sets/src/mage/cards/r/RashidaScalebane.java
+++ b/Mage.Sets/src/mage/cards/r/RashidaScalebane.java
@@ -46,7 +46,7 @@ public final class RashidaScalebane extends CardImpl {
// {tap}: Destroy target attacking or blocking Dragon. It can't be regenerated. You gain life equal to its power.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(true), new TapSourceCost());
- Effect effect = new GainLifeEffect(new TargetPermanentPowerCount());
+ Effect effect = new GainLifeEffect(TargetPermanentPowerCount.instance);
effect.setText("You gain life equal to its power");
ability.addEffect(effect);
ability.addTarget(new TargetCreaturePermanent(filter));
diff --git a/Mage.Sets/src/mage/cards/r/RavagingBlaze.java b/Mage.Sets/src/mage/cards/r/RavagingBlaze.java
index 6a85da01800..4b8f4e7f45d 100644
--- a/Mage.Sets/src/mage/cards/r/RavagingBlaze.java
+++ b/Mage.Sets/src/mage/cards/r/RavagingBlaze.java
@@ -22,10 +22,10 @@ public final class RavagingBlaze extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{R}{R}");
// Ravaging Blaze deals X damage to target creature.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Ravaging Blaze also deals X damage to that creature's controller.
- this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetControllerEffect(new ManacostVariableValue()),
+ this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetControllerEffect(ManacostVariableValue.instance),
SpellMasteryCondition.instance, "
Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Ravaging Blaze also deals X damage to that creature's controller."));
}
diff --git a/Mage.Sets/src/mage/cards/r/RealmSeekers.java b/Mage.Sets/src/mage/cards/r/RealmSeekers.java
index 283fff9287d..5ac43f2142f 100644
--- a/Mage.Sets/src/mage/cards/r/RealmSeekers.java
+++ b/Mage.Sets/src/mage/cards/r/RealmSeekers.java
@@ -37,7 +37,7 @@ public final class RealmSeekers extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(
CounterType.P1P1.createInstance(),
- new CardsInAllHandsCount(),
+ CardsInAllHandsCount.instance,
false),
"with X +1/+1 counters on it, where X is the total number of cards in all players' hands"));
diff --git a/Mage.Sets/src/mage/cards/r/Reanimate.java b/Mage.Sets/src/mage/cards/r/Reanimate.java
index 3a70eaa36e0..d91e2ad3e44 100644
--- a/Mage.Sets/src/mage/cards/r/Reanimate.java
+++ b/Mage.Sets/src/mage/cards/r/Reanimate.java
@@ -25,7 +25,7 @@ public final class Reanimate extends CardImpl {
// Put target creature card from a graveyard onto the battlefield under your control. You lose life equal to its converted mana cost.
getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard")));
getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
- Effect effect = new LoseLifeSourceControllerEffect(new TargetConvertedManaCost());
+ Effect effect = new LoseLifeSourceControllerEffect(TargetConvertedManaCost.instance);
effect.setText("You lose life equal to its converted mana cost");
getSpellAbility().addEffect(effect);
}
diff --git a/Mage.Sets/src/mage/cards/r/RedManaBattery.java b/Mage.Sets/src/mage/cards/r/RedManaBattery.java
index 461a4664e3e..1281c0d257b 100644
--- a/Mage.Sets/src/mage/cards/r/RedManaBattery.java
+++ b/Mage.Sets/src/mage/cards/r/RedManaBattery.java
@@ -36,7 +36,7 @@ public final class RedManaBattery extends CardImpl {
// {tap}, Remove any number of charge counters from Red Mana Battery: Add {R}, then add an additional {R} for each charge counter removed this way.
ability = new DynamicManaAbility(
Mana.RedMana(1),
- new IntPlusDynamicValue(1, new RemovedCountersForCostValue()),
+ new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance),
new TapSourceCost(),
"Add {R}, then add {R} for each charge counter removed this way",
true, new CountersSourceCount(CounterType.CHARGE));
diff --git a/Mage.Sets/src/mage/cards/r/RedSunsZenith.java b/Mage.Sets/src/mage/cards/r/RedSunsZenith.java
index a95deffc582..9d39917e0ce 100644
--- a/Mage.Sets/src/mage/cards/r/RedSunsZenith.java
+++ b/Mage.Sets/src/mage/cards/r/RedSunsZenith.java
@@ -26,7 +26,7 @@ public final class RedSunsZenith extends CardImpl {
// If a creature dealt damage this way would die this turn, exile it instead.
// Shuffle Red Sun's Zenith into its owner's library.
this.getSpellAbility().addTarget(new TargetAnyTarget());
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn));
this.getSpellAbility().addEffect(ShuffleSpellEffect.getInstance());
this.getSpellAbility().addWatcher(new DamagedByWatcher());
diff --git a/Mage.Sets/src/mage/cards/r/ReleaseTheGremlins.java b/Mage.Sets/src/mage/cards/r/ReleaseTheGremlins.java
index a176fbb338e..eee1db14278 100644
--- a/Mage.Sets/src/mage/cards/r/ReleaseTheGremlins.java
+++ b/Mage.Sets/src/mage/cards/r/ReleaseTheGremlins.java
@@ -28,7 +28,7 @@ public final class ReleaseTheGremlins extends CardImpl {
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
// Create X 2/2 red Gremlin creature tokens.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new GremlinToken(), new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new GremlinToken(), ManacostVariableValue.instance));
this.getSpellAbility().setTargetAdjuster(ReleaseTheGremlinsAdjuster.instance);
}
diff --git a/Mage.Sets/src/mage/cards/r/RetributionOfTheAncients.java b/Mage.Sets/src/mage/cards/r/RetributionOfTheAncients.java
index ce921ada409..42aab39e6f4 100644
--- a/Mage.Sets/src/mage/cards/r/RetributionOfTheAncients.java
+++ b/Mage.Sets/src/mage/cards/r/RetributionOfTheAncients.java
@@ -36,7 +36,7 @@ public final class RetributionOfTheAncients extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}");
- DynamicValue xValue = new SignInversionDynamicValue(new GetXValue());
+ DynamicValue xValue = new SignInversionDynamicValue(GetXValue.instance);
// {B}, Remove X +1/+1 counters from among creatures you control: Target creature gets -X/-X until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(xValue,xValue,Duration.EndOfTurn, true), new ManaCostsImpl("{B}"));
ability.addCost(new RemoveVariableCountersTargetCost(filter, CounterType.P1P1, "X", 0));
diff --git a/Mage.Sets/src/mage/cards/r/RishkarsExpertise.java b/Mage.Sets/src/mage/cards/r/RishkarsExpertise.java
index 35ff9c2d529..4dd55e8cdc5 100644
--- a/Mage.Sets/src/mage/cards/r/RishkarsExpertise.java
+++ b/Mage.Sets/src/mage/cards/r/RishkarsExpertise.java
@@ -19,7 +19,7 @@ public final class RishkarsExpertise extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}{G}");
// Draw cards equal to the greatest power among creatures you control.
- Effect effect = new DrawCardSourceControllerEffect(new GreatestPowerAmongControlledCreaturesValue());
+ Effect effect = new DrawCardSourceControllerEffect(GreatestPowerAmongControlledCreaturesValue.instance);
effect.setText("Draw cards equal to the greatest power among creatures you control");
this.getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/cards/r/RockSlide.java b/Mage.Sets/src/mage/cards/r/RockSlide.java
index c0ab5600718..fe4a7869d98 100644
--- a/Mage.Sets/src/mage/cards/r/RockSlide.java
+++ b/Mage.Sets/src/mage/cards/r/RockSlide.java
@@ -36,7 +36,7 @@ public final class RockSlide extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{R}");
// Rock Slide deals X damage divided as you choose among any number of target attacking or blocking creatures without flying.
- DynamicValue xValue = new ManacostVariableValue();
+ DynamicValue xValue = ManacostVariableValue.instance;
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(xValue, filter));
}
diff --git a/Mage.Sets/src/mage/cards/r/RollingEarthquake.java b/Mage.Sets/src/mage/cards/r/RollingEarthquake.java
index 005778c3c55..5e201d51401 100644
--- a/Mage.Sets/src/mage/cards/r/RollingEarthquake.java
+++ b/Mage.Sets/src/mage/cards/r/RollingEarthquake.java
@@ -29,7 +29,7 @@ public final class RollingEarthquake extends CardImpl {
// Rolling Earthquake deals X damage to each creature without horsemanship and each player.
- this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter));
+ this.getSpellAbility().addEffect(new DamageEverythingEffect(ManacostVariableValue.instance, filter));
}
public RollingEarthquake(final RollingEarthquake card) {
diff --git a/Mage.Sets/src/mage/cards/r/RollingThunder.java b/Mage.Sets/src/mage/cards/r/RollingThunder.java
index b4b7e696ffb..696e3ed0f68 100644
--- a/Mage.Sets/src/mage/cards/r/RollingThunder.java
+++ b/Mage.Sets/src/mage/cards/r/RollingThunder.java
@@ -20,7 +20,7 @@ public final class RollingThunder extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}{R}");
// Rolling Thunder deals X damage divided as you choose among any number of target creatures and/or players.
- DynamicValue xValue = new ManacostVariableValue();
+ DynamicValue xValue = ManacostVariableValue.instance;
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue));
}
diff --git a/Mage.Sets/src/mage/cards/r/RotHulk.java b/Mage.Sets/src/mage/cards/r/RotHulk.java
index 152f27ddcac..81b82e55263 100644
--- a/Mage.Sets/src/mage/cards/r/RotHulk.java
+++ b/Mage.Sets/src/mage/cards/r/RotHulk.java
@@ -55,7 +55,7 @@ public final class RotHulk extends CardImpl {
// up to X target Zombie cards from your graveyard
// X is the number of opponents you have.
ability.getTargets().clear();
- int numbTargets = new OpponentsCount().calculate(game, ability, null);
+ int numbTargets = OpponentsCount.instance.calculate(game, ability, null);
ability.addTarget(new TargetCardInYourGraveyard(0, numbTargets, filterZombie));
}
}
diff --git a/Mage.Sets/src/mage/cards/r/RushOfBlood.java b/Mage.Sets/src/mage/cards/r/RushOfBlood.java
index 3a1b06858ce..09daee68f03 100644
--- a/Mage.Sets/src/mage/cards/r/RushOfBlood.java
+++ b/Mage.Sets/src/mage/cards/r/RushOfBlood.java
@@ -22,7 +22,7 @@ public final class RushOfBlood extends CardImpl {
// Target creature gets +X/+0 until end of turn, where X is its power.
- this.getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new BoostTargetEffect(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/r/RushwoodGrove.java b/Mage.Sets/src/mage/cards/r/RushwoodGrove.java
index 670f8b8f6b1..604f7383f53 100644
--- a/Mage.Sets/src/mage/cards/r/RushwoodGrove.java
+++ b/Mage.Sets/src/mage/cards/r/RushwoodGrove.java
@@ -34,7 +34,7 @@ public final class RushwoodGrove extends CardImpl {
// {T}, Remove any number of storage counters from Rushwood Grove: Add {G} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.GreenMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {G} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java b/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java
index dcecae03c61..159e756f99b 100644
--- a/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java
+++ b/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java
@@ -43,7 +43,7 @@ public final class SageOfAncientLore extends CardImpl {
this.secondSideCardClazz = mage.cards.w.WerewolfOfAncientHunger.class;
// Sage of Ancient Lore's power and toughness are each equal to the number of cards in your hand.
- DynamicValue xValue = new CardsInControllerHandCount();
+ DynamicValue xValue = CardsInControllerHandCount.instance;
this.addAbility(new SimpleStaticAbility(Zone.ALL,
new ConditionalContinuousEffect(new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame),
new TransformedCondition(true), "{this}'s power and toughness are each equal to the total number of cards in your hand")));
diff --git a/Mage.Sets/src/mage/cards/s/SaltcrustedSteppe.java b/Mage.Sets/src/mage/cards/s/SaltcrustedSteppe.java
index 8bc8e64d083..9b20de817dc 100644
--- a/Mage.Sets/src/mage/cards/s/SaltcrustedSteppe.java
+++ b/Mage.Sets/src/mage/cards/s/SaltcrustedSteppe.java
@@ -36,7 +36,7 @@ public final class SaltcrustedSteppe extends CardImpl {
this.addAbility(ability);
// {1}, Remove X storage counters from Saltcrusted Steppe: Add X mana in any combination of {G} and/or {W}.
ability = new SimpleManaAbility(Zone.BATTLEFIELD,
- new AddManaInAnyCombinationEffect(new RemovedCountersForCostValue(), ColoredManaSymbol.G, ColoredManaSymbol.W),
+ new AddManaInAnyCombinationEffect(RemovedCountersForCostValue.instance, ColoredManaSymbol.G, ColoredManaSymbol.W),
new GenericManaCost(1));
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance()));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/s/SanctumOfTheSun.java b/Mage.Sets/src/mage/cards/s/SanctumOfTheSun.java
index 46269e831e2..0a8238c866c 100644
--- a/Mage.Sets/src/mage/cards/s/SanctumOfTheSun.java
+++ b/Mage.Sets/src/mage/cards/s/SanctumOfTheSun.java
@@ -32,7 +32,7 @@ public final class SanctumOfTheSun extends CardImpl {
new InfoEffect("(Transforms from Azor's Gateway.)")).setRuleAtTheTop(true));
// {T}: Add X mana of any one color, where X is your life total.
- this.addAbility(new DynamicManaAbility(new Mana(0, 0, 0, 0, 0, 0, 1, 0), new ControllerLifeCount(), new TapSourceCost(),
+ this.addAbility(new DynamicManaAbility(new Mana(0, 0, 0, 0, 0, 0, 1, 0), ControllerLifeCount.instance, new TapSourceCost(),
"Add X mana of any one color, where X is is your life total", true));
}
diff --git a/Mage.Sets/src/mage/cards/s/SandSilos.java b/Mage.Sets/src/mage/cards/s/SandSilos.java
index 360ca7ffc87..61b800e3bd9 100644
--- a/Mage.Sets/src/mage/cards/s/SandSilos.java
+++ b/Mage.Sets/src/mage/cards/s/SandSilos.java
@@ -44,7 +44,7 @@ public final class SandSilos extends CardImpl {
// {tap}, Remove any number of storage counters from Sand Silos: Add {U} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.BlueMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {U} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/s/SandsOfDelirium.java b/Mage.Sets/src/mage/cards/s/SandsOfDelirium.java
index cbbb1c6011b..f10c51c2bff 100644
--- a/Mage.Sets/src/mage/cards/s/SandsOfDelirium.java
+++ b/Mage.Sets/src/mage/cards/s/SandsOfDelirium.java
@@ -25,7 +25,7 @@ public final class SandsOfDelirium extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
// {X}, {tap}: Target player puts the top X cards of their library into their graveyard.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(new ManacostVariableValue()), new VariableManaCost());
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(ManacostVariableValue.instance), new VariableManaCost());
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/s/SaprazzanCove.java b/Mage.Sets/src/mage/cards/s/SaprazzanCove.java
index 9f1c510d2a7..5806b041e15 100644
--- a/Mage.Sets/src/mage/cards/s/SaprazzanCove.java
+++ b/Mage.Sets/src/mage/cards/s/SaprazzanCove.java
@@ -34,7 +34,7 @@ public final class SaprazzanCove extends CardImpl {
// {tap}, Remove any number of storage counters from Saprazzan Cove: Add {U} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.BlueMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {U} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/s/SavageTwister.java b/Mage.Sets/src/mage/cards/s/SavageTwister.java
index 26acebbd855..0b9090439b0 100644
--- a/Mage.Sets/src/mage/cards/s/SavageTwister.java
+++ b/Mage.Sets/src/mage/cards/s/SavageTwister.java
@@ -20,7 +20,7 @@ public final class SavageTwister extends CardImpl {
// Savage Twister deals X damage to each creature.
- this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent()));
+ this.getSpellAbility().addEffect(new DamageAllEffect(ManacostVariableValue.instance, new FilterCreaturePermanent()));
}
public SavageTwister(final SavageTwister card) {
diff --git a/Mage.Sets/src/mage/cards/s/ScavengingGhoul.java b/Mage.Sets/src/mage/cards/s/ScavengingGhoul.java
index 103d57b3604..d71e11b07bf 100644
--- a/Mage.Sets/src/mage/cards/s/ScavengingGhoul.java
+++ b/Mage.Sets/src/mage/cards/s/ScavengingGhoul.java
@@ -32,7 +32,7 @@ public final class ScavengingGhoul extends CardImpl {
// At the beginning of each end step, put a corpse counter on Scavenging Ghoul for each creature that died this turn.
this.addAbility(new BeginningOfEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.CORPSE.createInstance(),
- new CreaturesDiedThisTurnCount(), true), TargetController.ANY, false), new CreaturesDiedWatcher());
+ CreaturesDiedThisTurnCount.instance, true), TargetController.ANY, false), new CreaturesDiedWatcher());
// Remove a corpse counter from Scavenging Ghoul: Regenerate Scavenging Ghoul.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(),
new RemoveCountersSourceCost(CounterType.CORPSE.createInstance())));
diff --git a/Mage.Sets/src/mage/cards/s/SecureTheWastes.java b/Mage.Sets/src/mage/cards/s/SecureTheWastes.java
index 8d8e83e6750..2540f72bbeb 100644
--- a/Mage.Sets/src/mage/cards/s/SecureTheWastes.java
+++ b/Mage.Sets/src/mage/cards/s/SecureTheWastes.java
@@ -19,7 +19,7 @@ public final class SecureTheWastes extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{W}");
// create X 1/1 white Warrior creature tokens.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new WarriorToken(), new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new WarriorToken(), ManacostVariableValue.instance));
}
public SecureTheWastes(final SecureTheWastes card) {
diff --git a/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java b/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java
index 7ef32df750e..3516ba3642e 100644
--- a/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java
+++ b/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java
@@ -54,7 +54,7 @@ public final class SelvalaHeartOfTheWilds extends CardImpl {
// {G}, {T}: Add X mana in any combination of colors, where X is the greatest power among creatures you control.
ManaEffect manaEffect = new AddManaInAnyCombinationEffect(
- new GreatestPowerAmongControlledCreaturesValue(), rule2,
+ GreatestPowerAmongControlledCreaturesValue.instance, rule2,
ColoredManaSymbol.B, ColoredManaSymbol.U, ColoredManaSymbol.R, ColoredManaSymbol.W, ColoredManaSymbol.G);
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, manaEffect, new ManaCostsImpl("{G}"));
ability.addCost(new TapSourceCost());
diff --git a/Mage.Sets/src/mage/cards/s/SereneOffering.java b/Mage.Sets/src/mage/cards/s/SereneOffering.java
index b8a0060a5aa..09a48a3deb8 100644
--- a/Mage.Sets/src/mage/cards/s/SereneOffering.java
+++ b/Mage.Sets/src/mage/cards/s/SereneOffering.java
@@ -22,7 +22,7 @@ public final class SereneOffering extends CardImpl {
// Destroy target enchantment. You gain life equal to its converted mana cost.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
- Effect effect = new GainLifeEffect(new TargetConvertedManaCost());
+ Effect effect = new GainLifeEffect(TargetConvertedManaCost.instance);
effect.setText("You gain life equal to its converted mana cost");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent());
diff --git a/Mage.Sets/src/mage/cards/s/SerraAvatar.java b/Mage.Sets/src/mage/cards/s/SerraAvatar.java
index 49680a7cc62..9fb4458a34c 100644
--- a/Mage.Sets/src/mage/cards/s/SerraAvatar.java
+++ b/Mage.Sets/src/mage/cards/s/SerraAvatar.java
@@ -29,7 +29,7 @@ public final class SerraAvatar extends CardImpl {
this.toughness = new MageInt(0);
// Serra Avatar's power and toughness are each equal to your life total.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new ControllerLifeCount(), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(ControllerLifeCount.instance, Duration.EndOfGame)));
// When Serra Avatar is put into a graveyard from anywhere, shuffle it into its owner's library.
this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new ShuffleIntoLibrarySourceEffect()));
diff --git a/Mage.Sets/src/mage/cards/s/SeveredStrands.java b/Mage.Sets/src/mage/cards/s/SeveredStrands.java
index a0e7278361b..523aedf125e 100644
--- a/Mage.Sets/src/mage/cards/s/SeveredStrands.java
+++ b/Mage.Sets/src/mage/cards/s/SeveredStrands.java
@@ -26,7 +26,7 @@ public final class SeveredStrands extends CardImpl {
// You gain life equal to the sacrificed creature's toughness. Destroy target creature an opponent controls.
this.getSpellAbility().addEffect(new GainLifeEffect(
- new SacrificeCostCreaturesToughness(),
+ SacrificeCostCreaturesToughness.instance,
"You gain life equal to the "
+ "sacrificed creature's toughness."
));
diff --git a/Mage.Sets/src/mage/cards/s/ShatteredCrypt.java b/Mage.Sets/src/mage/cards/s/ShatteredCrypt.java
index 90425abc247..7ce9d8e1525 100644
--- a/Mage.Sets/src/mage/cards/s/ShatteredCrypt.java
+++ b/Mage.Sets/src/mage/cards/s/ShatteredCrypt.java
@@ -29,7 +29,7 @@ public final class ShatteredCrypt extends CardImpl {
Effect effect = new ReturnFromGraveyardToHandTargetEffect();
effect.setText("Return X target creature cards from your graveyard to your hand");
this.getSpellAbility().addEffect(effect);
- this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(ManacostVariableValue.instance));
this.getSpellAbility().setTargetAdjuster(ShatteredCryptAdjuster.instance);
}
diff --git a/Mage.Sets/src/mage/cards/s/ShiningShoal.java b/Mage.Sets/src/mage/cards/s/ShiningShoal.java
index 79ad6ea8bfb..f4d8b7a9082 100644
--- a/Mage.Sets/src/mage/cards/s/ShiningShoal.java
+++ b/Mage.Sets/src/mage/cards/s/ShiningShoal.java
@@ -44,7 +44,7 @@ public final class ShiningShoal extends CardImpl {
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter), true)));
// The next X damage that a source of your choice would deal to you and/or creatures you control this turn is dealt to any target instead.
- this.getSpellAbility().addEffect(new ShiningShoalRedirectDamageTargetEffect(Duration.EndOfTurn, new ExileFromHandCostCardConvertedMana()));
+ this.getSpellAbility().addEffect(new ShiningShoalRedirectDamageTargetEffect(Duration.EndOfTurn, ExileFromHandCostCardConvertedMana.instance));
this.getSpellAbility().addTarget(new TargetSource());
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
diff --git a/Mage.Sets/src/mage/cards/s/SickeningDreams.java b/Mage.Sets/src/mage/cards/s/SickeningDreams.java
index ba51c255802..3a74c9e7eec 100644
--- a/Mage.Sets/src/mage/cards/s/SickeningDreams.java
+++ b/Mage.Sets/src/mage/cards/s/SickeningDreams.java
@@ -30,7 +30,7 @@ public final class SickeningDreams extends CardImpl {
this.getSpellAbility().addCost(new SickeningDreamsAdditionalCost());
// Sickening Dreams deals X damage to each creature and each player.
- this.getSpellAbility().addEffect(new DamageEverythingEffect(new GetXValue(), new FilterCreaturePermanent()));
+ this.getSpellAbility().addEffect(new DamageEverythingEffect(GetXValue.instance, new FilterCreaturePermanent()));
}
public SickeningDreams(final SickeningDreams card) {
diff --git a/Mage.Sets/src/mage/cards/s/SickeningShoal.java b/Mage.Sets/src/mage/cards/s/SickeningShoal.java
index 32b4fb3587f..5bec8f2fe76 100644
--- a/Mage.Sets/src/mage/cards/s/SickeningShoal.java
+++ b/Mage.Sets/src/mage/cards/s/SickeningShoal.java
@@ -40,7 +40,7 @@ public final class SickeningShoal extends CardImpl {
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter), true)));
// Target creature gets -X/-X until end of turn.
- DynamicValue x = new SignInversionDynamicValue(new ExileFromHandCostCardConvertedMana());
+ DynamicValue x = new SignInversionDynamicValue(ExileFromHandCostCardConvertedMana.instance);
this.getSpellAbility().addEffect(new BoostTargetEffect(x, x, Duration.EndOfTurn, true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/s/SilklashSpider.java b/Mage.Sets/src/mage/cards/s/SilklashSpider.java
index 0cd6ebd1353..05b44bcf58a 100644
--- a/Mage.Sets/src/mage/cards/s/SilklashSpider.java
+++ b/Mage.Sets/src/mage/cards/s/SilklashSpider.java
@@ -40,7 +40,7 @@ public final class SilklashSpider extends CardImpl {
this.addAbility(ReachAbility.getInstance());
// {X}{G}{G}: Silklash Spider deals X damage to each creature with flying.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
- new DamageAllEffect(new ManacostVariableValue(), filter),
+ new DamageAllEffect(ManacostVariableValue.instance, filter),
new ManaCostsImpl("{X}{G}{G}")));
}
diff --git a/Mage.Sets/src/mage/cards/s/SkeletalScrying.java b/Mage.Sets/src/mage/cards/s/SkeletalScrying.java
index 712f565e937..558d6319396 100644
--- a/Mage.Sets/src/mage/cards/s/SkeletalScrying.java
+++ b/Mage.Sets/src/mage/cards/s/SkeletalScrying.java
@@ -34,7 +34,7 @@ public final class SkeletalScrying extends CardImpl {
ability.setRuleAtTheTop(true);
this.addAbility(ability);
// You draw X cards and you lose X life.
- this.getSpellAbility().addEffect(new SkeletalScryingEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new SkeletalScryingEffect(ManacostVariableValue.instance));
}
diff --git a/Mage.Sets/src/mage/cards/s/SkitterOfLizards.java b/Mage.Sets/src/mage/cards/s/SkitterOfLizards.java
index 95353e03aa7..b4a9f5a5244 100644
--- a/Mage.Sets/src/mage/cards/s/SkitterOfLizards.java
+++ b/Mage.Sets/src/mage/cards/s/SkitterOfLizards.java
@@ -35,7 +35,7 @@ public final class SkitterOfLizards extends CardImpl {
// Skitter of Lizards enters the battlefield with a +1/+1 counter on it for each time it was kicked.
this.addAbility(new EntersBattlefieldAbility(
- new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new MultikickerCount(), true),
+ new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), MultikickerCount.instance, true),
"with a +1/+1 counter on it for each time it was kicked"));
}
diff --git a/Mage.Sets/src/mage/cards/s/Skyscribing.java b/Mage.Sets/src/mage/cards/s/Skyscribing.java
index eba3cb37bf5..cf37f0c5c6d 100644
--- a/Mage.Sets/src/mage/cards/s/Skyscribing.java
+++ b/Mage.Sets/src/mage/cards/s/Skyscribing.java
@@ -20,7 +20,7 @@ public final class Skyscribing extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{U}{U}");
// Each player draws X cards.
- this.getSpellAbility().addEffect(new DrawCardAllEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DrawCardAllEffect(ManacostVariableValue.instance));
// Forecast - {2}{U}, Reveal Skyscribing from your hand: Each player draws a card.
this.addAbility(new ForecastAbility(new DrawCardAllEffect(1), new ManaCostsImpl("{2}{U}")));
}
diff --git a/Mage.Sets/src/mage/cards/s/SnakeBasket.java b/Mage.Sets/src/mage/cards/s/SnakeBasket.java
index 66862965c22..6cc0acd59d0 100644
--- a/Mage.Sets/src/mage/cards/s/SnakeBasket.java
+++ b/Mage.Sets/src/mage/cards/s/SnakeBasket.java
@@ -25,7 +25,7 @@ public final class SnakeBasket extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
// {X}, Sacrifice Snake Basket: create X 1/1 green Snake creature tokens. Activate this ability only any time you could cast a sorcery.
- Effect effect = new CreateTokenEffect(new SnakeToken(), new ManacostVariableValue());
+ Effect effect = new CreateTokenEffect(new SnakeToken(), ManacostVariableValue.instance);
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java b/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java
index fda9d9d9987..56e925fe0ce 100644
--- a/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java
+++ b/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java
@@ -35,7 +35,7 @@ public final class SokenzanSpellblade extends CardImpl {
// Bushido 1
this.addAbility(new BushidoAbility(1));
// {1}{R}: Sokenzan Spellblade gets +X/+0 until end of turn, where X is the number of cards in your hand.
- Effect effect = new BoostSourceEffect(new CardsInControllerHandCount(), new StaticValue(0), Duration.EndOfTurn, true);
+ Effect effect = new BoostSourceEffect(CardsInControllerHandCount.instance, new StaticValue(0), Duration.EndOfTurn, true);
effect.setText("{this} gets +X/+0 until end of turn, where X is the number of cards in your hand");
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
effect, new ManaCostsImpl("{1}{R}")
diff --git a/Mage.Sets/src/mage/cards/s/Soothsaying.java b/Mage.Sets/src/mage/cards/s/Soothsaying.java
index fe88a0035c8..2f67392f252 100644
--- a/Mage.Sets/src/mage/cards/s/Soothsaying.java
+++ b/Mage.Sets/src/mage/cards/s/Soothsaying.java
@@ -27,7 +27,7 @@ public final class Soothsaying extends CardImpl {
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShuffleLibrarySourceEffect(), new ManaCostsImpl<>("{3}{U}{U}")));
// {X}: Look at the top X cards of your library, then put them back in any order.
- Effect effect = new LookLibraryControllerEffect(new ManacostVariableValue());
+ Effect effect = new LookLibraryControllerEffect(ManacostVariableValue.instance);
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")));
}
diff --git a/Mage.Sets/src/mage/cards/s/SophicCentaur.java b/Mage.Sets/src/mage/cards/s/SophicCentaur.java
index d28ffa11afa..76ed6c4d03f 100644
--- a/Mage.Sets/src/mage/cards/s/SophicCentaur.java
+++ b/Mage.Sets/src/mage/cards/s/SophicCentaur.java
@@ -33,7 +33,7 @@ public final class SophicCentaur extends CardImpl {
this.toughness = new MageInt(1);
// {2}{G}{G}, {tap}, Discard a card: You gain 2 life for each card in your hand.
- DynamicValue lifeToGainAmount = new MultipliedValue(new CardsInControllerHandCount(), 2);
+ DynamicValue lifeToGainAmount = new MultipliedValue(CardsInControllerHandCount.instance, 2);
Effect effect = new GainLifeEffect(lifeToGainAmount);
effect.setText("You gain 2 life for each card in your hand");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{G}{G}"));
diff --git a/Mage.Sets/src/mage/cards/s/SoramaroFirstToDream.java b/Mage.Sets/src/mage/cards/s/SoramaroFirstToDream.java
index d197ae5806d..62a0867b8b0 100644
--- a/Mage.Sets/src/mage/cards/s/SoramaroFirstToDream.java
+++ b/Mage.Sets/src/mage/cards/s/SoramaroFirstToDream.java
@@ -39,7 +39,7 @@ public final class SoramaroFirstToDream extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Soramaro, First to Dream's power and toughness are each equal to the number of cards in your hand.
- DynamicValue xValue= new CardsInControllerHandCount();
+ DynamicValue xValue= CardsInControllerHandCount.instance;
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame)));
// {4}, Return a land you control to its owner's hand: Draw a card.
diff --git a/Mage.Sets/src/mage/cards/s/SoulStrings.java b/Mage.Sets/src/mage/cards/s/SoulStrings.java
index 4dc5d880609..5ae9b10d29d 100644
--- a/Mage.Sets/src/mage/cards/s/SoulStrings.java
+++ b/Mage.Sets/src/mage/cards/s/SoulStrings.java
@@ -23,7 +23,7 @@ public final class SoulStrings extends CardImpl {
// Return two target creature cards from your graveyard to your hand unless any player pays {X}.
Effect effect = new DoUnlessAnyPlayerPaysEffect(
- new ReturnFromGraveyardToHandTargetEffect(), new ManacostVariableValue());
+ new ReturnFromGraveyardToHandTargetEffect(), ManacostVariableValue.instance);
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(2, new FilterCreatureCard("creature cards from your graveyard")));
}
diff --git a/Mage.Sets/src/mage/cards/s/SpellContortion.java b/Mage.Sets/src/mage/cards/s/SpellContortion.java
index aab49c9ab4f..fd89cb7298f 100644
--- a/Mage.Sets/src/mage/cards/s/SpellContortion.java
+++ b/Mage.Sets/src/mage/cards/s/SpellContortion.java
@@ -29,7 +29,7 @@ public final class SpellContortion extends CardImpl {
// Counter target spell unless its controller pays {2}. Draw a card for each time Spell Contortion was kicked.
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(2)));
- this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new MultikickerCount()));
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(MultikickerCount.instance));
this.getSpellAbility().addTarget(new TargetSpell());
}
diff --git a/Mage.Sets/src/mage/cards/s/SphinxsRevelation.java b/Mage.Sets/src/mage/cards/s/SphinxsRevelation.java
index 4658f434502..9a982e8c060 100644
--- a/Mage.Sets/src/mage/cards/s/SphinxsRevelation.java
+++ b/Mage.Sets/src/mage/cards/s/SphinxsRevelation.java
@@ -21,7 +21,7 @@ public final class SphinxsRevelation extends CardImpl {
// You gain X life and draw X cards.
- ManacostVariableValue manaX = new ManacostVariableValue();
+ ManacostVariableValue manaX = ManacostVariableValue.instance;
this.getSpellAbility().addEffect(new GainLifeEffect(manaX));
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(manaX));
}
diff --git a/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java b/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java
index 68696268cab..f6b5adc9204 100644
--- a/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java
+++ b/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java
@@ -23,7 +23,7 @@ public final class SpiralingEmbers extends CardImpl {
// Spiraling Embers deals damage to any target equal to the number of cards in your hand.
- Effect effect = new DamageTargetEffect(new CardsInControllerHandCount());
+ Effect effect = new DamageTargetEffect(CardsInControllerHandCount.instance);
effect.setText("{this} deals damage to any target equal to the number of cards in your hand.");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetAnyTarget());
diff --git a/Mage.Sets/src/mage/cards/s/SpontaneousGeneration.java b/Mage.Sets/src/mage/cards/s/SpontaneousGeneration.java
index eab38e464ee..6820a1e7ddb 100644
--- a/Mage.Sets/src/mage/cards/s/SpontaneousGeneration.java
+++ b/Mage.Sets/src/mage/cards/s/SpontaneousGeneration.java
@@ -19,7 +19,7 @@ public final class SpontaneousGeneration extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}");
// Create a 1/1 green Saproling creature token for each card in your hand.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new CardsInControllerHandCount()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), CardsInControllerHandCount.instance));
}
public SpontaneousGeneration(final SpontaneousGeneration card) {
diff --git a/Mage.Sets/src/mage/cards/s/SpringjackPasture.java b/Mage.Sets/src/mage/cards/s/SpringjackPasture.java
index c5f7f6a91ab..d4ba3405d73 100644
--- a/Mage.Sets/src/mage/cards/s/SpringjackPasture.java
+++ b/Mage.Sets/src/mage/cards/s/SpringjackPasture.java
@@ -49,12 +49,12 @@ public final class SpringjackPasture extends CardImpl {
// {tap}, Sacrifice X Goats: Add X mana of any one color. You gain X life.
ability = new DynamicManaAbility(
new Mana(0,0,0,0,0,0,1,0),
- new GetXValue(),
+ GetXValue.instance,
new TapSourceCost(),
"Add X mana of any one color",
true);
ability.addCost(new SacrificeXTargetCost(filter));
- ability.addEffect(new GainLifeEffect(new GetXValue()));
+ ability.addEffect(new GainLifeEffect(GetXValue.instance));
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/s/SquallLine.java b/Mage.Sets/src/mage/cards/s/SquallLine.java
index b2b8c822011..37e98c9e647 100644
--- a/Mage.Sets/src/mage/cards/s/SquallLine.java
+++ b/Mage.Sets/src/mage/cards/s/SquallLine.java
@@ -27,7 +27,7 @@ public final class SquallLine extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{G}{G}");
// Squall Line deals X damage to each creature with flying and each player.
- this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter)); }
+ this.getSpellAbility().addEffect(new DamageEverythingEffect(ManacostVariableValue.instance, filter)); }
public SquallLine(final SquallLine card) {
super(card);
diff --git a/Mage.Sets/src/mage/cards/s/Starstorm.java b/Mage.Sets/src/mage/cards/s/Starstorm.java
index 1d74ac89d2e..bdf7d1c097b 100644
--- a/Mage.Sets/src/mage/cards/s/Starstorm.java
+++ b/Mage.Sets/src/mage/cards/s/Starstorm.java
@@ -22,7 +22,7 @@ public final class Starstorm extends CardImpl {
// Starstorm deals X damage to each creature.
- this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent()));
+ this.getSpellAbility().addEffect(new DamageAllEffect(ManacostVariableValue.instance, new FilterCreaturePermanent()));
// Cycling {3}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{3}")));
}
diff --git a/Mage.Sets/src/mage/cards/s/StormHerd.java b/Mage.Sets/src/mage/cards/s/StormHerd.java
index 9ba7cb1bc33..c2fac4e69c0 100644
--- a/Mage.Sets/src/mage/cards/s/StormHerd.java
+++ b/Mage.Sets/src/mage/cards/s/StormHerd.java
@@ -19,7 +19,7 @@ public final class StormHerd extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{8}{W}{W}");
// create X 1/1 white Pegasus creature tokens with flying, where X is your life total.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new PegasusToken(), new ControllerLifeCount()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new PegasusToken(), ControllerLifeCount.instance));
}
public StormHerd(final StormHerd card) {
diff --git a/Mage.Sets/src/mage/cards/s/StormSeeker.java b/Mage.Sets/src/mage/cards/s/StormSeeker.java
index 63460d878c8..173b24552c7 100644
--- a/Mage.Sets/src/mage/cards/s/StormSeeker.java
+++ b/Mage.Sets/src/mage/cards/s/StormSeeker.java
@@ -20,7 +20,7 @@ public final class StormSeeker extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}");
// Storm Seeker deals damage to target player equal to the number of cards in that player's hand.
- Effect effect = new DamageTargetEffect(new CardsInTargetHandCount());
+ Effect effect = new DamageTargetEffect(CardsInTargetHandCount.instance);
effect.setText("{this} deals damage to target player equal to the number of cards in that player's hand.");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPlayer());
diff --git a/Mage.Sets/src/mage/cards/s/StreamOfLife.java b/Mage.Sets/src/mage/cards/s/StreamOfLife.java
index 97e91d04b33..51924a217bd 100644
--- a/Mage.Sets/src/mage/cards/s/StreamOfLife.java
+++ b/Mage.Sets/src/mage/cards/s/StreamOfLife.java
@@ -20,7 +20,7 @@ public final class StreamOfLife extends CardImpl {
// Target player gains X life.
- this.getSpellAbility().addEffect(new GainLifeTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new GainLifeTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetPlayer());
}
diff --git a/Mage.Sets/src/mage/cards/s/StreetSpasm.java b/Mage.Sets/src/mage/cards/s/StreetSpasm.java
index fa0f2d43e83..e10d340862f 100644
--- a/Mage.Sets/src/mage/cards/s/StreetSpasm.java
+++ b/Mage.Sets/src/mage/cards/s/StreetSpasm.java
@@ -37,10 +37,10 @@ public final class StreetSpasm extends CardImpl {
// Street Spasm deals X damage to target creature without flying you don't control.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
// Overload {X}{X}{R}{R} (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 DamageAllEffect(new ManacostVariableValue(), filter), new ManaCostsImpl("{X}{X}{R}{R}")));
+ this.addAbility(new OverloadAbility(this, new DamageAllEffect(ManacostVariableValue.instance, filter), new ManaCostsImpl("{X}{X}{R}{R}")));
}
public StreetSpasm(final StreetSpasm card) {
diff --git a/Mage.Sets/src/mage/cards/s/StrengthOfTheTajuru.java b/Mage.Sets/src/mage/cards/s/StrengthOfTheTajuru.java
index 48f0586a2bc..73a007d69f0 100644
--- a/Mage.Sets/src/mage/cards/s/StrengthOfTheTajuru.java
+++ b/Mage.Sets/src/mage/cards/s/StrengthOfTheTajuru.java
@@ -49,7 +49,7 @@ enum StrengthOfTheTajuruAdjuster implements TargetAdjuster {
@Override
public void adjustTargets(Ability ability, Game game) {
ability.getTargets().clear();
- int numbTargets = new MultikickerCount().calculate(game, ability, null) + 1;
+ int numbTargets = MultikickerCount.instance.calculate(game, ability, null) + 1;
ability.addTarget(new TargetCreaturePermanent(0, numbTargets));
}
}
diff --git a/Mage.Sets/src/mage/cards/s/StrokeOfGenius.java b/Mage.Sets/src/mage/cards/s/StrokeOfGenius.java
index f9d0145f2cf..8effb656273 100644
--- a/Mage.Sets/src/mage/cards/s/StrokeOfGenius.java
+++ b/Mage.Sets/src/mage/cards/s/StrokeOfGenius.java
@@ -21,7 +21,7 @@ public final class StrokeOfGenius extends CardImpl {
// Target player draws X cards.
- this.getSpellAbility().addEffect(new DrawCardTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DrawCardTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetPlayer());
}
diff --git a/Mage.Sets/src/mage/cards/s/Sturmgeist.java b/Mage.Sets/src/mage/cards/s/Sturmgeist.java
index 6bc161a0d45..f21efdda143 100644
--- a/Mage.Sets/src/mage/cards/s/Sturmgeist.java
+++ b/Mage.Sets/src/mage/cards/s/Sturmgeist.java
@@ -31,7 +31,7 @@ public final class Sturmgeist extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Sturmgeist's power and toughness are each equal to the number of cards in your hand.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInControllerHandCount(), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CardsInControllerHandCount.instance, Duration.EndOfGame)));
// Whenever Sturmgeist deals combat damage to a player, draw a card.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
}
diff --git a/Mage.Sets/src/mage/cards/s/Subdue.java b/Mage.Sets/src/mage/cards/s/Subdue.java
index 63ac77351e7..970e3df7882 100644
--- a/Mage.Sets/src/mage/cards/s/Subdue.java
+++ b/Mage.Sets/src/mage/cards/s/Subdue.java
@@ -24,7 +24,7 @@ public final class Subdue extends CardImpl {
// Prevent all combat damage that would be dealt by target creature this turn. That creature gets +0/+X until end of turn, where X is its converted mana cost.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new PreventDamageByTargetEffect(Duration.EndOfTurn, true));
- this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), new TargetConvertedManaCost(), Duration.EndOfTurn, true)
+ this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), TargetConvertedManaCost.instance, Duration.EndOfTurn, true)
.setText("That creature gets +0/+X until end of turn, where X is its converted mana cost"));
}
diff --git a/Mage.Sets/src/mage/cards/s/SubterraneanHangar.java b/Mage.Sets/src/mage/cards/s/SubterraneanHangar.java
index 9676c73977b..9ddc675a34b 100644
--- a/Mage.Sets/src/mage/cards/s/SubterraneanHangar.java
+++ b/Mage.Sets/src/mage/cards/s/SubterraneanHangar.java
@@ -34,7 +34,7 @@ public final class SubterraneanHangar extends CardImpl {
// {tap}, Remove any number of storage counters from Subterranean Hangar: Add {B} for each storage counter removed this way.
Ability ability = new DynamicManaAbility(
Mana.BlackMana(1),
- new RemovedCountersForCostValue(),
+ RemovedCountersForCostValue.instance,
new TapSourceCost(),
"Add {B} for each storage counter removed this way",
true, new CountersSourceCount(CounterType.STORAGE));
diff --git a/Mage.Sets/src/mage/cards/s/SuddenImpact.java b/Mage.Sets/src/mage/cards/s/SuddenImpact.java
index b3affd23630..6f889719a28 100644
--- a/Mage.Sets/src/mage/cards/s/SuddenImpact.java
+++ b/Mage.Sets/src/mage/cards/s/SuddenImpact.java
@@ -21,7 +21,7 @@ public final class SuddenImpact extends CardImpl {
// Sudden Impact deals damage to target player equal to the number of cards in that player's hand.
- Effect effect = new DamageTargetEffect(new CardsInTargetHandCount());
+ Effect effect = new DamageTargetEffect(CardsInTargetHandCount.instance);
effect.setText("{this} deals damage to target player equal to the number of cards in that player's hand.");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPlayer());
diff --git a/Mage.Sets/src/mage/cards/s/SunbringersTouch.java b/Mage.Sets/src/mage/cards/s/SunbringersTouch.java
index d1a1104cd42..1cca7cfa8c3 100644
--- a/Mage.Sets/src/mage/cards/s/SunbringersTouch.java
+++ b/Mage.Sets/src/mage/cards/s/SunbringersTouch.java
@@ -30,7 +30,7 @@ public final class SunbringersTouch extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}{G}");
// Bolster X, where X is the number of cards in your hand.
- this.getSpellAbility().addEffect(new BolsterEffect(new CardsInControllerHandCount()));
+ this.getSpellAbility().addEffect(new BolsterEffect(CardsInControllerHandCount.instance));
// Each creature you control with a +1/+1 counter on it gains trample until end of turn.
Effect effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, filter);
diff --git a/Mage.Sets/src/mage/cards/s/SupplyDemand.java b/Mage.Sets/src/mage/cards/s/SupplyDemand.java
index 8085fd8f4ea..a9ca239a289 100644
--- a/Mage.Sets/src/mage/cards/s/SupplyDemand.java
+++ b/Mage.Sets/src/mage/cards/s/SupplyDemand.java
@@ -31,7 +31,7 @@ public final class SupplyDemand extends SplitCard {
// Supply
// create X 1/1 green Saproling creature tokens.
- getLeftHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new ManacostVariableValue()));
+ getLeftHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), ManacostVariableValue.instance));
// Demand
// Search your library for a multicolored card, reveal it, and put it into your hand. Then shuffle your library.
diff --git a/Mage.Sets/src/mage/cards/s/SurgeOfStrength.java b/Mage.Sets/src/mage/cards/s/SurgeOfStrength.java
index 7a9a5d79248..d71e125bb65 100644
--- a/Mage.Sets/src/mage/cards/s/SurgeOfStrength.java
+++ b/Mage.Sets/src/mage/cards/s/SurgeOfStrength.java
@@ -42,7 +42,7 @@ public final class SurgeOfStrength extends CardImpl {
Effect effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
effect.setText("Target creature gains trample");
this.getSpellAbility().addEffect(effect);
- effect = new BoostTargetEffect(new TargetConvertedManaCost(), new StaticValue(0), Duration.EndOfTurn, true);
+ effect = new BoostTargetEffect(TargetConvertedManaCost.instance, new StaticValue(0), Duration.EndOfTurn, true);
effect.setText("and gets +X/+0 until end of turn, where X is that creature's converted mana cost");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
diff --git a/Mage.Sets/src/mage/cards/s/SwallowingPlague.java b/Mage.Sets/src/mage/cards/s/SwallowingPlague.java
index 9b17abee582..7392aca66bb 100644
--- a/Mage.Sets/src/mage/cards/s/SwallowingPlague.java
+++ b/Mage.Sets/src/mage/cards/s/SwallowingPlague.java
@@ -23,8 +23,8 @@ public final class SwallowingPlague extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{B}");
this.subtype.add(SubType.ARCANE);
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
- this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
+ this.getSpellAbility().addEffect(new GainLifeEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/s/SwellOfCourage.java b/Mage.Sets/src/mage/cards/s/SwellOfCourage.java
index 372a09d6c5a..457048a651c 100644
--- a/Mage.Sets/src/mage/cards/s/SwellOfCourage.java
+++ b/Mage.Sets/src/mage/cards/s/SwellOfCourage.java
@@ -24,7 +24,7 @@ public final class SwellOfCourage extends CardImpl {
// Creatures you control get +2/+2 until end of turn.
this.getSpellAbility().addEffect(new BoostControlledEffect(2,2, Duration.EndOfTurn));
// Reinforce X-{X}{W}{W}
- this.addAbility(new ReinforceAbility(new ManacostVariableValue(), new ManaCostsImpl("{X}{W}{W}")));
+ this.addAbility(new ReinforceAbility(ManacostVariableValue.instance, new ManaCostsImpl("{X}{W}{W}")));
}
public SwellOfCourage(final SwellOfCourage card) {
diff --git a/Mage.Sets/src/mage/cards/s/SwordOfWarAndPeace.java b/Mage.Sets/src/mage/cards/s/SwordOfWarAndPeace.java
index d0035791005..9968d14771f 100644
--- a/Mage.Sets/src/mage/cards/s/SwordOfWarAndPeace.java
+++ b/Mage.Sets/src/mage/cards/s/SwordOfWarAndPeace.java
@@ -69,7 +69,7 @@ class SwordOfWarAndPeaceAbility extends TriggeredAbilityImpl {
public SwordOfWarAndPeaceAbility() {
super(Zone.BATTLEFIELD, new SwordOfWarAndPeaceDamageEffect());
- this.addEffect(new GainLifeEffect(new CardsInControllerHandCount()));
+ this.addEffect(new GainLifeEffect(CardsInControllerHandCount.instance));
}
public SwordOfWarAndPeaceAbility(final SwordOfWarAndPeaceAbility ability) {
diff --git a/Mage.Sets/src/mage/cards/s/SylvanYeti.java b/Mage.Sets/src/mage/cards/s/SylvanYeti.java
index 688718f865e..d402b7450b6 100644
--- a/Mage.Sets/src/mage/cards/s/SylvanYeti.java
+++ b/Mage.Sets/src/mage/cards/s/SylvanYeti.java
@@ -27,7 +27,7 @@ public final class SylvanYeti extends CardImpl {
this.toughness = new MageInt(4);
// Sylvan Yeti's power is equal to the number of cards in your hand.
- Effect effect = new SetPowerSourceEffect(new CardsInControllerHandCount(), Duration.EndOfGame);
+ Effect effect = new SetPowerSourceEffect(CardsInControllerHandCount.instance, Duration.EndOfGame);
this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));
}
diff --git a/Mage.Sets/src/mage/cards/t/TalonOfPain.java b/Mage.Sets/src/mage/cards/t/TalonOfPain.java
index 0558c9b9333..b6fa0d37241 100644
--- a/Mage.Sets/src/mage/cards/t/TalonOfPain.java
+++ b/Mage.Sets/src/mage/cards/t/TalonOfPain.java
@@ -42,7 +42,7 @@ public final class TalonOfPain extends CardImpl {
this.addAbility(new TalonOfPainTriggeredAbility());
// {X}, {T}, Remove X charge counters from Talon of Pain: Talon of Pain deals X damage to any target.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.instance), new ManaCostsImpl("{X}"));
ability.addCost(new TapSourceCost());
ability.addCost(new TalonOfPainRemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance()));
ability.addTarget(new TargetAnyTarget());
diff --git a/Mage.Sets/src/mage/cards/t/TectonicBreak.java b/Mage.Sets/src/mage/cards/t/TectonicBreak.java
index c8c47de18c9..14bd9c35651 100644
--- a/Mage.Sets/src/mage/cards/t/TectonicBreak.java
+++ b/Mage.Sets/src/mage/cards/t/TectonicBreak.java
@@ -19,7 +19,7 @@ public final class TectonicBreak extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}{R}");
// Each player sacrifices X lands.
- this.getSpellAbility().addEffect(new SacrificeAllEffect(new ManacostVariableValue(), new FilterControlledLandPermanent("lands")));
+ this.getSpellAbility().addEffect(new SacrificeAllEffect(ManacostVariableValue.instance, new FilterControlledLandPermanent("lands")));
}
public TectonicBreak(final TectonicBreak card) {
diff --git a/Mage.Sets/src/mage/cards/t/Temper.java b/Mage.Sets/src/mage/cards/t/Temper.java
index 602872e0853..b0bdd776b14 100644
--- a/Mage.Sets/src/mage/cards/t/Temper.java
+++ b/Mage.Sets/src/mage/cards/t/Temper.java
@@ -26,7 +26,7 @@ public final class Temper extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{1}{W}");
// Prevent the next X damage that would be dealt to target creature this turn. For each 1 damage prevented this way, put a +1/+1 counter on that creature.
- this.getSpellAbility().addEffect(new TemperPreventDamageTargetEffect(new ManacostVariableValue(), Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new TemperPreventDamageTargetEffect(ManacostVariableValue.instance, Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/t/TheBattleOfEndor.java b/Mage.Sets/src/mage/cards/t/TheBattleOfEndor.java
index 6c6ee7f1a9a..4362c26c536 100644
--- a/Mage.Sets/src/mage/cards/t/TheBattleOfEndor.java
+++ b/Mage.Sets/src/mage/cards/t/TheBattleOfEndor.java
@@ -32,7 +32,7 @@ public final class TheBattleOfEndor extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{X}{G}{G}{G}");
// Create X 1/1 green Ewok creature tokens.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new EwokToken(), new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new EwokToken(), ManacostVariableValue.instance));
// Put X +1/+1 counters on each creature you control.
this.getSpellAbility().addEffect(new TheBattleOfEndorEffect());
diff --git a/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java b/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java
index 5c8f41b4c3f..7207f52b1ac 100644
--- a/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java
+++ b/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java
@@ -27,15 +27,15 @@ public final class TheBattleOfGeonosis extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}{R}");
// The Battle of Geonosis deals X + 1 damage to each opponent and each creature your opponents control.
- Effect effect = new DamagePlayersEffect(Outcome.Damage, new IntPlusDynamicValue(1, new ManacostVariableValue()), TargetController.OPPONENT);
+ Effect effect = new DamagePlayersEffect(Outcome.Damage, new IntPlusDynamicValue(1, ManacostVariableValue.instance), TargetController.OPPONENT);
effect.setText("The Battle of Geonosis deals X plus 1 damage to each opponent");
this.getSpellAbility().addEffect(effect);
- effect = new DamageAllEffect(new IntPlusDynamicValue(1, new ManacostVariableValue()), new FilterOpponentsCreaturePermanent());
+ effect = new DamageAllEffect(new IntPlusDynamicValue(1, ManacostVariableValue.instance), new FilterOpponentsCreaturePermanent());
effect.setText("and each creature your opponents control");
this.getSpellAbility().addEffect(effect);
// Creatures you control get +X/+0 until end of turn.
- this.getSpellAbility().addEffect(new BoostControlledEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new BoostControlledEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn));
}
diff --git a/Mage.Sets/src/mage/cards/t/TheBattleOfHoth.java b/Mage.Sets/src/mage/cards/t/TheBattleOfHoth.java
index 3ce64d602b5..dda5b9c9b68 100644
--- a/Mage.Sets/src/mage/cards/t/TheBattleOfHoth.java
+++ b/Mage.Sets/src/mage/cards/t/TheBattleOfHoth.java
@@ -19,7 +19,7 @@ public final class TheBattleOfHoth extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{W}{W}{W}");
// Create X 5/5 white artifact AT-AT creature tokens wiht "When this creature dies, create two 1/1 white Trooper creature tokens."
- this.getSpellAbility().addEffect(new CreateTokenEffect(new ATATToken(), new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new ATATToken(), ManacostVariableValue.instance));
}
public TheBattleOfHoth(final TheBattleOfHoth card) {
diff --git a/Mage.Sets/src/mage/cards/t/TheBattleOfYavin.java b/Mage.Sets/src/mage/cards/t/TheBattleOfYavin.java
index 5377a77dc81..90ec0851cdf 100644
--- a/Mage.Sets/src/mage/cards/t/TheBattleOfYavin.java
+++ b/Mage.Sets/src/mage/cards/t/TheBattleOfYavin.java
@@ -65,7 +65,7 @@ class TheBattleOfYavinEffect extends OneShotEffect {
return false;
}
- int amount = (new ManacostVariableValue()).calculate(game, source, this);
+ int amount = (ManacostVariableValue.instance).calculate(game, source, this);
if (amount > 0) {
LinkedList sacrifices = new LinkedList<>();
diff --git a/Mage.Sets/src/mage/cards/t/ThoughtDissector.java b/Mage.Sets/src/mage/cards/t/ThoughtDissector.java
index 2238235f421..f8170540896 100644
--- a/Mage.Sets/src/mage/cards/t/ThoughtDissector.java
+++ b/Mage.Sets/src/mage/cards/t/ThoughtDissector.java
@@ -49,7 +49,7 @@ public final class ThoughtDissector extends CardImpl {
class ThoughtDissectorEffect extends OneShotEffect {
- private static final ManacostVariableValue amount = new ManacostVariableValue();
+ private static final ManacostVariableValue amount = ManacostVariableValue.instance;
public ThoughtDissectorEffect() {
super(Outcome.Detriment);
diff --git a/Mage.Sets/src/mage/cards/t/Thud.java b/Mage.Sets/src/mage/cards/t/Thud.java
index 54c775bc203..cdcc431c5ba 100644
--- a/Mage.Sets/src/mage/cards/t/Thud.java
+++ b/Mage.Sets/src/mage/cards/t/Thud.java
@@ -26,7 +26,7 @@ public final class Thud extends CardImpl {
));
// Thud deals damage equal to the sacrificed creature's power to any target.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new SacrificeCostCreaturesPower()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(SacrificeCostCreaturesPower.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
diff --git a/Mage.Sets/src/mage/cards/t/TibaltTheFiendBlooded.java b/Mage.Sets/src/mage/cards/t/TibaltTheFiendBlooded.java
index a83deed0d49..5805188ef9e 100644
--- a/Mage.Sets/src/mage/cards/t/TibaltTheFiendBlooded.java
+++ b/Mage.Sets/src/mage/cards/t/TibaltTheFiendBlooded.java
@@ -53,7 +53,7 @@ public final class TibaltTheFiendBlooded extends CardImpl {
ability.addEffect(effect);
this.addAbility(ability);
// -4: Tibalt, the Fiend-Blooded deals damage equal to the number of cards in target player's hand to that player.
- effect = new DamageTargetEffect(new CardsInTargetHandCount(), true);
+ effect = new DamageTargetEffect(CardsInTargetHandCount.instance, true);
effect.setText("{this} deals damage equal to the number of cards in target player's hand to that player");
ability = new LoyaltyAbility(effect, -4);
ability.addTarget(new TargetPlayer());
diff --git a/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java b/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java
index 50ec788f1a4..2a83a5105e2 100644
--- a/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java
+++ b/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java
@@ -37,7 +37,7 @@ public final class TishanaVoiceOfThunder extends CardImpl {
this.toughness = new MageInt(0);
// Tishana, Voice of Thunder's power and toughness are each equal to the number of cards in your hand.
- DynamicValue xValue = new CardsInControllerHandCount();
+ DynamicValue xValue = CardsInControllerHandCount.instance;
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame)));
// You have no maximum hand size.
diff --git a/Mage.Sets/src/mage/cards/t/TitansRevenge.java b/Mage.Sets/src/mage/cards/t/TitansRevenge.java
index 0ce6a02ea83..37529c24697 100644
--- a/Mage.Sets/src/mage/cards/t/TitansRevenge.java
+++ b/Mage.Sets/src/mage/cards/t/TitansRevenge.java
@@ -21,7 +21,7 @@ public final class TitansRevenge extends CardImpl {
// Titan's Revenge deals X damage to any target. Clash with an opponent. If you win, return Titan's Revenge to its owner's hand.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
this.getSpellAbility().addEffect(ClashWinReturnToHandSpellEffect.getInstance());
}
diff --git a/Mage.Sets/src/mage/cards/t/ToilTrouble.java b/Mage.Sets/src/mage/cards/t/ToilTrouble.java
index c3783993f1d..7a18f7047c5 100644
--- a/Mage.Sets/src/mage/cards/t/ToilTrouble.java
+++ b/Mage.Sets/src/mage/cards/t/ToilTrouble.java
@@ -26,7 +26,7 @@ public final class ToilTrouble extends SplitCard {
// Trouble
// Trouble deals damage to target player equal to the number of cards in that player's hand.
- Effect effect = new DamageTargetEffect(new CardsInTargetHandCount());
+ Effect effect = new DamageTargetEffect(CardsInTargetHandCount.instance);
effect.setText("Trouble deals damage to target player equal to the number of cards in that player's hand");
getRightHalfCard().getSpellAbility().addEffect(effect);
getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer());
diff --git a/Mage.Sets/src/mage/cards/t/ToxicDeluge.java b/Mage.Sets/src/mage/cards/t/ToxicDeluge.java
index b3f9b3e9e40..ec64b49f4fa 100644
--- a/Mage.Sets/src/mage/cards/t/ToxicDeluge.java
+++ b/Mage.Sets/src/mage/cards/t/ToxicDeluge.java
@@ -26,7 +26,7 @@ public final class ToxicDeluge extends CardImpl {
// As an additional cost to cast Toxic Deluge, pay X life.
this.getSpellAbility().addCost(new PayVariableLifeCost(true));
// All creatures get -X/-X until end of turn.
- DynamicValue xValue = new SignInversionDynamicValue(new GetXValue());
+ DynamicValue xValue = new SignInversionDynamicValue(GetXValue.instance);
this.getSpellAbility().addEffect(new BoostAllEffect(xValue, xValue, Duration.EndOfTurn, new FilterCreaturePermanent("All creatures"), false,
null, true));
}
diff --git a/Mage.Sets/src/mage/cards/t/TribalUnity.java b/Mage.Sets/src/mage/cards/t/TribalUnity.java
index bb468b356d0..8d03dd04711 100644
--- a/Mage.Sets/src/mage/cards/t/TribalUnity.java
+++ b/Mage.Sets/src/mage/cards/t/TribalUnity.java
@@ -30,7 +30,7 @@ public final class TribalUnity extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{2}{G}");
// Creatures of the creature type of your choice get +X/+X until end of turn.
- this.getSpellAbility().addEffect(new TribalUnityEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new TribalUnityEffect(ManacostVariableValue.instance));
}
public TribalUnity(final TribalUnity card) {
diff --git a/Mage.Sets/src/mage/cards/t/TropicalStorm.java b/Mage.Sets/src/mage/cards/t/TropicalStorm.java
index b85d7c05d0b..0178952b1a6 100644
--- a/Mage.Sets/src/mage/cards/t/TropicalStorm.java
+++ b/Mage.Sets/src/mage/cards/t/TropicalStorm.java
@@ -31,7 +31,7 @@ public final class TropicalStorm extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}");
// Tropical Storm deals X damage to each creature with flying and 1 additional damage to each blue creature.
- this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filter));
+ this.getSpellAbility().addEffect(new DamageAllEffect(ManacostVariableValue.instance, filter));
this.getSpellAbility().addEffect(new DamageAllEffect(1, filter2).setText("and 1 additional damage to each blue creature"));
}
diff --git a/Mage.Sets/src/mage/cards/u/UntamedMight.java b/Mage.Sets/src/mage/cards/u/UntamedMight.java
index 3d887eced9b..9ae6aca3a47 100644
--- a/Mage.Sets/src/mage/cards/u/UntamedMight.java
+++ b/Mage.Sets/src/mage/cards/u/UntamedMight.java
@@ -20,7 +20,7 @@ public final class UntamedMight extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{G}");
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
- this.getSpellAbility().addEffect(new BoostTargetEffect(new ManacostVariableValue(), new ManacostVariableValue(), Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new BoostTargetEffect(ManacostVariableValue.instance, ManacostVariableValue.instance, Duration.EndOfTurn));
}
public UntamedMight(final UntamedMight card) {
diff --git a/Mage.Sets/src/mage/cards/v/VengefulArchon.java b/Mage.Sets/src/mage/cards/v/VengefulArchon.java
index 6921e843087..c271f2e00d2 100644
--- a/Mage.Sets/src/mage/cards/v/VengefulArchon.java
+++ b/Mage.Sets/src/mage/cards/v/VengefulArchon.java
@@ -56,7 +56,7 @@ public final class VengefulArchon extends CardImpl {
class VengefulArchonEffect extends PreventDamageToControllerEffect {
public VengefulArchonEffect() {
- super(Duration.EndOfTurn, false, true, new ManacostVariableValue());
+ super(Duration.EndOfTurn, false, true, ManacostVariableValue.instance);
staticText = "Prevent the next X damage that would be dealt to you this turn. If damage is prevented this way, {this} deals that much damage to target player or planeswalker";
}
diff --git a/Mage.Sets/src/mage/cards/v/VensersJournal.java b/Mage.Sets/src/mage/cards/v/VensersJournal.java
index f3b19c26e9b..6bfa3dc7b06 100644
--- a/Mage.Sets/src/mage/cards/v/VensersJournal.java
+++ b/Mage.Sets/src/mage/cards/v/VensersJournal.java
@@ -30,7 +30,7 @@ public final class VensersJournal extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// At the beginning of your upkeep, you gain 1 life for each card in your hand.
- this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(new CardsInControllerHandCount()), TargetController.YOU, false));
+ this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(CardsInControllerHandCount.instance), TargetController.YOU, false));
}
public VensersJournal(final VensersJournal card) {
diff --git a/Mage.Sets/src/mage/cards/v/VentifactBottle.java b/Mage.Sets/src/mage/cards/v/VentifactBottle.java
index 92e69ef6516..4b0c2db6e5e 100644
--- a/Mage.Sets/src/mage/cards/v/VentifactBottle.java
+++ b/Mage.Sets/src/mage/cards/v/VentifactBottle.java
@@ -36,7 +36,7 @@ public final class VentifactBottle extends CardImpl {
// {X}{1}, {tap}: Put X charge counters on Ventifact Bottle. Activate this ability only any time you could cast a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD,
- new AddCountersSourceEffect(CounterType.CHARGE.createInstance(), new ManacostVariableValue(), true),
+ new AddCountersSourceEffect(CounterType.CHARGE.createInstance(), ManacostVariableValue.instance, true),
new ManaCostsImpl("{1}{X}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/v/ViciousBetrayal.java b/Mage.Sets/src/mage/cards/v/ViciousBetrayal.java
index 3d5faf818a2..ccb6b03444d 100644
--- a/Mage.Sets/src/mage/cards/v/ViciousBetrayal.java
+++ b/Mage.Sets/src/mage/cards/v/ViciousBetrayal.java
@@ -30,7 +30,7 @@ public final class ViciousBetrayal extends CardImpl {
this.getSpellAbility().addCost(new SacrificeXTargetCost(new FilterControlledCreaturePermanent()));
// Target creature gets +2/+2 until end of turn for each creature sacrificed this way.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
- this.getSpellAbility().addEffect(new BoostTargetEffect(new GetXValue(), new GetXValue(), Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new BoostTargetEffect(GetXValue.instance, GetXValue.instance, Duration.EndOfTurn));
}
public ViciousBetrayal(final ViciousBetrayal card) {
@@ -55,7 +55,7 @@ class GetXValue implements DynamicValue {
@Override
public GetXValue copy() {
- return new GetXValue();
+ return GetXValue.instance;
}
@Override
diff --git a/Mage.Sets/src/mage/cards/v/ViciousShadows.java b/Mage.Sets/src/mage/cards/v/ViciousShadows.java
index 273cd5bf24e..c65f819cf8e 100644
--- a/Mage.Sets/src/mage/cards/v/ViciousShadows.java
+++ b/Mage.Sets/src/mage/cards/v/ViciousShadows.java
@@ -22,7 +22,7 @@ public final class ViciousShadows extends CardImpl {
// Whenever a creature dies, you may have Vicious Shadows deal damage to target player equal to the number of cards in that player's hand.
- Ability ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(new CardsInTargetHandCount()), true);
+ Ability ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(CardsInTargetHandCount.instance), true);
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/v/VishKalBloodArbiter.java b/Mage.Sets/src/mage/cards/v/VishKalBloodArbiter.java
index 948eb6ae9e4..dc3d414a5d5 100644
--- a/Mage.Sets/src/mage/cards/v/VishKalBloodArbiter.java
+++ b/Mage.Sets/src/mage/cards/v/VishKalBloodArbiter.java
@@ -51,7 +51,7 @@ public final class VishKalBloodArbiter extends CardImpl {
this.addAbility(LifelinkAbility.getInstance());
// Sacrifice a creature: Put X +1/+1 counters on Vish Kal, Blood Arbiter, where X is the sacrificed creature's power.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
- new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new SacrificeCostCreaturesPower(), true),
+ new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), SacrificeCostCreaturesPower.instance, true),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))));
// Remove all +1/+1 counters from Vish Kal: Target creature gets -1/-1 until end of turn for each +1/+1 counter removed this way.
DynamicValue removedCounters = new SignInversionDynamicValue(new VishKalBloodArbiterDynamicValue());
diff --git a/Mage.Sets/src/mage/cards/v/VolcanicGeyser.java b/Mage.Sets/src/mage/cards/v/VolcanicGeyser.java
index 85a3f917121..1f13748ea75 100644
--- a/Mage.Sets/src/mage/cards/v/VolcanicGeyser.java
+++ b/Mage.Sets/src/mage/cards/v/VolcanicGeyser.java
@@ -20,7 +20,7 @@ public final class VolcanicGeyser extends CardImpl {
// Volcanic Geyser deals X damage to any target.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
diff --git a/Mage.Sets/src/mage/cards/v/VolcanoHellion.java b/Mage.Sets/src/mage/cards/v/VolcanoHellion.java
index de37cde0ff7..b8bd54d50e2 100644
--- a/Mage.Sets/src/mage/cards/v/VolcanoHellion.java
+++ b/Mage.Sets/src/mage/cards/v/VolcanoHellion.java
@@ -32,7 +32,7 @@ public final class VolcanoHellion extends CardImpl {
this.toughness = new MageInt(5);
// Volcano Hellion has echo {X}, where X is your life total.
- this.addAbility(new EchoAbility(new ControllerLifeCount(), "{this} has echo {X}, where X is your life total."));
+ this.addAbility(new EchoAbility(ControllerLifeCount.instance, "{this} has echo {X}, where X is your life total."));
// When Volcano Hellion enters the battlefield, it deals an amount of damage of your choice to you and target creature. The damage can't be prevented.
Ability ability = new EntersBattlefieldTriggeredAbility(new VolcanoHellionEffect(), false);
diff --git a/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java b/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java
index 3e8ebbb7e5e..d7344404e4a 100644
--- a/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java
+++ b/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java
@@ -34,7 +34,7 @@ public final class VolrathTheFallen extends CardImpl {
// {1}{B}, Discard a creature card:
// Volrath the Fallen gets +X/+X until end of turn, where X is the discarded card's converted mana cost.
- Effect effect = new BoostSourceEffect(new DiscardCostCardConvertedMana(),new DiscardCostCardConvertedMana(),Duration.EndOfTurn);
+ Effect effect = new BoostSourceEffect(DiscardCostCardConvertedMana.instance,DiscardCostCardConvertedMana.instance,Duration.EndOfTurn);
effect.setText("{this} gets +X/+X until end of turn, where X is the discarded card's converted mana cost");
Ability ability = new SimpleActivatedAbility(
diff --git a/Mage.Sets/src/mage/cards/v/VoyagerDrake.java b/Mage.Sets/src/mage/cards/v/VoyagerDrake.java
index afe52717faa..058ab18bf9e 100644
--- a/Mage.Sets/src/mage/cards/v/VoyagerDrake.java
+++ b/Mage.Sets/src/mage/cards/v/VoyagerDrake.java
@@ -64,7 +64,7 @@ enum VoyagerDrakeAdjuster implements TargetAdjuster {
@Override
public void adjustTargets(Ability ability, Game game) {
ability.getTargets().clear();
- int numbTargets = new MultikickerCount().calculate(game, ability, null);
+ int numbTargets = MultikickerCount.instance.calculate(game, ability, null);
if (numbTargets > 0) {
ability.addTarget(new TargetCreaturePermanent(0, numbTargets));
}
diff --git a/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java b/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java
index 77d38291e99..1504be0bf43 100644
--- a/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java
+++ b/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java
@@ -40,7 +40,7 @@ public final class WakerOfTheWilds extends CardImpl {
Zone.BATTLEFIELD,
new AddCountersTargetEffect(
CounterType.P1P1.createInstance(0),
- new ManacostVariableValue()
+ ManacostVariableValue.instance
).setText("Put X +1/+1 counters on target land you control."),
new ManaCostsImpl("{X}{G}{G}")
);
diff --git a/Mage.Sets/src/mage/cards/w/WarCadence.java b/Mage.Sets/src/mage/cards/w/WarCadence.java
index 57c5707a1c3..a3864feb41b 100644
--- a/Mage.Sets/src/mage/cards/w/WarCadence.java
+++ b/Mage.Sets/src/mage/cards/w/WarCadence.java
@@ -44,7 +44,7 @@ public final class WarCadence extends CardImpl {
class WarCadenceReplacementEffect extends ReplacementEffectImpl {
- DynamicValue xCosts = new ManacostVariableValue();
+ DynamicValue xCosts = ManacostVariableValue.instance;
WarCadenceReplacementEffect() {
super(Duration.EndOfTurn, Outcome.Neutral);
diff --git a/Mage.Sets/src/mage/cards/w/WarTax.java b/Mage.Sets/src/mage/cards/w/WarTax.java
index 3f9fb3cf9d1..e9d14ff8221 100644
--- a/Mage.Sets/src/mage/cards/w/WarTax.java
+++ b/Mage.Sets/src/mage/cards/w/WarTax.java
@@ -45,7 +45,7 @@ public final class WarTax extends CardImpl {
class WarTaxCantAttackUnlessPaysEffect extends PayCostToAttackBlockEffectImpl {
- DynamicValue xCosts = new ManacostVariableValue();
+ DynamicValue xCosts = ManacostVariableValue.instance;
WarTaxCantAttackUnlessPaysEffect() {
super(Duration.EndOfTurn, Outcome.Neutral, RestrictType.ATTACK);
diff --git a/Mage.Sets/src/mage/cards/w/WarbreakTrumpeter.java b/Mage.Sets/src/mage/cards/w/WarbreakTrumpeter.java
index 9bd82846272..6e801451f6a 100644
--- a/Mage.Sets/src/mage/cards/w/WarbreakTrumpeter.java
+++ b/Mage.Sets/src/mage/cards/w/WarbreakTrumpeter.java
@@ -31,7 +31,7 @@ public final class WarbreakTrumpeter extends CardImpl {
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{X}{X}{R}")));
// When Warbreak Trumpeter is turned face up, create X 1/1 red Goblin creature tokens.
- DynamicValue morphX = new MorphManacostVariableValue();
+ DynamicValue morphX = MorphManacostVariableValue.instance;
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new CreateTokenEffect(new GoblinToken(), morphX)));
}
diff --git a/Mage.Sets/src/mage/cards/w/WarpedPhysique.java b/Mage.Sets/src/mage/cards/w/WarpedPhysique.java
index 9cfa58584cc..2f1fb5588ae 100644
--- a/Mage.Sets/src/mage/cards/w/WarpedPhysique.java
+++ b/Mage.Sets/src/mage/cards/w/WarpedPhysique.java
@@ -26,7 +26,7 @@ public final class WarpedPhysique extends CardImpl {
// Target creature gets +X/-X until end of turn, where X is the number of cards in your hand.
- DynamicValue xValue = new CardsInControllerHandCount();
+ DynamicValue xValue = CardsInControllerHandCount.instance;
this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, new SignInversionDynamicValue(xValue), Duration.EndOfTurn, true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java b/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java
index b7df1697b46..61bdd50855f 100644
--- a/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java
+++ b/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java
@@ -48,7 +48,7 @@ public final class WerewolfOfAncientHunger extends CardImpl {
// Werewolf of Ancient Hunger's power and toughness are each equal to the total number of cards in all players' hands.
this.addAbility(new SimpleStaticAbility(Zone.ALL,
- new ConditionalContinuousEffect(new SetPowerToughnessSourceEffect(new CardsInAllHandsCount(), Duration.EndOfGame),
+ new ConditionalContinuousEffect(new SetPowerToughnessSourceEffect(CardsInAllHandsCount.instance, Duration.EndOfGame),
new TransformedCondition(false), "{this}'s power and toughness are each equal to the total number of cards in all players' hands")));
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf of Ancient Hunger.
diff --git a/Mage.Sets/src/mage/cards/w/Whetwheel.java b/Mage.Sets/src/mage/cards/w/Whetwheel.java
index bb37398d793..cc09655c802 100644
--- a/Mage.Sets/src/mage/cards/w/Whetwheel.java
+++ b/Mage.Sets/src/mage/cards/w/Whetwheel.java
@@ -26,7 +26,7 @@ public final class Whetwheel extends CardImpl {
// {X}{X}, {tap}: Target player puts the top X cards of their library into their graveyard.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(
- new ManacostVariableValue()), new ManaCostsImpl("{X}{X}"));
+ ManacostVariableValue.instance), new ManaCostsImpl("{X}{X}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java b/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java
index d5d28212bba..b08a197b181 100644
--- a/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java
+++ b/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java
@@ -36,7 +36,7 @@ public final class WhiteManaBattery extends CardImpl {
// {tap}, Remove any number of charge counters from White Mana Battery: Add {W}, then add an additional {W} for each charge counter removed this way.
ability = new DynamicManaAbility(
Mana.WhiteMana(1),
- new IntPlusDynamicValue(1, new RemovedCountersForCostValue()),
+ new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance),
new TapSourceCost(),
"Add {W}, then add {W} for each charge counter removed this way",
true, new CountersSourceCount(CounterType.CHARGE));
diff --git a/Mage.Sets/src/mage/cards/w/WhiteSunsZenith.java b/Mage.Sets/src/mage/cards/w/WhiteSunsZenith.java
index b13069cf27c..772562ec28c 100644
--- a/Mage.Sets/src/mage/cards/w/WhiteSunsZenith.java
+++ b/Mage.Sets/src/mage/cards/w/WhiteSunsZenith.java
@@ -20,7 +20,7 @@ public final class WhiteSunsZenith extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{W}{W}{W}");
// create X 2/2 white Cat creature tokens. Shuffle White Sun's Zenith into its owner's library.
- this.getSpellAbility().addEffect(new CreateTokenEffect(new CatToken(), new ManacostVariableValue()));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new CatToken(), ManacostVariableValue.instance));
this.getSpellAbility().addEffect(ShuffleSpellEffect.getInstance());
}
diff --git a/Mage.Sets/src/mage/cards/w/Windstorm.java b/Mage.Sets/src/mage/cards/w/Windstorm.java
index 8d4899a342f..7ad059c67fe 100644
--- a/Mage.Sets/src/mage/cards/w/Windstorm.java
+++ b/Mage.Sets/src/mage/cards/w/Windstorm.java
@@ -27,7 +27,7 @@ public final class Windstorm extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{G}");
- this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filter));
+ this.getSpellAbility().addEffect(new DamageAllEffect(ManacostVariableValue.instance, filter));
}
public Windstorm(final Windstorm card) {
diff --git a/Mage.Sets/src/mage/cards/w/WineOfBloodAndIron.java b/Mage.Sets/src/mage/cards/w/WineOfBloodAndIron.java
index 47f98cbfd31..f5e91428984 100644
--- a/Mage.Sets/src/mage/cards/w/WineOfBloodAndIron.java
+++ b/Mage.Sets/src/mage/cards/w/WineOfBloodAndIron.java
@@ -29,7 +29,7 @@ public final class WineOfBloodAndIron extends CardImpl {
// {4}: Target creature gets +X/+0 until end of turn, where X is its power. Sacrifice Wine of Blood and Iron at the beginning of the next end step.
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
- new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true),
+ new BoostTargetEffect(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true),
new GenericManaCost(4));
Effect effect = new CreateDelayedTriggeredAbilityEffect(
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect()), false);
diff --git a/Mage.Sets/src/mage/cards/w/WolfbriarElemental.java b/Mage.Sets/src/mage/cards/w/WolfbriarElemental.java
index 93d321340d4..4a96c707c5c 100644
--- a/Mage.Sets/src/mage/cards/w/WolfbriarElemental.java
+++ b/Mage.Sets/src/mage/cards/w/WolfbriarElemental.java
@@ -31,7 +31,7 @@ public final class WolfbriarElemental extends CardImpl {
this.addAbility(new MultikickerAbility("{G}"));
// When Wolfbriar Elemental enters the battlefield, create a 2/2 green Wolf creature token for each time it was kicked.
- this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WolfToken(), new MultikickerCount())));
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WolfToken(), MultikickerCount.instance)));
}
public WolfbriarElemental(final WolfbriarElemental card) {
diff --git a/Mage.Sets/src/mage/cards/w/WordOfBlasting.java b/Mage.Sets/src/mage/cards/w/WordOfBlasting.java
index e30c4504316..ee30e19b782 100644
--- a/Mage.Sets/src/mage/cards/w/WordOfBlasting.java
+++ b/Mage.Sets/src/mage/cards/w/WordOfBlasting.java
@@ -31,7 +31,7 @@ public final class WordOfBlasting extends CardImpl {
// Destroy target Wall. It can't be regenerated. Word of Blasting deals damage equal to that Wall's converted mana cost to the Wall's controller.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
- Effect effect = new DamageTargetControllerEffect(new TargetConvertedManaCost());
+ Effect effect = new DamageTargetControllerEffect(TargetConvertedManaCost.instance);
effect.setText("{this} deals damage equal to that Wall's converted mana cost to the Wall's controller");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPermanent(filter));
diff --git a/Mage.Sets/src/mage/cards/w/WorthyCause.java b/Mage.Sets/src/mage/cards/w/WorthyCause.java
index 4d196b4f2c3..3564befc98a 100644
--- a/Mage.Sets/src/mage/cards/w/WorthyCause.java
+++ b/Mage.Sets/src/mage/cards/w/WorthyCause.java
@@ -29,7 +29,7 @@ public final class WorthyCause extends CardImpl {
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
// You gain life equal to the sacrificed creature's toughness.
- Effect effect = new GainLifeEffect(new SacrificeCostCreaturesToughness());
+ Effect effect = new GainLifeEffect(SacrificeCostCreaturesToughness.instance);
effect.setText("You gain life equal to the sacrificed creature's toughness");
this.getSpellAbility().addEffect(effect);
}
diff --git a/Mage.Sets/src/mage/cards/z/ZedruuTheGreathearted.java b/Mage.Sets/src/mage/cards/z/ZedruuTheGreathearted.java
index 88c4dfcd3dc..78c292f791e 100644
--- a/Mage.Sets/src/mage/cards/z/ZedruuTheGreathearted.java
+++ b/Mage.Sets/src/mage/cards/z/ZedruuTheGreathearted.java
@@ -35,10 +35,10 @@ public final class ZedruuTheGreathearted extends CardImpl {
this.toughness = new MageInt(4);
// At the beginning of your upkeep, you gain X life and draw X cards, where X is the number of permanents you own that your opponents control.
- Effect effect = new GainLifeEffect(new PermanentsYouOwnThatOpponentsControlCount());
+ Effect effect = new GainLifeEffect(PermanentsYouOwnThatOpponentsControlCount.instance);
effect.setText("you gain X life");
Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, false);
- effect = new DrawCardSourceControllerEffect(new PermanentsYouOwnThatOpponentsControlCount());
+ effect = new DrawCardSourceControllerEffect(PermanentsYouOwnThatOpponentsControlCount.instance);
effect.setText("and draw X cards, where X is the number of permanents you own that your opponents control");
ability.addEffect(effect);
this.addAbility(ability);
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/AttachedPermanentToughnessValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/AttachedPermanentToughnessValue.java
index 2dab3cdd799..43529161fe3 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/AttachedPermanentToughnessValue.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/AttachedPermanentToughnessValue.java
@@ -12,29 +12,29 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
/**
- *
* @author MTGfan
*/
-public class AttachedPermanentToughnessValue implements DynamicValue {
-
+public enum AttachedPermanentToughnessValue implements DynamicValue {
+ instance;
+
@Override
public int calculate(Game game, Ability source, Effect effect) {
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
Permanent enchanted = game.getPermanentOrLKIBattlefield(enchantment.getAttachedTo());
return enchanted.getToughness().getValue();
}
-
+
@Override
- public AttachedPermanentToughnessValue copy(){
- return new AttachedPermanentToughnessValue();
+ public AttachedPermanentToughnessValue copy() {
+ return AttachedPermanentToughnessValue.instance;
}
-
+
@Override
public String toString() {
return "equal to";
}
-
- @Override
+
+ @Override
public String getMessage() {
return "that creature's toughness";
}
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/AttackedThisTurnOpponentsCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/AttackedThisTurnOpponentsCount.java
index 1e69de1d4f7..2435fda94a7 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/AttackedThisTurnOpponentsCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/AttackedThisTurnOpponentsCount.java
@@ -7,29 +7,24 @@ import mage.abilities.effects.Effect;
import mage.game.Game;
import mage.watchers.common.PlayersAttackedThisTurnWatcher;
-import java.util.UUID;
-
/**
* @author JayDi85
*/
-public class AttackedThisTurnOpponentsCount implements DynamicValue {
+public enum AttackedThisTurnOpponentsCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
- return this.calculate(game, sourceAbility.getControllerId());
- }
-
- public int calculate(Game game, UUID controllerId) {
PlayersAttackedThisTurnWatcher watcher = game.getState().getWatcher(PlayersAttackedThisTurnWatcher.class);
if (watcher != null) {
- return watcher.getAttackedOpponentsCount(controllerId);
+ return watcher.getAttackedOpponentsCount(sourceAbility.getControllerId());
}
return 0;
}
@Override
public AttackedThisTurnOpponentsCount copy() {
- return new AttackedThisTurnOpponentsCount();
+ return AttackedThisTurnOpponentsCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInAllHandsCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInAllHandsCount.java
index 7220265e7bf..5910f57a6c9 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInAllHandsCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInAllHandsCount.java
@@ -1,26 +1,26 @@
package mage.abilities.dynamicvalue.common;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.game.Game;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author emerald000
*/
-public class CardsInAllHandsCount implements DynamicValue {
-
+public enum CardsInAllHandsCount implements DynamicValue {
+ instance;
+
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
int count = 0;
for (UUID playerId : game.getState().getPlayersInRange(sourceAbility.getControllerId(), game)) {
Player player = game.getPlayer(playerId);
- if (player != null)
- {
+ if (player != null) {
count += player.getHand().size();
}
}
@@ -29,7 +29,7 @@ public class CardsInAllHandsCount implements DynamicValue {
@Override
public CardsInAllHandsCount copy() {
- return new CardsInAllHandsCount();
+ return CardsInAllHandsCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java
index 476057003c4..ea8cde0572d 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java
@@ -6,7 +6,8 @@ import mage.abilities.effects.Effect;
import mage.game.Game;
import mage.players.Player;
-public class CardsInControllerHandCount implements DynamicValue {
+public enum CardsInControllerHandCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -21,7 +22,7 @@ public class CardsInControllerHandCount implements DynamicValue {
@Override
public CardsInControllerHandCount copy() {
- return new CardsInControllerHandCount();
+ return CardsInControllerHandCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetHandCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetHandCount.java
index dd7ac467d9d..c5e63adb19c 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetHandCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetHandCount.java
@@ -6,7 +6,8 @@ import mage.abilities.effects.Effect;
import mage.game.Game;
import mage.players.Player;
-public class CardsInTargetHandCount implements DynamicValue {
+public enum CardsInTargetHandCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -21,7 +22,7 @@ public class CardsInTargetHandCount implements DynamicValue {
@Override
public DynamicValue copy() {
- return new CardsInTargetHandCount();
+ return CardsInTargetHandCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetPlayerHandCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetPlayerHandCount.java
index 393f45db14e..686f85b9596 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetPlayerHandCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetPlayerHandCount.java
@@ -7,10 +7,10 @@ import mage.game.Game;
import mage.players.Player;
/**
- *
* @author cbrianhill
*/
-public class CardsInTargetPlayerHandCount implements DynamicValue {
+public enum CardsInTargetPlayerHandCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -23,7 +23,7 @@ public class CardsInTargetPlayerHandCount implements DynamicValue {
@Override
public CardsInTargetPlayerHandCount copy() {
- return new CardsInTargetPlayerHandCount();
+ return CardsInTargetPlayerHandCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ControllerLifeCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ControllerLifeCount.java
index e756e77e3e4..512691fd8fe 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ControllerLifeCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ControllerLifeCount.java
@@ -6,7 +6,8 @@ import mage.abilities.effects.Effect;
import mage.game.Game;
import mage.players.Player;
-public class ControllerLifeCount implements DynamicValue {
+public enum ControllerLifeCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -19,7 +20,7 @@ public class ControllerLifeCount implements DynamicValue {
@Override
public ControllerLifeCount copy() {
- return new ControllerLifeCount();
+ return ControllerLifeCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java
index ef2ae61ed2d..d5b3fb0b137 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java
@@ -10,7 +10,8 @@ import mage.watchers.common.CreaturesDiedWatcher;
/**
* @author LoneFox
*/
-public class CreaturesDiedThisTurnCount implements DynamicValue {
+public enum CreaturesDiedThisTurnCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -23,7 +24,7 @@ public class CreaturesDiedThisTurnCount implements DynamicValue {
@Override
public CreaturesDiedThisTurnCount copy() {
- return new CreaturesDiedThisTurnCount();
+ return CreaturesDiedThisTurnCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java
index 145cf7ddafd..03e750bcc39 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java
@@ -11,7 +11,8 @@ import mage.game.Game;
/**
* @author LevelX2
*/
-public class DiscardCostCardConvertedMana implements DynamicValue {
+public enum DiscardCostCardConvertedMana implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -26,7 +27,7 @@ public class DiscardCostCardConvertedMana implements DynamicValue {
@Override
public DiscardCostCardConvertedMana copy() {
- return new DiscardCostCardConvertedMana();
+ return DiscardCostCardConvertedMana.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ExileFromHandCostCardConvertedMana.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ExileFromHandCostCardConvertedMana.java
index f13c39c2824..48bba827662 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ExileFromHandCostCardConvertedMana.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ExileFromHandCostCardConvertedMana.java
@@ -14,10 +14,10 @@ import mage.game.Game;
* cost. If no card was exiled the getManaCostsToPay().getX() will be used as
* value.
*
- *
* @author LevelX2
*/
-public class ExileFromHandCostCardConvertedMana implements DynamicValue {
+public enum ExileFromHandCostCardConvertedMana implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -35,7 +35,7 @@ public class ExileFromHandCostCardConvertedMana implements DynamicValue {
@Override
public ExileFromHandCostCardConvertedMana copy() {
- return new ExileFromHandCostCardConvertedMana();
+ return ExileFromHandCostCardConvertedMana.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/GetXValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/GetXValue.java
index 07c5eefe0f3..84a0302bb46 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/GetXValue.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/GetXValue.java
@@ -8,14 +8,15 @@ import mage.abilities.effects.Effect;
import mage.game.Game;
/**
- *
* @author BetaSteward_at_googlemail.com
*/
-public class GetXValue implements DynamicValue {
+public enum GetXValue implements DynamicValue {
+ instance;
+
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
int amount = 0;
- for (VariableCost cost: sourceAbility.getCosts().getVariableCosts()) {
+ for (VariableCost cost : sourceAbility.getCosts().getVariableCosts()) {
amount += cost.getAmount();
}
return amount;
@@ -23,7 +24,7 @@ public class GetXValue implements DynamicValue {
@Override
public GetXValue copy() {
- return new GetXValue();
+ return GetXValue.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/GreatestPowerAmongControlledCreaturesValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/GreatestPowerAmongControlledCreaturesValue.java
index a668e5c3375..714cc80a631 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/GreatestPowerAmongControlledCreaturesValue.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/GreatestPowerAmongControlledCreaturesValue.java
@@ -10,10 +10,10 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
/**
- *
* @author Styxo
*/
-public class GreatestPowerAmongControlledCreaturesValue implements DynamicValue {
+public enum GreatestPowerAmongControlledCreaturesValue implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -32,7 +32,7 @@ public class GreatestPowerAmongControlledCreaturesValue implements DynamicValue
@Override
public GreatestPowerAmongControlledCreaturesValue copy() {
- return new GreatestPowerAmongControlledCreaturesValue();
+ return GreatestPowerAmongControlledCreaturesValue.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManaSpentToCastCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManaSpentToCastCount.java
index 767c185e7a6..0ad7fed22b4 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManaSpentToCastCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManaSpentToCastCount.java
@@ -10,13 +10,10 @@ import mage.game.Game;
import mage.game.stack.Spell;
/**
- *
* @author LevelX2
*/
-public class ManaSpentToCastCount implements DynamicValue {
-
- public ManaSpentToCastCount() {
- }
+public enum ManaSpentToCastCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability source, Effect effect) {
@@ -36,7 +33,7 @@ public class ManaSpentToCastCount implements DynamicValue {
@Override
public ManaSpentToCastCount copy() {
- return new ManaSpentToCastCount();
+ return ManaSpentToCastCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManacostVariableValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManacostVariableValue.java
index e29a7a9a88f..bade65f5446 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManacostVariableValue.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManacostVariableValue.java
@@ -5,7 +5,8 @@ import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.game.Game;
-public class ManacostVariableValue implements DynamicValue {
+public enum ManacostVariableValue implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -14,7 +15,7 @@ public class ManacostVariableValue implements DynamicValue {
@Override
public ManacostVariableValue copy() {
- return new ManacostVariableValue();
+ return ManacostVariableValue.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/MorphManacostVariableValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/MorphManacostVariableValue.java
index b3f84b9a60f..bc137d87e22 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/MorphManacostVariableValue.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/MorphManacostVariableValue.java
@@ -11,10 +11,10 @@ import mage.abilities.effects.Effect;
import mage.game.Game;
/**
- *
* @author LevelX2
*/
-public class MorphManacostVariableValue implements DynamicValue {
+public enum MorphManacostVariableValue implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -27,7 +27,7 @@ public class MorphManacostVariableValue implements DynamicValue {
@Override
public MorphManacostVariableValue copy() {
- return new MorphManacostVariableValue();
+ return MorphManacostVariableValue.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/MultikickerCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/MultikickerCount.java
index 4d693677630..b4b583c1da6 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/MultikickerCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/MultikickerCount.java
@@ -9,20 +9,17 @@ import mage.cards.Card;
import mage.game.Game;
/**
- *
* @author LevelX2
*/
-public class MultikickerCount implements DynamicValue {
-
- public MultikickerCount() {
- }
+public enum MultikickerCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability source, Effect effect) {
int count = 0;
Card card = game.getCard(source.getSourceId());
if (card != null) {
- for (Ability ability: card.getAbilities()) {
+ for (Ability ability : card.getAbilities()) {
if (ability instanceof KickerAbility) {
count += ((KickerAbility) ability).getKickedCounter(game, source);
}
@@ -33,7 +30,7 @@ public class MultikickerCount implements DynamicValue {
@Override
public MultikickerCount copy() {
- return new MultikickerCount();
+ return MultikickerCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsCount.java
index 2435bb53add..d8eee3f6276 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsCount.java
@@ -8,7 +8,8 @@ import mage.game.Game;
/**
* @author JayDi85
*/
-public class OpponentsCount implements DynamicValue {
+public enum OpponentsCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -17,7 +18,7 @@ public class OpponentsCount implements DynamicValue {
@Override
public OpponentsCount copy() {
- return new OpponentsCount();
+ return OpponentsCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsPoisonCountersCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsPoisonCountersCount.java
index 8851841caa2..76f16fe6ad9 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsPoisonCountersCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsPoisonCountersCount.java
@@ -10,7 +10,8 @@ import mage.players.Player;
import java.util.Set;
import java.util.UUID;
-public class OpponentsPoisonCountersCount implements DynamicValue {
+public enum OpponentsPoisonCountersCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -27,7 +28,7 @@ public class OpponentsPoisonCountersCount implements DynamicValue {
@Override
public DynamicValue copy() {
- return new OpponentsPoisonCountersCount();
+ return OpponentsPoisonCountersCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsYouOwnThatOpponentsControlCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsYouOwnThatOpponentsControlCount.java
index 66c49c96185..3a98ec1d655 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsYouOwnThatOpponentsControlCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsYouOwnThatOpponentsControlCount.java
@@ -1,15 +1,17 @@
package mage.abilities.dynamicvalue.common;
-import java.util.Set;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.game.Game;
import mage.game.permanent.Permanent;
-public class PermanentsYouOwnThatOpponentsControlCount implements DynamicValue {
+import java.util.Set;
+import java.util.UUID;
+
+public enum PermanentsYouOwnThatOpponentsControlCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -28,7 +30,7 @@ public class PermanentsYouOwnThatOpponentsControlCount implements DynamicValue {
@Override
public PermanentsYouOwnThatOpponentsControlCount copy() {
- return new PermanentsYouOwnThatOpponentsControlCount();
+ return PermanentsYouOwnThatOpponentsControlCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/RemovedCountersForCostValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/RemovedCountersForCostValue.java
index 26c45840993..2b8620a5611 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/RemovedCountersForCostValue.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/RemovedCountersForCostValue.java
@@ -13,10 +13,10 @@ import mage.abilities.effects.Effect;
import mage.game.Game;
/**
- *
* @author LevelX2
*/
-public class RemovedCountersForCostValue implements DynamicValue {
+public enum RemovedCountersForCostValue implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -35,7 +35,7 @@ public class RemovedCountersForCostValue implements DynamicValue {
@Override
public RemovedCountersForCostValue copy() {
- return new RemovedCountersForCostValue();
+ return RemovedCountersForCostValue.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java
index b7574ac2f58..f9994726cc9 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java
@@ -13,10 +13,10 @@ import mage.abilities.effects.Effect;
import mage.game.Game;
/**
- *
* @author emerald000
*/
-public class RevealTargetFromHandCostCount implements DynamicValue {
+public enum RevealTargetFromHandCostCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -35,7 +35,7 @@ public class RevealTargetFromHandCostCount implements DynamicValue {
@Override
public RevealTargetFromHandCostCount copy() {
- return new RevealTargetFromHandCostCount();
+ return RevealTargetFromHandCostCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesPower.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesPower.java
index 290a303c887..4cdaed1a82c 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesPower.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesPower.java
@@ -10,8 +10,8 @@ import mage.game.Game;
/**
* @author LevelX2
*/
-public class SacrificeCostCreaturesPower implements DynamicValue {
-
+public enum SacrificeCostCreaturesPower implements DynamicValue {
+instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
for (Cost cost : sourceAbility.getCosts()) {
@@ -26,7 +26,7 @@ public class SacrificeCostCreaturesPower implements DynamicValue {
@Override
public SacrificeCostCreaturesPower copy() {
- return new SacrificeCostCreaturesPower();
+ return SacrificeCostCreaturesPower.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesToughness.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesToughness.java
index bfc03a261ce..514b24f8a3f 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesToughness.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesToughness.java
@@ -10,7 +10,8 @@ import mage.game.Game;
/**
* @author LevelX2
*/
-public class SacrificeCostCreaturesToughness implements DynamicValue {
+public enum SacrificeCostCreaturesToughness implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -25,7 +26,7 @@ public class SacrificeCostCreaturesToughness implements DynamicValue {
@Override
public SacrificeCostCreaturesToughness copy() {
- return new SacrificeCostCreaturesToughness();
+ return SacrificeCostCreaturesToughness.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/SunburstCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SunburstCount.java
index d42cc3f5281..6c49909cad5 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/SunburstCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SunburstCount.java
@@ -10,14 +10,10 @@ import mage.game.stack.Spell;
import mage.game.stack.StackObject;
/**
- *
* @author Nicolas
*/
-public class SunburstCount implements DynamicValue {
-
- public SunburstCount() {
-
- }
+public enum SunburstCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability source, Effect effect) {
@@ -48,7 +44,7 @@ public class SunburstCount implements DynamicValue {
@Override
public SunburstCount copy() {
- return new SunburstCount();
+ return SunburstCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetConvertedManaCost.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetConvertedManaCost.java
index 7be84e3585c..26fe5ed8f5a 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetConvertedManaCost.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetConvertedManaCost.java
@@ -8,10 +8,10 @@ import mage.cards.Card;
import mage.game.Game;
/**
- *
* @author North
*/
-public class TargetConvertedManaCost implements DynamicValue {
+public enum TargetConvertedManaCost implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability source, Effect effect) {
@@ -24,7 +24,7 @@ public class TargetConvertedManaCost implements DynamicValue {
@Override
public TargetConvertedManaCost copy() {
- return new TargetConvertedManaCost();
+ return instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetPermanentPowerCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetPermanentPowerCount.java
index 814eb19970d..ab7e13d4b97 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetPermanentPowerCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetPermanentPowerCount.java
@@ -9,10 +9,10 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
/**
- *
* @author North
*/
-public class TargetPermanentPowerCount implements DynamicValue {
+public enum TargetPermanentPowerCount implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -29,7 +29,7 @@ public class TargetPermanentPowerCount implements DynamicValue {
@Override
public TargetPermanentPowerCount copy() {
- return new TargetPermanentPowerCount();
+ return TargetPermanentPowerCount.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ZuberasDiedDynamicValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ZuberasDiedDynamicValue.java
index e81289233cc..c9310b63115 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/ZuberasDiedDynamicValue.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ZuberasDiedDynamicValue.java
@@ -9,20 +9,21 @@ import mage.watchers.common.ZuberasDiedWatcher;
/**
* Created by Eric on 9/24/2016.
*/
-public class ZuberasDiedDynamicValue implements DynamicValue {
+public enum ZuberasDiedDynamicValue implements DynamicValue {
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
ZuberasDiedWatcher watcher = game.getState().getWatcher(ZuberasDiedWatcher.class);
- if(watcher == null){
+ if (watcher == null) {
return 0;
}
- return watcher.getZuberasDiedThisTurn();
+ return watcher.getZuberasDiedThisTurn();
}
@Override
public ZuberasDiedDynamicValue copy() {
- return new ZuberasDiedDynamicValue();
+ return ZuberasDiedDynamicValue.instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java b/Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java
index e5aabcfe010..434b57f96a2 100644
--- a/Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java
+++ b/Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java
@@ -50,7 +50,7 @@ public class SunburstAbility extends EntersBattlefieldAbility {
class SunburstEffect extends OneShotEffect {
- private static final DynamicValue amount = new SunburstCount();
+ private static final DynamicValue amount = SunburstCount.instance;
public SunburstEffect() {
super(Outcome.Benefit);
diff --git a/Mage/src/main/java/mage/game/command/emblems/ObNixilisOfTheBlackOathEmblem.java b/Mage/src/main/java/mage/game/command/emblems/ObNixilisOfTheBlackOathEmblem.java
index c324972d068..4131d1b3237 100644
--- a/Mage/src/main/java/mage/game/command/emblems/ObNixilisOfTheBlackOathEmblem.java
+++ b/Mage/src/main/java/mage/game/command/emblems/ObNixilisOfTheBlackOathEmblem.java
@@ -24,7 +24,7 @@ public final class ObNixilisOfTheBlackOathEmblem extends Emblem {
// You get an emblem with "{1}{B}, Sacrifice a creature: You gain X life and draw X cards, where X is the sacrificed creature's power."
public ObNixilisOfTheBlackOathEmblem() {
this.setName("Emblem Nixilis");
- DynamicValue xValue = new SacrificeCostCreaturesPower();
+ DynamicValue xValue = SacrificeCostCreaturesPower.instance;
Effect effect = new GainLifeEffect(xValue);
effect.setText("You gain X life");
Ability ability = new SimpleActivatedAbility(Zone.COMMAND, effect, new ManaCostsImpl("{1}{B}"));
diff --git a/Mage/src/main/java/mage/game/command/planes/FeedingGroundsPlane.java b/Mage/src/main/java/mage/game/command/planes/FeedingGroundsPlane.java
index bf125dadf41..04fb098a1fb 100644
--- a/Mage/src/main/java/mage/game/command/planes/FeedingGroundsPlane.java
+++ b/Mage/src/main/java/mage/game/command/planes/FeedingGroundsPlane.java
@@ -53,7 +53,7 @@ public class FeedingGroundsPlane extends Plane {
this.getAbilities().add(ability);
// Active player can roll the planar die: Whenever you roll {CHAOS}, target red or green creature gets X +1/+1 counters
- Effect chaosEffect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(), new TargetConvertedManaCost());
+ Effect chaosEffect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(), TargetConvertedManaCost.instance);
Target chaosTarget = new TargetCreaturePermanent(1, 1, filter, false);
List chaosEffects = new ArrayList();