From b5e8c881538453f2f75d7e19f3103613a2c7f85b Mon Sep 17 00:00:00 2001 From: ingmargoudt Date: Sun, 5 Mar 2017 09:14:33 +0100 Subject: [PATCH] remove all contains(cardtype.XX) references, instead use the default interface method --- Mage.Sets/src/mage/cards/a/AAT1.java | 2 +- Mage.Sets/src/mage/cards/a/AberrantResearcher.java | 2 +- Mage.Sets/src/mage/cards/a/Abeyance.java | 2 +- Mage.Sets/src/mage/cards/a/AetherCharge.java | 2 +- Mage.Sets/src/mage/cards/a/AetherRift.java | 2 +- Mage.Sets/src/mage/cards/a/AetherSting.java | 2 +- Mage.Sets/src/mage/cards/a/AkoumFirebird.java | 2 +- Mage.Sets/src/mage/cards/a/AkoumHellkite.java | 2 +- Mage.Sets/src/mage/cards/a/Aluren.java | 2 +- Mage.Sets/src/mage/cards/a/AmbuscadeShaman.java | 2 +- Mage.Sets/src/mage/cards/a/Amnesia.java | 2 +- .../src/mage/cards/a/AnafenzaTheForemost.java | 4 ++-- Mage.Sets/src/mage/cards/a/AngelicChorus.java | 2 +- .../src/mage/cards/a/AnimarSoulOfElements.java | 2 +- Mage.Sets/src/mage/cards/a/AnimateArtifact.java | 2 +- Mage.Sets/src/mage/cards/a/AnkhOfMishra.java | 2 +- Mage.Sets/src/mage/cards/a/ArcaneMelee.java | 11 +++++------ Mage.Sets/src/mage/cards/a/ArchonOfRedemption.java | 2 +- Mage.Sets/src/mage/cards/a/ArtificersHex.java | 2 +- Mage.Sets/src/mage/cards/a/AshesOfTheFallen.java | 2 +- Mage.Sets/src/mage/cards/a/AsmiraHolyAvenger.java | 6 +++--- Mage.Sets/src/mage/cards/a/AuraBarbs.java | 2 +- Mage.Sets/src/mage/cards/a/AuraOfSilence.java | 2 +- Mage.Sets/src/mage/cards/a/AureliasFury.java | 2 +- Mage.Sets/src/mage/cards/a/Aurification.java | 2 +- .../src/mage/cards/a/AuthorityOfTheConsuls.java | 2 +- Mage.Sets/src/mage/cards/b/BalothCageTrap.java | 2 +- Mage.Sets/src/mage/cards/b/BalustradeSpy.java | 2 +- .../src/mage/cards/b/BattlefieldThaumaturge.java | 2 +- Mage.Sets/src/mage/cards/b/Bedlam.java | 2 +- Mage.Sets/src/mage/cards/b/Bereavement.java | 2 +- Mage.Sets/src/mage/cards/b/BlackSunsZenith.java | 2 +- .../src/mage/cards/b/BladeOfTheBloodchief.java | 2 +- Mage.Sets/src/mage/cards/b/BlazeCommando.java | 2 +- .../src/mage/cards/b/BlessedReincarnation.java | 4 ++-- Mage.Sets/src/mage/cards/b/BlindObedience.java | 2 +- Mage.Sets/src/mage/cards/b/BloodSeeker.java | 2 +- Mage.Sets/src/mage/cards/b/BloodfireEnforcers.java | 4 ++-- Mage.Sets/src/mage/cards/b/BloodsporeThrinax.java | 2 +- Mage.Sets/src/mage/cards/b/BoneDancer.java | 2 +- Mage.Sets/src/mage/cards/b/Bossk.java | 2 +- Mage.Sets/src/mage/cards/b/BramblewoodParagon.java | 2 +- Mage.Sets/src/mage/cards/b/BrutalDeceiver.java | 2 +- Mage.Sets/src/mage/cards/c/CagedSun.java | 2 +- Mage.Sets/src/mage/cards/c/CairnWanderer.java | 2 +- Mage.Sets/src/mage/cards/c/CallOfTheWild.java | 2 +- Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java | 2 +- Mage.Sets/src/mage/cards/c/CallousDeceiver.java | 2 +- Mage.Sets/src/mage/cards/c/CarnifexDemon.java | 2 +- .../src/mage/cards/c/CataclysmicGearhulk.java | 2 +- Mage.Sets/src/mage/cards/c/Catastrophe.java | 2 +- Mage.Sets/src/mage/cards/c/CellarDoor.java | 2 +- Mage.Sets/src/mage/cards/c/CerebralEruption.java | 2 +- .../src/mage/cards/c/ChandraTheFirebrand.java | 2 +- .../src/mage/cards/c/ChandraTorchOfDefiance.java | 2 +- Mage.Sets/src/mage/cards/c/ChandrasPhoenix.java | 6 +++--- .../src/mage/cards/c/ChorusOfTheConclave.java | 2 +- Mage.Sets/src/mage/cards/c/ChronatogTotem.java | 2 +- Mage.Sets/src/mage/cards/c/CircleOfFlame.java | 2 +- Mage.Sets/src/mage/cards/c/CityOfTraitors.java | 2 +- Mage.Sets/src/mage/cards/c/CivilizedScholar.java | 2 +- Mage.Sets/src/mage/cards/c/CloneShell.java | 2 +- Mage.Sets/src/mage/cards/c/CobraTrap.java | 2 +- Mage.Sets/src/mage/cards/c/CoercedConfession.java | 2 +- Mage.Sets/src/mage/cards/c/Comeuppance.java | 4 ++-- Mage.Sets/src/mage/cards/c/CompulsiveResearch.java | 2 +- Mage.Sets/src/mage/cards/c/ConduitOfRuin.java | 4 ++-- Mage.Sets/src/mage/cards/c/Conspiracy.java | 12 ++++++------ .../src/mage/cards/c/ConsumingAberration.java | 2 +- Mage.Sets/src/mage/cards/c/ContainmentPriest.java | 2 +- Mage.Sets/src/mage/cards/c/Contamination.java | 2 +- Mage.Sets/src/mage/cards/c/ContestedWarZone.java | 2 +- Mage.Sets/src/mage/cards/c/CorpseDance.java | 2 +- Mage.Sets/src/mage/cards/c/CorpsejackMenace.java | 2 +- Mage.Sets/src/mage/cards/c/CountrysideCrusher.java | 2 +- Mage.Sets/src/mage/cards/c/Cowardice.java | 2 +- Mage.Sets/src/mage/cards/c/CrackdownConstruct.java | 2 +- .../src/mage/cards/c/CragganwickCremator.java | 2 +- Mage.Sets/src/mage/cards/c/CrawlingSensation.java | 2 +- Mage.Sets/src/mage/cards/c/CrimePunishment.java | 6 +++--- Mage.Sets/src/mage/cards/c/CrucibleOfWorlds.java | 2 +- Mage.Sets/src/mage/cards/c/CruelDeceiver.java | 2 +- Mage.Sets/src/mage/cards/c/CuriousHomunculus.java | 2 +- Mage.Sets/src/mage/cards/c/CurseOfEchoes.java | 2 +- Mage.Sets/src/mage/cards/c/CursedTotem.java | 2 +- Mage.Sets/src/mage/cards/d/DarettiScrapSavant.java | 2 +- Mage.Sets/src/mage/cards/d/DeadbridgeChant.java | 2 +- Mage.Sets/src/mage/cards/d/DeathSpark.java | 2 +- Mage.Sets/src/mage/cards/d/DeathsPresence.java | 2 +- Mage.Sets/src/mage/cards/d/DeceiverOfForm.java | 2 +- Mage.Sets/src/mage/cards/d/DescendantsPath.java | 2 +- Mage.Sets/src/mage/cards/d/DesecratorHag.java | 2 +- Mage.Sets/src/mage/cards/d/DestroyTheEvidence.java | 2 +- Mage.Sets/src/mage/cards/d/DevoutHarpist.java | 2 +- .../src/mage/cards/d/DimensionalInfiltrator.java | 2 +- Mage.Sets/src/mage/cards/d/DingusEgg.java | 2 +- Mage.Sets/src/mage/cards/d/DisplacementWave.java | 2 +- .../src/mage/cards/d/DivergentTransformations.java | 4 ++-- Mage.Sets/src/mage/cards/d/DomriRade.java | 2 +- Mage.Sets/src/mage/cards/d/DragonAppeasement.java | 2 +- Mage.Sets/src/mage/cards/d/DragonlordKolaghan.java | 2 +- Mage.Sets/src/mage/cards/d/DralnuLichLord.java | 2 +- Mage.Sets/src/mage/cards/d/Dread.java | 2 +- Mage.Sets/src/mage/cards/d/DreadSummons.java | 2 +- Mage.Sets/src/mage/cards/d/DreamPillager.java | 2 +- Mage.Sets/src/mage/cards/d/DroolingOgre.java | 2 +- Mage.Sets/src/mage/cards/d/DruidicSatchel.java | 6 +++--- Mage.Sets/src/mage/cards/d/DryadMilitant.java | 2 +- Mage.Sets/src/mage/cards/d/Duplicant.java | 2 +- Mage.Sets/src/mage/cards/e/EchoingCalm.java | 2 +- Mage.Sets/src/mage/cards/e/EchoingRuin.java | 2 +- Mage.Sets/src/mage/cards/e/Electropotence.java | 2 +- Mage.Sets/src/mage/cards/e/ElspethTirel.java | 2 +- Mage.Sets/src/mage/cards/e/EmperorCrocodile.java | 2 +- Mage.Sets/src/mage/cards/e/EncirclingFissure.java | 2 +- Mage.Sets/src/mage/cards/e/EndHostilities.java | 4 ++-- Mage.Sets/src/mage/cards/e/EnduringRenewal.java | 2 +- Mage.Sets/src/mage/cards/e/EnduringScalelord.java | 2 +- Mage.Sets/src/mage/cards/e/ErebossTitan.java | 2 +- Mage.Sets/src/mage/cards/e/ErraticExplosion.java | 2 +- Mage.Sets/src/mage/cards/e/ErraticMutation.java | 2 +- Mage.Sets/src/mage/cards/e/EssenceOfTheWild.java | 2 +- Mage.Sets/src/mage/cards/e/EtherswornCanonist.java | 4 ++-- Mage.Sets/src/mage/cards/e/ExplorersScope.java | 2 +- .../src/mage/cards/e/ExplosiveRevelation.java | 2 +- Mage.Sets/src/mage/cards/e/ExtraplanarLens.java | 2 +- Mage.Sets/src/mage/cards/e/EyeOfTheStorm.java | 2 +- Mage.Sets/src/mage/cards/f/FalkenrathNoble.java | 2 +- Mage.Sets/src/mage/cards/f/FathomTrawl.java | 2 +- Mage.Sets/src/mage/cards/f/FellShepherd.java | 2 +- Mage.Sets/src/mage/cards/f/FiendslayerPaladin.java | 4 ++-- Mage.Sets/src/mage/cards/f/FireServant.java | 2 +- .../src/mage/cards/f/FlayerOfTheHatebound.java | 2 +- Mage.Sets/src/mage/cards/f/FlayingTendrils.java | 2 +- Mage.Sets/src/mage/cards/f/FleshAllergy.java | 2 +- .../src/mage/cards/f/FlourishingDefenses.java | 2 +- Mage.Sets/src/mage/cards/f/FrontierSiege.java | 4 ++-- Mage.Sets/src/mage/cards/f/FrozenAether.java | 6 +++--- Mage.Sets/src/mage/cards/g/GaddockTeeg.java | 4 ++-- Mage.Sets/src/mage/cards/g/GaeasHerald.java | 2 +- Mage.Sets/src/mage/cards/g/Galvanoth.java | 2 +- Mage.Sets/src/mage/cards/g/GateToTheAether.java | 8 ++++---- Mage.Sets/src/mage/cards/g/GatherSpecimens.java | 2 +- Mage.Sets/src/mage/cards/g/GazeOfGranite.java | 2 +- Mage.Sets/src/mage/cards/g/GeneratorServant.java | 2 +- Mage.Sets/src/mage/cards/g/Geosurge.java | 2 +- .../src/mage/cards/g/GhastlyConscription.java | 2 +- .../src/mage/cards/g/GiftOfTheGargantuan.java | 4 ++-- Mage.Sets/src/mage/cards/g/GisaAndGeralf.java | 2 +- Mage.Sets/src/mage/cards/g/GladehartCavalry.java | 2 +- Mage.Sets/src/mage/cards/g/Gleancrawler.java | 2 +- Mage.Sets/src/mage/cards/g/GlissaTheTraitor.java | 2 +- Mage.Sets/src/mage/cards/g/Gloom.java | 2 +- Mage.Sets/src/mage/cards/g/Glowrider.java | 2 +- Mage.Sets/src/mage/cards/g/GnarlrootTrapper.java | 2 +- Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java | 2 +- Mage.Sets/src/mage/cards/g/GoblinGuide.java | 2 +- Mage.Sets/src/mage/cards/g/GoblinWelder.java | 4 ++-- Mage.Sets/src/mage/cards/g/GolemsHeart.java | 2 +- Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java | 2 +- Mage.Sets/src/mage/cards/g/GrafdiggersCage.java | 2 +- Mage.Sets/src/mage/cards/g/GrandAbolisher.java | 4 ++-- Mage.Sets/src/mage/cards/g/GrandArchitect.java | 2 +- Mage.Sets/src/mage/cards/g/GratuitousViolence.java | 2 +- Mage.Sets/src/mage/cards/g/GraveBetrayal.java | 2 +- Mage.Sets/src/mage/cards/g/GravePact.java | 2 +- Mage.Sets/src/mage/cards/g/GraveyardShovel.java | 2 +- Mage.Sets/src/mage/cards/g/GreatbowDoyen.java | 2 +- .../src/mage/cards/g/GrenzoDungeonWarden.java | 2 +- Mage.Sets/src/mage/cards/g/GridMonitor.java | 2 +- Mage.Sets/src/mage/cards/g/GrimContest.java | 2 +- Mage.Sets/src/mage/cards/g/GrimoireOfTheDead.java | 2 +- Mage.Sets/src/mage/cards/g/GruulRagebeast.java | 6 +++--- Mage.Sets/src/mage/cards/g/GuardianBeast.java | 4 ++-- Mage.Sets/src/mage/cards/g/GuardianOfTazeem.java | 2 +- Mage.Sets/src/mage/cards/g/GutterGrime.java | 2 +- Mage.Sets/src/mage/cards/h/HallOfGemstone.java | 2 +- .../src/mage/cards/h/HallOfTheBanditLord.java | 2 +- Mage.Sets/src/mage/cards/h/HallowedMoonlight.java | 2 +- Mage.Sets/src/mage/cards/h/HamletbackGoliath.java | 2 +- Mage.Sets/src/mage/cards/h/HandToHand.java | 2 +- Mage.Sets/src/mage/cards/h/HardenedScales.java | 2 +- Mage.Sets/src/mage/cards/h/HauntingWind.java | 2 +- .../src/mage/cards/h/HavenOfTheSpiritDragon.java | 6 +++--- .../src/mage/cards/h/HeartwoodStoryteller.java | 2 +- Mage.Sets/src/mage/cards/h/HedonistsTrove.java | 4 ++-- Mage.Sets/src/mage/cards/h/HelmOfObedience.java | 2 +- Mage.Sets/src/mage/cards/h/HiveMind.java | 4 ++-- Mage.Sets/src/mage/cards/h/HixusPrisonWarden.java | 2 +- Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java | 2 +- Mage.Sets/src/mage/cards/h/HorobiDeathsWail.java | 2 +- Mage.Sets/src/mage/cards/h/HowlOfTheHorde.java | 2 +- Mage.Sets/src/mage/cards/h/HumOfTheRadix.java | 2 +- Mage.Sets/src/mage/cards/h/HushwingGryff.java | 2 +- .../src/mage/cards/i/IkraShidiqiTheUsurper.java | 2 +- Mage.Sets/src/mage/cards/i/IllusionistsGambit.java | 2 +- Mage.Sets/src/mage/cards/i/ImposingSovereign.java | 2 +- .../src/mage/cards/i/ImprisonedInTheMoon.java | 2 +- Mage.Sets/src/mage/cards/i/ImpulsiveWager.java | 2 +- .../src/mage/cards/i/IndomitableCreativity.java | 4 ++-- Mage.Sets/src/mage/cards/i/InfernoTrap.java | 2 +- Mage.Sets/src/mage/cards/i/InfiniteReflection.java | 2 +- Mage.Sets/src/mage/cards/i/InkTreaderNephilim.java | 2 +- Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java | 4 ++-- Mage.Sets/src/mage/cards/i/Insist.java | 2 +- Mage.Sets/src/mage/cards/i/IntetTheDreamer.java | 2 +- Mage.Sets/src/mage/cards/i/InvokePrejudice.java | 2 +- Mage.Sets/src/mage/cards/i/IsolationCell.java | 2 +- Mage.Sets/src/mage/cards/j/JarOfEyeballs.java | 2 +- Mage.Sets/src/mage/cards/j/JeskaiInfiltrator.java | 2 +- Mage.Sets/src/mage/cards/j/Justice.java | 2 +- .../src/mage/cards/k/KalitasTraitorOfGhet.java | 4 ++-- .../src/mage/cards/k/KaradorGhostChieftain.java | 2 +- Mage.Sets/src/mage/cards/k/KarmicJustice.java | 2 +- Mage.Sets/src/mage/cards/k/KarnSilverGolem.java | 2 +- Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java | 2 +- .../src/mage/cards/k/KioraMasterOfTheDepths.java | 8 ++++---- .../src/mage/cards/k/KiraGreatGlassSpinner.java | 4 ++-- Mage.Sets/src/mage/cards/k/Kismet.java | 6 +++--- .../src/mage/cards/k/KurkeshOnakkeAncient.java | 2 +- Mage.Sets/src/mage/cards/l/LavaballTrap.java | 2 +- Mage.Sets/src/mage/cards/l/Legerdemain.java | 4 ++-- Mage.Sets/src/mage/cards/l/LeylineOfLifeforce.java | 2 +- Mage.Sets/src/mage/cards/l/LifeAndLimb.java | 4 ++-- Mage.Sets/src/mage/cards/l/LifecraftAwakening.java | 2 +- Mage.Sets/src/mage/cards/l/LilianaVess.java | 2 +- .../src/mage/cards/l/LimDulTheNecromancer.java | 2 +- .../src/mage/cards/l/LinvalaKeeperOfSilence.java | 2 +- Mage.Sets/src/mage/cards/l/LlanowarEmpath.java | 2 +- Mage.Sets/src/mage/cards/l/LodestoneGolem.java | 2 +- Mage.Sets/src/mage/cards/l/LoxodonGatekeeper.java | 6 +++--- Mage.Sets/src/mage/cards/l/LurkingPredators.java | 2 +- Mage.Sets/src/mage/cards/m/MadcapExperiment.java | 4 ++-- Mage.Sets/src/mage/cards/m/MagneticMine.java | 2 +- Mage.Sets/src/mage/cards/m/ManaWeb.java | 2 +- Mage.Sets/src/mage/cards/m/Manabond.java | 2 +- .../src/mage/cards/m/MarchesaTheBlackRose.java | 2 +- Mage.Sets/src/mage/cards/m/MartyrsBond.java | 2 +- Mage.Sets/src/mage/cards/m/MartyrsOfKorlis.java | 2 +- Mage.Sets/src/mage/cards/m/MassPolymorph.java | 2 +- Mage.Sets/src/mage/cards/m/MassacreWurm.java | 2 +- Mage.Sets/src/mage/cards/m/MasterBiomancer.java | 2 +- .../src/mage/cards/m/MasterOfPredicaments.java | 2 +- Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java | 4 ++-- .../src/mage/cards/m/MeliraSylvokOutcast.java | 2 +- Mage.Sets/src/mage/cards/m/Meltdown.java | 2 +- Mage.Sets/src/mage/cards/m/MetallicMimic.java | 2 +- Mage.Sets/src/mage/cards/m/MimicVat.java | 2 +- Mage.Sets/src/mage/cards/m/MindFuneral.java | 2 +- Mage.Sets/src/mage/cards/m/MindGrind.java | 2 +- Mage.Sets/src/mage/cards/m/MindsDilation.java | 2 +- Mage.Sets/src/mage/cards/m/Mirari.java | 2 +- .../src/mage/cards/m/MirkoVoskMindDrinker.java | 2 +- Mage.Sets/src/mage/cards/m/MirrorMatch.java | 2 +- Mage.Sets/src/mage/cards/m/MirrorwingDragon.java | 2 +- .../src/mage/cards/m/MishraArtificerProdigy.java | 2 +- Mage.Sets/src/mage/cards/m/MistmoonGriffin.java | 2 +- Mage.Sets/src/mage/cards/m/MolderBeast.java | 2 +- .../src/mage/cards/m/MomirVigSimicVisionary.java | 2 +- Mage.Sets/src/mage/cards/m/Moonhold.java | 2 +- Mage.Sets/src/mage/cards/m/MorticianBeetle.java | 2 +- Mage.Sets/src/mage/cards/m/MysticRemora.java | 2 +- .../src/mage/cards/n/NarsetEnlightenedMaster.java | 4 ++-- Mage.Sets/src/mage/cards/n/NarsetTranscendent.java | 6 +++--- Mage.Sets/src/mage/cards/n/NecroticOoze.java | 2 +- Mage.Sets/src/mage/cards/n/NetherShadow.java | 2 +- Mage.Sets/src/mage/cards/n/NetherTraitor.java | 2 +- Mage.Sets/src/mage/cards/n/NeurokFamiliar.java | 2 +- Mage.Sets/src/mage/cards/n/NightfallPredator.java | 2 +- Mage.Sets/src/mage/cards/n/NimDeathmantle.java | 2 +- Mage.Sets/src/mage/cards/n/NissaSageAnimist.java | 4 ++-- Mage.Sets/src/mage/cards/n/NissasRevelation.java | 2 +- .../src/mage/cards/n/NivixAerieOfTheFiremind.java | 2 +- Mage.Sets/src/mage/cards/n/NoMercy.java | 2 +- Mage.Sets/src/mage/cards/n/NoRestForTheWicked.java | 2 +- Mage.Sets/src/mage/cards/n/NoblePurpose.java | 2 +- Mage.Sets/src/mage/cards/n/NullRod.java | 2 +- Mage.Sets/src/mage/cards/o/OathOfChandra.java | 2 +- Mage.Sets/src/mage/cards/o/OathOfDruids.java | 2 +- Mage.Sets/src/mage/cards/o/OathOfGideon.java | 2 +- Mage.Sets/src/mage/cards/o/OathOfLiliana.java | 2 +- Mage.Sets/src/mage/cards/o/OathOfNissa.java | 2 +- Mage.Sets/src/mage/cards/o/OblivionStone.java | 2 +- Mage.Sets/src/mage/cards/o/OmenMachine.java | 2 +- Mage.Sets/src/mage/cards/o/OonasBlackguard.java | 2 +- Mage.Sets/src/mage/cards/o/Opalescence.java | 2 +- Mage.Sets/src/mage/cards/o/OpenSeason.java | 2 +- Mage.Sets/src/mage/cards/o/OpenTheVaults.java | 2 +- Mage.Sets/src/mage/cards/o/OranRiefHydra.java | 2 +- Mage.Sets/src/mage/cards/o/OrbsOfWarding.java | 2 +- Mage.Sets/src/mage/cards/o/Overmaster.java | 2 +- Mage.Sets/src/mage/cards/p/Panharmonicon.java | 4 ++-- Mage.Sets/src/mage/cards/p/PastInFlames.java | 6 +++--- Mage.Sets/src/mage/cards/p/PawnOfUlamog.java | 2 +- Mage.Sets/src/mage/cards/p/Peacekeeper.java | 2 +- Mage.Sets/src/mage/cards/p/PermafrostTrap.java | 2 +- Mage.Sets/src/mage/cards/p/PestilenceDemon.java | 2 +- Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java | 2 +- Mage.Sets/src/mage/cards/p/PhyrexianTotem.java | 2 +- Mage.Sets/src/mage/cards/p/Polymorph.java | 4 ++-- Mage.Sets/src/mage/cards/p/PossibilityStorm.java | 2 +- Mage.Sets/src/mage/cards/p/PowderKeg.java | 4 ++-- Mage.Sets/src/mage/cards/p/Powerleech.java | 2 +- Mage.Sets/src/mage/cards/p/PrecursorGolem.java | 2 +- Mage.Sets/src/mage/cards/p/PredatoryAdvantage.java | 2 +- .../src/mage/cards/p/PresenceOfTheMaster.java | 2 +- Mage.Sets/src/mage/cards/p/PriceOfGlory.java | 2 +- Mage.Sets/src/mage/cards/p/PrimalVigor.java | 2 +- Mage.Sets/src/mage/cards/p/PrimitiveEtchings.java | 2 +- Mage.Sets/src/mage/cards/p/ProfaneMemento.java | 2 +- Mage.Sets/src/mage/cards/p/ProperBurial.java | 2 +- Mage.Sets/src/mage/cards/p/ProteusStaff.java | 2 +- Mage.Sets/src/mage/cards/p/PsychicMiasma.java | 2 +- Mage.Sets/src/mage/cards/p/Pyramids.java | 2 +- .../src/mage/cards/p/PyromancerAscension.java | 4 ++-- .../src/mage/cards/p/PyromancersGauntlet.java | 6 +++--- Mage.Sets/src/mage/cards/p/PyromancersSwath.java | 2 +- Mage.Sets/src/mage/cards/p/PyrrhicRevival.java | 2 +- Mage.Sets/src/mage/cards/q/QuestForUlasTemple.java | 2 +- Mage.Sets/src/mage/cards/q/Quicken.java | 4 ++-- Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java | 2 +- Mage.Sets/src/mage/cards/r/RallyTheHorde.java | 2 +- .../src/mage/cards/r/RashmiEternitiesCrafter.java | 2 +- Mage.Sets/src/mage/cards/r/RatchetBomb.java | 2 +- Mage.Sets/src/mage/cards/r/RefractionTrap.java | 2 +- .../src/mage/cards/r/RenegadeDoppelganger.java | 2 +- .../src/mage/cards/r/RenownedWeaponsmith.java | 2 +- Mage.Sets/src/mage/cards/r/Revenge.java | 2 +- .../src/mage/cards/r/ReyhanLastOfTheAbzan.java | 2 +- .../src/mage/cards/r/RiptideShapeshifter.java | 2 +- Mage.Sets/src/mage/cards/r/RiseFall.java | 2 +- .../src/mage/cards/r/RiseOfTheDarkRealms.java | 2 +- Mage.Sets/src/mage/cards/r/RivalsDuel.java | 2 +- Mage.Sets/src/mage/cards/r/RoninWarclub.java | 2 +- Mage.Sets/src/mage/cards/r/RootMaze.java | 2 +- Mage.Sets/src/mage/cards/r/Rowen.java | 2 +- .../src/mage/cards/r/RuricTharTheUnbowed.java | 2 +- Mage.Sets/src/mage/cards/r/RuthlessDeathfang.java | 2 +- Mage.Sets/src/mage/cards/r/RuthlessInvasion.java | 2 +- Mage.Sets/src/mage/cards/s/SacredGround.java | 2 +- Mage.Sets/src/mage/cards/s/SageOfFables.java | 2 +- Mage.Sets/src/mage/cards/s/SagesOfTheAnima.java | 2 +- Mage.Sets/src/mage/cards/s/SagesReverie.java | 2 +- Mage.Sets/src/mage/cards/s/SanctumPrelate.java | 2 +- Mage.Sets/src/mage/cards/s/Sangromancer.java | 2 +- Mage.Sets/src/mage/cards/s/SaplingOfColfenor.java | 2 +- Mage.Sets/src/mage/cards/s/SatyrFiredancer.java | 2 +- Mage.Sets/src/mage/cards/s/SavaenElves.java | 2 +- Mage.Sets/src/mage/cards/s/SavageFirecat.java | 2 +- Mage.Sets/src/mage/cards/s/SavageSummoning.java | 6 +++--- .../src/mage/cards/s/SavraQueenOfTheGolgari.java | 4 ++-- Mage.Sets/src/mage/cards/s/ScabClanBerserker.java | 2 +- Mage.Sets/src/mage/cards/s/ScabClanGiant.java | 2 +- Mage.Sets/src/mage/cards/s/ScavengingOoze.java | 2 +- Mage.Sets/src/mage/cards/s/ScoutsWarning.java | 4 ++-- Mage.Sets/src/mage/cards/s/ScrapTrawler.java | 2 +- Mage.Sets/src/mage/cards/s/ScribNibblers.java | 2 +- .../src/mage/cards/s/ScytheOfTheWretched.java | 2 +- Mage.Sets/src/mage/cards/s/SecondSunrise.java | 4 ++-- .../src/mage/cards/s/SedrisTheTraitorKing.java | 2 +- Mage.Sets/src/mage/cards/s/SelvalasStampede.java | 2 +- Mage.Sets/src/mage/cards/s/SerumTank.java | 2 +- Mage.Sets/src/mage/cards/s/ShallowGrave.java | 2 +- .../src/mage/cards/s/ShamanOfForgottenWays.java | 2 +- Mage.Sets/src/mage/cards/s/ShapeAnew.java | 2 +- .../src/mage/cards/s/ShapeshiftersMarrow.java | 2 +- Mage.Sets/src/mage/cards/s/ShiningShoal.java | 2 +- .../src/mage/cards/s/ShireiShizosCaretaker.java | 2 +- Mage.Sets/src/mage/cards/s/SidisiBroodTyrant.java | 2 +- Mage.Sets/src/mage/cards/s/SilburlindSnapper.java | 2 +- Mage.Sets/src/mage/cards/s/SilverfurPartisan.java | 2 +- Mage.Sets/src/mage/cards/s/SirensCall.java | 2 +- Mage.Sets/src/mage/cards/s/SkillBorrower.java | 2 +- .../src/mage/cards/s/SmotheringAbomination.java | 2 +- Mage.Sets/src/mage/cards/s/SnapcasterMage.java | 2 +- Mage.Sets/src/mage/cards/s/SoldeviMachinist.java | 2 +- Mage.Sets/src/mage/cards/s/SoulSnare.java | 2 +- Mage.Sets/src/mage/cards/s/Soulflayer.java | 2 +- Mage.Sets/src/mage/cards/s/Spellshift.java | 4 ++-- Mage.Sets/src/mage/cards/s/SphinxAmbassador.java | 2 +- Mage.Sets/src/mage/cards/s/SphinxsTutelage.java | 4 ++-- Mage.Sets/src/mage/cards/s/SpitefulReturned.java | 2 +- Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java | 2 +- Mage.Sets/src/mage/cards/s/Starfall.java | 2 +- Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java | 2 +- Mage.Sets/src/mage/cards/s/SteelGolem.java | 2 +- Mage.Sets/src/mage/cards/s/StolenGoods.java | 2 +- Mage.Sets/src/mage/cards/s/StonySilence.java | 2 +- Mage.Sets/src/mage/cards/s/StrongholdGambit.java | 4 ++-- Mage.Sets/src/mage/cards/s/SummonersEgg.java | 2 +- Mage.Sets/src/mage/cards/s/SummoningTrap.java | 2 +- Mage.Sets/src/mage/cards/s/SuturePriest.java | 2 +- .../src/mage/cards/s/SydriGalvanicGenius.java | 2 +- Mage.Sets/src/mage/cards/s/SynodCenturion.java | 2 +- Mage.Sets/src/mage/cards/s/SyntheticDestiny.java | 2 +- Mage.Sets/src/mage/cards/t/Tamanoa.java | 2 +- Mage.Sets/src/mage/cards/t/TapestryOfTheAges.java | 2 +- .../src/mage/cards/t/TeferiMageOfZhalfir.java | 10 +++++----- Mage.Sets/src/mage/cards/t/TeferisMoat.java | 2 +- Mage.Sets/src/mage/cards/t/TeleminPerformance.java | 2 +- Mage.Sets/src/mage/cards/t/TemurWarShaman.java | 4 ++-- Mage.Sets/src/mage/cards/t/Tetravus.java | 2 +- Mage.Sets/src/mage/cards/t/TeysaEnvoyOfGhosts.java | 2 +- Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java | 4 ++-- .../src/mage/cards/t/ThaliaGuardianOfThraben.java | 2 +- .../src/mage/cards/t/ThaliaHereticCathar.java | 4 ++-- Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java | 2 +- Mage.Sets/src/mage/cards/t/ThousandYearElixir.java | 2 +- Mage.Sets/src/mage/cards/t/ThrasiosTritonHero.java | 2 +- Mage.Sets/src/mage/cards/t/Thraximundar.java | 2 +- Mage.Sets/src/mage/cards/t/TorporOrb.java | 2 +- Mage.Sets/src/mage/cards/t/TouchOfMoonglove.java | 2 +- Mage.Sets/src/mage/cards/t/TrackersInstincts.java | 2 +- Mage.Sets/src/mage/cards/t/TreasureHunt.java | 2 +- Mage.Sets/src/mage/cards/t/TreasureKeeper.java | 2 +- Mage.Sets/src/mage/cards/t/TrepanationBlade.java | 2 +- .../src/mage/cards/t/TrostaniSelesnyasVoice.java | 2 +- Mage.Sets/src/mage/cards/t/TsabosWeb.java | 2 +- Mage.Sets/src/mage/cards/t/TunnelIgnus.java | 4 ++-- Mage.Sets/src/mage/cards/t/TyrantOfDiscord.java | 2 +- Mage.Sets/src/mage/cards/u/UncleIstvan.java | 2 +- Mage.Sets/src/mage/cards/u/UndeadAlchemist.java | 2 +- Mage.Sets/src/mage/cards/u/UndercityInformer.java | 2 +- Mage.Sets/src/mage/cards/u/UndyingFlames.java | 2 +- Mage.Sets/src/mage/cards/u/UnexpectedResults.java | 2 +- .../src/mage/cards/u/UnscytheKillerOfKings.java | 2 +- Mage.Sets/src/mage/cards/u/UrabraskTheHidden.java | 2 +- Mage.Sets/src/mage/cards/u/UrborgJustice.java | 2 +- Mage.Sets/src/mage/cards/u/UrzasChalice.java | 2 +- .../src/mage/cards/v/ValakutTheMoltenPinnacle.java | 2 +- .../src/mage/cards/v/VarolzTheScarStriped.java | 2 +- Mage.Sets/src/mage/cards/v/VedalkenEngineer.java | 2 +- Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java | 2 +- Mage.Sets/src/mage/cards/v/VengefulRebirth.java | 2 +- Mage.Sets/src/mage/cards/v/Vengevine.java | 2 +- Mage.Sets/src/mage/cards/v/VigilForTheLost.java | 2 +- Mage.Sets/src/mage/cards/v/VileRedeemer.java | 2 +- Mage.Sets/src/mage/cards/v/VillageCannibals.java | 2 +- Mage.Sets/src/mage/cards/v/ViridianRevel.java | 2 +- Mage.Sets/src/mage/cards/v/Void.java | 2 +- .../src/mage/cards/v/VolrathsShapeshifter.java | 2 +- .../src/mage/cards/v/VorinclexVoiceOfHunger.java | 2 +- Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java | 2 +- Mage.Sets/src/mage/cards/v/VrynWingmare.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfPutridFlesh.java | 4 ++-- Mage.Sets/src/mage/cards/w/WandOfDenial.java | 2 +- Mage.Sets/src/mage/cards/w/WardOfBones.java | 8 ++++---- Mage.Sets/src/mage/cards/w/WarpWorld.java | 8 ++++---- Mage.Sets/src/mage/cards/w/WarstormSurge.java | 2 +- Mage.Sets/src/mage/cards/w/WasteNot.java | 6 +++--- Mage.Sets/src/mage/cards/w/WaveOfVitriol.java | 2 +- Mage.Sets/src/mage/cards/w/WharfInfiltrator.java | 2 +- Mage.Sets/src/mage/cards/w/WhiplashTrap.java | 2 +- Mage.Sets/src/mage/cards/w/WildDefiance.java | 4 ++-- Mage.Sets/src/mage/cards/w/WildEvocation.java | 2 +- Mage.Sets/src/mage/cards/w/Willbreaker.java | 2 +- Mage.Sets/src/mage/cards/w/WindingConstrictor.java | 2 +- Mage.Sets/src/mage/cards/w/WookieeMystic.java | 2 +- Mage.Sets/src/mage/cards/w/WorldAtWar.java | 2 +- Mage.Sets/src/mage/cards/w/WrenchMind.java | 2 +- Mage.Sets/src/mage/cards/z/ZadaHedronGrinder.java | 2 +- Mage.Sets/src/mage/cards/z/ZameckGuildmage.java | 2 +- Mage.Sets/src/mage/cards/z/ZoZuThePunisher.java | 2 +- Mage.Sets/src/mage/cards/z/Zoologist.java | 2 +- .../test/cards/abilities/keywords/DiscardTest.java | 14 +++++++++++++- Mage/src/main/java/mage/MageObjectImpl.java | 14 +++++++------- 466 files changed, 581 insertions(+), 570 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AAT1.java b/Mage.Sets/src/mage/cards/a/AAT1.java index 03305f5c72..77ccc46c2d 100644 --- a/Mage.Sets/src/mage/cards/a/AAT1.java +++ b/Mage.Sets/src/mage/cards/a/AAT1.java @@ -101,7 +101,7 @@ class AAT1TriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Card card = game.getCard(event.getTargetId()); if (event.getPlayerId().equals(game.getControllerId(sourceId)) - && card.getCardType().contains(CardType.CREATURE) + && card.isCreature() && game.getState().getZone(card.getId()) == Zone.GRAVEYARD && event.getData().equals("repair")) { return true; diff --git a/Mage.Sets/src/mage/cards/a/AberrantResearcher.java b/Mage.Sets/src/mage/cards/a/AberrantResearcher.java index 71c109b93f..751f658b1e 100644 --- a/Mage.Sets/src/mage/cards/a/AberrantResearcher.java +++ b/Mage.Sets/src/mage/cards/a/AberrantResearcher.java @@ -97,7 +97,7 @@ class AberrantResearcherEffect extends OneShotEffect { if (controller != null && controller.getLibrary().size() > 0) { Card card = controller.getLibrary().getFromTop(game); controller.moveCards(card, Zone.GRAVEYARD, source, game); - if (card.getCardType().contains(CardType.INSTANT) || card.getCardType().contains(CardType.SORCERY)) { + if (card.isInstant() || card.isSorcery()) { new TransformSourceEffect(true).apply(game, source); } return true; diff --git a/Mage.Sets/src/mage/cards/a/Abeyance.java b/Mage.Sets/src/mage/cards/a/Abeyance.java index 2c71dca48b..1ef21f26fd 100644 --- a/Mage.Sets/src/mage/cards/a/Abeyance.java +++ b/Mage.Sets/src/mage/cards/a/Abeyance.java @@ -104,7 +104,7 @@ class AbeyanceEffect extends ContinuousRuleModifyingEffectImpl { if (event.getPlayerId().equals(source.getFirstTarget())) { MageObject object = game.getObject(event.getSourceId()); if (event.getType() == GameEvent.EventType.CAST_SPELL) { - if (object.getCardType().contains(CardType.INSTANT) || object.getCardType().contains(CardType.SORCERY)) { + if (object.isInstant() || object.isSorcery()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/a/AetherCharge.java b/Mage.Sets/src/mage/cards/a/AetherCharge.java index 80d9aa7997..d6bd632738 100644 --- a/Mage.Sets/src/mage/cards/a/AetherCharge.java +++ b/Mage.Sets/src/mage/cards/a/AetherCharge.java @@ -95,7 +95,7 @@ class AetherChargeTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.getCardType().contains(CardType.CREATURE) && permanent.getSubtype(game).contains("Beast") + if (permanent.isCreature() && permanent.getSubtype(game).contains("Beast") && permanent.getControllerId().equals(this.controllerId)) { Effect effect = this.getEffects().get(0); effect.setValue("damageSource", event.getTargetId()); diff --git a/Mage.Sets/src/mage/cards/a/AetherRift.java b/Mage.Sets/src/mage/cards/a/AetherRift.java index 024b89bed0..fb20db061b 100644 --- a/Mage.Sets/src/mage/cards/a/AetherRift.java +++ b/Mage.Sets/src/mage/cards/a/AetherRift.java @@ -91,7 +91,7 @@ class AetherRiftEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.discardOne(true, source, game); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { Effect returnEffect = new ReturnFromGraveyardToBattlefieldTargetEffect(); returnEffect.setTargetPointer(new FixedTarget(card.getId())); Effect doEffect = new DoUnlessAnyPlayerPaysEffect(returnEffect, new PayLifeCost(5), diff --git a/Mage.Sets/src/mage/cards/a/AetherSting.java b/Mage.Sets/src/mage/cards/a/AetherSting.java index 440bd72b04..3cbd546463 100644 --- a/Mage.Sets/src/mage/cards/a/AetherSting.java +++ b/Mage.Sets/src/mage/cards/a/AetherSting.java @@ -88,7 +88,7 @@ class AetherStingTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (game.getOpponents(controllerId).contains(event.getPlayerId())) { Card card = game.getCard(event.getSourceId()); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); return true; } diff --git a/Mage.Sets/src/mage/cards/a/AkoumFirebird.java b/Mage.Sets/src/mage/cards/a/AkoumFirebird.java index 956f624d6b..c83da7219f 100644 --- a/Mage.Sets/src/mage/cards/a/AkoumFirebird.java +++ b/Mage.Sets/src/mage/cards/a/AkoumFirebird.java @@ -104,7 +104,7 @@ class AkoumFirebirdLandfallAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - return permanent != null && permanent.getCardType().contains(CardType.LAND) && permanent.getControllerId().equals(this.controllerId); + return permanent != null && permanent.isLand() && permanent.getControllerId().equals(this.controllerId); } @Override diff --git a/Mage.Sets/src/mage/cards/a/AkoumHellkite.java b/Mage.Sets/src/mage/cards/a/AkoumHellkite.java index da5f8187d6..26748d7c27 100644 --- a/Mage.Sets/src/mage/cards/a/AkoumHellkite.java +++ b/Mage.Sets/src/mage/cards/a/AkoumHellkite.java @@ -105,7 +105,7 @@ class AkoumHellkiteTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); if (permanent != null - && permanent.getCardType().contains(CardType.LAND) + && permanent.isLand() && permanent.getControllerId().equals(getControllerId())) { Permanent sourcePermanent = game.getPermanent(getSourceId()); if (sourcePermanent != null) diff --git a/Mage.Sets/src/mage/cards/a/Aluren.java b/Mage.Sets/src/mage/cards/a/Aluren.java index 50ad1f9576..b312b2b2e6 100644 --- a/Mage.Sets/src/mage/cards/a/Aluren.java +++ b/Mage.Sets/src/mage/cards/a/Aluren.java @@ -168,7 +168,7 @@ class AlurenRuleEffect extends ContinuousEffectImpl { // Card sourceCard = game.getCard(abilityToModify.getSourceId()); // StackObject stackObject = game.getStack().getStackObject(abilityToModify.getSourceId()); // if (stackObject != null && stackObject instanceof Spell) { -// if (sourceCard != null && sourceCard.getCardType().contains(CardType.CREATURE) && sourceCard.getConvertedManaCost() <= 3) { +// if (sourceCard != null && sourceCard.isCreature() && sourceCard.getConvertedManaCost() <= 3) { // Player player = game.getPlayer(stackObject.getControllerId()); // String message = "Cast " + sourceCard.getName() + " without paying its mana costs?"; // if (player != null && diff --git a/Mage.Sets/src/mage/cards/a/AmbuscadeShaman.java b/Mage.Sets/src/mage/cards/a/AmbuscadeShaman.java index ff35df2d5b..cfa80d4e85 100644 --- a/Mage.Sets/src/mage/cards/a/AmbuscadeShaman.java +++ b/Mage.Sets/src/mage/cards/a/AmbuscadeShaman.java @@ -101,7 +101,7 @@ class AmbuscadeShamanTriggeredAbility extends TriggeredAbilityImpl { UUID targetId = event.getTargetId(); Permanent permanent = game.getPermanent(targetId); if (permanent.getControllerId().equals(this.controllerId) - && permanent.getCardType().contains(CardType.CREATURE)) { + && permanent.isCreature()) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } diff --git a/Mage.Sets/src/mage/cards/a/Amnesia.java b/Mage.Sets/src/mage/cards/a/Amnesia.java index 0162394c4d..70e53153fd 100644 --- a/Mage.Sets/src/mage/cards/a/Amnesia.java +++ b/Mage.Sets/src/mage/cards/a/Amnesia.java @@ -89,7 +89,7 @@ class AmnesiaEffect extends OneShotEffect { player.revealCards("Amnesia", hand, game); Set cards = hand.getCards(game); for (Card card : cards) { - if (card != null && !card.getCardType().contains(CardType.LAND)) { + if (card != null && !card.isLand()) { player.discard(card, source, game); } } diff --git a/Mage.Sets/src/mage/cards/a/AnafenzaTheForemost.java b/Mage.Sets/src/mage/cards/a/AnafenzaTheForemost.java index 5a3e649b6d..a34cdf61fb 100644 --- a/Mage.Sets/src/mage/cards/a/AnafenzaTheForemost.java +++ b/Mage.Sets/src/mage/cards/a/AnafenzaTheForemost.java @@ -145,10 +145,10 @@ class AnafenzaTheForemostEffect extends ReplacementEffectImpl { Card card = game.getCard(event.getTargetId()); if (card != null && game.getOpponents(source.getControllerId()).contains(card.getOwnerId())) { // Anafenza only cares about cards if (zEvent.getTarget() != null) { // if it comes from permanent, check if it was a creature on the battlefield - if (zEvent.getTarget().getCardType().contains(CardType.CREATURE)) { + if (zEvent.getTarget().isCreature()) { return true; } - } else if (card.getCardType().contains(CardType.CREATURE)) { + } else if (card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/a/AngelicChorus.java b/Mage.Sets/src/mage/cards/a/AngelicChorus.java index 07c06e0817..945844c7cf 100644 --- a/Mage.Sets/src/mage/cards/a/AngelicChorus.java +++ b/Mage.Sets/src/mage/cards/a/AngelicChorus.java @@ -83,7 +83,7 @@ class AngelicChorusTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.getCardType().contains(CardType.CREATURE) + if (permanent.isCreature() && permanent.getControllerId().equals(this.controllerId)) { this.getEffects().get(0).setValue("lifeSource", event.getTargetId()); return true; diff --git a/Mage.Sets/src/mage/cards/a/AnimarSoulOfElements.java b/Mage.Sets/src/mage/cards/a/AnimarSoulOfElements.java index b93ef3c5ac..761c7e064e 100644 --- a/Mage.Sets/src/mage/cards/a/AnimarSoulOfElements.java +++ b/Mage.Sets/src/mage/cards/a/AnimarSoulOfElements.java @@ -116,7 +116,7 @@ class AnimarCostReductionEffect extends CostModificationEffectImpl { public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { Card sourceCard = game.getCard(abilityToModify.getSourceId()); - if (sourceCard != null && abilityToModify.getControllerId().equals(source.getControllerId()) && (sourceCard.getCardType().contains(CardType.CREATURE))) { + if (sourceCard != null && abilityToModify.getControllerId().equals(source.getControllerId()) && (sourceCard.isCreature())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/a/AnimateArtifact.java b/Mage.Sets/src/mage/cards/a/AnimateArtifact.java index 166d07355c..8f50b30215 100644 --- a/Mage.Sets/src/mage/cards/a/AnimateArtifact.java +++ b/Mage.Sets/src/mage/cards/a/AnimateArtifact.java @@ -109,7 +109,7 @@ class AnimateArtifactContinuousEffect extends ContinuousEffectImpl { Permanent enchantment = game.getPermanent(source.getSourceId()); if (enchantment != null) { Permanent permanent = game.getPermanent(enchantment.getAttachedTo()); - if (permanent != null && !permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && !permanent.isCreature()) { if (sublayer == SubLayer.NA) { permanent.getCardType().add(CardType.CREATURE); permanent.getPower().setValue(permanent.getConvertedManaCost()); diff --git a/Mage.Sets/src/mage/cards/a/AnkhOfMishra.java b/Mage.Sets/src/mage/cards/a/AnkhOfMishra.java index d64667897f..38272e1e8e 100644 --- a/Mage.Sets/src/mage/cards/a/AnkhOfMishra.java +++ b/Mage.Sets/src/mage/cards/a/AnkhOfMishra.java @@ -90,7 +90,7 @@ class AnkhOfMishraAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND)) { + if (permanent != null && permanent.isLand()) { Player player = game.getPlayer(permanent.getControllerId()); if (player != null) { for (Effect effect : this.getEffects()) { diff --git a/Mage.Sets/src/mage/cards/a/ArcaneMelee.java b/Mage.Sets/src/mage/cards/a/ArcaneMelee.java index ecb1498908..ff570c21f1 100644 --- a/Mage.Sets/src/mage/cards/a/ArcaneMelee.java +++ b/Mage.Sets/src/mage/cards/a/ArcaneMelee.java @@ -42,13 +42,12 @@ import mage.util.CardUtil; import java.util.UUID; /** - * * @author noxx */ public class ArcaneMelee extends CardImpl { public ArcaneMelee(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}"); // Instant and sorcery spells cost {2} less to cast. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ArcaneMeleeCostReductionEffect())); @@ -66,7 +65,7 @@ public class ArcaneMelee extends CardImpl { class ArcaneMeleeCostReductionEffect extends CostModificationEffectImpl { - ArcaneMeleeCostReductionEffect ( ) { + ArcaneMeleeCostReductionEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); staticText = "Instant and sorcery spells cost {2} less to cast"; } @@ -84,9 +83,9 @@ class ArcaneMeleeCostReductionEffect extends CostModificationEffectImpl { @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { - if ( abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { - Card sourceCard = game.getCard(((SpellAbility)abilityToModify).getSourceId()); - if ( sourceCard != null && (sourceCard.getCardType().contains(CardType.INSTANT) || sourceCard.getCardType().contains(CardType.SORCERY))) { + if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { + Card sourceCard = game.getCard((abilityToModify).getSourceId()); + if (sourceCard != null && (sourceCard.isInstant() || sourceCard.isSorcery())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/a/ArchonOfRedemption.java b/Mage.Sets/src/mage/cards/a/ArchonOfRedemption.java index aa7fd5d748..748d488698 100644 --- a/Mage.Sets/src/mage/cards/a/ArchonOfRedemption.java +++ b/Mage.Sets/src/mage/cards/a/ArchonOfRedemption.java @@ -97,7 +97,7 @@ class ArchonOfRedemptionTriggeredAbility extends TriggeredAbilityImpl { UUID targetId = event.getTargetId(); Permanent permanent = game.getPermanent(targetId); if (permanent.getControllerId().equals(this.controllerId) - && permanent.getCardType().contains(CardType.CREATURE) + && permanent.isCreature() && (targetId.equals(this.getSourceId()) || (permanent.getAbilities().contains(FlyingAbility.getInstance()) && !targetId.equals(this.getSourceId())))) { for (Effect effect : this.getEffects()) { diff --git a/Mage.Sets/src/mage/cards/a/ArtificersHex.java b/Mage.Sets/src/mage/cards/a/ArtificersHex.java index a0f0b05b29..aab8f7d0d0 100644 --- a/Mage.Sets/src/mage/cards/a/ArtificersHex.java +++ b/Mage.Sets/src/mage/cards/a/ArtificersHex.java @@ -107,7 +107,7 @@ class ArtificersHexEffect extends OneShotEffect { Permanent equipment = game.getPermanent(enchantment.getAttachedTo()); if (equipment != null && equipment.getAttachedTo() != null) { Permanent creature = game.getPermanent(equipment.getAttachedTo()); - if (creature != null && creature.getCardType().contains(CardType.CREATURE)) { + if (creature != null && creature.isCreature()) { return creature.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/a/AshesOfTheFallen.java b/Mage.Sets/src/mage/cards/a/AshesOfTheFallen.java index edffa32f16..e848f607cc 100644 --- a/Mage.Sets/src/mage/cards/a/AshesOfTheFallen.java +++ b/Mage.Sets/src/mage/cards/a/AshesOfTheFallen.java @@ -91,7 +91,7 @@ class AshesOfTheFallenEffect extends ContinuousEffectImpl { String subtype = (String) game.getState().getValue(permanent.getId() + "_type"); for (UUID cardId : controller.getGraveyard()) { Card card = game.getCard(cardId); - if (card != null && card.getCardType().contains(CardType.CREATURE) && !card.getSubtype(game).contains(subtype)) { + if (card != null && card.isCreature() && !card.getSubtype(game).contains(subtype)) { game.getState().getCreateCardAttribute(card).getSubtype().add(subtype); } } diff --git a/Mage.Sets/src/mage/cards/a/AsmiraHolyAvenger.java b/Mage.Sets/src/mage/cards/a/AsmiraHolyAvenger.java index 77f466b42e..52d9813f25 100644 --- a/Mage.Sets/src/mage/cards/a/AsmiraHolyAvenger.java +++ b/Mage.Sets/src/mage/cards/a/AsmiraHolyAvenger.java @@ -28,6 +28,7 @@ package mage.cards.a; import java.util.UUID; + import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; @@ -50,13 +51,12 @@ import mage.game.events.ZoneChangeEvent; import mage.watchers.Watcher; /** - * * @author Plopman */ public class AsmiraHolyAvenger extends CardImpl { public AsmiraHolyAvenger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{W}"); this.supertype.add("Legendary"); this.subtype.add("Human"); this.subtype.add("Cleric"); @@ -108,7 +108,7 @@ class AsmiraHolyAvengerWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) { MageObject card = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (card != null && ((Card)card).getOwnerId().equals(this.controllerId) && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && ((Card) card).getOwnerId().equals(this.controllerId) && card.isCreature()) { creaturesCount++; } } diff --git a/Mage.Sets/src/mage/cards/a/AuraBarbs.java b/Mage.Sets/src/mage/cards/a/AuraBarbs.java index 926627ccdd..e821f9e69a 100644 --- a/Mage.Sets/src/mage/cards/a/AuraBarbs.java +++ b/Mage.Sets/src/mage/cards/a/AuraBarbs.java @@ -95,7 +95,7 @@ public class AuraBarbs extends CardImpl { for (Permanent auraEnchantment : game.getBattlefield().getActivePermanents(filterEnchantments, source.getControllerId(), source.getSourceId(), game)) { if (auraEnchantment.getAttachedTo() != null) { Permanent attachedToCreature = game.getPermanent(auraEnchantment.getAttachedTo()); - if (attachedToCreature != null && attachedToCreature.getCardType().contains(CardType.CREATURE)) { + if (attachedToCreature != null && attachedToCreature.isCreature()) { attachedToCreature.damage(2, auraEnchantment.getId(), game, false, true); game.informPlayers("2 damage assigned to " + attachedToCreature.getName() + " from " + auraEnchantment.getName()); } diff --git a/Mage.Sets/src/mage/cards/a/AuraOfSilence.java b/Mage.Sets/src/mage/cards/a/AuraOfSilence.java index 2930578409..63ba280baf 100644 --- a/Mage.Sets/src/mage/cards/a/AuraOfSilence.java +++ b/Mage.Sets/src/mage/cards/a/AuraOfSilence.java @@ -98,7 +98,7 @@ class AuraOfSilenceCostModificationEffect extends CostModificationEffectImpl { if (abilityToModify instanceof SpellAbility) { if (game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId())) { Card card = game.getCard(abilityToModify.getSourceId()); - if (card != null && (card.getCardType().contains(CardType.ARTIFACT) || card.getCardType().contains(CardType.ENCHANTMENT))) { + if (card != null && (card.isArtifact() || card.isEnchantment())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/a/AureliasFury.java b/Mage.Sets/src/mage/cards/a/AureliasFury.java index 29ee0ae014..04b8f22ab5 100644 --- a/Mage.Sets/src/mage/cards/a/AureliasFury.java +++ b/Mage.Sets/src/mage/cards/a/AureliasFury.java @@ -184,7 +184,7 @@ class AureliasFuryCantCastEffect extends ContinuousRuleModifyingEffectImpl { Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); if (player != null && player.getId().equals(event.getPlayerId())) { Card card = game.getCard(event.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.CREATURE)) { + if (card != null && !card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/a/Aurification.java b/Mage.Sets/src/mage/cards/a/Aurification.java index e5f4ad33ce..7d90500220 100644 --- a/Mage.Sets/src/mage/cards/a/Aurification.java +++ b/Mage.Sets/src/mage/cards/a/Aurification.java @@ -122,7 +122,7 @@ public class Aurification extends CardImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { Permanent permanent = game.getPermanent(event.getSourceId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getSourceId())); } diff --git a/Mage.Sets/src/mage/cards/a/AuthorityOfTheConsuls.java b/Mage.Sets/src/mage/cards/a/AuthorityOfTheConsuls.java index e6c6ad3014..ccd9f1f103 100644 --- a/Mage.Sets/src/mage/cards/a/AuthorityOfTheConsuls.java +++ b/Mage.Sets/src/mage/cards/a/AuthorityOfTheConsuls.java @@ -109,7 +109,7 @@ class AuthorityOfTheConsulsTapEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/b/BalothCageTrap.java b/Mage.Sets/src/mage/cards/b/BalothCageTrap.java index a5f570f773..6486573989 100644 --- a/Mage.Sets/src/mage/cards/b/BalothCageTrap.java +++ b/Mage.Sets/src/mage/cards/b/BalothCageTrap.java @@ -85,7 +85,7 @@ class BalothCageTrapCondition implements Condition { List permanents = watcher.getThisTurnEnteringPermanents(opponentId); if (permanents != null) { for (Permanent permanent : permanents) { - if (permanent.getCardType().contains(CardType.ARTIFACT)) { + if (permanent.isArtifact()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/b/BalustradeSpy.java b/Mage.Sets/src/mage/cards/b/BalustradeSpy.java index 50019fb696..24b0aa60a0 100644 --- a/Mage.Sets/src/mage/cards/b/BalustradeSpy.java +++ b/Mage.Sets/src/mage/cards/b/BalustradeSpy.java @@ -107,7 +107,7 @@ class BalustradeSpyEffect extends OneShotEffect { Card card = controller.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { landFound = true; } } diff --git a/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java b/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java index f1049eef3e..d2d8c80040 100644 --- a/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java +++ b/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java @@ -107,7 +107,7 @@ class BattlefieldThaumaturgeSpellsCostReductionEffect extends CostModificationEf for (Target target: abilityToModify.getTargets()) { for (UUID uuid: target.getTargets()) { Permanent permanent = game.getPermanent(uuid); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { creaturesTargeted.add(permanent.getId()); } } diff --git a/Mage.Sets/src/mage/cards/b/Bedlam.java b/Mage.Sets/src/mage/cards/b/Bedlam.java index 8dbdba0a47..2d7e9025c8 100644 --- a/Mage.Sets/src/mage/cards/b/Bedlam.java +++ b/Mage.Sets/src/mage/cards/b/Bedlam.java @@ -78,7 +78,7 @@ class BedlamEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - if (permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent.isCreature()) { return true; } return false; diff --git a/Mage.Sets/src/mage/cards/b/Bereavement.java b/Mage.Sets/src/mage/cards/b/Bereavement.java index 54baef3fcb..b1a25c167e 100644 --- a/Mage.Sets/src/mage/cards/b/Bereavement.java +++ b/Mage.Sets/src/mage/cards/b/Bereavement.java @@ -89,7 +89,7 @@ class BereavementTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (((ZoneChangeEvent)event).isDiesEvent()) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) && permanent.getColor(game).isGreen()) { + if (permanent != null && permanent.isCreature() && permanent.getColor(game).isGreen()) { this.getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getControllerId())); return true; } diff --git a/Mage.Sets/src/mage/cards/b/BlackSunsZenith.java b/Mage.Sets/src/mage/cards/b/BlackSunsZenith.java index 4208641b3a..1e41703544 100644 --- a/Mage.Sets/src/mage/cards/b/BlackSunsZenith.java +++ b/Mage.Sets/src/mage/cards/b/BlackSunsZenith.java @@ -80,7 +80,7 @@ class BlackSunsZenithEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int amount = source.getManaCostsToPay().getX(); for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) { - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { permanent.addCounters(CounterType.M1M1.createInstance(amount), source, game); } } diff --git a/Mage.Sets/src/mage/cards/b/BladeOfTheBloodchief.java b/Mage.Sets/src/mage/cards/b/BladeOfTheBloodchief.java index 8d0d3b2498..1773c64085 100644 --- a/Mage.Sets/src/mage/cards/b/BladeOfTheBloodchief.java +++ b/Mage.Sets/src/mage/cards/b/BladeOfTheBloodchief.java @@ -92,7 +92,7 @@ class BladeOfTheBloodChiefTriggeredAbility extends TriggeredAbilityImpl { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) { Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (p != null && p.getCardType().contains(CardType.CREATURE)) { + if (p != null && p.isCreature()) { Permanent enchantment = game.getPermanent(getSourceId()); if (enchantment != null && enchantment.getAttachedTo() != null) { return true; diff --git a/Mage.Sets/src/mage/cards/b/BlazeCommando.java b/Mage.Sets/src/mage/cards/b/BlazeCommando.java index 3dbe026721..2fb26e9b1d 100644 --- a/Mage.Sets/src/mage/cards/b/BlazeCommando.java +++ b/Mage.Sets/src/mage/cards/b/BlazeCommando.java @@ -117,7 +117,7 @@ class BlazeCommandoTriggeredAbility extends TriggeredAbilityImpl { if (getControllerId().equals(game.getControllerId(event.getSourceId()))) { MageObject damageSource = game.getObject(event.getSourceId()); if (damageSource != null) { - if (damageSource.getCardType().contains(CardType.INSTANT) || damageSource.getCardType().contains(CardType.SORCERY)) { + if (damageSource.isInstant()|| damageSource.isSorcery()) { if (!handledStackObjects.contains(damageSource.getId())) { handledStackObjects.add(damageSource.getId()); return true; diff --git a/Mage.Sets/src/mage/cards/b/BlessedReincarnation.java b/Mage.Sets/src/mage/cards/b/BlessedReincarnation.java index 71f68f65af..db157f7944 100644 --- a/Mage.Sets/src/mage/cards/b/BlessedReincarnation.java +++ b/Mage.Sets/src/mage/cards/b/BlessedReincarnation.java @@ -118,12 +118,12 @@ class BlessedReincarnationEffect extends OneShotEffect { Cards cards = new CardsImpl(); Card card = library.removeFromTop(game); cards.add(card); - while (!card.getCardType().contains(CardType.CREATURE) && library.size() > 0) { + while (!card.isCreature() && library.size() > 0) { card = library.removeFromTop(game); cards.add(card); } - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId()); } diff --git a/Mage.Sets/src/mage/cards/b/BlindObedience.java b/Mage.Sets/src/mage/cards/b/BlindObedience.java index 3fc9c6ada6..ee2b8547c3 100644 --- a/Mage.Sets/src/mage/cards/b/BlindObedience.java +++ b/Mage.Sets/src/mage/cards/b/BlindObedience.java @@ -99,7 +99,7 @@ class BlindObedienceTapEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - if (permanent != null && (permanent.getCardType().contains(CardType.CREATURE) || permanent.getCardType().contains(CardType.ARTIFACT))) { + if (permanent != null && (permanent.isCreature() || permanent.isArtifact())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/b/BloodSeeker.java b/Mage.Sets/src/mage/cards/b/BloodSeeker.java index 6505034455..03b76a2662 100644 --- a/Mage.Sets/src/mage/cards/b/BloodSeeker.java +++ b/Mage.Sets/src/mage/cards/b/BloodSeeker.java @@ -96,7 +96,7 @@ class BloodSeekerTriggeredAbility extends TriggeredAbilityImpl { if (game.getOpponents(this.controllerId).contains(event.getPlayerId())) { EntersTheBattlefieldEvent zEvent = (EntersTheBattlefieldEvent) event; Card card = zEvent.getTarget(); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getPlayerId())); } diff --git a/Mage.Sets/src/mage/cards/b/BloodfireEnforcers.java b/Mage.Sets/src/mage/cards/b/BloodfireEnforcers.java index 4cb8a3028f..f173eb7def 100644 --- a/Mage.Sets/src/mage/cards/b/BloodfireEnforcers.java +++ b/Mage.Sets/src/mage/cards/b/BloodfireEnforcers.java @@ -91,12 +91,12 @@ class BloodfireEnforcersCondition implements Condition { Player player = game.getPlayer(source.getControllerId()); if (player != null) { for(Card card : player.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.INSTANT)) { + if (card.isInstant()) { if (sorceryFound) { return true; } instantFound = true; - } else if (card.getCardType().contains(CardType.SORCERY)) { + } else if (card.isSorcery()) { if (instantFound) { return true; } diff --git a/Mage.Sets/src/mage/cards/b/BloodsporeThrinax.java b/Mage.Sets/src/mage/cards/b/BloodsporeThrinax.java index 51a89786fd..111287c4d7 100644 --- a/Mage.Sets/src/mage/cards/b/BloodsporeThrinax.java +++ b/Mage.Sets/src/mage/cards/b/BloodsporeThrinax.java @@ -96,7 +96,7 @@ class BloodsporeThrinaxEntersBattlefieldEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget(); return creature != null && creature.getControllerId().equals(source.getControllerId()) - && creature.getCardType().contains(CardType.CREATURE) + && creature.isCreature() && !event.getTargetId().equals(source.getSourceId()); } diff --git a/Mage.Sets/src/mage/cards/b/BoneDancer.java b/Mage.Sets/src/mage/cards/b/BoneDancer.java index 99abfb3795..833d24b495 100644 --- a/Mage.Sets/src/mage/cards/b/BoneDancer.java +++ b/Mage.Sets/src/mage/cards/b/BoneDancer.java @@ -94,7 +94,7 @@ class BoneDancerEffect extends OneShotEffect { if (controller != null && defendingPlayer != null) { Card lastCreatureCard = null; for (Card card : defendingPlayer.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { lastCreatureCard = card; } } diff --git a/Mage.Sets/src/mage/cards/b/Bossk.java b/Mage.Sets/src/mage/cards/b/Bossk.java index d08c34b3a9..9b62092777 100644 --- a/Mage.Sets/src/mage/cards/b/Bossk.java +++ b/Mage.Sets/src/mage/cards/b/Bossk.java @@ -105,7 +105,7 @@ class BosskTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND) && permanent.getControllerId().equals(this.getControllerId())) { + if (permanent != null && permanent.isLand() && permanent.getControllerId().equals(this.getControllerId())) { return true; } return false; diff --git a/Mage.Sets/src/mage/cards/b/BramblewoodParagon.java b/Mage.Sets/src/mage/cards/b/BramblewoodParagon.java index f111acdb0a..b080bea4fa 100644 --- a/Mage.Sets/src/mage/cards/b/BramblewoodParagon.java +++ b/Mage.Sets/src/mage/cards/b/BramblewoodParagon.java @@ -110,7 +110,7 @@ class BramblewoodParagonReplacementEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget(); return creature != null && creature.getControllerId().equals(source.getControllerId()) - && creature.getCardType().contains(CardType.CREATURE) + && creature.isCreature() && creature.hasSubtype("Warrior", game) && !event.getTargetId().equals(source.getSourceId()); } diff --git a/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java b/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java index 788b69162d..1741582bd6 100644 --- a/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java +++ b/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java @@ -106,7 +106,7 @@ class BrutalDeceiverAbility extends LimitedTimesPerTurnActivatedAbility { Card card = player.getLibrary().getFromTop(game); cards.add(card); player.revealCards("Brutal Deceiver", cards, game); - if (card != null && card.getCardType().contains(CardType.LAND)) { + if (card != null && card.isLand()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/c/CagedSun.java b/Mage.Sets/src/mage/cards/c/CagedSun.java index 7f21d47faf..c2e245dc8d 100644 --- a/Mage.Sets/src/mage/cards/c/CagedSun.java +++ b/Mage.Sets/src/mage/cards/c/CagedSun.java @@ -140,7 +140,7 @@ class CagedSunTriggeredAbility extends TriggeredManaAbility { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(controllerId)) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND)) { + if (permanent != null && permanent.isLand()) { ObjectColor color = (ObjectColor) game.getState().getValue(this.sourceId + "_color"); if (color != null && event.getData().contains(color.toString())) { return true; diff --git a/Mage.Sets/src/mage/cards/c/CairnWanderer.java b/Mage.Sets/src/mage/cards/c/CairnWanderer.java index 7675bc9cb2..b9018c6dfd 100644 --- a/Mage.Sets/src/mage/cards/c/CairnWanderer.java +++ b/Mage.Sets/src/mage/cards/c/CairnWanderer.java @@ -96,7 +96,7 @@ public class CairnWanderer extends CardImpl { if (player != null) { for (Card card : player.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { for (Ability ability : card.getAbilities(game)) { if (ability instanceof MageSingleton) { if (ability instanceof FlyingAbility diff --git a/Mage.Sets/src/mage/cards/c/CallOfTheWild.java b/Mage.Sets/src/mage/cards/c/CallOfTheWild.java index 0963f5bf75..79eb9790f5 100644 --- a/Mage.Sets/src/mage/cards/c/CallOfTheWild.java +++ b/Mage.Sets/src/mage/cards/c/CallOfTheWild.java @@ -96,7 +96,7 @@ class CallOfTheWildEffect extends OneShotEffect { if (card != null) { Cards cards = new CardsImpl(card); controller.revealCards(sourceObject.getIdName(), cards, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); } else { controller.moveCards(card, Zone.GRAVEYARD, source, game); diff --git a/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java b/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java index 63032c8be5..e2a37461d2 100644 --- a/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java +++ b/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java @@ -107,7 +107,7 @@ class CallerOfTheClawWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) { Permanent card = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (card != null && card.getOwnerId().equals(this.controllerId) && card.getCardType().contains(CardType.CREATURE) && !(card instanceof PermanentToken)) { + if (card != null && card.getOwnerId().equals(this.controllerId) && card.isCreature() && !(card instanceof PermanentToken)) { creaturesCount++; } } diff --git a/Mage.Sets/src/mage/cards/c/CallousDeceiver.java b/Mage.Sets/src/mage/cards/c/CallousDeceiver.java index 8b08d947cd..ccadd5e893 100644 --- a/Mage.Sets/src/mage/cards/c/CallousDeceiver.java +++ b/Mage.Sets/src/mage/cards/c/CallousDeceiver.java @@ -108,7 +108,7 @@ class CallousDeceiverEffect extends OneShotEffect { if (card != null) { cards.add(card); controller.revealCards(sourceObject.getIdName(), cards, game); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { game.addEffect(new BoostSourceEffect(1, 0, Duration.EndOfTurn), source); game.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), source); } diff --git a/Mage.Sets/src/mage/cards/c/CarnifexDemon.java b/Mage.Sets/src/mage/cards/c/CarnifexDemon.java index 988d798c4f..5f0a86fcca 100644 --- a/Mage.Sets/src/mage/cards/c/CarnifexDemon.java +++ b/Mage.Sets/src/mage/cards/c/CarnifexDemon.java @@ -92,7 +92,7 @@ class CarnifexDemonEffect extends OneShotEffect { Permanent p = game.getPermanent(source.getSourceId()); if (p != null) { for (Permanent t : game.getBattlefield().getAllActivePermanents()) { - if (t.getCardType().contains(CardType.CREATURE) && !t.getId().equals(source.getSourceId())) + if (t.isCreature() && !t.getId().equals(source.getSourceId())) t.addCounters(CounterType.M1M1.createInstance(), source, game); } } diff --git a/Mage.Sets/src/mage/cards/c/CataclysmicGearhulk.java b/Mage.Sets/src/mage/cards/c/CataclysmicGearhulk.java index fe4229f108..32c7e3b275 100644 --- a/Mage.Sets/src/mage/cards/c/CataclysmicGearhulk.java +++ b/Mage.Sets/src/mage/cards/c/CataclysmicGearhulk.java @@ -173,7 +173,7 @@ class CataclysmicGearhulkEffect extends OneShotEffect { } for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) { - if (!chosen.contains(permanent) && !permanent.getCardType().contains(CardType.LAND)) { + if (!chosen.contains(permanent) && !permanent.isLand()) { permanent.sacrifice(source.getSourceId(), game); } } diff --git a/Mage.Sets/src/mage/cards/c/Catastrophe.java b/Mage.Sets/src/mage/cards/c/Catastrophe.java index 713361faf4..db689574fd 100644 --- a/Mage.Sets/src/mage/cards/c/Catastrophe.java +++ b/Mage.Sets/src/mage/cards/c/Catastrophe.java @@ -86,7 +86,7 @@ class CatastropheEffect extends OneShotEffect { if (controller != null) { if (controller.chooseUse(outcome, "Destroy all lands? (otherwise all creatures are destroyed)", source, game)) { for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterLandPermanent(), controller.getId(), source.getSourceId(), game)) { - permanent.destroy(source.getSourceId(), game, permanent.getCardType().contains(CardType.CREATURE)); + permanent.destroy(source.getSourceId(), game, permanent.isCreature()); } } else { for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), controller.getId(), source.getSourceId(), game)) { diff --git a/Mage.Sets/src/mage/cards/c/CellarDoor.java b/Mage.Sets/src/mage/cards/c/CellarDoor.java index d07787870e..8be8e191a6 100644 --- a/Mage.Sets/src/mage/cards/c/CellarDoor.java +++ b/Mage.Sets/src/mage/cards/c/CellarDoor.java @@ -93,7 +93,7 @@ class CellarDoorEffect extends OneShotEffect { Card card = player.getLibrary().removeFromBottom(game); if (card != null) { player.moveCards(card, Zone.GRAVEYARD, source, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { ZombieToken token = new ZombieToken(); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); } diff --git a/Mage.Sets/src/mage/cards/c/CerebralEruption.java b/Mage.Sets/src/mage/cards/c/CerebralEruption.java index 7714dbec11..5eabdb4865 100644 --- a/Mage.Sets/src/mage/cards/c/CerebralEruption.java +++ b/Mage.Sets/src/mage/cards/c/CerebralEruption.java @@ -97,7 +97,7 @@ class CerebralEruptionEffect extends OneShotEffect { for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { perm.damage(damage, source.getSourceId(), game, false, true); } - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard(); if (spellCard != null) { player.moveCards(spellCard, Zone.HAND, source, game); diff --git a/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java b/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java index 3c277e144b..90c5b883f8 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java +++ b/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java @@ -109,7 +109,7 @@ class ChandraTheFirebrandAbility extends DelayedTriggeredAbility { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) { + if (spell != null && (spell.isInstant() || spell.isSorcery())) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java index d33ad86cca..7a04ad0f70 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java +++ b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java @@ -121,7 +121,7 @@ class ChandraTorchOfDefianceEffect extends OneShotEffect { boolean exiledCardWasCast = false; controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true); if (!card.getManaCost().isEmpty()) - if (controller.chooseUse(Outcome.Benefit, "Cast the card? (You still pay the costs)", source, game) && !card.getCardType().contains(CardType.LAND)) { + if (controller.chooseUse(Outcome.Benefit, "Cast the card? (You still pay the costs)", source, game) && !card.isLand()) { // LinkedHashMap useableAbilities = controller.getUseableActivatedAbilities(card, Zone.EXILED, game); // for (ActivatedAbility ability : useableAbilities.values()) { // diff --git a/Mage.Sets/src/mage/cards/c/ChandrasPhoenix.java b/Mage.Sets/src/mage/cards/c/ChandrasPhoenix.java index 52627e5031..07c6b951a3 100644 --- a/Mage.Sets/src/mage/cards/c/ChandrasPhoenix.java +++ b/Mage.Sets/src/mage/cards/c/ChandrasPhoenix.java @@ -108,9 +108,9 @@ class ChandrasPhoenixTriggeredAbility extends TriggeredAbilityImpl { } if (sourceObjectDamage != null) { if (sourceObjectDamage.getColor(game).isRed() - && (sourceObjectDamage.getCardType().contains(CardType.PLANESWALKER) - || sourceObjectDamage.getCardType().contains(CardType.INSTANT) - || sourceObjectDamage.getCardType().contains(CardType.SORCERY))) { + && (sourceObjectDamage.isPlaneswalker() + || sourceObjectDamage.isInstant() + || sourceObjectDamage.isSorcery())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/c/ChorusOfTheConclave.java b/Mage.Sets/src/mage/cards/c/ChorusOfTheConclave.java index 3901ba4f8f..0341321328 100644 --- a/Mage.Sets/src/mage/cards/c/ChorusOfTheConclave.java +++ b/Mage.Sets/src/mage/cards/c/ChorusOfTheConclave.java @@ -111,7 +111,7 @@ class ChorusOfTheConclaveReplacementEffect extends ReplacementEffectImpl { if (event.getPlayerId().equals(source.getControllerId())) { MageObject spellObject = game.getObject(event.getSourceId()); if (spellObject != null) { - return spellObject.getCardType().contains(CardType.CREATURE); + return spellObject.isCreature(); } } return false; diff --git a/Mage.Sets/src/mage/cards/c/ChronatogTotem.java b/Mage.Sets/src/mage/cards/c/ChronatogTotem.java index 7a2bfb2fb3..554a325dcc 100644 --- a/Mage.Sets/src/mage/cards/c/ChronatogTotem.java +++ b/Mage.Sets/src/mage/cards/c/ChronatogTotem.java @@ -151,7 +151,7 @@ class ChronatogTotemCondition implements Condition { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { - return permanent.getCardType().contains(CardType.CREATURE); + return permanent.isCreature(); } return false; } diff --git a/Mage.Sets/src/mage/cards/c/CircleOfFlame.java b/Mage.Sets/src/mage/cards/c/CircleOfFlame.java index bd6b1fbbf0..16984dabb3 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfFlame.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfFlame.java @@ -102,7 +102,7 @@ class CircleOfFlameTriggeredAbility extends TriggeredAbilityImpl { } else{ // check attacks your planeswalker Permanent permanent = game.getPermanent(event.getTargetId()); youOrYourPlaneswalker = permanent != null - && permanent.getCardType().contains(CardType.PLANESWALKER) + && permanent.isPlaneswalker() && permanent.getControllerId().equals(this.getControllerId()); } if (youOrYourPlaneswalker) { diff --git a/Mage.Sets/src/mage/cards/c/CityOfTraitors.java b/Mage.Sets/src/mage/cards/c/CityOfTraitors.java index e8d8af37f5..4ab9c975d9 100644 --- a/Mage.Sets/src/mage/cards/c/CityOfTraitors.java +++ b/Mage.Sets/src/mage/cards/c/CityOfTraitors.java @@ -87,7 +87,7 @@ class CityOfTraitorsTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent land = game.getPermanent(event.getTargetId()); - return land.getCardType().contains(CardType.LAND) + return land.isLand() && land.getControllerId().equals(this.controllerId) && !Objects.equals(event.getTargetId(), this.getSourceId()); } diff --git a/Mage.Sets/src/mage/cards/c/CivilizedScholar.java b/Mage.Sets/src/mage/cards/c/CivilizedScholar.java index 4a7567ae94..ac3986e23a 100644 --- a/Mage.Sets/src/mage/cards/c/CivilizedScholar.java +++ b/Mage.Sets/src/mage/cards/c/CivilizedScholar.java @@ -127,7 +127,7 @@ class CivilizedScholarEffect extends OneShotEffect { if (player != null) { player.drawCards(1, game); Card card = player.discardOne(false, source, game); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { permanent.untap(game); diff --git a/Mage.Sets/src/mage/cards/c/CloneShell.java b/Mage.Sets/src/mage/cards/c/CloneShell.java index 0293a4e79a..42b43908a6 100644 --- a/Mage.Sets/src/mage/cards/c/CloneShell.java +++ b/Mage.Sets/src/mage/cards/c/CloneShell.java @@ -166,7 +166,7 @@ class CloneShellDiesEffect extends OneShotEffect { if (!imprinted.isEmpty()) { Card imprintedCard = game.getCard(imprinted.get(0)); imprintedCard.setFaceDown(false, game); - if (imprintedCard.getCardType().contains(CardType.CREATURE)) { + if (imprintedCard.isCreature()) { controller.moveCards(imprintedCard, Zone.BATTLEFIELD, source, game); } } diff --git a/Mage.Sets/src/mage/cards/c/CobraTrap.java b/Mage.Sets/src/mage/cards/c/CobraTrap.java index 7bc5b0ba42..e37b6c2796 100644 --- a/Mage.Sets/src/mage/cards/c/CobraTrap.java +++ b/Mage.Sets/src/mage/cards/c/CobraTrap.java @@ -116,7 +116,7 @@ class CobraTrapWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DESTROYED_PERMANENT) { Permanent perm = (Permanent) game.getPermanentOrLKIBattlefield(event.getTargetId()); // can regenerate or be indestructible - if (perm != null && !perm.getCardType().contains(CardType.CREATURE)) { + if (perm != null && !perm.isCreature()) { if (!game.getStack().isEmpty()) { StackObject spell = game.getStack().getStackObject(event.getSourceId()); if (spell != null && game.getOpponents(perm.getControllerId()).contains(spell.getControllerId())) { diff --git a/Mage.Sets/src/mage/cards/c/CoercedConfession.java b/Mage.Sets/src/mage/cards/c/CoercedConfession.java index b8cc2bf9db..a35e813179 100644 --- a/Mage.Sets/src/mage/cards/c/CoercedConfession.java +++ b/Mage.Sets/src/mage/cards/c/CoercedConfession.java @@ -92,7 +92,7 @@ class CoercedConfessionMillEffect extends OneShotEffect { Cards cards = new CardsImpl(); for(Card card: player.getLibrary().getTopCards(game, 4)) { cards.add(card); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { ++foundCreatures; } } diff --git a/Mage.Sets/src/mage/cards/c/Comeuppance.java b/Mage.Sets/src/mage/cards/c/Comeuppance.java index 8648bdfcf5..be574ee507 100644 --- a/Mage.Sets/src/mage/cards/c/Comeuppance.java +++ b/Mage.Sets/src/mage/cards/c/Comeuppance.java @@ -97,7 +97,7 @@ class ComeuppanceEffect extends PreventionEffectImpl { MageObject damageDealingObject = game.getObject(event.getSourceId()); UUID objectControllerId = null; if (damageDealingObject instanceof Permanent) { - if (((Permanent) damageDealingObject).getCardType().contains(CardType.CREATURE)) { + if (((Permanent) damageDealingObject).isCreature()) { ((Permanent) damageDealingObject).damage(preventionData.getPreventedDamage(), source.getSourceId(), game, false, true); } else { objectControllerId = ((Permanent) damageDealingObject).getControllerId(); @@ -129,7 +129,7 @@ class ComeuppanceEffect extends PreventionEffectImpl { Permanent targetPermanent = game.getPermanent(event.getTargetId()); if (targetPermanent != null && targetPermanent.getControllerId().equals(source.getControllerId()) && - targetPermanent.getCardType().contains(CardType.PLANESWALKER)) { + targetPermanent.isPlaneswalker()) { catched = true; } } diff --git a/Mage.Sets/src/mage/cards/c/CompulsiveResearch.java b/Mage.Sets/src/mage/cards/c/CompulsiveResearch.java index b4d5df9869..9174b7fd78 100644 --- a/Mage.Sets/src/mage/cards/c/CompulsiveResearch.java +++ b/Mage.Sets/src/mage/cards/c/CompulsiveResearch.java @@ -91,7 +91,7 @@ class CompulsiveResearchDiscardEffect extends OneShotEffect { Card card = targetPlayer.getHand().get(target.getFirstTarget(), game); if (card != null) { targetPlayer.discard(card, source, game); - if (!card.getCardType().contains(CardType.LAND) && !targetPlayer.getHand().isEmpty()) { + if (!card.isLand() && !targetPlayer.getHand().isEmpty()) { targetPlayer.discard(1, false, source, game); } return true; diff --git a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java index c19afab589..1c152d5c9e 100644 --- a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java +++ b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java @@ -115,7 +115,7 @@ class ConduitOfRuinWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { Spell spell = (Spell) game.getObject(event.getTargetId()); - if (spell != null && spell.getCardType().contains(CardType.CREATURE)) { + if (spell != null && spell.isCreature()) { if (playerCreatureSpells.containsKey(event.getPlayerId())) { playerCreatureSpells.put(event.getPlayerId(), playerCreatureSpells.get(event.getPlayerId()) + 1); } else { @@ -149,7 +149,7 @@ class FirstCastCreatureSpellPredicate implements ObjectPlayerPredicate input, Game game) { if (input.getObject() instanceof Spell - && ((Spell) input.getObject()).getCardType().contains(CardType.CREATURE)) { + && ((Spell) input.getObject()).isCreature()) { ConduitOfRuinWatcher watcher = (ConduitOfRuinWatcher) game.getState().getWatchers().get("FirstCreatureSpellCastThisTurn"); return watcher != null && watcher.creatureSpellsCastThisTurn(input.getPlayerId()) == 0; } diff --git a/Mage.Sets/src/mage/cards/c/Conspiracy.java b/Mage.Sets/src/mage/cards/c/Conspiracy.java index 2d6e48faa5..68dac6c0d9 100644 --- a/Mage.Sets/src/mage/cards/c/Conspiracy.java +++ b/Mage.Sets/src/mage/cards/c/Conspiracy.java @@ -103,26 +103,26 @@ class ConspiracyEffect extends ContinuousEffectImpl { // in graveyard for (UUID cardId : controller.getGraveyard()) { Card card = game.getCard(cardId); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { setCreatureSubtype(card, choice, game); } } // on Hand for (UUID cardId : controller.getHand()) { Card card = game.getCard(cardId); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { setCreatureSubtype(card, choice, game); } } // in Exile for (Card card : game.getState().getExile().getAllCards(game)) { - if (card.getOwnerId().equals(controller.getId()) && card.getCardType().contains(CardType.CREATURE)) { + if (card.getOwnerId().equals(controller.getId()) && card.isCreature()) { setCreatureSubtype(card, choice, game); } } // in Library (e.g. for Mystical Teachings) for (Card card : controller.getLibrary().getCards(game)) { - if (card.getOwnerId().equals(controller.getId()) && card.getCardType().contains(CardType.CREATURE)) { + if (card.getOwnerId().equals(controller.getId()) && card.isCreature()) { setCreatureSubtype(card, choice, game); } } @@ -130,7 +130,7 @@ class ConspiracyEffect extends ContinuousEffectImpl { for (UUID commanderId : controller.getCommandersIds()) { if (game.getState().getZone(commanderId) == Zone.COMMAND) { Card card = game.getCard(commanderId); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { setCreatureSubtype(card, choice, game); } } @@ -140,7 +140,7 @@ class ConspiracyEffect extends ContinuousEffectImpl { StackObject stackObject = iterator.next(); if (stackObject instanceof Spell && stackObject.getControllerId().equals(source.getControllerId()) && - stackObject.getCardType().contains(CardType.CREATURE)) { + stackObject.isCreature()) { Card card = ((Spell) stackObject).getCard(); setCreatureSubtype(card, choice, game); } diff --git a/Mage.Sets/src/mage/cards/c/ConsumingAberration.java b/Mage.Sets/src/mage/cards/c/ConsumingAberration.java index ddd2855f2f..9c41cfbcce 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumingAberration.java +++ b/Mage.Sets/src/mage/cards/c/ConsumingAberration.java @@ -109,7 +109,7 @@ class ConsumingAberrationEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if(card.getCardType().contains(CardType.LAND)){ + if(card.isLand()){ break; } } diff --git a/Mage.Sets/src/mage/cards/c/ContainmentPriest.java b/Mage.Sets/src/mage/cards/c/ContainmentPriest.java index 1cda500f7a..625dcf0f5d 100644 --- a/Mage.Sets/src/mage/cards/c/ContainmentPriest.java +++ b/Mage.Sets/src/mage/cards/c/ContainmentPriest.java @@ -126,7 +126,7 @@ class ContainmentPriestReplacementEffect extends ReplacementEffectImpl { if (entersTransformed instanceof Boolean && (Boolean) entersTransformed && card.getSecondCardFace() != null) { card = card.getSecondCardFace(); } - if (card.getCardType().contains(CardType.CREATURE)) { // TODO: Bestow Card cast as Enchantment probably not handled correctly + if (card.isCreature()) { // TODO: Bestow Card cast as Enchantment probably not handled correctly CreatureWasCastWatcher watcher = (CreatureWasCastWatcher) game.getState().getWatchers().get("CreatureWasCast"); if (watcher != null && !watcher.wasCreatureCastThisTurn(event.getTargetId())) { return true; diff --git a/Mage.Sets/src/mage/cards/c/Contamination.java b/Mage.Sets/src/mage/cards/c/Contamination.java index 1670e13366..dae3792d0a 100644 --- a/Mage.Sets/src/mage/cards/c/Contamination.java +++ b/Mage.Sets/src/mage/cards/c/Contamination.java @@ -114,6 +114,6 @@ class ContaminationReplacementEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { MageObject mageObject = game.getObject(event.getSourceId()); - return mageObject != null && mageObject.getCardType().contains(CardType.LAND); + return mageObject != null && mageObject.isLand(); } } diff --git a/Mage.Sets/src/mage/cards/c/ContestedWarZone.java b/Mage.Sets/src/mage/cards/c/ContestedWarZone.java index 693999153d..141422acd2 100644 --- a/Mage.Sets/src/mage/cards/c/ContestedWarZone.java +++ b/Mage.Sets/src/mage/cards/c/ContestedWarZone.java @@ -111,7 +111,7 @@ class ContestedWarZoneAbility extends TriggeredAbilityImpl { DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event; if (damageEvent.isCombatDamage()) { Permanent permanent = game.getPermanent(event.getSourceId()); - if (damageEvent.getPlayerId().equals(getControllerId()) && permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (damageEvent.getPlayerId().equals(getControllerId()) && permanent != null && permanent.isCreature()) { game.getState().setValue(getSourceId().toString(), permanent.getControllerId()); return true; } diff --git a/Mage.Sets/src/mage/cards/c/CorpseDance.java b/Mage.Sets/src/mage/cards/c/CorpseDance.java index 1596ffc975..02220e40b5 100644 --- a/Mage.Sets/src/mage/cards/c/CorpseDance.java +++ b/Mage.Sets/src/mage/cards/c/CorpseDance.java @@ -97,7 +97,7 @@ class CorpseDanceEffect extends OneShotEffect { if (controller != null) { Card lastCreatureCard = null; for (Card card : controller.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { lastCreatureCard = card; } } diff --git a/Mage.Sets/src/mage/cards/c/CorpsejackMenace.java b/Mage.Sets/src/mage/cards/c/CorpsejackMenace.java index a2574a915e..82ba7a9bd0 100644 --- a/Mage.Sets/src/mage/cards/c/CorpsejackMenace.java +++ b/Mage.Sets/src/mage/cards/c/CorpsejackMenace.java @@ -109,7 +109,7 @@ class CorpsejackMenaceReplacementEffect extends ReplacementEffectImpl { permanent = game.getPermanentEntering(event.getTargetId()); } if (permanent != null && permanent.getControllerId().equals(source.getControllerId()) - && permanent.getCardType().contains(CardType.CREATURE)) { + && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/c/CountrysideCrusher.java b/Mage.Sets/src/mage/cards/c/CountrysideCrusher.java index 7789360474..3c696b846e 100644 --- a/Mage.Sets/src/mage/cards/c/CountrysideCrusher.java +++ b/Mage.Sets/src/mage/cards/c/CountrysideCrusher.java @@ -108,7 +108,7 @@ class CountrysideCrusherEffect extends OneShotEffect { while (controller.getLibrary().size() > 0) { Card card = controller.getLibrary().getFromTop(game); cards.add(card); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { controller.moveCards(card, Zone.GRAVEYARD, source, game); } else { break; diff --git a/Mage.Sets/src/mage/cards/c/Cowardice.java b/Mage.Sets/src/mage/cards/c/Cowardice.java index c8e3dc7457..97ae09c8fc 100644 --- a/Mage.Sets/src/mage/cards/c/Cowardice.java +++ b/Mage.Sets/src/mage/cards/c/Cowardice.java @@ -83,7 +83,7 @@ class CowardiceTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) && + if (permanent != null && permanent.isCreature() && StackObject.class.isInstance(game.getObject(event.getSourceId()))) { getEffects().get(0).setTargetPointer(new FixedTarget(event.getTargetId())); return true; diff --git a/Mage.Sets/src/mage/cards/c/CrackdownConstruct.java b/Mage.Sets/src/mage/cards/c/CrackdownConstruct.java index 879061a4ef..beca085b91 100644 --- a/Mage.Sets/src/mage/cards/c/CrackdownConstruct.java +++ b/Mage.Sets/src/mage/cards/c/CrackdownConstruct.java @@ -93,7 +93,7 @@ class CrackdownConstructTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(getControllerId())) { Card source = game.getPermanentOrLKIBattlefield(event.getSourceId()); - if (source != null && (source.getCardType().contains(CardType.ARTIFACT) || source.getCardType().contains(CardType.CREATURE))) { + if (source != null && (source.isArtifact() || source.isCreature())) { StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId()); if (!(stackAbility.getStackAbility() instanceof ActivatedManaAbilityImpl)) { return true; diff --git a/Mage.Sets/src/mage/cards/c/CragganwickCremator.java b/Mage.Sets/src/mage/cards/c/CragganwickCremator.java index 1941a561ee..7906a40469 100644 --- a/Mage.Sets/src/mage/cards/c/CragganwickCremator.java +++ b/Mage.Sets/src/mage/cards/c/CragganwickCremator.java @@ -95,7 +95,7 @@ class CragganwickCrematorEffect extends OneShotEffect { if (controller != null) { Card discardedCard = controller.discardOne(true, source, game); if (discardedCard != null - && discardedCard.getCardType().contains(CardType.CREATURE)) { + && discardedCard.isCreature()) { Player targetedPlayer = game.getPlayer(source.getFirstTarget()); if (targetedPlayer != null) { int damage = discardedCard.getPower().getValue(); diff --git a/Mage.Sets/src/mage/cards/c/CrawlingSensation.java b/Mage.Sets/src/mage/cards/c/CrawlingSensation.java index e119d53c54..de1845da66 100644 --- a/Mage.Sets/src/mage/cards/c/CrawlingSensation.java +++ b/Mage.Sets/src/mage/cards/c/CrawlingSensation.java @@ -101,7 +101,7 @@ class CrawlingSensationTriggeredAbility extends TriggeredAbilityImpl { if (cardOwnerId != null && card.getOwnerId().equals(getControllerId()) && cardType != null - && card.getCardType().contains(CardType.LAND)) { + && card.isLand()) { game.getState().setValue("usedOnTurn" + getControllerId() + getOriginalId(), game.getTurnNum()); return true; } diff --git a/Mage.Sets/src/mage/cards/c/CrimePunishment.java b/Mage.Sets/src/mage/cards/c/CrimePunishment.java index cc91fc68f0..0b18007a49 100644 --- a/Mage.Sets/src/mage/cards/c/CrimePunishment.java +++ b/Mage.Sets/src/mage/cards/c/CrimePunishment.java @@ -98,9 +98,9 @@ class PunishmentEffect extends OneShotEffect { for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { if (permanent != null && permanent.getConvertedManaCost() == source.getManaCostsToPay().getX() - && (permanent.getCardType().contains(CardType.ARTIFACT) - || permanent.getCardType().contains(CardType.CREATURE) - || permanent.getCardType().contains(CardType.ENCHANTMENT))) { + && (permanent.isArtifact() + || permanent.isCreature() + || permanent.isEnchantment())) { permanent.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/c/CrucibleOfWorlds.java b/Mage.Sets/src/mage/cards/c/CrucibleOfWorlds.java index 8b3fcd1e22..4a9d007c72 100644 --- a/Mage.Sets/src/mage/cards/c/CrucibleOfWorlds.java +++ b/Mage.Sets/src/mage/cards/c/CrucibleOfWorlds.java @@ -89,7 +89,7 @@ class CrucibleOfWorldsEffect extends ContinuousEffectImpl { if (player != null) { for (UUID cardId: player.getGraveyard()) { Card card = game.getCard(cardId); - if(card != null && card.getCardType().contains(CardType.LAND)){ + if(card != null && card.isLand()){ PlayLandFromGraveyardAbility ability = new PlayLandFromGraveyardAbility(card.getName()); ability.setSourceId(cardId); ability.setControllerId(card.getOwnerId()); diff --git a/Mage.Sets/src/mage/cards/c/CruelDeceiver.java b/Mage.Sets/src/mage/cards/c/CruelDeceiver.java index 5241a742b5..833a7b908d 100644 --- a/Mage.Sets/src/mage/cards/c/CruelDeceiver.java +++ b/Mage.Sets/src/mage/cards/c/CruelDeceiver.java @@ -105,7 +105,7 @@ class CruelDeceiverEffect extends OneShotEffect { Card card = player.getLibrary().getFromTop(game); cards.add(card); player.revealCards("Cruel Deceiver", cards, game); - if (card != null && card.getCardType().contains(CardType.LAND)) { + if (card != null && card.isLand()) { game.addEffect(new BoostSourceEffect(2,2,Duration.EndOfTurn), source); game.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(),Duration.EndOfTurn), source); } diff --git a/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java b/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java index 84576ac215..976f6dee0d 100644 --- a/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java +++ b/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java @@ -117,7 +117,7 @@ class InstantOrSorceryCastManaCondition extends ManaCondition implements Conditi public boolean apply(Game game, Ability source) { if (source instanceof SpellAbility) { MageObject object = game.getObject(source.getSourceId()); - if (object != null && (object.getCardType().contains(CardType.INSTANT) || object.getCardType().contains(CardType.SORCERY))) { + if (object != null && (object.isInstant() || object.isSorcery())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java b/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java index f936fb3513..c85f813e85 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java @@ -112,7 +112,7 @@ class CurseOfEchoesCopyTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) { + if (spell != null && (spell.isInstant() || spell.isSorcery())) { Permanent enchantment = game.getPermanent(sourceId); if (enchantment != null && enchantment.getAttachedTo() != null) { Player player = game.getPlayer(enchantment.getAttachedTo()); diff --git a/Mage.Sets/src/mage/cards/c/CursedTotem.java b/Mage.Sets/src/mage/cards/c/CursedTotem.java index 4969215986..0a41419f0b 100644 --- a/Mage.Sets/src/mage/cards/c/CursedTotem.java +++ b/Mage.Sets/src/mage/cards/c/CursedTotem.java @@ -75,7 +75,7 @@ class CursedTotemCantActivateEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getCardType().contains(CardType.CREATURE); + return permanent.isCreature(); } @Override diff --git a/Mage.Sets/src/mage/cards/d/DarettiScrapSavant.java b/Mage.Sets/src/mage/cards/d/DarettiScrapSavant.java index 79a7581ef0..febe5dd008 100644 --- a/Mage.Sets/src/mage/cards/d/DarettiScrapSavant.java +++ b/Mage.Sets/src/mage/cards/d/DarettiScrapSavant.java @@ -205,7 +205,7 @@ class DarettiScrapSavantTriggeredAbility extends TriggeredAbilityImpl { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getToZone() == Zone.GRAVEYARD && zEvent.getFromZone() == Zone.BATTLEFIELD - && zEvent.getTarget().getCardType().contains(CardType.ARTIFACT) + && zEvent.getTarget().isArtifact() && zEvent.getTarget().getOwnerId().equals(this.controllerId)) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(zEvent.getTargetId())); diff --git a/Mage.Sets/src/mage/cards/d/DeadbridgeChant.java b/Mage.Sets/src/mage/cards/d/DeadbridgeChant.java index 44f20b359a..2929170a40 100644 --- a/Mage.Sets/src/mage/cards/d/DeadbridgeChant.java +++ b/Mage.Sets/src/mage/cards/d/DeadbridgeChant.java @@ -97,7 +97,7 @@ class DeadbridgeChantEffect extends OneShotEffect { if (card != null) { Zone targetZone = Zone.HAND; String text = " put into hand of "; - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { targetZone = Zone.BATTLEFIELD; text = " put onto battlefield for "; } diff --git a/Mage.Sets/src/mage/cards/d/DeathSpark.java b/Mage.Sets/src/mage/cards/d/DeathSpark.java index 5480131486..d6f005fc05 100644 --- a/Mage.Sets/src/mage/cards/d/DeathSpark.java +++ b/Mage.Sets/src/mage/cards/d/DeathSpark.java @@ -96,7 +96,7 @@ class DeathSparkCondition implements Condition { boolean nextCard = false; for (Card card : controller.getGraveyard().getCards(game)) { if (nextCard) { - return card.getCardType().contains(CardType.CREATURE); + return card.isCreature(); } if (card.getId().equals(source.getSourceId())) { nextCard = true; diff --git a/Mage.Sets/src/mage/cards/d/DeathsPresence.java b/Mage.Sets/src/mage/cards/d/DeathsPresence.java index f6d915be96..f7ac018b37 100644 --- a/Mage.Sets/src/mage/cards/d/DeathsPresence.java +++ b/Mage.Sets/src/mage/cards/d/DeathsPresence.java @@ -92,7 +92,7 @@ class DeathsPresenceTriggeredAbility extends TriggeredAbilityImpl { if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent != null && permanent.getControllerId().equals(this.getControllerId()) && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.getControllerId().equals(this.getControllerId()) && permanent.isCreature()) { this.getTargets().clear(); this.addTarget(new TargetControlledCreaturePermanent()); this.getEffects().clear(); diff --git a/Mage.Sets/src/mage/cards/d/DeceiverOfForm.java b/Mage.Sets/src/mage/cards/d/DeceiverOfForm.java index fc19cc93b2..6105cd530d 100644 --- a/Mage.Sets/src/mage/cards/d/DeceiverOfForm.java +++ b/Mage.Sets/src/mage/cards/d/DeceiverOfForm.java @@ -106,7 +106,7 @@ class DeceiverOfFormEffect extends OneShotEffect { if (card != null) { Cards cards = new CardsImpl(card); controller.revealCards(sourceObject.getIdName(), cards, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { if (controller.chooseUse(outcome, "Let creatures you control other than " + sourceObject.getLogName() + " becomes copies of " + card.getLogName() + " until end of turn?", source, game)) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), controller.getId(), game)) { diff --git a/Mage.Sets/src/mage/cards/d/DescendantsPath.java b/Mage.Sets/src/mage/cards/d/DescendantsPath.java index d89487d449..55b4b6a64f 100644 --- a/Mage.Sets/src/mage/cards/d/DescendantsPath.java +++ b/Mage.Sets/src/mage/cards/d/DescendantsPath.java @@ -98,7 +98,7 @@ class DescendantsPathEffect extends OneShotEffect { return false; } controller.revealCards(sourceObject.getIdName(), new CardsImpl(card), game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); boolean found = false; for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, controller.getId(), game)) { diff --git a/Mage.Sets/src/mage/cards/d/DesecratorHag.java b/Mage.Sets/src/mage/cards/d/DesecratorHag.java index cfbe562985..bd6adecef0 100644 --- a/Mage.Sets/src/mage/cards/d/DesecratorHag.java +++ b/Mage.Sets/src/mage/cards/d/DesecratorHag.java @@ -99,7 +99,7 @@ class DesecratorHagEffect extends OneShotEffect { Player you = game.getPlayer(source.getControllerId()); if (you != null) { for (Card card : you.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { if (card.getPower().getValue() > creatureGreatestPower) { creatureGreatestPower = card.getPower().getValue(); cards.clear(); diff --git a/Mage.Sets/src/mage/cards/d/DestroyTheEvidence.java b/Mage.Sets/src/mage/cards/d/DestroyTheEvidence.java index a7c4c4a3d6..e429de0a62 100644 --- a/Mage.Sets/src/mage/cards/d/DestroyTheEvidence.java +++ b/Mage.Sets/src/mage/cards/d/DestroyTheEvidence.java @@ -107,7 +107,7 @@ class DestroyTheEvidenceEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { landFound = true; } } diff --git a/Mage.Sets/src/mage/cards/d/DevoutHarpist.java b/Mage.Sets/src/mage/cards/d/DevoutHarpist.java index eb3fb057f5..ffecd0f880 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutHarpist.java +++ b/Mage.Sets/src/mage/cards/d/DevoutHarpist.java @@ -88,7 +88,7 @@ class DevoutHarpistPredicate implements ObjectPlayerPredicate 0) { + while (!card.isCreature() && player.getLibrary().size() > 0) { card = player.getLibrary().removeFromTop(game); cards.add(card); } - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId()); } diff --git a/Mage.Sets/src/mage/cards/d/DomriRade.java b/Mage.Sets/src/mage/cards/d/DomriRade.java index 1375171696..912c2fd0d0 100644 --- a/Mage.Sets/src/mage/cards/d/DomriRade.java +++ b/Mage.Sets/src/mage/cards/d/DomriRade.java @@ -128,7 +128,7 @@ class DomriRadeEffect1 extends OneShotEffect { CardsImpl cards = new CardsImpl(); cards.add(card); controller.lookAtCards(sourceObject.getName(), cards, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { if (controller.chooseUse(outcome, "Reveal " + card.getName() + " and put it into your hand?", source, game)) { controller.moveCards(card, Zone.HAND, source, game); controller.revealCards(sourceObject.getIdName(), cards, game); diff --git a/Mage.Sets/src/mage/cards/d/DragonAppeasement.java b/Mage.Sets/src/mage/cards/d/DragonAppeasement.java index 79de6399ff..4af38e9212 100644 --- a/Mage.Sets/src/mage/cards/d/DragonAppeasement.java +++ b/Mage.Sets/src/mage/cards/d/DragonAppeasement.java @@ -91,7 +91,7 @@ class DragonAppeasementTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getCardType().contains(CardType.CREATURE); + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).isCreature(); } @Override diff --git a/Mage.Sets/src/mage/cards/d/DragonlordKolaghan.java b/Mage.Sets/src/mage/cards/d/DragonlordKolaghan.java index 53ab8af581..4161076734 100644 --- a/Mage.Sets/src/mage/cards/d/DragonlordKolaghan.java +++ b/Mage.Sets/src/mage/cards/d/DragonlordKolaghan.java @@ -115,7 +115,7 @@ class DragonlordKolaghanTriggeredAbility extends TriggeredAbilityImpl { Player controller = game.getPlayer(getControllerId()); if (controller != null && controller.hasOpponent(event.getPlayerId(), game)) { Spell spell = game.getStack().getSpell(event.getSourceId()); - if (spell != null && !spell.isFaceDown(game) && (spell.getCardType().contains(CardType.CREATURE) || spell.getCardType().contains(CardType.PLANESWALKER))) { + if (spell != null && !spell.isFaceDown(game) && (spell.isCreature() || spell.isPlaneswalker())) { Player opponent = game.getPlayer(event.getPlayerId()); boolean sameName = false; for (Card graveCard :opponent.getGraveyard().getCards(game)) { diff --git a/Mage.Sets/src/mage/cards/d/DralnuLichLord.java b/Mage.Sets/src/mage/cards/d/DralnuLichLord.java index a0d11c84e3..0f30b7257d 100644 --- a/Mage.Sets/src/mage/cards/d/DralnuLichLord.java +++ b/Mage.Sets/src/mage/cards/d/DralnuLichLord.java @@ -151,7 +151,7 @@ class DralnuLichLordFlashbackEffect extends ContinuousEffectImpl { Card card = game.getCard(targetPointer.getFirst(game, source)); if (card != null) { FlashbackAbility ability; - if (card.getCardType().contains(CardType.INSTANT)) { + if (card.isInstant()) { ability = new FlashbackAbility(card.getManaCost(), TimingRule.INSTANT); } else { diff --git a/Mage.Sets/src/mage/cards/d/Dread.java b/Mage.Sets/src/mage/cards/d/Dread.java index 228410392d..1870f62fd9 100644 --- a/Mage.Sets/src/mage/cards/d/Dread.java +++ b/Mage.Sets/src/mage/cards/d/Dread.java @@ -103,7 +103,7 @@ class DreadTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { Permanent permanent = game.getPermanent(event.getSourceId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { for (Effect effect : this.getEffects()) { if (effect instanceof DestroyTargetEffect) { effect.setTargetPointer(new FixedTarget(event.getSourceId())); diff --git a/Mage.Sets/src/mage/cards/d/DreadSummons.java b/Mage.Sets/src/mage/cards/d/DreadSummons.java index 9f5b624eff..c5b7cd45fc 100644 --- a/Mage.Sets/src/mage/cards/d/DreadSummons.java +++ b/Mage.Sets/src/mage/cards/d/DreadSummons.java @@ -93,7 +93,7 @@ class DreadSummonsEffect extends OneShotEffect { if (player != null) { Set movedCards = player.moveCardsToGraveyardWithInfo(player.getLibrary().getTopCards(game, numberOfCards), source, game, Zone.LIBRARY); for (Card card : movedCards) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { numberOfCreatureCards++; } } diff --git a/Mage.Sets/src/mage/cards/d/DreamPillager.java b/Mage.Sets/src/mage/cards/d/DreamPillager.java index 832c941dfe..11d602be69 100644 --- a/Mage.Sets/src/mage/cards/d/DreamPillager.java +++ b/Mage.Sets/src/mage/cards/d/DreamPillager.java @@ -145,7 +145,7 @@ class DreamPillagerEffect extends OneShotEffect { if (!cards.isEmpty()) { controller.moveCards(cards, Zone.EXILED, source, game); for (Card card : cards) { - if (!card.getCardType().contains(CardType.LAND)) { + if (!card.isLand()) { ContinuousEffect effect = new DreamPillagerCastFromExileEffect(); effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/cards/d/DroolingOgre.java b/Mage.Sets/src/mage/cards/d/DroolingOgre.java index 3632348a94..3304645616 100644 --- a/Mage.Sets/src/mage/cards/d/DroolingOgre.java +++ b/Mage.Sets/src/mage/cards/d/DroolingOgre.java @@ -127,7 +127,7 @@ public class DroolingOgre extends CardImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && spell.getCardType().contains(CardType.ARTIFACT)) { + if (spell != null && spell.isArtifact()) { this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); return true; } diff --git a/Mage.Sets/src/mage/cards/d/DruidicSatchel.java b/Mage.Sets/src/mage/cards/d/DruidicSatchel.java index c6721d06b3..876475f058 100644 --- a/Mage.Sets/src/mage/cards/d/DruidicSatchel.java +++ b/Mage.Sets/src/mage/cards/d/DruidicSatchel.java @@ -86,15 +86,15 @@ class DruidicSatchelEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); Card card = player.getLibrary().getFromTop(game); if (card != null) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { Token token = new SaprolingToken(); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); } - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { player.getLibrary().getCard(card.getId(), game); card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId()); } - if (!card.getCardType().contains(CardType.CREATURE) && !card.getCardType().contains(CardType.LAND)) { + if (!card.isCreature() && !card.isLand()) { player.gainLife(2, game); } diff --git a/Mage.Sets/src/mage/cards/d/DryadMilitant.java b/Mage.Sets/src/mage/cards/d/DryadMilitant.java index 73c7909dee..ceb349f4ca 100644 --- a/Mage.Sets/src/mage/cards/d/DryadMilitant.java +++ b/Mage.Sets/src/mage/cards/d/DryadMilitant.java @@ -114,7 +114,7 @@ class DryadMilitantReplacementEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (((ZoneChangeEvent)event).getToZone() == Zone.GRAVEYARD) { Card card = game.getCard(event.getTargetId()); - if (card != null && (card.getCardType().contains(CardType.SORCERY) || card.getCardType().contains(CardType.INSTANT))) { + if (card != null && (card.isSorcery() || card.isInstant())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/d/Duplicant.java b/Mage.Sets/src/mage/cards/d/Duplicant.java index 8f0b960c65..b19d11d612 100644 --- a/Mage.Sets/src/mage/cards/d/Duplicant.java +++ b/Mage.Sets/src/mage/cards/d/Duplicant.java @@ -145,7 +145,7 @@ class DuplicantContinuousEffect extends ContinuousEffectImpl { if (permanent != null) { if(!permanent.getImprinted().isEmpty()){ Card card = game.getCard(permanent.getImprinted().get(0)); - if(card != null && card.getCardType().contains(CardType.CREATURE)) + if(card != null && card.isCreature()) { switch (layer) { case TypeChangingEffects_4: diff --git a/Mage.Sets/src/mage/cards/e/EchoingCalm.java b/Mage.Sets/src/mage/cards/e/EchoingCalm.java index 6c8809362a..4463e071ce 100644 --- a/Mage.Sets/src/mage/cards/e/EchoingCalm.java +++ b/Mage.Sets/src/mage/cards/e/EchoingCalm.java @@ -86,7 +86,7 @@ class EchoingCalmEffect extends OneShotEffect { permanent.destroy(source.getSourceId(), game, false); if (!permanent.getName().isEmpty()) { // in case of face down enchantment creature for (Permanent perm : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { - if (!perm.getId().equals(permanent.getId()) && perm.getName().equals(permanent.getName()) && perm.getCardType().contains(CardType.ENCHANTMENT)) { + if (!perm.getId().equals(permanent.getId()) && perm.getName().equals(permanent.getName()) && perm.isEnchantment()) { perm.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/e/EchoingRuin.java b/Mage.Sets/src/mage/cards/e/EchoingRuin.java index b985de7781..dbcefee6bb 100644 --- a/Mage.Sets/src/mage/cards/e/EchoingRuin.java +++ b/Mage.Sets/src/mage/cards/e/EchoingRuin.java @@ -94,7 +94,7 @@ class EchoingRuinEffect extends OneShotEffect { permanent.destroy(source.getSourceId(), game, false); if (!permanent.getName().isEmpty()) { // in case of face down artifact creature for (Permanent perm : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { - if (!perm.getId().equals(permanent.getId()) && perm.getName().equals(permanent.getName()) && perm.getCardType().contains(CardType.ARTIFACT)) { + if (!perm.getId().equals(permanent.getId()) && perm.getName().equals(permanent.getName()) && perm.isArtifact()) { perm.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/e/Electropotence.java b/Mage.Sets/src/mage/cards/e/Electropotence.java index ce8a1ee1ff..e18c15f916 100644 --- a/Mage.Sets/src/mage/cards/e/Electropotence.java +++ b/Mage.Sets/src/mage/cards/e/Electropotence.java @@ -89,7 +89,7 @@ class ElectropotenceTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) + if (permanent != null && permanent.isCreature() && permanent.getControllerId().equals(this.controllerId)) { this.getEffects().get(0).setValue("damageSource", event.getTargetId()); return true; diff --git a/Mage.Sets/src/mage/cards/e/ElspethTirel.java b/Mage.Sets/src/mage/cards/e/ElspethTirel.java index 5cb14a34fc..1afc3ed89a 100644 --- a/Mage.Sets/src/mage/cards/e/ElspethTirel.java +++ b/Mage.Sets/src/mage/cards/e/ElspethTirel.java @@ -113,7 +113,7 @@ class ElspethTirelThirdEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (Permanent perm : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { - if (!perm.getId().equals(source.getSourceId()) && !(perm instanceof PermanentToken) && !(perm.getCardType().contains(CardType.LAND))) { + if (!perm.getId().equals(source.getSourceId()) && !(perm instanceof PermanentToken) && !(perm.isLand())) { perm.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/e/EmperorCrocodile.java b/Mage.Sets/src/mage/cards/e/EmperorCrocodile.java index b33bcde5ee..ea8ccec5f0 100644 --- a/Mage.Sets/src/mage/cards/e/EmperorCrocodile.java +++ b/Mage.Sets/src/mage/cards/e/EmperorCrocodile.java @@ -84,7 +84,7 @@ class EmperorCrocodileStateTriggeredAbility extends StateTriggeredAbility { @Override public boolean checkTrigger(GameEvent event, Game game) { for (Permanent perm : game.getBattlefield().getAllActivePermanents(controllerId)) { - if (!perm.getId().equals(this.getSourceId()) && perm.getCardType().contains(CardType.CREATURE)) { + if (!perm.getId().equals(this.getSourceId()) && perm.isCreature()) { return false; } } diff --git a/Mage.Sets/src/mage/cards/e/EncirclingFissure.java b/Mage.Sets/src/mage/cards/e/EncirclingFissure.java index 32e8a8f4a1..0ee475fbd9 100644 --- a/Mage.Sets/src/mage/cards/e/EncirclingFissure.java +++ b/Mage.Sets/src/mage/cards/e/EncirclingFissure.java @@ -91,7 +91,7 @@ class EncirclingFissurePreventEffect extends PreventionEffectImpl { if (damageEvent.isCombatDamage()) { Permanent permanent = game.getPermanent(damageEvent.getSourceId()); if (permanent != null - && permanent.getCardType().contains(CardType.CREATURE) + && permanent.isCreature() && permanent.getControllerId().equals(getTargetPointer().getFirst(game, source))) { return true; } diff --git a/Mage.Sets/src/mage/cards/e/EndHostilities.java b/Mage.Sets/src/mage/cards/e/EndHostilities.java index 7ce390e230..2f21308aca 100644 --- a/Mage.Sets/src/mage/cards/e/EndHostilities.java +++ b/Mage.Sets/src/mage/cards/e/EndHostilities.java @@ -85,11 +85,11 @@ class EndHostilitiesEffect extends OneShotEffect { if (controller != null) { ArrayList toDestroy = new ArrayList<>(); for (Permanent permanent : game.getBattlefield().getActivePermanents(controller.getId(), game)) { - if (permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent.isCreature()) { toDestroy.add(permanent); } else if (permanent.getAttachedTo() != null) { Permanent attachedTo = game.getPermanent(permanent.getAttachedTo()); - if (attachedTo != null && attachedTo.getCardType().contains(CardType.CREATURE)) { + if (attachedTo != null && attachedTo.isCreature()) { toDestroy.add(permanent); } } diff --git a/Mage.Sets/src/mage/cards/e/EnduringRenewal.java b/Mage.Sets/src/mage/cards/e/EnduringRenewal.java index 4c910b909c..3f0c2bc2c3 100644 --- a/Mage.Sets/src/mage/cards/e/EnduringRenewal.java +++ b/Mage.Sets/src/mage/cards/e/EnduringRenewal.java @@ -120,7 +120,7 @@ class EnduringRenewalReplacementEffect extends ReplacementEffectImpl { Cards cards = new CardsImpl(); cards.add(card); controller.revealCards("Top card of " + controller.getName() + "'s library", cards, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { controller.moveCards(card, Zone.GRAVEYARD, source, game); return true; } diff --git a/Mage.Sets/src/mage/cards/e/EnduringScalelord.java b/Mage.Sets/src/mage/cards/e/EnduringScalelord.java index 9a68794c2d..5657a55a73 100644 --- a/Mage.Sets/src/mage/cards/e/EnduringScalelord.java +++ b/Mage.Sets/src/mage/cards/e/EnduringScalelord.java @@ -100,7 +100,7 @@ class EnduringScalelordTriggeredAbility extends TriggeredAbilityImpl { } return (permanent != null && !event.getTargetId().equals(this.getSourceId()) - && permanent.getCardType().contains(CardType.CREATURE) + && permanent.isCreature() && permanent.getControllerId().equals(this.getControllerId())); } return false; diff --git a/Mage.Sets/src/mage/cards/e/ErebossTitan.java b/Mage.Sets/src/mage/cards/e/ErebossTitan.java index e3ebee7f1d..2790479924 100644 --- a/Mage.Sets/src/mage/cards/e/ErebossTitan.java +++ b/Mage.Sets/src/mage/cards/e/ErebossTitan.java @@ -118,7 +118,7 @@ class ErebossTitanTriggeredAbility extends TriggeredAbilityImpl { Card card = game.getCard(zEvent.getTargetId()); Player controller = game.getPlayer(getControllerId()); return card != null - && card.getCardType().contains(CardType.CREATURE) + && card.isCreature() && controller != null && controller.hasOpponent(card.getOwnerId(), game); } diff --git a/Mage.Sets/src/mage/cards/e/ErraticExplosion.java b/Mage.Sets/src/mage/cards/e/ErraticExplosion.java index 94848da55f..e728b7f444 100644 --- a/Mage.Sets/src/mage/cards/e/ErraticExplosion.java +++ b/Mage.Sets/src/mage/cards/e/ErraticExplosion.java @@ -93,7 +93,7 @@ class ErraticExplosionEffect extends OneShotEffect { while (nonLandCard == null && controller.getLibrary().size() > 0) { Card card = controller.getLibrary().removeFromTop(game); toReveal.add(card); - if (!card.getCardType().contains(CardType.LAND)) { + if (!card.isLand()) { nonLandCard = card; } } diff --git a/Mage.Sets/src/mage/cards/e/ErraticMutation.java b/Mage.Sets/src/mage/cards/e/ErraticMutation.java index 1383bfb31a..ee26f54c25 100644 --- a/Mage.Sets/src/mage/cards/e/ErraticMutation.java +++ b/Mage.Sets/src/mage/cards/e/ErraticMutation.java @@ -98,7 +98,7 @@ class ErraticMutationEffect extends OneShotEffect { while (nonLandCard == null && controller.getLibrary().size() > 0) { Card card = controller.getLibrary().removeFromTop(game); toReveal.add(card); - if (!card.getCardType().contains(CardType.LAND)) { + if (!card.isLand()) { nonLandCard = card; } } diff --git a/Mage.Sets/src/mage/cards/e/EssenceOfTheWild.java b/Mage.Sets/src/mage/cards/e/EssenceOfTheWild.java index 5f04e1650b..14eb71058c 100644 --- a/Mage.Sets/src/mage/cards/e/EssenceOfTheWild.java +++ b/Mage.Sets/src/mage/cards/e/EssenceOfTheWild.java @@ -91,7 +91,7 @@ class EssenceOfTheWildEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { Permanent perm = ((EntersTheBattlefieldEvent) event).getTarget(); - return perm != null && perm.getCardType().contains(CardType.CREATURE) && perm.getControllerId().equals(source.getControllerId()); + return perm != null && perm.isCreature() && perm.getControllerId().equals(source.getControllerId()); } @Override diff --git a/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java b/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java index f7ee573b05..0e51e7d765 100644 --- a/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java +++ b/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java @@ -99,7 +99,7 @@ class EtherswornCanonistWatcher extends Watcher { spell = (Spell) mageObject; } } - if (spell != null && !spell.getCardType().contains(CardType.ARTIFACT)) { + if (spell != null && !spell.isArtifact()) { castNonartifactSpell.add(event.getPlayerId()); } } @@ -145,7 +145,7 @@ class EtherswornCanonistReplacementEffect extends ContinuousRuleModifyingEffectI @Override public boolean applies(GameEvent event, Ability source, Game game) { Card card = game.getCard(event.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.ARTIFACT)) { + if (card != null && !card.isArtifact()) { EtherswornCanonistWatcher watcher = (EtherswornCanonistWatcher) game.getState().getWatchers().get(EtherswornCanonistWatcher.class.getName()); return watcher != null && watcher.castNonArtifactSpell(event.getPlayerId()); } diff --git a/Mage.Sets/src/mage/cards/e/ExplorersScope.java b/Mage.Sets/src/mage/cards/e/ExplorersScope.java index a398bb9ab4..58c79d9f4c 100644 --- a/Mage.Sets/src/mage/cards/e/ExplorersScope.java +++ b/Mage.Sets/src/mage/cards/e/ExplorersScope.java @@ -101,7 +101,7 @@ class ExplorersScopeEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.add(card); controller.lookAtCards(sourceObject.getIdName(), cards, game); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { String message = "Put " + card.getLogName() + " onto the battlefield tapped?"; if (controller.chooseUse(Outcome.PutLandInPlay, message, source, game)) { controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null); diff --git a/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java b/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java index 088f136132..10eac472bd 100644 --- a/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java +++ b/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java @@ -97,7 +97,7 @@ class ExplosiveRevelationEffect extends OneShotEffect { if (card != null) { cards.add(card); } - } while (library.size() > 0 && card != null && card.getCardType().contains(CardType.LAND)); + } while (library.size() > 0 && card != null && card.isLand()); // reveal cards if (!cards.isEmpty()) { player.revealCards("Explosive Revelation", cards, game); diff --git a/Mage.Sets/src/mage/cards/e/ExtraplanarLens.java b/Mage.Sets/src/mage/cards/e/ExtraplanarLens.java index 6ad2bbcbc1..734e4736ed 100644 --- a/Mage.Sets/src/mage/cards/e/ExtraplanarLens.java +++ b/Mage.Sets/src/mage/cards/e/ExtraplanarLens.java @@ -145,7 +145,7 @@ class ExtraplanarLensTriggeredAbility extends TriggeredManaAbility { if (imprinted != null && game.getState().getZone(imprinted.getId()) == Zone.EXILED) { if (landTappedForMana.getName().equals(imprinted.getName()) - && landTappedForMana.getCardType().contains(CardType.LAND)) { + && landTappedForMana.isLand()) { ManaEvent mEvent = (ManaEvent) event; for (Effect effect : getEffects()) { effect.setValue("mana", mEvent.getMana()); diff --git a/Mage.Sets/src/mage/cards/e/EyeOfTheStorm.java b/Mage.Sets/src/mage/cards/e/EyeOfTheStorm.java index 5029bfca0d..b6bad69680 100644 --- a/Mage.Sets/src/mage/cards/e/EyeOfTheStorm.java +++ b/Mage.Sets/src/mage/cards/e/EyeOfTheStorm.java @@ -105,7 +105,7 @@ class EyeOfTheStormAbility extends TriggeredAbilityImpl { && !spell.isCopy() && spell.getCard() != null && !spell.getCard().isCopy() - && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) { + && (spell.isInstant() || spell.isSorcery())) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } diff --git a/Mage.Sets/src/mage/cards/f/FalkenrathNoble.java b/Mage.Sets/src/mage/cards/f/FalkenrathNoble.java index 3ce7fab4a0..7cd9b755b0 100644 --- a/Mage.Sets/src/mage/cards/f/FalkenrathNoble.java +++ b/Mage.Sets/src/mage/cards/f/FalkenrathNoble.java @@ -103,7 +103,7 @@ class FalkenrathNobleTriggeredAbility extends TriggeredAbilityImpl { if (permanent.getId().equals(this.getSourceId())) { return true; } else { - if (permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/f/FathomTrawl.java b/Mage.Sets/src/mage/cards/f/FathomTrawl.java index 60da0b57b9..44ab2225de 100644 --- a/Mage.Sets/src/mage/cards/f/FathomTrawl.java +++ b/Mage.Sets/src/mage/cards/f/FathomTrawl.java @@ -94,7 +94,7 @@ public class FathomTrawl extends CardImpl { Card card = controller.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if (!card.getCardType().contains(CardType.LAND)) { + if (!card.isLand()) { nonlandCards.add(card); if (nonlandCards.size() == 3) { break; diff --git a/Mage.Sets/src/mage/cards/f/FellShepherd.java b/Mage.Sets/src/mage/cards/f/FellShepherd.java index 0eb3fa2ac5..c3baaa8425 100644 --- a/Mage.Sets/src/mage/cards/f/FellShepherd.java +++ b/Mage.Sets/src/mage/cards/f/FellShepherd.java @@ -120,7 +120,7 @@ class FellShepherdWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) { MageObject card = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (card != null && ((Card)card).getOwnerId().equals(this.controllerId) && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && ((Card)card).getOwnerId().equals(this.controllerId) && card.isCreature()) { creatureIds.add(card.getId()); } } diff --git a/Mage.Sets/src/mage/cards/f/FiendslayerPaladin.java b/Mage.Sets/src/mage/cards/f/FiendslayerPaladin.java index 465fb31098..567bf43517 100644 --- a/Mage.Sets/src/mage/cards/f/FiendslayerPaladin.java +++ b/Mage.Sets/src/mage/cards/f/FiendslayerPaladin.java @@ -123,8 +123,8 @@ class FiendslayerPaladinEffect extends ContinuousRuleModifyingEffectImpl { if (targetCard != null && stackObject != null && targetCard.getId().equals(source.getSourceId())) { if (stackObject.getColor(game).isBlack() || stackObject.getColor(game).isRed()) { if (!stackObject.getControllerId().equals(source.getControllerId()) - && stackObject.getCardType().contains(CardType.INSTANT) - || stackObject.getCardType().contains(CardType.SORCERY)) { + && stackObject.isInstant() + || stackObject.isSorcery()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/f/FireServant.java b/Mage.Sets/src/mage/cards/f/FireServant.java index eec81b8f1a..8b52c1977e 100644 --- a/Mage.Sets/src/mage/cards/f/FireServant.java +++ b/Mage.Sets/src/mage/cards/f/FireServant.java @@ -100,7 +100,7 @@ class FireServantEffect extends ReplacementEffectImpl { return spell != null && spell.getControllerId().equals(source.getControllerId()) && spell.getColor(game).isRed() && - (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY)); + (spell.isInstant() || spell.isSorcery()); } @Override diff --git a/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java b/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java index e38b502b6e..86e829a90e 100644 --- a/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java +++ b/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java @@ -98,7 +98,7 @@ class FlayerTriggeredAbility extends TriggeredAbilityImpl { Permanent permanent = game.getPermanent(event.getTargetId()); if (((EntersTheBattlefieldEvent) event).getFromZone() == Zone.GRAVEYARD && permanent.getOwnerId().equals(controllerId) - && permanent.getCardType().contains(CardType.CREATURE)) { + && permanent.isCreature()) { Effect effect = this.getEffects().get(0); effect.setValue("damageSource", event.getTargetId()); return true; diff --git a/Mage.Sets/src/mage/cards/f/FlayingTendrils.java b/Mage.Sets/src/mage/cards/f/FlayingTendrils.java index 4d5ce32f4b..b1012af931 100644 --- a/Mage.Sets/src/mage/cards/f/FlayingTendrils.java +++ b/Mage.Sets/src/mage/cards/f/FlayingTendrils.java @@ -106,7 +106,7 @@ class FlayingTendrilsReplacementEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { ZoneChangeEvent zce = (ZoneChangeEvent) event; - return zce.isDiesEvent() && zce.getTarget().getCardType().contains(CardType.CREATURE); + return zce.isDiesEvent() && zce.getTarget().isCreature(); } } diff --git a/Mage.Sets/src/mage/cards/f/FleshAllergy.java b/Mage.Sets/src/mage/cards/f/FleshAllergy.java index 98eda82846..6d89d970a0 100644 --- a/Mage.Sets/src/mage/cards/f/FleshAllergy.java +++ b/Mage.Sets/src/mage/cards/f/FleshAllergy.java @@ -98,7 +98,7 @@ class FleshAllergyWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) { MageObject card = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { creaturesDiedThisTurn++; } } diff --git a/Mage.Sets/src/mage/cards/f/FlourishingDefenses.java b/Mage.Sets/src/mage/cards/f/FlourishingDefenses.java index 10c26d08d0..a902410c38 100644 --- a/Mage.Sets/src/mage/cards/f/FlourishingDefenses.java +++ b/Mage.Sets/src/mage/cards/f/FlourishingDefenses.java @@ -89,7 +89,7 @@ class FlourishingDefensesTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getData().equals(CounterType.M1M1.getName())) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/f/FrontierSiege.java b/Mage.Sets/src/mage/cards/f/FrontierSiege.java index 38e6ae50a5..d84289ae34 100644 --- a/Mage.Sets/src/mage/cards/f/FrontierSiege.java +++ b/Mage.Sets/src/mage/cards/f/FrontierSiege.java @@ -154,8 +154,8 @@ class FrontierSiegeFightEffect extends OneShotEffect { Permanent target = game.getPermanent(source.getFirstTarget()); if (triggeredCreature != null && target != null - && triggeredCreature.getCardType().contains(CardType.CREATURE) - && target.getCardType().contains(CardType.CREATURE)) { + && triggeredCreature.isCreature() + && target.isCreature()) { triggeredCreature.fight(target, source, game); return true; } diff --git a/Mage.Sets/src/mage/cards/f/FrozenAether.java b/Mage.Sets/src/mage/cards/f/FrozenAether.java index d3c1bbbef2..9b99c1e778 100644 --- a/Mage.Sets/src/mage/cards/f/FrozenAether.java +++ b/Mage.Sets/src/mage/cards/f/FrozenAether.java @@ -96,9 +96,9 @@ class FrozenAetherTapEffect extends ReplacementEffectImpl { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); if (permanent != null - && (permanent.getCardType().contains(CardType.CREATURE) - || permanent.getCardType().contains(CardType.LAND) - || permanent.getCardType().contains(CardType.ARTIFACT))) { + && (permanent.isCreature() + || permanent.isLand() + || permanent.isArtifact())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GaddockTeeg.java b/Mage.Sets/src/mage/cards/g/GaddockTeeg.java index f8ee5c2eb9..e4f9016f97 100644 --- a/Mage.Sets/src/mage/cards/g/GaddockTeeg.java +++ b/Mage.Sets/src/mage/cards/g/GaddockTeeg.java @@ -102,7 +102,7 @@ class GaddockTeegReplacementEffect4 extends ContinuousRuleModifyingEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { Card card = game.getCard(event.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.CREATURE) && card.getConvertedManaCost() >= 4) { + if (card != null && !card.isCreature() && card.getConvertedManaCost() >= 4) { return true; } return false; @@ -139,7 +139,7 @@ class GaddockTeegReplacementEffectX extends ContinuousRuleModifyingEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { Card card = game.getCard(event.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.CREATURE) && card.getManaCost().getText().contains("X")) { + if (card != null && !card.isCreature() && card.getManaCost().getText().contains("X")) { return true; } return false; diff --git a/Mage.Sets/src/mage/cards/g/GaeasHerald.java b/Mage.Sets/src/mage/cards/g/GaeasHerald.java index b273066766..f21a71668c 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasHerald.java +++ b/Mage.Sets/src/mage/cards/g/GaeasHerald.java @@ -100,7 +100,7 @@ class CantCounterEffect extends ContinuousRuleModifyingEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && spell.getCardType().contains(CardType.CREATURE)) { + if (spell != null && spell.isCreature()) { return true; } return false; diff --git a/Mage.Sets/src/mage/cards/g/Galvanoth.java b/Mage.Sets/src/mage/cards/g/Galvanoth.java index c786b872de..8f92d590be 100644 --- a/Mage.Sets/src/mage/cards/g/Galvanoth.java +++ b/Mage.Sets/src/mage/cards/g/Galvanoth.java @@ -89,7 +89,7 @@ class GalvanothEffect extends OneShotEffect { Cards cards = new CardsImpl(card); controller.lookAtCards("Galvanoth", cards, game); - if (card.getCardType().contains(CardType.INSTANT) || card.getCardType().contains(CardType.SORCERY)) { + if (card.isInstant() || card.isSorcery()) { StringBuilder message = new StringBuilder("Cast ").append(card.getName()).append(" without paying its mana cost?"); if (controller.chooseUse(Outcome.PlayForFree, message.toString(), source, game)) { controller.getLibrary().removeFromTop(game); diff --git a/Mage.Sets/src/mage/cards/g/GateToTheAether.java b/Mage.Sets/src/mage/cards/g/GateToTheAether.java index 7d1de57e85..3bc32a3635 100644 --- a/Mage.Sets/src/mage/cards/g/GateToTheAether.java +++ b/Mage.Sets/src/mage/cards/g/GateToTheAether.java @@ -88,10 +88,10 @@ class GateToTheAetherEffect extends OneShotEffect { Card card = activePlayer.getLibrary().getFromTop(game); if (card != null) { activePlayer.revealCards("Gate to the Aether", new CardsImpl(card), game); - if (card.getCardType().contains(CardType.ARTIFACT) - || card.getCardType().contains(CardType.CREATURE) - || card.getCardType().contains(CardType.ENCHANTMENT) - || card.getCardType().contains(CardType.LAND)) { + if (card.isArtifact() + || card.isCreature() + || card.isEnchantment() + || card.isLand()) { if (activePlayer.chooseUse(Outcome.PutCardInPlay, "Put " + card.getName() + " onto the battlefield?", source, game)) { activePlayer.moveCards(card, Zone.BATTLEFIELD, source, game); } diff --git a/Mage.Sets/src/mage/cards/g/GatherSpecimens.java b/Mage.Sets/src/mage/cards/g/GatherSpecimens.java index ccb0c8855e..3d299f9a7e 100644 --- a/Mage.Sets/src/mage/cards/g/GatherSpecimens.java +++ b/Mage.Sets/src/mage/cards/g/GatherSpecimens.java @@ -96,7 +96,7 @@ class GatherSpecimensReplacementEffect extends ReplacementEffectImpl { if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).getToZone().match(Zone.BATTLEFIELD)) { Card card = game.getCard(event.getTargetId()); - if (card.getCardType().contains(CardType.CREATURE)) { // TODO: Bestow Card cast as Enchantment probably not handled correctly + if (card.isCreature()) { // TODO: Bestow Card cast as Enchantment probably not handled correctly Player controller = game.getPlayer(source.getControllerId()); if (controller != null && controller.hasOpponent(event.getPlayerId(), game)) { return true; diff --git a/Mage.Sets/src/mage/cards/g/GazeOfGranite.java b/Mage.Sets/src/mage/cards/g/GazeOfGranite.java index 9334de9759..242bb2fba2 100644 --- a/Mage.Sets/src/mage/cards/g/GazeOfGranite.java +++ b/Mage.Sets/src/mage/cards/g/GazeOfGranite.java @@ -88,7 +88,7 @@ class GazeOfGraniteEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { - if (!permanent.getCardType().contains(CardType.LAND) && permanent.getConvertedManaCost() <= source.getManaCostsToPay().getX()) { + if (!permanent.isLand() && permanent.getConvertedManaCost() <= source.getManaCostsToPay().getX()) { permanent.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/g/GeneratorServant.java b/Mage.Sets/src/mage/cards/g/GeneratorServant.java index 7255b2791c..ba6375a97c 100644 --- a/Mage.Sets/src/mage/cards/g/GeneratorServant.java +++ b/Mage.Sets/src/mage/cards/g/GeneratorServant.java @@ -113,7 +113,7 @@ class GeneratorServantWatcher extends Watcher { if (event.getType() == GameEvent.EventType.MANA_PAYED) { MageObject target = game.getObject(event.getTargetId()); if (event.getSourceId() != null - && event.getSourceId().equals(this.getSourceId()) && target != null && target.getCardType().contains(CardType.CREATURE) && event.getFlag()) { + && event.getSourceId().equals(this.getSourceId()) && target != null && target.isCreature() && event.getFlag()) { if (target instanceof Spell) { this.creatures.add(((Spell) target).getCard().getId()); } diff --git a/Mage.Sets/src/mage/cards/g/Geosurge.java b/Mage.Sets/src/mage/cards/g/Geosurge.java index babe68c9f9..25efeb5894 100644 --- a/Mage.Sets/src/mage/cards/g/Geosurge.java +++ b/Mage.Sets/src/mage/cards/g/Geosurge.java @@ -79,7 +79,7 @@ class GeosurgeManaCondition implements Condition { public boolean apply(Game game, Ability source) { if (source instanceof SpellAbility) { Card card = game.getCard(source.getSourceId()); - if (card != null && (card.getCardType().contains(CardType.ARTIFACT) || card.getCardType().contains(CardType.CREATURE))) { + if (card != null && (card.isArtifact() || card.isCreature())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GhastlyConscription.java b/Mage.Sets/src/mage/cards/g/GhastlyConscription.java index 2349bb816e..948519adb2 100644 --- a/Mage.Sets/src/mage/cards/g/GhastlyConscription.java +++ b/Mage.Sets/src/mage/cards/g/GhastlyConscription.java @@ -110,7 +110,7 @@ class GhastlyConscriptionEffect extends OneShotEffect { newSource.setWorksFaceDown(true); for (Card card : cardsToManifest) { ManaCosts manaCosts = null; - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { manaCosts = card.getSpellAbility().getManaCosts(); if (manaCosts == null) { manaCosts = new ManaCostsImpl("{0}"); diff --git a/Mage.Sets/src/mage/cards/g/GiftOfTheGargantuan.java b/Mage.Sets/src/mage/cards/g/GiftOfTheGargantuan.java index 843b361c0e..9fdf7f99eb 100644 --- a/Mage.Sets/src/mage/cards/g/GiftOfTheGargantuan.java +++ b/Mage.Sets/src/mage/cards/g/GiftOfTheGargantuan.java @@ -99,10 +99,10 @@ class GiftOfTheGargantuanEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creatureCardFound = true; } - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { landCardFound = true; } } diff --git a/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java b/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java index d01d4c1882..a8c871dc7c 100644 --- a/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java +++ b/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java @@ -174,7 +174,7 @@ class GisaAndGeralfWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone() == Zone.GRAVEYARD) { Spell spell = (Spell) game.getObject(event.getTargetId()); - if (spell.getCardType().contains(CardType.CREATURE) && spell.getSubtype(game).contains("Zombie")) { + if (spell.isCreature() && spell.getSubtype(game).contains("Zombie")) { abilityUsed = true; } } diff --git a/Mage.Sets/src/mage/cards/g/GladehartCavalry.java b/Mage.Sets/src/mage/cards/g/GladehartCavalry.java index 293db5719f..8335c7afea 100644 --- a/Mage.Sets/src/mage/cards/g/GladehartCavalry.java +++ b/Mage.Sets/src/mage/cards/g/GladehartCavalry.java @@ -100,7 +100,7 @@ class GladehartCavalryTriggeredAbility extends TriggeredAbilityImpl { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); if (permanent != null && permanent.getControllerId().equals(this.getControllerId()) - && permanent.getCardType().contains(CardType.CREATURE) + && permanent.isCreature() && permanent.getCounters(game).getCount(CounterType.P1P1) > 0) { return true; } diff --git a/Mage.Sets/src/mage/cards/g/Gleancrawler.java b/Mage.Sets/src/mage/cards/g/Gleancrawler.java index 010f66d1cc..afe336499d 100644 --- a/Mage.Sets/src/mage/cards/g/Gleancrawler.java +++ b/Mage.Sets/src/mage/cards/g/Gleancrawler.java @@ -110,7 +110,7 @@ class GleancrawlerEffect extends OneShotEffect { for (MageObjectReference mor : cardsToGraveyardThisTurn) { if (game.getState().getZoneChangeCounter(mor.getSourceId()) == mor.getZoneChangeCounter()) { Card card = game.getCard(mor.getSourceId()); - if (card != null && card.getCardType().contains(CardType.CREATURE) + if (card != null && card.isCreature() && card.getOwnerId().equals(source.getControllerId())) { cardsToHand.add(card); } diff --git a/Mage.Sets/src/mage/cards/g/GlissaTheTraitor.java b/Mage.Sets/src/mage/cards/g/GlissaTheTraitor.java index 7a7ac78b98..9903b42dc8 100644 --- a/Mage.Sets/src/mage/cards/g/GlissaTheTraitor.java +++ b/Mage.Sets/src/mage/cards/g/GlissaTheTraitor.java @@ -110,7 +110,7 @@ class GlissaTheTraitorTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (((ZoneChangeEvent)event).isDiesEvent()) { Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (p != null && p.getCardType().contains(CardType.CREATURE) && game.getOpponents(this.getControllerId()).contains(p.getControllerId())) { + if (p != null && p.isCreature() && game.getOpponents(this.getControllerId()).contains(p.getControllerId())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/Gloom.java b/Mage.Sets/src/mage/cards/g/Gloom.java index f70e852c7c..c17e812073 100644 --- a/Mage.Sets/src/mage/cards/g/Gloom.java +++ b/Mage.Sets/src/mage/cards/g/Gloom.java @@ -102,7 +102,7 @@ class GloomCostIncreaseEffect extends CostModificationEffectImpl { if (isActivated) { MageObject permanent = game.getPermanent(abilityToModify.getSourceId()); if (permanent != null) { - isWhiteEnchantment = permanent.getCardType().contains(CardType.ENCHANTMENT) && permanent.getColor(game).isWhite(); + isWhiteEnchantment = permanent.isEnchantment() && permanent.getColor(game).isWhite(); } } return isActivated && isWhiteEnchantment; diff --git a/Mage.Sets/src/mage/cards/g/Glowrider.java b/Mage.Sets/src/mage/cards/g/Glowrider.java index 82f5761e1d..be7abb0d0a 100644 --- a/Mage.Sets/src/mage/cards/g/Glowrider.java +++ b/Mage.Sets/src/mage/cards/g/Glowrider.java @@ -93,7 +93,7 @@ class GlowriderCostReductionEffect extends CostModificationEffectImpl { public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { Card card = game.getCard(abilityToModify.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.CREATURE)) { + if (card != null && !card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GnarlrootTrapper.java b/Mage.Sets/src/mage/cards/g/GnarlrootTrapper.java index d46ce80949..0f13388480 100644 --- a/Mage.Sets/src/mage/cards/g/GnarlrootTrapper.java +++ b/Mage.Sets/src/mage/cards/g/GnarlrootTrapper.java @@ -117,7 +117,7 @@ class GnarlrootTrapperManaCondition extends CreatureCastManaCondition { if (super.apply(game, source)) { MageObject object = game.getObject(source.getSourceId()); if (object.hasSubtype("Elf", game) - && object.getCardType().contains(CardType.CREATURE)) { + && object.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java b/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java index c636034590..39c1ebf278 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java @@ -103,7 +103,7 @@ class GoblinCharbelcherEffect extends OneShotEffect { Card card = controller.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if (card.getCardType().contains(CardType.LAND)){ + if (card.isLand()){ landFound = true; if(card.getSubtype(game).contains("Mountain")){ isMountain = true; diff --git a/Mage.Sets/src/mage/cards/g/GoblinGuide.java b/Mage.Sets/src/mage/cards/g/GoblinGuide.java index ece722d2d6..ed74629a5d 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGuide.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGuide.java @@ -160,7 +160,7 @@ class GoblinGuideEffect extends OneShotEffect { if (card != null) { cards.add(card); defender.revealCards(sourceObject.getName(), cards, game); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { defender.moveCards(card, Zone.HAND, source, game); } } diff --git a/Mage.Sets/src/mage/cards/g/GoblinWelder.java b/Mage.Sets/src/mage/cards/g/GoblinWelder.java index f8b67411b6..0a7784f954 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWelder.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWelder.java @@ -98,8 +98,8 @@ public class GoblinWelder extends CardImpl { Zone currentZone = game.getState().getZone(card.getId()); Player owner = game.getPlayer(card.getOwnerId()); if (owner != null - && artifact.getCardType().contains(CardType.ARTIFACT) - && card.getCardType().contains(CardType.ARTIFACT) + && artifact.isArtifact() + && card.isArtifact() && currentZone == Zone.GRAVEYARD && card.getOwnerId().equals(artifact.getControllerId())) { boolean sacrifice = artifact.sacrifice(source.getSourceId(), game); diff --git a/Mage.Sets/src/mage/cards/g/GolemsHeart.java b/Mage.Sets/src/mage/cards/g/GolemsHeart.java index cb15a29fcd..2ab886d12d 100644 --- a/Mage.Sets/src/mage/cards/g/GolemsHeart.java +++ b/Mage.Sets/src/mage/cards/g/GolemsHeart.java @@ -86,7 +86,7 @@ class GolemsHeartAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); - return spell != null && spell.getCardType().contains(CardType.ARTIFACT); + return spell != null && spell.isArtifact(); } @Override diff --git a/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java b/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java index c5dfd84396..b28a3b874d 100644 --- a/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java +++ b/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java @@ -195,7 +195,7 @@ class GontiLordOfLuxuryCastFromExileEffect extends AsThoughEffectImpl { && affectedControllerId.equals(source.getControllerId())) { Card card = game.getCard(objectId); // TODO: Allow to cast Zoetic Cavern face down - return card != null && !card.getCardType().contains(CardType.LAND); + return card != null && !card.isLand(); } return false; } diff --git a/Mage.Sets/src/mage/cards/g/GrafdiggersCage.java b/Mage.Sets/src/mage/cards/g/GrafdiggersCage.java index 798f868dbc..358ec75623 100644 --- a/Mage.Sets/src/mage/cards/g/GrafdiggersCage.java +++ b/Mage.Sets/src/mage/cards/g/GrafdiggersCage.java @@ -96,7 +96,7 @@ class GrafdiggersCageEffect extends ContinuousRuleModifyingEffectImpl { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getToZone() == Zone.BATTLEFIELD && (zEvent.getFromZone() == Zone.GRAVEYARD || zEvent.getFromZone() == Zone.LIBRARY)) { Card card = game.getCard(zEvent.getTargetId()); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GrandAbolisher.java b/Mage.Sets/src/mage/cards/g/GrandAbolisher.java index 3eb9c5964b..df26b49d40 100644 --- a/Mage.Sets/src/mage/cards/g/GrandAbolisher.java +++ b/Mage.Sets/src/mage/cards/g/GrandAbolisher.java @@ -117,8 +117,8 @@ class GrandAbolisherEffect extends ContinuousRuleModifyingEffectImpl { case ACTIVATE_ABILITY: Permanent permanent = game.getPermanent(event.getSourceId()); if (permanent != null) { - return permanent.getCardType().contains(CardType.ARTIFACT) || permanent.getCardType().contains(CardType.CREATURE) - || permanent.getCardType().contains(CardType.ENCHANTMENT); + return permanent.isArtifact() || permanent.isCreature() + || permanent.isEnchantment(); } } } diff --git a/Mage.Sets/src/mage/cards/g/GrandArchitect.java b/Mage.Sets/src/mage/cards/g/GrandArchitect.java index 03b2903bce..5bff9e7603 100644 --- a/Mage.Sets/src/mage/cards/g/GrandArchitect.java +++ b/Mage.Sets/src/mage/cards/g/GrandArchitect.java @@ -172,7 +172,7 @@ class GrandArchitectManaCondition implements Condition { @Override public boolean apply(Game game, Ability source) { MageObject object = game.getObject(source.getSourceId()); - if (object != null && object.getCardType().contains(CardType.ARTIFACT)) { + if (object != null && object.isArtifact()) { return true; } return false; diff --git a/Mage.Sets/src/mage/cards/g/GratuitousViolence.java b/Mage.Sets/src/mage/cards/g/GratuitousViolence.java index c147163585..2465d48dde 100644 --- a/Mage.Sets/src/mage/cards/g/GratuitousViolence.java +++ b/Mage.Sets/src/mage/cards/g/GratuitousViolence.java @@ -95,7 +95,7 @@ class GratuitousViolenceReplacementEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); return permanent != null - && permanent.getCardType().contains(CardType.CREATURE) + && permanent.isCreature() && permanent.getControllerId().equals(source.getControllerId()); } diff --git a/Mage.Sets/src/mage/cards/g/GraveBetrayal.java b/Mage.Sets/src/mage/cards/g/GraveBetrayal.java index 3896239246..a8f648af1a 100644 --- a/Mage.Sets/src/mage/cards/g/GraveBetrayal.java +++ b/Mage.Sets/src/mage/cards/g/GraveBetrayal.java @@ -103,7 +103,7 @@ class GraveBetrayalTriggeredAbility extends TriggeredAbilityImpl { if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent != null && !permanent.getControllerId().equals(this.getControllerId()) && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && !permanent.getControllerId().equals(this.getControllerId()) && permanent.isCreature()) { Card card = (Card) game.getObject(permanent.getId()); if (card != null) { Effect effect = new GraveBetrayalEffect(); diff --git a/Mage.Sets/src/mage/cards/g/GravePact.java b/Mage.Sets/src/mage/cards/g/GravePact.java index 62a9618e8c..044f75d37b 100644 --- a/Mage.Sets/src/mage/cards/g/GravePact.java +++ b/Mage.Sets/src/mage/cards/g/GravePact.java @@ -95,7 +95,7 @@ class GravePactTriggeredAbility extends TriggeredAbilityImpl { if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent.getControllerId().equals(this.getControllerId()) && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent.getControllerId().equals(this.getControllerId()) && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GraveyardShovel.java b/Mage.Sets/src/mage/cards/g/GraveyardShovel.java index 08ee4a166d..bc9162be1e 100644 --- a/Mage.Sets/src/mage/cards/g/GraveyardShovel.java +++ b/Mage.Sets/src/mage/cards/g/GraveyardShovel.java @@ -98,7 +98,7 @@ class GraveyardShovelEffect extends OneShotEffect { if (card != null) { targetPlayer.getGraveyard().remove(card); card.moveToExile(null, "", source.getSourceId(), game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { controller.gainLife(2, game); } } diff --git a/Mage.Sets/src/mage/cards/g/GreatbowDoyen.java b/Mage.Sets/src/mage/cards/g/GreatbowDoyen.java index 96a8a37304..5a69f31ba3 100644 --- a/Mage.Sets/src/mage/cards/g/GreatbowDoyen.java +++ b/Mage.Sets/src/mage/cards/g/GreatbowDoyen.java @@ -113,7 +113,7 @@ class GreatbowDoyenTriggeredAbility extends TriggeredAbilityImpl { Permanent creature = game.getPermanent(event.getSourceId()); Permanent damagedCreature = game.getPermanent(event.getTargetId()); if (creature != null && damagedCreature != null - && creature.getCardType().contains(CardType.CREATURE) + && creature.isCreature() && creature.hasSubtype("Archer", game) && creature.getControllerId().equals(controllerId)) { this.getEffects().get(0).setValue("damageAmount", event.getAmount()); diff --git a/Mage.Sets/src/mage/cards/g/GrenzoDungeonWarden.java b/Mage.Sets/src/mage/cards/g/GrenzoDungeonWarden.java index 027aff19f0..6470844bb3 100644 --- a/Mage.Sets/src/mage/cards/g/GrenzoDungeonWarden.java +++ b/Mage.Sets/src/mage/cards/g/GrenzoDungeonWarden.java @@ -102,7 +102,7 @@ class GrenzoDungeonWardenEffect extends OneShotEffect { Card card = controller.getLibrary().getFromBottom(game); if (card != null) { controller.moveCards(card, Zone.GRAVEYARD, source, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (sourcePermanent != null && card.getPower().getValue() <= sourcePermanent.getPower().getValue()) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); diff --git a/Mage.Sets/src/mage/cards/g/GridMonitor.java b/Mage.Sets/src/mage/cards/g/GridMonitor.java index cf027edfdf..bc2aee4dd2 100644 --- a/Mage.Sets/src/mage/cards/g/GridMonitor.java +++ b/Mage.Sets/src/mage/cards/g/GridMonitor.java @@ -93,7 +93,7 @@ class GridMonitorEffect extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (event.getType() == GameEvent.EventType.CAST_SPELL && event.getPlayerId().equals(source.getControllerId())) { MageObject object = game.getObject(event.getSourceId()); - if (object.getCardType().contains(CardType.CREATURE)) { + if (object.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GrimContest.java b/Mage.Sets/src/mage/cards/g/GrimContest.java index dd8ddb5e47..65301ef86d 100644 --- a/Mage.Sets/src/mage/cards/g/GrimContest.java +++ b/Mage.Sets/src/mage/cards/g/GrimContest.java @@ -97,7 +97,7 @@ class GrimContestEffect extends OneShotEffect { Permanent creature1 = game.getPermanent(getTargetPointer().getFirst(game, source)); Permanent creature2 = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (creature1 != null && creature2 != null) { - if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) { + if (creature1.isCreature() && creature2.isCreature()) { creature1.damage(creature2.getToughness().getValue(), creature2.getId(), game, false, true); game.informPlayers(creature2.getLogName() + " deals " + creature2.getToughness().getValue() + " damage to " + creature1.getLogName()); creature2.damage(creature1.getToughness().getValue(), creature1.getId(), game, false, true); diff --git a/Mage.Sets/src/mage/cards/g/GrimoireOfTheDead.java b/Mage.Sets/src/mage/cards/g/GrimoireOfTheDead.java index e85f3b24b1..9217cef674 100644 --- a/Mage.Sets/src/mage/cards/g/GrimoireOfTheDead.java +++ b/Mage.Sets/src/mage/cards/g/GrimoireOfTheDead.java @@ -107,7 +107,7 @@ class GrimoireOfTheDeadEffect extends OneShotEffect { Set creatureCards = new LinkedHashSet<>(); for (Player player : game.getPlayers().values()) { for (Card card : player.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creatureCards.add(card); game.addEffect(new GrimoireOfTheDeadEffect2(card.getId()), source); } diff --git a/Mage.Sets/src/mage/cards/g/GruulRagebeast.java b/Mage.Sets/src/mage/cards/g/GruulRagebeast.java index ef0a930b68..6531538f6e 100644 --- a/Mage.Sets/src/mage/cards/g/GruulRagebeast.java +++ b/Mage.Sets/src/mage/cards/g/GruulRagebeast.java @@ -113,7 +113,7 @@ class GruulRagebeastTriggeredAbility extends TriggeredAbilityImpl { UUID targetId = event.getTargetId(); Permanent permanent = game.getPermanent(targetId); if (permanent.getControllerId().equals(this.controllerId) - && permanent.getCardType().contains(CardType.CREATURE) + && permanent.isCreature() && (targetId.equals(this.getSourceId()) || !targetId.equals(this.getSourceId()))) { for (Effect effect : this.getEffects()) { @@ -146,8 +146,8 @@ class GruulRagebeastEffect extends OneShotEffect { Permanent target = game.getPermanent(source.getFirstTarget()); if (triggeredCreature != null && target != null - && triggeredCreature.getCardType().contains(CardType.CREATURE) - && target.getCardType().contains(CardType.CREATURE)) { + && triggeredCreature.isCreature() + && target.isCreature()) { return triggeredCreature.fight(target, source, game); } return false; diff --git a/Mage.Sets/src/mage/cards/g/GuardianBeast.java b/Mage.Sets/src/mage/cards/g/GuardianBeast.java index cd5d602bd8..f88cd0d8a5 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianBeast.java +++ b/Mage.Sets/src/mage/cards/g/GuardianBeast.java @@ -145,9 +145,9 @@ class GuardianBeastConditionalEffect extends ContinuousRuleModifyingEffectImpl { } StackObject spell = game.getStack().getStackObject(event.getSourceId()); - if (event.getType() == EventType.LOSE_CONTROL || event.getType() == EventType.ATTACH || event.getType() == EventType.TARGET && spell != null && spell.getCardType().contains(CardType.ENCHANTMENT) && spell.getSubtype(game).contains("Aura")) { + if (event.getType() == EventType.LOSE_CONTROL || event.getType() == EventType.ATTACH || event.getType() == EventType.TARGET && spell != null && spell.isEnchantment() && spell.getSubtype(game).contains("Aura")) { for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { - if (perm != null && Objects.equals(perm.getId(), targetPermanent.getId()) && !perm.getCardType().contains(CardType.CREATURE)) { + if (perm != null && Objects.equals(perm.getId(), targetPermanent.getId()) && !perm.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfTazeem.java b/Mage.Sets/src/mage/cards/g/GuardianOfTazeem.java index c2aa41a301..8ac488e6c5 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfTazeem.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfTazeem.java @@ -113,7 +113,7 @@ class GuardianOfTazeemTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); if (permanent != null - && permanent.getCardType().contains(CardType.LAND) + && permanent.isLand() && permanent.getControllerId().equals(getControllerId())) { for (Effect effect : getEffects()) { if (effect instanceof GuardianOfTazeemEffect) { diff --git a/Mage.Sets/src/mage/cards/g/GutterGrime.java b/Mage.Sets/src/mage/cards/g/GutterGrime.java index de917824f2..d9dc8edc9c 100644 --- a/Mage.Sets/src/mage/cards/g/GutterGrime.java +++ b/Mage.Sets/src/mage/cards/g/GutterGrime.java @@ -108,7 +108,7 @@ class GutterGrimeTriggeredAbility extends TriggeredAbilityImpl { if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD && permanent.getControllerId().equals(this.controllerId) && (targetId.equals(this.getSourceId()) - || (permanent.getCardType().contains(CardType.CREATURE) + || (permanent.isCreature() && !(permanent instanceof PermanentToken)))) { return true; } diff --git a/Mage.Sets/src/mage/cards/h/HallOfGemstone.java b/Mage.Sets/src/mage/cards/h/HallOfGemstone.java index c2ed8244eb..00b1037b67 100644 --- a/Mage.Sets/src/mage/cards/h/HallOfGemstone.java +++ b/Mage.Sets/src/mage/cards/h/HallOfGemstone.java @@ -154,6 +154,6 @@ class HallOfGemstoneEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); - return permanent != null && permanent.getCardType().contains(CardType.LAND); + return permanent != null && permanent.isLand(); } } diff --git a/Mage.Sets/src/mage/cards/h/HallOfTheBanditLord.java b/Mage.Sets/src/mage/cards/h/HallOfTheBanditLord.java index 7b6a2d3b15..abfc3d8bcb 100644 --- a/Mage.Sets/src/mage/cards/h/HallOfTheBanditLord.java +++ b/Mage.Sets/src/mage/cards/h/HallOfTheBanditLord.java @@ -116,7 +116,7 @@ class HallOfTheBanditLordWatcher extends Watcher { MageObject target = game.getObject(event.getTargetId()); if (event.getSourceId() != null && event.getSourceId().equals(this.getSourceId()) - && target != null && target.getCardType().contains(CardType.CREATURE) + && target != null && target.isCreature() && event.getFlag()) { if (target instanceof Spell) { this.creatures.add(((Spell) target).getCard().getId()); diff --git a/Mage.Sets/src/mage/cards/h/HallowedMoonlight.java b/Mage.Sets/src/mage/cards/h/HallowedMoonlight.java index 4c5350ccf5..b0920e567a 100644 --- a/Mage.Sets/src/mage/cards/h/HallowedMoonlight.java +++ b/Mage.Sets/src/mage/cards/h/HallowedMoonlight.java @@ -108,7 +108,7 @@ class HallowedMoonlightEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { EntersTheBattlefieldEvent entersTheBattlefieldEvent = (EntersTheBattlefieldEvent) event; - if (entersTheBattlefieldEvent.getTarget().getCardType().contains(CardType.CREATURE)) { + if (entersTheBattlefieldEvent.getTarget().isCreature()) { CreatureWasCastWatcher watcher = (CreatureWasCastWatcher) game.getState().getWatchers().get("CreatureWasCast"); if (watcher != null && !watcher.wasCreatureCastThisTurn(event.getTargetId())) { return true; diff --git a/Mage.Sets/src/mage/cards/h/HamletbackGoliath.java b/Mage.Sets/src/mage/cards/h/HamletbackGoliath.java index c0fe849904..8739c60d5c 100644 --- a/Mage.Sets/src/mage/cards/h/HamletbackGoliath.java +++ b/Mage.Sets/src/mage/cards/h/HamletbackGoliath.java @@ -97,7 +97,7 @@ class HamletbackGoliathTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { UUID targetId = event.getTargetId(); Permanent permanent = game.getPermanent(targetId); - if (permanent.getCardType().contains(CardType.CREATURE) + if (permanent.isCreature() && !(targetId.equals(this.getSourceId()))) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); diff --git a/Mage.Sets/src/mage/cards/h/HandToHand.java b/Mage.Sets/src/mage/cards/h/HandToHand.java index a757256d44..25470bd8db 100644 --- a/Mage.Sets/src/mage/cards/h/HandToHand.java +++ b/Mage.Sets/src/mage/cards/h/HandToHand.java @@ -101,7 +101,7 @@ class HandToHandEffect extends ContinuousRuleModifyingEffectImpl { if (game.getPhase().getType() == TurnPhase.COMBAT) { MageObject object = game.getObject(event.getSourceId()); if (event.getType() == GameEvent.EventType.CAST_SPELL) { - if (object.getCardType().contains(CardType.INSTANT)) { + if (object.isInstant()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/h/HardenedScales.java b/Mage.Sets/src/mage/cards/h/HardenedScales.java index 61b5dbdbde..3268c0875e 100644 --- a/Mage.Sets/src/mage/cards/h/HardenedScales.java +++ b/Mage.Sets/src/mage/cards/h/HardenedScales.java @@ -100,7 +100,7 @@ class HardenedScalesEffect extends ReplacementEffectImpl { permanent = game.getPermanentEntering(event.getTargetId()); } if (permanent != null && permanent.getControllerId().equals(source.getControllerId()) - && permanent.getCardType().contains(CardType.CREATURE)) { + && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/h/HauntingWind.java b/Mage.Sets/src/mage/cards/h/HauntingWind.java index 095790f011..447bded4d1 100644 --- a/Mage.Sets/src/mage/cards/h/HauntingWind.java +++ b/Mage.Sets/src/mage/cards/h/HauntingWind.java @@ -86,7 +86,7 @@ class AbilityActivatedTriggeredAbility2 extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent isArtifact = game.getPermanent(event.getSourceId()); - return isArtifact != null && isArtifact.getCardType().contains(CardType.ARTIFACT); + return isArtifact != null && isArtifact.isArtifact(); } diff --git a/Mage.Sets/src/mage/cards/h/HavenOfTheSpiritDragon.java b/Mage.Sets/src/mage/cards/h/HavenOfTheSpiritDragon.java index 4c4a6a28cf..c45e74a5c1 100644 --- a/Mage.Sets/src/mage/cards/h/HavenOfTheSpiritDragon.java +++ b/Mage.Sets/src/mage/cards/h/HavenOfTheSpiritDragon.java @@ -124,7 +124,7 @@ class HavenOfTheSpiritManaCondition extends CreatureCastManaCondition { if (super.apply(game, source)) { MageObject object = game.getObject(source.getSourceId()); if (object.hasSubtype("Dragon", game) - && object.getCardType().contains(CardType.CREATURE)) { + && object.isCreature()) { return true; } } @@ -139,7 +139,7 @@ class DragonCreatureCardPredicate implements Predicate { @Override public boolean apply(Card input, Game game) { - return input.getCardType().contains(CardType.CREATURE) + return input.isCreature() && input.getSubtype(game).contains("Dragon"); } @@ -156,7 +156,7 @@ class UginPlaneswalkerCardPredicate implements Predicate { @Override public boolean apply(Card input, Game game) { - return input.getCardType().contains(CardType.PLANESWALKER) + return input.isPlaneswalker() && input.getName().contains("Ugin, the Spirit Dragon"); } diff --git a/Mage.Sets/src/mage/cards/h/HeartwoodStoryteller.java b/Mage.Sets/src/mage/cards/h/HeartwoodStoryteller.java index 1adc82a0ff..ad7bd8b223 100644 --- a/Mage.Sets/src/mage/cards/h/HeartwoodStoryteller.java +++ b/Mage.Sets/src/mage/cards/h/HeartwoodStoryteller.java @@ -94,7 +94,7 @@ class HeartwoodStorytellerTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && !spell.getCardType().contains(CardType.CREATURE)) { + if (spell != null && !spell.isCreature()) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getPlayerId())); } diff --git a/Mage.Sets/src/mage/cards/h/HedonistsTrove.java b/Mage.Sets/src/mage/cards/h/HedonistsTrove.java index 5ff769b203..0be70c68bb 100644 --- a/Mage.Sets/src/mage/cards/h/HedonistsTrove.java +++ b/Mage.Sets/src/mage/cards/h/HedonistsTrove.java @@ -139,7 +139,7 @@ class HedonistsTrovePlayLandEffect extends AsThoughEffectImpl { if (affectedControllerId.equals(source.getControllerId())) { Card card = game.getCard(objectId); MageObject sourceObject = source.getSourceObject(game); - if (card != null && card.getCardType().contains(CardType.LAND) && sourceObject != null) { + if (card != null && card.isLand() && sourceObject != null) { UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); if (exileId != null) { ExileZone exileZone = game.getState().getExile().getExileZone(exileId); @@ -182,7 +182,7 @@ class HedonistsTroveCastNonlandCardsEffect extends AsThoughEffectImpl { if (affectedControllerId.equals(source.getControllerId())) { Card card = game.getCard(objectId); MageObject sourceObject = source.getSourceObject(game); - if (card != null && !card.getCardType().contains(CardType.LAND) && sourceObject != null) { + if (card != null && !card.isLand() && sourceObject != null) { UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); if (exileId != null) { ExileZone exileZone = game.getState().getExile().getExileZone(exileId); diff --git a/Mage.Sets/src/mage/cards/h/HelmOfObedience.java b/Mage.Sets/src/mage/cards/h/HelmOfObedience.java index ea51d3f18c..09a1a14201 100644 --- a/Mage.Sets/src/mage/cards/h/HelmOfObedience.java +++ b/Mage.Sets/src/mage/cards/h/HelmOfObedience.java @@ -106,7 +106,7 @@ class HelmOfObedienceEffect extends OneShotEffect { Card card = targetOpponent.getLibrary().removeFromTop(game); if (card != null){ if (targetOpponent.moveCards(card, Zone.GRAVEYARD, source, game)) { - if(card.getCardType().contains(CardType.CREATURE)){ + if(card.isCreature()){ // If a creature card is put into that graveyard this way, sacrifice Helm of Obedience // and put that card onto the battlefield under your control. Permanent sourcePermanent = game.getPermanent(source.getSourceId()); diff --git a/Mage.Sets/src/mage/cards/h/HiveMind.java b/Mage.Sets/src/mage/cards/h/HiveMind.java index fd5c16a939..d0694c3801 100644 --- a/Mage.Sets/src/mage/cards/h/HiveMind.java +++ b/Mage.Sets/src/mage/cards/h/HiveMind.java @@ -89,8 +89,8 @@ class HiveMindTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && (spell.getCardType().contains(CardType.INSTANT) - || spell.getCardType().contains(CardType.SORCERY))) { + if (spell != null && (spell.isInstant() + || spell.isSorcery())) { for (Effect effect : getEffects()) { if (effect instanceof HiveMindEffect) { ((HiveMindEffect) effect).setTargetPointer(new FixedTarget(spell.getId())); diff --git a/Mage.Sets/src/mage/cards/h/HixusPrisonWarden.java b/Mage.Sets/src/mage/cards/h/HixusPrisonWarden.java index 3e38c91220..71bf5f2eb8 100644 --- a/Mage.Sets/src/mage/cards/h/HixusPrisonWarden.java +++ b/Mage.Sets/src/mage/cards/h/HixusPrisonWarden.java @@ -115,7 +115,7 @@ class HixusPrisonWardenTriggeredAbility extends TriggeredAbilityImpl { if (damageEvent.getPlayerId().equals(getControllerId()) && damageEvent.isCombatDamage() && sourcePermanent != null - && sourcePermanent.getCardType().contains(CardType.CREATURE)) { + && sourcePermanent.isCreature()) { getEffects().get(0).setTargetPointer(new FixedTarget(event.getSourceId())); return true; } diff --git a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java index c69e10b666..937c63f235 100644 --- a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java +++ b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java @@ -147,7 +147,7 @@ class HopeOfGhirapurCantCastEffect extends ContinuousRuleModifyingEffectImpl { Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); if (player != null && player.getId().equals(event.getPlayerId())) { Card card = game.getCard(event.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.CREATURE)) { + if (card != null && !card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/h/HorobiDeathsWail.java b/Mage.Sets/src/mage/cards/h/HorobiDeathsWail.java index 7fea611984..c01b48a6b2 100644 --- a/Mage.Sets/src/mage/cards/h/HorobiDeathsWail.java +++ b/Mage.Sets/src/mage/cards/h/HorobiDeathsWail.java @@ -98,7 +98,7 @@ class HorobiDeathsWailAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent creature = game.getPermanent(event.getTargetId()); - if (creature != null && creature.getCardType().contains(CardType.CREATURE)) { + if (creature != null && creature.isCreature()) { getEffects().get(0).setTargetPointer(new FixedTarget(event.getTargetId())); return true; } diff --git a/Mage.Sets/src/mage/cards/h/HowlOfTheHorde.java b/Mage.Sets/src/mage/cards/h/HowlOfTheHorde.java index 995d2d70ff..3f54681711 100644 --- a/Mage.Sets/src/mage/cards/h/HowlOfTheHorde.java +++ b/Mage.Sets/src/mage/cards/h/HowlOfTheHorde.java @@ -98,7 +98,7 @@ class HowlOfTheHordeDelayedTriggeredAbility extends DelayedTriggeredAbility { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) { + if (spell != null && (spell.isInstant() || spell.isSorcery())) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } diff --git a/Mage.Sets/src/mage/cards/h/HumOfTheRadix.java b/Mage.Sets/src/mage/cards/h/HumOfTheRadix.java index d7d19a3509..45eedf902a 100644 --- a/Mage.Sets/src/mage/cards/h/HumOfTheRadix.java +++ b/Mage.Sets/src/mage/cards/h/HumOfTheRadix.java @@ -92,7 +92,7 @@ class HumOfTheRadixCostIncreaseEffect extends CostModificationEffectImpl { public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify instanceof SpellAbility) { MageObject sourceObject = abilityToModify.getSourceObject(game); - if (sourceObject != null && sourceObject.getCardType().contains(CardType.ARTIFACT)) { + if (sourceObject != null && sourceObject.isArtifact()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/h/HushwingGryff.java b/Mage.Sets/src/mage/cards/h/HushwingGryff.java index 5327817932..bc35dd89e6 100644 --- a/Mage.Sets/src/mage/cards/h/HushwingGryff.java +++ b/Mage.Sets/src/mage/cards/h/HushwingGryff.java @@ -109,7 +109,7 @@ class HushwingGryffEffect extends ContinuousRuleModifyingEffectImpl { Ability ability = (Ability) getValue("targetAbility"); if (ability != null && ability.getAbilityType() == AbilityType.TRIGGERED) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java b/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java index 13fed98b4b..7178ddbb70 100644 --- a/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java +++ b/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java @@ -103,7 +103,7 @@ class IkraShidiqiTheUsurperTriggeredAbility extends TriggeredAbilityImpl { DamagedEvent damageEvent = (DamagedEvent) event; if (damageEvent.isCombatDamage()) { Permanent permanent = game.getPermanent(event.getSourceId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) && permanent.getControllerId().equals(this.getControllerId())) { + if (permanent != null && permanent.isCreature() && permanent.getControllerId().equals(this.getControllerId())) { this.getEffects().clear(); this.getEffects().add(new GainLifeEffect(permanent.getToughness().getValue())); return true; diff --git a/Mage.Sets/src/mage/cards/i/IllusionistsGambit.java b/Mage.Sets/src/mage/cards/i/IllusionistsGambit.java index 7d8b63b1be..be4f10b277 100644 --- a/Mage.Sets/src/mage/cards/i/IllusionistsGambit.java +++ b/Mage.Sets/src/mage/cards/i/IllusionistsGambit.java @@ -207,7 +207,7 @@ class IllusionistsGambitRestrictionEffect extends RestrictionEffect { // planeswalker Permanent permanent = game.getPermanent(defenderId); if (permanent != null && permanent.getControllerId().equals(source.getControllerId()) - && permanent.getCardType().contains(CardType.PLANESWALKER)) { + && permanent.isPlaneswalker()) { return false; } return true; diff --git a/Mage.Sets/src/mage/cards/i/ImposingSovereign.java b/Mage.Sets/src/mage/cards/i/ImposingSovereign.java index 325b8bd365..fa86368d26 100644 --- a/Mage.Sets/src/mage/cards/i/ImposingSovereign.java +++ b/Mage.Sets/src/mage/cards/i/ImposingSovereign.java @@ -100,7 +100,7 @@ class ImposingSovereignEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/i/ImprisonedInTheMoon.java b/Mage.Sets/src/mage/cards/i/ImprisonedInTheMoon.java index d0172a61ed..1b3f3cf3ee 100644 --- a/Mage.Sets/src/mage/cards/i/ImprisonedInTheMoon.java +++ b/Mage.Sets/src/mage/cards/i/ImprisonedInTheMoon.java @@ -128,7 +128,7 @@ class BecomesColorlessLandEffect extends ContinuousEffectImpl { permanent.addAbility(new ColorlessManaAbility(), source.getSourceId(), game); break; case TypeChangingEffects_4: - boolean isLand = permanent.getCardType().contains(CardType.LAND); + boolean isLand = permanent.isLand(); permanent.getCardType().clear(); permanent.getCardType().add(CardType.LAND); if (!isLand) { diff --git a/Mage.Sets/src/mage/cards/i/ImpulsiveWager.java b/Mage.Sets/src/mage/cards/i/ImpulsiveWager.java index e5702c3dac..3026668273 100644 --- a/Mage.Sets/src/mage/cards/i/ImpulsiveWager.java +++ b/Mage.Sets/src/mage/cards/i/ImpulsiveWager.java @@ -89,7 +89,7 @@ class ImpulsiveWagerEffect extends OneShotEffect { DiscardCardCost cost = (DiscardCardCost) source.getCosts().get(0); if (cost != null) { List cards = cost.getCards(); - if (cards.size() == 1 && cards.get(0).getCardType().contains(CardType.LAND)) { + if (cards.size() == 1 && cards.get(0).isLand()) { Effect effect = new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()); effect.setTargetPointer(getTargetPointer()); effect.apply(game, source); diff --git a/Mage.Sets/src/mage/cards/i/IndomitableCreativity.java b/Mage.Sets/src/mage/cards/i/IndomitableCreativity.java index ce5746db67..959c977c59 100644 --- a/Mage.Sets/src/mage/cards/i/IndomitableCreativity.java +++ b/Mage.Sets/src/mage/cards/i/IndomitableCreativity.java @@ -138,12 +138,12 @@ class IndomitableCreativityEffect extends OneShotEffect { } Card card = library.removeFromTop(game); cards.add(card); - while (!card.getCardType().contains(CardType.CREATURE) && !card.getCardType().contains(CardType.ARTIFACT) && library.size() > 0) { + while (!card.isCreature() && !card.isArtifact() && library.size() > 0) { card = library.removeFromTop(game); cards.add(card); } - if (card.getCardType().contains(CardType.CREATURE) || card.getCardType().contains(CardType.ARTIFACT)) { + if (card.isCreature() || card.isArtifact()) { controllerOfDestroyedCreature.moveCards(card, Zone.BATTLEFIELD, source, game); } diff --git a/Mage.Sets/src/mage/cards/i/InfernoTrap.java b/Mage.Sets/src/mage/cards/i/InfernoTrap.java index ce94507412..60f6cf0031 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoTrap.java +++ b/Mage.Sets/src/mage/cards/i/InfernoTrap.java @@ -118,7 +118,7 @@ class InfernoTrapWatcher extends Watcher { if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER && event.getTargetId().equals(controllerId)) { Permanent damageBy = game.getPermanentOrLKIBattlefield(event.getSourceId()); - if (damageBy != null && damageBy.getCardType().contains(CardType.CREATURE)) { + if (damageBy != null && damageBy.isCreature()) { Set damagingCreatures; if (playerDamagedByCreature.containsKey(event.getTargetId())) { damagingCreatures = playerDamagedByCreature.get(event.getTargetId()); diff --git a/Mage.Sets/src/mage/cards/i/InfiniteReflection.java b/Mage.Sets/src/mage/cards/i/InfiniteReflection.java index 41386cb121..2e05b9a688 100644 --- a/Mage.Sets/src/mage/cards/i/InfiniteReflection.java +++ b/Mage.Sets/src/mage/cards/i/InfiniteReflection.java @@ -143,7 +143,7 @@ class InfiniteReflectionEntersBattlefieldEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); return permanent != null && permanent.getControllerId().equals(source.getControllerId()) - && permanent.getCardType().contains(CardType.CREATURE) + && permanent.isCreature() && !(permanent instanceof PermanentToken); } diff --git a/Mage.Sets/src/mage/cards/i/InkTreaderNephilim.java b/Mage.Sets/src/mage/cards/i/InkTreaderNephilim.java index a0d141b212..be0798a552 100644 --- a/Mage.Sets/src/mage/cards/i/InkTreaderNephilim.java +++ b/Mage.Sets/src/mage/cards/i/InkTreaderNephilim.java @@ -98,7 +98,7 @@ class InkTreaderNephilimTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); if (spell != null - && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) { + && (spell.isInstant() || spell.isSorcery())) { for (Effect effect : getEffects()) { effect.setValue("triggeringSpell", spell); } diff --git a/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java b/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java index 64f7ca19ff..abd0d595e8 100644 --- a/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java +++ b/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java @@ -120,8 +120,8 @@ class NonArtifactCreaturesDiedWatcher extends Watcher { if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.isDiesEvent() && zEvent.getTarget() != null - && zEvent.getTarget().getCardType().contains(CardType.CREATURE) - && !zEvent.getTarget().getCardType().contains(CardType.ARTIFACT)) { + && zEvent.getTarget().isCreature() + && !zEvent.getTarget().isArtifact()) { condition = true; } } diff --git a/Mage.Sets/src/mage/cards/i/Insist.java b/Mage.Sets/src/mage/cards/i/Insist.java index 3e5726247e..61005a0e34 100644 --- a/Mage.Sets/src/mage/cards/i/Insist.java +++ b/Mage.Sets/src/mage/cards/i/Insist.java @@ -149,7 +149,7 @@ class InsistWatcher extends Watcher { if (event.getType() == GameEvent.EventType.SPELL_CAST && ready) { if (uncounterableSpell == null && event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && (spell.getCardType().contains(CardType.CREATURE))) { + if (spell != null && (spell.isCreature())) { uncounterableSpell = spell.getId(); ready = false; } diff --git a/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java b/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java index f58b9d92ca..29a59add1b 100644 --- a/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java +++ b/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java @@ -160,7 +160,7 @@ class IntetTheDreamerCastEffect extends AsThoughEffectImpl { if (card != null && card.isFaceDown(game)) { ExileZone zone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter())); if (zone != null && zone.contains(card.getId())/* && CardUtil.cardCanBePlayedNow(card, controller.getId(), game)*/) { - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { if (game.canPlaySorcery(controller.getId()) && game.getPlayer(controller.getId()).canPlayLand()) { return controller.chooseUse(outcome, "Play " + card.getIdName() + '?', source, game); } diff --git a/Mage.Sets/src/mage/cards/i/InvokePrejudice.java b/Mage.Sets/src/mage/cards/i/InvokePrejudice.java index e520f8b110..08643ceac5 100644 --- a/Mage.Sets/src/mage/cards/i/InvokePrejudice.java +++ b/Mage.Sets/src/mage/cards/i/InvokePrejudice.java @@ -93,7 +93,7 @@ class InvokePrejudiceTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (game.getOpponents(getControllerId()).contains(event.getPlayerId())) { Spell spell = (Spell) game.getObject(event.getTargetId()); - if (spell != null && spell.getCardType().contains(CardType.CREATURE)) { + if (spell != null && spell.isCreature()) { boolean creatureSharesAColor = false; ObjectColor spellColor = spell.getColor(game); for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterControlledCreaturePermanent(), getControllerId(), game)) { diff --git a/Mage.Sets/src/mage/cards/i/IsolationCell.java b/Mage.Sets/src/mage/cards/i/IsolationCell.java index 55ce75edf5..3448052836 100644 --- a/Mage.Sets/src/mage/cards/i/IsolationCell.java +++ b/Mage.Sets/src/mage/cards/i/IsolationCell.java @@ -90,7 +90,7 @@ class IsolationCellTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (game.getOpponents(controllerId).contains(event.getPlayerId())) { Card card = game.getCard(event.getSourceId()); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); return true; } diff --git a/Mage.Sets/src/mage/cards/j/JarOfEyeballs.java b/Mage.Sets/src/mage/cards/j/JarOfEyeballs.java index dba5c02a64..2d8f599972 100644 --- a/Mage.Sets/src/mage/cards/j/JarOfEyeballs.java +++ b/Mage.Sets/src/mage/cards/j/JarOfEyeballs.java @@ -110,7 +110,7 @@ class JarOfEyeballsTriggeredAbility extends TriggeredAbilityImpl { if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent.getControllerId().equals(this.getControllerId()) && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent.getControllerId().equals(this.getControllerId()) && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/j/JeskaiInfiltrator.java b/Mage.Sets/src/mage/cards/j/JeskaiInfiltrator.java index 6dc8c59ee9..45a02339c0 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiInfiltrator.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiInfiltrator.java @@ -129,7 +129,7 @@ class JeskaiInfiltratorEffect extends OneShotEffect { newSource.setWorksFaceDown(true); for (Card card : cardsToManifest) { ManaCosts manaCosts = null; - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { manaCosts = card.getSpellAbility().getManaCosts(); if (manaCosts == null) { manaCosts = new ManaCostsImpl("{0}"); diff --git a/Mage.Sets/src/mage/cards/j/Justice.java b/Mage.Sets/src/mage/cards/j/Justice.java index 3a832152ac..edb9b80ad7 100644 --- a/Mage.Sets/src/mage/cards/j/Justice.java +++ b/Mage.Sets/src/mage/cards/j/Justice.java @@ -103,7 +103,7 @@ class JusticeTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { MageObject sourceObject = game.getObject(event.getSourceId()); if (sourceObject.getColor(game).isRed()) { - if (sourceObject instanceof Permanent && sourceObject.getCardType().contains(CardType.CREATURE) + if (sourceObject instanceof Permanent && sourceObject.isCreature() || sourceObject instanceof Spell) { this.getEffects().get(0).setValue("damageAmount", event.getAmount()); this.getEffects().get(0).setTargetPointer(new FixedTarget(game.getControllerId(sourceObject.getId()))); diff --git a/Mage.Sets/src/mage/cards/k/KalitasTraitorOfGhet.java b/Mage.Sets/src/mage/cards/k/KalitasTraitorOfGhet.java index 072fd8f1ce..b938e14868 100644 --- a/Mage.Sets/src/mage/cards/k/KalitasTraitorOfGhet.java +++ b/Mage.Sets/src/mage/cards/k/KalitasTraitorOfGhet.java @@ -151,10 +151,10 @@ class KalitasTraitorOfGhetEffect extends ReplacementEffectImpl { Permanent permanent = ((ZoneChangeEvent) event).getTarget(); if (permanent != null && game.getOpponents(source.getControllerId()).contains(permanent.getControllerId()) && !(permanent instanceof PermanentToken)) { if (zEvent.getTarget() != null) { // if it comes from permanent, check if it was a creature on the battlefield - if (zEvent.getTarget().getCardType().contains(CardType.CREATURE)) { + if (zEvent.getTarget().isCreature()) { return true; } - } else if (permanent.getCardType().contains(CardType.CREATURE)) { + } else if (permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java b/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java index 5719264c74..9fab0792f1 100644 --- a/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java +++ b/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java @@ -206,7 +206,7 @@ class KaradorGhostChieftainWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone() == Zone.GRAVEYARD) { Spell spell = (Spell) game.getObject(event.getTargetId()); - if (spell.getCardType().contains(CardType.CREATURE)) { + if (spell.isCreature()) { abilityUsed = true; } } diff --git a/Mage.Sets/src/mage/cards/k/KarmicJustice.java b/Mage.Sets/src/mage/cards/k/KarmicJustice.java index 065a03b3c2..52f573755d 100644 --- a/Mage.Sets/src/mage/cards/k/KarmicJustice.java +++ b/Mage.Sets/src/mage/cards/k/KarmicJustice.java @@ -92,7 +92,7 @@ class KarmicJusticeTriggeredAbility extends TriggeredAbilityImpl { if (event.getPlayerId().equals(controllerId) && game.getOpponents(this.getControllerId()).contains(game.getControllerId(event.getSourceId()))) { MageObject mageObject = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (!mageObject.getCardType().contains(CardType.CREATURE)) { + if (!mageObject.isCreature()) { this.getTargets().clear(); FilterPermanent filter = new FilterPermanent("target permanent that opponent controls"); filter.add(new ControllerIdPredicate(game.getControllerId(event.getSourceId()))); diff --git a/Mage.Sets/src/mage/cards/k/KarnSilverGolem.java b/Mage.Sets/src/mage/cards/k/KarnSilverGolem.java index a70a148419..0b7ca302e5 100644 --- a/Mage.Sets/src/mage/cards/k/KarnSilverGolem.java +++ b/Mage.Sets/src/mage/cards/k/KarnSilverGolem.java @@ -113,7 +113,7 @@ class KarnSilverGolemEffect extends ContinuousEffectImpl { switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - if (!artifact.getCardType().contains(CardType.CREATURE)) { + if (!artifact.isCreature()) { artifact.getCardType().add(CardType.CREATURE); } } diff --git a/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java b/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java index 348370a2ca..e3e612c468 100644 --- a/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java +++ b/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java @@ -129,7 +129,7 @@ class KeranosGodOfStormsTriggeredAbility extends TriggeredAbilityImpl { controller.revealCards(sourcePermanent.getIdName(), new CardsImpl(card), game); this.getTargets().clear(); this.getEffects().clear(); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { this.addEffect(new DrawCardSourceControllerEffect(1)); } else { this.addEffect(new DamageTargetEffect(3)); diff --git a/Mage.Sets/src/mage/cards/k/KioraMasterOfTheDepths.java b/Mage.Sets/src/mage/cards/k/KioraMasterOfTheDepths.java index 8aba71ab02..398112f28d 100644 --- a/Mage.Sets/src/mage/cards/k/KioraMasterOfTheDepths.java +++ b/Mage.Sets/src/mage/cards/k/KioraMasterOfTheDepths.java @@ -158,10 +158,10 @@ class KioraRevealEffect extends OneShotEffect { Card card = game.getCard(cardId); if (card != null) { cards.add(card); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creatureCardFound = true; } - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { landCardFound = true; } } @@ -230,8 +230,8 @@ class KioraFightEffect extends OneShotEffect { Permanent target = game.getPermanent(source.getFirstTarget()); if (triggeredCreature != null && target != null - && triggeredCreature.getCardType().contains(CardType.CREATURE) - && target.getCardType().contains(CardType.CREATURE)) { + && triggeredCreature.isCreature() + && target.isCreature()) { triggeredCreature.fight(target, source, game); return true; } diff --git a/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java b/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java index 02211f526a..1aea9d014c 100644 --- a/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java +++ b/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java @@ -111,7 +111,7 @@ class KiraGreatGlassSpinnerAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId().equals(this.getSourceId())) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { CreatureWasTargetedThisTurnWatcher watcher = (CreatureWasTargetedThisTurnWatcher) game.getState().getWatchers().get("CreatureWasTargetedThisTurn"); if (watcher != null && watcher.notMoreThanOnceTargetedThisTurn(permanent, game)) { for (Effect effect : getEffects()) { @@ -148,7 +148,7 @@ class CreatureWasTargetedThisTurnWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.TARGETED) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { MageObjectReference mor = new MageObjectReference(permanent, game); int amount = 0; if (creaturesTargeted.containsKey(mor)) { diff --git a/Mage.Sets/src/mage/cards/k/Kismet.java b/Mage.Sets/src/mage/cards/k/Kismet.java index 7e80ec1e41..15ff6534d9 100644 --- a/Mage.Sets/src/mage/cards/k/Kismet.java +++ b/Mage.Sets/src/mage/cards/k/Kismet.java @@ -95,9 +95,9 @@ class KismetEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - if (permanent != null && (permanent.getCardType().contains(CardType.ARTIFACT) - || permanent.getCardType().contains(CardType.CREATURE) - || permanent.getCardType().contains(CardType.LAND))) { + if (permanent != null && (permanent.isArtifact() + || permanent.isCreature() + || permanent.isLand())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/k/KurkeshOnakkeAncient.java b/Mage.Sets/src/mage/cards/k/KurkeshOnakkeAncient.java index 566f790717..72aff27d39 100644 --- a/Mage.Sets/src/mage/cards/k/KurkeshOnakkeAncient.java +++ b/Mage.Sets/src/mage/cards/k/KurkeshOnakkeAncient.java @@ -102,7 +102,7 @@ class KurkeshOnakkeAncientTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(getControllerId())) { Card source = game.getPermanentOrLKIBattlefield(event.getSourceId()); - if (source != null && source.getCardType().contains(CardType.ARTIFACT)) { + if (source != null && source.isArtifact()) { StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId()); if (!(stackAbility.getStackAbility() instanceof ActivatedManaAbilityImpl)) { Effect effect = this.getEffects().get(0); diff --git a/Mage.Sets/src/mage/cards/l/LavaballTrap.java b/Mage.Sets/src/mage/cards/l/LavaballTrap.java index 5ffdcbefe6..cc60fbc8c5 100644 --- a/Mage.Sets/src/mage/cards/l/LavaballTrap.java +++ b/Mage.Sets/src/mage/cards/l/LavaballTrap.java @@ -92,7 +92,7 @@ class LavaballTrapCondition implements Condition { if (permanents != null) { int count = 0; for (Permanent permanent : permanents) { - if (permanent.getCardType().contains(CardType.LAND)) { + if (permanent.isLand()) { count++; if (count == 2) { return true; diff --git a/Mage.Sets/src/mage/cards/l/Legerdemain.java b/Mage.Sets/src/mage/cards/l/Legerdemain.java index fa5093df70..4288fef114 100644 --- a/Mage.Sets/src/mage/cards/l/Legerdemain.java +++ b/Mage.Sets/src/mage/cards/l/Legerdemain.java @@ -96,10 +96,10 @@ class SharesTypePredicate implements ObjectSourcePlayerPredicate creatureCards = new LinkedHashSet<>(); for (Card card : player.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creatureCards.add(card); } } diff --git a/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java b/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java index bfe90c0aa9..b4d1e84a78 100644 --- a/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java +++ b/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java @@ -121,7 +121,7 @@ class LimDulTheNecromancerEffect extends OneShotEffect { Card card = game.getCard(targetPointer.getFirst(game, source)); if (card != null) { if (controller.moveCards(card, Zone.BATTLEFIELD, source, game) - && card.getCardType().contains(CardType.CREATURE)) { + && card.isCreature()) { Permanent creature = game.getPermanent(card.getId()); ContinuousEffect effect = new AddCardSubTypeTargetEffect("Zombie", Duration.WhileOnBattlefield); effect.setTargetPointer(new FixedTarget(creature.getId())); diff --git a/Mage.Sets/src/mage/cards/l/LinvalaKeeperOfSilence.java b/Mage.Sets/src/mage/cards/l/LinvalaKeeperOfSilence.java index d52e5d1234..8dce1d64f4 100644 --- a/Mage.Sets/src/mage/cards/l/LinvalaKeeperOfSilence.java +++ b/Mage.Sets/src/mage/cards/l/LinvalaKeeperOfSilence.java @@ -85,7 +85,7 @@ class LinvalaKeeperOfSilenceCantActivateEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getCardType().contains(CardType.CREATURE) + return permanent.isCreature() && game.getOpponents(source.getControllerId()).contains(permanent.getControllerId()); } diff --git a/Mage.Sets/src/mage/cards/l/LlanowarEmpath.java b/Mage.Sets/src/mage/cards/l/LlanowarEmpath.java index f04de6ab51..7c00253e95 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarEmpath.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarEmpath.java @@ -103,7 +103,7 @@ class LlanowarEmpathEffect extends OneShotEffect { if (card != null) { cards.add(card); controller.revealCards(sourceObject.getName(), cards, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { controller.moveCards(card, Zone.HAND, source, game); } } diff --git a/Mage.Sets/src/mage/cards/l/LodestoneGolem.java b/Mage.Sets/src/mage/cards/l/LodestoneGolem.java index 5528a871b7..9043929682 100644 --- a/Mage.Sets/src/mage/cards/l/LodestoneGolem.java +++ b/Mage.Sets/src/mage/cards/l/LodestoneGolem.java @@ -94,7 +94,7 @@ class LodestoneGolemCostReductionEffect extends CostModificationEffectImpl { public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { Card card = game.getCard(abilityToModify.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.ARTIFACT)) { + if (card != null && !card.isArtifact()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/l/LoxodonGatekeeper.java b/Mage.Sets/src/mage/cards/l/LoxodonGatekeeper.java index 2d4334e252..d8c667ba08 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonGatekeeper.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonGatekeeper.java @@ -103,9 +103,9 @@ class LoxodonGatekeeperTapEffect extends ReplacementEffectImpl { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); if (permanent != null - && (permanent.getCardType().contains(CardType.CREATURE) - || permanent.getCardType().contains(CardType.LAND) - || permanent.getCardType().contains(CardType.ARTIFACT))) { + && (permanent.isCreature() + || permanent.isLand() + || permanent.isArtifact())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/l/LurkingPredators.java b/Mage.Sets/src/mage/cards/l/LurkingPredators.java index b214ce73f7..9a5a0ce314 100644 --- a/Mage.Sets/src/mage/cards/l/LurkingPredators.java +++ b/Mage.Sets/src/mage/cards/l/LurkingPredators.java @@ -96,7 +96,7 @@ class LurkingPredatorsEffect extends OneShotEffect { controller.revealCards(sourceObject.getIdName(), cards, game); if (card != null) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); } else if (controller.chooseUse(Outcome.Neutral, "Put " + card.getIdName() + " on the bottom of your library?", source, game)) { controller.putCardsOnBottomOfLibrary(cards, game, source, false); diff --git a/Mage.Sets/src/mage/cards/m/MadcapExperiment.java b/Mage.Sets/src/mage/cards/m/MadcapExperiment.java index df5a0f7a38..d2c68cd420 100644 --- a/Mage.Sets/src/mage/cards/m/MadcapExperiment.java +++ b/Mage.Sets/src/mage/cards/m/MadcapExperiment.java @@ -94,13 +94,13 @@ class MadcapExperimentEffect extends OneShotEffect { if (card != null) { cards.add(card); } - } while (library.size() > 0 && card != null && !card.getCardType().contains(CardType.ARTIFACT)); + } while (library.size() > 0 && card != null && !card.isArtifact()); // reveal cards if (!cards.isEmpty()) { controller.revealCards(sourceObject.getIdName(), cards, game); } int revealed = cards.size(); - if (card != null && card.getCardType().contains(CardType.ARTIFACT)) { + if (card != null && card.isArtifact()) { // put artifact card to battlefield controller.moveCards(card, Zone.BATTLEFIELD, source, game); // remove it from revealed card list diff --git a/Mage.Sets/src/mage/cards/m/MagneticMine.java b/Mage.Sets/src/mage/cards/m/MagneticMine.java index 2d635ef8bf..12946699d3 100644 --- a/Mage.Sets/src/mage/cards/m/MagneticMine.java +++ b/Mage.Sets/src/mage/cards/m/MagneticMine.java @@ -86,7 +86,7 @@ class MagneticMineTriggeredAbility extends TriggeredAbilityImpl { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD - && zEvent.getTarget().getCardType().contains(CardType.ARTIFACT) + && zEvent.getTarget().isArtifact() && !Objects.equals(zEvent.getTarget().getId(), this.getSourceId())) { this.getTargets().get(0).add(zEvent.getTarget().getControllerId(), game); return true; diff --git a/Mage.Sets/src/mage/cards/m/ManaWeb.java b/Mage.Sets/src/mage/cards/m/ManaWeb.java index 33da1af77b..af4cc8d209 100644 --- a/Mage.Sets/src/mage/cards/m/ManaWeb.java +++ b/Mage.Sets/src/mage/cards/m/ManaWeb.java @@ -90,7 +90,7 @@ class ManaWebTriggeredAbility extends TriggeredAbilityImpl { if (game.getOpponents(controllerId).contains(event.getPlayerId())) { Permanent permanent = game.getPermanent(event.getSourceId()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND)) { + if (permanent != null && permanent.isLand()) { this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getSourceId())); return true; } diff --git a/Mage.Sets/src/mage/cards/m/Manabond.java b/Mage.Sets/src/mage/cards/m/Manabond.java index 0a9bfe97b2..65a28192c7 100644 --- a/Mage.Sets/src/mage/cards/m/Manabond.java +++ b/Mage.Sets/src/mage/cards/m/Manabond.java @@ -86,7 +86,7 @@ class ManabondEffect extends OneShotEffect { Set toBattlefield = new LinkedHashSet<>(); for (UUID uuid : controller.getHand()) { Card card = game.getCard(uuid); - if (card != null && card.getCardType().contains(CardType.LAND)) { + if (card != null && card.isLand()) { toBattlefield.add(card); } diff --git a/Mage.Sets/src/mage/cards/m/MarchesaTheBlackRose.java b/Mage.Sets/src/mage/cards/m/MarchesaTheBlackRose.java index f6ef47971d..e8d41d5a13 100644 --- a/Mage.Sets/src/mage/cards/m/MarchesaTheBlackRose.java +++ b/Mage.Sets/src/mage/cards/m/MarchesaTheBlackRose.java @@ -119,7 +119,7 @@ class MarchesaTheBlackRoseTriggeredAbility extends TriggeredAbilityImpl { Permanent permanent = ((ZoneChangeEvent) event).getTarget(); if (permanent != null && permanent.getControllerId().equals(this.getControllerId()) - && permanent.getCardType().contains(CardType.CREATURE) + && permanent.isCreature() && permanent.getCounters(game).getCount(CounterType.P1P1) > 0) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(permanent.getId(), permanent.getZoneChangeCounter(game) + 1)); diff --git a/Mage.Sets/src/mage/cards/m/MartyrsBond.java b/Mage.Sets/src/mage/cards/m/MartyrsBond.java index ba5c4d9d72..131a5a93c8 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrsBond.java +++ b/Mage.Sets/src/mage/cards/m/MartyrsBond.java @@ -99,7 +99,7 @@ class MartyrsBondTriggeredAbility extends TriggeredAbilityImpl { if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent.getControllerId().equals(this.getControllerId()) && !permanent.getCardType().contains(CardType.LAND)) { + if (permanent.getControllerId().equals(this.getControllerId()) && !permanent.isLand()) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(permanent.getId())); } diff --git a/Mage.Sets/src/mage/cards/m/MartyrsOfKorlis.java b/Mage.Sets/src/mage/cards/m/MartyrsOfKorlis.java index d8f0e7cd19..c5ce8f9815 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrsOfKorlis.java +++ b/Mage.Sets/src/mage/cards/m/MartyrsOfKorlis.java @@ -90,7 +90,7 @@ class RedirectArtifactDamageFromPlayerToSourceEffect extends RedirectionEffect { @Override public boolean applies(GameEvent event, Ability source, Game game) { if (event.getTargetId().equals(source.getControllerId())&& - game.getPermanentOrLKIBattlefield(event.getSourceId()).getCardType().contains(CardType.ARTIFACT)) { + game.getPermanentOrLKIBattlefield(event.getSourceId()).isArtifact()) { this.redirectTarget.updateTarget(source.getSourceId(), game); return true; } diff --git a/Mage.Sets/src/mage/cards/m/MassPolymorph.java b/Mage.Sets/src/mage/cards/m/MassPolymorph.java index 9969900bc9..9ab2cc8b30 100644 --- a/Mage.Sets/src/mage/cards/m/MassPolymorph.java +++ b/Mage.Sets/src/mage/cards/m/MassPolymorph.java @@ -102,7 +102,7 @@ class MassPolymorphEffect extends OneShotEffect { while (creatureCards.size() < count && controller.getLibrary().size() > 0) { Card card = controller.getLibrary().removeFromTop(game); revealed.add(card); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creatureCards.add(card); } else { nonCreatureCards.add(card); diff --git a/Mage.Sets/src/mage/cards/m/MassacreWurm.java b/Mage.Sets/src/mage/cards/m/MassacreWurm.java index 332b695ced..26b03ea713 100644 --- a/Mage.Sets/src/mage/cards/m/MassacreWurm.java +++ b/Mage.Sets/src/mage/cards/m/MassacreWurm.java @@ -97,7 +97,7 @@ class MassacreWurmTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (((ZoneChangeEvent)event).isDiesEvent()) { Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (p != null && p.getCardType().contains(CardType.CREATURE) && game.getOpponents(this.getControllerId()).contains(p.getControllerId())) { + if (p != null && p.isCreature() && game.getOpponents(this.getControllerId()).contains(p.getControllerId())) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(p.getControllerId())); } diff --git a/Mage.Sets/src/mage/cards/m/MasterBiomancer.java b/Mage.Sets/src/mage/cards/m/MasterBiomancer.java index 7ca2e92b1c..43cd8922e8 100644 --- a/Mage.Sets/src/mage/cards/m/MasterBiomancer.java +++ b/Mage.Sets/src/mage/cards/m/MasterBiomancer.java @@ -96,7 +96,7 @@ class MasterBiomancerEntersBattlefieldEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget(); return creature != null && creature.getControllerId().equals(source.getControllerId()) - && creature.getCardType().contains(CardType.CREATURE) + && creature.isCreature() && !event.getTargetId().equals(source.getSourceId()); } diff --git a/Mage.Sets/src/mage/cards/m/MasterOfPredicaments.java b/Mage.Sets/src/mage/cards/m/MasterOfPredicaments.java index 7815eca796..a736e53bb4 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfPredicaments.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfPredicaments.java @@ -120,7 +120,7 @@ class MasterOfPredicamentsEffect extends OneShotEffect { } game.informPlayers(attackedPlayer.getLogName() + " guessed " + (guessWrong ? "wrong" : "right")); if (guessWrong) { - if (cardFromHand.getCardType().contains(CardType.LAND)) { + if (cardFromHand.isLand()) { // If the revealed card is a land, you can't cast it. So nothing happens } else { if (controller.chooseUse(outcome, "Cast " + cardFromHand.getName() + " without paying its mana cost?", source, game)) { diff --git a/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java b/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java index f4c18df57c..463f669222 100644 --- a/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java +++ b/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java @@ -117,8 +117,8 @@ class MelekIzzetParagonTriggeredAbility extends TriggeredAbilityImpl { Spell spell = game.getStack().getSpell(event.getTargetId()); if (spell != null && spell.getOwnerId().equals(super.getControllerId()) - && (spell.getCardType().contains(CardType.INSTANT) - || spell.getCardType().contains(CardType.SORCERY))) { + && (spell.isInstant() + || spell.isSorcery())) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } diff --git a/Mage.Sets/src/mage/cards/m/MeliraSylvokOutcast.java b/Mage.Sets/src/mage/cards/m/MeliraSylvokOutcast.java index 58d4870f3b..5c660b61d8 100644 --- a/Mage.Sets/src/mage/cards/m/MeliraSylvokOutcast.java +++ b/Mage.Sets/src/mage/cards/m/MeliraSylvokOutcast.java @@ -152,7 +152,7 @@ class MeliraSylvokOutcastEffect2 extends ReplacementEffectImpl { if (perm == null) { perm = game.getPermanentEntering(event.getTargetId()); } - if (perm != null && perm.getCardType().contains(CardType.CREATURE) && perm.getControllerId().equals(source.getControllerId())) { + if (perm != null && perm.isCreature() && perm.getControllerId().equals(source.getControllerId())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/m/Meltdown.java b/Mage.Sets/src/mage/cards/m/Meltdown.java index d3668de7cb..64a0735658 100644 --- a/Mage.Sets/src/mage/cards/m/Meltdown.java +++ b/Mage.Sets/src/mage/cards/m/Meltdown.java @@ -80,7 +80,7 @@ class MeltdownEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { - if (permanent != null && permanent.getCardType().contains(CardType.ARTIFACT) && permanent.getConvertedManaCost() <= source.getManaCostsToPay().getX()) { + if (permanent != null && permanent.isArtifact() && permanent.getConvertedManaCost() <= source.getManaCostsToPay().getX()) { permanent.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/m/MetallicMimic.java b/Mage.Sets/src/mage/cards/m/MetallicMimic.java index b837e2e3b4..bb9c932b8d 100644 --- a/Mage.Sets/src/mage/cards/m/MetallicMimic.java +++ b/Mage.Sets/src/mage/cards/m/MetallicMimic.java @@ -106,7 +106,7 @@ class MetallicMimicReplacementEffect extends ReplacementEffectImpl { Permanent enteringCreature = ((EntersTheBattlefieldEvent) event).getTarget(); if (enteringCreature != null && sourcePermanent != null && enteringCreature.getControllerId().equals(source.getControllerId()) - && enteringCreature.getCardType().contains(CardType.CREATURE) + && enteringCreature.isCreature() && !event.getTargetId().equals(source.getSourceId())) { String subtype = (String) game.getState().getValue(sourcePermanent.getId() + "_type"); return subtype != null && enteringCreature.getSubtype(game).contains(subtype); diff --git a/Mage.Sets/src/mage/cards/m/MimicVat.java b/Mage.Sets/src/mage/cards/m/MimicVat.java index f78fc358f6..e5873b7201 100644 --- a/Mage.Sets/src/mage/cards/m/MimicVat.java +++ b/Mage.Sets/src/mage/cards/m/MimicVat.java @@ -118,7 +118,7 @@ class MimicVatTriggeredAbility extends TriggeredAbilityImpl { && zEvent.getToZone() == Zone.GRAVEYARD && zEvent.getFromZone() == Zone.BATTLEFIELD && !(permanent instanceof PermanentToken) - && permanent.getCardType().contains(CardType.CREATURE)) { + && permanent.isCreature()) { getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId())); return true; diff --git a/Mage.Sets/src/mage/cards/m/MindFuneral.java b/Mage.Sets/src/mage/cards/m/MindFuneral.java index 4c340a3539..5edd72f845 100644 --- a/Mage.Sets/src/mage/cards/m/MindFuneral.java +++ b/Mage.Sets/src/mage/cards/m/MindFuneral.java @@ -97,7 +97,7 @@ class MindFuneralEffect extends OneShotEffect { if (card == null) { break; } - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { landsFound++; } cards.add(card); diff --git a/Mage.Sets/src/mage/cards/m/MindGrind.java b/Mage.Sets/src/mage/cards/m/MindGrind.java index f6f5de4482..bd9ec92472 100644 --- a/Mage.Sets/src/mage/cards/m/MindGrind.java +++ b/Mage.Sets/src/mage/cards/m/MindGrind.java @@ -107,7 +107,7 @@ class MindGrindEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if(card.getCardType().contains(CardType.LAND)){ + if(card.isLand()){ --landsToReveal; if (landsToReveal < 1) { break; diff --git a/Mage.Sets/src/mage/cards/m/MindsDilation.java b/Mage.Sets/src/mage/cards/m/MindsDilation.java index dbd6f64c2f..dbe3fe1d43 100644 --- a/Mage.Sets/src/mage/cards/m/MindsDilation.java +++ b/Mage.Sets/src/mage/cards/m/MindsDilation.java @@ -136,7 +136,7 @@ class MindsDilationEffect extends OneShotEffect { if (opponent.getLibrary().size() > 0) { Card card = opponent.getLibrary().getFromTop(game); if (card != null && opponent.moveCards(card, Zone.EXILED, source, game)) { - if (!card.getCardType().contains(CardType.LAND)) { + if (!card.isLand()) { if (controller.chooseUse(outcome, "Cast " + card.getLogName() + " without paying its mana cost from exile?", source, game)) { controller.cast(card.getSpellAbility(), game, true); } diff --git a/Mage.Sets/src/mage/cards/m/Mirari.java b/Mage.Sets/src/mage/cards/m/Mirari.java index f706115cd0..f7919a4354 100644 --- a/Mage.Sets/src/mage/cards/m/Mirari.java +++ b/Mage.Sets/src/mage/cards/m/Mirari.java @@ -118,7 +118,7 @@ class MirariTriggeredAbility extends TriggeredAbilityImpl { private boolean isControlledInstantOrSorcery(Spell spell) { return spell != null && (spell.getControllerId().equals(this.getControllerId())) - && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY)); + && (spell.isInstant() || spell.isSorcery()); } @Override diff --git a/Mage.Sets/src/mage/cards/m/MirkoVoskMindDrinker.java b/Mage.Sets/src/mage/cards/m/MirkoVoskMindDrinker.java index d6393ed04b..355dd83bac 100644 --- a/Mage.Sets/src/mage/cards/m/MirkoVoskMindDrinker.java +++ b/Mage.Sets/src/mage/cards/m/MirkoVoskMindDrinker.java @@ -109,7 +109,7 @@ class MirkoVoskMindDrinkerEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if(card.getCardType().contains(CardType.LAND)){ + if(card.isLand()){ --landsToReveal; if (landsToReveal < 1) { break; diff --git a/Mage.Sets/src/mage/cards/m/MirrorMatch.java b/Mage.Sets/src/mage/cards/m/MirrorMatch.java index 9a496c6b18..3aa3fd7ab5 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorMatch.java +++ b/Mage.Sets/src/mage/cards/m/MirrorMatch.java @@ -104,7 +104,7 @@ class MirrorMatchEffect extends OneShotEffect { boolean isCreature = false; if (group != null) { for (Permanent addedToken : effect.getAddedPermanent()) { - if (addedToken.getCardType().contains(CardType.CREATURE)) { + if (addedToken.isCreature()) { group.addBlockerToGroup(addedToken.getId(), attackerId, game); isCreature = true; } diff --git a/Mage.Sets/src/mage/cards/m/MirrorwingDragon.java b/Mage.Sets/src/mage/cards/m/MirrorwingDragon.java index 8b27b07e63..b6ba8e0d7c 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorwingDragon.java +++ b/Mage.Sets/src/mage/cards/m/MirrorwingDragon.java @@ -106,7 +106,7 @@ class MirrorwingDragonCopyTriggeredAbility extends TriggeredAbilityImpl { private boolean checkSpell(Spell spell, Game game) { if (spell != null - && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) { + && (spell.isInstant() || spell.isSorcery())) { boolean noTargets = true; for (TargetAddress addr : TargetAddress.walk(spell)) { noTargets = false; diff --git a/Mage.Sets/src/mage/cards/m/MishraArtificerProdigy.java b/Mage.Sets/src/mage/cards/m/MishraArtificerProdigy.java index 0e2dfd374e..42f9da0f83 100644 --- a/Mage.Sets/src/mage/cards/m/MishraArtificerProdigy.java +++ b/Mage.Sets/src/mage/cards/m/MishraArtificerProdigy.java @@ -101,7 +101,7 @@ class MishraArtificerProdigyTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && spell.getCardType().contains(CardType.ARTIFACT)) { + if (spell != null && spell.isArtifact()) { ((MishraArtificerProdigyEffect) this.getEffects().get(0)).setName(spell.getName()); return true; } diff --git a/Mage.Sets/src/mage/cards/m/MistmoonGriffin.java b/Mage.Sets/src/mage/cards/m/MistmoonGriffin.java index e64a6c7d83..6b372e0a4e 100644 --- a/Mage.Sets/src/mage/cards/m/MistmoonGriffin.java +++ b/Mage.Sets/src/mage/cards/m/MistmoonGriffin.java @@ -97,7 +97,7 @@ class MistmoonGriffinEffect extends OneShotEffect { if (controller != null) { Card lastCreatureCard = null; for (Card card : controller.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { lastCreatureCard = card; } } diff --git a/Mage.Sets/src/mage/cards/m/MolderBeast.java b/Mage.Sets/src/mage/cards/m/MolderBeast.java index e10a45f08a..2b851be52a 100644 --- a/Mage.Sets/src/mage/cards/m/MolderBeast.java +++ b/Mage.Sets/src/mage/cards/m/MolderBeast.java @@ -89,7 +89,7 @@ class MolderBeastTriggeredAbility extends TriggeredAbilityImpl { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; return zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD - && zEvent.getTarget().getCardType().contains(CardType.ARTIFACT); + && zEvent.getTarget().isArtifact(); } @Override diff --git a/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java b/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java index 880a1bd0bc..a3ade23f04 100644 --- a/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java +++ b/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java @@ -130,7 +130,7 @@ class MomirVigSimicVisionaryEffect extends OneShotEffect { Set cardsList = cards.getCards(game); Cards cardsToHand = new CardsImpl(); for (Card card : cardsList) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { cardsToHand.add(card); cards.remove(card); } diff --git a/Mage.Sets/src/mage/cards/m/Moonhold.java b/Mage.Sets/src/mage/cards/m/Moonhold.java index fefb1b1816..9c559325df 100644 --- a/Mage.Sets/src/mage/cards/m/Moonhold.java +++ b/Mage.Sets/src/mage/cards/m/Moonhold.java @@ -164,7 +164,7 @@ class MoonholdEffect2 extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (event.getPlayerId().equals(source.getFirstTarget())) { Card card = game.getCard(event.getSourceId()); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/m/MorticianBeetle.java b/Mage.Sets/src/mage/cards/m/MorticianBeetle.java index 8bd733f7d8..e1f6500f2c 100644 --- a/Mage.Sets/src/mage/cards/m/MorticianBeetle.java +++ b/Mage.Sets/src/mage/cards/m/MorticianBeetle.java @@ -88,7 +88,7 @@ class PlayerSacrificesCreatureTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getType() == EventType.SACRIFICED_PERMANENT) { MageObject mageObject = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (mageObject != null && mageObject.getCardType().contains(CardType.CREATURE)) { + if (mageObject != null && mageObject.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/m/MysticRemora.java b/Mage.Sets/src/mage/cards/m/MysticRemora.java index a88df4a9de..f41b4cfb78 100644 --- a/Mage.Sets/src/mage/cards/m/MysticRemora.java +++ b/Mage.Sets/src/mage/cards/m/MysticRemora.java @@ -102,7 +102,7 @@ class MysticRemoraTriggeredAbility extends TriggeredAbilityImpl { if (game.getOpponents(controllerId).contains(event.getPlayerId())) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && !spell.getCardType().contains(CardType.CREATURE)) { + if (spell != null && !spell.isCreature()) { Player controller = game.getPlayer(game.getControllerId(this.controllerId)); Player player = game.getPlayer(spell.getControllerId()); if (!Objects.equals(controller, player)) { diff --git a/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java b/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java index dd167752bd..2b5a3e1b50 100644 --- a/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java +++ b/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java @@ -104,8 +104,8 @@ class NarsetEnlightenedMasterExileEffect extends OneShotEffect { player.moveCards(cards, Zone.EXILED, source, game); for (Card card : cards) { if (game.getState().getZone(card.getId()) == Zone.EXILED - && !card.getCardType().contains(CardType.CREATURE) - && !card.getCardType().contains(CardType.LAND)) { + && !card.isCreature() + && !card.isLand()) { ContinuousEffect effect = new NarsetEnlightenedMasterCastFromExileEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/cards/n/NarsetTranscendent.java b/Mage.Sets/src/mage/cards/n/NarsetTranscendent.java index 190dce6994..4c04b59215 100644 --- a/Mage.Sets/src/mage/cards/n/NarsetTranscendent.java +++ b/Mage.Sets/src/mage/cards/n/NarsetTranscendent.java @@ -116,7 +116,7 @@ class NarsetTranscendentEffect1 extends OneShotEffect { CardsImpl cards = new CardsImpl(); cards.add(card); controller.lookAtCards(sourceObject.getIdName(), cards, game); - if (!card.getCardType().contains(CardType.CREATURE) && !card.getCardType().contains(CardType.LAND)) { + if (!card.isCreature() && !card.isLand()) { if (controller.chooseUse(outcome, "Reveal " + card.getLogName() + " and put it into your hand?", source, game)) { controller.moveCards(card, Zone.HAND, source, game); controller.revealCards(sourceObject.getIdName(), cards, game); @@ -155,7 +155,7 @@ class NarsetTranscendentTriggeredAbility extends DelayedTriggeredAbility { Spell spell = game.getStack().getSpell(event.getTargetId()); if (spell != null && spell.getFromZone() == Zone.HAND) { if (spell.getCard() != null - && spell.getCard().getCardType().contains(CardType.INSTANT) || spell.getCard().getCardType().contains(CardType.SORCERY)) { + && spell.getCard().isInstant() || spell.getCard().isSorcery()) { for (Effect effect : getEffects()) { effect.setTargetPointer(new FixedTarget(spell.getId())); } @@ -272,7 +272,7 @@ class NarsetTranscendentCantCastEffect extends ContinuousRuleModifyingEffectImpl Player controller = game.getPlayer(source.getControllerId()); if (controller != null && controller.hasOpponent(event.getPlayerId(), game)) { Card card = game.getCard(event.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.CREATURE)) { + if (card != null && !card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/n/NecroticOoze.java b/Mage.Sets/src/mage/cards/n/NecroticOoze.java index b9f4c4f5a3..4f7991db8c 100644 --- a/Mage.Sets/src/mage/cards/n/NecroticOoze.java +++ b/Mage.Sets/src/mage/cards/n/NecroticOoze.java @@ -93,7 +93,7 @@ public class NecroticOoze extends CardImpl { Player player = game.getPlayer(playerId); if (player != null) { for (Card card : player.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { for (Ability ability : card.getAbilities()) { if (ability instanceof ActivatedAbility) { perm.addAbility(ability, game); diff --git a/Mage.Sets/src/mage/cards/n/NetherShadow.java b/Mage.Sets/src/mage/cards/n/NetherShadow.java index 3bf3e29896..85e70688f8 100644 --- a/Mage.Sets/src/mage/cards/n/NetherShadow.java +++ b/Mage.Sets/src/mage/cards/n/NetherShadow.java @@ -95,7 +95,7 @@ class NetherShadowTriggerdAbility extends BeginningOfUpkeepTriggeredAbility{ } else{ Card card = game.getCard(uuid); - if(card != null && card.getCardType().contains(CardType.CREATURE)){ + if(card != null && card.isCreature()){ count++; } } diff --git a/Mage.Sets/src/mage/cards/n/NetherTraitor.java b/Mage.Sets/src/mage/cards/n/NetherTraitor.java index 2f332f7d34..9bc1b445e7 100644 --- a/Mage.Sets/src/mage/cards/n/NetherTraitor.java +++ b/Mage.Sets/src/mage/cards/n/NetherTraitor.java @@ -102,7 +102,7 @@ class NetherTraitorTriggeredAbility extends TriggeredAbilityImpl { if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) { if (zEvent.getTarget() != null && zEvent.getTarget().getOwnerId().equals(this.getControllerId()) && - zEvent.getTarget().getCardType().contains(CardType.CREATURE)&& + zEvent.getTarget().isCreature()&& !zEvent.getTarget().getId().equals(this.getSourceId())) { return true; } diff --git a/Mage.Sets/src/mage/cards/n/NeurokFamiliar.java b/Mage.Sets/src/mage/cards/n/NeurokFamiliar.java index 61e5cdb019..1fb7f84daf 100644 --- a/Mage.Sets/src/mage/cards/n/NeurokFamiliar.java +++ b/Mage.Sets/src/mage/cards/n/NeurokFamiliar.java @@ -103,7 +103,7 @@ class NeurokFamiliarEffect extends OneShotEffect { if (card != null) { Cards cards = new CardsImpl(card); controller.revealCards(sourceObject.getIdName(), cards, game); - if (card.getCardType().contains(CardType.ARTIFACT)) { + if (card.isArtifact()) { controller.moveCards(card, Zone.HAND, source, game); } else { controller.moveCards(card, Zone.GRAVEYARD, source, game); diff --git a/Mage.Sets/src/mage/cards/n/NightfallPredator.java b/Mage.Sets/src/mage/cards/n/NightfallPredator.java index e2f8b49bf8..05ed78f600 100644 --- a/Mage.Sets/src/mage/cards/n/NightfallPredator.java +++ b/Mage.Sets/src/mage/cards/n/NightfallPredator.java @@ -110,7 +110,7 @@ class NightfallPredatorEffect extends OneShotEffect { Permanent creature2 = game.getPermanent(source.getFirstTarget()); // 20110930 - 701.10 if (creature1 != null && creature2 != null) { - if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) { + if (creature1.isCreature() && creature2.isCreature()) { return creature1.fight(creature2, source, game); } } diff --git a/Mage.Sets/src/mage/cards/n/NimDeathmantle.java b/Mage.Sets/src/mage/cards/n/NimDeathmantle.java index 4be71a5277..02109ab786 100644 --- a/Mage.Sets/src/mage/cards/n/NimDeathmantle.java +++ b/Mage.Sets/src/mage/cards/n/NimDeathmantle.java @@ -119,7 +119,7 @@ class NimDeathmantleTriggeredAbility extends TriggeredAbilityImpl { && zEvent.getToZone() == Zone.GRAVEYARD && zEvent.getFromZone() == Zone.BATTLEFIELD && !(permanent instanceof PermanentToken) - && permanent.getCardType().contains(CardType.CREATURE)) { + && permanent.isCreature()) { getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId())); return true; diff --git a/Mage.Sets/src/mage/cards/n/NissaSageAnimist.java b/Mage.Sets/src/mage/cards/n/NissaSageAnimist.java index 0c868ec804..7669e5d84c 100644 --- a/Mage.Sets/src/mage/cards/n/NissaSageAnimist.java +++ b/Mage.Sets/src/mage/cards/n/NissaSageAnimist.java @@ -118,7 +118,7 @@ class NissaSageAnimistPlusOneEffect extends OneShotEffect { } controller.revealCards(sourceObject.getIdName(), new CardsImpl(card), game); Zone targetZone = Zone.HAND; - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { targetZone = Zone.BATTLEFIELD; } return controller.moveCards(card, targetZone, source, game); @@ -164,7 +164,7 @@ class NissaSageAnimistMinusSevenEffect extends ContinuousEffectImpl { if (permanent != null) { switch (layer) { case TypeChangingEffects_4: - if (!permanent.getCardType().contains(CardType.CREATURE)) { + if (!permanent.isCreature()) { permanent.getCardType().add(CardType.CREATURE); } if (!permanent.getSubtype(game).contains("Elemental")) { diff --git a/Mage.Sets/src/mage/cards/n/NissasRevelation.java b/Mage.Sets/src/mage/cards/n/NissasRevelation.java index 87af8132d1..4c51fd8530 100644 --- a/Mage.Sets/src/mage/cards/n/NissasRevelation.java +++ b/Mage.Sets/src/mage/cards/n/NissasRevelation.java @@ -94,7 +94,7 @@ class NissasRevelationEffect extends OneShotEffect { if (card != null) { cards.add(card); controller.revealCards(sourceObject.getIdName(), cards, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { controller.drawCards(card.getPower().getValue(), game); controller.gainLife(card.getToughness().getValue(), game); } diff --git a/Mage.Sets/src/mage/cards/n/NivixAerieOfTheFiremind.java b/Mage.Sets/src/mage/cards/n/NivixAerieOfTheFiremind.java index f720abb563..8195e0659a 100644 --- a/Mage.Sets/src/mage/cards/n/NivixAerieOfTheFiremind.java +++ b/Mage.Sets/src/mage/cards/n/NivixAerieOfTheFiremind.java @@ -102,7 +102,7 @@ class NivixAerieOfTheFiremindEffect extends OneShotEffect { Card card = library.removeFromTop(game); if (card != null && controller.moveCardsToExile(card, source, game, true, source.getSourceId(), "Nivix, Aerie of the Firemind") - && (card.getCardType().contains(CardType.INSTANT) || card.getCardType().contains(CardType.SORCERY))) { + && (card.isInstant() || card.isSorcery())) { ContinuousEffect effect = new NivixAerieOfTheFiremindCanCastEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/cards/n/NoMercy.java b/Mage.Sets/src/mage/cards/n/NoMercy.java index e0147ace67..5dfa144c54 100644 --- a/Mage.Sets/src/mage/cards/n/NoMercy.java +++ b/Mage.Sets/src/mage/cards/n/NoMercy.java @@ -88,7 +88,7 @@ public class NoMercy extends CardImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { Permanent permanent = game.getPermanent(event.getSourceId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getSourceId())); } diff --git a/Mage.Sets/src/mage/cards/n/NoRestForTheWicked.java b/Mage.Sets/src/mage/cards/n/NoRestForTheWicked.java index 0740507adb..49b10b5f52 100644 --- a/Mage.Sets/src/mage/cards/n/NoRestForTheWicked.java +++ b/Mage.Sets/src/mage/cards/n/NoRestForTheWicked.java @@ -94,7 +94,7 @@ class NoRestForTheWickedEffect extends OneShotEffect { Card c = game.getCard(cardId); if (c != null) { if (game.getState().getZone(cardId) == Zone.GRAVEYARD - && c.getCardType().contains(CardType.CREATURE) + && c.isCreature() && c.getOwnerId().equals(source.getControllerId())) { cardsToHand.add(c); } diff --git a/Mage.Sets/src/mage/cards/n/NoblePurpose.java b/Mage.Sets/src/mage/cards/n/NoblePurpose.java index 451c21eea4..93a4b7dfe6 100644 --- a/Mage.Sets/src/mage/cards/n/NoblePurpose.java +++ b/Mage.Sets/src/mage/cards/n/NoblePurpose.java @@ -91,7 +91,7 @@ class NoblePurposeTriggeredAbility extends TriggeredAbilityImpl { DamagedEvent damageEvent = (DamagedEvent) event; if (damageEvent.isCombatDamage()) { Permanent permanent = game.getPermanent(event.getSourceId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) + if (permanent != null && permanent.isCreature() && permanent.getControllerId().equals(this.getControllerId())) { this.getEffects().clear(); this.getEffects().add(new GainLifeEffect(damageEvent.getAmount())); diff --git a/Mage.Sets/src/mage/cards/n/NullRod.java b/Mage.Sets/src/mage/cards/n/NullRod.java index a8c684c8f9..7e51755f5b 100644 --- a/Mage.Sets/src/mage/cards/n/NullRod.java +++ b/Mage.Sets/src/mage/cards/n/NullRod.java @@ -75,7 +75,7 @@ class NullRodCantActivateEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getCardType().contains(CardType.ARTIFACT); + return permanent.isArtifact(); } @Override diff --git a/Mage.Sets/src/mage/cards/o/OathOfChandra.java b/Mage.Sets/src/mage/cards/o/OathOfChandra.java index 351c11d8a9..c7e867f7a9 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfChandra.java +++ b/Mage.Sets/src/mage/cards/o/OathOfChandra.java @@ -129,7 +129,7 @@ class OathOfChandraWatcher extends Watcher { if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getToZone() == Zone.BATTLEFIELD - && zEvent.getTarget().getCardType().contains(CardType.PLANESWALKER)) { + && zEvent.getTarget().isPlaneswalker()) { players.add(zEvent.getTarget().getControllerId()); } } diff --git a/Mage.Sets/src/mage/cards/o/OathOfDruids.java b/Mage.Sets/src/mage/cards/o/OathOfDruids.java index 7db3e4326f..31a3b514c1 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfDruids.java +++ b/Mage.Sets/src/mage/cards/o/OathOfDruids.java @@ -149,7 +149,7 @@ class OathOfDruidsEffect extends OneShotEffect { Card card = controller.getLibrary().removeFromTop(game); revealed.add(card); // until he or she reveals a creature card. - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creatureCard = card; } else { nonCreatureCards.add(card); diff --git a/Mage.Sets/src/mage/cards/o/OathOfGideon.java b/Mage.Sets/src/mage/cards/o/OathOfGideon.java index 8a40148156..a427024e57 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfGideon.java +++ b/Mage.Sets/src/mage/cards/o/OathOfGideon.java @@ -93,7 +93,7 @@ class OathOfGideonReplacementEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget(); return creature != null && creature.getControllerId().equals(source.getControllerId()) - && creature.getCardType().contains(CardType.PLANESWALKER) + && creature.isPlaneswalker() && !event.getTargetId().equals(source.getSourceId()); } diff --git a/Mage.Sets/src/mage/cards/o/OathOfLiliana.java b/Mage.Sets/src/mage/cards/o/OathOfLiliana.java index ad8cd450fd..d966d0d567 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfLiliana.java +++ b/Mage.Sets/src/mage/cards/o/OathOfLiliana.java @@ -120,7 +120,7 @@ class OathOfLilianaWatcher extends Watcher { if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getToZone() == Zone.BATTLEFIELD - && zEvent.getTarget().getCardType().contains(CardType.PLANESWALKER)) { + && zEvent.getTarget().isPlaneswalker()) { players.add(zEvent.getTarget().getControllerId()); } } diff --git a/Mage.Sets/src/mage/cards/o/OathOfNissa.java b/Mage.Sets/src/mage/cards/o/OathOfNissa.java index 8777eff8af..285da1163b 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfNissa.java +++ b/Mage.Sets/src/mage/cards/o/OathOfNissa.java @@ -166,7 +166,7 @@ class OathOfNissaSpendAnyManaEffect extends AsThoughEffectImpl implements AsThou if (source.getControllerId().equals(affectedControllerId)) { MageObject mageObject = game.getObject(objectId); if (mageObject != null) { - if (mageObject.getCardType().contains(CardType.PLANESWALKER)) { + if (mageObject.isPlaneswalker()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/o/OblivionStone.java b/Mage.Sets/src/mage/cards/o/OblivionStone.java index 8f447d6f19..b7ddb74b8a 100644 --- a/Mage.Sets/src/mage/cards/o/OblivionStone.java +++ b/Mage.Sets/src/mage/cards/o/OblivionStone.java @@ -89,7 +89,7 @@ class OblivionStoneEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (Permanent p : game.getBattlefield().getAllActivePermanents()) { - if (!(p.getCardType().contains(CardType.LAND) || p.getCounters(game).containsKey(CounterType.FATE))) { + if (!(p.isLand() || p.getCounters(game).containsKey(CounterType.FATE))) { p.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/o/OmenMachine.java b/Mage.Sets/src/mage/cards/o/OmenMachine.java index 154bba8f59..ce60b360c8 100644 --- a/Mage.Sets/src/mage/cards/o/OmenMachine.java +++ b/Mage.Sets/src/mage/cards/o/OmenMachine.java @@ -123,7 +123,7 @@ class OmenMachineEffect2 extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); if (card != null) { player.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { player.moveCards(card, Zone.BATTLEFIELD, source, game); } else { if (card.getSpellAbility().canChooseTarget(game)) { diff --git a/Mage.Sets/src/mage/cards/o/OonasBlackguard.java b/Mage.Sets/src/mage/cards/o/OonasBlackguard.java index 6cce1b2eda..9499e54389 100644 --- a/Mage.Sets/src/mage/cards/o/OonasBlackguard.java +++ b/Mage.Sets/src/mage/cards/o/OonasBlackguard.java @@ -104,7 +104,7 @@ class OonasBlackguardReplacementEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget(); if (creature != null && creature.getControllerId().equals(source.getControllerId()) - && creature.getCardType().contains(CardType.CREATURE) + && creature.isCreature() && creature.hasSubtype("Rogue", game) && !event.getTargetId().equals(source.getSourceId())) { return true; diff --git a/Mage.Sets/src/mage/cards/o/Opalescence.java b/Mage.Sets/src/mage/cards/o/Opalescence.java index 20c65786b1..d16722e4c3 100644 --- a/Mage.Sets/src/mage/cards/o/Opalescence.java +++ b/Mage.Sets/src/mage/cards/o/Opalescence.java @@ -108,7 +108,7 @@ class OpalescenceEffect extends ContinuousEffectImpl { switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - if (!permanent.getCardType().contains(CardType.CREATURE)) { + if (!permanent.isCreature()) { permanent.getCardType().add(CardType.CREATURE); } } diff --git a/Mage.Sets/src/mage/cards/o/OpenSeason.java b/Mage.Sets/src/mage/cards/o/OpenSeason.java index b1881ae34a..592ca821c0 100644 --- a/Mage.Sets/src/mage/cards/o/OpenSeason.java +++ b/Mage.Sets/src/mage/cards/o/OpenSeason.java @@ -110,7 +110,7 @@ class OpenSeasonRestrictionEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getCardType().contains(CardType.CREATURE) + return permanent.isCreature() && permanent.getCounters(game).getCount(CounterType.BOUNTY) > 0 && game.getOpponents(source.getControllerId()).contains(permanent.getControllerId()); } diff --git a/Mage.Sets/src/mage/cards/o/OpenTheVaults.java b/Mage.Sets/src/mage/cards/o/OpenTheVaults.java index 9969ffb13a..462fbd0e23 100644 --- a/Mage.Sets/src/mage/cards/o/OpenTheVaults.java +++ b/Mage.Sets/src/mage/cards/o/OpenTheVaults.java @@ -90,7 +90,7 @@ class OpenTheVaultsEffect extends OneShotEffect { for (UUID cardId : graveyard) { Card card = game.getCard(cardId); if (card != null - && (card.getCardType().contains(CardType.ENCHANTMENT) || card.getCardType().contains(CardType.ARTIFACT))) { + && (card.isEnchantment() || card.isArtifact())) { cardsToReturn.add(card); } } diff --git a/Mage.Sets/src/mage/cards/o/OranRiefHydra.java b/Mage.Sets/src/mage/cards/o/OranRiefHydra.java index 3c38d42aad..05f874edca 100644 --- a/Mage.Sets/src/mage/cards/o/OranRiefHydra.java +++ b/Mage.Sets/src/mage/cards/o/OranRiefHydra.java @@ -102,7 +102,7 @@ class OranRiefHydraTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); if (permanent != null - && permanent.getCardType().contains(CardType.LAND) + && permanent.isLand() && permanent.getControllerId().equals(getControllerId())) { Permanent sourcePermanent = game.getPermanent(getSourceId()); if (sourcePermanent != null) { diff --git a/Mage.Sets/src/mage/cards/o/OrbsOfWarding.java b/Mage.Sets/src/mage/cards/o/OrbsOfWarding.java index ef2e8b44e9..ddd6a5810e 100644 --- a/Mage.Sets/src/mage/cards/o/OrbsOfWarding.java +++ b/Mage.Sets/src/mage/cards/o/OrbsOfWarding.java @@ -88,7 +88,7 @@ class OrbsOfWardingEffect extends PreventionEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (event.getTargetId().equals(source.getControllerId())) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { return super.applies(event, source, game); } } diff --git a/Mage.Sets/src/mage/cards/o/Overmaster.java b/Mage.Sets/src/mage/cards/o/Overmaster.java index f22c486823..a610502ab2 100644 --- a/Mage.Sets/src/mage/cards/o/Overmaster.java +++ b/Mage.Sets/src/mage/cards/o/Overmaster.java @@ -150,7 +150,7 @@ class OvermasterWatcher extends Watcher { if (event.getType() == GameEvent.EventType.SPELL_CAST && ready) { if (uncounterableSpell == null && event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && (spell.getCardType().contains(CardType.SORCERY) || spell.getCardType().contains(CardType.INSTANT))) { + if (spell != null && (spell.isSorcery() || spell.isInstant())) { uncounterableSpell = spell.getId(); ready = false; } diff --git a/Mage.Sets/src/mage/cards/p/Panharmonicon.java b/Mage.Sets/src/mage/cards/p/Panharmonicon.java index be2be13977..2ce198c478 100644 --- a/Mage.Sets/src/mage/cards/p/Panharmonicon.java +++ b/Mage.Sets/src/mage/cards/p/Panharmonicon.java @@ -98,8 +98,8 @@ class PanharmoniconEffect extends ReplacementEffectImpl { if (sourceEvent.getType() == EventType.ENTERS_THE_BATTLEFIELD && sourceEvent instanceof EntersTheBattlefieldEvent) { EntersTheBattlefieldEvent entersTheBattlefieldEvent = (EntersTheBattlefieldEvent) sourceEvent; // Only for entering artifacts or creatures - if (entersTheBattlefieldEvent.getTarget().getCardType().contains(CardType.ARTIFACT) - || entersTheBattlefieldEvent.getTarget().getCardType().contains(CardType.CREATURE)) { + if (entersTheBattlefieldEvent.getTarget().isArtifact() + || entersTheBattlefieldEvent.getTarget().isCreature()) { // Only for triggers of permanents if (game.getPermanent(numberOfTriggersEvent.getSourceId()) != null) { return true; diff --git a/Mage.Sets/src/mage/cards/p/PastInFlames.java b/Mage.Sets/src/mage/cards/p/PastInFlames.java index f68229653e..515b8e3f73 100644 --- a/Mage.Sets/src/mage/cards/p/PastInFlames.java +++ b/Mage.Sets/src/mage/cards/p/PastInFlames.java @@ -97,7 +97,7 @@ class PastInFlamesEffect extends ContinuousEffectImpl { if (player != null) { for (UUID cardId: player.getGraveyard()) { Card card = game.getCard(cardId); - if (card.getCardType().contains(CardType.INSTANT) || card.getCardType().contains(CardType.SORCERY)) { + if (card.isInstant() || card.isSorcery()) { affectedObjectList.add(new MageObjectReference(card, game)); } } @@ -113,10 +113,10 @@ class PastInFlamesEffect extends ContinuousEffectImpl { if (affectedObjectList.contains(new MageObjectReference(cardId, game))) { Card card = game.getCard(cardId); FlashbackAbility ability = null; - if (card.getCardType().contains(CardType.INSTANT)) { + if (card.isInstant()) { ability = new FlashbackAbility(card.getManaCost(), TimingRule.INSTANT); } - else if (card.getCardType().contains(CardType.SORCERY)) { + else if (card.isSorcery()) { ability = new FlashbackAbility(card.getManaCost(), TimingRule.SORCERY); } if (ability != null) { diff --git a/Mage.Sets/src/mage/cards/p/PawnOfUlamog.java b/Mage.Sets/src/mage/cards/p/PawnOfUlamog.java index e7d2c0e1b6..d3e0593e98 100644 --- a/Mage.Sets/src/mage/cards/p/PawnOfUlamog.java +++ b/Mage.Sets/src/mage/cards/p/PawnOfUlamog.java @@ -101,7 +101,7 @@ class PawnOfUlamogTriggeredAbility extends TriggeredAbilityImpl { if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD && permanent.getControllerId().equals(this.controllerId) && (targetId.equals(this.getSourceId()) - || (permanent.getCardType().contains(CardType.CREATURE) + || (permanent.isCreature() && !targetId.equals(this.getSourceId()) && !(permanent instanceof PermanentToken)))) { return true; diff --git a/Mage.Sets/src/mage/cards/p/Peacekeeper.java b/Mage.Sets/src/mage/cards/p/Peacekeeper.java index 91b3220132..317f8d7caf 100644 --- a/Mage.Sets/src/mage/cards/p/Peacekeeper.java +++ b/Mage.Sets/src/mage/cards/p/Peacekeeper.java @@ -87,7 +87,7 @@ class PeacekeeperCantAttackEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getCardType().contains(CardType.CREATURE); + return permanent.isCreature(); } @Override diff --git a/Mage.Sets/src/mage/cards/p/PermafrostTrap.java b/Mage.Sets/src/mage/cards/p/PermafrostTrap.java index 8c181a4189..6c5d5cf99f 100644 --- a/Mage.Sets/src/mage/cards/p/PermafrostTrap.java +++ b/Mage.Sets/src/mage/cards/p/PermafrostTrap.java @@ -88,7 +88,7 @@ class PermafrostTrapCondition implements Condition { List permanents = watcher.getThisTurnEnteringPermanents(opponentId); if (permanents != null) { for (Permanent permanent : permanents) { - if (permanent.getCardType().contains(CardType.CREATURE) && permanent.getColor(game).isGreen()) { + if (permanent.isCreature() && permanent.getColor(game).isGreen()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/p/PestilenceDemon.java b/Mage.Sets/src/mage/cards/p/PestilenceDemon.java index 60d4bbd365..0477bbaff3 100644 --- a/Mage.Sets/src/mage/cards/p/PestilenceDemon.java +++ b/Mage.Sets/src/mage/cards/p/PestilenceDemon.java @@ -85,7 +85,7 @@ class PestilenceDemonEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { for (UUID permanentId : game.getBattlefield().getAllPermanentIds()) { Permanent p = game.getPermanent(permanentId); - if (p != null && p.getCardType().contains(CardType.CREATURE)) { + if (p != null && p.isCreature()) { p.damage(1, source.getSourceId(), game, false, true); } } diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java b/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java index c452c10235..7fa187afc3 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java @@ -75,7 +75,7 @@ public class PhyrexianMetamorph extends CardImpl { @Override public Boolean apply(Game game, MageObject mageObject) { - if (!mageObject.getCardType().contains(CardType.ARTIFACT)) { + if (!mageObject.isArtifact()) { mageObject.getCardType().add(CardType.ARTIFACT); } return true; diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java b/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java index cc2981f857..402f4db0b5 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java @@ -110,7 +110,7 @@ class PhyrexianTotemTriggeredAbility extends TriggeredAbilityImpl { public boolean checkInterveningIfClause(Game game) { Permanent permanent = game.getPermanentOrLKIBattlefield(getSourceId()); if (permanent != null) { - return permanent.getCardType().contains(CardType.CREATURE); + return permanent.isCreature(); } return false; } diff --git a/Mage.Sets/src/mage/cards/p/Polymorph.java b/Mage.Sets/src/mage/cards/p/Polymorph.java index 83c62f1d5b..9e74f571c0 100644 --- a/Mage.Sets/src/mage/cards/p/Polymorph.java +++ b/Mage.Sets/src/mage/cards/p/Polymorph.java @@ -100,12 +100,12 @@ class PolymorphEffect extends OneShotEffect { Cards cards = new CardsImpl(); Card card = library.removeFromTop(game); cards.add(card); - while (!card.getCardType().contains(CardType.CREATURE) && library.size() > 0) { + while (!card.isCreature() && library.size() > 0) { card = library.removeFromTop(game); cards.add(card); } - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId()); } diff --git a/Mage.Sets/src/mage/cards/p/PossibilityStorm.java b/Mage.Sets/src/mage/cards/p/PossibilityStorm.java index c5d41a92fc..9cb8c7ba9f 100644 --- a/Mage.Sets/src/mage/cards/p/PossibilityStorm.java +++ b/Mage.Sets/src/mage/cards/p/PossibilityStorm.java @@ -147,7 +147,7 @@ class PossibilityStormEffect extends OneShotEffect { } while (library.size() > 0 && card != null && !sharesType(card, spell.getCardType())); if (card != null && sharesType(card, spell.getCardType()) - && !card.getCardType().contains(CardType.LAND) + && !card.isLand() && card.getSpellAbility().canChooseTarget(game)) { if (spellController.chooseUse(Outcome.PlayForFree, "Cast " + card.getLogName() + " without paying cost?", source, game)) { spellController.cast(card.getSpellAbility(), game, true); diff --git a/Mage.Sets/src/mage/cards/p/PowderKeg.java b/Mage.Sets/src/mage/cards/p/PowderKeg.java index c852f099c5..636a44926d 100644 --- a/Mage.Sets/src/mage/cards/p/PowderKeg.java +++ b/Mage.Sets/src/mage/cards/p/PowderKeg.java @@ -94,8 +94,8 @@ class PowderKegEffect extends OneShotEffect { int count = p.getCounters(game).getCount(CounterType.FUSE); for (Permanent perm: game.getBattlefield().getAllActivePermanents()) { - if (perm.getConvertedManaCost() == count && ((perm.getCardType().contains(CardType.ARTIFACT)) - || (perm.getCardType().contains(CardType.CREATURE)))) { + if (perm.getConvertedManaCost() == count && ((perm.isArtifact()) + || (perm.isCreature()))) { perm.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/p/Powerleech.java b/Mage.Sets/src/mage/cards/p/Powerleech.java index 18e8dc8ebd..6b46809e8e 100644 --- a/Mage.Sets/src/mage/cards/p/Powerleech.java +++ b/Mage.Sets/src/mage/cards/p/Powerleech.java @@ -84,7 +84,7 @@ class AbilityActivatedTriggeredAbility3 extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent isArtifact = game.getPermanent(event.getSourceId()); - return isArtifact != null && isArtifact.getCardType().contains(CardType.ARTIFACT) && + return isArtifact != null && isArtifact.isArtifact() && !isArtifact.getControllerId().equals(this.getControllerId()); } diff --git a/Mage.Sets/src/mage/cards/p/PrecursorGolem.java b/Mage.Sets/src/mage/cards/p/PrecursorGolem.java index edfbb4d109..19f2918a49 100644 --- a/Mage.Sets/src/mage/cards/p/PrecursorGolem.java +++ b/Mage.Sets/src/mage/cards/p/PrecursorGolem.java @@ -107,7 +107,7 @@ class PrecursorGolemCopyTriggeredAbility extends TriggeredAbilityImpl { private boolean checkSpell(Spell spell, Game game) { if (spell != null - && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) { + && (spell.isInstant() || spell.isSorcery())) { UUID targetGolem = null; for (TargetAddress addr : TargetAddress.walk(spell)) { Target targetInstance = addr.getTarget(spell); diff --git a/Mage.Sets/src/mage/cards/p/PredatoryAdvantage.java b/Mage.Sets/src/mage/cards/p/PredatoryAdvantage.java index 2a0ef2c004..b0e3c11c0f 100644 --- a/Mage.Sets/src/mage/cards/p/PredatoryAdvantage.java +++ b/Mage.Sets/src/mage/cards/p/PredatoryAdvantage.java @@ -109,7 +109,7 @@ class CastCreatureWatcher extends Watcher { && game.getActivePlayerId().equals(event.getPlayerId()) && game.getOpponents(controllerId).contains(event.getPlayerId())) { Spell spell = (Spell) game.getObject(event.getTargetId()); - if (spell.getCardType().contains(CardType.CREATURE)) { + if (spell.isCreature()) { condition = true; } } diff --git a/Mage.Sets/src/mage/cards/p/PresenceOfTheMaster.java b/Mage.Sets/src/mage/cards/p/PresenceOfTheMaster.java index c1fa389129..208ea4c9d5 100644 --- a/Mage.Sets/src/mage/cards/p/PresenceOfTheMaster.java +++ b/Mage.Sets/src/mage/cards/p/PresenceOfTheMaster.java @@ -90,7 +90,7 @@ class PresenceOfTheMasterTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && (spell.getCardType().contains(CardType.ENCHANTMENT))){ + if (spell != null && (spell.isEnchantment())){ for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } diff --git a/Mage.Sets/src/mage/cards/p/PriceOfGlory.java b/Mage.Sets/src/mage/cards/p/PriceOfGlory.java index 23c71065c9..35e30e70bf 100644 --- a/Mage.Sets/src/mage/cards/p/PriceOfGlory.java +++ b/Mage.Sets/src/mage/cards/p/PriceOfGlory.java @@ -90,7 +90,7 @@ class PriceOfGloryAbility extends TriggeredAbilityImpl { if (permanent == null) { permanent = (Permanent) game.getLastKnownInformation(event.getSourceId(), Zone.BATTLEFIELD); } - if (permanent != null && permanent.getCardType().contains(CardType.LAND) + if (permanent != null && permanent.isLand() && !permanent.getControllerId().equals(game.getActivePlayerId())) { // intervening if clause getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId())); return true; diff --git a/Mage.Sets/src/mage/cards/p/PrimalVigor.java b/Mage.Sets/src/mage/cards/p/PrimalVigor.java index 8e00f33422..2d13fc5f72 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalVigor.java +++ b/Mage.Sets/src/mage/cards/p/PrimalVigor.java @@ -134,7 +134,7 @@ class PrimalVigorCounterEffect extends ReplacementEffectImpl { if (permanent == null) { permanent = game.getPermanentEntering(event.getTargetId()); } - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) + if (permanent != null && permanent.isCreature() && event.getData() != null && event.getData().equals("+1/+1")) { return true; } diff --git a/Mage.Sets/src/mage/cards/p/PrimitiveEtchings.java b/Mage.Sets/src/mage/cards/p/PrimitiveEtchings.java index 93196e6080..7813aa542e 100644 --- a/Mage.Sets/src/mage/cards/p/PrimitiveEtchings.java +++ b/Mage.Sets/src/mage/cards/p/PrimitiveEtchings.java @@ -99,7 +99,7 @@ class PrimitiveEtchingsAbility extends TriggeredAbilityImpl { lastTriggeredTurn = game.getTurnNum(); controller.revealCards(sourcePermanent.getName(), new CardsImpl(card), game); this.getEffects().clear(); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { this.addEffect(new DrawCardSourceControllerEffect(1)); } return true; diff --git a/Mage.Sets/src/mage/cards/p/ProfaneMemento.java b/Mage.Sets/src/mage/cards/p/ProfaneMemento.java index ca678f3e4e..fc8220c01e 100644 --- a/Mage.Sets/src/mage/cards/p/ProfaneMemento.java +++ b/Mage.Sets/src/mage/cards/p/ProfaneMemento.java @@ -87,7 +87,7 @@ class ProfaneMementoTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD) { Card card = game.getCard(event.getTargetId()); - if (card != null && card.getCardType().contains(CardType.CREATURE) && game.getOpponents(controllerId).contains(card.getOwnerId())) { + if (card != null && card.isCreature() && game.getOpponents(controllerId).contains(card.getOwnerId())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/p/ProperBurial.java b/Mage.Sets/src/mage/cards/p/ProperBurial.java index 81485883de..94dc402f36 100644 --- a/Mage.Sets/src/mage/cards/p/ProperBurial.java +++ b/Mage.Sets/src/mage/cards/p/ProperBurial.java @@ -89,7 +89,7 @@ class ProperBurialTriggeredAbility extends TriggeredAbilityImpl { if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent.getControllerId().equals(this.getControllerId()) && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent.getControllerId().equals(this.getControllerId()) && permanent.isCreature()) { this.getEffects().clear(); this.addEffect(new GainLifeEffect(permanent.getToughness().getValue())); return true; diff --git a/Mage.Sets/src/mage/cards/p/ProteusStaff.java b/Mage.Sets/src/mage/cards/p/ProteusStaff.java index 257dea02e7..a79e0fa092 100644 --- a/Mage.Sets/src/mage/cards/p/ProteusStaff.java +++ b/Mage.Sets/src/mage/cards/p/ProteusStaff.java @@ -105,7 +105,7 @@ class ProteusStaffEffect extends OneShotEffect { while (controller.getLibrary().size() > 0) { Card card = controller.getLibrary().removeFromTop(game); if (card != null) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { // The player puts that card onto the battlefield controller.moveCards(card, Zone.BATTLEFIELD, source, game); break; diff --git a/Mage.Sets/src/mage/cards/p/PsychicMiasma.java b/Mage.Sets/src/mage/cards/p/PsychicMiasma.java index b930d95b8c..1adf519396 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicMiasma.java +++ b/Mage.Sets/src/mage/cards/p/PsychicMiasma.java @@ -81,7 +81,7 @@ class PsychicMiasmaEffect extends OneShotEffect { Player player = game.getPlayer(targetPointer.getFirst(game, source)); if (player != null) { Card discardedCard = player.discardOne(false, source, game); - if (discardedCard != null && discardedCard.getCardType().contains(CardType.LAND)) { + if (discardedCard != null && discardedCard.isLand()) { Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard(); if (spellCard != null) { player.moveCards(spellCard, Zone.HAND, source, game); diff --git a/Mage.Sets/src/mage/cards/p/Pyramids.java b/Mage.Sets/src/mage/cards/p/Pyramids.java index 896e4d10d3..25d1250040 100644 --- a/Mage.Sets/src/mage/cards/p/Pyramids.java +++ b/Mage.Sets/src/mage/cards/p/Pyramids.java @@ -92,7 +92,7 @@ class PyramidsPredicate implements ObjectPlayerPredicate Permanent attachment = input.getObject(); if (attachment != null) { Permanent permanent = game.getPermanent(attachment.getAttachedTo()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND)) { + if (permanent != null && permanent.isLand()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/p/PyromancerAscension.java b/Mage.Sets/src/mage/cards/p/PyromancerAscension.java index 87449fb221..556835d047 100644 --- a/Mage.Sets/src/mage/cards/p/PyromancerAscension.java +++ b/Mage.Sets/src/mage/cards/p/PyromancerAscension.java @@ -115,7 +115,7 @@ class PyromancerAscensionQuestTriggeredAbility extends TriggeredAbilityImpl { private boolean isControlledInstantOrSorcery(Spell spell) { return spell != null && (spell.getControllerId().equals(this.getControllerId())) && - (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY)); + (spell.isInstant() || spell.isSorcery()); } @Override @@ -162,7 +162,7 @@ class PyromancerAscensionCopyTriggeredAbility extends TriggeredAbilityImpl { private boolean isControlledInstantOrSorcery(Spell spell) { return spell != null && (spell.getControllerId().equals(this.getControllerId())) && - (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY)); + (spell.isInstant() || spell.isSorcery()); } @Override diff --git a/Mage.Sets/src/mage/cards/p/PyromancersGauntlet.java b/Mage.Sets/src/mage/cards/p/PyromancersGauntlet.java index 29ad06a409..1a2c6717ff 100644 --- a/Mage.Sets/src/mage/cards/p/PyromancersGauntlet.java +++ b/Mage.Sets/src/mage/cards/p/PyromancersGauntlet.java @@ -89,13 +89,13 @@ class PyromancersGauntletReplacementEffect extends ReplacementEffectImpl { MageObject object = game.getObject(event.getSourceId()); if (object != null && object instanceof Spell) { if (((Spell) object).getControllerId().equals(source.getControllerId()) - && (object.getCardType().contains(CardType.INSTANT) - || object.getCardType().contains(CardType.SORCERY))){ + && (object.isInstant() + || object.isSorcery())){ return true; } } Permanent permanent = game.getBattlefield().getPermanent(event.getSourceId()); - if(permanent != null && permanent.getCardType().contains(CardType.PLANESWALKER)){ + if(permanent != null && permanent.isPlaneswalker()){ return true; } return false; diff --git a/Mage.Sets/src/mage/cards/p/PyromancersSwath.java b/Mage.Sets/src/mage/cards/p/PyromancersSwath.java index 847f868d1f..8b065f2158 100644 --- a/Mage.Sets/src/mage/cards/p/PyromancersSwath.java +++ b/Mage.Sets/src/mage/cards/p/PyromancersSwath.java @@ -94,7 +94,7 @@ class PyromancersSwathReplacementEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (source.getControllerId().equals(game.getControllerId(event.getSourceId()))) { MageObject object = game.getObject(event.getSourceId()); - return object != null && (object.getCardType().contains(CardType.INSTANT) || object.getCardType().contains(CardType.SORCERY)); + return object != null && (object.isInstant() || object.isSorcery()); } return false; } diff --git a/Mage.Sets/src/mage/cards/p/PyrrhicRevival.java b/Mage.Sets/src/mage/cards/p/PyrrhicRevival.java index cd0a150db0..f4b7df182f 100644 --- a/Mage.Sets/src/mage/cards/p/PyrrhicRevival.java +++ b/Mage.Sets/src/mage/cards/p/PyrrhicRevival.java @@ -91,7 +91,7 @@ class PyrrhicRevivalEffect extends OneShotEffect { if (player != null) { Cards cards = player.getGraveyard(); for (Card card : cards.getCards(game)) { - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { if (card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), card.getOwnerId(), false)) { Permanent permanent = game.getPermanent(card.getId()); if (permanent != null) { diff --git a/Mage.Sets/src/mage/cards/q/QuestForUlasTemple.java b/Mage.Sets/src/mage/cards/q/QuestForUlasTemple.java index 01f79cbdc3..fc93255ea9 100644 --- a/Mage.Sets/src/mage/cards/q/QuestForUlasTemple.java +++ b/Mage.Sets/src/mage/cards/q/QuestForUlasTemple.java @@ -102,7 +102,7 @@ class QuestForUlasTempleEffect extends OneShotEffect { Card card = controller.getLibrary().getFromTop(game); Cards cards = new CardsImpl(card); controller.lookAtCards(sourcePermanent.getName(), cards, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { if (controller.chooseUse(Outcome.DrawCard, "Do you wish to reveal the creature card at the top of the library?", source, game)) { controller.revealCards(sourcePermanent.getName(), cards, game); Permanent questForUlasTemple = game.getPermanent(source.getSourceId()); diff --git a/Mage.Sets/src/mage/cards/q/Quicken.java b/Mage.Sets/src/mage/cards/q/Quicken.java index 04b2d4a018..d55ec3a77c 100644 --- a/Mage.Sets/src/mage/cards/q/Quicken.java +++ b/Mage.Sets/src/mage/cards/q/Quicken.java @@ -114,7 +114,7 @@ class QuickenAsThoughEffect extends AsThoughEffectImpl { public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { if (quickenWatcher.isQuickenSpellActive(affectedControllerId, source.getSourceId(), zoneChangeCounter)) { Card card = game.getCard(sourceId); - if (card != null && card.getCardType().contains(CardType.SORCERY) && source.getControllerId().equals(affectedControllerId)) { + if (card != null && card.isSorcery() && source.getControllerId().equals(affectedControllerId)) { return true; } } @@ -145,7 +145,7 @@ class QuickenWatcher extends Watcher { if (event.getType() == GameEvent.EventType.SPELL_CAST) { if (!activeQuickenSpells.isEmpty() && event.getPlayerId().equals(getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && spell.getCardType().contains(CardType.SORCERY)) { + if (spell != null && spell.isSorcery()) { activeQuickenSpells.clear(); } } diff --git a/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java b/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java index 4eae9da2bc..5ca49e5284 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java +++ b/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java @@ -152,7 +152,7 @@ class RakdosLordOfRiotsCostReductionEffect extends CostModificationEffectImpl { public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { Card sourceCard = game.getCard(abilityToModify.getSourceId()); - if (sourceCard != null && abilityToModify.getControllerId().equals(source.getControllerId()) && (sourceCard.getCardType().contains(CardType.CREATURE))) { + if (sourceCard != null && abilityToModify.getControllerId().equals(source.getControllerId()) && (sourceCard.isCreature())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/r/RallyTheHorde.java b/Mage.Sets/src/mage/cards/r/RallyTheHorde.java index b3d73bb8fa..6931b03169 100644 --- a/Mage.Sets/src/mage/cards/r/RallyTheHorde.java +++ b/Mage.Sets/src/mage/cards/r/RallyTheHorde.java @@ -110,7 +110,7 @@ class RallyTheHordeEffect extends OneShotEffect { Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true); - return card.getCardType().contains(CardType.LAND) ? 0:1; + return card.isLand() ? 0:1; } return 0; } diff --git a/Mage.Sets/src/mage/cards/r/RashmiEternitiesCrafter.java b/Mage.Sets/src/mage/cards/r/RashmiEternitiesCrafter.java index 6d60018291..19146e40f5 100644 --- a/Mage.Sets/src/mage/cards/r/RashmiEternitiesCrafter.java +++ b/Mage.Sets/src/mage/cards/r/RashmiEternitiesCrafter.java @@ -141,7 +141,7 @@ class RashmiEternitiesCrafterEffect extends OneShotEffect { controller.revealCards("Rashmi, Eternities Crafter", new CardsImpl(card), game); Object cmcObject = this.getValue("RashmiEternitiesCrafterCMC"); if (cmcObject == null - || card.getCardType().contains(CardType.LAND) + || card.isLand() || card.getConvertedManaCost() >= (int) cmcObject || !controller.chooseUse(Outcome.PlayForFree, "Cast " + card.getName() + " without paying its mana cost?", source, game) || !controller.cast(card.getSpellAbility(), game, true)) { diff --git a/Mage.Sets/src/mage/cards/r/RatchetBomb.java b/Mage.Sets/src/mage/cards/r/RatchetBomb.java index 17b93d735f..2fc69179f8 100644 --- a/Mage.Sets/src/mage/cards/r/RatchetBomb.java +++ b/Mage.Sets/src/mage/cards/r/RatchetBomb.java @@ -95,7 +95,7 @@ public class RatchetBomb extends CardImpl { int count = p.getCounters(game).getCount(CounterType.CHARGE); for (Permanent perm: game.getBattlefield().getAllActivePermanents()) { - if (perm.getConvertedManaCost() == count && !(perm.getCardType().contains(CardType.LAND))) { + if (perm.getConvertedManaCost() == count && !(perm.isLand())) { perm.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/r/RefractionTrap.java b/Mage.Sets/src/mage/cards/r/RefractionTrap.java index c770cd33ee..34acfdc556 100644 --- a/Mage.Sets/src/mage/cards/r/RefractionTrap.java +++ b/Mage.Sets/src/mage/cards/r/RefractionTrap.java @@ -95,7 +95,7 @@ class RefractionTrapCondition implements Condition { List spells = watcher.getSpellsCastThisTurn(opponentId); if (spells != null) { for (Spell spell : spells) { - if ((spell.getCardType().contains(CardType.SORCERY) || spell.getCardType().contains(CardType.INSTANT)) + if ((spell.isSorcery() || spell.isInstant()) && spell.getColor(game).isRed()) { return true; } diff --git a/Mage.Sets/src/mage/cards/r/RenegadeDoppelganger.java b/Mage.Sets/src/mage/cards/r/RenegadeDoppelganger.java index 6b85737312..c6f05249ce 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeDoppelganger.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeDoppelganger.java @@ -97,7 +97,7 @@ class RenegadeDoppelgangerTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (!event.getTargetId().equals(this.getSourceId())) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) && permanent.getControllerId().equals(this.getControllerId())) { + if (permanent != null && permanent.isCreature() && permanent.getControllerId().equals(this.getControllerId())) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(permanent.getId())); } diff --git a/Mage.Sets/src/mage/cards/r/RenownedWeaponsmith.java b/Mage.Sets/src/mage/cards/r/RenownedWeaponsmith.java index 11dec6ef28..b240e40be7 100644 --- a/Mage.Sets/src/mage/cards/r/RenownedWeaponsmith.java +++ b/Mage.Sets/src/mage/cards/r/RenownedWeaponsmith.java @@ -115,7 +115,7 @@ class RenownedWeaponsmithCondition implements Condition { public boolean apply(Game game, Ability source) { MageObject object = game.getObject(source.getSourceId()); return (object != null - && object.getCardType().contains(CardType.ARTIFACT)); + && object.isArtifact()); } } diff --git a/Mage.Sets/src/mage/cards/r/Revenge.java b/Mage.Sets/src/mage/cards/r/Revenge.java index 302ad10394..f57ead444c 100644 --- a/Mage.Sets/src/mage/cards/r/Revenge.java +++ b/Mage.Sets/src/mage/cards/r/Revenge.java @@ -125,7 +125,7 @@ class RevengeEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Permanent target = game.getPermanent(targetPointer.getFirst(game, source)); - if (target != null && target.getCardType().contains(CardType.CREATURE)) { + if (target != null && target.isCreature()) { ContinuousEffect effect = new BoostTargetEffect(4, 0, Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(target.getId())); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java b/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java index 8e8dd03aad..cadf436437 100644 --- a/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java +++ b/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java @@ -109,7 +109,7 @@ class ReyhanLastOfTheAbzanTriggeredAbility extends TriggeredAbilityImpl { if ((((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD || ((ZoneChangeEvent) event).getToZone() == Zone.COMMAND) && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent.getControllerId().equals(this.getControllerId()) && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent.getControllerId().equals(this.getControllerId()) && permanent.isCreature()) { int countersOn = permanent.getCounters(game).getCount(CounterType.P1P1); if (countersOn > 0) { this.getEffects().clear(); diff --git a/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java b/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java index 2e59874274..6d5d4947f0 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java +++ b/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java @@ -110,7 +110,7 @@ class RiptideShapeshifterEffect extends OneShotEffect { Cards revealedCards = new CardsImpl(); while (controller.getLibrary().size() > 0) { Card card = controller.getLibrary().removeFromTop(game); - if (card.getCardType().contains(CardType.CREATURE) && card.getSubtype(game).contains(choice.getChoice())) { + if (card.isCreature() && card.getSubtype(game).contains(choice.getChoice())) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); break; } diff --git a/Mage.Sets/src/mage/cards/r/RiseFall.java b/Mage.Sets/src/mage/cards/r/RiseFall.java index 6c8f8bd8e5..2f92cfdde7 100644 --- a/Mage.Sets/src/mage/cards/r/RiseFall.java +++ b/Mage.Sets/src/mage/cards/r/RiseFall.java @@ -149,7 +149,7 @@ class FallEffect extends OneShotEffect { } targetPlayer.revealCards(sourceObject.getIdName(), cards, game); for (Card cardToDiscard : cards.getCards(game)) { - if (!cardToDiscard.getCardType().contains(CardType.LAND)) { + if (!cardToDiscard.isLand()) { targetPlayer.discard(cardToDiscard, source, game); } } diff --git a/Mage.Sets/src/mage/cards/r/RiseOfTheDarkRealms.java b/Mage.Sets/src/mage/cards/r/RiseOfTheDarkRealms.java index 26bb709d9c..54d5bb6089 100644 --- a/Mage.Sets/src/mage/cards/r/RiseOfTheDarkRealms.java +++ b/Mage.Sets/src/mage/cards/r/RiseOfTheDarkRealms.java @@ -85,7 +85,7 @@ class RiseOfTheDarkRealmsEffect extends OneShotEffect { Player player = game.getPlayer(playerId); if (player != null) { for (Card card : player.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creatureCards.add(card); } } diff --git a/Mage.Sets/src/mage/cards/r/RivalsDuel.java b/Mage.Sets/src/mage/cards/r/RivalsDuel.java index ce803a0da6..3f151591eb 100644 --- a/Mage.Sets/src/mage/cards/r/RivalsDuel.java +++ b/Mage.Sets/src/mage/cards/r/RivalsDuel.java @@ -115,7 +115,7 @@ class RivalsDuelFightTargetsEffect extends OneShotEffect { Permanent creature2 = game.getPermanent(target.getTargets().get(1)); // 20110930 - 701.10 if (creature1 != null && creature2 != null) { - if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) { + if (creature1.isCreature() && creature2.isCreature()) { creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true); creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true); return true; diff --git a/Mage.Sets/src/mage/cards/r/RoninWarclub.java b/Mage.Sets/src/mage/cards/r/RoninWarclub.java index a7ac27d259..7df19e3274 100644 --- a/Mage.Sets/src/mage/cards/r/RoninWarclub.java +++ b/Mage.Sets/src/mage/cards/r/RoninWarclub.java @@ -96,7 +96,7 @@ public class RoninWarclub extends CardImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.getCardType().contains(CardType.CREATURE) + if (permanent.isCreature() && (permanent.getControllerId().equals(this.controllerId))) { if (!this.getTargets().isEmpty()) { diff --git a/Mage.Sets/src/mage/cards/r/RootMaze.java b/Mage.Sets/src/mage/cards/r/RootMaze.java index ee9ee93180..deabb035f9 100644 --- a/Mage.Sets/src/mage/cards/r/RootMaze.java +++ b/Mage.Sets/src/mage/cards/r/RootMaze.java @@ -94,7 +94,7 @@ class RootMazeEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - return permanent != null && (permanent.getCardType().contains(CardType.LAND) || permanent.getCardType().contains(CardType.ARTIFACT)); + return permanent != null && (permanent.isLand() || permanent.isArtifact()); } @Override diff --git a/Mage.Sets/src/mage/cards/r/Rowen.java b/Mage.Sets/src/mage/cards/r/Rowen.java index c7204dc580..4c8c0c6f0e 100644 --- a/Mage.Sets/src/mage/cards/r/Rowen.java +++ b/Mage.Sets/src/mage/cards/r/Rowen.java @@ -99,7 +99,7 @@ class RowenAbility extends TriggeredAbilityImpl { lastTriggeredTurn = game.getTurnNum(); controller.revealCards(sourcePermanent.getName(), new CardsImpl(card), game); this.getEffects().clear(); - if (card.getCardType().contains(CardType.LAND) && card.getSupertype().contains("Basic")) { + if (card.isLand() && card.getSupertype().contains("Basic")) { this.addEffect(new DrawCardSourceControllerEffect(1)); } return true; diff --git a/Mage.Sets/src/mage/cards/r/RuricTharTheUnbowed.java b/Mage.Sets/src/mage/cards/r/RuricTharTheUnbowed.java index 06807003a6..c28da88fbd 100644 --- a/Mage.Sets/src/mage/cards/r/RuricTharTheUnbowed.java +++ b/Mage.Sets/src/mage/cards/r/RuricTharTheUnbowed.java @@ -106,7 +106,7 @@ class RuricTharTheUnbowedAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && !spell.getCardType().contains(CardType.CREATURE)) { + if (spell != null && !spell.isCreature()) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getPlayerId())); } diff --git a/Mage.Sets/src/mage/cards/r/RuthlessDeathfang.java b/Mage.Sets/src/mage/cards/r/RuthlessDeathfang.java index 6c801a812b..3b79c23c3a 100644 --- a/Mage.Sets/src/mage/cards/r/RuthlessDeathfang.java +++ b/Mage.Sets/src/mage/cards/r/RuthlessDeathfang.java @@ -98,7 +98,7 @@ class RuthlessDeathfangTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getCardType().contains(CardType.CREATURE); + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).isCreature(); } @Override diff --git a/Mage.Sets/src/mage/cards/r/RuthlessInvasion.java b/Mage.Sets/src/mage/cards/r/RuthlessInvasion.java index 1fe3b2acc0..56c7a95a20 100644 --- a/Mage.Sets/src/mage/cards/r/RuthlessInvasion.java +++ b/Mage.Sets/src/mage/cards/r/RuthlessInvasion.java @@ -74,7 +74,7 @@ class RuthlessInvasionEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - if (!permanent.getCardType().contains(CardType.ARTIFACT)) { + if (!permanent.isArtifact()) { return true; } return false; diff --git a/Mage.Sets/src/mage/cards/s/SacredGround.java b/Mage.Sets/src/mage/cards/s/SacredGround.java index 53acd31aa7..d3230e22b6 100644 --- a/Mage.Sets/src/mage/cards/s/SacredGround.java +++ b/Mage.Sets/src/mage/cards/s/SacredGround.java @@ -90,7 +90,7 @@ class SacredGroundTriggeredAbility extends TriggeredAbilityImpl { ZoneChangeEvent zce = (ZoneChangeEvent) event; if (Zone.BATTLEFIELD.equals(zce.getFromZone()) && Zone.GRAVEYARD.equals(zce.getToZone())) { Permanent targetPermanent = zce.getTarget(); - if (targetPermanent.getCardType().contains(CardType.LAND) && targetPermanent.getControllerId().equals(getControllerId())) { + if (targetPermanent.isLand() && targetPermanent.getControllerId().equals(getControllerId())) { getEffects().get(0).setTargetPointer(new FixedTarget(targetPermanent.getId(), game.getState().getZoneChangeCounter(targetPermanent.getId()))); return true; } diff --git a/Mage.Sets/src/mage/cards/s/SageOfFables.java b/Mage.Sets/src/mage/cards/s/SageOfFables.java index df9d74c49b..1191c3f0e6 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfFables.java +++ b/Mage.Sets/src/mage/cards/s/SageOfFables.java @@ -101,7 +101,7 @@ class SageOfFablesReplacementEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget(); return creature != null && creature.getControllerId().equals(source.getControllerId()) - && creature.getCardType().contains(CardType.CREATURE) + && creature.isCreature() && creature.getSubtype(game).contains("Wizard") && !event.getTargetId().equals(source.getSourceId()); } diff --git a/Mage.Sets/src/mage/cards/s/SagesOfTheAnima.java b/Mage.Sets/src/mage/cards/s/SagesOfTheAnima.java index c4d94a0149..df436d3d8a 100644 --- a/Mage.Sets/src/mage/cards/s/SagesOfTheAnima.java +++ b/Mage.Sets/src/mage/cards/s/SagesOfTheAnima.java @@ -113,7 +113,7 @@ class SagesOfTheAnimaReplacementEffect extends ReplacementEffectImpl { } player.revealCards("Top three cards of library revealed", cards, game); for (Card revealedCard : cards.getCards(game)) { - if (revealedCard.getCardType().contains(CardType.CREATURE)) { + if (revealedCard.isCreature()) { revealedCard.moveToZone(Zone.HAND, source.getSourceId(), game, false); cards.remove(revealedCard); } diff --git a/Mage.Sets/src/mage/cards/s/SagesReverie.java b/Mage.Sets/src/mage/cards/s/SagesReverie.java index e27b973b8c..7d27d57a9f 100644 --- a/Mage.Sets/src/mage/cards/s/SagesReverie.java +++ b/Mage.Sets/src/mage/cards/s/SagesReverie.java @@ -95,7 +95,7 @@ class SagesReveriePredicate implements Predicate { public boolean apply(Permanent input, Game game) { UUID attachedTo = input.getAttachedTo(); Permanent attachedToPermanent = game.getPermanent(attachedTo); - return attachedToPermanent != null && attachedToPermanent.getCardType().contains(CardType.CREATURE); + return attachedToPermanent != null && attachedToPermanent.isCreature(); } @Override diff --git a/Mage.Sets/src/mage/cards/s/SanctumPrelate.java b/Mage.Sets/src/mage/cards/s/SanctumPrelate.java index b79ecd0e4e..7a3894c198 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumPrelate.java +++ b/Mage.Sets/src/mage/cards/s/SanctumPrelate.java @@ -151,7 +151,7 @@ class SanctumPrelateReplacementEffect extends ContinuousRuleModifyingEffectImpl choiceValue = (Integer) game.getState().getValue(source.getSourceId().toString()); Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && !spell.getCardType().contains(CardType.CREATURE)){ + if (spell != null && !spell.isCreature()){ return spell.getConvertedManaCost() == choiceValue; } return false; diff --git a/Mage.Sets/src/mage/cards/s/Sangromancer.java b/Mage.Sets/src/mage/cards/s/Sangromancer.java index 67c467e412..4e2078f77b 100644 --- a/Mage.Sets/src/mage/cards/s/Sangromancer.java +++ b/Mage.Sets/src/mage/cards/s/Sangromancer.java @@ -94,7 +94,7 @@ class SangromancerFirstTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (((ZoneChangeEvent) event).isDiesEvent()) { Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (p != null && p.getCardType().contains(CardType.CREATURE) && game.getOpponents(this.getControllerId()).contains(p.getControllerId())) { + if (p != null && p.isCreature() && game.getOpponents(this.getControllerId()).contains(p.getControllerId())) { return true; } } diff --git a/Mage.Sets/src/mage/cards/s/SaplingOfColfenor.java b/Mage.Sets/src/mage/cards/s/SaplingOfColfenor.java index d60b5ffa3e..998d2a8d7d 100644 --- a/Mage.Sets/src/mage/cards/s/SaplingOfColfenor.java +++ b/Mage.Sets/src/mage/cards/s/SaplingOfColfenor.java @@ -104,7 +104,7 @@ class SaplingOfColfenorEffect extends OneShotEffect { Card card = controller.getLibrary().getFromTop(game); Cards cards = new CardsImpl(card); controller.revealCards(sourceObject.getIdName(), cards, game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { controller.gainLife(card.getToughness().getValue(), game); controller.loseLife(card.getPower().getValue(), game, false); return controller.moveCards(cards.getCards(game), Zone.HAND, source, game); diff --git a/Mage.Sets/src/mage/cards/s/SatyrFiredancer.java b/Mage.Sets/src/mage/cards/s/SatyrFiredancer.java index 4f954a97b0..05ecd6fdd4 100644 --- a/Mage.Sets/src/mage/cards/s/SatyrFiredancer.java +++ b/Mage.Sets/src/mage/cards/s/SatyrFiredancer.java @@ -125,7 +125,7 @@ class SatyrFiredancerTriggeredAbility extends TriggeredAbilityImpl { if (damageSource != null) { if (game.getOpponents(getControllerId()).contains(event.getTargetId())) { MageObject object = game.getObject(event.getSourceId()); - if (object.getCardType().contains(CardType.INSTANT) || object.getCardType().contains(CardType.SORCERY)) { + if (object.isInstant() || object.isSorcery()) { if (!(damageSource instanceof StackObject) || !handledStackObjects.contains(damageSource.getId())) { if (damageSource instanceof StackObject) { handledStackObjects.add(damageSource.getId()); diff --git a/Mage.Sets/src/mage/cards/s/SavaenElves.java b/Mage.Sets/src/mage/cards/s/SavaenElves.java index faf60c9b62..6ca3f523f0 100644 --- a/Mage.Sets/src/mage/cards/s/SavaenElves.java +++ b/Mage.Sets/src/mage/cards/s/SavaenElves.java @@ -91,7 +91,7 @@ class SavaenElvesPredicate implements ObjectPlayerPredicate(savageSummoningSpells)); String cardKey = new StringBuilder(spell.getCard().getId().toString()).append('_').append(spell.getCard().getZoneChangeCounter(game)).toString(); cardsCastWithSavageSummoning.put(cardKey, new HashSet<>(savageSummoningSpells)); diff --git a/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java b/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java index 7d83013330..fe7338f417 100644 --- a/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java +++ b/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java @@ -106,7 +106,7 @@ class SavraSacrificeBlackCreatureAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getCardType().contains(CardType.CREATURE) + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).isCreature() && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getColor(game).isBlack(); } @@ -183,7 +183,7 @@ class SavraSacrificeGreenCreatureAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getCardType().contains(CardType.CREATURE) + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).isCreature() && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getColor(game).isGreen(); } diff --git a/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java b/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java index 75f4356184..82c885b5b1 100644 --- a/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java +++ b/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java @@ -107,7 +107,7 @@ class ScabClanBerserkerTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (game.getOpponents(controllerId).contains(event.getPlayerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && !spell.getCardType().contains(CardType.CREATURE)){ + if (spell != null && !spell.isCreature()){ for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getPlayerId())); } diff --git a/Mage.Sets/src/mage/cards/s/ScabClanGiant.java b/Mage.Sets/src/mage/cards/s/ScabClanGiant.java index ad1df2d0b3..82c48d07a8 100644 --- a/Mage.Sets/src/mage/cards/s/ScabClanGiant.java +++ b/Mage.Sets/src/mage/cards/s/ScabClanGiant.java @@ -104,7 +104,7 @@ class ScabClanGiantEffect extends OneShotEffect { Permanent creature2 = game.getPermanent(source.getFirstTarget()); // 20110930 - 701.10 if (creature1 != null && creature2 != null) { - if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) { + if (creature1.isCreature() && creature2.isCreature()) { return creature1.fight(creature2, source, game); } } diff --git a/Mage.Sets/src/mage/cards/s/ScavengingOoze.java b/Mage.Sets/src/mage/cards/s/ScavengingOoze.java index edf2930bc9..0c037f216c 100644 --- a/Mage.Sets/src/mage/cards/s/ScavengingOoze.java +++ b/Mage.Sets/src/mage/cards/s/ScavengingOoze.java @@ -96,7 +96,7 @@ class ScavengingOozeEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null && card != null) { controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent != null) { sourcePermanent.addCounters(CounterType.P1P1.createInstance(), source, game); diff --git a/Mage.Sets/src/mage/cards/s/ScoutsWarning.java b/Mage.Sets/src/mage/cards/s/ScoutsWarning.java index bf81872687..b7ad2a982f 100644 --- a/Mage.Sets/src/mage/cards/s/ScoutsWarning.java +++ b/Mage.Sets/src/mage/cards/s/ScoutsWarning.java @@ -113,7 +113,7 @@ class ScoutsWarningAsThoughEffect extends AsThoughEffectImpl { public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { if (watcher.isScoutsWarningSpellActive(source.getSourceId(), zoneChangeCounter)) { Card card = game.getCard(sourceId); - if (card != null && card.getCardType().contains(CardType.CREATURE) && source.getControllerId().equals(affectedControllerId)) { + if (card != null && card.isCreature() && source.getControllerId().equals(affectedControllerId)) { return true; } } @@ -144,7 +144,7 @@ class ScoutsWarningWatcher extends Watcher { if (event.getType() == GameEvent.EventType.SPELL_CAST) { if (!activeScoutsWarningSpells.isEmpty() && event.getPlayerId().equals(getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && spell.getCardType().contains(CardType.CREATURE)) { + if (spell != null && spell.isCreature()) { activeScoutsWarningSpells.clear(); } } diff --git a/Mage.Sets/src/mage/cards/s/ScrapTrawler.java b/Mage.Sets/src/mage/cards/s/ScrapTrawler.java index 557bb48562..d00950e5fe 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapTrawler.java +++ b/Mage.Sets/src/mage/cards/s/ScrapTrawler.java @@ -103,7 +103,7 @@ class ScrapTrawlerTriggeredAbility extends TriggeredAbilityImpl { if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) { Permanent permanent = ((ZoneChangeEvent) event).getTarget(); - if (permanent.getControllerId().equals(this.getControllerId()) && permanent.getCardType().contains(CardType.ARTIFACT)) { + if (permanent.getControllerId().equals(this.getControllerId()) && permanent.isArtifact()) { FilterCard filter = new FilterArtifactCard("artifact card in your graveyard with converted mana cost less than " + permanent.getManaCost().convertedManaCost()); filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, permanent.getManaCost().convertedManaCost())); TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter); diff --git a/Mage.Sets/src/mage/cards/s/ScribNibblers.java b/Mage.Sets/src/mage/cards/s/ScribNibblers.java index 2a115cbe22..9694d7a241 100644 --- a/Mage.Sets/src/mage/cards/s/ScribNibblers.java +++ b/Mage.Sets/src/mage/cards/s/ScribNibblers.java @@ -101,7 +101,7 @@ class ScribNibblersEffect extends OneShotEffect { if (targetPlayer != null && targetPlayer.getLibrary().size() > 0) { Card card = targetPlayer.getLibrary().getFromTop(game); card.moveToExile(id, "Scrib Nibblers Exile", source.getSourceId(), game); - if (card != null && card.getCardType().contains(CardType.LAND)) { + if (card != null && card.isLand()) { you.gainLife(1, game); return true; } diff --git a/Mage.Sets/src/mage/cards/s/ScytheOfTheWretched.java b/Mage.Sets/src/mage/cards/s/ScytheOfTheWretched.java index df74237276..bf10ce7ecc 100644 --- a/Mage.Sets/src/mage/cards/s/ScytheOfTheWretched.java +++ b/Mage.Sets/src/mage/cards/s/ScytheOfTheWretched.java @@ -107,7 +107,7 @@ class ScytheOfTheWretchedTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { ZoneChangeEvent zoneChange = (ZoneChangeEvent) event; - if (zoneChange.isDiesEvent() && zoneChange.getTarget().getCardType().contains(CardType.CREATURE)) { + if (zoneChange.isDiesEvent() && zoneChange.getTarget().isCreature()) { Permanent equippedCreature = getEquippedCreature(game); for (MageObjectReference mor : zoneChange.getTarget().getDealtDamageByThisTurn()) { Permanent permanent = (Permanent) game.getLastKnownInformation(mor.getSourceId(), Zone.BATTLEFIELD); diff --git a/Mage.Sets/src/mage/cards/s/SecondSunrise.java b/Mage.Sets/src/mage/cards/s/SecondSunrise.java index 4ce88d3d74..066c52f497 100644 --- a/Mage.Sets/src/mage/cards/s/SecondSunrise.java +++ b/Mage.Sets/src/mage/cards/s/SecondSunrise.java @@ -87,8 +87,8 @@ class SecondSunriseEffect extends OneShotEffect { for (UUID id : watcher.cards) { Card c = game.getCard(id); if (c != null && game.getState().getZone(id) == Zone.GRAVEYARD) { - if (c.getCardType().contains(CardType.ARTIFACT) || c.getCardType().contains(CardType.CREATURE) || - c.getCardType().contains(CardType.ENCHANTMENT) || c.getCardType().contains(CardType.LAND)) + if (c.isArtifact() || c.isCreature() || + c.isEnchantment() || c.isLand()) c.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/s/SedrisTheTraitorKing.java b/Mage.Sets/src/mage/cards/s/SedrisTheTraitorKing.java index 27ee4501a7..eb0e3229b0 100644 --- a/Mage.Sets/src/mage/cards/s/SedrisTheTraitorKing.java +++ b/Mage.Sets/src/mage/cards/s/SedrisTheTraitorKing.java @@ -86,7 +86,7 @@ class SedrisTheTraitorKingEffect extends ContinuousEffectImpl { if (controller != null) { for (UUID cardId : controller.getGraveyard()) { Card card = game.getCard(cardId); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { UnearthAbility ability = new UnearthAbility(new ManaCostsImpl("{2}{B}")); ability.setSourceId(cardId); ability.setControllerId(card.getOwnerId()); diff --git a/Mage.Sets/src/mage/cards/s/SelvalasStampede.java b/Mage.Sets/src/mage/cards/s/SelvalasStampede.java index c7150f9252..25738a0190 100644 --- a/Mage.Sets/src/mage/cards/s/SelvalasStampede.java +++ b/Mage.Sets/src/mage/cards/s/SelvalasStampede.java @@ -91,7 +91,7 @@ class SelvalasStampedeDilemmaEffect extends CouncilsDilemmaVoteEffect { while (cardsToReveal > 0 && controller.getLibrary().size() > 0) { Card card = controller.getLibrary().removeFromTop(game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); cardsToReveal--; } else { diff --git a/Mage.Sets/src/mage/cards/s/SerumTank.java b/Mage.Sets/src/mage/cards/s/SerumTank.java index 686c3211df..5ac02704e5 100644 --- a/Mage.Sets/src/mage/cards/s/SerumTank.java +++ b/Mage.Sets/src/mage/cards/s/SerumTank.java @@ -102,7 +102,7 @@ class SerumTankTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { UUID targetId = event.getTargetId(); Permanent permanent = game.getPermanent(targetId); - if (permanent.getCardType().contains(CardType.ARTIFACT)) { + if (permanent.isArtifact()) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(permanent, game)); } diff --git a/Mage.Sets/src/mage/cards/s/ShallowGrave.java b/Mage.Sets/src/mage/cards/s/ShallowGrave.java index cfe21de4a5..a387082099 100644 --- a/Mage.Sets/src/mage/cards/s/ShallowGrave.java +++ b/Mage.Sets/src/mage/cards/s/ShallowGrave.java @@ -94,7 +94,7 @@ class ShallowGraveEffect extends OneShotEffect { if (controller != null) { Card lastCreatureCard = null; for (Card card : controller.getGraveyard().getCards(game)) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { lastCreatureCard = card; } } diff --git a/Mage.Sets/src/mage/cards/s/ShamanOfForgottenWays.java b/Mage.Sets/src/mage/cards/s/ShamanOfForgottenWays.java index 59ea792288..2bcc656f3e 100644 --- a/Mage.Sets/src/mage/cards/s/ShamanOfForgottenWays.java +++ b/Mage.Sets/src/mage/cards/s/ShamanOfForgottenWays.java @@ -117,7 +117,7 @@ class ShamanOfForgottenWaysManaCondition implements Condition { @Override public boolean apply(Game game, Ability source) { MageObject object = source.getSourceObject(game); - return object != null && (object instanceof Spell) && object.getCardType().contains(CardType.CREATURE); + return object != null && (object instanceof Spell) && object.isCreature(); } } diff --git a/Mage.Sets/src/mage/cards/s/ShapeAnew.java b/Mage.Sets/src/mage/cards/s/ShapeAnew.java index f80cda39ca..e8c85d8573 100644 --- a/Mage.Sets/src/mage/cards/s/ShapeAnew.java +++ b/Mage.Sets/src/mage/cards/s/ShapeAnew.java @@ -103,7 +103,7 @@ public class ShapeAnew extends CardImpl { while (artifactCard == null && targetController.getLibrary().size() > 0) { Card card = targetController.getLibrary().removeFromTop(game); revealed.add(card); - if (card.getCardType().contains(CardType.ARTIFACT)) { + if (card.isArtifact()) { artifactCard = card; } else { nonArtifactCards.add(card); diff --git a/Mage.Sets/src/mage/cards/s/ShapeshiftersMarrow.java b/Mage.Sets/src/mage/cards/s/ShapeshiftersMarrow.java index 11c7556f1d..b11310d825 100644 --- a/Mage.Sets/src/mage/cards/s/ShapeshiftersMarrow.java +++ b/Mage.Sets/src/mage/cards/s/ShapeshiftersMarrow.java @@ -88,7 +88,7 @@ public class ShapeshiftersMarrow extends CardImpl { Card card = activePlayer.getLibrary().getFromTop(game); if (card != null) { activePlayer.revealCards(sourceObject.getIdName(), new CardsImpl(card), game); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { activePlayer.moveCards(activePlayer.getLibrary().getTopCards(game, 1), Zone.GRAVEYARD, source, game); CopyEffect copyEffect = new CopyEffect(Duration.Custom, card, source.getSourceId()); game.addEffect(copyEffect, source); diff --git a/Mage.Sets/src/mage/cards/s/ShiningShoal.java b/Mage.Sets/src/mage/cards/s/ShiningShoal.java index 1c4afc27f8..c9e2f63ed0 100644 --- a/Mage.Sets/src/mage/cards/s/ShiningShoal.java +++ b/Mage.Sets/src/mage/cards/s/ShiningShoal.java @@ -178,7 +178,7 @@ class ShiningShoalPreventDamageTargetEffect extends PreventionEffectImpl { // check target // check creature first Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { if (permanent.getControllerId().equals(source.getControllerId())) { // it's your creature return true; diff --git a/Mage.Sets/src/mage/cards/s/ShireiShizosCaretaker.java b/Mage.Sets/src/mage/cards/s/ShireiShizosCaretaker.java index 8a58eab77c..7b6fc39f94 100644 --- a/Mage.Sets/src/mage/cards/s/ShireiShizosCaretaker.java +++ b/Mage.Sets/src/mage/cards/s/ShireiShizosCaretaker.java @@ -107,7 +107,7 @@ class ShireiShizosCaretakerTriggeredAbility extends TriggeredAbilityImpl { && card.getOwnerId().equals(this.controllerId) && zEvent.getToZone() == Zone.GRAVEYARD && zEvent.getFromZone() == Zone.BATTLEFIELD - && card.getCardType().contains(CardType.CREATURE) + && card.isCreature() && LKIpermanent.getPower().getValue() <= 1) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(zEvent.getTargetId())); diff --git a/Mage.Sets/src/mage/cards/s/SidisiBroodTyrant.java b/Mage.Sets/src/mage/cards/s/SidisiBroodTyrant.java index f5c3b4d4f7..c3504254bf 100644 --- a/Mage.Sets/src/mage/cards/s/SidisiBroodTyrant.java +++ b/Mage.Sets/src/mage/cards/s/SidisiBroodTyrant.java @@ -105,7 +105,7 @@ class SidisiBroodTyrantTriggeredAbility extends TriggeredAbilityImpl { if (cardOwnerId != null && card.getOwnerId().equals(getControllerId()) && cardType != null - && card.getCardType().contains(CardType.CREATURE)) { + && card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/s/SilburlindSnapper.java b/Mage.Sets/src/mage/cards/s/SilburlindSnapper.java index 010803a474..7ac1159b66 100644 --- a/Mage.Sets/src/mage/cards/s/SilburlindSnapper.java +++ b/Mage.Sets/src/mage/cards/s/SilburlindSnapper.java @@ -99,7 +99,7 @@ class SilburlindSnapperEffect extends RestrictionEffect { List spellsCast = watcher.getSpellsCastThisTurn(source.getControllerId()); if (spellsCast != null) { for (Spell spell : spellsCast) { - if (!spell.getCardType().contains(CardType.CREATURE)) { + if (!spell.isCreature()) { return false; } } diff --git a/Mage.Sets/src/mage/cards/s/SilverfurPartisan.java b/Mage.Sets/src/mage/cards/s/SilverfurPartisan.java index 4594da938a..a5e9708dd6 100644 --- a/Mage.Sets/src/mage/cards/s/SilverfurPartisan.java +++ b/Mage.Sets/src/mage/cards/s/SilverfurPartisan.java @@ -103,7 +103,7 @@ class CreaturesYouControlBecomesTargetTriggeredAbility extends TriggeredAbilityI MageObject object = game.getObject(event.getSourceId()); if (object != null && object instanceof Spell) { Card c = (Spell) object; - if (c.getCardType().contains(CardType.INSTANT) || c.getCardType().contains(CardType.SORCERY)) { + if (c.isInstant() || c.isSorcery()) { if (getTargets().isEmpty()) { for (Effect effect : getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); diff --git a/Mage.Sets/src/mage/cards/s/SirensCall.java b/Mage.Sets/src/mage/cards/s/SirensCall.java index d5e3bfe62c..3d0c72a4ac 100644 --- a/Mage.Sets/src/mage/cards/s/SirensCall.java +++ b/Mage.Sets/src/mage/cards/s/SirensCall.java @@ -135,7 +135,7 @@ class SirensCallDestroyEffect extends OneShotEffect { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(player.getId())) { // Non Creature Cards are safe. - if(!permanent.getCardType().contains(CardType.CREATURE)) + if(!permanent.isCreature()) continue; // Walls are safe. diff --git a/Mage.Sets/src/mage/cards/s/SkillBorrower.java b/Mage.Sets/src/mage/cards/s/SkillBorrower.java index 34942fb0e6..b72485782b 100644 --- a/Mage.Sets/src/mage/cards/s/SkillBorrower.java +++ b/Mage.Sets/src/mage/cards/s/SkillBorrower.java @@ -123,7 +123,7 @@ class SkillBorrowerEffect extends ContinuousEffectImpl { Player player = game.getPlayer(source.getControllerId()); if(player != null){ Card card = player.getLibrary().getFromTop(game); - if(card != null && (card.getCardType().contains(CardType.CREATURE) || card.getCardType().contains(CardType.ARTIFACT))){ + if(card != null && (card.isCreature() || card.isArtifact())){ Permanent permanent = game.getPermanent(source.getSourceId()); if(permanent != null){ for(Ability ability : card.getAbilities()){ diff --git a/Mage.Sets/src/mage/cards/s/SmotheringAbomination.java b/Mage.Sets/src/mage/cards/s/SmotheringAbomination.java index 16e7d8f67d..61dc6346ef 100644 --- a/Mage.Sets/src/mage/cards/s/SmotheringAbomination.java +++ b/Mage.Sets/src/mage/cards/s/SmotheringAbomination.java @@ -105,7 +105,7 @@ class SmotheringAbominationTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getCardType().contains(CardType.CREATURE); + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).isCreature(); } @Override diff --git a/Mage.Sets/src/mage/cards/s/SnapcasterMage.java b/Mage.Sets/src/mage/cards/s/SnapcasterMage.java index 8816045142..b9751f4531 100644 --- a/Mage.Sets/src/mage/cards/s/SnapcasterMage.java +++ b/Mage.Sets/src/mage/cards/s/SnapcasterMage.java @@ -111,7 +111,7 @@ class SnapcasterMageEffect extends ContinuousEffectImpl { Card card = game.getCard(targetPointer.getFirst(game, source)); if (card != null) { FlashbackAbility ability; - if (card.getCardType().contains(CardType.INSTANT)) { + if (card.isInstant()) { ability = new FlashbackAbility(card.getManaCost(), TimingRule.INSTANT); } else { diff --git a/Mage.Sets/src/mage/cards/s/SoldeviMachinist.java b/Mage.Sets/src/mage/cards/s/SoldeviMachinist.java index 599d6b0f10..02dc3a58d5 100644 --- a/Mage.Sets/src/mage/cards/s/SoldeviMachinist.java +++ b/Mage.Sets/src/mage/cards/s/SoldeviMachinist.java @@ -101,7 +101,7 @@ class ArtifactAbilityManaCondition extends ManaCondition implements Condition { public boolean apply(Game game, Ability source) { if (source != null && source.getAbilityType().equals(AbilityType.ACTIVATED)) { MageObject object = game.getObject(source.getSourceId()); - if (object != null && object.getCardType().contains(CardType.ARTIFACT)) { + if (object != null && object.isArtifact()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/s/SoulSnare.java b/Mage.Sets/src/mage/cards/s/SoulSnare.java index 72c8a530bf..fdd662434f 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSnare.java +++ b/Mage.Sets/src/mage/cards/s/SoulSnare.java @@ -104,7 +104,7 @@ class SoulSnareFilter extends FilterAttackingCreature { } else { Permanent planeswalker = game.getPermanent(defenderId); - if(planeswalker != null && planeswalker.getCardType().contains(CardType.PLANESWALKER) + if(planeswalker != null && planeswalker.isPlaneswalker() && planeswalker.getControllerId().equals(playerId)) { return true; } diff --git a/Mage.Sets/src/mage/cards/s/Soulflayer.java b/Mage.Sets/src/mage/cards/s/Soulflayer.java index 0f530d9dd7..f76a5b1b5f 100644 --- a/Mage.Sets/src/mage/cards/s/Soulflayer.java +++ b/Mage.Sets/src/mage/cards/s/Soulflayer.java @@ -128,7 +128,7 @@ class SoulflayerEffect extends ContinuousEffectImpl implements SourceEffect { Cards delvedCards = (Cards) game.getState().getValue(keyString); if (delvedCards != null) { for (Card card : delvedCards.getCards(game)) { - if (!card.getCardType().contains(CardType.CREATURE)) { + if (!card.isCreature()) { continue; } for (Ability cardAbility : card.getAbilities()) { diff --git a/Mage.Sets/src/mage/cards/s/Spellshift.java b/Mage.Sets/src/mage/cards/s/Spellshift.java index ca5d31fb2a..c9f9d41dbc 100644 --- a/Mage.Sets/src/mage/cards/s/Spellshift.java +++ b/Mage.Sets/src/mage/cards/s/Spellshift.java @@ -98,12 +98,12 @@ class SpellshiftEffect extends OneShotEffect { Cards cards = new CardsImpl(); Card card = library.removeFromTop(game); cards.add(card); - while (!(card.getCardType().contains(CardType.SORCERY) || card.getCardType().contains(CardType.INSTANT)) && library.size() > 0) { + while (!(card.isSorcery() || card.isInstant()) && library.size() > 0) { card = library.removeFromTop(game); cards.add(card); } - if (card.getCardType().contains(CardType.SORCERY) || card.getCardType().contains(CardType.INSTANT)) { + if (card.isSorcery() || card.isInstant()) { if (player.chooseUse(outcome, "Cast " + card.getLogName() + " ?", source, game)) { if (player.cast(card.getSpellAbility(), game, true)) { cards.remove(card.getId()); diff --git a/Mage.Sets/src/mage/cards/s/SphinxAmbassador.java b/Mage.Sets/src/mage/cards/s/SphinxAmbassador.java index d2bd6f6fdd..db324ac169 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxAmbassador.java +++ b/Mage.Sets/src/mage/cards/s/SphinxAmbassador.java @@ -122,7 +122,7 @@ class SphinxAmbassadorEffect extends OneShotEffect { String cardName = cardChoice.getChoice(); game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(", named card: [").append(cardName).append(']').toString()); - if (!card.getName().equals(cardName) && card.getCardType().contains(CardType.CREATURE)) { + if (!card.getName().equals(cardName) && card.isCreature()) { if (controller.chooseUse(outcome, new StringBuilder("Put ").append(card.getName()).append(" onto the battlefield?").toString(), source, game)) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); } diff --git a/Mage.Sets/src/mage/cards/s/SphinxsTutelage.java b/Mage.Sets/src/mage/cards/s/SphinxsTutelage.java index c5fc9cfd1f..4028b6356a 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxsTutelage.java +++ b/Mage.Sets/src/mage/cards/s/SphinxsTutelage.java @@ -112,9 +112,9 @@ class SphinxsTutelageEffect extends OneShotEffect { cards.addAll(targetPlayer.getLibrary().getTopCards(game, 2)); if (!cards.isEmpty()) { Card card1 = targetPlayer.getLibrary().removeFromTop(game); - if (!card1.getCardType().contains(CardType.LAND) && targetPlayer.getLibrary().size() > 0) { + if (!card1.isLand() && targetPlayer.getLibrary().size() > 0) { Card card2 = targetPlayer.getLibrary().removeFromTop(game); - if (!card2.getCardType().contains(CardType.LAND)) { + if (!card2.isLand()) { colorShared = card1.getColor(game).shares(card2.getColor(game)); } } diff --git a/Mage.Sets/src/mage/cards/s/SpitefulReturned.java b/Mage.Sets/src/mage/cards/s/SpitefulReturned.java index 31875e3b6d..cd2e497e19 100644 --- a/Mage.Sets/src/mage/cards/s/SpitefulReturned.java +++ b/Mage.Sets/src/mage/cards/s/SpitefulReturned.java @@ -103,7 +103,7 @@ class SpitefulReturnedTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Permanent sourcePermanent = game.getPermanent(this.getSourceId()); if (sourcePermanent != null) { - if (sourcePermanent.getCardType().contains(CardType.CREATURE)) { + if (sourcePermanent.isCreature()) { if (event.getSourceId() != null && event.getSourceId().equals(this.getSourceId())) { UUID defender = game.getCombat().getDefendingPlayerId(this.getSourceId(), game); diff --git a/Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java b/Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java index ea5dc20d00..fca6a43524 100644 --- a/Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java +++ b/Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java @@ -125,7 +125,7 @@ class CreaturesDiedThisTurnWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) { MageObject mageObject = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (mageObject != null && mageObject.getCardType().contains(CardType.CREATURE)) { + if (mageObject != null && mageObject.isCreature()) { creaturesDiedThisTurn++; } } diff --git a/Mage.Sets/src/mage/cards/s/Starfall.java b/Mage.Sets/src/mage/cards/s/Starfall.java index 348ceaa208..af0ee90670 100644 --- a/Mage.Sets/src/mage/cards/s/Starfall.java +++ b/Mage.Sets/src/mage/cards/s/Starfall.java @@ -86,7 +86,7 @@ class StarfallEffect extends OneShotEffect { Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (permanent != null) { permanent.damage(3, source.getSourceId(), game, false, true); - if (permanent.getCardType().contains(CardType.ENCHANTMENT)) { + if (permanent.isEnchantment()) { Player targetController = game.getPlayer(permanent.getControllerId()); if (targetController != null) { targetController.damage(3, source.getSourceId(), game, false, true); diff --git a/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java b/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java index 088bbc57d6..c462cf12b4 100644 --- a/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java +++ b/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java @@ -131,7 +131,7 @@ class StarfieldOfNyxEffect extends ContinuousEffectImpl { switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - if (!permanent.getCardType().contains(CardType.CREATURE)) { + if (!permanent.isCreature()) { permanent.getCardType().add(CardType.CREATURE); } } diff --git a/Mage.Sets/src/mage/cards/s/SteelGolem.java b/Mage.Sets/src/mage/cards/s/SteelGolem.java index 3346715910..cd0df37907 100644 --- a/Mage.Sets/src/mage/cards/s/SteelGolem.java +++ b/Mage.Sets/src/mage/cards/s/SteelGolem.java @@ -91,7 +91,7 @@ class SteelGolemEffect extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (event.getPlayerId().equals(source.getControllerId())) { Card card = game.getCard(event.getSourceId()); - return card != null && card.getCardType().contains(CardType.CREATURE); + return card != null && card.isCreature(); } return false; } diff --git a/Mage.Sets/src/mage/cards/s/StolenGoods.java b/Mage.Sets/src/mage/cards/s/StolenGoods.java index aae2a0113c..366fe3cb75 100644 --- a/Mage.Sets/src/mage/cards/s/StolenGoods.java +++ b/Mage.Sets/src/mage/cards/s/StolenGoods.java @@ -99,7 +99,7 @@ class StolenGoodsEffect extends OneShotEffect { if (card != null) { opponent.moveCardsToExile(card, source, game, true, source.getSourceId(), sourceObject.getIdName()); } - } while (library.size() > 0 && card != null && card.getCardType().contains(CardType.LAND)); + } while (library.size() > 0 && card != null && card.isLand()); if (card != null) { ContinuousEffect effect = new StolenGoodsCastFromExileEffect(); diff --git a/Mage.Sets/src/mage/cards/s/StonySilence.java b/Mage.Sets/src/mage/cards/s/StonySilence.java index 6aab9ad7d5..77a05dc4d2 100644 --- a/Mage.Sets/src/mage/cards/s/StonySilence.java +++ b/Mage.Sets/src/mage/cards/s/StonySilence.java @@ -77,7 +77,7 @@ class StonySilenceCantActivateEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getCardType().contains(CardType.ARTIFACT); + return permanent.isArtifact(); } @Override diff --git a/Mage.Sets/src/mage/cards/s/StrongholdGambit.java b/Mage.Sets/src/mage/cards/s/StrongholdGambit.java index 13301cdcdd..ac01b58008 100644 --- a/Mage.Sets/src/mage/cards/s/StrongholdGambit.java +++ b/Mage.Sets/src/mage/cards/s/StrongholdGambit.java @@ -107,7 +107,7 @@ class StrongholdGambitEffect extends OneShotEffect { if (card != null) { Cards cardsToReveal = new CardsImpl(card); player.revealCards(sourceObject.getIdName() + " (" + player.getName() + ')', cardsToReveal, game); - if (card.getCardType().contains(CardType.CREATURE) + if (card.isCreature() && lowestCMC > card.getConvertedManaCost()) { lowestCMC = card.getConvertedManaCost(); } @@ -121,7 +121,7 @@ class StrongholdGambitEffect extends OneShotEffect { if (player != null && choosenCard.containsKey(playerId)) { Card card = game.getCard(choosenCard.get(playerId)); if (card != null) { - if (card.getCardType().contains(CardType.CREATURE) + if (card.isCreature() && lowestCMC == card.getConvertedManaCost()) { creaturesToBattlefield.add(card); } diff --git a/Mage.Sets/src/mage/cards/s/SummonersEgg.java b/Mage.Sets/src/mage/cards/s/SummonersEgg.java index e92603be7d..74c8c59f56 100644 --- a/Mage.Sets/src/mage/cards/s/SummonersEgg.java +++ b/Mage.Sets/src/mage/cards/s/SummonersEgg.java @@ -147,7 +147,7 @@ class SummonersEggPutOntoBattlefieldEffect extends OneShotEffect { //turn the exiled card face up. imprintedCard.turnFaceUp(game, source.getControllerId()); //If it's a creature card, - if (imprintedCard.getCardType().contains(CardType.CREATURE)) { + if (imprintedCard.isCreature()) { //put it onto the battlefield under your control imprintedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId()); } diff --git a/Mage.Sets/src/mage/cards/s/SummoningTrap.java b/Mage.Sets/src/mage/cards/s/SummoningTrap.java index 28829addab..85c17fc3ef 100644 --- a/Mage.Sets/src/mage/cards/s/SummoningTrap.java +++ b/Mage.Sets/src/mage/cards/s/SummoningTrap.java @@ -129,7 +129,7 @@ class SummoningTrapWatcher extends Watcher { if (counteredSpell != null && counteredSpell instanceof Spell && !players.contains(counteredSpell.getControllerId()) - && counteredSpell.getCardType().contains(CardType.CREATURE)) { + && counteredSpell.isCreature()) { StackObject counteringStackObject = game.getStack().getStackObject(event.getSourceId()); if (counteringStackObject == null) { counteringStackObject = (StackObject) game.getLastKnownInformation(event.getSourceId(), Zone.STACK); diff --git a/Mage.Sets/src/mage/cards/s/SuturePriest.java b/Mage.Sets/src/mage/cards/s/SuturePriest.java index 0b29304249..4ef303d7af 100644 --- a/Mage.Sets/src/mage/cards/s/SuturePriest.java +++ b/Mage.Sets/src/mage/cards/s/SuturePriest.java @@ -109,7 +109,7 @@ class SuturePriestSecondTriggeredAbility extends TriggeredAbilityImpl { if (game.getOpponents(this.controllerId).contains(event.getPlayerId())) { EntersTheBattlefieldEvent zEvent = (EntersTheBattlefieldEvent)event; Card card = zEvent.getTarget(); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getPlayerId())); } diff --git a/Mage.Sets/src/mage/cards/s/SydriGalvanicGenius.java b/Mage.Sets/src/mage/cards/s/SydriGalvanicGenius.java index b75626da3a..b2e25afafc 100644 --- a/Mage.Sets/src/mage/cards/s/SydriGalvanicGenius.java +++ b/Mage.Sets/src/mage/cards/s/SydriGalvanicGenius.java @@ -124,7 +124,7 @@ class SydriGalvanicGeniusEffect extends ContinuousEffectImpl { switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - if (!artifact.getCardType().contains(CardType.CREATURE)) { + if (!artifact.isCreature()) { artifact.getCardType().add(CardType.CREATURE); } } diff --git a/Mage.Sets/src/mage/cards/s/SynodCenturion.java b/Mage.Sets/src/mage/cards/s/SynodCenturion.java index 2a0ee3fea8..1b946dae5f 100644 --- a/Mage.Sets/src/mage/cards/s/SynodCenturion.java +++ b/Mage.Sets/src/mage/cards/s/SynodCenturion.java @@ -83,7 +83,7 @@ public class SynodCenturion extends CardImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { for (Permanent perm : game.getBattlefield().getAllActivePermanents(controllerId)) { - if (!perm.getId().equals(this.getSourceId()) && perm.getCardType().contains(CardType.ARTIFACT)) { + if (!perm.getId().equals(this.getSourceId()) && perm.isArtifact()) { return false; } } diff --git a/Mage.Sets/src/mage/cards/s/SyntheticDestiny.java b/Mage.Sets/src/mage/cards/s/SyntheticDestiny.java index 97af495ded..4c179ad007 100644 --- a/Mage.Sets/src/mage/cards/s/SyntheticDestiny.java +++ b/Mage.Sets/src/mage/cards/s/SyntheticDestiny.java @@ -134,7 +134,7 @@ class SyntheticDestinyDelayedEffect extends OneShotEffect { while (creatureCards.size() < numberOfCards && controller.getLibrary().size() > 0) { Card card = controller.getLibrary().removeFromTop(game); revealed.add(card); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creatureCards.add(card); } else { nonCreatureCards.add(card); diff --git a/Mage.Sets/src/mage/cards/t/Tamanoa.java b/Mage.Sets/src/mage/cards/t/Tamanoa.java index 995eba13da..bf1a715974 100644 --- a/Mage.Sets/src/mage/cards/t/Tamanoa.java +++ b/Mage.Sets/src/mage/cards/t/Tamanoa.java @@ -96,7 +96,7 @@ class TamanoaDealsDamageTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { MageObject eventSourceObject = game.getObject(event.getSourceId()); - if (eventSourceObject != null && !eventSourceObject.getCardType().contains(CardType.CREATURE)) { + if (eventSourceObject != null && !eventSourceObject.isCreature()) { if (getControllerId().equals(game.getControllerId(event.getSourceId()))) { this.getEffects().forEach((effect) -> { effect.setValue("damage", event.getAmount()); diff --git a/Mage.Sets/src/mage/cards/t/TapestryOfTheAges.java b/Mage.Sets/src/mage/cards/t/TapestryOfTheAges.java index 45a6d5789e..e63b3269e9 100644 --- a/Mage.Sets/src/mage/cards/t/TapestryOfTheAges.java +++ b/Mage.Sets/src/mage/cards/t/TapestryOfTheAges.java @@ -113,7 +113,7 @@ class PlayerCastNonCreatureSpellWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { Spell spell = (Spell) game.getObject(event.getTargetId()); - if (!spell.getCardType().contains(CardType.CREATURE)) { + if (!spell.isCreature()) { playerIds.add(spell.getControllerId()); } } diff --git a/Mage.Sets/src/mage/cards/t/TeferiMageOfZhalfir.java b/Mage.Sets/src/mage/cards/t/TeferiMageOfZhalfir.java index 6848902fad..5749d00991 100644 --- a/Mage.Sets/src/mage/cards/t/TeferiMageOfZhalfir.java +++ b/Mage.Sets/src/mage/cards/t/TeferiMageOfZhalfir.java @@ -107,26 +107,26 @@ class TeferiMageOfZhalfirAddFlashEffect extends ContinuousEffectImpl { // in graveyard for (UUID cardId : controller.getGraveyard()) { Card card = game.getCard(cardId); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { game.getState().addOtherAbility(card, FlashAbility.getInstance()); } } // on Hand for (UUID cardId : controller.getHand()) { Card card = game.getCard(cardId); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { game.getState().addOtherAbility(card, FlashAbility.getInstance()); } } // in Exile for (Card card : game.getState().getExile().getAllCards(game)) { - if (card.getOwnerId().equals(controller.getId()) && card.getCardType().contains(CardType.CREATURE)) { + if (card.getOwnerId().equals(controller.getId()) && card.isCreature()) { game.getState().addOtherAbility(card, FlashAbility.getInstance()); } } // in Library (e.g. for Mystical Teachings) for (Card card : controller.getLibrary().getCards(game)) { - if (card.getOwnerId().equals(controller.getId()) && card.getCardType().contains(CardType.CREATURE)) { + if (card.getOwnerId().equals(controller.getId()) && card.isCreature()) { game.getState().addOtherAbility(card, FlashAbility.getInstance()); } } @@ -134,7 +134,7 @@ class TeferiMageOfZhalfirAddFlashEffect extends ContinuousEffectImpl { for (UUID commanderId : controller.getCommandersIds()) { if (game.getState().getZone(commanderId) == Zone.COMMAND) { Card card = game.getCard(commanderId); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { game.getState().addOtherAbility(card, FlashAbility.getInstance()); } } diff --git a/Mage.Sets/src/mage/cards/t/TeferisMoat.java b/Mage.Sets/src/mage/cards/t/TeferisMoat.java index 56841b6bda..bb8b44f2a9 100644 --- a/Mage.Sets/src/mage/cards/t/TeferisMoat.java +++ b/Mage.Sets/src/mage/cards/t/TeferisMoat.java @@ -87,7 +87,7 @@ class TeferisMoatRestrictionEffect extends RestrictionEffect { return chosenColor != null && !permanent.getAbilities().contains(FlyingAbility.getInstance()) && permanent.getColor(game).shares(chosenColor) && - permanent.getCardType().contains(CardType.CREATURE); + permanent.isCreature(); } @Override diff --git a/Mage.Sets/src/mage/cards/t/TeleminPerformance.java b/Mage.Sets/src/mage/cards/t/TeleminPerformance.java index 0d53796a2a..c673ce3aaa 100644 --- a/Mage.Sets/src/mage/cards/t/TeleminPerformance.java +++ b/Mage.Sets/src/mage/cards/t/TeleminPerformance.java @@ -92,7 +92,7 @@ class TeleminPerformanceEffect extends OneShotEffect { while (opponent.getLibrary().size() > 0 && !creatureFound) { Card card = opponent.getLibrary().removeFromTop(game); if (card != null) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creature = card; creatureFound = true; } diff --git a/Mage.Sets/src/mage/cards/t/TemurWarShaman.java b/Mage.Sets/src/mage/cards/t/TemurWarShaman.java index 17e75eb4b1..557552eb31 100644 --- a/Mage.Sets/src/mage/cards/t/TemurWarShaman.java +++ b/Mage.Sets/src/mage/cards/t/TemurWarShaman.java @@ -121,8 +121,8 @@ class TemurWarShamanFightEffect extends OneShotEffect { Permanent target = game.getPermanent(source.getFirstTarget()); if (triggeredCreature != null && target != null - && triggeredCreature.getCardType().contains(CardType.CREATURE) - && target.getCardType().contains(CardType.CREATURE)) { + && triggeredCreature.isCreature() + && target.isCreature()) { triggeredCreature.fight(target, source, game); return true; } diff --git a/Mage.Sets/src/mage/cards/t/Tetravus.java b/Mage.Sets/src/mage/cards/t/Tetravus.java index 279ad65a6a..bf954c109e 100644 --- a/Mage.Sets/src/mage/cards/t/Tetravus.java +++ b/Mage.Sets/src/mage/cards/t/Tetravus.java @@ -119,7 +119,7 @@ class CantBeEnchantedAbility extends StaticAbility { } public boolean canTarget(MageObject source, Game game) { - if (source.getCardType().contains(CardType.ENCHANTMENT) + if (source.isEnchantment() && source.hasSubtype("Aura", game)) { return false; } diff --git a/Mage.Sets/src/mage/cards/t/TeysaEnvoyOfGhosts.java b/Mage.Sets/src/mage/cards/t/TeysaEnvoyOfGhosts.java index 793bb209c6..7b7d4aecd2 100644 --- a/Mage.Sets/src/mage/cards/t/TeysaEnvoyOfGhosts.java +++ b/Mage.Sets/src/mage/cards/t/TeysaEnvoyOfGhosts.java @@ -110,7 +110,7 @@ class TeysaEnvoyOfGhostsTriggeredAbility extends TriggeredAbilityImpl { if (damageEvent.getPlayerId().equals(getControllerId()) && damageEvent.isCombatDamage() && sourcePermanent != null - && sourcePermanent.getCardType().contains(CardType.CREATURE)) { + && sourcePermanent.isCreature()) { game.getState().setValue(sourceId.toString(), sourcePermanent.getControllerId()); getEffects().get(0).setTargetPointer(new FixedTarget(event.getSourceId())); return true; diff --git a/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java b/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java index 6b46fb0474..e70262927b 100644 --- a/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java +++ b/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java @@ -159,10 +159,10 @@ class TezzeretTheSeekerEffect3 extends ContinuousEffectImpl { switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - if (!permanent.getCardType().contains(CardType.ARTIFACT)) { + if (!permanent.isArtifact()) { permanent.getCardType().add(CardType.ARTIFACT); } - if (!permanent.getCardType().contains(CardType.CREATURE)) { + if (!permanent.isCreature()) { permanent.getCardType().add(CardType.CREATURE); } permanent.getSubtype(game).clear(); diff --git a/Mage.Sets/src/mage/cards/t/ThaliaGuardianOfThraben.java b/Mage.Sets/src/mage/cards/t/ThaliaGuardianOfThraben.java index 9b59b196b4..8651c179d1 100644 --- a/Mage.Sets/src/mage/cards/t/ThaliaGuardianOfThraben.java +++ b/Mage.Sets/src/mage/cards/t/ThaliaGuardianOfThraben.java @@ -99,7 +99,7 @@ class ThaliaGuardianOfThrabenCostReductionEffect extends CostModificationEffectI public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { Card card = game.getCard(abilityToModify.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.CREATURE)) { + if (card != null && !card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/t/ThaliaHereticCathar.java b/Mage.Sets/src/mage/cards/t/ThaliaHereticCathar.java index 01b5c0280a..1dfcdcc0df 100644 --- a/Mage.Sets/src/mage/cards/t/ThaliaHereticCathar.java +++ b/Mage.Sets/src/mage/cards/t/ThaliaHereticCathar.java @@ -104,8 +104,8 @@ class ThaliaTapEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - if (permanent != null && (permanent.getCardType().contains(CardType.CREATURE) || - (permanent.getCardType().contains(CardType.LAND) && !permanent.getSupertype().contains("Basic")))) { + if (permanent != null && (permanent.isCreature() || + (permanent.isLand() && !permanent.getSupertype().contains("Basic")))) { return true; } } diff --git a/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java b/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java index 943f8246ef..a901bc64e0 100644 --- a/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java +++ b/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java @@ -135,7 +135,7 @@ class ThopterSpyNetworkDamageTriggeredAbility extends TriggeredAbilityImpl { if (((DamagedPlayerEvent) event).isCombatDamage()) { Permanent creature = game.getPermanent(event.getSourceId()); if (creature != null && creature.getControllerId().equals(controllerId) - && creature.getCardType().contains(CardType.ARTIFACT) && !damagedPlayerIds.contains(event.getTargetId())) { + && creature.isArtifact() && !damagedPlayerIds.contains(event.getTargetId())) { damagedPlayerIds.add(event.getTargetId()); return true; } diff --git a/Mage.Sets/src/mage/cards/t/ThousandYearElixir.java b/Mage.Sets/src/mage/cards/t/ThousandYearElixir.java index 7a8ca7ddda..a382613096 100644 --- a/Mage.Sets/src/mage/cards/t/ThousandYearElixir.java +++ b/Mage.Sets/src/mage/cards/t/ThousandYearElixir.java @@ -101,7 +101,7 @@ class ThousandYearElixirEffect extends AsThoughEffectImpl { public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { Permanent permanent = game.getPermanent(sourceId); return permanent != null - && permanent.getCardType().contains(CardType.CREATURE) + && permanent.isCreature() && permanent.getControllerId().equals(source.getControllerId()); } } diff --git a/Mage.Sets/src/mage/cards/t/ThrasiosTritonHero.java b/Mage.Sets/src/mage/cards/t/ThrasiosTritonHero.java index 0d616d07a1..616044763d 100644 --- a/Mage.Sets/src/mage/cards/t/ThrasiosTritonHero.java +++ b/Mage.Sets/src/mage/cards/t/ThrasiosTritonHero.java @@ -111,7 +111,7 @@ class ThrasiosTritonHeroEffect extends OneShotEffect { } cards.add(card); controller.revealCards(sourceObject.getName(), cards, game); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null); } else { controller.drawCards(1, game); diff --git a/Mage.Sets/src/mage/cards/t/Thraximundar.java b/Mage.Sets/src/mage/cards/t/Thraximundar.java index d1da9312a3..bc38373930 100644 --- a/Mage.Sets/src/mage/cards/t/Thraximundar.java +++ b/Mage.Sets/src/mage/cards/t/Thraximundar.java @@ -145,7 +145,7 @@ class PlayerSacrificesCreatureTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { MageObject mageObject = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - return mageObject != null && mageObject.getCardType().contains(CardType.CREATURE); + return mageObject != null && mageObject.isCreature(); } @Override diff --git a/Mage.Sets/src/mage/cards/t/TorporOrb.java b/Mage.Sets/src/mage/cards/t/TorporOrb.java index 0c668e22da..8aafc5c297 100644 --- a/Mage.Sets/src/mage/cards/t/TorporOrb.java +++ b/Mage.Sets/src/mage/cards/t/TorporOrb.java @@ -88,7 +88,7 @@ class TorporOrbEffect extends ContinuousRuleModifyingEffectImpl { Ability ability = (Ability) getValue("targetAbility"); if (ability != null && ability.getAbilityType() == AbilityType.TRIGGERED) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/t/TouchOfMoonglove.java b/Mage.Sets/src/mage/cards/t/TouchOfMoonglove.java index 5e6e1c8fd0..a292c80dc7 100644 --- a/Mage.Sets/src/mage/cards/t/TouchOfMoonglove.java +++ b/Mage.Sets/src/mage/cards/t/TouchOfMoonglove.java @@ -132,7 +132,7 @@ class TouchOfMoongloveDelayedTriggeredAbility extends DelayedTriggeredAbility { public boolean checkTrigger(GameEvent event, Game game) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD - && zEvent.getTarget().getCardType().contains(CardType.CREATURE)) { + && zEvent.getTarget().isCreature()) { boolean damageDealt = false; for (MageObjectReference mor : zEvent.getTarget().getDealtDamageByThisTurn()) { if (mor.equals(creatureToCheck)) { diff --git a/Mage.Sets/src/mage/cards/t/TrackersInstincts.java b/Mage.Sets/src/mage/cards/t/TrackersInstincts.java index 2f61bf3c5f..7d281e50df 100644 --- a/Mage.Sets/src/mage/cards/t/TrackersInstincts.java +++ b/Mage.Sets/src/mage/cards/t/TrackersInstincts.java @@ -100,7 +100,7 @@ class TrackersInstinctsEffect extends OneShotEffect { Card card = controller.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { creaturesFound = true; } } diff --git a/Mage.Sets/src/mage/cards/t/TreasureHunt.java b/Mage.Sets/src/mage/cards/t/TreasureHunt.java index 9f05e345d0..f29e8fd996 100644 --- a/Mage.Sets/src/mage/cards/t/TreasureHunt.java +++ b/Mage.Sets/src/mage/cards/t/TreasureHunt.java @@ -94,7 +94,7 @@ class TreasureHuntEffect extends OneShotEffect { cards.add(card); card.moveToZone(Zone.HAND, source.getSourceId(), game, false); } - } while (library.size() > 0 && card != null && card.getCardType().contains(CardType.LAND)); + } while (library.size() > 0 && card != null && card.isLand()); if (!cards.isEmpty()) { player.revealCards("Treasure Hunt", cards, game); diff --git a/Mage.Sets/src/mage/cards/t/TreasureKeeper.java b/Mage.Sets/src/mage/cards/t/TreasureKeeper.java index d4e94089c8..4ce5d59304 100644 --- a/Mage.Sets/src/mage/cards/t/TreasureKeeper.java +++ b/Mage.Sets/src/mage/cards/t/TreasureKeeper.java @@ -92,7 +92,7 @@ class TreasureKeeperEffect extends OneShotEffect { while (nonLandCard == null && controller.getLibrary().size() > 0) { Card card = controller.getLibrary().removeFromTop(game); toReveal.add(card); - if (!card.getCardType().contains(CardType.LAND) && card.getConvertedManaCost() < 4) { + if (!card.isLand() && card.getConvertedManaCost() < 4) { nonLandCard = card; } } diff --git a/Mage.Sets/src/mage/cards/t/TrepanationBlade.java b/Mage.Sets/src/mage/cards/t/TrepanationBlade.java index 3e3156c7c4..71f42e56b4 100644 --- a/Mage.Sets/src/mage/cards/t/TrepanationBlade.java +++ b/Mage.Sets/src/mage/cards/t/TrepanationBlade.java @@ -114,7 +114,7 @@ class TrepanationBladeDiscardEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { landFound = true; } } diff --git a/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java b/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java index 386f02d329..77ffbb0d06 100644 --- a/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java +++ b/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java @@ -101,7 +101,7 @@ class TrostaniSelesnyasVoiceTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.getCardType().contains(CardType.CREATURE) + if (permanent.isCreature() && permanent.getControllerId().equals(this.controllerId) && !Objects.equals(event.getTargetId(), this.getSourceId())) { Effect effect = this.getEffects().get(0); diff --git a/Mage.Sets/src/mage/cards/t/TsabosWeb.java b/Mage.Sets/src/mage/cards/t/TsabosWeb.java index 31a1bede97..6003abd9ff 100644 --- a/Mage.Sets/src/mage/cards/t/TsabosWeb.java +++ b/Mage.Sets/src/mage/cards/t/TsabosWeb.java @@ -97,7 +97,7 @@ class TsabosWebPreventUntapEffect extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (game.getTurn().getStepType() == PhaseStep.UNTAP) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND)) { + if (permanent != null && permanent.isLand()) { for (Ability ability :permanent.getAbilities()) { if (!(ability instanceof PlayLandAbility) && !(ability instanceof ActivatedManaAbilityImpl) diff --git a/Mage.Sets/src/mage/cards/t/TunnelIgnus.java b/Mage.Sets/src/mage/cards/t/TunnelIgnus.java index 74a8f19543..908e5664b1 100644 --- a/Mage.Sets/src/mage/cards/t/TunnelIgnus.java +++ b/Mage.Sets/src/mage/cards/t/TunnelIgnus.java @@ -97,7 +97,7 @@ class TunnelIgnusWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.getCardType().contains(CardType.LAND) && game.getOpponents(this.controllerId).contains(permanent.getControllerId())) { + if (permanent.isLand() && game.getOpponents(this.controllerId).contains(permanent.getControllerId())) { int count = 1; if (counts.containsKey(permanent.getControllerId())) { count += counts.get(permanent.getControllerId()); @@ -137,7 +137,7 @@ class TunnelIgnusTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND) && game.getOpponents(this.controllerId).contains(permanent.getControllerId())) { + if (permanent != null && permanent.isLand() && game.getOpponents(this.controllerId).contains(permanent.getControllerId())) { TunnelIgnusWatcher watcher = (TunnelIgnusWatcher) game.getState().getWatchers().get("LandPlayedCount", this.controllerId); if (watcher != null && watcher.counts.get(permanent.getControllerId()) > 1) { for (Effect effect : this.getEffects()) { diff --git a/Mage.Sets/src/mage/cards/t/TyrantOfDiscord.java b/Mage.Sets/src/mage/cards/t/TyrantOfDiscord.java index 263780727f..62d87c5709 100644 --- a/Mage.Sets/src/mage/cards/t/TyrantOfDiscord.java +++ b/Mage.Sets/src/mage/cards/t/TyrantOfDiscord.java @@ -101,7 +101,7 @@ class TyrantOfDiscordEffect extends OneShotEffect { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(opponent.getId())) { if (index == random) { if (permanent.sacrifice(source.getSourceId(), game)) { - if (permanent.getCardType().contains(CardType.LAND)) { + if (permanent.isLand()) { stop = true; game.informPlayers("Land permanent has been sacrificed: " + permanent.getName() + ". Stopping process."); } else { diff --git a/Mage.Sets/src/mage/cards/u/UncleIstvan.java b/Mage.Sets/src/mage/cards/u/UncleIstvan.java index 980aac1475..8fa144759e 100644 --- a/Mage.Sets/src/mage/cards/u/UncleIstvan.java +++ b/Mage.Sets/src/mage/cards/u/UncleIstvan.java @@ -81,7 +81,7 @@ class PreventDamageToSourceByCardTypeEffect extends PreventAllDamageToSourceEffe public boolean applies(GameEvent event, Ability source, Game game) { if (super.applies(event, source, game)) { MageObject sourceObject = game.getObject(event.getSourceId()); - if (sourceObject != null && sourceObject.getCardType().contains(CardType.CREATURE)) { + if (sourceObject != null && sourceObject.isCreature()) { if (event.getTargetId().equals(source.getSourceId())) { return true; } diff --git a/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java b/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java index c7e548b6af..597218e509 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java +++ b/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java @@ -107,7 +107,7 @@ class UndeadAlchemistTriggeredAbility extends TriggeredAbilityImpl { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getFromZone() == Zone.LIBRARY && zEvent.getToZone() == Zone.GRAVEYARD && game.getOpponents(this.getControllerId()).contains(zEvent.getPlayerId())) { Card card = game.getCard(event.getTargetId()); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { this.getEffects().get(0).setTargetPointer(new FixedTarget(card.getId())); return true; } diff --git a/Mage.Sets/src/mage/cards/u/UndercityInformer.java b/Mage.Sets/src/mage/cards/u/UndercityInformer.java index 26a0297dd7..6f17079321 100644 --- a/Mage.Sets/src/mage/cards/u/UndercityInformer.java +++ b/Mage.Sets/src/mage/cards/u/UndercityInformer.java @@ -110,7 +110,7 @@ class UndercityInformerEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); - if(card.getCardType().contains(CardType.LAND)){ + if(card.isLand()){ break; } } diff --git a/Mage.Sets/src/mage/cards/u/UndyingFlames.java b/Mage.Sets/src/mage/cards/u/UndyingFlames.java index e75a022c0c..3b6264a7e9 100644 --- a/Mage.Sets/src/mage/cards/u/UndyingFlames.java +++ b/Mage.Sets/src/mage/cards/u/UndyingFlames.java @@ -93,7 +93,7 @@ class UndyingFlamesEffect extends OneShotEffect { Card card = you.getLibrary().removeFromTop(game); if (card != null) { you.moveCardToExileWithInfo(card, null, null, source.getSourceId(), game, Zone.LIBRARY, true); - if (!card.getCardType().contains(CardType.LAND)) { + if (!card.isLand()) { int damage = card.getConvertedManaCost(); if (damage > 0) { Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); diff --git a/Mage.Sets/src/mage/cards/u/UnexpectedResults.java b/Mage.Sets/src/mage/cards/u/UnexpectedResults.java index 87a42f652e..6bd43ce960 100644 --- a/Mage.Sets/src/mage/cards/u/UnexpectedResults.java +++ b/Mage.Sets/src/mage/cards/u/UnexpectedResults.java @@ -116,7 +116,7 @@ class UnexpectedResultEffect extends OneShotEffect { return false; } controller.revealCards(sourceCard.getName(), new CardsImpl(card), game); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { String message = "Put " + card.getName() + " onto the battlefield?"; if (controller.chooseUse(Outcome.PutLandInPlay, message, source, game)) { card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId()); diff --git a/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java b/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java index a468a6f198..c4adbac5ab 100644 --- a/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java +++ b/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java @@ -112,7 +112,7 @@ class UnscytheKillerOfKingsTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (((ZoneChangeEvent) event).isDiesEvent()) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; - if (zEvent.getTarget().getCardType().contains(CardType.CREATURE)) { // target token can't create Zombie + if (zEvent.getTarget().isCreature()) { // target token can't create Zombie Permanent equipment = game.getPermanent(getSourceId()); // the currently equiped creature must have done damage to the dying creature if (equipment != null && equipment.getAttachedTo() != null) { diff --git a/Mage.Sets/src/mage/cards/u/UrabraskTheHidden.java b/Mage.Sets/src/mage/cards/u/UrabraskTheHidden.java index 2445a2e8cd..8b57905d74 100644 --- a/Mage.Sets/src/mage/cards/u/UrabraskTheHidden.java +++ b/Mage.Sets/src/mage/cards/u/UrabraskTheHidden.java @@ -104,7 +104,7 @@ class UrabraskTheHiddenEffect extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/u/UrborgJustice.java b/Mage.Sets/src/mage/cards/u/UrborgJustice.java index af6c3cbe8f..7bd618cfd6 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgJustice.java +++ b/Mage.Sets/src/mage/cards/u/UrborgJustice.java @@ -101,7 +101,7 @@ class UrborgJusticeDynamicValue implements DynamicValue { for (MageObjectReference mor : cardsInGraveyard) { if (game.getState().getZoneChangeCounter(mor.getSourceId()) == mor.getZoneChangeCounter()) { Card card = game.getCard(mor.getSourceId()); - if (card != null && card.getOwnerId().equals(sourceAbility.getControllerId()) && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.getOwnerId().equals(sourceAbility.getControllerId()) && card.isCreature()) { count++; } } diff --git a/Mage.Sets/src/mage/cards/u/UrzasChalice.java b/Mage.Sets/src/mage/cards/u/UrzasChalice.java index 38214c812d..39e4359f05 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasChalice.java +++ b/Mage.Sets/src/mage/cards/u/UrzasChalice.java @@ -85,7 +85,7 @@ class UrzasChaliceAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); - return spell != null && spell.getCardType().contains(CardType.ARTIFACT); + return spell != null && spell.isArtifact(); } @Override diff --git a/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java b/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java index 810b4580b8..e84b0460ca 100644 --- a/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java +++ b/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java @@ -105,7 +105,7 @@ class ValakutTheMoltenPinnacleTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND) && permanent.getControllerId().equals(this.getControllerId())) { + if (permanent != null && permanent.isLand() && permanent.getControllerId().equals(this.getControllerId())) { if (permanent.hasSubtype("Mountain", game)) { return true; } diff --git a/Mage.Sets/src/mage/cards/v/VarolzTheScarStriped.java b/Mage.Sets/src/mage/cards/v/VarolzTheScarStriped.java index e23defa773..fc7c4dbe0d 100644 --- a/Mage.Sets/src/mage/cards/v/VarolzTheScarStriped.java +++ b/Mage.Sets/src/mage/cards/v/VarolzTheScarStriped.java @@ -108,7 +108,7 @@ class VarolzTheScarStripedEffect extends ContinuousEffectImpl { if (controller != null) { for (UUID cardId : controller.getGraveyard()) { Card card = game.getCard(cardId); - if (card != null && card.getCardType().contains(CardType.CREATURE)) { + if (card != null && card.isCreature()) { ScavengeAbility ability = new ScavengeAbility(new ManaCostsImpl(card.getManaCost().getText())); ability.setSourceId(cardId); ability.setControllerId(card.getOwnerId()); diff --git a/Mage.Sets/src/mage/cards/v/VedalkenEngineer.java b/Mage.Sets/src/mage/cards/v/VedalkenEngineer.java index 1ce24e3b67..bc082d8a6f 100644 --- a/Mage.Sets/src/mage/cards/v/VedalkenEngineer.java +++ b/Mage.Sets/src/mage/cards/v/VedalkenEngineer.java @@ -102,7 +102,7 @@ class VedalkenEngineerManaCondition implements Condition { @Override public boolean apply(Game game, Ability source) { MageObject object = game.getObject(source.getSourceId()); - if (object != null && object.getCardType().contains(CardType.ARTIFACT)) { + if (object != null && object.isArtifact()) { return true; } return false; diff --git a/Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java b/Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java index 488078795b..51c05b359d 100644 --- a/Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java +++ b/Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java @@ -97,7 +97,7 @@ class VeilstoneAmuletEffect extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability ability, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); if (permanent != null) { - if (permanent.getCardType().contains(CardType.CREATURE) && + if (permanent.isCreature() && permanent.getControllerId().equals(ability.getControllerId()) && game.getPlayer(ability.getControllerId()).hasOpponent(event.getPlayerId(), game)) { return true; diff --git a/Mage.Sets/src/mage/cards/v/VengefulRebirth.java b/Mage.Sets/src/mage/cards/v/VengefulRebirth.java index f0e3333b6a..2146aa0464 100644 --- a/Mage.Sets/src/mage/cards/v/VengefulRebirth.java +++ b/Mage.Sets/src/mage/cards/v/VengefulRebirth.java @@ -94,7 +94,7 @@ class VengefulRebirthEffect extends OneShotEffect { Card card = (Card)game.getObject(source.getFirstTarget()); if (controller != null && card != null && controller.removeFromGraveyard(card, game)) { controller.moveCards(card, Zone.HAND, source, game); - if (!card.getCardType().contains(CardType.LAND)) { + if (!card.isLand()) { int damage = card.getConvertedManaCost(); Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (permanent != null) { diff --git a/Mage.Sets/src/mage/cards/v/Vengevine.java b/Mage.Sets/src/mage/cards/v/Vengevine.java index 04b31a664a..50b5c9fee7 100644 --- a/Mage.Sets/src/mage/cards/v/Vengevine.java +++ b/Mage.Sets/src/mage/cards/v/Vengevine.java @@ -134,7 +134,7 @@ class VengevineWatcher extends Watcher { condition = false; if (event.getType() == EventType.SPELL_CAST && event.getPlayerId().equals(controllerId)) { Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && spell.getCardType().contains(CardType.CREATURE)) { + if (spell != null && spell.isCreature()) { creatureSpellCount++; if (creatureSpellCount == 2) condition = true; diff --git a/Mage.Sets/src/mage/cards/v/VigilForTheLost.java b/Mage.Sets/src/mage/cards/v/VigilForTheLost.java index c9cd854d70..f2b54e46ae 100644 --- a/Mage.Sets/src/mage/cards/v/VigilForTheLost.java +++ b/Mage.Sets/src/mage/cards/v/VigilForTheLost.java @@ -92,7 +92,7 @@ class VigilForTheLostTriggeredAbility extends TriggeredAbilityImpl { if (((ZoneChangeEvent)event).getToZone() == Zone.GRAVEYARD && ((ZoneChangeEvent)event).getFromZone() == Zone.BATTLEFIELD) { Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (p.getControllerId().equals(this.getControllerId()) && p.getCardType().contains(CardType.CREATURE)) { + if (p.getControllerId().equals(this.getControllerId()) && p.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/v/VileRedeemer.java b/Mage.Sets/src/mage/cards/v/VileRedeemer.java index 3a0e39f3a8..ad2beefe04 100644 --- a/Mage.Sets/src/mage/cards/v/VileRedeemer.java +++ b/Mage.Sets/src/mage/cards/v/VileRedeemer.java @@ -134,7 +134,7 @@ class VileRedeemerNonTokenCreaturesDiedWatcher extends Watcher { if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.isDiesEvent() && zEvent.getTarget() != null - && zEvent.getTarget().getCardType().contains(CardType.CREATURE) + && zEvent.getTarget().isCreature() && !(zEvent.getTarget() instanceof PermanentToken)) { int count = amountOfCreaturesThatDied.containsKey(zEvent.getTarget().getControllerId()) ? amountOfCreaturesThatDied.get(zEvent.getTarget().getControllerId()) : 0; diff --git a/Mage.Sets/src/mage/cards/v/VillageCannibals.java b/Mage.Sets/src/mage/cards/v/VillageCannibals.java index e683f73d3f..739986b20e 100644 --- a/Mage.Sets/src/mage/cards/v/VillageCannibals.java +++ b/Mage.Sets/src/mage/cards/v/VillageCannibals.java @@ -94,7 +94,7 @@ class VillageCannibalsTriggeredAbility extends TriggeredAbilityImpl { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) && permanent.hasSubtype("Human", game) + if (permanent != null && permanent.isCreature() && permanent.hasSubtype("Human", game) && !permanent.getId().equals(this.getSourceId())) { return true; } diff --git a/Mage.Sets/src/mage/cards/v/ViridianRevel.java b/Mage.Sets/src/mage/cards/v/ViridianRevel.java index d080ab0786..5b6e2e084f 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianRevel.java +++ b/Mage.Sets/src/mage/cards/v/ViridianRevel.java @@ -90,7 +90,7 @@ class ViridianRevelTriggeredAbility extends TriggeredAbilityImpl { if (((ZoneChangeEvent)event).isDiesEvent()) { Card card = game.getCard(event.getTargetId()); Player controller = game.getPlayer(getControllerId()); - if (controller != null && card != null && card.getCardType().contains(CardType.ARTIFACT) + if (controller != null && card != null && card.isArtifact() && controller.hasOpponent(card.getOwnerId(), game)) { return true; } diff --git a/Mage.Sets/src/mage/cards/v/Void.java b/Mage.Sets/src/mage/cards/v/Void.java index 893ae562ab..8a1045ec6b 100644 --- a/Mage.Sets/src/mage/cards/v/Void.java +++ b/Mage.Sets/src/mage/cards/v/Void.java @@ -104,7 +104,7 @@ class VoidEffect extends OneShotEffect { controller.choose(Outcome.DestroyPermanent, numberChoice, game); int number = Integer.parseInt(numberChoice.getChoice()); for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { - if ((permanent.getCardType().contains(CardType.ARTIFACT) || permanent.getCardType().contains(CardType.CREATURE)) + if ((permanent.isArtifact() || permanent.isCreature()) && permanent.getConvertedManaCost() == number) { permanent.destroy(source.getSourceId(), game, false); } diff --git a/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java b/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java index 7f8249b255..6ad142144d 100644 --- a/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java +++ b/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java @@ -98,7 +98,7 @@ class VolrathsShapeshifterEffect extends ContinuousEffectImpl { Card card = game.getPlayer(source.getControllerId()).getGraveyard().getTopCard(game); Permanent permanent = game.getPermanent(source.getSourceId()); - if (card == null || permanent == null || !card.getCardType().contains(CardType.CREATURE)) { + if (card == null || permanent == null || !card.isCreature()) { return false; } diff --git a/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java b/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java index a8eaf1e163..699155036a 100644 --- a/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java +++ b/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java @@ -106,7 +106,7 @@ class VorinclexTriggeredAbility2 extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (game.getOpponents(controllerId).contains(event.getPlayerId())) { Permanent permanent = game.getPermanent(event.getSourceId()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND)) { + if (permanent != null && permanent.isLand()) { getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId())); return true; } diff --git a/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java b/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java index b46c395b86..2c20318561 100644 --- a/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java +++ b/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java @@ -183,7 +183,7 @@ class VraskaTheUnseenTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (((DamagedPlaneswalkerEvent) event).isCombatDamage() && getSourceId().equals(event.getTargetId())) { Permanent sourceOfDamage = game.getPermanent(event.getSourceId()); - if (sourceOfDamage != null && sourceOfDamage.getCardType().contains(CardType.CREATURE)) { + if (sourceOfDamage != null && sourceOfDamage.isCreature()) { Effect effect = this.getEffects().get(0); effect.setTargetPointer(new FixedTarget(sourceOfDamage.getId())); return true; diff --git a/Mage.Sets/src/mage/cards/v/VrynWingmare.java b/Mage.Sets/src/mage/cards/v/VrynWingmare.java index 99f64f7223..ec59af0f7d 100644 --- a/Mage.Sets/src/mage/cards/v/VrynWingmare.java +++ b/Mage.Sets/src/mage/cards/v/VrynWingmare.java @@ -96,7 +96,7 @@ class VrynWingmareCostReductionEffect extends CostModificationEffectImpl { public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { Card card = game.getCard(abilityToModify.getSourceId()); - if (card != null && !card.getCardType().contains(CardType.CREATURE)) { + if (card != null && !card.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/w/WallOfPutridFlesh.java b/Mage.Sets/src/mage/cards/w/WallOfPutridFlesh.java index 9e026a1f6a..5ce63904fd 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfPutridFlesh.java +++ b/Mage.Sets/src/mage/cards/w/WallOfPutridFlesh.java @@ -99,12 +99,12 @@ class PreventDamageToSourceByEnchantedCreatures extends PreventAllDamageToSource } public boolean isEnchantedCreature(MageObject input, Game game) { - if (input != null && !input.getCardType().contains(CardType.CREATURE)) { + if (input != null && !input.isCreature()) { return false; } for (UUID attachmentId : ((Permanent)input).getAttachments()) { Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.getCardType().contains(CardType.ENCHANTMENT)) { + if (attachment != null && attachment.isEnchantment()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/w/WandOfDenial.java b/Mage.Sets/src/mage/cards/w/WandOfDenial.java index 40ef91074b..531581c8b0 100644 --- a/Mage.Sets/src/mage/cards/w/WandOfDenial.java +++ b/Mage.Sets/src/mage/cards/w/WandOfDenial.java @@ -94,7 +94,7 @@ class WandOfDenialEffect extends OneShotEffect { if (card != null) { MageObject sourceObject = game.getObject(source.getSourceId()); controller.lookAtCards(sourceObject != null ? sourceObject.getName() : "", new CardsImpl(card), game); - if (!card.getCardType().contains(CardType.LAND) + if (!card.isLand() && controller.canPayLifeCost() && controller.getLife() >= 2 && controller.chooseUse(Outcome.Neutral, "Pay 2 life to put " + card.getLogName() + " into graveyard?", source, game)) { diff --git a/Mage.Sets/src/mage/cards/w/WardOfBones.java b/Mage.Sets/src/mage/cards/w/WardOfBones.java index 4e079c52a1..b2dea634d1 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfBones.java +++ b/Mage.Sets/src/mage/cards/w/WardOfBones.java @@ -116,23 +116,23 @@ class WardOfBonesEffect extends ContinuousRuleModifyingEffectImpl { if (card == null || opponent == null) { return false; } - if (card.getCardType().contains(CardType.CREATURE) + if (card.isCreature() && game.getBattlefield().countAll(new FilterCreaturePermanent(), opponent.getId(), game) > game.getBattlefield().countAll(new FilterCreaturePermanent(), source.getControllerId(), game)) { return true; } - if (card.getCardType().contains(CardType.ARTIFACT) + if (card.isArtifact() && game.getBattlefield().countAll(new FilterArtifactPermanent(), opponent.getId(), game) > game.getBattlefield().countAll(new FilterArtifactPermanent(), source.getControllerId(), game)) { return true; } - if (card.getCardType().contains(CardType.ENCHANTMENT) + if (card.isEnchantment() && game.getBattlefield().countAll(new FilterEnchantmentPermanent(), opponent.getId(), game) > game.getBattlefield().countAll(new FilterEnchantmentPermanent(), source.getControllerId(), game)) { return true; } final int yourLands = game.getBattlefield().countAll(new FilterLandPermanent(), source.getControllerId(), game); - if (card.getCardType().contains(CardType.LAND) + if (card.isLand() && game.getBattlefield().countAll(new FilterLandPermanent(), opponent.getId(), game) > yourLands) { return true; } diff --git a/Mage.Sets/src/mage/cards/w/WarpWorld.java b/Mage.Sets/src/mage/cards/w/WarpWorld.java index b74b899fa9..0c0e92dec7 100644 --- a/Mage.Sets/src/mage/cards/w/WarpWorld.java +++ b/Mage.Sets/src/mage/cards/w/WarpWorld.java @@ -143,9 +143,9 @@ class WarpWorldEffect extends OneShotEffect { if (player != null) { CardsImpl cards = cardsRevealed.get(player.getId()); for (Card card : cards.getCards(game)) { - if (card != null && (card.getCardType().contains(CardType.ARTIFACT) - || card.getCardType().contains(CardType.CREATURE) - || card.getCardType().contains(CardType.LAND))) { + if (card != null && (card.isArtifact() + || card.isCreature() + || card.isLand())) { card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId()); cards.remove(card); } @@ -159,7 +159,7 @@ class WarpWorldEffect extends OneShotEffect { if (player != null) { CardsImpl cards = cardsRevealed.get(player.getId()); for (Card card : cards.getCards(game)) { - if (card != null && card.getCardType().contains(CardType.ENCHANTMENT)) { + if (card != null && card.isEnchantment()) { card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId()); cards.remove(card); } diff --git a/Mage.Sets/src/mage/cards/w/WarstormSurge.java b/Mage.Sets/src/mage/cards/w/WarstormSurge.java index d2a7efe03b..6dd22b9c68 100644 --- a/Mage.Sets/src/mage/cards/w/WarstormSurge.java +++ b/Mage.Sets/src/mage/cards/w/WarstormSurge.java @@ -87,7 +87,7 @@ class WarstormSurgeTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.getCardType().contains(CardType.CREATURE) + if (permanent.isCreature() && permanent.getControllerId().equals(this.controllerId)) { Effect effect = this.getEffects().get(0); effect.setValue("damageSource", event.getTargetId()); diff --git a/Mage.Sets/src/mage/cards/w/WasteNot.java b/Mage.Sets/src/mage/cards/w/WasteNot.java index 1abad34e09..5823158fea 100644 --- a/Mage.Sets/src/mage/cards/w/WasteNot.java +++ b/Mage.Sets/src/mage/cards/w/WasteNot.java @@ -96,7 +96,7 @@ class WasteNotCreatureTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (game.getOpponents(this.getControllerId()).contains(event.getPlayerId())) { Card discarded = game.getCard(event.getTargetId()); - if (discarded != null && discarded.getCardType().contains(CardType.CREATURE)) { + if (discarded != null && discarded.isCreature()) { return true; } } @@ -133,7 +133,7 @@ class WasteNotLandTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (game.getOpponents(this.getControllerId()).contains(event.getPlayerId())) { Card discarded = game.getCard(event.getTargetId()); - if (discarded != null && discarded.getCardType().contains(CardType.LAND)) { + if (discarded != null && discarded.isLand()) { return true; } } @@ -170,7 +170,7 @@ class WasteNotOtherTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (game.getOpponents(this.getControllerId()).contains(event.getPlayerId())) { Card discarded = game.getCard(event.getTargetId()); - if (discarded != null && !discarded.getCardType().contains(CardType.LAND) && !discarded.getCardType().contains(CardType.CREATURE)) { + if (discarded != null && !discarded.isLand() && !discarded.isCreature()) { return true; } } diff --git a/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java b/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java index e4addada03..82194f7b13 100644 --- a/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java +++ b/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java @@ -114,7 +114,7 @@ class WaveOfVitriolEffect extends OneShotEffect { if (player != null) { int count = 0; for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, playerId, game)) { - if (permanent.sacrifice(source.getSourceId(), game) && permanent.getCardType().contains(CardType.LAND)) { + if (permanent.sacrifice(source.getSourceId(), game) && permanent.isLand()) { count++; } } diff --git a/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java b/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java index aca4497450..3ccebe349d 100644 --- a/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java +++ b/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java @@ -108,7 +108,7 @@ class WharfInfiltratorDiscardAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Card card = game.getCard(event.getTargetId()); - if (getControllerId().equals(event.getPlayerId()) && card != null && card.getCardType().contains(CardType.CREATURE)) { + if (getControllerId().equals(event.getPlayerId()) && card != null && card.isCreature()) { return true; } return false; diff --git a/Mage.Sets/src/mage/cards/w/WhiplashTrap.java b/Mage.Sets/src/mage/cards/w/WhiplashTrap.java index 7d01c2c3e0..c638ba694d 100644 --- a/Mage.Sets/src/mage/cards/w/WhiplashTrap.java +++ b/Mage.Sets/src/mage/cards/w/WhiplashTrap.java @@ -88,7 +88,7 @@ class WhiplashTrapCondition implements Condition { if (permanents != null) { int count = 0; for (Permanent permanent : permanents) { - if (permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent.isCreature()) { count++; if (count == 2) { return true; diff --git a/Mage.Sets/src/mage/cards/w/WildDefiance.java b/Mage.Sets/src/mage/cards/w/WildDefiance.java index 86350266e3..4fd682a1a3 100644 --- a/Mage.Sets/src/mage/cards/w/WildDefiance.java +++ b/Mage.Sets/src/mage/cards/w/WildDefiance.java @@ -89,11 +89,11 @@ class CreaturesYouControlBecomesTargetTriggeredAbility extends TriggeredAbilityI @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getControllerId().equals(this.controllerId) && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.getControllerId().equals(this.controllerId) && permanent.isCreature()) { MageObject object = game.getObject(event.getSourceId()); if (object != null && object instanceof Spell) { Card c = (Spell) object; - if (c.getCardType().contains(CardType.INSTANT) || c.getCardType().contains(CardType.SORCERY)) { + if (c.isInstant() || c.isSorcery()) { if (getTargets().isEmpty()) { for (Effect effect : getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); diff --git a/Mage.Sets/src/mage/cards/w/WildEvocation.java b/Mage.Sets/src/mage/cards/w/WildEvocation.java index 90399ae0a1..c0136908aa 100644 --- a/Mage.Sets/src/mage/cards/w/WildEvocation.java +++ b/Mage.Sets/src/mage/cards/w/WildEvocation.java @@ -89,7 +89,7 @@ class WildEvocationEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.add(card); player.revealCards("Wild Evocation", cards, game); - if (card.getCardType().contains(CardType.LAND)) { + if (card.isLand()) { card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), player.getId()); } else { diff --git a/Mage.Sets/src/mage/cards/w/Willbreaker.java b/Mage.Sets/src/mage/cards/w/Willbreaker.java index cb053f45aa..dc0fc83dcf 100644 --- a/Mage.Sets/src/mage/cards/w/Willbreaker.java +++ b/Mage.Sets/src/mage/cards/w/Willbreaker.java @@ -94,7 +94,7 @@ class WillbreakerTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (getControllerId().equals(event.getPlayerId())) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { Player controller = game.getPlayer(getControllerId()); if (controller != null && controller.hasOpponent(permanent.getControllerId(), game)) { getEffects().get(0).setTargetPointer(new FixedTarget(event.getTargetId())); diff --git a/Mage.Sets/src/mage/cards/w/WindingConstrictor.java b/Mage.Sets/src/mage/cards/w/WindingConstrictor.java index 5d649a3cca..93399a6cd7 100644 --- a/Mage.Sets/src/mage/cards/w/WindingConstrictor.java +++ b/Mage.Sets/src/mage/cards/w/WindingConstrictor.java @@ -103,7 +103,7 @@ class WindingConstrictorPermanentEffect extends ReplacementEffectImpl { permanent = game.getPermanentEntering(event.getTargetId()); } return permanent != null - && (permanent.getCardType().contains(CardType.CREATURE) || permanent.getCardType().contains(CardType.ARTIFACT)) + && (permanent.isCreature() || permanent.isArtifact()) && permanent.getControllerId().equals(source.getControllerId()); } diff --git a/Mage.Sets/src/mage/cards/w/WookieeMystic.java b/Mage.Sets/src/mage/cards/w/WookieeMystic.java index f19f4df0c2..ff84557fb0 100644 --- a/Mage.Sets/src/mage/cards/w/WookieeMystic.java +++ b/Mage.Sets/src/mage/cards/w/WookieeMystic.java @@ -124,7 +124,7 @@ class WookieeMysticWatcher extends Watcher { MageObject target = game.getObject(event.getTargetId()); if (event.getSourceId() != null && event.getSourceId().equals(this.getSourceId()) - && target != null && target.getCardType().contains(CardType.CREATURE) + && target != null && target.isCreature() && event.getFlag()) { if (target instanceof Spell) { this.creatures.add(((Spell) target).getCard().getId()); diff --git a/Mage.Sets/src/mage/cards/w/WorldAtWar.java b/Mage.Sets/src/mage/cards/w/WorldAtWar.java index 3d011c8a5a..eb86e80315 100644 --- a/Mage.Sets/src/mage/cards/w/WorldAtWar.java +++ b/Mage.Sets/src/mage/cards/w/WorldAtWar.java @@ -172,7 +172,7 @@ class UntapAttackingThisTurnEffect extends OneShotEffect { Set attackedThisTurn = ((AttackedThisTurnWatcher) watcher).getAttackedThisTurnCreatures(); for (UUID uuid : attackedThisTurn) { Permanent permanent = game.getPermanent(uuid); - if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { + if (permanent != null && permanent.isCreature()) { permanent.untap(game); } } diff --git a/Mage.Sets/src/mage/cards/w/WrenchMind.java b/Mage.Sets/src/mage/cards/w/WrenchMind.java index aff4976f33..4214918a39 100644 --- a/Mage.Sets/src/mage/cards/w/WrenchMind.java +++ b/Mage.Sets/src/mage/cards/w/WrenchMind.java @@ -91,7 +91,7 @@ class WrenchMindEffect extends OneShotEffect { Card card = targetPlayer.getHand().get(target.getFirstTarget(), game); if (card != null) { targetPlayer.discard(card, source, game); - if (!card.getCardType().contains(CardType.ARTIFACT) && !targetPlayer.getHand().isEmpty()) { + if (!card.isArtifact() && !targetPlayer.getHand().isEmpty()) { targetPlayer.discard(1, source, game); } return true; diff --git a/Mage.Sets/src/mage/cards/z/ZadaHedronGrinder.java b/Mage.Sets/src/mage/cards/z/ZadaHedronGrinder.java index 1fe36df0e9..d127d6c115 100644 --- a/Mage.Sets/src/mage/cards/z/ZadaHedronGrinder.java +++ b/Mage.Sets/src/mage/cards/z/ZadaHedronGrinder.java @@ -130,7 +130,7 @@ class ZadaHedronGrinderTriggeredAbility extends TriggeredAbilityImpl { private boolean isControlledInstantOrSorcery(Spell spell) { return spell != null && (spell.getControllerId().equals(this.getControllerId())) - && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY)); + && (spell.isInstant() || spell.isSorcery()); } @Override diff --git a/Mage.Sets/src/mage/cards/z/ZameckGuildmage.java b/Mage.Sets/src/mage/cards/z/ZameckGuildmage.java index a88412b5e8..986e717a00 100644 --- a/Mage.Sets/src/mage/cards/z/ZameckGuildmage.java +++ b/Mage.Sets/src/mage/cards/z/ZameckGuildmage.java @@ -100,7 +100,7 @@ class ZameckGuildmageEntersBattlefieldEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - return permanent != null && permanent.getControllerId().equals(source.getControllerId()) && permanent.getCardType().contains(CardType.CREATURE); + return permanent != null && permanent.getControllerId().equals(source.getControllerId()) && permanent.isCreature(); } @Override diff --git a/Mage.Sets/src/mage/cards/z/ZoZuThePunisher.java b/Mage.Sets/src/mage/cards/z/ZoZuThePunisher.java index 107796b442..db42c2bab7 100644 --- a/Mage.Sets/src/mage/cards/z/ZoZuThePunisher.java +++ b/Mage.Sets/src/mage/cards/z/ZoZuThePunisher.java @@ -94,7 +94,7 @@ class ZoZuThePunisherAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getCardType().contains(CardType.LAND)) { + if (permanent != null && permanent.isLand()) { Player player = game.getPlayer(permanent.getControllerId()); if (player != null) { for (Effect effect : this.getEffects()) { diff --git a/Mage.Sets/src/mage/cards/z/Zoologist.java b/Mage.Sets/src/mage/cards/z/Zoologist.java index 5296973032..f967916e74 100644 --- a/Mage.Sets/src/mage/cards/z/Zoologist.java +++ b/Mage.Sets/src/mage/cards/z/Zoologist.java @@ -103,7 +103,7 @@ class ZoologistEffect extends OneShotEffect { Card card = controller.getLibrary().getFromTop(game); controller.revealCards(sourceObject.getIdName(), new CardsImpl(card), game); if (card != null) { - if (card.getCardType().contains(CardType.CREATURE)) { + if (card.isCreature()) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); } else { controller.moveCards(card, Zone.GRAVEYARD, source, game); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DiscardTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DiscardTest.java index 53fb6f4aa3..5ebbe02942 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DiscardTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DiscardTest.java @@ -33,7 +33,6 @@ import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; /** - * * @author LevelX2 */ public class DiscardTest extends CardTestPlayerBase { @@ -64,6 +63,19 @@ public class DiscardTest extends CardTestPlayerBase { assertHandCount(playerA, 1); // the card drawn by Cycling } + @Test + public void AmnesiaTest() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 20); + addCard(Zone.HAND, playerA, "Shock"); + addCard(Zone.HAND, playerA, "Shock"); + addCard(Zone.HAND, playerA, "Amnesia"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Amnesia", playerA); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + assertHandCount(playerA, 0); + } + /** * With Bazaar of Baghdad, if you use it when you have no cards in hand, you * draw 2, it asks for you to discard 3, but you can't. So the game can't diff --git a/Mage/src/main/java/mage/MageObjectImpl.java b/Mage/src/main/java/mage/MageObjectImpl.java index a6331f5972..0b21654437 100644 --- a/Mage/src/main/java/mage/MageObjectImpl.java +++ b/Mage/src/main/java/mage/MageObjectImpl.java @@ -163,12 +163,12 @@ public abstract class MageObjectImpl implements MageObject { public MageInt getToughness() { return toughness; } - + @Override public int getStartingLoyalty() { - for (Ability ab: getAbilities()) { + for (Ability ab : getAbilities()) { if (ab instanceof PlanswalkerEntersWithLoyalityCountersAbility) { - return ((PlanswalkerEntersWithLoyalityCountersAbility)ab).getStartingLoyalty(); + return ((PlanswalkerEntersWithLoyalityCountersAbility) ab).getStartingLoyalty(); } } return 0; @@ -178,19 +178,19 @@ public abstract class MageObjectImpl implements MageObject { public ObjectColor getColor(Game game) { return color; } - + @Override public ObjectColor getFrameColor(Game game) { // For lands, add any colors of mana the land can produce to // its frame colors. if (this.isLand()) { ObjectColor cl = frameColor.copy(); - for (Ability ab: getAbilities()) { + for (Ability ab : getAbilities()) { if (ab instanceof ActivatedManaAbilityImpl) { - ActivatedManaAbilityImpl mana = (ActivatedManaAbilityImpl)ab; + ActivatedManaAbilityImpl mana = (ActivatedManaAbilityImpl) ab; try { List manaAdded = mana.getNetMana(game); - for (Mana m: manaAdded) { + for (Mana m : manaAdded) { if (m.getAny() > 0) { return new ObjectColor("WUBRG"); }