diff --git a/Mage.Sets/src/mage/cards/a/AcclaimedContender.java b/Mage.Sets/src/mage/cards/a/AcclaimedContender.java index 7dfaf13e36..59ebda2d7e 100644 --- a/Mage.Sets/src/mage/cards/a/AcclaimedContender.java +++ b/Mage.Sets/src/mage/cards/a/AcclaimedContender.java @@ -59,7 +59,7 @@ public final class AcclaimedContender extends CardImpl { // When Acclaimed Contender enters the battlefield, if you control another Knight, look at the top five cards of your library. You may reveal a Knight, Aura, Equipment, or legendary artifact card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), filter2, Zone.LIBRARY, false, + StaticValue.get(5), false, StaticValue.get(1), filter2, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true)), condition, "When {this} enters the battlefield, " + "if you control another Knight, look at the top five cards of your library. " + diff --git a/Mage.Sets/src/mage/cards/a/AdventurousImpulse.java b/Mage.Sets/src/mage/cards/a/AdventurousImpulse.java index 8e2cc8cdf6..bcc789c74d 100644 --- a/Mage.Sets/src/mage/cards/a/AdventurousImpulse.java +++ b/Mage.Sets/src/mage/cards/a/AdventurousImpulse.java @@ -27,7 +27,7 @@ public final class AdventurousImpulse extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}"); //Look at the top three cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), filter, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), filter, false)); } diff --git a/Mage.Sets/src/mage/cards/a/AjanisInfluence.java b/Mage.Sets/src/mage/cards/a/AjanisInfluence.java index f8dd582e05..c751240d10 100644 --- a/Mage.Sets/src/mage/cards/a/AjanisInfluence.java +++ b/Mage.Sets/src/mage/cards/a/AjanisInfluence.java @@ -35,7 +35,7 @@ public final class AjanisInfluence extends CardImpl { // Look at the top five cards of your library. You may reveal a white card form among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), filter, + StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true).setText("Look at the top five cards of your library. " + "You may reveal a white card from among them and put it into your hand. " diff --git a/Mage.Sets/src/mage/cards/a/AkiriLineSlinger.java b/Mage.Sets/src/mage/cards/a/AkiriLineSlinger.java index 3dc3fdf14c..ef937537b2 100644 --- a/Mage.Sets/src/mage/cards/a/AkiriLineSlinger.java +++ b/Mage.Sets/src/mage/cards/a/AkiriLineSlinger.java @@ -46,7 +46,7 @@ public final class AkiriLineSlinger extends CardImpl { this.addAbility(VigilanceAbility.getInstance()); // Akiri, Line-Slinger gets +1/+0 for each artifact you control. - Effect effect = new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.WhileOnBattlefield); + Effect effect = new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.WhileOnBattlefield); effect.setText("{this} gets +1/+0 for each artifact you control"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/a/AkroanHoplite.java b/Mage.Sets/src/mage/cards/a/AkroanHoplite.java index d19cdaf3b6..3a9d6a906e 100644 --- a/Mage.Sets/src/mage/cards/a/AkroanHoplite.java +++ b/Mage.Sets/src/mage/cards/a/AkroanHoplite.java @@ -39,7 +39,7 @@ public final class AkroanHoplite extends CardImpl { this.toughness = new MageInt(2); // Whenever Akroan Hoplite attacks, it gets +X/+0 until end of turn, where X is the number of attacking creatures you control. - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.EndOfTurn, true), false)); } public AkroanHoplite(final AkroanHoplite card) { diff --git a/Mage.Sets/src/mage/cards/a/AllHallowsEve.java b/Mage.Sets/src/mage/cards/a/AllHallowsEve.java index d61463522c..62e2cdcf70 100644 --- a/Mage.Sets/src/mage/cards/a/AllHallowsEve.java +++ b/Mage.Sets/src/mage/cards/a/AllHallowsEve.java @@ -31,7 +31,7 @@ public final class AllHallowsEve extends CardImpl { // Exile All Hallow's Eve with two scream counters on it. this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); - Effect effect = new AddCountersSourceEffect(CounterType.SCREAM.createInstance(), new StaticValue(2), true, true); + Effect effect = new AddCountersSourceEffect(CounterType.SCREAM.createInstance(), StaticValue.get(2), true, true); effect.setText("with 2 scream counters on it"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/a/AncestralMemories.java b/Mage.Sets/src/mage/cards/a/AncestralMemories.java index 008fe2f058..b7fb61cb3b 100644 --- a/Mage.Sets/src/mage/cards/a/AncestralMemories.java +++ b/Mage.Sets/src/mage/cards/a/AncestralMemories.java @@ -26,7 +26,7 @@ public final class AncestralMemories extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}{U}"); // Look at the top seven cards of your library. Put two of them into your hand and the rest into your graveyard. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(7), false, new StaticValue(2), + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(7), false, StaticValue.get(2), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false)); } diff --git a/Mage.Sets/src/mage/cards/a/AncientStirrings.java b/Mage.Sets/src/mage/cards/a/AncientStirrings.java index 490c2641f5..6186b701d5 100644 --- a/Mage.Sets/src/mage/cards/a/AncientStirrings.java +++ b/Mage.Sets/src/mage/cards/a/AncientStirrings.java @@ -29,7 +29,7 @@ public final class AncientStirrings extends CardImpl { // Look at the top five cards of your library. You may reveal a colorless card from among them and put it into your hand. // Then put the rest on the bottom of your library in any order. (Cards with no colored mana in their mana costs are colorless. Lands are also colorless.) - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1), filter, Zone.LIBRARY, + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true)); } diff --git a/Mage.Sets/src/mage/cards/a/Anticipate.java b/Mage.Sets/src/mage/cards/a/Anticipate.java index 69db6614b5..3610f73c96 100644 --- a/Mage.Sets/src/mage/cards/a/Anticipate.java +++ b/Mage.Sets/src/mage/cards/a/Anticipate.java @@ -21,7 +21,7 @@ public final class Anticipate extends CardImpl { // Look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order. this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect - (new StaticValue(3), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false)); + (StaticValue.get(3), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false)); } public Anticipate(final Anticipate card) { diff --git a/Mage.Sets/src/mage/cards/a/ArcBlade.java b/Mage.Sets/src/mage/cards/a/ArcBlade.java index a46a4a804e..f9f194d70f 100644 --- a/Mage.Sets/src/mage/cards/a/ArcBlade.java +++ b/Mage.Sets/src/mage/cards/a/ArcBlade.java @@ -29,7 +29,7 @@ public final class ArcBlade extends CardImpl { // Exile Arc Blade this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); // with three time counters on it. - Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), new StaticValue(3), false, true); + Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), false, true); effect.setText("with 3 time counters on it"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetAnyTarget()); diff --git a/Mage.Sets/src/mage/cards/a/ArcaneDenial.java b/Mage.Sets/src/mage/cards/a/ArcaneDenial.java index 40d3f369d1..5609c3c536 100644 --- a/Mage.Sets/src/mage/cards/a/ArcaneDenial.java +++ b/Mage.Sets/src/mage/cards/a/ArcaneDenial.java @@ -75,7 +75,7 @@ class ArcaneDenialEffect extends OneShotEffect { countered = true; } if (controller != null) { - Effect effect = new DrawCardTargetEffect(new StaticValue(2), false, true); + Effect effect = new DrawCardTargetEffect(StaticValue.get(2), false, true); effect.setTargetPointer(new FixedTarget(controller.getId())); effect.setText("Its controller may draw up to two cards"); DelayedTriggeredAbility ability = new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(effect); diff --git a/Mage.Sets/src/mage/cards/a/ArcanistsOwl.java b/Mage.Sets/src/mage/cards/a/ArcanistsOwl.java index 4684c16b20..c3dec2d694 100644 --- a/Mage.Sets/src/mage/cards/a/ArcanistsOwl.java +++ b/Mage.Sets/src/mage/cards/a/ArcanistsOwl.java @@ -35,7 +35,7 @@ public final class ArcanistsOwl extends CardImpl { // When Arcanist's Owl enters the battlefield, look at the top four cards of your library. You may reveal an artifact or enchantment card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.addAbility(new EntersBattlefieldTriggeredAbility( new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(1), filter, + StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true).setText("Look at the top four cards of your library. " + diff --git a/Mage.Sets/src/mage/cards/a/Arcbond.java b/Mage.Sets/src/mage/cards/a/Arcbond.java index b572b6f642..9c01e62c67 100644 --- a/Mage.Sets/src/mage/cards/a/Arcbond.java +++ b/Mage.Sets/src/mage/cards/a/Arcbond.java @@ -139,7 +139,7 @@ class ArcbondEffect extends OneShotEffect { } FilterPermanent filter = new FilterCreaturePermanent("each other creature"); filter.add(Predicates.not(new PermanentIdPredicate(sourceId))); - return new DamageEverythingEffect(new StaticValue(damage), filter, sourceId).apply(game, source); + return new DamageEverythingEffect(StaticValue.get(damage), filter, sourceId).apply(game, source); } return false; } diff --git a/Mage.Sets/src/mage/cards/a/ArmageddonClock.java b/Mage.Sets/src/mage/cards/a/ArmageddonClock.java index ab44b0fe73..1bacb43868 100644 --- a/Mage.Sets/src/mage/cards/a/ArmageddonClock.java +++ b/Mage.Sets/src/mage/cards/a/ArmageddonClock.java @@ -28,7 +28,7 @@ public final class ArmageddonClock extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // At the beginning of your upkeep, put a doom counter on Armageddon Clock. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.DOOM.createInstance(), new StaticValue(1), true), TargetController.YOU, false)); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.DOOM.createInstance(), StaticValue.get(1), true), TargetController.YOU, false)); // At the beginning of your draw step, Armageddon Clock deals damage equal to the number of doom counters on it to each player. this.addAbility(new BeginningOfDrawTriggeredAbility(new DamagePlayersEffect(Outcome.Damage, new CountersSourceCount(CounterType.DOOM)) .setText("{this} deals damage equal to the number of doom counters on it to each player"), TargetController.YOU, false)); diff --git a/Mage.Sets/src/mage/cards/a/ArterialFlow.java b/Mage.Sets/src/mage/cards/a/ArterialFlow.java index e5b9848f22..7cd6f7bfa2 100644 --- a/Mage.Sets/src/mage/cards/a/ArterialFlow.java +++ b/Mage.Sets/src/mage/cards/a/ArterialFlow.java @@ -31,7 +31,7 @@ public final class ArterialFlow extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{B}"); // Each opponent discards two cards. - this.getSpellAbility().addEffect(new DiscardEachPlayerEffect(new StaticValue(2), false, TargetController.OPPONENT)); + this.getSpellAbility().addEffect(new DiscardEachPlayerEffect(StaticValue.get(2), false, TargetController.OPPONENT)); // If you control a Vampire, each opponent loses 2 life and you gain 2 life. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new LoseLifeOpponentsEffect(2), new PermanentsOnTheBattlefieldCondition(filter), "If you control a Vampire, each opponent loses 2 life")); diff --git a/Mage.Sets/src/mage/cards/a/AsForetold.java b/Mage.Sets/src/mage/cards/a/AsForetold.java index e5cf038407..ddbf71d310 100644 --- a/Mage.Sets/src/mage/cards/a/AsForetold.java +++ b/Mage.Sets/src/mage/cards/a/AsForetold.java @@ -34,7 +34,7 @@ public final class AsForetold extends CardImpl { new BeginningOfUpkeepTriggeredAbility( new AddCountersSourceEffect( CounterType.TIME.createInstance(), - new StaticValue(1), + StaticValue.get(1), true), TargetController.YOU, false)); diff --git a/Mage.Sets/src/mage/cards/a/Aurochs.java b/Mage.Sets/src/mage/cards/a/Aurochs.java index ddd1acbe40..4960ec3865 100644 --- a/Mage.Sets/src/mage/cards/a/Aurochs.java +++ b/Mage.Sets/src/mage/cards/a/Aurochs.java @@ -40,7 +40,7 @@ public final class Aurochs extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Whenever Aurochs attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter1, 1); - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, new StaticValue(0), Duration.EndOfTurn, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, StaticValue.get(0), Duration.EndOfTurn, true), false)); } public Aurochs(final Aurochs card) { diff --git a/Mage.Sets/src/mage/cards/a/AurochsHerd.java b/Mage.Sets/src/mage/cards/a/AurochsHerd.java index 62223e8f2e..3434b0ab19 100644 --- a/Mage.Sets/src/mage/cards/a/AurochsHerd.java +++ b/Mage.Sets/src/mage/cards/a/AurochsHerd.java @@ -49,7 +49,7 @@ public final class AurochsHerd extends CardImpl { new TargetCardInLibrary(filter1), true), true)); // Whenever Aurochs Herd attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter2, 1); - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, new StaticValue(0), Duration.EndOfTurn, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, StaticValue.get(0), Duration.EndOfTurn, true), false)); } public AurochsHerd(final AurochsHerd card) { diff --git a/Mage.Sets/src/mage/cards/a/AzcantaTheSunkenRuin.java b/Mage.Sets/src/mage/cards/a/AzcantaTheSunkenRuin.java index a3161a53af..ac9524d8de 100644 --- a/Mage.Sets/src/mage/cards/a/AzcantaTheSunkenRuin.java +++ b/Mage.Sets/src/mage/cards/a/AzcantaTheSunkenRuin.java @@ -48,7 +48,7 @@ public final class AzcantaTheSunkenRuin extends CardImpl { Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(1), + StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, true ), new ManaCostsImpl<>("{2}{U}") ); diff --git a/Mage.Sets/src/mage/cards/b/BalduvianRage.java b/Mage.Sets/src/mage/cards/b/BalduvianRage.java index 9f3e910722..0fe88f380d 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(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(ManacostVariableValue.instance, StaticValue.get(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/BedeckBedazzle.java b/Mage.Sets/src/mage/cards/b/BedeckBedazzle.java index 514dd6b598..cecff56cfc 100644 --- a/Mage.Sets/src/mage/cards/b/BedeckBedazzle.java +++ b/Mage.Sets/src/mage/cards/b/BedeckBedazzle.java @@ -75,7 +75,7 @@ class BedazzleEffect extends OneShotEffect { if (permanent != null) { permanent.destroy(source.getSourceId(), game, false); } - Effect effect = new DamageTargetEffect(new StaticValue(2), true, "", true); + Effect effect = new DamageTargetEffect(StaticValue.get(2), true, "", true); effect.setTargetPointer(new FixedTarget(source.getTargets().get(1).getFirstTarget(), game)); effect.apply(game, source); return true; diff --git a/Mage.Sets/src/mage/cards/b/BelltowerSphinx.java b/Mage.Sets/src/mage/cards/b/BelltowerSphinx.java index 832d83f0d6..4ef63a4281 100644 --- a/Mage.Sets/src/mage/cards/b/BelltowerSphinx.java +++ b/Mage.Sets/src/mage/cards/b/BelltowerSphinx.java @@ -75,7 +75,7 @@ class BelltowerSphinxEffect extends TriggeredAbilityImpl { Player player = game.getPlayer(controller); if (player != null) { getEffects().get(0).setTargetPointer(new FixedTarget(player.getId())); - ((PutLibraryIntoGraveTargetEffect) getEffects().get(0)).setAmount(new StaticValue(event.getAmount())); + ((PutLibraryIntoGraveTargetEffect) getEffects().get(0)).setAmount(StaticValue.get(event.getAmount())); return true; } } diff --git a/Mage.Sets/src/mage/cards/b/BenalishHonorGuard.java b/Mage.Sets/src/mage/cards/b/BenalishHonorGuard.java index ed878bde48..6cca792f35 100644 --- a/Mage.Sets/src/mage/cards/b/BenalishHonorGuard.java +++ b/Mage.Sets/src/mage/cards/b/BenalishHonorGuard.java @@ -39,7 +39,7 @@ public final class BenalishHonorGuard extends CardImpl { // Benalish Honor Guard gets +1/+0 for each legendary creature you control. PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, StaticValue.get(0), Duration.WhileOnBattlefield))); } public BenalishHonorGuard(final BenalishHonorGuard card) { diff --git a/Mage.Sets/src/mage/cards/b/Berserk.java b/Mage.Sets/src/mage/cards/b/Berserk.java index cd620758c5..2cb2a76011 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(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true); + effect = new BoostTargetEffect(TargetPermanentPowerCount.instance, StaticValue.get(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/BiteOfTheBlackRose.java b/Mage.Sets/src/mage/cards/b/BiteOfTheBlackRose.java index 2eb7cef394..e31af9ce41 100644 --- a/Mage.Sets/src/mage/cards/b/BiteOfTheBlackRose.java +++ b/Mage.Sets/src/mage/cards/b/BiteOfTheBlackRose.java @@ -78,7 +78,7 @@ class BiteOfTheBlackRoseEffect extends OneShotEffect { ContinuousEffect effect = new BoostOpponentsEffect(-2, -2, Duration.EndOfTurn); game.addEffect(effect, source); } else { - new DiscardEachPlayerEffect(new StaticValue(2), false, TargetController.OPPONENT).apply(game, source); + new DiscardEachPlayerEffect(StaticValue.get(2), false, TargetController.OPPONENT).apply(game, source); } return true; } diff --git a/Mage.Sets/src/mage/cards/b/BitterRevelation.java b/Mage.Sets/src/mage/cards/b/BitterRevelation.java index fed897d761..2787c1c3fa 100644 --- a/Mage.Sets/src/mage/cards/b/BitterRevelation.java +++ b/Mage.Sets/src/mage/cards/b/BitterRevelation.java @@ -20,7 +20,7 @@ public final class BitterRevelation extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}"); // Look at the top four cards of your library. Put two of them into your hand and the rest into your graveyard. You lose 2 life. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(2), + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(2), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false)); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/b/BlazingShoal.java b/Mage.Sets/src/mage/cards/b/BlazingShoal.java index 9f6238b97e..ddf99ccecf 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(ExileFromHandCostCardConvertedMana.instance, new StaticValue(0), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(ExileFromHandCostCardConvertedMana.instance, StaticValue.get(0), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/b/BloodLust.java b/Mage.Sets/src/mage/cards/b/BloodLust.java index c9ac2e0070..4f3cc6291b 100644 --- a/Mage.Sets/src/mage/cards/b/BloodLust.java +++ b/Mage.Sets/src/mage/cards/b/BloodLust.java @@ -39,7 +39,7 @@ public final class BloodLust extends CardImpl { // If target creature has toughness 5 or greater, it gets +4/-4 until end of turn. Otherwise, it gets +4/-X until end of turn, where X is its toughness minus 1. this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new BoostTargetEffect(4, -4, Duration.EndOfTurn), - new BoostTargetEffect(new StaticValue(4), new SignInversionDynamicValue(TargetPermanentToughnessMinus1Value.instance), Duration.WhileOnBattlefield), + new BoostTargetEffect(StaticValue.get(4), new SignInversionDynamicValue(TargetPermanentToughnessMinus1Value.instance), Duration.WhileOnBattlefield), new TargetMatchesFilterCondition(filter), "If target creature has toughness 5 or greater, it gets +4/-4 until end of turn. Otherwise, it gets +4/-X until end of turn, where X is its toughness minus 1")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/b/BloodcurdlingScream.java b/Mage.Sets/src/mage/cards/b/BloodcurdlingScream.java index 50d803fc36..0a5c9f99fc 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(ExileFromHandCostCardConvertedMana.instance, new StaticValue(0), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(ExileFromHandCostCardConvertedMana.instance, StaticValue.get(0), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/b/BoardTheWeatherlight.java b/Mage.Sets/src/mage/cards/b/BoardTheWeatherlight.java index cebfdf8ec6..bee629017e 100644 --- a/Mage.Sets/src/mage/cards/b/BoardTheWeatherlight.java +++ b/Mage.Sets/src/mage/cards/b/BoardTheWeatherlight.java @@ -28,7 +28,7 @@ public final class BoardTheWeatherlight extends CardImpl { // Look at the top five cards of your library. You may reveal a historic card from among them and put it into your hand. Put the rest on the bottom of your library in random order. this.getSpellAbility().addEffect( new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), filter, + StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false) .setBackInRandomOrder(true) .setText("Look at the top five cards of your library. You may reveal a historic card from among them" diff --git a/Mage.Sets/src/mage/cards/b/BondOfFlourishing.java b/Mage.Sets/src/mage/cards/b/BondOfFlourishing.java index bba9076cfe..840a0fe576 100644 --- a/Mage.Sets/src/mage/cards/b/BondOfFlourishing.java +++ b/Mage.Sets/src/mage/cards/b/BondOfFlourishing.java @@ -23,8 +23,8 @@ public final class BondOfFlourishing extends CardImpl { // Look at the top three card of your library. You may reveal a permanent card from among them and put it into your hand. Put the rest on the bottom of your library in any order. You gain 3 life. this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect( - new StaticValue(3), false, - new StaticValue(1), filter, false + StaticValue.get(3), false, + StaticValue.get(1), filter, false )); this.getSpellAbility().addEffect(new GainLifeEffect(3).setText("You gain 3 life.")); } diff --git a/Mage.Sets/src/mage/cards/b/BullAurochs.java b/Mage.Sets/src/mage/cards/b/BullAurochs.java index 7da88699f1..9fe75590cc 100644 --- a/Mage.Sets/src/mage/cards/b/BullAurochs.java +++ b/Mage.Sets/src/mage/cards/b/BullAurochs.java @@ -40,7 +40,7 @@ public final class BullAurochs extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Whenever Bull Aurochs attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter, 1); - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, new StaticValue(0), Duration.EndOfTurn, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, StaticValue.get(0), Duration.EndOfTurn, true), false)); } public BullAurochs(final BullAurochs card) { diff --git a/Mage.Sets/src/mage/cards/b/BurglarRat.java b/Mage.Sets/src/mage/cards/b/BurglarRat.java index f6efa16d72..3663dcf96e 100644 --- a/Mage.Sets/src/mage/cards/b/BurglarRat.java +++ b/Mage.Sets/src/mage/cards/b/BurglarRat.java @@ -27,7 +27,7 @@ public final class BurglarRat extends CardImpl { // When Burglar Rat enters the battlefield, each opponent discards a card. this.addAbility(new EntersBattlefieldTriggeredAbility( new DiscardEachPlayerEffect( - new StaticValue(1), false, + StaticValue.get(1), false, TargetController.OPPONENT ) )); diff --git a/Mage.Sets/src/mage/cards/b/BurningTreeShaman.java b/Mage.Sets/src/mage/cards/b/BurningTreeShaman.java index 18b29ddd9b..4ea90941b3 100644 --- a/Mage.Sets/src/mage/cards/b/BurningTreeShaman.java +++ b/Mage.Sets/src/mage/cards/b/BurningTreeShaman.java @@ -48,7 +48,7 @@ public final class BurningTreeShaman extends CardImpl { class BurningTreeShamanTriggeredAbility extends TriggeredAbilityImpl { BurningTreeShamanTriggeredAbility() { - super(Zone.BATTLEFIELD, new DamageTargetEffect(new StaticValue(1), true, "that player", true)); + super(Zone.BATTLEFIELD, new DamageTargetEffect(StaticValue.get(1), true, "that player", true)); } BurningTreeShamanTriggeredAbility(final BurningTreeShamanTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/c/CabalPaladin.java b/Mage.Sets/src/mage/cards/c/CabalPaladin.java index 27fcd64de7..e68cdcdf4e 100644 --- a/Mage.Sets/src/mage/cards/c/CabalPaladin.java +++ b/Mage.Sets/src/mage/cards/c/CabalPaladin.java @@ -30,7 +30,7 @@ public final class CabalPaladin extends CardImpl { // Whenever you cast a historic spell, Cabal Paladin deals 2 damage to each opponent. this.addAbility(new SpellCastControllerTriggeredAbility( - new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT) + new DamagePlayersEffect(Outcome.Damage, StaticValue.get(2), TargetController.OPPONENT) .setText("{this} deals 2 damage to each opponent. (Artifacts, legendaries, and Sagas are historic.)"), new FilterHistoricSpell("a historic spell"), false )); diff --git a/Mage.Sets/src/mage/cards/c/CacklingWitch.java b/Mage.Sets/src/mage/cards/c/CacklingWitch.java index 37f93e1542..efd5f51c73 100644 --- a/Mage.Sets/src/mage/cards/c/CacklingWitch.java +++ b/Mage.Sets/src/mage/cards/c/CacklingWitch.java @@ -35,7 +35,7 @@ public final class CacklingWitch extends CardImpl { // {X}{B}, {tap}, Discard a card: Target creature gets +X/+0 until end of turn. ManacostVariableValue manaX = ManacostVariableValue.instance; Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new BoostTargetEffect(manaX, new StaticValue(0), Duration.EndOfTurn), + new BoostTargetEffect(manaX, StaticValue.get(0), Duration.EndOfTurn), new ManaCostsImpl("{X}{B}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); diff --git a/Mage.Sets/src/mage/cards/c/CaligoSkinWitch.java b/Mage.Sets/src/mage/cards/c/CaligoSkinWitch.java index 1ecf21e9cc..8d57cd27aa 100644 --- a/Mage.Sets/src/mage/cards/c/CaligoSkinWitch.java +++ b/Mage.Sets/src/mage/cards/c/CaligoSkinWitch.java @@ -34,7 +34,7 @@ public final class CaligoSkinWitch extends CardImpl { // When Caligo Skin-Witch enters the battlefield, if it was kicked, each opponent discards two cards. this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect( - new StaticValue(2), + StaticValue.get(2), false, TargetController.OPPONENT )), diff --git a/Mage.Sets/src/mage/cards/c/CapitalPunishment.java b/Mage.Sets/src/mage/cards/c/CapitalPunishment.java index 12d184d282..9974a47e66 100644 --- a/Mage.Sets/src/mage/cards/c/CapitalPunishment.java +++ b/Mage.Sets/src/mage/cards/c/CapitalPunishment.java @@ -69,7 +69,7 @@ class CapitalPunishmentDilemmaEffect extends CouncilsDilemmaVoteEffect { //Taxes Votes if (voteTwoCount > 0) { - Effect discardEffect = new DiscardEachPlayerEffect(new StaticValue(voteTwoCount), false, TargetController.OPPONENT); + Effect discardEffect = new DiscardEachPlayerEffect(StaticValue.get(voteTwoCount), false, TargetController.OPPONENT); discardEffect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java b/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java index 66a1e08ca2..5e9a1f97aa 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java +++ b/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java @@ -34,7 +34,7 @@ public final class ChandraPyrogenius extends CardImpl { this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5)); // +2: Chandra, Pyrogenius deals 2 damage to each opponent. - this.addAbility(new LoyaltyAbility(new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT), 2)); + this.addAbility(new LoyaltyAbility(new DamagePlayersEffect(Outcome.Damage, StaticValue.get(2), TargetController.OPPONENT), 2)); // -3: Chandra, Pyrogenius deals 4 damage to target creature. LoyaltyAbility ability = new LoyaltyAbility(new DamageTargetEffect(4), -3); diff --git a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java index f0b547ad53..793e0dfe27 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java +++ b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java @@ -103,7 +103,7 @@ class ChandraTorchOfDefianceEffect extends OneShotEffect { } } if (!cardWasCast) { - new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT).apply(game, source); + new DamagePlayersEffect(Outcome.Damage, StaticValue.get(2), TargetController.OPPONENT).apply(game, source); } } return true; diff --git a/Mage.Sets/src/mage/cards/c/ChronomanticEscape.java b/Mage.Sets/src/mage/cards/c/ChronomanticEscape.java index 85e5095570..4ee2d599a6 100644 --- a/Mage.Sets/src/mage/cards/c/ChronomanticEscape.java +++ b/Mage.Sets/src/mage/cards/c/ChronomanticEscape.java @@ -29,7 +29,7 @@ public final class ChronomanticEscape extends CardImpl { // Until your next turn, creatures can't attack you. Exile Chronomantic Escape with three time counters on it. getSpellAbility().addEffect(new CantAttackYouAllEffect(Duration.UntilYourNextTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); getSpellAbility().addEffect(ExileSpellEffect.getInstance()); - Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), new StaticValue(3), true, true); + Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), true, true); effect.setText("with 3 time counters on it"); getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/c/CivicSaber.java b/Mage.Sets/src/mage/cards/c/CivicSaber.java index 9324cef5ed..1120b59252 100644 --- a/Mage.Sets/src/mage/cards/c/CivicSaber.java +++ b/Mage.Sets/src/mage/cards/c/CivicSaber.java @@ -31,7 +31,7 @@ public final class CivicSaber extends CardImpl { this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0 for each of its colors. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CivicSaberColorCount(), new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CivicSaberColorCount(), StaticValue.get(0), Duration.WhileOnBattlefield))); // Equip {1} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); } diff --git a/Mage.Sets/src/mage/cards/c/CloakingDevice.java b/Mage.Sets/src/mage/cards/c/CloakingDevice.java index 4cd2fb6588..defcb2a8ed 100644 --- a/Mage.Sets/src/mage/cards/c/CloakingDevice.java +++ b/Mage.Sets/src/mage/cards/c/CloakingDevice.java @@ -72,7 +72,7 @@ class CloakingDeviceLoseLifeDefendingPlayerEffect extends OneShotEffect { * attacker false if attacker has to be taken from targetPointer */ public CloakingDeviceLoseLifeDefendingPlayerEffect(int amount, boolean attackerIsSource) { - this(new StaticValue(amount), attackerIsSource); + this(StaticValue.get(amount), attackerIsSource); } public CloakingDeviceLoseLifeDefendingPlayerEffect(DynamicValue amount, boolean attackerIsSource) { diff --git a/Mage.Sets/src/mage/cards/c/CommuneWithDinosaurs.java b/Mage.Sets/src/mage/cards/c/CommuneWithDinosaurs.java index c039f4477c..23786a5032 100644 --- a/Mage.Sets/src/mage/cards/c/CommuneWithDinosaurs.java +++ b/Mage.Sets/src/mage/cards/c/CommuneWithDinosaurs.java @@ -32,7 +32,7 @@ public final class CommuneWithDinosaurs extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); //Look at the top five cards of your library. You may reveal a Dinosaur or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1), filter, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(1), filter, false)); } public CommuneWithDinosaurs(final CommuneWithDinosaurs card) { diff --git a/Mage.Sets/src/mage/cards/c/CommuneWithNature.java b/Mage.Sets/src/mage/cards/c/CommuneWithNature.java index 39ca3ffe29..91d82edb35 100644 --- a/Mage.Sets/src/mage/cards/c/CommuneWithNature.java +++ b/Mage.Sets/src/mage/cards/c/CommuneWithNature.java @@ -21,7 +21,7 @@ public final class CommuneWithNature extends CardImpl { // Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order. this.getSpellAbility().addEffect( new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), new FilterCreatureCard("a creature card"), false + StaticValue.get(5), false, StaticValue.get(1), new FilterCreatureCard("a creature card"), false ) ); } diff --git a/Mage.Sets/src/mage/cards/c/ConclavesBlessing.java b/Mage.Sets/src/mage/cards/c/ConclavesBlessing.java index 77f408046d..f0f2d51a02 100644 --- a/Mage.Sets/src/mage/cards/c/ConclavesBlessing.java +++ b/Mage.Sets/src/mage/cards/c/ConclavesBlessing.java @@ -48,7 +48,7 @@ public final class ConclavesBlessing extends CardImpl { // Enchanted creature gets +0/+2 for each other creature you control. PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter, 2); - BoostEnchantedEffect effect = new BoostEnchantedEffect(new StaticValue(0), value, Duration.WhileOnBattlefield); + BoostEnchantedEffect effect = new BoostEnchantedEffect(StaticValue.get(0), value, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +0/+2 for each other creature you control."); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/c/ContingencyPlan.java b/Mage.Sets/src/mage/cards/c/ContingencyPlan.java index 314a7f97eb..9a023ba324 100644 --- a/Mage.Sets/src/mage/cards/c/ContingencyPlan.java +++ b/Mage.Sets/src/mage/cards/c/ContingencyPlan.java @@ -20,7 +20,7 @@ public final class ContingencyPlan extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}"); // Look at the top five cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(5), + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(5), new FilterCard("cards"), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false)); } diff --git a/Mage.Sets/src/mage/cards/c/CourageousOutrider.java b/Mage.Sets/src/mage/cards/c/CourageousOutrider.java index d2fee2adb5..cf514bdcf9 100644 --- a/Mage.Sets/src/mage/cards/c/CourageousOutrider.java +++ b/Mage.Sets/src/mage/cards/c/CourageousOutrider.java @@ -34,7 +34,7 @@ public final class CourageousOutrider extends CardImpl { // When Courageous Outrider enters the battlefield, look at the top four cards of your library. You may reveal a Human card from among them // and put it into your hand. Put the rest on the bottom of your library in any order. - this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), filter, false) , false)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), filter, false) , false)); } public CourageousOutrider(final CourageousOutrider card) { diff --git a/Mage.Sets/src/mage/cards/c/CourtHussar.java b/Mage.Sets/src/mage/cards/c/CourtHussar.java index 9d860ac291..8d7af3227b 100644 --- a/Mage.Sets/src/mage/cards/c/CourtHussar.java +++ b/Mage.Sets/src/mage/cards/c/CourtHussar.java @@ -36,7 +36,7 @@ public final class CourtHussar extends CardImpl { this.addAbility(VigilanceAbility.getInstance()); // When Court Hussar enters the battlefield, look at the top three cards of your library, then put one of them into your hand and the rest on the bottom of your library in any order. this.addAbility(new EntersBattlefieldTriggeredAbility( - new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false), + new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false), false)); // When Court Hussar enters the battlefield, sacrifice it unless {W} was spent to cast it. this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.W)), false), new ManaSpentToCastWatcher()); diff --git a/Mage.Sets/src/mage/cards/c/CranialPlating.java b/Mage.Sets/src/mage/cards/c/CranialPlating.java index e61d82526e..79f4fccfac 100644 --- a/Mage.Sets/src/mage/cards/c/CranialPlating.java +++ b/Mage.Sets/src/mage/cards/c/CranialPlating.java @@ -38,7 +38,7 @@ public final class CranialPlating extends CardImpl { this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0 for each artifact you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new PermanentsOnBattlefieldCount(filterCounted), new StaticValue(0)))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new PermanentsOnBattlefieldCount(filterCounted), StaticValue.get(0)))); // {B}{B}: Attach Cranial Plating to target creature you control. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttachEffect(Outcome.BoostCreature, "Attach {this} to target creature you control"), new ManaCostsImpl("{B}{B}")); ability.addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/c/CraterElemental.java b/Mage.Sets/src/mage/cards/c/CraterElemental.java index 7407da0896..bc228e6e42 100644 --- a/Mage.Sets/src/mage/cards/c/CraterElemental.java +++ b/Mage.Sets/src/mage/cards/c/CraterElemental.java @@ -45,7 +45,7 @@ public final class CraterElemental extends CardImpl { // Formidable — {2}{R}: Crater Elemental has base power 8 until end of turn. Activate this ability only if creatures you control have total power 8 or greater. ability = new ActivateIfConditionActivatedAbility( Zone.BATTLEFIELD, - new SetPowerSourceEffect(new StaticValue(8), Duration.EndOfTurn, SubLayer.SetPT_7b), + new SetPowerSourceEffect(StaticValue.get(8), Duration.EndOfTurn, SubLayer.SetPT_7b), new ManaCostsImpl("{2}{R}"), FormidableCondition.instance); ability.setAbilityWord(AbilityWord.FORMIDABLE); diff --git a/Mage.Sets/src/mage/cards/c/CrescendoOfWar.java b/Mage.Sets/src/mage/cards/c/CrescendoOfWar.java index 9b817b7a2d..b7867992ff 100644 --- a/Mage.Sets/src/mage/cards/c/CrescendoOfWar.java +++ b/Mage.Sets/src/mage/cards/c/CrescendoOfWar.java @@ -32,11 +32,11 @@ public final class CrescendoOfWar extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.STRIFE.createInstance(1), true), TargetController.ANY, false)); // Attacking creatures get +1/+0 for each strife counter on Crescendo of War. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.STRIFE), new StaticValue(0), + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.STRIFE), StaticValue.get(0), Duration.WhileOnBattlefield, new FilterAttackingCreature(), false))); // Blocking creatures you control get +1/+0 for each strife counter on Crescendo of War. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(new CountersSourceCount(CounterType.STRIFE), new StaticValue(0), + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(new CountersSourceCount(CounterType.STRIFE), StaticValue.get(0), Duration.WhileOnBattlefield, new FilterBlockingCreature(), false))); } diff --git a/Mage.Sets/src/mage/cards/c/CrosstownCourier.java b/Mage.Sets/src/mage/cards/c/CrosstownCourier.java index 8cb48f04f7..093357a261 100644 --- a/Mage.Sets/src/mage/cards/c/CrosstownCourier.java +++ b/Mage.Sets/src/mage/cards/c/CrosstownCourier.java @@ -70,7 +70,7 @@ public final class CrosstownCourier extends CardImpl { for (Effect effect : getEffects()) { if (effect instanceof PutLibraryIntoGraveTargetEffect) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); - ((PutLibraryIntoGraveTargetEffect) effect).setAmount(new StaticValue(event.getAmount())); + ((PutLibraryIntoGraveTargetEffect) effect).setAmount(StaticValue.get(event.getAmount())); return true; } } diff --git a/Mage.Sets/src/mage/cards/c/CunningStrike.java b/Mage.Sets/src/mage/cards/c/CunningStrike.java index c88372e06b..08f0bbbd06 100644 --- a/Mage.Sets/src/mage/cards/c/CunningStrike.java +++ b/Mage.Sets/src/mage/cards/c/CunningStrike.java @@ -23,9 +23,9 @@ public final class CunningStrike extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{R}"); // Cunning Strike deals 2 damage to target creature and 2 damage to target player. - this.getSpellAbility().addEffect(new DamageTargetEffect(new StaticValue(2), true, "", true)); + this.getSpellAbility().addEffect(new DamageTargetEffect(StaticValue.get(2), true, "", true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - Effect effect = new DamageTargetEffect(new StaticValue(2), true, "", true); + Effect effect = new DamageTargetEffect(StaticValue.get(2), true, "", true); effect.setTargetPointer(new SecondTargetPointer()); effect.setText("and 2 damage to target player"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfShallowGraves.java b/Mage.Sets/src/mage/cards/c/CurseOfShallowGraves.java index d83d76ef44..7a9a2e8ce6 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfShallowGraves.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfShallowGraves.java @@ -119,7 +119,7 @@ class CurseOfShallowEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player attacker = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (attacker != null && attacker.chooseUse(outcome, "create a tapped 2/2 black Zombie creature token?", source, game)) { - Effect effect = new CreateTokenTargetEffect(new ZombieToken(), new StaticValue(1), true, false); + Effect effect = new CreateTokenTargetEffect(new ZombieToken(), StaticValue.get(1), true, false); effect.setTargetPointer(targetPointer); return effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java b/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java index 7cf0bfda69..b2bab76674 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java @@ -131,7 +131,7 @@ class CurseOfTheCabalInterveningIfTriggeredAbility extends ConditionalIntervenin class CurseOfTheCabalTriggeredAbilityConditionalDelay extends AddCountersSourceEffect { public CurseOfTheCabalTriggeredAbilityConditionalDelay() { - super(CounterType.TIME.createInstance(), new StaticValue(2), false, true); + super(CounterType.TIME.createInstance(), StaticValue.get(2), false, true); } @Override diff --git a/Mage.Sets/src/mage/cards/c/CyclicalEvolution.java b/Mage.Sets/src/mage/cards/c/CyclicalEvolution.java index 35f05870d4..208b1573a7 100644 --- a/Mage.Sets/src/mage/cards/c/CyclicalEvolution.java +++ b/Mage.Sets/src/mage/cards/c/CyclicalEvolution.java @@ -29,7 +29,7 @@ public final class CyclicalEvolution extends CardImpl { getSpellAbility().addEffect(new BoostTargetEffect(3, 3, Duration.EndOfTurn)); getSpellAbility().addTarget(new TargetCreaturePermanent()); getSpellAbility().addEffect(ExileSpellEffect.getInstance()); - Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), new StaticValue(3), true, true); + Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), true, true); effect.setText("with 3 time counters on it"); getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/d/DemonsHorn.java b/Mage.Sets/src/mage/cards/d/DemonsHorn.java index 71e71e2d01..d94ddc1d1d 100644 --- a/Mage.Sets/src/mage/cards/d/DemonsHorn.java +++ b/Mage.Sets/src/mage/cards/d/DemonsHorn.java @@ -29,7 +29,7 @@ public final class DemonsHorn extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); // Whenever a player casts a black spell, you may gain 1 life. - this.addAbility(new SpellCastAllTriggeredAbility(new GainLifeEffect(new StaticValue(1), "you may gain 1 life"), filter, true)); + this.addAbility(new SpellCastAllTriggeredAbility(new GainLifeEffect(StaticValue.get(1), "you may gain 1 life"), filter, true)); } public DemonsHorn(final DemonsHorn card) { diff --git a/Mage.Sets/src/mage/cards/d/DemonspineWhip.java b/Mage.Sets/src/mage/cards/d/DemonspineWhip.java index 7e246d0cbe..3191caa20a 100644 --- a/Mage.Sets/src/mage/cards/d/DemonspineWhip.java +++ b/Mage.Sets/src/mage/cards/d/DemonspineWhip.java @@ -31,7 +31,7 @@ public final class DemonspineWhip extends CardImpl { this.subtype.add(SubType.EQUIPMENT); // {X}: Equipped creature gets +X/+0 until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new XPaid(), new StaticValue(0), Duration.EndOfTurn), new ManaCostsImpl("{X}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new XPaid(), StaticValue.get(0), Duration.EndOfTurn), new ManaCostsImpl("{X}"))); // Equip {1} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); diff --git a/Mage.Sets/src/mage/cards/d/DiabolicVision.java b/Mage.Sets/src/mage/cards/d/DiabolicVision.java index 7495f8a1b6..e374d3683b 100644 --- a/Mage.Sets/src/mage/cards/d/DiabolicVision.java +++ b/Mage.Sets/src/mage/cards/d/DiabolicVision.java @@ -19,7 +19,7 @@ public final class DiabolicVision extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{B}"); // Look at the top five cards of your library. Put one of them into your hand and the rest on top of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1), new FilterCard(), true, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(1), new FilterCard(), true, false)); } public DiabolicVision(final DiabolicVision card) { diff --git a/Mage.Sets/src/mage/cards/d/DigThroughTime.java b/Mage.Sets/src/mage/cards/d/DigThroughTime.java index 4aa9c91b04..fbc8168103 100644 --- a/Mage.Sets/src/mage/cards/d/DigThroughTime.java +++ b/Mage.Sets/src/mage/cards/d/DigThroughTime.java @@ -25,7 +25,7 @@ public final class DigThroughTime extends CardImpl { this.addAbility(new DelveAbility()); // Look at the top seven cards of your library. Put two of them into your hand and the rest on the bottom of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(7), false, new StaticValue(2), new FilterCard(), Zone.LIBRARY, false, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(7), false, StaticValue.get(2), new FilterCard(), Zone.LIBRARY, false, false)); } public DigThroughTime(final DigThroughTime card) { diff --git a/Mage.Sets/src/mage/cards/d/DiscoveryDispersal.java b/Mage.Sets/src/mage/cards/d/DiscoveryDispersal.java index 0ab5468322..6daa999a75 100644 --- a/Mage.Sets/src/mage/cards/d/DiscoveryDispersal.java +++ b/Mage.Sets/src/mage/cards/d/DiscoveryDispersal.java @@ -115,7 +115,7 @@ class DispersalEffect extends OneShotEffect { filter.add(Predicates.or(permsToReturn)); new ReturnToHandFromBattlefieldAllEffect(filter).apply(game, source); new DiscardEachPlayerEffect( - new StaticValue(1), false, TargetController.OPPONENT + StaticValue.get(1), false, TargetController.OPPONENT ).apply(game, source); return true; } diff --git a/Mage.Sets/src/mage/cards/d/DisinformationCampaign.java b/Mage.Sets/src/mage/cards/d/DisinformationCampaign.java index 7b67d4bc80..4ffc2d9f04 100644 --- a/Mage.Sets/src/mage/cards/d/DisinformationCampaign.java +++ b/Mage.Sets/src/mage/cards/d/DisinformationCampaign.java @@ -29,7 +29,7 @@ public final class DisinformationCampaign extends CardImpl { Ability ability = new EntersBattlefieldTriggeredAbility( new DrawCardSourceControllerEffect(1, "you")); ability.addEffect(new DiscardEachPlayerEffect( - new StaticValue(1), false, TargetController.OPPONENT).concatBy("and")); + StaticValue.get(1), false, TargetController.OPPONENT).concatBy("and")); this.addAbility(ability); // Whenever you surveil, return Disinformation Campaign to its owner's hand. diff --git a/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java b/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java index ed75b4de9e..5ed58faaa1 100644 --- a/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java +++ b/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java @@ -44,7 +44,7 @@ public final class DomriChaosBringer extends CardImpl { // −3: Look at the top four cards of your library. You may reveal up to two creature cards from among them and put them into your hand. Put the rest on the bottom of your library in a random order. this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(2), + StaticValue.get(4), false, StaticValue.get(2), StaticFilters.FILTER_CARD_CREATURE, Zone.LIBRARY, false, true, true, Zone.HAND, false, false, false ).setText( diff --git a/Mage.Sets/src/mage/cards/d/DovinGrandArbiter.java b/Mage.Sets/src/mage/cards/d/DovinGrandArbiter.java index ea2400d975..4d7d713cfc 100644 --- a/Mage.Sets/src/mage/cards/d/DovinGrandArbiter.java +++ b/Mage.Sets/src/mage/cards/d/DovinGrandArbiter.java @@ -47,8 +47,8 @@ public final class DovinGrandArbiter extends CardImpl { // -7: Look at the top ten cards of your library. Put three of them into your hand and the rest on the bottom of your library in a random order. this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect( - new StaticValue(10), false, - new StaticValue(3), StaticFilters.FILTER_CARD, + StaticValue.get(10), false, + StaticValue.get(3), StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false, false, Zone.HAND, false, false, false ).setBackInRandomOrder(true).setText("Look at the top ten cards of your library. " + diff --git a/Mage.Sets/src/mage/cards/d/DownhillCharge.java b/Mage.Sets/src/mage/cards/d/DownhillCharge.java index ed0d2d0eb2..f14bbae019 100644 --- a/Mage.Sets/src/mage/cards/d/DownhillCharge.java +++ b/Mage.Sets/src/mage/cards/d/DownhillCharge.java @@ -36,7 +36,7 @@ public final class DownhillCharge extends CardImpl { // You may sacrifice a Mountain rather than pay Downhill Charge's mana cost. this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(filter)))); // Target creature gets +X/+0 until end of turn, where X is the number of Mountains you control. - Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn, true); + Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.EndOfTurn, true); effect.setText("Target creature gets +X/+0 until end of turn, where X is the number of Mountains you control."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/d/DragonlordOjutai.java b/Mage.Sets/src/mage/cards/d/DragonlordOjutai.java index cbb71bd250..98e6aa3cc6 100644 --- a/Mage.Sets/src/mage/cards/d/DragonlordOjutai.java +++ b/Mage.Sets/src/mage/cards/d/DragonlordOjutai.java @@ -47,7 +47,7 @@ public final class DragonlordOjutai extends CardImpl { // Whenever Dragonlord Ojutai deals combat damage to a player, look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new LookLibraryAndPickControllerEffect - (new StaticValue(3), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false), false)); + (StaticValue.get(3), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false), false)); } public DragonlordOjutai(final DragonlordOjutai card) { diff --git a/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java b/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java index 404fafb5f7..28f6054c85 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(ManacostVariableValue.instance), Duration.EndOfTurn), new ManaCostsImpl("{X}{B}{B}")); - ability.addEffect(new BoostSourceEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(StaticValue.get(0), new SignInversionDynamicValue(ManacostVariableValue.instance), Duration.EndOfTurn), new ManaCostsImpl("{X}{B}{B}")); + ability.addEffect(new BoostSourceEffect(ManacostVariableValue.instance, StaticValue.get(0), Duration.EndOfTurn)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DrawnFromDreams.java b/Mage.Sets/src/mage/cards/d/DrawnFromDreams.java index b2ff445b84..a9777c2989 100644 --- a/Mage.Sets/src/mage/cards/d/DrawnFromDreams.java +++ b/Mage.Sets/src/mage/cards/d/DrawnFromDreams.java @@ -20,7 +20,7 @@ public final class DrawnFromDreams extends CardImpl { // Look at the top seven cards of your library. Put two of them into your hand and the rest on the bottom of your library in a random order. this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect( - new StaticValue(7), false, new StaticValue(2), + StaticValue.get(7), false, StaticValue.get(2), StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false ).setBackInRandomOrder(true)); } diff --git a/Mage.Sets/src/mage/cards/e/Earthshaker.java b/Mage.Sets/src/mage/cards/e/Earthshaker.java index 6a10728d67..85b4eb7ebf 100644 --- a/Mage.Sets/src/mage/cards/e/Earthshaker.java +++ b/Mage.Sets/src/mage/cards/e/Earthshaker.java @@ -34,7 +34,7 @@ public final class Earthshaker extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(5); // Whenever you cast a Spirit or Arcane spell, Earthshaker deals 2 damage to each creature without flying. - this.addAbility(new SpellCastControllerTriggeredAbility(new DamageAllEffect(new StaticValue(2) , creatureFilter), StaticFilters.SPIRIT_OR_ARCANE_CARD, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new DamageAllEffect(StaticValue.get(2) , creatureFilter), StaticFilters.SPIRIT_OR_ARCANE_CARD, false)); } public Earthshaker(final Earthshaker card) { diff --git a/Mage.Sets/src/mage/cards/e/EmberethSkyblazer.java b/Mage.Sets/src/mage/cards/e/EmberethSkyblazer.java index 9eff019996..efbdb2cc02 100644 --- a/Mage.Sets/src/mage/cards/e/EmberethSkyblazer.java +++ b/Mage.Sets/src/mage/cards/e/EmberethSkyblazer.java @@ -43,7 +43,7 @@ public final class EmberethSkyblazer extends CardImpl { // Whenever Embereth Skyblazer attacks, you may pay {2}{R}. If you do, creatures you control get +X/+0 until end of turn, where X is the number of opponents you have. this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid( new BoostControlledEffect( - OpponentsCount.instance, StaticValue.getZeroValue(), Duration.EndOfTurn, + OpponentsCount.instance, StaticValue.get(0), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false, true ).setText("creatures you control get +X/+0 until end of turn, where X is the number of opponents you have"), new ManaCostsImpl("{2}{R}") diff --git a/Mage.Sets/src/mage/cards/e/EndlessScream.java b/Mage.Sets/src/mage/cards/e/EndlessScream.java index 75fc451a8a..f4e0aef884 100644 --- a/Mage.Sets/src/mage/cards/e/EndlessScream.java +++ b/Mage.Sets/src/mage/cards/e/EndlessScream.java @@ -41,7 +41,7 @@ public final class EndlessScream extends CardImpl { // Endless Scream enters the battlefield with X scream counters on it. this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.SCREAM.createInstance()))); // Enchanted creature gets +1/+0 for each scream counter on Endless Scream. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(new CountersSourceCount(CounterType.SCREAM), new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(new CountersSourceCount(CounterType.SCREAM), StaticValue.get(0), Duration.WhileOnBattlefield))); } public EndlessScream(final EndlessScream card) { diff --git a/Mage.Sets/src/mage/cards/e/Enrage.java b/Mage.Sets/src/mage/cards/e/Enrage.java index 9d83d33659..5546838f80 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(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(ManacostVariableValue.instance, StaticValue.get(0), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/e/ExpansionExplosion.java b/Mage.Sets/src/mage/cards/e/ExpansionExplosion.java index 88cd4ef9f9..0b2039c094 100644 --- a/Mage.Sets/src/mage/cards/e/ExpansionExplosion.java +++ b/Mage.Sets/src/mage/cards/e/ExpansionExplosion.java @@ -80,7 +80,7 @@ class ExplosionEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int xValue = source.getManaCostsToPay().getX(); - Effect effect = new DamageTargetEffect(new StaticValue(xValue), true, "", true); + Effect effect = new DamageTargetEffect(StaticValue.get(xValue), true, "", true); effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); effect.apply(game, source); Player player = game.getPlayer(source.getTargets().get(1).getFirstTarget()); diff --git a/Mage.Sets/src/mage/cards/f/FaerieMechanist.java b/Mage.Sets/src/mage/cards/f/FaerieMechanist.java index d3593c1bb3..b3255885a5 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieMechanist.java +++ b/Mage.Sets/src/mage/cards/f/FaerieMechanist.java @@ -37,7 +37,7 @@ public final class FaerieMechanist extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Faerie Mechanist enters the battlefield, look at the top three cards of your library. // You may reveal an artifact card from among them and put it into your hand. Put the rest on the bottom of your library in any order. - this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), filter, false))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), filter, false))); } public FaerieMechanist(final FaerieMechanist card) { diff --git a/Mage.Sets/src/mage/cards/f/FatalFrenzy.java b/Mage.Sets/src/mage/cards/f/FatalFrenzy.java index 6b07415820..a5147f18f1 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(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true) + this.getSpellAbility().addEffect(new BoostTargetEffect(TargetPermanentPowerCount.instance, StaticValue.get(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/FatalLore.java b/Mage.Sets/src/mage/cards/f/FatalLore.java index c4a641dedc..9978b96de5 100644 --- a/Mage.Sets/src/mage/cards/f/FatalLore.java +++ b/Mage.Sets/src/mage/cards/f/FatalLore.java @@ -79,7 +79,7 @@ class FatalLoreEffect extends OneShotEffect { destroyCreature.setTargetPointer(new FixedTarget(targetId)); destroyCreature.apply(game, source); } - Effect opponentDrawsCards = new DrawCardTargetEffect(new StaticValue(3), false, true); + Effect opponentDrawsCards = new DrawCardTargetEffect(StaticValue.get(3), false, true); opponentDrawsCards.setTargetPointer(new FixedTarget(chosenOpponent.getId())); opponentDrawsCards.apply(game, source); return true; diff --git a/Mage.Sets/src/mage/cards/f/FeralAnimist.java b/Mage.Sets/src/mage/cards/f/FeralAnimist.java index d552a59695..6fbca8779b 100644 --- a/Mage.Sets/src/mage/cards/f/FeralAnimist.java +++ b/Mage.Sets/src/mage/cards/f/FeralAnimist.java @@ -31,7 +31,7 @@ public final class FeralAnimist extends CardImpl { // {3}: Feral Animist gets +X/+0 until end of turn, where X is its power. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new BoostSourceEffect(new SourcePermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true), + new BoostSourceEffect(new SourcePermanentPowerCount(), StaticValue.get(0), Duration.EndOfTurn, true), new GenericManaCost(3))); } diff --git a/Mage.Sets/src/mage/cards/f/FesteringMarch.java b/Mage.Sets/src/mage/cards/f/FesteringMarch.java index 9d6b6a93c0..20f67b9c97 100644 --- a/Mage.Sets/src/mage/cards/f/FesteringMarch.java +++ b/Mage.Sets/src/mage/cards/f/FesteringMarch.java @@ -29,7 +29,7 @@ public final class FesteringMarch extends CardImpl { // Exile Festering March this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); // with three time counters on it. - Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), new StaticValue(3), false, true); + Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), false, true); effect.setText("with 3 time counters on it"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/f/FistsOfFlame.java b/Mage.Sets/src/mage/cards/f/FistsOfFlame.java index 418879d2c4..6b5af78da9 100644 --- a/Mage.Sets/src/mage/cards/f/FistsOfFlame.java +++ b/Mage.Sets/src/mage/cards/f/FistsOfFlame.java @@ -30,7 +30,7 @@ public final class FistsOfFlame extends CardImpl { ).setText("Until end of turn, target creature gains trample")); this.getSpellAbility().addEffect(new BoostTargetEffect( CardsDrawnThisTurnDynamicValue.instance, - StaticValue.getZeroValue(), Duration.EndOfTurn + StaticValue.get(0), Duration.EndOfTurn ).setText("and gets +1/+0 for each card you've drawn this turn.")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addWatcher(new CardsDrawnThisTurnWatcher()); diff --git a/Mage.Sets/src/mage/cards/f/Flamebreak.java b/Mage.Sets/src/mage/cards/f/Flamebreak.java index ecda085357..78091a868d 100644 --- a/Mage.Sets/src/mage/cards/f/Flamebreak.java +++ b/Mage.Sets/src/mage/cards/f/Flamebreak.java @@ -37,7 +37,7 @@ public final class Flamebreak extends CardImpl { // Flamebreak deals 3 damage to each creature without flying and each player. Creatures dealt damage this way can't be regenerated this turn. - this.getSpellAbility().addEffect(new DamageEverythingEffect(new StaticValue(3), filter1)); + this.getSpellAbility().addEffect(new DamageEverythingEffect(StaticValue.get(3), filter1)); this.getSpellAbility().addEffect(new FlamebreakCantRegenerateEffect()); this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } diff --git a/Mage.Sets/src/mage/cards/f/ForbiddenAlchemy.java b/Mage.Sets/src/mage/cards/f/ForbiddenAlchemy.java index 42c0cb35e6..637895487f 100644 --- a/Mage.Sets/src/mage/cards/f/ForbiddenAlchemy.java +++ b/Mage.Sets/src/mage/cards/f/ForbiddenAlchemy.java @@ -22,7 +22,7 @@ public final class ForbiddenAlchemy extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); // Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false)); // Flashback {6}{B} diff --git a/Mage.Sets/src/mage/cards/f/FoulEmissary.java b/Mage.Sets/src/mage/cards/f/FoulEmissary.java index 5caf63570d..cca047343a 100644 --- a/Mage.Sets/src/mage/cards/f/FoulEmissary.java +++ b/Mage.Sets/src/mage/cards/f/FoulEmissary.java @@ -41,7 +41,7 @@ public final class FoulEmissary extends CardImpl { this.toughness = new MageInt(1); // When Foul Emissary enters the battlefield, look at the top four cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order. - this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), filter, false))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), filter, false))); // When you sacrifice Foul Emissary while casting a spell with emerge, create a 3/2 colorless Eldrazi Horror creature token. this.addAbility(new FoulEmissaryTriggeredAbility(new CreateTokenEffect(new EldraziHorrorToken()), false)); diff --git a/Mage.Sets/src/mage/cards/g/GhoulsFeast.java b/Mage.Sets/src/mage/cards/g/GhoulsFeast.java index a97e983884..f43717382f 100644 --- a/Mage.Sets/src/mage/cards/g/GhoulsFeast.java +++ b/Mage.Sets/src/mage/cards/g/GhoulsFeast.java @@ -24,7 +24,7 @@ public final class GhoulsFeast extends CardImpl { // Target creature gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard. DynamicValue xValue = new CardsInControllerGraveyardCount(new FilterCreatureCard("creature card")); - this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, new StaticValue(0), Duration.EndOfTurn, true)); + this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, StaticValue.get(0), Duration.EndOfTurn, true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/g/GlaiveOfTheGuildpact.java b/Mage.Sets/src/mage/cards/g/GlaiveOfTheGuildpact.java index c46079038b..fcfdbdfbf7 100644 --- a/Mage.Sets/src/mage/cards/g/GlaiveOfTheGuildpact.java +++ b/Mage.Sets/src/mage/cards/g/GlaiveOfTheGuildpact.java @@ -34,7 +34,7 @@ public final class GlaiveOfTheGuildpact extends CardImpl { Zone.BATTLEFIELD, new BoostEquippedEffect( GateYouControlCount.instance, - new StaticValue(0) + StaticValue.get(0) ) ); ability.addEffect(new GainAbilityAttachedEffect( diff --git a/Mage.Sets/src/mage/cards/g/GlimpseTheFuture.java b/Mage.Sets/src/mage/cards/g/GlimpseTheFuture.java index bb2f7d5e33..e200cb2234 100644 --- a/Mage.Sets/src/mage/cards/g/GlimpseTheFuture.java +++ b/Mage.Sets/src/mage/cards/g/GlimpseTheFuture.java @@ -19,7 +19,7 @@ public final class GlimpseTheFuture extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); // Look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false)); } diff --git a/Mage.Sets/src/mage/cards/g/GlintNestCrane.java b/Mage.Sets/src/mage/cards/g/GlintNestCrane.java index af36bbbbe3..4a20dbf4b9 100644 --- a/Mage.Sets/src/mage/cards/g/GlintNestCrane.java +++ b/Mage.Sets/src/mage/cards/g/GlintNestCrane.java @@ -32,7 +32,7 @@ public final class GlintNestCrane extends CardImpl { // When Glint-Nest Crane enters the battlefield, look at the top four cards of your library. You may reveal an artifact card from among them and // put it into your hand. Put the rest on the bottom of your library in any order. this.addAbility(new EntersBattlefieldTriggeredAbility( - new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), + new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD_ARTIFACT_AN, Zone.LIBRARY, false, true, false, Zone.HAND, true))); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinGaveleer.java b/Mage.Sets/src/mage/cards/g/GoblinGaveleer.java index 80e9f6f20d..9db43599dd 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGaveleer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGaveleer.java @@ -33,7 +33,7 @@ public final class GoblinGaveleer extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Goblin Gaveleer gets +2/+0 for each Equipment attached to it. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new EquipmentAttachedCount(2), - new StaticValue(0), Duration.WhileOnBattlefield))); + StaticValue.get(0), Duration.WhileOnBattlefield))); } public GoblinGaveleer(final GoblinGaveleer card) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinPiledriver.java b/Mage.Sets/src/mage/cards/g/GoblinPiledriver.java index 1c355d9091..3aacc2532a 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinPiledriver.java +++ b/Mage.Sets/src/mage/cards/g/GoblinPiledriver.java @@ -43,7 +43,7 @@ public final class GoblinPiledriver extends CardImpl { this.addAbility(ProtectionAbility.from(ObjectColor.BLUE)); // Whenever Goblin Piledriver attacks, it gets +2/+0 until end of turn for each other attacking Goblin. PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter, 2); - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, new StaticValue(0), Duration.EndOfTurn, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, StaticValue.get(0), Duration.EndOfTurn, true), false)); } public GoblinPiledriver(final GoblinPiledriver card) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinRabblemaster.java b/Mage.Sets/src/mage/cards/g/GoblinRabblemaster.java index 813b051f72..6190cfee3c 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRabblemaster.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRabblemaster.java @@ -55,7 +55,7 @@ public final class GoblinRabblemaster extends CardImpl { this.addAbility(new BeginningOfCombatTriggeredAbility(new CreateTokenEffect(new GoblinToken(true)), TargetController.YOU, false)); // When Goblin Rabblemaster attacks, it gets +1/+0 until end of turn for each other attacking Goblin. - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(attackingFilter), new StaticValue(0), Duration.EndOfTurn, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(attackingFilter), StaticValue.get(0), Duration.EndOfTurn, true), false)); } public GoblinRabblemaster(final GoblinRabblemaster card) { diff --git a/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java b/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java index 5f3d1e6993..9c9e80861d 100644 --- a/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java +++ b/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java @@ -31,7 +31,7 @@ public final class GolemSkinGauntlets extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); this.subtype.add(SubType.EQUIPMENT); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new GolemSkinGauntletsAttachedCount(), new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new GolemSkinGauntletsAttachedCount(), StaticValue.get(0), Duration.WhileOnBattlefield))); this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); } diff --git a/Mage.Sets/src/mage/cards/g/GreatDefender.java b/Mage.Sets/src/mage/cards/g/GreatDefender.java index 369c3eafd6..417204ff9a 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), TargetConvertedManaCost.instance, Duration.EndOfTurn, true) + this.getSpellAbility().addEffect(new BoostTargetEffect(StaticValue.get(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/GrevenPredatorCaptain.java b/Mage.Sets/src/mage/cards/g/GrevenPredatorCaptain.java index 8024fbd211..cdf3130f8d 100644 --- a/Mage.Sets/src/mage/cards/g/GrevenPredatorCaptain.java +++ b/Mage.Sets/src/mage/cards/g/GrevenPredatorCaptain.java @@ -41,7 +41,7 @@ public final class GrevenPredatorCaptain extends CardImpl { // Greven, Predator Captain gets +X/+0, where X is the amount of life you've lost this turn. this.addAbility(new SimpleStaticAbility(new BoostSourceEffect( - GrevenPredatorCaptainValue.instance, StaticValue.getZeroValue(), Duration.WhileOnBattlefield + GrevenPredatorCaptainValue.instance, StaticValue.get(0), Duration.WhileOnBattlefield ))); // Whenever Greven attacks, you may sacrifice another creature. If you do, you draw cards equal to that creature's power and you lose life equal to that creature's toughness. diff --git a/Mage.Sets/src/mage/cards/g/GrimFlayer.java b/Mage.Sets/src/mage/cards/g/GrimFlayer.java index de4d208c74..1856b0ae15 100644 --- a/Mage.Sets/src/mage/cards/g/GrimFlayer.java +++ b/Mage.Sets/src/mage/cards/g/GrimFlayer.java @@ -39,7 +39,7 @@ public final class GrimFlayer extends CardImpl { // Whenever Grim Flayer deals combat damage to a player, look at the top three cards of your library. Put any number of them into your graveyard // and the rest back on top of your library in any order. Effect effect = new LookLibraryAndPickControllerEffect( - new StaticValue(3), false, new StaticValue(3), new FilterCard(), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false); + StaticValue.get(3), false, StaticValue.get(3), new FilterCard(), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false); effect.setText("look at the top three cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order"); this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(effect, false)); diff --git a/Mage.Sets/src/mage/cards/g/GruulBeastmaster.java b/Mage.Sets/src/mage/cards/g/GruulBeastmaster.java index c0e203c35b..bd475efdee 100644 --- a/Mage.Sets/src/mage/cards/g/GruulBeastmaster.java +++ b/Mage.Sets/src/mage/cards/g/GruulBeastmaster.java @@ -47,7 +47,7 @@ public final class GruulBeastmaster extends CardImpl { // Whenever Gruul Beastmaster attacks, another target creature you control gets +X/+0 until end of turn, where X is Gruul Beastmaster's power. Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect( - xValue, StaticValue.getZeroValue(), Duration.EndOfTurn, true + xValue, StaticValue.get(0), Duration.EndOfTurn, true ), false); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/g/GurmagDrowner.java b/Mage.Sets/src/mage/cards/g/GurmagDrowner.java index bf96ee3b1c..c15181cfbc 100644 --- a/Mage.Sets/src/mage/cards/g/GurmagDrowner.java +++ b/Mage.Sets/src/mage/cards/g/GurmagDrowner.java @@ -30,7 +30,7 @@ public final class GurmagDrowner extends CardImpl { this.addAbility(new ExploitAbility()); // When Gurmag Drowner exploits a creature, look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. - this.addAbility(new ExploitCreatureTriggeredAbility(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), + this.addAbility(new ExploitCreatureTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false), false)); } diff --git a/Mage.Sets/src/mage/cards/h/HarshMentor.java b/Mage.Sets/src/mage/cards/h/HarshMentor.java index 7a01484d2a..16471d1c81 100644 --- a/Mage.Sets/src/mage/cards/h/HarshMentor.java +++ b/Mage.Sets/src/mage/cards/h/HarshMentor.java @@ -50,7 +50,7 @@ public final class HarshMentor extends CardImpl { class HarshMentorTriggeredAbility extends TriggeredAbilityImpl { HarshMentorTriggeredAbility() { - super(Zone.BATTLEFIELD, new DamageTargetEffect(new StaticValue(2), true, "that player", true)); + super(Zone.BATTLEFIELD, new DamageTargetEffect(StaticValue.get(2), true, "that player", true)); } HarshMentorTriggeredAbility(final HarshMentorTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/h/Hatred.java b/Mage.Sets/src/mage/cards/h/Hatred.java index 1d096e1cb6..b539314056 100644 --- a/Mage.Sets/src/mage/cards/h/Hatred.java +++ b/Mage.Sets/src/mage/cards/h/Hatred.java @@ -27,7 +27,7 @@ public final class Hatred extends CardImpl { // Target creature gets +X/+0 until end of turn. DynamicValue xValue = GetXValue.instance; - this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, new StaticValue(0), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, StaticValue.get(0), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/h/HeartlashCinder.java b/Mage.Sets/src/mage/cards/h/HeartlashCinder.java index 02b0909a97..21ef0f07b5 100644 --- a/Mage.Sets/src/mage/cards/h/HeartlashCinder.java +++ b/Mage.Sets/src/mage/cards/h/HeartlashCinder.java @@ -40,7 +40,7 @@ public final class HeartlashCinder extends CardImpl { this.addAbility(HasteAbility.getInstance()); // Chroma - When Heartlash Cinder enters the battlefield, it gets +X/+0 until end of turn, where X is the number of red mana symbols in the mana costs of permanents you control. - ContinuousEffect effect = new BoostSourceEffect(new ChromaHeartlashCinderCount(), new StaticValue(0), Duration.EndOfTurn, true); + ContinuousEffect effect = new BoostSourceEffect(new ChromaHeartlashCinderCount(), StaticValue.get(0), Duration.EndOfTurn, true); effect.setText("Chroma — When Heartlash Cinder enters the battlefield, it gets +X/+0 until end of turn, where X is the number of red mana symbols in the mana costs of permanents you control."); this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false, true)); diff --git a/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java b/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java index 566e9bca98..f69ac3f81a 100644 --- a/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java +++ b/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java @@ -46,7 +46,7 @@ public final class HellkiteIgniter extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect( new PermanentsOnBattlefieldCount(filter), - new StaticValue(0), + StaticValue.get(0), Duration.EndOfTurn, true), new ManaCostsImpl("{1}{R}"))); diff --git a/Mage.Sets/src/mage/cards/h/HoldTheGates.java b/Mage.Sets/src/mage/cards/h/HoldTheGates.java index 4efa8b303a..e8b5b30675 100644 --- a/Mage.Sets/src/mage/cards/h/HoldTheGates.java +++ b/Mage.Sets/src/mage/cards/h/HoldTheGates.java @@ -28,7 +28,7 @@ public final class HoldTheGates extends CardImpl { // Creatures you control get +0/+1 for each Gate you control and have vigilance. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, - new BoostControlledEffect(new StaticValue(0), GateYouControlCount.instance, Duration.WhileOnBattlefield)); + new BoostControlledEffect(StaticValue.get(0), GateYouControlCount.instance, Duration.WhileOnBattlefield)); ability.addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures")) .setText("Creatures you control get +0/+1 for each Gate you control and have vigilance")); ability.addHint(GateYouControlHint.instance); diff --git a/Mage.Sets/src/mage/cards/h/HowlFromBeyond.java b/Mage.Sets/src/mage/cards/h/HowlFromBeyond.java index ec2c6e9dd4..9697ef5ba1 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(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(ManacostVariableValue.instance, StaticValue.get(0), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/h/HungerOfTheNim.java b/Mage.Sets/src/mage/cards/h/HungerOfTheNim.java index 24cf8cadfa..203988cf0d 100644 --- a/Mage.Sets/src/mage/cards/h/HungerOfTheNim.java +++ b/Mage.Sets/src/mage/cards/h/HungerOfTheNim.java @@ -30,7 +30,7 @@ public final class HungerOfTheNim extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}"); // Target creature gets +1/+0 until end of turn for each artifact you control. - Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn, true); + Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.EndOfTurn, true); effect.setText("Target creature gets +1/+0 until end of turn for each artifact you control"); getSpellAbility().addEffect(effect); getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/i/IchneumonDruid.java b/Mage.Sets/src/mage/cards/i/IchneumonDruid.java index c341056251..6ac8a96806 100644 --- a/Mage.Sets/src/mage/cards/i/IchneumonDruid.java +++ b/Mage.Sets/src/mage/cards/i/IchneumonDruid.java @@ -52,7 +52,7 @@ public final class IchneumonDruid extends CardImpl { class IchneumonDruidAbility extends TriggeredAbilityImpl { public IchneumonDruidAbility() { - super(Zone.BATTLEFIELD, new DamageTargetEffect(new StaticValue(4), false, "that player", true)); + super(Zone.BATTLEFIELD, new DamageTargetEffect(StaticValue.get(4), false, "that player", true)); } public IchneumonDruidAbility(final IchneumonDruidAbility ability) { diff --git a/Mage.Sets/src/mage/cards/i/ImmolationShaman.java b/Mage.Sets/src/mage/cards/i/ImmolationShaman.java index a4eddb6286..f7bc1ddca0 100644 --- a/Mage.Sets/src/mage/cards/i/ImmolationShaman.java +++ b/Mage.Sets/src/mage/cards/i/ImmolationShaman.java @@ -69,7 +69,7 @@ public final class ImmolationShaman extends CardImpl { class ImmolationShamanTriggeredAbility extends TriggeredAbilityImpl { ImmolationShamanTriggeredAbility() { - super(Zone.BATTLEFIELD, new DamageTargetEffect(new StaticValue(1), true, "that player", true)); + super(Zone.BATTLEFIELD, new DamageTargetEffect(StaticValue.get(1), true, "that player", true)); } private ImmolationShamanTriggeredAbility(final ImmolationShamanTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/i/ImpactTremors.java b/Mage.Sets/src/mage/cards/i/ImpactTremors.java index bd9ec49c39..e905b6ef88 100644 --- a/Mage.Sets/src/mage/cards/i/ImpactTremors.java +++ b/Mage.Sets/src/mage/cards/i/ImpactTremors.java @@ -24,7 +24,7 @@ public final class ImpactTremors extends CardImpl { // Whenever a creature enters the battlefield under your control, Impact Tremors deals 1 damage to each opponent. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, - new DamagePlayersEffect(Outcome.Damage, new StaticValue(1), TargetController.OPPONENT), + new DamagePlayersEffect(Outcome.Damage, StaticValue.get(1), TargetController.OPPONENT), new FilterCreaturePermanent("a creature"), false)); } diff --git a/Mage.Sets/src/mage/cards/i/Impulse.java b/Mage.Sets/src/mage/cards/i/Impulse.java index 1ff1b93fac..5d9bbacb64 100644 --- a/Mage.Sets/src/mage/cards/i/Impulse.java +++ b/Mage.Sets/src/mage/cards/i/Impulse.java @@ -20,7 +20,7 @@ public final class Impulse extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); // Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false)); } diff --git a/Mage.Sets/src/mage/cards/i/IncubationIncongruity.java b/Mage.Sets/src/mage/cards/i/IncubationIncongruity.java index 7604c2ab92..07e76c0b33 100644 --- a/Mage.Sets/src/mage/cards/i/IncubationIncongruity.java +++ b/Mage.Sets/src/mage/cards/i/IncubationIncongruity.java @@ -30,8 +30,8 @@ public final class IncubationIncongruity extends SplitCard { // Incubation // Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.getLeftHalfCard().getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, - new StaticValue(1), StaticFilters.FILTER_CARD_CREATURE_A, + StaticValue.get(5), false, + StaticValue.get(1), StaticFilters.FILTER_CARD_CREATURE_A, Zone.LIBRARY, false, true, false, Zone.HAND, false, false, false ).setBackInRandomOrder(true)); diff --git a/Mage.Sets/src/mage/cards/i/IndenturedDjinn.java b/Mage.Sets/src/mage/cards/i/IndenturedDjinn.java index 6e54d5ab21..85127a972c 100644 --- a/Mage.Sets/src/mage/cards/i/IndenturedDjinn.java +++ b/Mage.Sets/src/mage/cards/i/IndenturedDjinn.java @@ -71,7 +71,7 @@ class IndenturedDjinnEffect extends OneShotEffect { for (UUID playerId : game.getOpponents(source.getControllerId())) { Player player = game.getPlayer(playerId); if (player != null) { - Effect effect = new DrawCardTargetEffect(new StaticValue(3), false, true); + Effect effect = new DrawCardTargetEffect(StaticValue.get(3), false, true); effect.setTargetPointer(new FixedTarget(playerId)); effect.setText(player.getLogName() + " may draw up to three cards"); effect.apply(game, source); diff --git a/Mage.Sets/src/mage/cards/i/InfiniteHourglass.java b/Mage.Sets/src/mage/cards/i/InfiniteHourglass.java index f06540d90a..0e5527fb04 100644 --- a/Mage.Sets/src/mage/cards/i/InfiniteHourglass.java +++ b/Mage.Sets/src/mage/cards/i/InfiniteHourglass.java @@ -39,7 +39,7 @@ public final class InfiniteHourglass extends CardImpl { Zone.BATTLEFIELD, new BoostAllEffect( new CountersSourceCount(CounterType.TIME), - new StaticValue(0), + StaticValue.get(0), Duration.WhileOnBattlefield ) )); diff --git a/Mage.Sets/src/mage/cards/j/JaceTheLivingGuildpact.java b/Mage.Sets/src/mage/cards/j/JaceTheLivingGuildpact.java index 762da47ab1..71a5f2af17 100644 --- a/Mage.Sets/src/mage/cards/j/JaceTheLivingGuildpact.java +++ b/Mage.Sets/src/mage/cards/j/JaceTheLivingGuildpact.java @@ -42,7 +42,7 @@ public final class JaceTheLivingGuildpact extends CardImpl { // +1: Look at the top two cards of your library. Put one of them into your graveyard. Effect effect = new LookLibraryAndPickControllerEffect( - new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, true, false, false, Zone.GRAVEYARD, false); + StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, true, false, false, Zone.GRAVEYARD, false); effect.setText("Look at the top two cards of your library. Put one of them into your graveyard"); this.addAbility(new LoyaltyAbility(effect, 1)); diff --git a/Mage.Sets/src/mage/cards/k/KavuScout.java b/Mage.Sets/src/mage/cards/k/KavuScout.java index dc4c345f4f..87747287fa 100644 --- a/Mage.Sets/src/mage/cards/k/KavuScout.java +++ b/Mage.Sets/src/mage/cards/k/KavuScout.java @@ -31,7 +31,7 @@ public final class KavuScout extends CardImpl { this.toughness = new MageInt(2); // Domain - Kavu Scout gets +1/+0 for each basic land type among lands you control. - Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), new StaticValue(0), Duration.WhileOnBattlefield)); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), StaticValue.get(0), Duration.WhileOnBattlefield)); ability.setAbilityWord(AbilityWord.DOMAIN); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KessigWolfRun.java b/Mage.Sets/src/mage/cards/k/KessigWolfRun.java index 3dfb9a59d9..787bae0044 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(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn)); + ability.addEffect(new BoostTargetEffect(ManacostVariableValue.instance, StaticValue.get(0), Duration.EndOfTurn)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java b/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java index 0b71aea401..107a1fb17a 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), CardsInControllerHandCount.instance, Duration.EndOfTurn, true); + Effect effect = new BoostSourceEffect(StaticValue.get(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/KruphixsInsight.java b/Mage.Sets/src/mage/cards/k/KruphixsInsight.java index a0cf363446..fa4071206c 100644 --- a/Mage.Sets/src/mage/cards/k/KruphixsInsight.java +++ b/Mage.Sets/src/mage/cards/k/KruphixsInsight.java @@ -28,7 +28,7 @@ public final class KruphixsInsight extends CardImpl { // Reveal the top six cards of your library. Put up to three enchantment cards from among them into your hand and the rest of the revealed cards into your graveyard. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(6), false, new StaticValue(3), filter, Zone.GRAVEYARD, false, true, true,Zone.HAND, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(6), false, StaticValue.get(3), filter, Zone.GRAVEYARD, false, true, true,Zone.HAND, false)); } public KruphixsInsight(final KruphixsInsight card) { diff --git a/Mage.Sets/src/mage/cards/k/KryShield.java b/Mage.Sets/src/mage/cards/k/KryShield.java index eb321f215e..2b1f7c3697 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), TargetConvertedManaCost.instance, Duration.EndOfTurn, true) + ability.addEffect(new BoostTargetEffect(StaticValue.get(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/k/KyloRen.java b/Mage.Sets/src/mage/cards/k/KyloRen.java index eab9b02ff1..06cfc0f593 100644 --- a/Mage.Sets/src/mage/cards/k/KyloRen.java +++ b/Mage.Sets/src/mage/cards/k/KyloRen.java @@ -62,7 +62,7 @@ public final class KyloRen extends CardImpl { // Whenever Kylo Ren attacks, it gets +1/+0 for each creature in your graveyard and you may tap target creature defending player controls. CardsInControllerGraveyardCount value = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE); - Effect effect = new BoostSourceEffect(value, new StaticValue(0), Duration.WhileOnBattlefield); + Effect effect = new BoostSourceEffect(value, StaticValue.get(0), Duration.WhileOnBattlefield); effect.setText("it gets +1/+0 for each creature in your graveyard"); Ability ability = new AttacksTriggeredAbility(effect, false); ability.addEffect(new KyloRenTapTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/l/LastRites.java b/Mage.Sets/src/mage/cards/l/LastRites.java index 843b17bccf..4abccd4d7b 100644 --- a/Mage.Sets/src/mage/cards/l/LastRites.java +++ b/Mage.Sets/src/mage/cards/l/LastRites.java @@ -83,7 +83,7 @@ class LastRitesEffect extends OneShotEffect { } FilterCard filter = new FilterCard((discardCount > 1 ? "" : "a") + " nonland card" + (discardCount > 1 ? "s" : "")); filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); - StaticValue discardValue = new StaticValue(discardCount); + StaticValue discardValue = StaticValue.get(discardCount); Effect effect = new DiscardCardYouChooseTargetEffect(discardValue, filter, TargetController.ANY); effect.setTargetPointer(new FixedTarget(targetPlayer.getId())); effect.apply(game, source); diff --git a/Mage.Sets/src/mage/cards/l/LavaclawReaches.java b/Mage.Sets/src/mage/cards/l/LavaclawReaches.java index 9988c05f7d..e9039503d4 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(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn), new ManaCostsImpl("{X}"))); + addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(ManacostVariableValue.instance, StaticValue.get(0), Duration.EndOfTurn), new ManaCostsImpl("{X}"))); } public LavaclawReachesToken(final LavaclawReachesToken token) { super(token); diff --git a/Mage.Sets/src/mage/cards/l/LavakinBrawler.java b/Mage.Sets/src/mage/cards/l/LavakinBrawler.java index 4edc4e9084..0cf5eb70f4 100644 --- a/Mage.Sets/src/mage/cards/l/LavakinBrawler.java +++ b/Mage.Sets/src/mage/cards/l/LavakinBrawler.java @@ -34,7 +34,7 @@ public final class LavakinBrawler extends CardImpl { // Whenever Lavakin Brawler attacks, it gets +1/+0 until end of turn for each Elemental you control. this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect( - xValue, StaticValue.getZeroValue(), Duration.EndOfTurn, true + xValue, StaticValue.get(0), Duration.EndOfTurn, true ).setText("it gets +1/+0 until end of turn for each Elemental you control"), false)); } diff --git a/Mage.Sets/src/mage/cards/l/LichsTomb.java b/Mage.Sets/src/mage/cards/l/LichsTomb.java index 878d5d48e5..e87edd1fbc 100644 --- a/Mage.Sets/src/mage/cards/l/LichsTomb.java +++ b/Mage.Sets/src/mage/cards/l/LichsTomb.java @@ -67,7 +67,7 @@ class LichsTombTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { - ((SacrificeEffect) this.getEffects().get(0)).setAmount(new StaticValue(event.getAmount())); + ((SacrificeEffect) this.getEffects().get(0)).setAmount(StaticValue.get(event.getAmount())); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/l/LilianasSpoils.java b/Mage.Sets/src/mage/cards/l/LilianasSpoils.java index 9238ae90a5..5f99953c62 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasSpoils.java +++ b/Mage.Sets/src/mage/cards/l/LilianasSpoils.java @@ -34,7 +34,7 @@ public final class LilianasSpoils extends CardImpl { // Look at the top five cards of your library. You may reveal a black card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), filter, + StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true).setText("Look at the top five cards of your library. " + "You may reveal a black card from among them and put it into your hand. " diff --git a/Mage.Sets/src/mage/cards/l/LilianasTriumph.java b/Mage.Sets/src/mage/cards/l/LilianasTriumph.java index 5cb8a89ec4..ebe4f4488d 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasTriumph.java +++ b/Mage.Sets/src/mage/cards/l/LilianasTriumph.java @@ -34,7 +34,7 @@ public final class LilianasTriumph extends CardImpl { )); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DiscardEachPlayerEffect( - new StaticValue(1), false, TargetController.OPPONENT + StaticValue.get(1), false, TargetController.OPPONENT ), condition, "If you control a Liliana planeswalker, each opponent also discards a card." )); } diff --git a/Mage.Sets/src/mage/cards/l/LodestoneBauble.java b/Mage.Sets/src/mage/cards/l/LodestoneBauble.java index 06526f843f..a28028d795 100644 --- a/Mage.Sets/src/mage/cards/l/LodestoneBauble.java +++ b/Mage.Sets/src/mage/cards/l/LodestoneBauble.java @@ -138,7 +138,7 @@ class LodestoneBaubleDrawEffect extends OneShotEffect { UUID targetId = this.getTargetPointer().getFirst(game, source); Player targetPlayer = game.getPlayer(targetId); if (targetPlayer != null) { - Effect effect = new DrawCardTargetEffect(new StaticValue(1), false); + Effect effect = new DrawCardTargetEffect(StaticValue.get(1), false); effect.setTargetPointer(new FixedTarget(targetPlayer.getId())); DelayedTriggeredAbility ability = new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(effect); game.addDelayedTriggeredAbility(ability, source); diff --git a/Mage.Sets/src/mage/cards/l/LoneRevenant.java b/Mage.Sets/src/mage/cards/l/LoneRevenant.java index 9fdb6664e9..23122d6937 100644 --- a/Mage.Sets/src/mage/cards/l/LoneRevenant.java +++ b/Mage.Sets/src/mage/cards/l/LoneRevenant.java @@ -54,7 +54,7 @@ class LoneRevenantTriggeredAbility extends TriggeredAbilityImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); public LoneRevenantTriggeredAbility() { - super(Zone.BATTLEFIELD, new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false)); + super(Zone.BATTLEFIELD, new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false)); } public LoneRevenantTriggeredAbility(final LoneRevenantTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/l/LostOrderOfJarkeld.java b/Mage.Sets/src/mage/cards/l/LostOrderOfJarkeld.java index 44b3f31f12..1d28ca854c 100644 --- a/Mage.Sets/src/mage/cards/l/LostOrderOfJarkeld.java +++ b/Mage.Sets/src/mage/cards/l/LostOrderOfJarkeld.java @@ -40,7 +40,7 @@ public final class LostOrderOfJarkeld extends CardImpl { this.addAbility(new SimpleStaticAbility( Zone.ALL, new SetPowerToughnessSourceEffect( - new AdditiveDynamicValue(new CreaturesControlledByChosenPlayer(), new StaticValue(1)), Duration.EndOfGame) + new AdditiveDynamicValue(new CreaturesControlledByChosenPlayer(), StaticValue.get(1)), Duration.EndOfGame) )); } diff --git a/Mage.Sets/src/mage/cards/m/Machinate.java b/Mage.Sets/src/mage/cards/m/Machinate.java index b1039219f0..2b6459a845 100644 --- a/Mage.Sets/src/mage/cards/m/Machinate.java +++ b/Mage.Sets/src/mage/cards/m/Machinate.java @@ -30,7 +30,7 @@ public final class Machinate extends CardImpl { // Look at the top X cards of your library, where X is the number of artifacts you control. Put one of those cards into your hand and the rest on the bottom of your library in any order. DynamicValue artifactsOnControl = new PermanentsOnBattlefieldCount(filter); - LookLibraryAndPickControllerEffect effect = new LookLibraryAndPickControllerEffect(artifactsOnControl, false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false); + LookLibraryAndPickControllerEffect effect = new LookLibraryAndPickControllerEffect(artifactsOnControl, false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false); effect.setText("Look at the top X cards of your library, where X is the number of artifacts you control. Put one of those cards into your hand and the rest on the bottom of your library in any order."); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/m/MagmaSliver.java b/Mage.Sets/src/mage/cards/m/MagmaSliver.java index 61976a473c..eadc0ecd65 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaSliver.java +++ b/Mage.Sets/src/mage/cards/m/MagmaSliver.java @@ -36,7 +36,7 @@ public final class MagmaSliver extends CardImpl { this.toughness = new MageInt(3); // All Slivers have "{tap}: Target Sliver creature gets +X/+0 until end of turn, where X is the number of Slivers on the battlefield." - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS), new StaticValue(0), Duration.EndOfTurn, true), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS), StaticValue.get(0), Duration.EndOfTurn, true), new TapSourceCost()); Target target = new TargetCreaturePermanent(new FilterCreaturePermanent(SubType.SLIVER, "Sliver creature")); ability.addTarget(target); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); diff --git a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java index 914c755108..e21c70d44a 100644 --- a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java +++ b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java @@ -37,7 +37,7 @@ public final class ManticoreOfTheGauntlet extends CardImpl { counters.setText("put a -1/-1 counter on target creature you control"); counters.setTargetPointer(new FirstTargetPointer()); - Effect damage = new DamageTargetEffect(new StaticValue(3), true, "", true); + Effect damage = new DamageTargetEffect(StaticValue.get(3), true, "", true); damage.setText("{this} deals 3 damage to target opponent or planeswalker."); damage.setTargetPointer(new SecondTargetPointer()); diff --git a/Mage.Sets/src/mage/cards/m/MeishinTheMindCage.java b/Mage.Sets/src/mage/cards/m/MeishinTheMindCage.java index a88e657705..fcb4fc4fcd 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(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"))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new SignInversionDynamicValue(CardsInControllerHandCount.instance), StaticValue.get(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/MemorialToUnity.java b/Mage.Sets/src/mage/cards/m/MemorialToUnity.java index 4a60ce8a17..750b423fbd 100644 --- a/Mage.Sets/src/mage/cards/m/MemorialToUnity.java +++ b/Mage.Sets/src/mage/cards/m/MemorialToUnity.java @@ -34,7 +34,7 @@ public final class MemorialToUnity extends CardImpl { // {2}{G}, {T}, Sacrifice Memorial to Unity: Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Then put the rest on the bottom of your library in a random order. Effect effect = new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), new FilterCreatureCard("a creature card"), false, true + StaticValue.get(5), false, StaticValue.get(1), new FilterCreatureCard("a creature card"), false, true ).setBackInRandomOrder(true); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{G}")); diff --git a/Mage.Sets/src/mage/cards/m/MephiticOoze.java b/Mage.Sets/src/mage/cards/m/MephiticOoze.java index ac2ebf0e0d..ff727fb266 100644 --- a/Mage.Sets/src/mage/cards/m/MephiticOoze.java +++ b/Mage.Sets/src/mage/cards/m/MephiticOoze.java @@ -38,7 +38,7 @@ public final class MephiticOoze extends CardImpl { this.toughness = new MageInt(5); // Mephitic Ooze gets +1/+0 for each artifact you control. - Effect effect = new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.WhileOnBattlefield); + Effect effect = new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.WhileOnBattlefield); effect.setText("{this} gets +1/+0 for each artifact you control"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/m/MercadiasDownfall.java b/Mage.Sets/src/mage/cards/m/MercadiasDownfall.java index babb46a1ab..29f5ae26e8 100644 --- a/Mage.Sets/src/mage/cards/m/MercadiasDownfall.java +++ b/Mage.Sets/src/mage/cards/m/MercadiasDownfall.java @@ -32,7 +32,7 @@ public final class MercadiasDownfall extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); // Each attacking creature gets +1/+0 until end of turn for each nonbasic land defending player controls. - this.getSpellAbility().addEffect(new BoostAllEffect(new DefendersNonBasicLandCount(), new StaticValue(0), Duration.EndOfTurn, new FilterAttackingCreature(), true, rule)); + this.getSpellAbility().addEffect(new BoostAllEffect(new DefendersNonBasicLandCount(), StaticValue.get(0), Duration.EndOfTurn, new FilterAttackingCreature(), true, rule)); } diff --git a/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java b/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java index 4e8804712f..0ec6754e71 100644 --- a/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java +++ b/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java @@ -40,7 +40,7 @@ public final class MercilessJavelineer extends CardImpl { Zone.BATTLEFIELD, new AddCountersTargetEffect( CounterType.M1M1.createInstance(), - new StaticValue(1), + StaticValue.get(1), Outcome.Removal), new ManaCostsImpl("{2}")); ability.addEffect( diff --git a/Mage.Sets/src/mage/cards/m/MilitantInquisitor.java b/Mage.Sets/src/mage/cards/m/MilitantInquisitor.java index 8a8d2254ef..d128a303bf 100644 --- a/Mage.Sets/src/mage/cards/m/MilitantInquisitor.java +++ b/Mage.Sets/src/mage/cards/m/MilitantInquisitor.java @@ -38,7 +38,7 @@ public final class MilitantInquisitor extends CardImpl { this.toughness = new MageInt(3); // Miltant Inquisitor gets +1/+0 for each Equipment you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.WhileOnBattlefield))); } public MilitantInquisitor(final MilitantInquisitor card) { diff --git a/Mage.Sets/src/mage/cards/m/MilitiaBugler.java b/Mage.Sets/src/mage/cards/m/MilitiaBugler.java index 38feec7603..adee64fd9e 100644 --- a/Mage.Sets/src/mage/cards/m/MilitiaBugler.java +++ b/Mage.Sets/src/mage/cards/m/MilitiaBugler.java @@ -40,7 +40,7 @@ public final class MilitiaBugler extends CardImpl { // When Militia Bugler enters the battlefield, look at the top four cards of your library. You may reveal a creature card with power 2 or less from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(1), filter, Zone.LIBRARY, false, + StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, true, Zone.HAND, false, true, false ), false)); } diff --git a/Mage.Sets/src/mage/cards/m/MobMentality.java b/Mage.Sets/src/mage/cards/m/MobMentality.java index e00596f1a3..a3f24a467c 100644 --- a/Mage.Sets/src/mage/cards/m/MobMentality.java +++ b/Mage.Sets/src/mage/cards/m/MobMentality.java @@ -59,7 +59,7 @@ public final class MobMentality extends CardImpl { class MobMentalityTriggeredAbility extends TriggeredAbilityImpl { MobMentalityTriggeredAbility() { - super(Zone.BATTLEFIELD, new BoostTargetEffect(new AttackingCreatureCount(), new StaticValue(0), Duration.EndOfTurn, true)); + super(Zone.BATTLEFIELD, new BoostTargetEffect(new AttackingCreatureCount(), StaticValue.get(0), Duration.EndOfTurn, true)); } private MobMentalityTriggeredAbility(final MobMentalityTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/m/MoodmarkPainter.java b/Mage.Sets/src/mage/cards/m/MoodmarkPainter.java index f114b04ed0..da7c3de883 100644 --- a/Mage.Sets/src/mage/cards/m/MoodmarkPainter.java +++ b/Mage.Sets/src/mage/cards/m/MoodmarkPainter.java @@ -44,7 +44,7 @@ public final class MoodmarkPainter extends CardImpl { false, "Undergrowth — " ); ability.addEffect(new BoostTargetEffect( - xValue, new StaticValue(0), + xValue, StaticValue.get(0), Duration.EndOfTurn, true ).setText("and gets +X/+0 until end of turn, " + "where X is the number of creature cards in your graveyard") diff --git a/Mage.Sets/src/mage/cards/n/NagaOracle.java b/Mage.Sets/src/mage/cards/n/NagaOracle.java index 22e5123b44..e1d1376f29 100644 --- a/Mage.Sets/src/mage/cards/n/NagaOracle.java +++ b/Mage.Sets/src/mage/cards/n/NagaOracle.java @@ -32,9 +32,9 @@ public final class NagaOracle extends CardImpl { // and the rest back on top of your library in any order. Effect effect = new LookLibraryAndPickControllerEffect( /* oh god, Microsoft looks conservative with their function parameters in comparison */ - new StaticValue(3), + StaticValue.get(3), false, - new StaticValue(3), + StaticValue.get(3), new FilterCard("cards"), Zone.LIBRARY, true, diff --git a/Mage.Sets/src/mage/cards/n/NaggingThoughts.java b/Mage.Sets/src/mage/cards/n/NaggingThoughts.java index 9aa95cbb7e..6da1d42ae9 100644 --- a/Mage.Sets/src/mage/cards/n/NaggingThoughts.java +++ b/Mage.Sets/src/mage/cards/n/NaggingThoughts.java @@ -22,7 +22,7 @@ public final class NaggingThoughts extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}"); // Look at the top two cards of your library. Put one of them into your hand and the other into your graveyard. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.GRAVEYARD, false, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.GRAVEYARD, false, false)); // Madness {1}{U} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{U}"))); diff --git a/Mage.Sets/src/mage/cards/n/NajeelaTheBladeBlossom.java b/Mage.Sets/src/mage/cards/n/NajeelaTheBladeBlossom.java index d39e57e989..8b268d3ff5 100644 --- a/Mage.Sets/src/mage/cards/n/NajeelaTheBladeBlossom.java +++ b/Mage.Sets/src/mage/cards/n/NajeelaTheBladeBlossom.java @@ -48,7 +48,7 @@ public final class NajeelaTheBladeBlossom extends CardImpl { // Whenever a Warrior attacks, you may have its controller create a 1/1 white Warrior creature token that's tapped and attacking. this.addAbility(new AttacksAllTriggeredAbility( - new CreateTokenTargetEffect(new WarriorToken(), new StaticValue(1), true, true) + new CreateTokenTargetEffect(new WarriorToken(), StaticValue.get(1), true, true) .setText("you may have its controller create a 1/1 white Warrior creature token that's tapped and attacking"), true, filter, SetTargetPointer.PLAYER, false, true )); diff --git a/Mage.Sets/src/mage/cards/n/NarsetParterOfVeils.java b/Mage.Sets/src/mage/cards/n/NarsetParterOfVeils.java index 9a6571e6ce..b9d358dd4f 100644 --- a/Mage.Sets/src/mage/cards/n/NarsetParterOfVeils.java +++ b/Mage.Sets/src/mage/cards/n/NarsetParterOfVeils.java @@ -44,7 +44,7 @@ public final class NarsetParterOfVeils extends CardImpl { // -2: Look at the top four cards of your library. You may reveal a noncreature, nonland card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(1), filter, + StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true).setText("Look at the top four cards of your library. " + diff --git a/Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java b/Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java index b6c5f0efd2..c71dab4b0b 100644 --- a/Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java +++ b/Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java @@ -41,7 +41,7 @@ public final class NicolBolasTheRavager extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Nicol Bolas, the Ravager enters the battlefield, each opponent discards a card. - this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect(new StaticValue(1), false, TargetController.OPPONENT))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect(StaticValue.get(1), false, TargetController.OPPONENT))); // {4}{U}{B}{R}: Exile Nicol Bolas, the Ravager, then return him to the battlefield transformed under his owner's control. Activate this ability only any time you could cast a sorcerry. this.addAbility(new TransformAbility()); diff --git a/Mage.Sets/src/mage/cards/n/NimDevourer.java b/Mage.Sets/src/mage/cards/n/NimDevourer.java index bf9f12e8e3..3487c3f83d 100644 --- a/Mage.Sets/src/mage/cards/n/NimDevourer.java +++ b/Mage.Sets/src/mage/cards/n/NimDevourer.java @@ -49,7 +49,7 @@ public final class NimDevourer extends CardImpl { this.toughness = new MageInt(1); // Nim Devourer gets +1/+0 for each artifact you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.WhileOnBattlefield))); // {B}{B}: Return Nim Devourer from your graveyard to the battlefield, then sacrifice a creature. Activate this ability only during your upkeep. Ability ability = new ConditionalActivatedAbility(Zone.GRAVEYARD, diff --git a/Mage.Sets/src/mage/cards/n/NimGrotesque.java b/Mage.Sets/src/mage/cards/n/NimGrotesque.java index 7effd55015..03442660b8 100644 --- a/Mage.Sets/src/mage/cards/n/NimGrotesque.java +++ b/Mage.Sets/src/mage/cards/n/NimGrotesque.java @@ -29,7 +29,7 @@ public final class NimGrotesque extends CardImpl { this.toughness = new MageInt(6); // Nim Grotesque gets +1/+0 for each artifact you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent()), new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent()), StaticValue.get(0), Duration.WhileOnBattlefield))); } public NimGrotesque(final NimGrotesque card) { diff --git a/Mage.Sets/src/mage/cards/n/NimLasher.java b/Mage.Sets/src/mage/cards/n/NimLasher.java index f31e98ace3..073663abf7 100644 --- a/Mage.Sets/src/mage/cards/n/NimLasher.java +++ b/Mage.Sets/src/mage/cards/n/NimLasher.java @@ -33,7 +33,7 @@ public final class NimLasher extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.WhileOnBattlefield))); } public NimLasher(final NimLasher card) { diff --git a/Mage.Sets/src/mage/cards/n/NimShambler.java b/Mage.Sets/src/mage/cards/n/NimShambler.java index 27f19d64ee..dff0c0e4ad 100644 --- a/Mage.Sets/src/mage/cards/n/NimShambler.java +++ b/Mage.Sets/src/mage/cards/n/NimShambler.java @@ -38,7 +38,7 @@ public final class NimShambler extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.WhileOnBattlefield))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)))); } diff --git a/Mage.Sets/src/mage/cards/n/NimShrieker.java b/Mage.Sets/src/mage/cards/n/NimShrieker.java index 8bef1efc8a..cfcac4f232 100644 --- a/Mage.Sets/src/mage/cards/n/NimShrieker.java +++ b/Mage.Sets/src/mage/cards/n/NimShrieker.java @@ -35,7 +35,7 @@ public final class NimShrieker extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.WhileOnBattlefield))); } public NimShrieker(final NimShrieker card) { diff --git a/Mage.Sets/src/mage/cards/n/NissaGenesisMage.java b/Mage.Sets/src/mage/cards/n/NissaGenesisMage.java index 1629683674..ba4a695ce0 100644 --- a/Mage.Sets/src/mage/cards/n/NissaGenesisMage.java +++ b/Mage.Sets/src/mage/cards/n/NissaGenesisMage.java @@ -58,7 +58,7 @@ public final class NissaGenesisMage extends CardImpl { //-10: Look at the top ten cards of your library. You may put any number of creature and/or land cards from among them onto the battlefield. Put the rest on the bottom of your library in a random order.); this.addAbility(new LoyaltyAbility( - new LookLibraryAndPickControllerEffect(new StaticValue(10), false, new StaticValue(10), filter, + new LookLibraryAndPickControllerEffect(StaticValue.get(10), false, StaticValue.get(10), filter, Zone.LIBRARY, true, false, true, Zone.BATTLEFIELD, true, true, false).setBackInRandomOrder(true), -10)); } diff --git a/Mage.Sets/src/mage/cards/n/NullProfusion.java b/Mage.Sets/src/mage/cards/n/NullProfusion.java index 6332585855..263d299c77 100644 --- a/Mage.Sets/src/mage/cards/n/NullProfusion.java +++ b/Mage.Sets/src/mage/cards/n/NullProfusion.java @@ -37,7 +37,7 @@ public final class NullProfusion extends CardImpl { // Your maximum hand size is two. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect( - new StaticValue(2), + StaticValue.get(2), Duration.WhileOnBattlefield, HandSizeModification.SET, TargetController.YOU diff --git a/Mage.Sets/src/mage/cards/o/OathOfChandra.java b/Mage.Sets/src/mage/cards/o/OathOfChandra.java index a6018a68aa..6dfec92ff9 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfChandra.java +++ b/Mage.Sets/src/mage/cards/o/OathOfChandra.java @@ -48,7 +48,7 @@ public final class OathOfChandra extends CardImpl { this.addAbility(ability); // At the beginning of each end step, if a planeswalker entered the battlefield under your control this turn, Oath of Chandra deals 2 damage to each opponent. this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility( - new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT), + new DamagePlayersEffect(Outcome.Damage, StaticValue.get(2), TargetController.OPPONENT), TargetController.ANY, false), OathOfChandraCondition.instance, "At the beginning of each end step, if a planeswalker entered the battlefield under your control this turn, {this} deals 2 damage to each opponent."), new OathOfChandraWatcher()); } diff --git a/Mage.Sets/src/mage/cards/o/OboroEnvoy.java b/Mage.Sets/src/mage/cards/o/OboroEnvoy.java index fa6d5891b0..eb728f92e8 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(CardsInControllerHandCount.instance), new StaticValue(-0), Duration.EndOfTurn, true); + Effect effect = new BoostTargetEffect(new SignInversionDynamicValue(CardsInControllerHandCount.instance), StaticValue.get(-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/OloroAgelessAscetic.java b/Mage.Sets/src/mage/cards/o/OloroAgelessAscetic.java index 3d51dcc109..125e2172b4 100644 --- a/Mage.Sets/src/mage/cards/o/OloroAgelessAscetic.java +++ b/Mage.Sets/src/mage/cards/o/OloroAgelessAscetic.java @@ -47,7 +47,7 @@ public final class OloroAgelessAscetic extends CardImpl { // At the beginning of your upkeep, if Oloro, Ageless Ascetic is in the command zone, you gain 2 life. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.COMMAND, - new GainLifeEffect(new StaticValue(2), "if {this} is in the command zone, you gain 2 life"), TargetController.YOU, false)); + new GainLifeEffect(StaticValue.get(2), "if {this} is in the command zone, you gain 2 life"), TargetController.YOU, false)); } public OloroAgelessAscetic(final OloroAgelessAscetic card) { diff --git a/Mage.Sets/src/mage/cards/o/OnceUponATime.java b/Mage.Sets/src/mage/cards/o/OnceUponATime.java index 871e8985a4..ef52898979 100644 --- a/Mage.Sets/src/mage/cards/o/OnceUponATime.java +++ b/Mage.Sets/src/mage/cards/o/OnceUponATime.java @@ -46,7 +46,7 @@ public final class OnceUponATime extends CardImpl { // Look at the top five cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), filter, + StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true).setText("Look at the top five cards of your library. " + diff --git a/Mage.Sets/src/mage/cards/o/OnwardVictory.java b/Mage.Sets/src/mage/cards/o/OnwardVictory.java index e5d5aa698d..c18eb6220f 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(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true)); + getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(TargetPermanentPowerCount.instance, StaticValue.get(0), Duration.EndOfTurn, true)); // to // Victory diff --git a/Mage.Sets/src/mage/cards/p/PeerThroughDepths.java b/Mage.Sets/src/mage/cards/p/PeerThroughDepths.java index f508a5a8f2..f9bee649d1 100644 --- a/Mage.Sets/src/mage/cards/p/PeerThroughDepths.java +++ b/Mage.Sets/src/mage/cards/p/PeerThroughDepths.java @@ -35,7 +35,7 @@ public final class PeerThroughDepths extends CardImpl { // Look at the top five cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. // Put the rest on the bottom of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1), filter, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(1), filter, false)); } public PeerThroughDepths (final PeerThroughDepths card) { diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianNegator.java b/Mage.Sets/src/mage/cards/p/PhyrexianNegator.java index 728446d4d4..1511c15e12 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianNegator.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianNegator.java @@ -74,7 +74,7 @@ class PhyrexianNegatorTriggeredAbility extends TriggeredAbilityImpl { Player player = game.getPlayer(controller); if (player != null) { getEffects().get(0).setTargetPointer(new FixedTarget(player.getId())); - ((SacrificeEffect) getEffects().get(0)).setAmount(new StaticValue(event.getAmount())); + ((SacrificeEffect) getEffects().get(0)).setAmount(StaticValue.get(event.getAmount())); return true; } } diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianObliterator.java b/Mage.Sets/src/mage/cards/p/PhyrexianObliterator.java index cfd66b7524..167ae39f70 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianObliterator.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianObliterator.java @@ -77,7 +77,7 @@ class PhyrexianObliteratorTriggeredAbility extends TriggeredAbilityImpl { Player player = game.getPlayer(controller); if (player != null) { getEffects().get(0).setTargetPointer(new FixedTarget(player.getId())); - ((SacrificeEffect) getEffects().get(0)).setAmount(new StaticValue(event.getAmount())); + ((SacrificeEffect) getEffects().get(0)).setAmount(StaticValue.get(event.getAmount())); return true; } } diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java b/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java index b48842a7ea..7347df1497 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java @@ -106,7 +106,7 @@ class PhyrexianTotemTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId().equals(getSourceId())) { getEffects().get(0).setTargetPointer(new FixedTarget(getControllerId())); - ((SacrificeEffect) getEffects().get(0)).setAmount(new StaticValue(event.getAmount())); + ((SacrificeEffect) getEffects().get(0)).setAmount(StaticValue.get(event.getAmount())); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/p/PiecesOfThePuzzle.java b/Mage.Sets/src/mage/cards/p/PiecesOfThePuzzle.java index 51aac31bb4..9fb20172f3 100644 --- a/Mage.Sets/src/mage/cards/p/PiecesOfThePuzzle.java +++ b/Mage.Sets/src/mage/cards/p/PiecesOfThePuzzle.java @@ -29,7 +29,7 @@ public final class PiecesOfThePuzzle extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}"); // Reveal the top five cards of your library. Put up to two instant and/or sorcery cards from among them into your hand and the rest into your graveyard. - Effect effect = new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(2), FILTER, Zone.GRAVEYARD, false, true, true, Zone.HAND, false); + Effect effect = new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(2), FILTER, Zone.GRAVEYARD, false, true, true, Zone.HAND, false); effect.setText("Reveal the top five cards of your library. Put up to two instant and/or sorcery cards from among them into your hand and the rest into your graveyard"); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/p/PropheticBolt.java b/Mage.Sets/src/mage/cards/p/PropheticBolt.java index 76a980aabe..3e0479362b 100644 --- a/Mage.Sets/src/mage/cards/p/PropheticBolt.java +++ b/Mage.Sets/src/mage/cards/p/PropheticBolt.java @@ -25,7 +25,7 @@ public final class PropheticBolt extends CardImpl { // Prophetic Bolt deals 4 damage to any target. Look at the top four cards of your library. Put one of those cards into your hand and the rest on the bottom of your library in any order. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addTarget(new TargetAnyTarget()); - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false)); } public PropheticBolt(final PropheticBolt card) { diff --git a/Mage.Sets/src/mage/cards/r/RabbleRouser.java b/Mage.Sets/src/mage/cards/r/RabbleRouser.java index 3ea9d9ab5d..989395a15d 100644 --- a/Mage.Sets/src/mage/cards/r/RabbleRouser.java +++ b/Mage.Sets/src/mage/cards/r/RabbleRouser.java @@ -40,7 +40,7 @@ public final class RabbleRouser extends CardImpl { //{R}, {T}: Attacking creatures get +X/+0 until end of turn, where X is Rabble-Rouser's power. DynamicValue amount = new SourcePermanentPowerCount(); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new BoostAllEffect(amount, new StaticValue(0), Duration.EndOfTurn, new FilterAttackingCreature(), false, + new BoostAllEffect(amount, StaticValue.get(0), Duration.EndOfTurn, new FilterAttackingCreature(), false, "Attacking creatures get +X/+0 until end of turn, where X is {this}'s power", true), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/r/RafterDemon.java b/Mage.Sets/src/mage/cards/r/RafterDemon.java index 10e7f1afef..9891e41b34 100644 --- a/Mage.Sets/src/mage/cards/r/RafterDemon.java +++ b/Mage.Sets/src/mage/cards/r/RafterDemon.java @@ -34,7 +34,7 @@ public final class RafterDemon extends CardImpl { // When Rafter Demon enters the battlefield, if its spectacle cost was paid, each opponent discards a card. this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect( - new StaticValue(1), false, TargetController.OPPONENT + StaticValue.get(1), false, TargetController.OPPONENT )), SpectacleCondition.instance, "When {this} enters the battlefield, " + "if its spectacle cost was paid, " + diff --git a/Mage.Sets/src/mage/cards/r/RageExtractor.java b/Mage.Sets/src/mage/cards/r/RageExtractor.java index 1b0351aa64..10bfaa1f76 100644 --- a/Mage.Sets/src/mage/cards/r/RageExtractor.java +++ b/Mage.Sets/src/mage/cards/r/RageExtractor.java @@ -66,7 +66,7 @@ class RageExtractorTriggeredAbility extends TriggeredAbilityImpl { if (spell != null) { for (ManaCost cost : spell.getCard().getManaCost()) { if (cost instanceof PhyrexianManaCost) { - ((DamageTargetEffect)getEffects().get(0)).setAmount(new StaticValue(spell.getConvertedManaCost())); + ((DamageTargetEffect)getEffects().get(0)).setAmount(StaticValue.get(spell.getConvertedManaCost())); return true; } } diff --git a/Mage.Sets/src/mage/cards/r/RagebloodShaman.java b/Mage.Sets/src/mage/cards/r/RagebloodShaman.java index df4e25fe79..ae12ac75d1 100644 --- a/Mage.Sets/src/mage/cards/r/RagebloodShaman.java +++ b/Mage.Sets/src/mage/cards/r/RagebloodShaman.java @@ -36,7 +36,7 @@ public final class RagebloodShaman extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); // Other Minotaur creatures you control get +1/+1 and have trample. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(new StaticValue(1), new StaticValue(1), Duration.WhileOnBattlefield, filter, true))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(StaticValue.get(1), StaticValue.get(1), Duration.WhileOnBattlefield, filter, true))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter, true))); } diff --git a/Mage.Sets/src/mage/cards/r/RakdosRiteknife.java b/Mage.Sets/src/mage/cards/r/RakdosRiteknife.java index 5af3ca5d8d..4f5f3f3b79 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosRiteknife.java +++ b/Mage.Sets/src/mage/cards/r/RakdosRiteknife.java @@ -42,7 +42,7 @@ public final class RakdosRiteknife extends CardImpl { this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0 for each blood counter on Rakdos Riteknife and has "{T}, Sacrifice a creature: Put a blood counter on Rakdos Riteknife." - SimpleStaticAbility staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CountersSourceCount(CounterType.BLOOD), new StaticValue(0)).setText("Equipped creature gets +1/+0 for each blood counter on {this}")); + SimpleStaticAbility staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CountersSourceCount(CounterType.BLOOD), StaticValue.get(0)).setText("Equipped creature gets +1/+0 for each blood counter on {this}")); SimpleActivatedAbility grantedAbility = new SimpleActivatedAbility(new RakdosRiteKnifeEffect(this.getId()), new TapSourceCost()); grantedAbility.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); staticAbility.addEffect(new GainAbilityAttachedEffect(grantedAbility, AttachmentType.EQUIPMENT).setText("and has \"{T}, Sacrifice a creature: Put a blood counter on {this}.\"")); diff --git a/Mage.Sets/src/mage/cards/r/RalIzzetViceroy.java b/Mage.Sets/src/mage/cards/r/RalIzzetViceroy.java index 7390e5066e..5b6b887a5d 100644 --- a/Mage.Sets/src/mage/cards/r/RalIzzetViceroy.java +++ b/Mage.Sets/src/mage/cards/r/RalIzzetViceroy.java @@ -35,7 +35,7 @@ public final class RalIzzetViceroy extends CardImpl { // +1: Look at the top two cards of your library. Put one of them into your hand and the other into your graveyard. this.addAbility(new LoyaltyAbility( new LookLibraryAndPickControllerEffect( - new StaticValue(2), false, new StaticValue(1), + StaticValue.get(2), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false ), 1 )); diff --git a/Mage.Sets/src/mage/cards/r/RalsOutburst.java b/Mage.Sets/src/mage/cards/r/RalsOutburst.java index 40944d7951..43c5dffb7c 100644 --- a/Mage.Sets/src/mage/cards/r/RalsOutburst.java +++ b/Mage.Sets/src/mage/cards/r/RalsOutburst.java @@ -24,7 +24,7 @@ public final class RalsOutburst extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect( - new StaticValue(2), false, new StaticValue(1), + StaticValue.get(2), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false )); } diff --git a/Mage.Sets/src/mage/cards/r/RalsStaticaster.java b/Mage.Sets/src/mage/cards/r/RalsStaticaster.java index 87de152208..bab88d5831 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( - CardsInControllerHandCount.instance, new StaticValue(0), + CardsInControllerHandCount.instance, StaticValue.get(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/RamunapRuins.java b/Mage.Sets/src/mage/cards/r/RamunapRuins.java index 8d0421a4f9..20886a354b 100644 --- a/Mage.Sets/src/mage/cards/r/RamunapRuins.java +++ b/Mage.Sets/src/mage/cards/r/RamunapRuins.java @@ -49,7 +49,7 @@ public final class RamunapRuins extends CardImpl { this.addAbility(manaAbility); // {2}{R}{R}, {t}, Sacrifice a Desert: Ramunap Ruins deals 2 damage to each opponent. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT), + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(Outcome.Damage, StaticValue.get(2), TargetController.OPPONENT), new ManaCostsImpl("{2}{R}{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true))); diff --git a/Mage.Sets/src/mage/cards/r/RansackTheLab.java b/Mage.Sets/src/mage/cards/r/RansackTheLab.java index 252f5e0b82..7242bd300a 100644 --- a/Mage.Sets/src/mage/cards/r/RansackTheLab.java +++ b/Mage.Sets/src/mage/cards/r/RansackTheLab.java @@ -19,7 +19,7 @@ public final class RansackTheLab extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); // Look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false)); } diff --git a/Mage.Sets/src/mage/cards/r/RatColony.java b/Mage.Sets/src/mage/cards/r/RatColony.java index 86b6a1d5c2..ac4d8ab9cc 100644 --- a/Mage.Sets/src/mage/cards/r/RatColony.java +++ b/Mage.Sets/src/mage/cards/r/RatColony.java @@ -41,7 +41,7 @@ public final class RatColony extends CardImpl { // Rat Colony gets +1/+0 for each other Rat you control. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), - new StaticValue(0), Duration.WhileOnBattlefield, false))); + StaticValue.get(0), Duration.WhileOnBattlefield, false))); // A deck can have any number of cards named Rat Colony. this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("A deck can have any number of cards named Rat Colony."))); diff --git a/Mage.Sets/src/mage/cards/r/RavenFamiliar.java b/Mage.Sets/src/mage/cards/r/RavenFamiliar.java index f867635d39..5082eff967 100644 --- a/Mage.Sets/src/mage/cards/r/RavenFamiliar.java +++ b/Mage.Sets/src/mage/cards/r/RavenFamiliar.java @@ -33,7 +33,7 @@ public final class RavenFamiliar extends CardImpl { this.addAbility(new EchoAbility("{2}{U}")); // When Raven Familiar enters the battlefield, look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order. this.addAbility(new EntersBattlefieldTriggeredAbility( - new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false), + new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false), false)); } diff --git a/Mage.Sets/src/mage/cards/r/RealityStrobe.java b/Mage.Sets/src/mage/cards/r/RealityStrobe.java index 08893bd4b6..7176e3a00e 100644 --- a/Mage.Sets/src/mage/cards/r/RealityStrobe.java +++ b/Mage.Sets/src/mage/cards/r/RealityStrobe.java @@ -30,7 +30,7 @@ public final class RealityStrobe extends CardImpl { // Exile Reality Strobe this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); // with three time counters on it. - Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), new StaticValue(3), false, true); + Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), false, true); effect.setText("with 3 time counters on it"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetPermanent()); diff --git a/Mage.Sets/src/mage/cards/r/RimehornAurochs.java b/Mage.Sets/src/mage/cards/r/RimehornAurochs.java index b1488d7428..8145bfdae6 100644 --- a/Mage.Sets/src/mage/cards/r/RimehornAurochs.java +++ b/Mage.Sets/src/mage/cards/r/RimehornAurochs.java @@ -47,7 +47,7 @@ public final class RimehornAurochs extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Whenever Rimehorn Aurochs attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), StaticValue.get(0), Duration.EndOfTurn, true), false)); // {2}{S}: Target creature blocks target creature this turn if able. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RimehornAurochsEffect(), new ManaCostsImpl("{2}{S}")); diff --git a/Mage.Sets/src/mage/cards/r/RiptideMangler.java b/Mage.Sets/src/mage/cards/r/RiptideMangler.java index 52742ac9f9..32ffe916cb 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideMangler.java +++ b/Mage.Sets/src/mage/cards/r/RiptideMangler.java @@ -71,7 +71,7 @@ class RiptideManglerEffect extends OneShotEffect { if (permanent == null) { return false; } - game.addEffect(new SetPowerSourceEffect(new StaticValue(permanent.getPower().getValue()), Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); + game.addEffect(new SetPowerSourceEffect(StaticValue.get(permanent.getPower().getValue()), Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); return true; } } diff --git a/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java b/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java index 496d1bd6a7..8533a96154 100644 --- a/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java +++ b/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java @@ -34,7 +34,7 @@ public final class RoilmagesTrick extends CardImpl { // Converge — Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast Roilmage's Trick. this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE); this.getSpellAbility().addEffect(new BoostAllEffect( - new SignInversionDynamicValue(ColorsOfManaSpentToCastCount.getInstance()), new StaticValue(-0), Duration.EndOfTurn, filter, false, + new SignInversionDynamicValue(ColorsOfManaSpentToCastCount.getInstance()), StaticValue.get(-0), Duration.EndOfTurn, filter, false, "Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast {this}.
", true)); // Draw a card. diff --git a/Mage.Sets/src/mage/cards/r/RubblebeltRioters.java b/Mage.Sets/src/mage/cards/r/RubblebeltRioters.java index 836019948d..a9b33ad769 100644 --- a/Mage.Sets/src/mage/cards/r/RubblebeltRioters.java +++ b/Mage.Sets/src/mage/cards/r/RubblebeltRioters.java @@ -32,7 +32,7 @@ public final class RubblebeltRioters extends CardImpl { // Whenever Rubblebelt Rioters attacks, it gets +X/+0 until end of turn, where X is the greatest power among creatures you control. this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect( - GreatestPowerAmongControlledCreaturesValue.instance, new StaticValue(0), + GreatestPowerAmongControlledCreaturesValue.instance, StaticValue.get(0), Duration.EndOfTurn, true ), false)); } diff --git a/Mage.Sets/src/mage/cards/r/RunechantersPike.java b/Mage.Sets/src/mage/cards/r/RunechantersPike.java index 8c61e3ba2a..678cbe7a13 100644 --- a/Mage.Sets/src/mage/cards/r/RunechantersPike.java +++ b/Mage.Sets/src/mage/cards/r/RunechantersPike.java @@ -42,7 +42,7 @@ public final class RunechantersPike extends CardImpl { // Equipped creature has first strike and gets +X/+0 where X is the number of instant and sorcery cards in your graveyard. Effect effect = new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT); - Effect effect2 = new BoostEquippedEffect(new RunechantersPikeValue(), new StaticValue(0)); + Effect effect2 = new BoostEquippedEffect(new RunechantersPikeValue(), StaticValue.get(0)); effect.setText("Equipped creature has first strike"); effect2.setText(" and gets +X/+0 where X is the number of instant and sorcery cards in your graveyard."); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); diff --git a/Mage.Sets/src/mage/cards/r/RushOfBlood.java b/Mage.Sets/src/mage/cards/r/RushOfBlood.java index 09daee68f0..da5f102f20 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(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true)); + this.getSpellAbility().addEffect(new BoostTargetEffect(TargetPermanentPowerCount.instance, StaticValue.get(0), Duration.EndOfTurn, true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/r/RuthlessSniper.java b/Mage.Sets/src/mage/cards/r/RuthlessSniper.java index bc84b92180..da492f5da0 100644 --- a/Mage.Sets/src/mage/cards/r/RuthlessSniper.java +++ b/Mage.Sets/src/mage/cards/r/RuthlessSniper.java @@ -35,7 +35,7 @@ public final class RuthlessSniper extends CardImpl { new DoIfCostPaid( new AddCountersTargetEffect( CounterType.M1M1.createInstance(), - new StaticValue(1), + StaticValue.get(1), Outcome.Removal), new ManaCostsImpl("{1}"))); ability.addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/s/SalvageSlasher.java b/Mage.Sets/src/mage/cards/s/SalvageSlasher.java index f786b4b01c..4fa24e8edb 100644 --- a/Mage.Sets/src/mage/cards/s/SalvageSlasher.java +++ b/Mage.Sets/src/mage/cards/s/SalvageSlasher.java @@ -31,7 +31,7 @@ public final class SalvageSlasher extends CardImpl { // Salvage Slasher gets +1/+0 for each artifact card in your graveyard. BoostSourceEffect effect = new BoostSourceEffect(new CardsInControllerGraveyardCount(new FilterArtifactCard()), - new StaticValue(0), + StaticValue.get(0), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/s/SarkhanFireblood.java b/Mage.Sets/src/mage/cards/s/SarkhanFireblood.java index c7dfe6717e..274afded81 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhanFireblood.java +++ b/Mage.Sets/src/mage/cards/s/SarkhanFireblood.java @@ -47,7 +47,7 @@ public final class SarkhanFireblood extends CardImpl { // +1: Add two mana of any combination of colors. Spend this mana only to cast Dragon spells. this.addAbility(new LoyaltyAbility( new AddConditionalManaOfAnyColorEffect( - new StaticValue(2), + StaticValue.get(2), new ConditionalSpellManaBuilder(filter), false ), 1 diff --git a/Mage.Sets/src/mage/cards/s/SarkhansDragonfire.java b/Mage.Sets/src/mage/cards/s/SarkhansDragonfire.java index d61bdcf846..06b3411b02 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhansDragonfire.java +++ b/Mage.Sets/src/mage/cards/s/SarkhansDragonfire.java @@ -34,7 +34,7 @@ public final class SarkhansDragonfire extends CardImpl { // Look at the top five cards of your library. You may reveal a red card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), filter, + StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true).setText("Look at the top five cards of your library. " + "You may reveal a red card from among them and put it into your hand. " diff --git a/Mage.Sets/src/mage/cards/s/SeaGateOracle.java b/Mage.Sets/src/mage/cards/s/SeaGateOracle.java index d00986166e..d1b6ac4e32 100644 --- a/Mage.Sets/src/mage/cards/s/SeaGateOracle.java +++ b/Mage.Sets/src/mage/cards/s/SeaGateOracle.java @@ -28,7 +28,7 @@ public final class SeaGateOracle extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); - this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false), false)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false), false)); } diff --git a/Mage.Sets/src/mage/cards/s/SeekTheWilds.java b/Mage.Sets/src/mage/cards/s/SeekTheWilds.java index d5eae19227..89b0aef0b9 100644 --- a/Mage.Sets/src/mage/cards/s/SeekTheWilds.java +++ b/Mage.Sets/src/mage/cards/s/SeekTheWilds.java @@ -27,7 +27,7 @@ public final class SeekTheWilds extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}"); // Look at the top four cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), filter, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), filter, false)); } diff --git a/Mage.Sets/src/mage/cards/s/Sentinel.java b/Mage.Sets/src/mage/cards/s/Sentinel.java index 2601ee42de..bdbfd2e58c 100644 --- a/Mage.Sets/src/mage/cards/s/Sentinel.java +++ b/Mage.Sets/src/mage/cards/s/Sentinel.java @@ -81,7 +81,7 @@ class SentinelEffect extends OneShotEffect { Permanent targetPermanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); if (controller != null && targetPermanent != null) { int newToughness = CardUtil.addWithOverflowCheck(targetPermanent.getPower().getValue(), 1); - game.addEffect(new SetToughnessSourceEffect(new StaticValue(newToughness), Duration.Custom, SubLayer.SetPT_7b), source); + game.addEffect(new SetToughnessSourceEffect(StaticValue.get(newToughness), Duration.Custom, SubLayer.SetPT_7b), source); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/s/SentinelTower.java b/Mage.Sets/src/mage/cards/s/SentinelTower.java index bc33d74c3b..be47a83810 100644 --- a/Mage.Sets/src/mage/cards/s/SentinelTower.java +++ b/Mage.Sets/src/mage/cards/s/SentinelTower.java @@ -80,7 +80,7 @@ class SentinelTowerTriggeredAbility extends SpellCastAllTriggeredAbility { } for (Effect effect : this.getEffects()) { if (effect instanceof DamageTargetEffect) { - ((DamageTargetEffect) effect).setAmount(new StaticValue(damageToDeal)); + ((DamageTargetEffect) effect).setAmount(StaticValue.get(damageToDeal)); return true; } } diff --git a/Mage.Sets/src/mage/cards/s/ShaleskinBruiser.java b/Mage.Sets/src/mage/cards/s/ShaleskinBruiser.java index c666d6d3bf..a50bb9be0c 100644 --- a/Mage.Sets/src/mage/cards/s/ShaleskinBruiser.java +++ b/Mage.Sets/src/mage/cards/s/ShaleskinBruiser.java @@ -41,7 +41,7 @@ public final class ShaleskinBruiser extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Whenever Shaleskin Bruiser attacks, it gets +3/+0 until end of turn for each other attacking Beast. PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter, 3); - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, new StaticValue(0), Duration.EndOfTurn, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, StaticValue.get(0), Duration.EndOfTurn, true), false)); } public ShaleskinBruiser(final ShaleskinBruiser card) { diff --git a/Mage.Sets/src/mage/cards/s/ShimmerOfPossibility.java b/Mage.Sets/src/mage/cards/s/ShimmerOfPossibility.java index 46bfea6cf1..5b3056dc54 100644 --- a/Mage.Sets/src/mage/cards/s/ShimmerOfPossibility.java +++ b/Mage.Sets/src/mage/cards/s/ShimmerOfPossibility.java @@ -20,7 +20,7 @@ public final class ShimmerOfPossibility extends CardImpl { // Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in a random order. this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(1), StaticFilters.FILTER_CARD, Zone.LIBRARY, + StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false, false, Zone.HAND, false, false, false ).setBackInRandomOrder(true)); } diff --git a/Mage.Sets/src/mage/cards/s/SightBeyondSight.java b/Mage.Sets/src/mage/cards/s/SightBeyondSight.java index ea21f3a08d..3051bee590 100644 --- a/Mage.Sets/src/mage/cards/s/SightBeyondSight.java +++ b/Mage.Sets/src/mage/cards/s/SightBeyondSight.java @@ -21,7 +21,7 @@ public final class SightBeyondSight extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}"); // Look at the top two cards of your library. Put of them into your hand and the other on the bottom of your library. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false)); // Rebound this.addAbility(new ReboundAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SilhanaWayfinder.java b/Mage.Sets/src/mage/cards/s/SilhanaWayfinder.java index 38d0f6e90e..54e4a2e230 100644 --- a/Mage.Sets/src/mage/cards/s/SilhanaWayfinder.java +++ b/Mage.Sets/src/mage/cards/s/SilhanaWayfinder.java @@ -40,7 +40,7 @@ public final class SilhanaWayfinder extends CardImpl { // When Silhana Wayfinder enters the battlefield, look at the top four cards of your library. You may reveal a creature or land card from among them and put it on top of your library. Put the rest on the bottom of your library in a random order. this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(1), filter, Zone.LIBRARY, false, + StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, true, Zone.LIBRARY, false, true, false ).setBackInRandomOrder(true).setText("look at the top four cards of your library. " + "You may reveal a creature or land card from among them " + diff --git a/Mage.Sets/src/mage/cards/s/SilvergillDouser.java b/Mage.Sets/src/mage/cards/s/SilvergillDouser.java index efbdede1e2..903197f46d 100644 --- a/Mage.Sets/src/mage/cards/s/SilvergillDouser.java +++ b/Mage.Sets/src/mage/cards/s/SilvergillDouser.java @@ -42,7 +42,7 @@ public final class SilvergillDouser extends CardImpl { // {tap}: Target creature gets -X/-0 until end of turn, where X is the number of Merfolk and/or Faeries you control. DynamicValue number = new PermanentsOnBattlefieldCount(new FilterControlledPermanent(filter), -1); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(number, new StaticValue(0), Duration.EndOfTurn, true), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(number, StaticValue.get(0), Duration.EndOfTurn, true), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SionaCaptainOfThePyleas.java b/Mage.Sets/src/mage/cards/s/SionaCaptainOfThePyleas.java index 4e53bd7233..97838a6a85 100644 --- a/Mage.Sets/src/mage/cards/s/SionaCaptainOfThePyleas.java +++ b/Mage.Sets/src/mage/cards/s/SionaCaptainOfThePyleas.java @@ -44,7 +44,7 @@ public final class SionaCaptainOfThePyleas extends CardImpl { // When Siona, Captain of the Pyleas enters the battlefield, look at the top seven cards of your library. You may reveal an Aura card among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.addAbility(new EntersBattlefieldTriggeredAbility( new LookLibraryAndPickControllerEffect( - new StaticValue(7), false, new StaticValue(1), filter, + StaticValue.get(7), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true).setText("Look at the top seven cards of your library. " + diff --git a/Mage.Sets/src/mage/cards/s/SkallaWolf.java b/Mage.Sets/src/mage/cards/s/SkallaWolf.java index 130422f9fb..5407429b46 100644 --- a/Mage.Sets/src/mage/cards/s/SkallaWolf.java +++ b/Mage.Sets/src/mage/cards/s/SkallaWolf.java @@ -37,7 +37,7 @@ public final class SkallaWolf extends CardImpl { // When Skalla Wolf enters the battlefield, look at the top five cards of your library. You may reveal a green card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.addAbility(new EntersBattlefieldTriggeredAbility( new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), filter, + StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true).setText("look at the top five cards of your library. " + "You may reveal a green card from among them and put it into your hand. " diff --git a/Mage.Sets/src/mage/cards/s/SkeletalScrying.java b/Mage.Sets/src/mage/cards/s/SkeletalScrying.java index 558d631939..7e65477a11 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletalScrying.java +++ b/Mage.Sets/src/mage/cards/s/SkeletalScrying.java @@ -82,7 +82,7 @@ class SkeletalScryingEffect extends OneShotEffect { protected DynamicValue amount; public SkeletalScryingEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public SkeletalScryingEffect(DynamicValue amount) { diff --git a/Mage.Sets/src/mage/cards/s/SleightOfHand.java b/Mage.Sets/src/mage/cards/s/SleightOfHand.java index da5fd50320..b45d2f89ea 100644 --- a/Mage.Sets/src/mage/cards/s/SleightOfHand.java +++ b/Mage.Sets/src/mage/cards/s/SleightOfHand.java @@ -21,7 +21,7 @@ public final class SleightOfHand extends CardImpl { // Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false)); } public SleightOfHand(final SleightOfHand card) { diff --git a/Mage.Sets/src/mage/cards/s/SoTiny.java b/Mage.Sets/src/mage/cards/s/SoTiny.java index 6b41d69da8..48db1b608d 100644 --- a/Mage.Sets/src/mage/cards/s/SoTiny.java +++ b/Mage.Sets/src/mage/cards/s/SoTiny.java @@ -44,7 +44,7 @@ public final class SoTiny extends CardImpl { // Enchanted creature gets -2/-0. It gets -6/-0 instead as long as its controller has seven or more cards in their graveyard. this.addAbility(new SimpleStaticAbility( - new BoostEnchantedEffect(SoTinyValue.instance, StaticValue.getZeroValue()) + new BoostEnchantedEffect(SoTinyValue.instance, StaticValue.get(0)) .setText("enchanted creature gets -2/-0. It gets -6/-0 instead as long as " + "its controller has seven or more cards in their graveyard") )); diff --git a/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java b/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java index 56e925fe0c..889544a4f4 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(CardsInControllerHandCount.instance, new StaticValue(0), Duration.EndOfTurn, true); + Effect effect = new BoostSourceEffect(CardsInControllerHandCount.instance, StaticValue.get(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/SoulScarMage.java b/Mage.Sets/src/mage/cards/s/SoulScarMage.java index b45ced6860..4070c4dd5f 100644 --- a/Mage.Sets/src/mage/cards/s/SoulScarMage.java +++ b/Mage.Sets/src/mage/cards/s/SoulScarMage.java @@ -74,7 +74,7 @@ class SoulScarMageDamageReplacementEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Permanent toGetCounters = game.getPermanent(event.getTargetId()); if (toGetCounters != null) { - AddCountersTargetEffect addCounters = new AddCountersTargetEffect(CounterType.M1M1.createInstance(), new StaticValue(event.getAmount())); + AddCountersTargetEffect addCounters = new AddCountersTargetEffect(CounterType.M1M1.createInstance(), StaticValue.get(event.getAmount())); addCounters.setTargetPointer(new FixedTarget(toGetCounters.getId())); addCounters.apply(game, source); return true; diff --git a/Mage.Sets/src/mage/cards/s/Soulshriek.java b/Mage.Sets/src/mage/cards/s/Soulshriek.java index 93dc244d8a..bc5d1e9909 100644 --- a/Mage.Sets/src/mage/cards/s/Soulshriek.java +++ b/Mage.Sets/src/mage/cards/s/Soulshriek.java @@ -70,7 +70,7 @@ class SoulshriekEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - ContinuousEffect boost = new BoostTargetEffect(new CardsInControllerGraveyardCount(Soulshriek.filterCard), new StaticValue(0), Duration.EndOfTurn); + ContinuousEffect boost = new BoostTargetEffect(new CardsInControllerGraveyardCount(Soulshriek.filterCard), StaticValue.get(0), Duration.EndOfTurn); boost.setTargetPointer(new FixedTarget(permanent, game)); game.addEffect(boost, source); Effect sacrifice = new SacrificeTargetEffect("Sacrifice that creature at the beginning of the next end step", source.getControllerId()); diff --git a/Mage.Sets/src/mage/cards/s/SpontaneousMutation.java b/Mage.Sets/src/mage/cards/s/SpontaneousMutation.java index 42eefd7728..ae0cd57747 100644 --- a/Mage.Sets/src/mage/cards/s/SpontaneousMutation.java +++ b/Mage.Sets/src/mage/cards/s/SpontaneousMutation.java @@ -43,7 +43,7 @@ public final class SpontaneousMutation extends CardImpl { // Enchanted creature gets -X/-0, where X is the number of cards in your graveyard. DynamicValue value = new SignInversionDynamicValue(new CardsInControllerGraveyardCount()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(value, new StaticValue(-0)))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(value, StaticValue.get(-0)))); } public SpontaneousMutation(final SpontaneousMutation card) { diff --git a/Mage.Sets/src/mage/cards/s/SqueakingPieGrubfellows.java b/Mage.Sets/src/mage/cards/s/SqueakingPieGrubfellows.java index 909107ce46..dd9218364d 100644 --- a/Mage.Sets/src/mage/cards/s/SqueakingPieGrubfellows.java +++ b/Mage.Sets/src/mage/cards/s/SqueakingPieGrubfellows.java @@ -28,7 +28,7 @@ public final class SqueakingPieGrubfellows extends CardImpl { // Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Squeaking Pie Grubfellows, you may reveal it. // If you do, each opponent discards a card. - this.addAbility(new KinshipAbility(new DiscardEachPlayerEffect(new StaticValue(1), false, TargetController.OPPONENT))); + this.addAbility(new KinshipAbility(new DiscardEachPlayerEffect(StaticValue.get(1), false, TargetController.OPPONENT))); } public SqueakingPieGrubfellows(final SqueakingPieGrubfellows card) { diff --git a/Mage.Sets/src/mage/cards/s/StoneforgeAcolyte.java b/Mage.Sets/src/mage/cards/s/StoneforgeAcolyte.java index d4e82d39c8..7716f303d2 100644 --- a/Mage.Sets/src/mage/cards/s/StoneforgeAcolyte.java +++ b/Mage.Sets/src/mage/cards/s/StoneforgeAcolyte.java @@ -48,7 +48,7 @@ public final class StoneforgeAcolyte extends CardImpl { // Cohort — {T}, Tap an untapped Ally you control: Look at the top four cards of your library. // You may reveal an Equipment card from among them and put it into your hand. Put the rest on the bottom of your library in any order. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), filterEquipment, false), + new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), filterEquipment, false), new TapSourceCost()); ability.addCost(new TapTargetCost(new TargetControlledPermanent(filterAlly))); ability.setAbilityWord(AbilityWord.COHORT); diff --git a/Mage.Sets/src/mage/cards/s/StormfistCrusader.java b/Mage.Sets/src/mage/cards/s/StormfistCrusader.java index ab4d35ed3d..8fd35a8ffe 100644 --- a/Mage.Sets/src/mage/cards/s/StormfistCrusader.java +++ b/Mage.Sets/src/mage/cards/s/StormfistCrusader.java @@ -35,7 +35,7 @@ public final class StormfistCrusader extends CardImpl { Ability ability = new BeginningOfUpkeepTriggeredAbility( new DrawCardAllEffect(1), TargetController.YOU, false ); - ability.addEffect(new LoseLifeAllPlayersEffect(new StaticValue(1), "and loses 1 life")); + ability.addEffect(new LoseLifeAllPlayersEffect(StaticValue.get(1), "and loses 1 life")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StrategicPlanning.java b/Mage.Sets/src/mage/cards/s/StrategicPlanning.java index 356d960fb5..ec0a49fb9e 100644 --- a/Mage.Sets/src/mage/cards/s/StrategicPlanning.java +++ b/Mage.Sets/src/mage/cards/s/StrategicPlanning.java @@ -20,7 +20,7 @@ public final class StrategicPlanning extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}"); // Look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false)); } diff --git a/Mage.Sets/src/mage/cards/s/Subdue.java b/Mage.Sets/src/mage/cards/s/Subdue.java index 970e3df788..d692172bf5 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), TargetConvertedManaCost.instance, Duration.EndOfTurn, true) + this.getSpellAbility().addEffect(new BoostTargetEffect(StaticValue.get(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/SultaiAscendancy.java b/Mage.Sets/src/mage/cards/s/SultaiAscendancy.java index 0fb165a16e..acf496c1e8 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiAscendancy.java +++ b/Mage.Sets/src/mage/cards/s/SultaiAscendancy.java @@ -24,7 +24,7 @@ public final class SultaiAscendancy extends CardImpl { // At the beginning of your upkeep, look at the top two cards of your library. Put any number of them into your graveyard and the rest on top of your library in any order. Effect effect = new LookLibraryAndPickControllerEffect( - new StaticValue(2), false, new StaticValue(2), new FilterCard(), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false); + StaticValue.get(2), false, StaticValue.get(2), new FilterCard(), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false); effect.setText("look at the top two cards of your library. Put any number of them into your graveyard and the rest on top of your library in any order"); this.addAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, false)); } diff --git a/Mage.Sets/src/mage/cards/s/SultaiSoothsayer.java b/Mage.Sets/src/mage/cards/s/SultaiSoothsayer.java index 3a40b420f8..de3340594f 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiSoothsayer.java +++ b/Mage.Sets/src/mage/cards/s/SultaiSoothsayer.java @@ -28,7 +28,7 @@ public final class SultaiSoothsayer extends CardImpl { this.toughness = new MageInt(5); // When Sultai Soothsayer enters the battlefield, look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. - this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false), false)); } diff --git a/Mage.Sets/src/mage/cards/s/SumalaWoodshaper.java b/Mage.Sets/src/mage/cards/s/SumalaWoodshaper.java index dd6a0db960..4c3e777a98 100644 --- a/Mage.Sets/src/mage/cards/s/SumalaWoodshaper.java +++ b/Mage.Sets/src/mage/cards/s/SumalaWoodshaper.java @@ -40,7 +40,7 @@ public final class SumalaWoodshaper extends CardImpl { // When Sumala Woodshaper enters the battlefield, look at the top four cards of your library. You may reveal a creature or enchantment card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(1), filter, Zone.LIBRARY, false, + StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, false, false, false ).setBackInRandomOrder(true), false)); } diff --git a/Mage.Sets/src/mage/cards/s/SupremeWill.java b/Mage.Sets/src/mage/cards/s/SupremeWill.java index 3cf8a608f6..c61922a238 100644 --- a/Mage.Sets/src/mage/cards/s/SupremeWill.java +++ b/Mage.Sets/src/mage/cards/s/SupremeWill.java @@ -29,7 +29,7 @@ public final class SupremeWill extends CardImpl { // or Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order. Mode mode = new Mode(); - mode.addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false)); + mode.addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false)); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/cards/s/SurgeOfStrength.java b/Mage.Sets/src/mage/cards/s/SurgeOfStrength.java index d71e125bb6..b41e9bac99 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(TargetConvertedManaCost.instance, new StaticValue(0), Duration.EndOfTurn, true); + effect = new BoostTargetEffect(TargetConvertedManaCost.instance, StaticValue.get(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/t/TaigamSidisisHand.java b/Mage.Sets/src/mage/cards/t/TaigamSidisisHand.java index 10f37ba6ec..5b16a419ae 100644 --- a/Mage.Sets/src/mage/cards/t/TaigamSidisisHand.java +++ b/Mage.Sets/src/mage/cards/t/TaigamSidisisHand.java @@ -54,7 +54,7 @@ public final class TaigamSidisisHand extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); // At the beginning of your upkeep, look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false), TargetController.YOU, false)); // {B}, {T}, Exile X cards from your graveyard: Target creature gets -X/-X until end of turn. diff --git a/Mage.Sets/src/mage/cards/t/TaigamsScheming.java b/Mage.Sets/src/mage/cards/t/TaigamsScheming.java index 2b9ee29215..3c01f0020c 100644 --- a/Mage.Sets/src/mage/cards/t/TaigamsScheming.java +++ b/Mage.Sets/src/mage/cards/t/TaigamsScheming.java @@ -20,7 +20,7 @@ public final class TaigamsScheming extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}"); // Look at the top five cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(5), + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(5), new FilterCard("cards"), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false)); } diff --git a/Mage.Sets/src/mage/cards/t/TasigursCruelty.java b/Mage.Sets/src/mage/cards/t/TasigursCruelty.java index 5cc2a98c58..d92e28dca3 100644 --- a/Mage.Sets/src/mage/cards/t/TasigursCruelty.java +++ b/Mage.Sets/src/mage/cards/t/TasigursCruelty.java @@ -23,7 +23,7 @@ public final class TasigursCruelty extends CardImpl { this.addAbility(new DelveAbility()); // Each opponent discards two cards. - this.getSpellAbility().addEffect(new DiscardEachPlayerEffect(new StaticValue(2), false, TargetController.OPPONENT)); + this.getSpellAbility().addEffect(new DiscardEachPlayerEffect(StaticValue.get(2), false, TargetController.OPPONENT)); } public TasigursCruelty(final TasigursCruelty card) { diff --git a/Mage.Sets/src/mage/cards/t/TearsOfRage.java b/Mage.Sets/src/mage/cards/t/TearsOfRage.java index c92ca99bce..f7f4b06c64 100644 --- a/Mage.Sets/src/mage/cards/t/TearsOfRage.java +++ b/Mage.Sets/src/mage/cards/t/TearsOfRage.java @@ -35,7 +35,7 @@ public final class TearsOfRage extends CardImpl { this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(PhaseStep.DECLARE_ATTACKERS)); // Attacking creatures you control get +X/+0 until end of turn, where X is the number of attacking creatures. Sacrifice those creatures at the beginning of the next end step. - BoostControlledEffect effect = new BoostControlledEffect(new AttackingCreatureCount("the number of attacking creatures"), new StaticValue(0), + BoostControlledEffect effect = new BoostControlledEffect(new AttackingCreatureCount("the number of attacking creatures"), StaticValue.get(0), Duration.EndOfTurn, new FilterAttackingCreature("Attacking creatures"), false); effect.setLockedIn(true); getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/t/TeferiTemporalArchmage.java b/Mage.Sets/src/mage/cards/t/TeferiTemporalArchmage.java index 213dfc7d5a..c96b638971 100644 --- a/Mage.Sets/src/mage/cards/t/TeferiTemporalArchmage.java +++ b/Mage.Sets/src/mage/cards/t/TeferiTemporalArchmage.java @@ -35,7 +35,7 @@ public final class TeferiTemporalArchmage extends CardImpl { // +1: Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library. this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect( - new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false), 1)); + StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false), 1)); // -1: Untap up to four target permanents. LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new UntapTargetEffect(), -1); diff --git a/Mage.Sets/src/mage/cards/t/TempestDjinn.java b/Mage.Sets/src/mage/cards/t/TempestDjinn.java index 05d381d8c2..40be981749 100644 --- a/Mage.Sets/src/mage/cards/t/TempestDjinn.java +++ b/Mage.Sets/src/mage/cards/t/TempestDjinn.java @@ -44,7 +44,7 @@ public final class TempestDjinn extends CardImpl { // Tempest Djinn gets +1/+0 for each basic Island you control. PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, new StaticValue(0), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, StaticValue.get(0), Duration.WhileOnBattlefield))); } public TempestDjinn(final TempestDjinn card) { diff --git a/Mage.Sets/src/mage/cards/t/Tephraderm.java b/Mage.Sets/src/mage/cards/t/Tephraderm.java index 5b33109c49..bd8baa98f9 100644 --- a/Mage.Sets/src/mage/cards/t/Tephraderm.java +++ b/Mage.Sets/src/mage/cards/t/Tephraderm.java @@ -78,7 +78,7 @@ class TephradermCreatureDamageTriggeredAbility extends TriggeredAbilityImpl { for (Effect effect : getEffects()) { if (effect instanceof DamageTargetEffect) { effect.setTargetPointer(new FixedTarget(sourcePermanent.getId())); - ((DamageTargetEffect) effect).setAmount(new StaticValue(event.getAmount())); + ((DamageTargetEffect) effect).setAmount(StaticValue.get(event.getAmount())); } } return true; @@ -124,7 +124,7 @@ class TephradermSpellDamageTriggeredAbility extends TriggeredAbilityImpl { for (Effect effect : getEffects()) { if (effect instanceof DamageTargetEffect) { effect.setTargetPointer(new FixedTarget(sourceSpell.getControllerId())); - ((DamageTargetEffect) effect).setAmount(new StaticValue(event.getAmount())); + ((DamageTargetEffect) effect).setAmount(StaticValue.get(event.getAmount())); } } return true; diff --git a/Mage.Sets/src/mage/cards/t/TerraRavager.java b/Mage.Sets/src/mage/cards/t/TerraRavager.java index 1e7f332026..2152ed8f3e 100644 --- a/Mage.Sets/src/mage/cards/t/TerraRavager.java +++ b/Mage.Sets/src/mage/cards/t/TerraRavager.java @@ -34,7 +34,7 @@ public final class TerraRavager extends CardImpl { this.toughness = new MageInt(4); // Whenever Terra Ravager attacks, it gets +X/+0 until end of turn, where X is the number of lands defending player controls. - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new TerraRavagerLandCount(), new StaticValue(0), Duration.EndOfTurn, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new TerraRavagerLandCount(), StaticValue.get(0), Duration.EndOfTurn, true), false)); } public TerraRavager(final TerraRavager card) { diff --git a/Mage.Sets/src/mage/cards/t/TezzeretsGatebreaker.java b/Mage.Sets/src/mage/cards/t/TezzeretsGatebreaker.java index 4ea0fddead..7b7a6efe2b 100644 --- a/Mage.Sets/src/mage/cards/t/TezzeretsGatebreaker.java +++ b/Mage.Sets/src/mage/cards/t/TezzeretsGatebreaker.java @@ -43,7 +43,7 @@ public final class TezzeretsGatebreaker extends CardImpl { // When Tezzeret's Gatebreaker enters the battlefield, look at the top five cards of your library. You may reveal a blue or artifact card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. this.addAbility(new EntersBattlefieldTriggeredAbility( new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), filter, + StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true).setText("look at the top five cards of your library. " + "You may reveal a blue or artifact card from among them and put it into your hand. " diff --git a/Mage.Sets/src/mage/cards/t/TheAntiquitiesWar.java b/Mage.Sets/src/mage/cards/t/TheAntiquitiesWar.java index 1000f251b2..4f125fbec7 100644 --- a/Mage.Sets/src/mage/cards/t/TheAntiquitiesWar.java +++ b/Mage.Sets/src/mage/cards/t/TheAntiquitiesWar.java @@ -40,7 +40,7 @@ public final class TheAntiquitiesWar extends CardImpl { // I, II — Look at the top five cards of your library. You may reveal an artifact card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II, - new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1), + new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(1), StaticFilters.FILTER_CARD_ARTIFACT_AN, Zone.LIBRARY, false, true, false, Zone.HAND, true, true, false).setBackInRandomOrder(true)); // III — Artifacts you control become artifact creatures with base power and toughness 5/5 until end of turn. diff --git a/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java b/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java index 7207f52b1a..30cd3236f0 100644 --- a/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java +++ b/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java @@ -35,7 +35,7 @@ public final class TheBattleOfGeonosis extends CardImpl { this.getSpellAbility().addEffect(effect); // Creatures you control get +X/+0 until end of turn. - this.getSpellAbility().addEffect(new BoostControlledEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostControlledEffect(ManacostVariableValue.instance, StaticValue.get(0), Duration.EndOfTurn)); } diff --git a/Mage.Sets/src/mage/cards/t/TheTriumphOfAnax.java b/Mage.Sets/src/mage/cards/t/TheTriumphOfAnax.java index 150e93adad..922049eeda 100644 --- a/Mage.Sets/src/mage/cards/t/TheTriumphOfAnax.java +++ b/Mage.Sets/src/mage/cards/t/TheTriumphOfAnax.java @@ -50,7 +50,7 @@ public final class TheTriumphOfAnax extends CardImpl { TrampleAbility.getInstance(), Duration.EndOfTurn, "Until end of turn, target creature gains trample" ), new BoostTargetEffect( - xValue, StaticValue.getZeroValue(), Duration.EndOfTurn, true + xValue, StaticValue.get(0), Duration.EndOfTurn, true ).setText("and gets +X/+0, where X is the number of lore counters on {this}")), new TargetCreaturePermanent() ); diff --git a/Mage.Sets/src/mage/cards/t/ThievesFortune.java b/Mage.Sets/src/mage/cards/t/ThievesFortune.java index 3b38ec85c2..46372b0dfc 100644 --- a/Mage.Sets/src/mage/cards/t/ThievesFortune.java +++ b/Mage.Sets/src/mage/cards/t/ThievesFortune.java @@ -26,7 +26,7 @@ public final class ThievesFortune extends CardImpl { this.addAbility(new ProwlAbility(this, "{U}")); // Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false)); + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false)); } public ThievesFortune(final ThievesFortune card) { diff --git a/Mage.Sets/src/mage/cards/t/ThunderousMight.java b/Mage.Sets/src/mage/cards/t/ThunderousMight.java index bd30f816fc..178807b294 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderousMight.java +++ b/Mage.Sets/src/mage/cards/t/ThunderousMight.java @@ -32,7 +32,7 @@ public final class ThunderousMight extends CardImpl { this.addAbility(ability); // Whenever enchanted creature attacks, it gets +X/+0 until end of turn, where X is your devotion to red. - BoostEnchantedEffect effect = new BoostEnchantedEffect(DevotionCount.R, new StaticValue(0), Duration.EndOfTurn); + BoostEnchantedEffect effect = new BoostEnchantedEffect(DevotionCount.R, StaticValue.get(0), Duration.EndOfTurn); effect.setText("it gets +X/+0 until end of turn, where X is your devotion to red"); effect.setLockedIn(true); this.addAbility(new AttacksAttachedTriggeredAbility(effect, AttachmentType.AURA, false) diff --git a/Mage.Sets/src/mage/cards/t/TomorrowAzamisFamiliar.java b/Mage.Sets/src/mage/cards/t/TomorrowAzamisFamiliar.java index edf1eb734e..29b92ef501 100644 --- a/Mage.Sets/src/mage/cards/t/TomorrowAzamisFamiliar.java +++ b/Mage.Sets/src/mage/cards/t/TomorrowAzamisFamiliar.java @@ -66,7 +66,7 @@ class TomorrowAzamisFamiliarReplacementEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { - new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false) + new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false) .apply(game, source); return true; } diff --git a/Mage.Sets/src/mage/cards/t/TowerGeist.java b/Mage.Sets/src/mage/cards/t/TowerGeist.java index bc51284f02..c5b427d0ab 100644 --- a/Mage.Sets/src/mage/cards/t/TowerGeist.java +++ b/Mage.Sets/src/mage/cards/t/TowerGeist.java @@ -60,7 +60,7 @@ public final class TowerGeist extends CardImpl { // When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard. this.addAbility(new EntersBattlefieldTriggeredAbility( - new LookLibraryAndPickControllerEffect(new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.GRAVEYARD, false, false))); + new LookLibraryAndPickControllerEffect(StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.GRAVEYARD, false, false))); } public TowerGeist(final TowerGeist card) { diff --git a/Mage.Sets/src/mage/cards/u/UnderrealmLich.java b/Mage.Sets/src/mage/cards/u/UnderrealmLich.java index 72d3b775ba..0f4ed7786d 100644 --- a/Mage.Sets/src/mage/cards/u/UnderrealmLich.java +++ b/Mage.Sets/src/mage/cards/u/UnderrealmLich.java @@ -91,7 +91,7 @@ class UnderrealmLichReplacementEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { return new LookLibraryAndPickControllerEffect( - new StaticValue(3), false, new StaticValue(1), + StaticValue.get(3), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false ).apply(game, source); diff --git a/Mage.Sets/src/mage/cards/u/UnityOfTheDroids.java b/Mage.Sets/src/mage/cards/u/UnityOfTheDroids.java index cd333a0bec..cac786cdcc 100644 --- a/Mage.Sets/src/mage/cards/u/UnityOfTheDroids.java +++ b/Mage.Sets/src/mage/cards/u/UnityOfTheDroids.java @@ -42,7 +42,7 @@ public final class UnityOfTheDroids extends CardImpl { // Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. Mode mode = new Mode(); - mode.addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), new FilterCard(), Zone.GRAVEYARD, false, false)); + mode.addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), new FilterCard(), Zone.GRAVEYARD, false, false)); this.getSpellAbility().addMode(mode); // Destroy target nonartifact creature. diff --git a/Mage.Sets/src/mage/cards/u/Unnerve.java b/Mage.Sets/src/mage/cards/u/Unnerve.java index 5cc212732b..226743c0b0 100644 --- a/Mage.Sets/src/mage/cards/u/Unnerve.java +++ b/Mage.Sets/src/mage/cards/u/Unnerve.java @@ -19,7 +19,7 @@ public final class Unnerve extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}"); // Each opponent discards two cards. - this.getSpellAbility().addEffect(new DiscardEachPlayerEffect(new StaticValue(2), false, TargetController.OPPONENT)); + this.getSpellAbility().addEffect(new DiscardEachPlayerEffect(StaticValue.get(2), false, TargetController.OPPONENT)); } public Unnerve(final Unnerve card) { diff --git a/Mage.Sets/src/mage/cards/v/VhatiIlDal.java b/Mage.Sets/src/mage/cards/v/VhatiIlDal.java index e5e913c261..b1bc8efe49 100644 --- a/Mage.Sets/src/mage/cards/v/VhatiIlDal.java +++ b/Mage.Sets/src/mage/cards/v/VhatiIlDal.java @@ -71,9 +71,9 @@ class VhatiIlDalEffect extends OneShotEffect { DynamicValue power = null; DynamicValue toughness = null; if (controller.chooseUse(outcome, "Set power? (otherwise toughness is set)", source, game)) { - power = new StaticValue(1); + power = StaticValue.get(1); } else { - toughness = new StaticValue(1); + toughness = StaticValue.get(1); } ContinuousEffect effect = new SetPowerToughnessTargetEffect(power, toughness, Duration.EndOfTurn); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/cards/v/ViciousRumors.java b/Mage.Sets/src/mage/cards/v/ViciousRumors.java index 447886bd3c..245ce9a78e 100644 --- a/Mage.Sets/src/mage/cards/v/ViciousRumors.java +++ b/Mage.Sets/src/mage/cards/v/ViciousRumors.java @@ -25,7 +25,7 @@ public final class ViciousRumors extends CardImpl { new DamagePlayersEffect(1, TargetController.OPPONENT) ); this.getSpellAbility().addEffect(new DiscardEachPlayerEffect( - new StaticValue(1), false, + StaticValue.get(1), false, TargetController.OPPONENT )); this.getSpellAbility().addEffect( diff --git a/Mage.Sets/src/mage/cards/v/VileManifestation.java b/Mage.Sets/src/mage/cards/v/VileManifestation.java index 85e6119b50..cfa223e406 100644 --- a/Mage.Sets/src/mage/cards/v/VileManifestation.java +++ b/Mage.Sets/src/mage/cards/v/VileManifestation.java @@ -44,7 +44,7 @@ public final class VileManifestation extends CardImpl { // Vile Manifestation gets +1/+0 for each card with cycling in your graveyard. DynamicValue amount = new CardsInControllerGraveyardCount(new FilterCard(filter)); - Effect effect = new BoostSourceEffect(amount, new StaticValue(0), Duration.WhileOnBattlefield); + Effect effect = new BoostSourceEffect(amount, StaticValue.get(0), Duration.WhileOnBattlefield); effect.setText("Vile Manifestation gets +1/+0 for each card with cycling in your graveyard."); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/v/VivienReid.java b/Mage.Sets/src/mage/cards/v/VivienReid.java index 2ef81f8189..8da6c440ca 100644 --- a/Mage.Sets/src/mage/cards/v/VivienReid.java +++ b/Mage.Sets/src/mage/cards/v/VivienReid.java @@ -57,7 +57,7 @@ public final class VivienReid extends CardImpl { // +1: Look at the top four cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order. this.addAbility(new LoyaltyAbility( new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(1), filter, + StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false) .setBackInRandomOrder(true) .setText("Look at the top four cards of your library. You may reveal a creature or land card from among them" diff --git a/Mage.Sets/src/mage/cards/v/VolrathsDungeon.java b/Mage.Sets/src/mage/cards/v/VolrathsDungeon.java index 3c8444a70e..c3fe5e8e00 100644 --- a/Mage.Sets/src/mage/cards/v/VolrathsDungeon.java +++ b/Mage.Sets/src/mage/cards/v/VolrathsDungeon.java @@ -64,7 +64,7 @@ class PayLifeActivePlayerCost extends CostImpl { private final DynamicValue amount; public PayLifeActivePlayerCost(int amount) { - this.amount = new StaticValue(amount); + this.amount = StaticValue.get(amount); this.text = "Pay " + amount + " life"; } diff --git a/Mage.Sets/src/mage/cards/w/WallOfTombstones.java b/Mage.Sets/src/mage/cards/w/WallOfTombstones.java index 7deea14229..d1399069cd 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfTombstones.java +++ b/Mage.Sets/src/mage/cards/w/WallOfTombstones.java @@ -65,7 +65,7 @@ class WallOfTombstonesEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int newToughness = CardUtil.addWithOverflowCheck(1, new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE).calculate(game, source, this)); - game.addEffect(new SetToughnessSourceEffect(new StaticValue(newToughness), Duration.Custom, SubLayer.SetPT_7b), source); + game.addEffect(new SetToughnessSourceEffect(StaticValue.get(newToughness), Duration.Custom, SubLayer.SetPT_7b), source); return true; } } diff --git a/Mage.Sets/src/mage/cards/w/WanderingGoblins.java b/Mage.Sets/src/mage/cards/w/WanderingGoblins.java index 07c91d93eb..a0c19520e4 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingGoblins.java +++ b/Mage.Sets/src/mage/cards/w/WanderingGoblins.java @@ -30,7 +30,7 @@ public final class WanderingGoblins extends CardImpl { this.toughness = new MageInt(3); // Domain - {3}: Wandering Goblins gets +1/+0 until end of turn for each basic land type among lands you control. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), new StaticValue(0), Duration.EndOfTurn), new GenericManaCost(3))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), StaticValue.get(0), Duration.EndOfTurn), new GenericManaCost(3))); } public WanderingGoblins(final WanderingGoblins card) { diff --git a/Mage.Sets/src/mage/cards/w/Weatherlight.java b/Mage.Sets/src/mage/cards/w/Weatherlight.java index 64498880c3..650994cde8 100644 --- a/Mage.Sets/src/mage/cards/w/Weatherlight.java +++ b/Mage.Sets/src/mage/cards/w/Weatherlight.java @@ -43,7 +43,7 @@ public final class Weatherlight extends CardImpl { // Whenever Weatherlight deals combat damage to a player, look at the top five cards of your library. You may reveal a historic card from among them and put it into your hand. Put the rest on the bottom of your library in any order. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility( new LookLibraryAndPickControllerEffect( - new StaticValue(5), false, new StaticValue(1), filter, + StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false ).setBackInRandomOrder(true), false diff --git a/Mage.Sets/src/mage/cards/w/WineOfBloodAndIron.java b/Mage.Sets/src/mage/cards/w/WineOfBloodAndIron.java index f5e9142898..f332091d87 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(TargetPermanentPowerCount.instance, new StaticValue(0), Duration.EndOfTurn, true), + new BoostTargetEffect(TargetPermanentPowerCount.instance, StaticValue.get(0), Duration.EndOfTurn, true), new GenericManaCost(4)); Effect effect = new CreateDelayedTriggeredAbilityEffect( new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect()), false); diff --git a/Mage.Sets/src/mage/cards/y/YodaJediMaster.java b/Mage.Sets/src/mage/cards/y/YodaJediMaster.java index 761caea8c7..24b4f8132a 100644 --- a/Mage.Sets/src/mage/cards/y/YodaJediMaster.java +++ b/Mage.Sets/src/mage/cards/y/YodaJediMaster.java @@ -51,7 +51,7 @@ public final class YodaJediMaster extends CardImpl { this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3)); // +1: Look at the top two cards of your library. Put one on the bottom of your library. - Effect effect = new LookLibraryAndPickControllerEffect(new StaticValue(2), false, new StaticValue(1), + Effect effect = new LookLibraryAndPickControllerEffect(StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, true, false, false, Zone.LIBRARY, false, false, true); effect.setText("Look at the top two cards of your library. Put one on the bottom of your library"); this.addAbility(new LoyaltyAbility(effect, 1)); diff --git a/Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java b/Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java index 332b6545b0..18c902d5af 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java @@ -18,7 +18,7 @@ public class PayLifeCost extends CostImpl { private final DynamicValue amount; public PayLifeCost(int amount) { - this.amount = new StaticValue(amount); + this.amount = StaticValue.get(amount); this.text = "Pay " + Integer.toString(amount) + " life"; } diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/StaticValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/StaticValue.java index f5a11f8136..12d2b4f4df 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/StaticValue.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/StaticValue.java @@ -5,24 +5,17 @@ import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; import mage.game.Game; +import java.util.HashMap; +import java.util.Map; + public class StaticValue implements DynamicValue { + private static final Map staticValueMap = new HashMap(); + private final int value; - private final String message; - private static final StaticValue zeroValue = new StaticValue(0); - public StaticValue(int value) { - this(value, ""); - } - - public StaticValue(int value, String message) { + private StaticValue(int value) { this.value = value; - this.message = message; - } - - public StaticValue(final StaticValue staticValue) { - this.value = staticValue.value; - this.message = staticValue.message; } @Override @@ -32,7 +25,7 @@ public class StaticValue implements DynamicValue { @Override public StaticValue copy() { - return new StaticValue(this); + return this; } @Override @@ -42,14 +35,15 @@ public class StaticValue implements DynamicValue { @Override public String getMessage() { - return message; + return ""; } public int getValue() { return value; } - public static StaticValue getZeroValue() { - return zeroValue; + public static StaticValue get(int value) { + staticValueMap.putIfAbsent(value, new StaticValue(value)); + return staticValueMap.get(value); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java index 7f686b6f05..0ee482597c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java @@ -32,11 +32,11 @@ public class CreateTokenEffect extends OneShotEffect { private ArrayList lastAddedTokenIds = new ArrayList<>(); public CreateTokenEffect(Token token) { - this(token, new StaticValue(1)); + this(token, StaticValue.get(1)); } public CreateTokenEffect(Token token, int amount) { - this(token, new StaticValue(amount)); + this(token, StaticValue.get(amount)); } public CreateTokenEffect(Token token, DynamicValue amount) { @@ -44,7 +44,7 @@ public class CreateTokenEffect extends OneShotEffect { } public CreateTokenEffect(Token token, int amount, boolean tapped, boolean attacking) { - this(token, new StaticValue(amount), tapped, attacking); + this(token, StaticValue.get(amount), tapped, attacking); } public CreateTokenEffect(Token token, DynamicValue amount, boolean tapped, boolean attacking) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java index 15bc8d25af..d74b91930b 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java @@ -22,11 +22,11 @@ public class CreateTokenTargetEffect extends OneShotEffect { private boolean attacking; public CreateTokenTargetEffect(Token token) { - this(token, new StaticValue(1)); + this(token, StaticValue.get(1)); } public CreateTokenTargetEffect(Token token, int amount) { - this(token, new StaticValue(amount)); + this(token, StaticValue.get(amount)); } public CreateTokenTargetEffect(Token token, DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java index d65ba442e6..8dffba358d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java @@ -22,11 +22,11 @@ public class DamageAllEffect extends OneShotEffect { private String sourceName = "{source}"; public DamageAllEffect(int amount, FilterPermanent filter) { - this(new StaticValue(amount), filter); + this(StaticValue.get(amount), filter); } public DamageAllEffect(int amount, String whoDealDamageName, FilterPermanent filter) { - this(new StaticValue(amount), filter); + this(StaticValue.get(amount), filter); this.sourceName = whoDealDamageName; setText(); // TODO: replace to @Override public String getText() diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageAttachedControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageAttachedControllerEffect.java index 6c0f4f0fdd..68d1b93da6 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageAttachedControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageAttachedControllerEffect.java @@ -22,7 +22,7 @@ public class DamageAttachedControllerEffect extends OneShotEffect { public DamageAttachedControllerEffect(int amount) { super(Outcome.Damage); - this.amount = new StaticValue(amount); + this.amount = StaticValue.get(amount); } public DamageAttachedControllerEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageAttachedEffect.java index 384e3d1ff2..23ba7d6d86 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageAttachedEffect.java @@ -22,7 +22,7 @@ public class DamageAttachedEffect extends OneShotEffect { public DamageAttachedEffect(int amount) { super(Outcome.Damage); - this.amount = new StaticValue(amount); + this.amount = StaticValue.get(amount); } public DamageAttachedEffect(int amount, String whoDealDamageName) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageControllerEffect.java index de059f270a..1977287239 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageControllerEffect.java @@ -31,14 +31,14 @@ public class DamageControllerEffect extends OneShotEffect { public DamageControllerEffect(int amount, boolean preventable, String whoDealDamageName) { super(Outcome.Damage); - this.amount = new StaticValue(amount); + this.amount = StaticValue.get(amount); this.preventable = preventable; this.sourceName = whoDealDamageName; } public DamageControllerEffect(int amount, boolean preventable) { super(Outcome.Damage); - this.amount = new StaticValue(amount); + this.amount = StaticValue.get(amount); this.preventable = preventable; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java index 8dd83355fb..42c78008ce 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java @@ -27,11 +27,11 @@ public class DamageEverythingEffect extends OneShotEffect { private String sourceName = "{source}"; public DamageEverythingEffect(int amount) { - this(new StaticValue(amount), new FilterCreaturePermanent()); + this(StaticValue.get(amount), new FilterCreaturePermanent()); } public DamageEverythingEffect(int amount, String whoDealDamageName) { - this(new StaticValue(amount), new FilterCreaturePermanent()); + this(StaticValue.get(amount), new FilterCreaturePermanent()); this.sourceName = whoDealDamageName; setText(); // TODO: replace to @Override public String getText() @@ -42,7 +42,7 @@ public class DamageEverythingEffect extends OneShotEffect { } public DamageEverythingEffect(int amount, FilterPermanent filter) { - this(new StaticValue(amount), filter); + this(StaticValue.get(amount), filter); } public DamageEverythingEffect(DynamicValue amount, FilterPermanent filter) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageMultiEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageMultiEffect.java index 6ec376482a..df1c5397bb 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageMultiEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageMultiEffect.java @@ -26,11 +26,11 @@ public class DamageMultiEffect extends OneShotEffect { private final Set damagedSet = new HashSet<>(); public DamageMultiEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public DamageMultiEffect(int amount, String whoDealDamageName) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); this.sourceName = whoDealDamageName; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java index c8ff352c31..0b4c5395ef 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java @@ -21,15 +21,15 @@ public class DamagePlayersEffect extends OneShotEffect { private String sourceName = "{source}"; public DamagePlayersEffect(int amount) { - this(Outcome.Damage, new StaticValue(amount)); + this(Outcome.Damage, StaticValue.get(amount)); } public DamagePlayersEffect(int amount, TargetController controller) { - this(Outcome.Damage, new StaticValue(amount), controller); + this(Outcome.Damage, StaticValue.get(amount), controller); } public DamagePlayersEffect(int amount, TargetController controller, String whoDealDamageName) { - this(Outcome.Damage, new StaticValue(amount), controller); + this(Outcome.Damage, StaticValue.get(amount), controller); this.sourceName = whoDealDamageName; setText(); // TODO: replace to @Override public String getText() diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageTargetControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetControllerEffect.java index a1f9ce8615..ea805fe9e5 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageTargetControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetControllerEffect.java @@ -21,11 +21,11 @@ public class DamageTargetControllerEffect extends OneShotEffect { protected boolean preventable; public DamageTargetControllerEffect(int amount) { - this(new StaticValue(amount), true); + this(StaticValue.get(amount), true); } public DamageTargetControllerEffect(int amount, boolean preventable) { - this(new StaticValue(amount), preventable); + this(StaticValue.get(amount), preventable); } public DamageTargetControllerEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java index 626b7225cb..d4db66bb45 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java @@ -27,24 +27,24 @@ public class DamageTargetEffect extends OneShotEffect { protected String sourceName = "{source}"; public DamageTargetEffect(int amount) { - this(new StaticValue(amount), true); + this(StaticValue.get(amount), true); } public DamageTargetEffect(int amount, String whoDealDamageName) { - this(new StaticValue(amount), true); + this(StaticValue.get(amount), true); this.sourceName = whoDealDamageName; } public DamageTargetEffect(int amount, boolean preventable) { - this(new StaticValue(amount), preventable); + this(StaticValue.get(amount), preventable); } public DamageTargetEffect(int amount, boolean preventable, String targetDescription) { - this(new StaticValue(amount), preventable, targetDescription); + this(StaticValue.get(amount), preventable, targetDescription); } public DamageTargetEffect(int amount, boolean preventable, String targetDescription, String whoDealDamageName) { - this(new StaticValue(amount), preventable, targetDescription); + this(StaticValue.get(amount), preventable, targetDescription); this.sourceName = whoDealDamageName; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/DrawCardAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DrawCardAllEffect.java index d2da1c7b9a..0e87c451e8 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DrawCardAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DrawCardAllEffect.java @@ -30,7 +30,7 @@ public class DrawCardAllEffect extends OneShotEffect { } public DrawCardAllEffect(int amount, TargetController targetController) { - this(new StaticValue(amount), targetController); + this(StaticValue.get(amount), targetController); } public DrawCardAllEffect(DynamicValue amount, TargetController targetController) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DrawCardSourceControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DrawCardSourceControllerEffect.java index c56a4f28b8..8a2533827d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DrawCardSourceControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DrawCardSourceControllerEffect.java @@ -23,7 +23,7 @@ public class DrawCardSourceControllerEffect extends OneShotEffect { } public DrawCardSourceControllerEffect(int amount, String whoDrawCard) { - this(new StaticValue(amount), whoDrawCard); + this(StaticValue.get(amount), whoDrawCard); } public DrawCardSourceControllerEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DrawCardTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DrawCardTargetEffect.java index 7ab53d6f60..585c3f0341 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DrawCardTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DrawCardTargetEffect.java @@ -25,11 +25,11 @@ public class DrawCardTargetEffect extends OneShotEffect { protected boolean upTo; public DrawCardTargetEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public DrawCardTargetEffect(int amount, boolean optional) { - this(new StaticValue(amount), optional); + this(StaticValue.get(amount), optional); } public DrawCardTargetEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/GainLifeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GainLifeEffect.java index 51b5e4ef33..105097a667 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/GainLifeEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/GainLifeEffect.java @@ -19,7 +19,7 @@ public class GainLifeEffect extends OneShotEffect { private DynamicValue life; public GainLifeEffect(int life) { - this(new StaticValue(life)); + this(StaticValue.get(life)); } public GainLifeEffect(DynamicValue life) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java index d8a79bfc80..98210835fb 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java @@ -22,7 +22,7 @@ public class GainLifeTargetEffect extends OneShotEffect { private DynamicValue life; public GainLifeTargetEffect(int life) { - this(new StaticValue(life)); + this(StaticValue.get(life)); } public GainLifeTargetEffect(DynamicValue life) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java index 2155cbc1d4..9dca85f406 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java @@ -87,8 +87,8 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff public LookLibraryAndPickControllerEffect(int numberOfCards, int numberToPick, FilterCard pickFilter, boolean upTo) { - this(new StaticValue(numberOfCards), false, - new StaticValue(numberToPick), pickFilter, Zone.LIBRARY, false, + this(StaticValue.get(numberOfCards), false, + StaticValue.get(numberToPick), pickFilter, Zone.LIBRARY, false, true, upTo); } @@ -104,8 +104,8 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff public LookLibraryAndPickControllerEffect(int numberOfCards, int numberToPick, FilterCard pickFilter, boolean reveal, boolean upTo, Zone targetZonePickedCards, boolean optional) { - this(new StaticValue(numberOfCards), false, - new StaticValue(numberToPick), pickFilter, Zone.LIBRARY, false, + this(StaticValue.get(numberOfCards), false, + StaticValue.get(numberToPick), pickFilter, Zone.LIBRARY, false, reveal, upTo, targetZonePickedCards, optional, true, true); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java index 766e1b2ed8..fdacd31698 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java @@ -44,7 +44,7 @@ public class LookLibraryControllerEffect extends OneShotEffect { } public LookLibraryControllerEffect(int numberOfCards, boolean mayShuffleAfter, boolean putOnTop) { - this(new StaticValue(numberOfCards), mayShuffleAfter, putOnTop); + this(StaticValue.get(numberOfCards), mayShuffleAfter, putOnTop); } public LookLibraryControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, boolean putOnTop) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java index 8bc73d8080..c320d8f13e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java @@ -20,7 +20,7 @@ public class LoseLifeAllPlayersEffect extends OneShotEffect { private final DynamicValue amount; public LoseLifeAllPlayersEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public LoseLifeAllPlayersEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java index abf9bbae7c..450eaec382 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java @@ -17,7 +17,7 @@ public class LoseLifeControllerAttachedEffect extends OneShotEffect { protected DynamicValue amount; public LoseLifeControllerAttachedEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public LoseLifeControllerAttachedEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java index 507ad217d1..ca058b0762 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java @@ -25,7 +25,7 @@ public class LoseLifeDefendingPlayerEffect extends OneShotEffect { * attacker false if attacker has to be taken from targetPointer */ public LoseLifeDefendingPlayerEffect(int amount, boolean attackerIsSource) { - this(new StaticValue(amount), attackerIsSource); + this(StaticValue.get(amount), attackerIsSource); } public LoseLifeDefendingPlayerEffect(DynamicValue amount, boolean attackerIsSource) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java index 72e7a17cd5..ead8433dc7 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java @@ -21,7 +21,7 @@ public class LoseLifeOpponentsEffect extends OneShotEffect { private DynamicValue amount; public LoseLifeOpponentsEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public LoseLifeOpponentsEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifePermanentControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifePermanentControllerEffect.java index 5d6ecf576b..00274e26a9 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifePermanentControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifePermanentControllerEffect.java @@ -21,7 +21,7 @@ public class LoseLifePermanentControllerEffect extends OneShotEffect { protected DynamicValue amount; public LoseLifePermanentControllerEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public LoseLifePermanentControllerEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java index 9fe9cae185..0707a45334 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java @@ -19,7 +19,7 @@ public class LoseLifeSourceControllerEffect extends OneShotEffect { protected DynamicValue amount; public LoseLifeSourceControllerEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public LoseLifeSourceControllerEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java index f46fa4dc76..93c03a7146 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java @@ -19,7 +19,7 @@ public class LoseLifeTargetEffect extends OneShotEffect { protected DynamicValue amount; public LoseLifeTargetEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public LoseLifeTargetEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java index f1158cb434..665a930257 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java @@ -19,7 +19,7 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect { private DynamicValue amount; public PutLibraryIntoGraveTargetEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public PutLibraryIntoGraveTargetEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.java index 2e27fe567d..9cd5fa8702 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.java @@ -23,7 +23,7 @@ public class PutTopCardOfLibraryIntoGraveEachPlayerEffect extends OneShotEffect private final TargetController targetController; public PutTopCardOfLibraryIntoGraveEachPlayerEffect(int numberCards, TargetController targetController) { - this(new StaticValue(numberCards), targetController); + this(StaticValue.get(numberCards), targetController); } public PutTopCardOfLibraryIntoGraveEachPlayerEffect(DynamicValue numberCards, TargetController targetController) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java index 308222981d..d45f62ad2c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java @@ -19,7 +19,7 @@ public class PutTopCardOfLibraryIntoGraveTargetEffect extends OneShotEffect { private DynamicValue numberCards; public PutTopCardOfLibraryIntoGraveTargetEffect(int numberCards) { - this(new StaticValue(numberCards)); + this(StaticValue.get(numberCards)); } public PutTopCardOfLibraryIntoGraveTargetEffect(DynamicValue numberCards) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java index f5243a0773..c77e3560f4 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java @@ -32,7 +32,7 @@ public class RevealLibraryPutIntoHandEffect extends OneShotEffect { } public RevealLibraryPutIntoHandEffect(int amountCards, FilterCard filter, Zone zoneToPutRest, boolean anyOrder) { - this(new StaticValue(amountCards), filter, zoneToPutRest, anyOrder); + this(StaticValue.get(amountCards), filter, zoneToPutRest, anyOrder); } public RevealLibraryPutIntoHandEffect(DynamicValue amountCards, FilterCard filter, Zone zoneToPutRest, boolean anyOrder) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/RevealTargetPlayerLibraryEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RevealTargetPlayerLibraryEffect.java index 8a3d0feb6e..afb199ca96 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/RevealTargetPlayerLibraryEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/RevealTargetPlayerLibraryEffect.java @@ -22,7 +22,7 @@ public class RevealTargetPlayerLibraryEffect extends OneShotEffect { private DynamicValue amountCards; public RevealTargetPlayerLibraryEffect(int amountCards) { - this(new StaticValue(amountCards)); + this(StaticValue.get(amountCards)); } public RevealTargetPlayerLibraryEffect(DynamicValue amountCards) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeAllEffect.java index 8f5cdf4a3e..434ebc8225 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeAllEffect.java @@ -30,7 +30,7 @@ public class SacrificeAllEffect extends OneShotEffect { } public SacrificeAllEffect(int amount, FilterControlledPermanent filter) { - this(new StaticValue(amount), filter); + this(StaticValue.get(amount), filter); } public SacrificeAllEffect(DynamicValue amount, FilterControlledPermanent filter) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeControllerEffect.java index a633f247cb..70cb4035c4 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeControllerEffect.java @@ -22,7 +22,7 @@ public class SacrificeControllerEffect extends SacrificeEffect { } public SacrificeControllerEffect(FilterPermanent filter, int count, String preText ) { - this(filter, new StaticValue(count), preText); + this(filter, StaticValue.get(count), preText); } public SacrificeControllerEffect(final SacrificeControllerEffect effect ) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeEffect.java index cf5006a114..fc954a3a5d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeEffect.java @@ -26,7 +26,7 @@ public class SacrificeEffect extends OneShotEffect { private DynamicValue count; public SacrificeEffect(FilterPermanent filter, int count, String preText) { - this(filter, new StaticValue(count), preText); + this(filter, StaticValue.get(count), preText); } public SacrificeEffect(FilterPermanent filter, DynamicValue count, String preText) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java index 243c524d5c..f1d9df7128 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java @@ -32,7 +32,7 @@ public class SacrificeOpponentsEffect extends OneShotEffect { } public SacrificeOpponentsEffect(int amount, FilterPermanent filter) { - this(new StaticValue(amount), filter); + this(StaticValue.get(amount), filter); } public SacrificeOpponentsEffect(DynamicValue amount, FilterPermanent filter) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java index 0ed4cc9022..f37daeadb0 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java @@ -49,11 +49,11 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect { } public SacrificeOpponentsUnlessPayEffect(Cost cost, FilterPermanent filter, int amount) { - this(cost, filter, new StaticValue(amount)); + this(cost, filter, StaticValue.get(amount)); } public SacrificeOpponentsUnlessPayEffect(int genericManaCost, FilterPermanent filter, int amount) { - this(new GenericManaCost(genericManaCost), filter, new StaticValue(amount)); + this(new GenericManaCost(genericManaCost), filter, StaticValue.get(amount)); } public SacrificeOpponentsUnlessPayEffect(Cost cost, FilterPermanent filter, DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeAllEffect.java index fa7befc917..cb691a322a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeAllEffect.java @@ -33,7 +33,7 @@ public class SetPlayerLifeAllEffect extends OneShotEffect { } public SetPlayerLifeAllEffect(int amount, TargetController targetController) { - this(new StaticValue(amount), targetController); + this(StaticValue.get(amount), targetController); } public SetPlayerLifeAllEffect(DynamicValue amount, TargetController targetController) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeSourceEffect.java index 54db0d0d56..17ca7f5981 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeSourceEffect.java @@ -22,7 +22,7 @@ public class SetPlayerLifeSourceEffect extends OneShotEffect { protected DynamicValue amount; public SetPlayerLifeSourceEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public SetPlayerLifeSourceEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeTargetEffect.java index ed9c40731f..cb79f6e1f6 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeTargetEffect.java @@ -18,7 +18,7 @@ public class SetPlayerLifeTargetEffect extends OneShotEffect { protected DynamicValue amount; public SetPlayerLifeTargetEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public SetPlayerLifeTargetEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java index bf9e508a8b..bf1261f926 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java @@ -40,7 +40,7 @@ public class BoostAllEffect extends ContinuousEffectImpl { } public BoostAllEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) { - this(new StaticValue(power), new StaticValue(toughness), duration, filter, excludeSource); + this(StaticValue.get(power), StaticValue.get(toughness), duration, filter, excludeSource); } public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) { @@ -92,8 +92,8 @@ public class BoostAllEffect extends ContinuousEffectImpl { } } if (lockedInPT) { - power = new StaticValue(power.calculate(game, source, this)); - toughness = new StaticValue(toughness.calculate(game, source, this)); + power = StaticValue.get(power.calculate(game, source, this)); + toughness = StaticValue.get(toughness.calculate(game, source, this)); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java index 8404e0ecee..901fd63335 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java @@ -41,11 +41,11 @@ public class BoostControlledEffect extends ContinuousEffectImpl { } public BoostControlledEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter) { - this(new StaticValue(power), new StaticValue(toughness), duration, filter, false); + this(StaticValue.get(power), StaticValue.get(toughness), duration, filter, false); } public BoostControlledEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) { - this(new StaticValue(power), new StaticValue(toughness), duration, filter, excludeSource, true); + this(StaticValue.get(power), StaticValue.get(toughness), duration, filter, excludeSource, true); } public BoostControlledEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) { @@ -97,8 +97,8 @@ public class BoostControlledEffect extends ContinuousEffectImpl { } } if (this.lockedIn) { - power = new StaticValue(power.calculate(game, source, this)); - toughness = new StaticValue(toughness.calculate(game, source, this)); + power = StaticValue.get(power.calculate(game, source, this)); + toughness = StaticValue.get(toughness.calculate(game, source, this)); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java index a68c167ad2..8dcdd7f70a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java @@ -28,7 +28,7 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { } public BoostEnchantedEffect(int power, int toughness, Duration duration) { - this(new StaticValue(power), new StaticValue(toughness), duration); + this(StaticValue.get(power), StaticValue.get(toughness), duration); } public BoostEnchantedEffect(DynamicValue power, DynamicValue toughness) { @@ -58,8 +58,8 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { public void init(Ability source, Game game) { super.init(source, game); if (lockedIn) { - power = new StaticValue(power.calculate(game, source, this)); - toughness = new StaticValue(toughness.calculate(game, source, this)); + power = StaticValue.get(power.calculate(game, source, this)); + toughness = StaticValue.get(toughness.calculate(game, source, this)); } if (affectedObjectsSet) { // Added boosts of activated or triggered abilities exist independent from the source they are created by diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java index d093e52be5..1e9c895a25 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java @@ -27,7 +27,7 @@ public class BoostEquippedEffect extends ContinuousEffectImpl { } public BoostEquippedEffect(int power, int toughness, Duration duration) { - this(new StaticValue(power), new StaticValue(toughness), duration); + this(StaticValue.get(power), StaticValue.get(toughness), duration); } public BoostEquippedEffect(DynamicValue powerDynamicValue, DynamicValue toughnessDynamicValue) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostSourceEffect.java index 28f5b2ba00..1cfa40263a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostSourceEffect.java @@ -25,7 +25,7 @@ public class BoostSourceEffect extends ContinuousEffectImpl implements SourceEff private boolean lockedIn; public BoostSourceEffect(int power, int toughness, Duration duration) { - this(new StaticValue(power), new StaticValue(toughness), duration, false); + this(StaticValue.get(power), StaticValue.get(toughness), duration, false); } public BoostSourceEffect(DynamicValue power, DynamicValue toughness, Duration duration) { @@ -69,8 +69,8 @@ public class BoostSourceEffect extends ContinuousEffectImpl implements SourceEff } } if (lockedIn) { - power = new StaticValue(power.calculate(game, source, this)); - toughness = new StaticValue(toughness.calculate(game, source, this)); + power = StaticValue.get(power.calculate(game, source, this)); + toughness = StaticValue.get(toughness.calculate(game, source, this)); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostTargetEffect.java index 9254999b2b..438fce895f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostTargetEffect.java @@ -32,7 +32,7 @@ public class BoostTargetEffect extends ContinuousEffectImpl { } public BoostTargetEffect(int power, int toughness, Duration duration) { - this(new StaticValue(power), new StaticValue(toughness), duration, false); + this(StaticValue.get(power), StaticValue.get(toughness), duration, false); } public BoostTargetEffect(DynamicValue power, DynamicValue toughness, Duration duration) { @@ -69,8 +69,8 @@ public class BoostTargetEffect extends ContinuousEffectImpl { public void init(Ability source, Game game) { super.init(source, game); if (lockedIn) { - power = new StaticValue(power.calculate(game, source, this)); - toughness = new StaticValue(toughness.calculate(game, source, this)); + power = StaticValue.get(power.calculate(game, source, this)); + toughness = StaticValue.get(toughness.calculate(game, source, this)); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/MaximumHandSizeControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/MaximumHandSizeControllerEffect.java index 5e47292d52..295d99cd80 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/MaximumHandSizeControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/MaximumHandSizeControllerEffect.java @@ -39,7 +39,7 @@ public class MaximumHandSizeControllerEffect extends ContinuousEffectImpl { } public MaximumHandSizeControllerEffect(int handSize, Duration duration, HandSizeModification handSizeModification, TargetController targetController) { - this(new StaticValue(handSize), duration, handSizeModification, targetController); + this(StaticValue.get(handSize), duration, handSizeModification, targetController); } public MaximumHandSizeControllerEffect(DynamicValue handSize, Duration duration, HandSizeModification handSizeModification, TargetController targetController) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessAllEffect.java index fc73adaccc..edb7b8e459 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessAllEffect.java @@ -31,11 +31,11 @@ public class SetPowerToughnessAllEffect extends ContinuousEffectImpl { private boolean lockedInPT; public SetPowerToughnessAllEffect(int power, int toughness, Duration duration) { - this(new StaticValue(power), new StaticValue(toughness), duration, new FilterCreaturePermanent("Creatures"), true); + this(StaticValue.get(power), StaticValue.get(toughness), duration, new FilterCreaturePermanent("Creatures"), true); } public SetPowerToughnessAllEffect(int power, int toughness, Duration duration, FilterPermanent filter, boolean lockedInPT) { - this(new StaticValue(power), new StaticValue(toughness), duration, filter, lockedInPT); + this(StaticValue.get(power), StaticValue.get(toughness), duration, filter, lockedInPT); } public SetPowerToughnessAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterPermanent filter, boolean lockedInPT) { @@ -68,8 +68,8 @@ public class SetPowerToughnessAllEffect extends ContinuousEffectImpl { } } if (lockedInPT) { - power = new StaticValue(power.calculate(game, source, this)); - toughness = new StaticValue(toughness.calculate(game, source, this)); + power = StaticValue.get(power.calculate(game, source, this)); + toughness = StaticValue.get(toughness.calculate(game, source, this)); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java index 5c46ea3360..0649128a62 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java @@ -31,7 +31,7 @@ public class SetPowerToughnessTargetEffect extends ContinuousEffectImpl { } public SetPowerToughnessTargetEffect(int power, int toughness, Duration duration) { - this(new StaticValue(power), new StaticValue(toughness), duration); + this(StaticValue.get(power), StaticValue.get(toughness), duration); } public SetPowerToughnessTargetEffect(final SetPowerToughnessTargetEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java index e4bb6995a5..4c36466ddf 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java @@ -33,7 +33,7 @@ public class CastWithoutPayingManaCostEffect extends OneShotEffect { * @param maxCost Maximum converted mana cost for this effect to apply to */ public CastWithoutPayingManaCostEffect(int maxCost) { - this(new StaticValue(maxCost)); + this(StaticValue.get(maxCost)); } public CastWithoutPayingManaCostEffect(DynamicValue maxCost) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAttachedEffect.java index 0687972d50..5a9f9bbbb1 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAttachedEffect.java @@ -23,7 +23,7 @@ public class AddCountersAttachedEffect extends OneShotEffect { private String textEnchanted; public AddCountersAttachedEffect(Counter counter, String textEnchanted) { - this(counter, new StaticValue(1), textEnchanted); + this(counter, StaticValue.get(1), textEnchanted); } /** diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java index 1b5ba2047d..208a4c0b1e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java @@ -31,7 +31,7 @@ public class AddCountersSourceEffect extends OneShotEffect { } public AddCountersSourceEffect(Counter counter, boolean informPlayers) { - this(counter, new StaticValue(0), informPlayers); + this(counter, StaticValue.get(0), informPlayers); } public AddCountersSourceEffect(Counter counter, DynamicValue amount, boolean informPlayers) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersTargetEffect.java index 4c717eb6e4..b3166e83b5 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersTargetEffect.java @@ -36,7 +36,7 @@ public class AddCountersTargetEffect extends OneShotEffect { } public AddCountersTargetEffect(Counter counter, Outcome outcome) { - this(counter, new StaticValue(0), outcome); + this(counter, StaticValue.get(0), outcome); } public AddCountersTargetEffect(Counter counter, DynamicValue amount, Outcome outcome) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/GetEnergyCountersControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/GetEnergyCountersControllerEffect.java index 8b9664f79b..170a9448b7 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/GetEnergyCountersControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/GetEnergyCountersControllerEffect.java @@ -19,7 +19,7 @@ public class GetEnergyCountersControllerEffect extends OneShotEffect { private final DynamicValue value; public GetEnergyCountersControllerEffect(int value) { - this(new StaticValue(value)); + this(StaticValue.get(value)); } public GetEnergyCountersControllerEffect(DynamicValue value) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCountersAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCountersAttachedEffect.java index 775ca85982..59451c359b 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCountersAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCountersAttachedEffect.java @@ -24,7 +24,7 @@ public class RemoveCountersAttachedEffect extends OneShotEffect { private String textEnchanted; public RemoveCountersAttachedEffect(Counter counter, String textEnchanted) { - this(counter, new StaticValue(0), textEnchanted); + this(counter, StaticValue.get(0), textEnchanted); } /** diff --git a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java index be0200c24f..5e2d1d1193 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java @@ -11,6 +11,7 @@ import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; @@ -31,16 +32,18 @@ public class DiscardCardYouChooseTargetEffect extends OneShotEffect { private final DynamicValue numberCardsToDiscard; private boolean revealAllCards; + private static final FilterCard filterOneCard = new FilterCard("one card"); + public DiscardCardYouChooseTargetEffect() { this(new FilterCard("a card")); } public DiscardCardYouChooseTargetEffect(TargetController targetController) { - this(new FilterCard("a card"), targetController); + this(StaticFilters.FILTER_CARD_A, targetController); } public DiscardCardYouChooseTargetEffect(DynamicValue numberCardsToDiscard, TargetController targetController) { - this(numberCardsToDiscard, new FilterCard("cards"), targetController); + this(numberCardsToDiscard, StaticFilters.FILTER_CARD_CARDS, targetController); } public DiscardCardYouChooseTargetEffect(FilterCard filter) { @@ -48,12 +51,11 @@ public class DiscardCardYouChooseTargetEffect extends OneShotEffect { } public DiscardCardYouChooseTargetEffect(TargetController targetController, int numberCardsToReveal) { - this(new FilterCard("one card"), targetController, - new StaticValue(numberCardsToReveal, new StringBuilder(CardUtil.numberToText(numberCardsToReveal)).append(" cards").toString())); + this(filterOneCard, targetController, StaticValue.get(numberCardsToReveal)); } public DiscardCardYouChooseTargetEffect(TargetController targetController, DynamicValue numberCardsToReveal) { - this(new FilterCard("one card"), targetController, numberCardsToReveal); + this(filterOneCard, targetController, numberCardsToReveal); } public DiscardCardYouChooseTargetEffect(FilterCard filter, TargetController targetController, DynamicValue numberCardsToReveal) { @@ -63,13 +65,13 @@ public class DiscardCardYouChooseTargetEffect extends OneShotEffect { this.revealAllCards = false; this.numberCardsToReveal = numberCardsToReveal; - this.numberCardsToDiscard = new StaticValue(1); + this.numberCardsToDiscard = StaticValue.get(1); staticText = this.setText(); } public DiscardCardYouChooseTargetEffect(FilterCard filter, TargetController targetController) { - this(new StaticValue(1), filter, targetController); + this(StaticValue.get(1), filter, targetController); } public DiscardCardYouChooseTargetEffect(DynamicValue numberCardsToDiscard, FilterCard filter, TargetController targetController) { @@ -97,54 +99,56 @@ public class DiscardCardYouChooseTargetEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(targetPointer.getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); - if (player != null && controller != null) { - if (revealAllCards) { - this.numberCardsToReveal = new StaticValue(player.getHand().size()); - } - int numberToReveal = this.numberCardsToReveal.calculate(game, source, this); - if (numberToReveal > 0) { - Cards revealedCards = new CardsImpl(); - numberToReveal = Math.min(player.getHand().size(), numberToReveal); - if (player.getHand().size() > numberToReveal) { - TargetCardInHand chosenCards = new TargetCardInHand(numberToReveal, numberToReveal, new FilterCard("card in " + player.getName() + "'s hand")); - chosenCards.setNotTarget(true); - if (chosenCards.canChoose(player.getId(), game) && player.chooseTarget(Outcome.Discard, player.getHand(), chosenCards, source, game)) { - if (!chosenCards.getTargets().isEmpty()) { - List targets = chosenCards.getTargets(); - for (UUID targetid : targets) { - Card card = game.getCard(targetid); - if (card != null) { - revealedCards.add(card); - } - } - } - } - } else { - revealedCards.addAll(player.getHand()); - } - - Card sourceCard = game.getCard(source.getSourceId()); - player.revealCards(sourceCard != null ? sourceCard.getIdName() + " (" + sourceCard.getZoneChangeCounter(game) + ')' : "Discard", revealedCards, game); - - boolean result = true; - int filteredCardsCount = revealedCards.count(filter, source.getSourceId(), source.getControllerId(), game); - int numberToDiscard = Math.min(this.numberCardsToDiscard.calculate(game, source, this), filteredCardsCount); - if (numberToDiscard > 0) { - TargetCard target = new TargetCard(numberToDiscard, Zone.HAND, filter); - if (controller.choose(Outcome.Benefit, revealedCards, target, game)) { - for (UUID targetId : target.getTargets()) { - Card card = revealedCards.get(targetId, game); - if (!player.discard(card, source, game)) { - result = false; - } - } - } - } - return result; - } + if (player == null || controller == null) { + return false; + } + if (revealAllCards) { + this.numberCardsToReveal = StaticValue.get(player.getHand().size()); + } + int numberToReveal = this.numberCardsToReveal.calculate(game, source, this); + if (numberToReveal <= 0) { return true; } - return false; + Cards revealedCards = new CardsImpl(); + numberToReveal = Math.min(player.getHand().size(), numberToReveal); + if (player.getHand().size() > numberToReveal) { + TargetCardInHand chosenCards = new TargetCardInHand(numberToReveal, numberToReveal, new FilterCard("card in " + player.getName() + "'s hand")); + chosenCards.setNotTarget(true); + if (chosenCards.canChoose(player.getId(), game) && player.chooseTarget(Outcome.Discard, player.getHand(), chosenCards, source, game)) { + if (!chosenCards.getTargets().isEmpty()) { + List targets = chosenCards.getTargets(); + for (UUID targetid : targets) { + Card card = game.getCard(targetid); + if (card != null) { + revealedCards.add(card); + } + } + } + } + } else { + revealedCards.addAll(player.getHand()); + } + + Card sourceCard = game.getCard(source.getSourceId()); + player.revealCards(sourceCard != null ? sourceCard.getIdName() + " (" + sourceCard.getZoneChangeCounter(game) + ')' : "Discard", revealedCards, game); + + boolean result = true; + int filteredCardsCount = revealedCards.count(filter, source.getSourceId(), source.getControllerId(), game); + int numberToDiscard = Math.min(this.numberCardsToDiscard.calculate(game, source, this), filteredCardsCount); + if (numberToDiscard <= 0) { + return result; + } + TargetCard target = new TargetCard(numberToDiscard, Zone.HAND, filter); + if (!controller.choose(Outcome.Benefit, revealedCards, target, game)) { + return result; + } + for (UUID targetId : target.getTargets()) { + Card card = revealedCards.get(targetId, game); + if (!player.discard(card, source, game)) { + result = false; + } + } + return result; } @Override @@ -169,7 +173,7 @@ public class DiscardCardYouChooseTargetEffect extends OneShotEffect { } else { if (numberCardsToReveal instanceof StaticValue) { sb.append(" reveals "); - sb.append(numberCardsToReveal.getMessage()); + sb.append(CardUtil.numberToText(((StaticValue) numberCardsToReveal).getValue()) + " cards"); sb.append(" from their hand"); } else { sb.append(" reveals a number of cards from their hand equal to "); diff --git a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardControllerEffect.java index 0d637f099b..278a4747c8 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardControllerEffect.java @@ -20,11 +20,11 @@ public class DiscardControllerEffect extends OneShotEffect { protected boolean randomDiscard; public DiscardControllerEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public DiscardControllerEffect(int amount, boolean randomDiscard) { - this(new StaticValue(amount), randomDiscard); + this(StaticValue.get(amount), randomDiscard); } public DiscardControllerEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardEachPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardEachPlayerEffect.java index 2d35c6dc24..91ebc6228d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardEachPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardEachPlayerEffect.java @@ -27,15 +27,15 @@ public class DiscardEachPlayerEffect extends OneShotEffect { private TargetController targetController; public DiscardEachPlayerEffect() { - this(new StaticValue(1), false); + this(StaticValue.get(1), false); } public DiscardEachPlayerEffect(TargetController targetController) { - this(new StaticValue(1), false, targetController); + this(StaticValue.get(1), false, targetController); } public DiscardEachPlayerEffect(int amount, boolean randomDiscard) { - this(new StaticValue(amount), randomDiscard); + this(StaticValue.get(amount), randomDiscard); } public DiscardEachPlayerEffect(DynamicValue amount, boolean randomDiscard) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java index 238c6b21a2..66b1351f34 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java @@ -32,7 +32,7 @@ public class DiscardTargetEffect extends OneShotEffect { } public DiscardTargetEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } /** @@ -44,7 +44,7 @@ public class DiscardTargetEffect extends OneShotEffect { public DiscardTargetEffect(int amount, boolean randomDiscard) { super(Outcome.Discard); this.randomDiscard = randomDiscard; - this.amount = new StaticValue(amount); + this.amount = StaticValue.get(amount); } public DiscardTargetEffect(final DiscardTargetEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/AmassEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/AmassEffect.java index b30a4dce7f..2ad1b35fd1 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/AmassEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/AmassEffect.java @@ -36,7 +36,7 @@ public class AmassEffect extends OneShotEffect { private UUID amassedCreatureId = null; public AmassEffect(int amassNumber) { - this(new StaticValue(amassNumber)); + this(StaticValue.get(amassNumber)); staticText = "amass " + amassNumber + ". (Put " + CardUtil.numberToText(amassNumber) + " +1/+1 counter" + (amassNumber > 1 ? "s " : " ") + "on an Army you control. If you don't control one, " diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java index c7711d81db..3bf6a6c9f8 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java @@ -30,7 +30,7 @@ public class BolsterEffect extends OneShotEffect { private final DynamicValue amount; public BolsterEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public BolsterEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/SupportEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/SupportEffect.java index ca6298c759..c650a130b7 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/SupportEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/SupportEffect.java @@ -20,8 +20,8 @@ public class SupportEffect extends AddCountersTargetEffect { private final boolean otherPermanent; public SupportEffect(Card card, int amount, boolean otherPermanent) { - super(CounterType.P1P1.createInstance(0), new StaticValue(1)); - this.amountSupportTargets = new StaticValue(amount); + super(CounterType.P1P1.createInstance(0), StaticValue.get(1)); + this.amountSupportTargets = StaticValue.get(amount); this.otherPermanent = otherPermanent; if (card.isInstant() || card.isSorcery()) { card.getSpellAbility().addTarget(new TargetCreaturePermanent(0, amount, new FilterCreaturePermanent("target creatures"), false)); diff --git a/Mage/src/main/java/mage/abilities/effects/mana/AddConditionalManaOfAnyColorEffect.java b/Mage/src/main/java/mage/abilities/effects/mana/AddConditionalManaOfAnyColorEffect.java index ab93862ffe..0f644f6b6f 100644 --- a/Mage/src/main/java/mage/abilities/effects/mana/AddConditionalManaOfAnyColorEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/mana/AddConditionalManaOfAnyColorEffect.java @@ -28,7 +28,7 @@ public class AddConditionalManaOfAnyColorEffect extends ManaEffect { private final boolean oneChoice; public AddConditionalManaOfAnyColorEffect(int amount, ConditionalManaBuilder manaBuilder) { - this(new StaticValue(amount), manaBuilder); + this(StaticValue.get(amount), manaBuilder); } public AddConditionalManaOfAnyColorEffect(DynamicValue amount, ConditionalManaBuilder manaBuilder) { diff --git a/Mage/src/main/java/mage/abilities/effects/mana/AddManaInAnyCombinationEffect.java b/Mage/src/main/java/mage/abilities/effects/mana/AddManaInAnyCombinationEffect.java index ffe2627005..17e49384e3 100644 --- a/Mage/src/main/java/mage/abilities/effects/mana/AddManaInAnyCombinationEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/mana/AddManaInAnyCombinationEffect.java @@ -23,11 +23,11 @@ public class AddManaInAnyCombinationEffect extends ManaEffect { private final DynamicValue amount; public AddManaInAnyCombinationEffect(int amount) { - this(new StaticValue(amount), ColoredManaSymbol.B, ColoredManaSymbol.U, ColoredManaSymbol.R, ColoredManaSymbol.W, ColoredManaSymbol.G); + this(StaticValue.get(amount), ColoredManaSymbol.B, ColoredManaSymbol.U, ColoredManaSymbol.R, ColoredManaSymbol.W, ColoredManaSymbol.G); } public AddManaInAnyCombinationEffect(int amount, ColoredManaSymbol... coloredManaSymbols) { - this(new StaticValue(amount), coloredManaSymbols); + this(StaticValue.get(amount), coloredManaSymbols); } public AddManaInAnyCombinationEffect(DynamicValue amount, ColoredManaSymbol... coloredManaSymbols) { diff --git a/Mage/src/main/java/mage/abilities/keyword/BushidoAbility.java b/Mage/src/main/java/mage/abilities/keyword/BushidoAbility.java index 46ee9d436b..fe61fea3a2 100644 --- a/Mage/src/main/java/mage/abilities/keyword/BushidoAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/BushidoAbility.java @@ -20,7 +20,7 @@ public class BushidoAbility extends TriggeredAbilityImpl { private String rulesText = null; public BushidoAbility(int value) { - this(new StaticValue(value)); + this(StaticValue.get(value)); rulesText = "Bushido " + value + getReminder(Integer.toString(value)); } diff --git a/Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java index 96e54314c3..89b2d51a7b 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java @@ -17,7 +17,7 @@ public class ReinforceAbility extends SimpleActivatedAbility { private Cost cost; public ReinforceAbility(int count, Cost cost) { - this(new StaticValue(count), cost); + this(StaticValue.get(count), cost); } public ReinforceAbility(DynamicValue count, Cost cost) { diff --git a/Mage/src/main/java/mage/abilities/keyword/RepairAbility.java b/Mage/src/main/java/mage/abilities/keyword/RepairAbility.java index 5a270a4d9e..9bde3078e5 100644 --- a/Mage/src/main/java/mage/abilities/keyword/RepairAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/RepairAbility.java @@ -35,7 +35,7 @@ public class RepairAbility extends DiesTriggeredAbility { private String ruleText; public RepairAbility(int count) { - super(new AddCountersSourceEffect(CounterType.REPAIR.createInstance(), new StaticValue(count), false, true)); + super(new AddCountersSourceEffect(CounterType.REPAIR.createInstance(), StaticValue.get(count), false, true)); addSubAbility(new RepairBeginningOfUpkeepInterveningIfTriggeredAbility()); addSubAbility(new RepairCastFromGraveyardTriggeredAbility()); diff --git a/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java b/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java index 3c56b148e8..90bea4bb88 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java @@ -33,7 +33,7 @@ public class SoulshiftAbility extends DiesTriggeredAbility { private final DynamicValue amount; public SoulshiftAbility(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public SoulshiftAbility(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/abilities/mana/ConditionalAnyColorManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ConditionalAnyColorManaAbility.java index 26f751b371..c8d9cf3ac4 100644 --- a/Mage/src/main/java/mage/abilities/mana/ConditionalAnyColorManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/ConditionalAnyColorManaAbility.java @@ -31,7 +31,7 @@ public class ConditionalAnyColorManaAbility extends ActivatedManaAbilityImpl { } public ConditionalAnyColorManaAbility(Cost cost, int amount, ConditionalManaBuilder manaBuilder, boolean oneChoice) { - this(cost, new StaticValue(amount), manaBuilder, oneChoice); + this(cost, StaticValue.get(amount), manaBuilder, oneChoice); } public ConditionalAnyColorManaAbility(Cost cost, DynamicValue amount, ConditionalManaBuilder manaBuilder, boolean oneChoice) { diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 7ee3a2caa2..86de642847 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -50,6 +50,13 @@ public final class StaticFilters { FILTER_CARD.setLockedFilter(true); } + + public static final FilterCard FILTER_CARD_A = new FilterCard("a card"); + + static { + FILTER_CARD_A.setLockedFilter(true); + } + public static final FilterCard FILTER_CARD_CARDS = new FilterCard("cards"); static { diff --git a/Mage/src/main/java/mage/game/command/planes/AcademyAtTolariaWestPlane.java b/Mage/src/main/java/mage/game/command/planes/AcademyAtTolariaWestPlane.java index 58b485755b..e8b54b8e29 100644 --- a/Mage/src/main/java/mage/game/command/planes/AcademyAtTolariaWestPlane.java +++ b/Mage/src/main/java/mage/game/command/planes/AcademyAtTolariaWestPlane.java @@ -63,7 +63,7 @@ class DrawCardsActivePlayerEffect extends OneShotEffect { protected DynamicValue amount; public DrawCardsActivePlayerEffect(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public DrawCardsActivePlayerEffect(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/game/command/planes/UndercityReachesPlane.java b/Mage/src/main/java/mage/game/command/planes/UndercityReachesPlane.java index 351207d6ce..b87d8e5131 100644 --- a/Mage/src/main/java/mage/game/command/planes/UndercityReachesPlane.java +++ b/Mage/src/main/java/mage/game/command/planes/UndercityReachesPlane.java @@ -102,7 +102,7 @@ class UndercityReachesTriggeredAbility extends TriggeredAbilityImpl { if (((DamagedPlayerEvent) event).isCombatDamage()) { Permanent creature = game.getPermanent(event.getSourceId()); if (creature != null) { - Effect effect = new DrawCardTargetEffect(new StaticValue(1), false, true); + Effect effect = new DrawCardTargetEffect(StaticValue.get(1), false, true); effect.setTargetPointer(new FixedTarget(creature.getControllerId())); effect.apply(game, null); return true; diff --git a/Mage/src/main/java/mage/game/stack/StackObjImpl.java b/Mage/src/main/java/mage/game/stack/StackObjImpl.java index 8af461dfdb..48c32191a9 100644 --- a/Mage/src/main/java/mage/game/stack/StackObjImpl.java +++ b/Mage/src/main/java/mage/game/stack/StackObjImpl.java @@ -200,7 +200,7 @@ public abstract class StackObjImpl implements StackObject { // build a target definition with exactly one possible target to select that replaces old target Target tempTarget = target.copy(); if (target instanceof TargetAmount) { - ((TargetAmount) tempTarget).setAmountDefinition(new StaticValue(target.getTargetAmount(targetId))); + ((TargetAmount) tempTarget).setAmountDefinition(StaticValue.get(target.getTargetAmount(targetId))); } tempTarget.setMinNumberOfTargets(1); tempTarget.setMaxNumberOfTargets(1); diff --git a/Mage/src/main/java/mage/target/TargetAmount.java b/Mage/src/main/java/mage/target/TargetAmount.java index 84ced7d035..b493de4880 100644 --- a/Mage/src/main/java/mage/target/TargetAmount.java +++ b/Mage/src/main/java/mage/target/TargetAmount.java @@ -22,7 +22,7 @@ public abstract class TargetAmount extends TargetImpl { int remainingAmount; public TargetAmount(int amount) { - this(new StaticValue(amount)); + this(StaticValue.get(amount)); } public TargetAmount(DynamicValue amount) { diff --git a/Mage/src/main/java/mage/target/common/TargetAnyTargetAmount.java b/Mage/src/main/java/mage/target/common/TargetAnyTargetAmount.java index 544c8a6de3..2ecce4b326 100644 --- a/Mage/src/main/java/mage/target/common/TargetAnyTargetAmount.java +++ b/Mage/src/main/java/mage/target/common/TargetAnyTargetAmount.java @@ -29,7 +29,7 @@ public class TargetAnyTargetAmount extends TargetPermanentOrPlayerAmount { // any positive number or zero, unless something (such as damage or counters) is being divided // or distributed among “any number” of players and/or objects. In that case, a nonzero number // of players and/or objects must be chosen if possible. - this(new StaticValue(amount), maxNumberOfTargets); + this(StaticValue.get(amount), maxNumberOfTargets); this.minNumberOfTargets = 1; } diff --git a/Mage/src/main/java/mage/target/common/TargetCreatureOrPlayerAmount.java b/Mage/src/main/java/mage/target/common/TargetCreatureOrPlayerAmount.java index 00fa98bf45..8ae66a9ec5 100644 --- a/Mage/src/main/java/mage/target/common/TargetCreatureOrPlayerAmount.java +++ b/Mage/src/main/java/mage/target/common/TargetCreatureOrPlayerAmount.java @@ -24,7 +24,7 @@ public class TargetCreatureOrPlayerAmount extends TargetPermanentOrPlayerAmount // any positive number or zero, unless something (such as damage or counters) is being divided // or distributed among “any number” of players and/or objects. In that case, a nonzero number // of players and/or objects must be chosen if possible. - this(new StaticValue(amount)); + this(StaticValue.get(amount)); this.minNumberOfTargets = 1; } diff --git a/Mage/src/main/java/mage/target/common/TargetPermanentAmount.java b/Mage/src/main/java/mage/target/common/TargetPermanentAmount.java index b6c9afedc3..77187b2931 100644 --- a/Mage/src/main/java/mage/target/common/TargetPermanentAmount.java +++ b/Mage/src/main/java/mage/target/common/TargetPermanentAmount.java @@ -28,7 +28,7 @@ public abstract class TargetPermanentAmount extends TargetAmount { // any positive number or zero, unless something (such as damage or counters) is being divided // or distributed among “any number” of players and/or objects. In that case, a nonzero number // of players and/or objects must be chosen if possible. - this(new StaticValue(amount), filter); + this(StaticValue.get(amount), filter); } TargetPermanentAmount(DynamicValue amount, FilterPermanent filter) {