From 9a603fbaab662e45d7d25364aea0e55534542b36 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 5 Jan 2020 11:33:21 -0500 Subject: [PATCH] replaced StaticValue with singletons --- .../src/mage/cards/a/AcclaimedContender.java | 2 +- .../src/mage/cards/a/AdventurousImpulse.java | 2 +- .../src/mage/cards/a/AjanisInfluence.java | 2 +- .../src/mage/cards/a/AkiriLineSlinger.java | 2 +- Mage.Sets/src/mage/cards/a/AkroanHoplite.java | 2 +- Mage.Sets/src/mage/cards/a/AllHallowsEve.java | 2 +- .../src/mage/cards/a/AncestralMemories.java | 2 +- .../src/mage/cards/a/AncientStirrings.java | 2 +- Mage.Sets/src/mage/cards/a/Anticipate.java | 2 +- Mage.Sets/src/mage/cards/a/ArcBlade.java | 2 +- Mage.Sets/src/mage/cards/a/ArcaneDenial.java | 2 +- Mage.Sets/src/mage/cards/a/ArcanistsOwl.java | 2 +- Mage.Sets/src/mage/cards/a/Arcbond.java | 2 +- .../src/mage/cards/a/ArmageddonClock.java | 2 +- Mage.Sets/src/mage/cards/a/ArterialFlow.java | 2 +- Mage.Sets/src/mage/cards/a/AsForetold.java | 2 +- Mage.Sets/src/mage/cards/a/Aurochs.java | 2 +- Mage.Sets/src/mage/cards/a/AurochsHerd.java | 2 +- .../mage/cards/a/AzcantaTheSunkenRuin.java | 2 +- Mage.Sets/src/mage/cards/b/BalduvianRage.java | 2 +- .../src/mage/cards/b/BedeckBedazzle.java | 2 +- .../src/mage/cards/b/BelltowerSphinx.java | 2 +- .../src/mage/cards/b/BenalishHonorGuard.java | 2 +- Mage.Sets/src/mage/cards/b/Berserk.java | 2 +- .../src/mage/cards/b/BiteOfTheBlackRose.java | 2 +- .../src/mage/cards/b/BitterRevelation.java | 2 +- Mage.Sets/src/mage/cards/b/BlazingShoal.java | 2 +- Mage.Sets/src/mage/cards/b/BloodLust.java | 2 +- .../src/mage/cards/b/BloodcurdlingScream.java | 2 +- .../mage/cards/b/BoardTheWeatherlight.java | 2 +- .../src/mage/cards/b/BondOfFlourishing.java | 4 +- Mage.Sets/src/mage/cards/b/BullAurochs.java | 2 +- Mage.Sets/src/mage/cards/b/BurglarRat.java | 2 +- .../src/mage/cards/b/BurningTreeShaman.java | 2 +- Mage.Sets/src/mage/cards/c/CabalPaladin.java | 2 +- Mage.Sets/src/mage/cards/c/CacklingWitch.java | 2 +- .../src/mage/cards/c/CaligoSkinWitch.java | 2 +- .../src/mage/cards/c/CapitalPunishment.java | 2 +- .../src/mage/cards/c/ChandraPyrogenius.java | 2 +- .../mage/cards/c/ChandraTorchOfDefiance.java | 2 +- .../src/mage/cards/c/ChronomanticEscape.java | 2 +- Mage.Sets/src/mage/cards/c/CivicSaber.java | 2 +- .../src/mage/cards/c/CloakingDevice.java | 2 +- .../mage/cards/c/CommuneWithDinosaurs.java | 2 +- .../src/mage/cards/c/CommuneWithNature.java | 2 +- .../src/mage/cards/c/ConclavesBlessing.java | 2 +- .../src/mage/cards/c/ContingencyPlan.java | 2 +- .../src/mage/cards/c/CourageousOutrider.java | 2 +- Mage.Sets/src/mage/cards/c/CourtHussar.java | 2 +- .../src/mage/cards/c/CranialPlating.java | 2 +- .../src/mage/cards/c/CraterElemental.java | 2 +- .../src/mage/cards/c/CrescendoOfWar.java | 4 +- .../src/mage/cards/c/CrosstownCourier.java | 2 +- Mage.Sets/src/mage/cards/c/CunningStrike.java | 4 +- .../mage/cards/c/CurseOfShallowGraves.java | 2 +- .../src/mage/cards/c/CurseOfTheCabal.java | 2 +- .../src/mage/cards/c/CyclicalEvolution.java | 2 +- Mage.Sets/src/mage/cards/d/DemonsHorn.java | 2 +- .../src/mage/cards/d/DemonspineWhip.java | 2 +- .../src/mage/cards/d/DiabolicVision.java | 2 +- .../src/mage/cards/d/DigThroughTime.java | 2 +- .../src/mage/cards/d/DiscoveryDispersal.java | 2 +- .../mage/cards/d/DisinformationCampaign.java | 2 +- .../src/mage/cards/d/DomriChaosBringer.java | 2 +- .../src/mage/cards/d/DovinGrandArbiter.java | 4 +- .../src/mage/cards/d/DownhillCharge.java | 2 +- .../src/mage/cards/d/DragonlordOjutai.java | 2 +- .../cards/d/DranaKalastriaBloodchief.java | 4 +- .../src/mage/cards/d/DrawnFromDreams.java | 2 +- Mage.Sets/src/mage/cards/e/Earthshaker.java | 2 +- .../src/mage/cards/e/EmberethSkyblazer.java | 2 +- Mage.Sets/src/mage/cards/e/EndlessScream.java | 2 +- Mage.Sets/src/mage/cards/e/Enrage.java | 2 +- .../src/mage/cards/e/ExpansionExplosion.java | 2 +- .../src/mage/cards/f/FaerieMechanist.java | 2 +- Mage.Sets/src/mage/cards/f/FatalFrenzy.java | 2 +- Mage.Sets/src/mage/cards/f/FatalLore.java | 2 +- Mage.Sets/src/mage/cards/f/FeralAnimist.java | 2 +- .../src/mage/cards/f/FesteringMarch.java | 2 +- Mage.Sets/src/mage/cards/f/FistsOfFlame.java | 2 +- Mage.Sets/src/mage/cards/f/Flamebreak.java | 2 +- .../src/mage/cards/f/ForbiddenAlchemy.java | 2 +- Mage.Sets/src/mage/cards/f/FoulEmissary.java | 2 +- Mage.Sets/src/mage/cards/g/GhoulsFeast.java | 2 +- .../mage/cards/g/GlaiveOfTheGuildpact.java | 2 +- .../src/mage/cards/g/GlimpseTheFuture.java | 2 +- .../src/mage/cards/g/GlintNestCrane.java | 2 +- .../src/mage/cards/g/GoblinGaveleer.java | 2 +- .../src/mage/cards/g/GoblinPiledriver.java | 2 +- .../src/mage/cards/g/GoblinRabblemaster.java | 2 +- .../src/mage/cards/g/GolemSkinGauntlets.java | 2 +- Mage.Sets/src/mage/cards/g/GreatDefender.java | 2 +- .../mage/cards/g/GrevenPredatorCaptain.java | 2 +- Mage.Sets/src/mage/cards/g/GrimFlayer.java | 2 +- .../src/mage/cards/g/GruulBeastmaster.java | 2 +- Mage.Sets/src/mage/cards/g/GurmagDrowner.java | 2 +- Mage.Sets/src/mage/cards/h/HarshMentor.java | 2 +- Mage.Sets/src/mage/cards/h/Hatred.java | 2 +- .../src/mage/cards/h/HeartlashCinder.java | 2 +- .../src/mage/cards/h/HellkiteIgniter.java | 2 +- Mage.Sets/src/mage/cards/h/HoldTheGates.java | 2 +- .../src/mage/cards/h/HowlFromBeyond.java | 2 +- .../src/mage/cards/h/HungerOfTheNim.java | 2 +- .../src/mage/cards/i/IchneumonDruid.java | 2 +- .../src/mage/cards/i/ImmolationShaman.java | 2 +- Mage.Sets/src/mage/cards/i/ImpactTremors.java | 2 +- Mage.Sets/src/mage/cards/i/Impulse.java | 2 +- .../mage/cards/i/IncubationIncongruity.java | 4 +- .../src/mage/cards/i/IndenturedDjinn.java | 2 +- .../src/mage/cards/i/InfiniteHourglass.java | 2 +- .../mage/cards/j/JaceTheLivingGuildpact.java | 2 +- Mage.Sets/src/mage/cards/k/KavuScout.java | 2 +- Mage.Sets/src/mage/cards/k/KessigWolfRun.java | 2 +- .../src/mage/cards/k/KitsuneLoreweaver.java | 2 +- .../src/mage/cards/k/KruphixsInsight.java | 2 +- Mage.Sets/src/mage/cards/k/KryShield.java | 2 +- Mage.Sets/src/mage/cards/k/KyloRen.java | 2 +- Mage.Sets/src/mage/cards/l/LastRites.java | 2 +- .../src/mage/cards/l/LavaclawReaches.java | 2 +- .../src/mage/cards/l/LavakinBrawler.java | 2 +- Mage.Sets/src/mage/cards/l/LichsTomb.java | 2 +- .../src/mage/cards/l/LilianasSpoils.java | 2 +- .../src/mage/cards/l/LilianasTriumph.java | 2 +- .../src/mage/cards/l/LodestoneBauble.java | 2 +- Mage.Sets/src/mage/cards/l/LoneRevenant.java | 2 +- .../src/mage/cards/l/LostOrderOfJarkeld.java | 2 +- Mage.Sets/src/mage/cards/m/Machinate.java | 2 +- Mage.Sets/src/mage/cards/m/MagmaSliver.java | 2 +- .../mage/cards/m/ManticoreOfTheGauntlet.java | 2 +- .../src/mage/cards/m/MeishinTheMindCage.java | 2 +- .../src/mage/cards/m/MemorialToUnity.java | 2 +- Mage.Sets/src/mage/cards/m/MephiticOoze.java | 2 +- .../src/mage/cards/m/MercadiasDownfall.java | 2 +- .../src/mage/cards/m/MercilessJavelineer.java | 2 +- .../src/mage/cards/m/MilitantInquisitor.java | 2 +- Mage.Sets/src/mage/cards/m/MilitiaBugler.java | 2 +- Mage.Sets/src/mage/cards/m/MobMentality.java | 2 +- .../src/mage/cards/m/MoodmarkPainter.java | 2 +- Mage.Sets/src/mage/cards/n/NagaOracle.java | 4 +- .../src/mage/cards/n/NaggingThoughts.java | 2 +- .../mage/cards/n/NajeelaTheBladeBlossom.java | 2 +- .../src/mage/cards/n/NarsetParterOfVeils.java | 2 +- .../mage/cards/n/NicolBolasTheRavager.java | 2 +- Mage.Sets/src/mage/cards/n/NimDevourer.java | 2 +- Mage.Sets/src/mage/cards/n/NimGrotesque.java | 2 +- Mage.Sets/src/mage/cards/n/NimLasher.java | 2 +- Mage.Sets/src/mage/cards/n/NimShambler.java | 2 +- Mage.Sets/src/mage/cards/n/NimShrieker.java | 2 +- .../src/mage/cards/n/NissaGenesisMage.java | 2 +- Mage.Sets/src/mage/cards/n/NullProfusion.java | 2 +- Mage.Sets/src/mage/cards/o/OathOfChandra.java | 2 +- Mage.Sets/src/mage/cards/o/OboroEnvoy.java | 2 +- .../src/mage/cards/o/OloroAgelessAscetic.java | 2 +- Mage.Sets/src/mage/cards/o/OnceUponATime.java | 2 +- Mage.Sets/src/mage/cards/o/OnwardVictory.java | 2 +- .../src/mage/cards/p/PeerThroughDepths.java | 2 +- .../src/mage/cards/p/PhyrexianNegator.java | 2 +- .../mage/cards/p/PhyrexianObliterator.java | 2 +- .../src/mage/cards/p/PhyrexianTotem.java | 2 +- .../src/mage/cards/p/PiecesOfThePuzzle.java | 2 +- Mage.Sets/src/mage/cards/p/PropheticBolt.java | 2 +- Mage.Sets/src/mage/cards/r/RabbleRouser.java | 2 +- Mage.Sets/src/mage/cards/r/RafterDemon.java | 2 +- Mage.Sets/src/mage/cards/r/RageExtractor.java | 2 +- .../src/mage/cards/r/RagebloodShaman.java | 2 +- .../src/mage/cards/r/RakdosRiteknife.java | 2 +- .../src/mage/cards/r/RalIzzetViceroy.java | 2 +- Mage.Sets/src/mage/cards/r/RalsOutburst.java | 2 +- .../src/mage/cards/r/RalsStaticaster.java | 2 +- Mage.Sets/src/mage/cards/r/RamunapRuins.java | 2 +- Mage.Sets/src/mage/cards/r/RansackTheLab.java | 2 +- Mage.Sets/src/mage/cards/r/RatColony.java | 2 +- Mage.Sets/src/mage/cards/r/RavenFamiliar.java | 2 +- Mage.Sets/src/mage/cards/r/RealityStrobe.java | 2 +- .../src/mage/cards/r/RimehornAurochs.java | 2 +- .../src/mage/cards/r/RiptideMangler.java | 2 +- .../src/mage/cards/r/RoilmagesTrick.java | 2 +- .../src/mage/cards/r/RubblebeltRioters.java | 2 +- .../src/mage/cards/r/RunechantersPike.java | 2 +- Mage.Sets/src/mage/cards/r/RushOfBlood.java | 2 +- .../src/mage/cards/r/RuthlessSniper.java | 2 +- .../src/mage/cards/s/SalvageSlasher.java | 2 +- .../src/mage/cards/s/SarkhanFireblood.java | 2 +- .../src/mage/cards/s/SarkhansDragonfire.java | 2 +- Mage.Sets/src/mage/cards/s/SeaGateOracle.java | 2 +- Mage.Sets/src/mage/cards/s/SeekTheWilds.java | 2 +- Mage.Sets/src/mage/cards/s/Sentinel.java | 2 +- Mage.Sets/src/mage/cards/s/SentinelTower.java | 2 +- .../src/mage/cards/s/ShaleskinBruiser.java | 2 +- .../mage/cards/s/ShimmerOfPossibility.java | 2 +- .../src/mage/cards/s/SightBeyondSight.java | 2 +- .../src/mage/cards/s/SilhanaWayfinder.java | 2 +- .../src/mage/cards/s/SilvergillDouser.java | 2 +- .../mage/cards/s/SionaCaptainOfThePyleas.java | 2 +- Mage.Sets/src/mage/cards/s/SkallaWolf.java | 2 +- .../src/mage/cards/s/SkeletalScrying.java | 2 +- Mage.Sets/src/mage/cards/s/SleightOfHand.java | 2 +- Mage.Sets/src/mage/cards/s/SoTiny.java | 2 +- .../src/mage/cards/s/SokenzanSpellblade.java | 2 +- Mage.Sets/src/mage/cards/s/SoulScarMage.java | 2 +- Mage.Sets/src/mage/cards/s/Soulshriek.java | 2 +- .../src/mage/cards/s/SpontaneousMutation.java | 2 +- .../mage/cards/s/SqueakingPieGrubfellows.java | 2 +- .../src/mage/cards/s/StoneforgeAcolyte.java | 2 +- .../src/mage/cards/s/StormfistCrusader.java | 2 +- .../src/mage/cards/s/StrategicPlanning.java | 2 +- Mage.Sets/src/mage/cards/s/Subdue.java | 2 +- .../src/mage/cards/s/SultaiAscendancy.java | 2 +- .../src/mage/cards/s/SultaiSoothsayer.java | 2 +- .../src/mage/cards/s/SumalaWoodshaper.java | 2 +- Mage.Sets/src/mage/cards/s/SupremeWill.java | 2 +- .../src/mage/cards/s/SurgeOfStrength.java | 2 +- .../src/mage/cards/t/TaigamSidisisHand.java | 2 +- .../src/mage/cards/t/TaigamsScheming.java | 2 +- .../src/mage/cards/t/TasigursCruelty.java | 2 +- Mage.Sets/src/mage/cards/t/TearsOfRage.java | 2 +- .../mage/cards/t/TeferiTemporalArchmage.java | 2 +- Mage.Sets/src/mage/cards/t/TempestDjinn.java | 2 +- Mage.Sets/src/mage/cards/t/Tephraderm.java | 4 +- Mage.Sets/src/mage/cards/t/TerraRavager.java | 2 +- .../mage/cards/t/TezzeretsGatebreaker.java | 2 +- .../src/mage/cards/t/TheAntiquitiesWar.java | 2 +- .../src/mage/cards/t/TheBattleOfGeonosis.java | 2 +- .../src/mage/cards/t/TheTriumphOfAnax.java | 2 +- .../src/mage/cards/t/ThievesFortune.java | 2 +- .../src/mage/cards/t/ThunderousMight.java | 2 +- .../mage/cards/t/TomorrowAzamisFamiliar.java | 2 +- Mage.Sets/src/mage/cards/t/TowerGeist.java | 2 +- .../src/mage/cards/u/UnderrealmLich.java | 2 +- .../src/mage/cards/u/UnityOfTheDroids.java | 2 +- Mage.Sets/src/mage/cards/u/Unnerve.java | 2 +- Mage.Sets/src/mage/cards/v/VhatiIlDal.java | 4 +- Mage.Sets/src/mage/cards/v/ViciousRumors.java | 2 +- .../src/mage/cards/v/VileManifestation.java | 2 +- Mage.Sets/src/mage/cards/v/VivienReid.java | 2 +- .../src/mage/cards/v/VolrathsDungeon.java | 2 +- .../src/mage/cards/w/WallOfTombstones.java | 2 +- .../src/mage/cards/w/WanderingGoblins.java | 2 +- Mage.Sets/src/mage/cards/w/Weatherlight.java | 2 +- .../src/mage/cards/w/WineOfBloodAndIron.java | 2 +- .../src/mage/cards/y/YodaJediMaster.java | 2 +- .../abilities/costs/common/PayLifeCost.java | 2 +- .../dynamicvalue/common/StaticValue.java | 28 ++--- .../effects/common/CreateTokenEffect.java | 6 +- .../common/CreateTokenTargetEffect.java | 4 +- .../effects/common/DamageAllEffect.java | 4 +- .../DamageAttachedControllerEffect.java | 2 +- .../effects/common/DamageAttachedEffect.java | 2 +- .../common/DamageControllerEffect.java | 4 +- .../common/DamageEverythingEffect.java | 6 +- .../effects/common/DamageMultiEffect.java | 4 +- .../effects/common/DamagePlayersEffect.java | 6 +- .../common/DamageTargetControllerEffect.java | 4 +- .../effects/common/DamageTargetEffect.java | 10 +- .../effects/common/DrawCardAllEffect.java | 2 +- .../DrawCardSourceControllerEffect.java | 2 +- .../effects/common/DrawCardTargetEffect.java | 4 +- .../effects/common/GainLifeEffect.java | 2 +- .../effects/common/GainLifeTargetEffect.java | 2 +- .../LookLibraryAndPickControllerEffect.java | 8 +- .../common/LookLibraryControllerEffect.java | 2 +- .../common/LoseLifeAllPlayersEffect.java | 2 +- .../LoseLifeControllerAttachedEffect.java | 2 +- .../common/LoseLifeDefendingPlayerEffect.java | 2 +- .../common/LoseLifeOpponentsEffect.java | 2 +- .../LoseLifePermanentControllerEffect.java | 2 +- .../LoseLifeSourceControllerEffect.java | 2 +- .../effects/common/LoseLifeTargetEffect.java | 2 +- .../PutLibraryIntoGraveTargetEffect.java | 2 +- ...ardOfLibraryIntoGraveEachPlayerEffect.java | 2 +- ...TopCardOfLibraryIntoGraveTargetEffect.java | 2 +- .../RevealLibraryPutIntoHandEffect.java | 2 +- .../RevealTargetPlayerLibraryEffect.java | 2 +- .../effects/common/SacrificeAllEffect.java | 2 +- .../common/SacrificeControllerEffect.java | 2 +- .../effects/common/SacrificeEffect.java | 2 +- .../common/SacrificeOpponentsEffect.java | 2 +- .../SacrificeOpponentsUnlessPayEffect.java | 4 +- .../common/SetPlayerLifeAllEffect.java | 2 +- .../common/SetPlayerLifeSourceEffect.java | 2 +- .../common/SetPlayerLifeTargetEffect.java | 2 +- .../common/continuous/BoostAllEffect.java | 6 +- .../continuous/BoostControlledEffect.java | 8 +- .../continuous/BoostEnchantedEffect.java | 6 +- .../continuous/BoostEquippedEffect.java | 2 +- .../common/continuous/BoostSourceEffect.java | 6 +- .../common/continuous/BoostTargetEffect.java | 6 +- .../MaximumHandSizeControllerEffect.java | 2 +- .../SetPowerToughnessAllEffect.java | 8 +- .../SetPowerToughnessTargetEffect.java | 2 +- .../cost/CastWithoutPayingManaCostEffect.java | 2 +- .../counter/AddCountersAttachedEffect.java | 2 +- .../counter/AddCountersSourceEffect.java | 2 +- .../counter/AddCountersTargetEffect.java | 2 +- .../GetEnergyCountersControllerEffect.java | 2 +- .../counter/RemoveCountersAttachedEffect.java | 2 +- .../DiscardCardYouChooseTargetEffect.java | 112 +++++++++--------- .../discard/DiscardControllerEffect.java | 4 +- .../discard/DiscardEachPlayerEffect.java | 6 +- .../common/discard/DiscardTargetEffect.java | 4 +- .../effects/keyword/AmassEffect.java | 2 +- .../effects/keyword/BolsterEffect.java | 2 +- .../effects/keyword/SupportEffect.java | 4 +- .../AddConditionalManaOfAnyColorEffect.java | 2 +- .../mana/AddManaInAnyCombinationEffect.java | 4 +- .../abilities/keyword/BushidoAbility.java | 2 +- .../abilities/keyword/ReinforceAbility.java | 2 +- .../mage/abilities/keyword/RepairAbility.java | 2 +- .../abilities/keyword/SoulshiftAbility.java | 2 +- .../mana/ConditionalAnyColorManaAbility.java | 2 +- .../main/java/mage/filter/StaticFilters.java | 7 ++ .../planes/AcademyAtTolariaWestPlane.java | 2 +- .../command/planes/UndercityReachesPlane.java | 2 +- .../java/mage/game/stack/StackObjImpl.java | 2 +- .../main/java/mage/target/TargetAmount.java | 2 +- .../target/common/TargetAnyTargetAmount.java | 2 +- .../common/TargetCreatureOrPlayerAmount.java | 2 +- .../target/common/TargetPermanentAmount.java | 2 +- 318 files changed, 440 insertions(+), 435 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AcclaimedContender.java b/Mage.Sets/src/mage/cards/a/AcclaimedContender.java index 7dfaf13e365..59ebda2d7ec 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 8e2cc8cdf67..bcc789c74d6 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 f8dd582e052..c751240d102 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 3dc3fdf14c8..ef937537b2a 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 d19cdaf3b65..3a9d6a906e4 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 d61463522c9..62e2cdcf704 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 008fe2f058f..b7fb61cb3bf 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 490c2641f54..6186b701d52 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 69db6614b54..3610f73c967 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 a46a4a804e6..f9f194d70fa 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 40d3f369d18..5609c3c5362 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 4684c16b203..c3dec2d6943 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 b572b6f6428..9c01e62c67f 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 ab44b0fe735..1bacb438685 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 e5b9848f22f..7cd6f7bfa26 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 e5cf038407d..ddbf71d3105 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 ddd1acbe40a..4960ec3865d 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 62223e8f2ef..3434b0ab193 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 a3161a53afa..ac9524d8dea 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 9f3e910722f..0fe88f380d7 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 514dd6b598b..cecff56cfc4 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 832d83f0d6f..4ef63a42815 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 ed878bde48e..6cca792f358 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 cd620758c5a..2cb2a76011d 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 2eb7cef394e..e31af9ce411 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 fed897d761d..2787c1c3fa4 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 9f6238b97e4..ddf99ccecfe 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 c9ac2e00707..4f3cc6291b4 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 50d803fc36c..0a5c9f99fc9 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 cebfdf8ec6f..bee629017e7 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 bba9076cfed..840a0fe5767 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 7da88699f1b..9fe75590ccf 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 f6efa16d72a..3663dcf96e8 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 18b29ddd9b7..4ea90941b3f 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 27fcd64de78..e68cdcdf4e1 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 37f93e1542a..efd5f51c737 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 1ecf21e9cc0..8d57cd27aa0 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 12d184d2828..9974a47e667 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 66a1e08ca23..5e9a1f97aac 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 f0b547ad537..793e0dfe27a 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 85e50955709..4ee2d599a6e 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 9324cef5ed2..1120b592529 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 4cd2fb65881..defcb2a8ed2 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 c039f4477c3..23786a5032b 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 39ca3ffe295..91d82edb353 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 77f408046d7..f0f2d51a02c 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 314a7f97eb2..9a023ba324a 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 d2fee2adb5d..cf514bdcf99 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 9d860ac2919..8d7af3227bd 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 e61d82526eb..79f4fccfac7 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 7407da08965..bc228e6e429 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 9b817b7a2db..b7867992ff7 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 8cb48f04f7d..093357a261d 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 c88372e06b2..08f0bbbd06d 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 d83d76ef44d..7a9a2e8ce67 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 7cf0bfda698..b2bab766740 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 35f05870d41..208b1573a73 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 71e71e2d01b..d94ddc1d1dd 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 7e246d0cbe5..3191caa20ad 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 7495f8a1b6d..e374d3683bb 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 4aa9c91b047..fbc8168103a 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 0ab54683229..6daa999a758 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 7b67d4bc805..4ffc2d9f04c 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 ed75b4de9ec..5ed58faaa1f 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 ea2400d975b..4d7d713cfce 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 ed0d2d0eb26..f14bbae0190 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 cbb71bd2505..98e6aa3cc63 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 404fafb5f75..28f6054c856 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 b2ff445b845..a9777c29890 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 6a10728d67c..85b4eb7ebf0 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 9eff0199960..efbdb2cc029 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 75fc451a8ab..f4e0aef884e 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 9d83d33659c..5546838f80e 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 88cd4ef9f99..0b2039c0944 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 d3593c1bb3a..b3255885a5b 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 6b074158208..a5147f18f13 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 c4a641dedc5..9978b96de54 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 d552a596958..6fbca8779b2 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 9d6b6a93c08..20f67b9c979 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 418879d2c44..6b5af78da9a 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 ecda085357a..78091a868d4 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 42c0cb35e69..637895487f9 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 5caf63570db..cca047343a1 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 a97e983884e..f43717382f3 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 c46079038b6..fcfdbdfbf72 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 bb2f7d5e333..e200cb22347 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 af36bbbbe3d..4a20dbf4b9f 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 80e9f6f20d6..9db43599dd4 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 1c355d90913..3aacc2532af 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 813b051f727..6190cfee3c1 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 5f3d1e69932..9c9e80861d9 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 369c3eafd6f..417204ff9a9 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 8024fbd211e..cdf3130f8d9 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 de4d208c746..1856b0ae15e 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 c0e203c35b0..bd475efdee5 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 bf96ee3b1c5..c15181cfbc2 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 7a01484d2a9..16471d1c81c 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 1d096e1cb6a..b5393140561 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 02b0909a977..21ef0f07b55 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 566e9bca98d..f69ac3f81a9 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 4efa8b303a4..e8b5b306757 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 ec2c6e9dd4a..9697ef5ba14 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 24cf8cadfad..203988cf0d6 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 c3410562516..6ac8a968063 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 a4eddb62866..f7bc1ddca02 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 bd9ec49c391..e905b6ef887 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 1ff1b93fac6..5d9bbacb649 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 7604c2ab92a..07e76c0b33e 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 6e54d5ab216..85127a972c6 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 f06540d90a8..0e5527fb04d 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 762da47ab12..71a5f2af177 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 dc4c345f4f1..87747287fa2 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 3dfb9a59d9f..787bae0044d 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 0b71aea401f..107a1fb17aa 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 a0cf363446d..fa4071206c7 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 eb321f215e2..2b1f7c36978 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 eab9b02ff1d..06cfc0f5937 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 843b17bccf3..4abccd4d7ba 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 9988c05f7d4..e9039503d4f 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 4edc4e90846..0cf5eb70f4c 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 878d5d48e51..e87edd1fbcf 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 9238ae90a55..5f99953c620 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 5cb8a89ec42..ebe4f4488da 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 06526f843f2..a28028d7954 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 9fdb6664e97..23122d69372 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 44b3f31f12d..1d28ca854c4 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 b1039219f02..2b6459a8456 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 61976a473c1..eadc0ecd654 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 914c7551081..e21c70d44ad 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 a88e657705d..fcb4fc4fcd8 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 4a60ce8a178..750b423fbda 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 ac2ebf0e0d2..ff727fb2661 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 babb46a1abc..29f5ae26e88 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 4e8804712f1..0ec6754e71d 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 8a8d2254eff..d128a303bf0 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 38feec76031..adee64fd9e1 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 e00596f1a3f..a3f24a467c6 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 f114b04ed04..da7c3de883b 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 22e5123b44e..e1d1376f291 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 9aa95cbb7ee..6da1d42ae98 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 d39e57e989d..8b268d3ff52 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 9a6571e6ce1..b9d358dd4f8 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 b6c5f0efd2e..c71dab4b0b8 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 bf9f12e8e3f..3487c3f83da 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 7effd550150..03442660b89 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 f31e98ace31..073663abf74 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 27f19d64ee3..dff0c0e4ad0 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 8bef1efc8ab..cfcac4f232f 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 16296836744..ba4a695ce09 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 6332585855b..263d299c775 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 a6018a68aa1..6dfec92ff91 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 fa6d5891b0c..eb728f92e87 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 3d51dcc1091..125e2172b4c 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 871e8985a41..ef528989793 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 e5d5aa698d1..c18eb6220f6 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 f508a5a8f2d..f9bee649d1a 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 728446d4d49..1511c15e121 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 cfd66b75247..167ae39f705 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 b48842a7eac..7347df1497f 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 51aac31bb4c..9fb20172f3d 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 76a980aabe1..3e0479362bc 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 3ea9d9ab5d4..989395a15d1 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 10e7f1afef7..9891e41b349 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 1b0351aa64c..10bfaa1f765 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 df4e25fe796..ae12ac75d16 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 5af3ca5d8db..4f5f3f3b79e 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 7390e5066ec..5b6b887a5dc 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 40944d79510..43c5dffb7c0 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 87de152208a..bab88d58310 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 8d0421a4f97..20886a354bc 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 252f5e0b825..7242bd300a1 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 86b6a1d5c24..ac4d8ab9ccd 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 f867635d394..5082eff967c 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 08893bd4b61..7176e3a00e7 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 b1488d7428a..8145bfdae6f 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 52742ac9f9a..32ffe916cb4 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 496d1bd6a7b..8533a961543 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 836019948d6..a9b33ad769e 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 8c61e3ba2a2..678cbe7a133 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 09daee68f03..da5f102f203 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 bc84b921803..da492f5da04 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 f786b4b01c9..4fa24e8edb2 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 c7dfe6717e4..274afded81c 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 d61bdcf846d..06b3411b02b 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 d00986166ee..d1b6ac4e320 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 d5eae19227b..89b0aef0b95 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 2601ee42de0..bdbfd2e58cb 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 bc33d74c3b3..be47a83810a 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 c666d6d3bfe..a50bb9be0ca 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 46bfea6cf19..5b3056dc541 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 ea21f3a08d3..3051bee5904 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 38d0f6e90e5..54e4a2e230a 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 efbdede1e27..903197f46df 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 4e53bd72332..97838a6a850 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 130422f9fb8..5407429b46d 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 558d6319396..7e65477a115 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 da5fd503202..b45d2f89ea8 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 6b41d69da82..48db1b608d1 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 56e925fe0ce..889544a4f4a 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 b45ced68608..4070c4dd5f1 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 93dc244d8af..bc5d1e99099 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 42eefd77284..ae0cd577470 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 909107ce460..dd9218364df 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 d4e82d39c8a..7716f303d21 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 ab4d35ed3d2..8fd35a8ffe4 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 356d960fb52..ec0a49fb9ee 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 970e3df7882..d692172bf5d 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 0fb165a16ec..acf496c1e86 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 3a40b420f8c..de3340594f6 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 dd6a0db9603..4c3e777a980 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 3cf8a608f6a..c61922a2384 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 d71e125bb65..b41e9bac990 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 10f37ba6ecd..5b16a419ae3 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 2b9ee292157..3c01f0020c7 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 5cc2a98c584..d92e28dca3c 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 c92ca99bce1..f7f4b06c64f 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 213dfc7d5ae..c96b6389716 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 05d381d8c2c..40be9817497 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 5b33109c490..bd8baa98f9f 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 1e7f3320261..2152ed8f3ef 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 4ea0fddeadd..7b7a6efe2b7 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 1000f251b2f..4f125fbec79 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 7207f52b1ac..30cd3236f02 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 150e93adad1..922049eedaf 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 3b38ec85c2b..46372b0dfc3 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 bd30f816fce..178807b294f 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 edf1eb734e7..29b92ef5018 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 bc51284f027..c5b427d0ab7 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 72d3b775ba3..0f4ed7786d5 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 cd333a0bec6..cac786cdccf 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 5cc212732b2..226743c0b07 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 e5e913c261d..b1bc8efe49c 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 447886bd3cd..245ce9a78e9 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 85e6119b50f..cfa223e406f 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 2ef81f81890..8da6c440ca5 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 3c8444a70e4..c3fe5e8e006 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 7deea142297..d1399069cd0 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 07c91d93eb6..a0c19520e4d 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 64498880c30..650994cde88 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 f5e91428984..f332091d87b 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 761caea8c70..24b4f8132a0 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 332b6545b01..18c902d5af4 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 f5a11f81362..12d2b4f4df8 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 7f686b6f05d..0ee482597c0 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 15bc8d25af4..d74b91930b5 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 d65ba442e67..8dffba358d0 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 6c0f4f0fdd8..68d1b93da62 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 384e3d1ff2b..23ba7d6d86a 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 de059f270a2..19772872398 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 8dd83355fbc..42c78008cec 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 6ec376482a0..df1c5397bbe 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 c8ff352c312..0b4c5395ef1 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 a1f9ce8615d..ea805fe9e5f 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 626b7225cbb..d4db66bb450 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 d2da1c7b9a2..0e87c451e8c 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 c56a4f28b8b..8a2533827de 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 7ab53d6f603..585c3f0341e 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 51b5e4ef33b..105097a6678 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 d8a79bfc80f..98210835fbf 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 2155cbc1d4f..9dca85f4064 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 766e1b2ed8a..fdacd31698f 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 8bc73d8080f..c320d8f13eb 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 abf9bbae7cd..450eaec382a 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 507ad217d14..ca058b07622 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 72e7a17cd5b..ead8433dc77 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 5d6ecf576b7..00274e26a9b 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 9fe9cae185a..0707a453340 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 f46fa4dc769..93c03a71466 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 f1158cb434b..665a930257a 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 2e27fe567d3..9cd5fa87023 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 308222981d1..d45f62ad2cb 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 f5243a07733..c77e3560f4d 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 8a3d0feb6e2..afb199ca969 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 8f5cdf4a3e8..434ebc82259 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 a633f247cb0..70cb4035c44 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 cf5006a1148..fc954a3a5d1 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 243c524d5c8..f1d9df7128f 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 0ed4cc90229..f37daeadb06 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 fa7befc9179..cb691a322ad 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 54db0d0d56a..17ca7f5981a 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 ed9c40731fc..cb79f6e1f68 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 bf9e508a8b5..bf1261f9266 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 8404e0ecee1..901fd633357 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 a68c167ad2c..8dcdd7f70ad 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 d093e52be5c..1e9c895a254 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 28f5b2ba008..1cfa40263a4 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 9254999b2ba..438fce895fa 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 5e47292d523..295d99cd80e 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 fc73adacccc..edb7b8e4595 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 5c46ea33604..0649128a62c 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 e4bb6995a50..4c36466ddfb 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 0687972d50e..5a9f9bbbb11 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 1b5ba2047d6..208a4c0b1ec 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 4c717eb6e49..b3166e83b5f 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 8b9664f79ba..170a9448b70 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 775ca85982c..59451c359b9 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 be0200c24ff..5e2d1d11935 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 0d637f099b4..278a4747c83 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 2d35c6dc24e..91ebc6228d4 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 238c6b21a29..66b1351f340 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 b30a4dce7f4..2ad1b35fd1c 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 c7711d81db7..3bf6a6c9f88 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 ca6298c759d..c650a130b7d 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 ab93862ffea..0f644f6b6fd 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 ffe26270054..17e49384e38 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 46ee9d436bf..fe61fea3a22 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 96e54314c3c..89b2d51a7bc 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 5a270a4d9e6..9bde3078e55 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 3c56b148e81..90bea4bb883 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 26f751b3712..c8d9cf3ac48 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 7ee3a2caa23..86de6428476 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 58b485755b0..e8b54b8e296 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 351207d6ce6..b87d8e51317 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 8af461dfdbf..48c32191a95 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 84ced7d035a..b493de48806 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 544c8a6de32..2ecce4b3269 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 00fa98bf457..8ae66a9ec54 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 b6c9afedc37..77187b29318 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) {