From 9c97953b6b7e8bebb236dee3c4444197d899605a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 9 May 2015 21:18:00 +0200 Subject: [PATCH] Added some font color to object and player names output to game logging and feedback area. --- .../mage/plugins/card/images/ImageCache.java | 12 ++- Mage.Common/src/mage/view/CardsView.java | 6 +- .../java/mage/player/ai/utils/RateCard.java | 7 +- .../java/mage/server/game/GameController.java | 14 +-- .../tournament/TournamentController.java | 10 +-- .../mage/sets/alarareborn/ClovenCasting.java | 2 +- .../mage/sets/alarareborn/EnigmaSphinx.java | 2 +- .../sets/apocalypse/EnlistmentOfficer.java | 2 +- .../sets/apocalypse/GoblinRingleader.java | 2 +- .../src/mage/sets/apocalypse/KavuHowler.java | 2 +- .../mage/sets/apocalypse/Spiritmonger.java | 2 +- .../mage/sets/apocalypse/SylvanMessenger.java | 2 +- .../sets/avacynrestored/CavernOfSouls.java | 4 +- .../sets/avacynrestored/DescendantsPath.java | 2 +- .../avacynrestored/DescentIntoMadness.java | 4 +- .../sets/avacynrestored/DivineDeflection.java | 2 +- .../mage/sets/avacynrestored/KillingWave.java | 4 +- .../sets/avacynrestored/RidersOfGavony.java | 2 +- .../mage/sets/avacynrestored/VexingDevil.java | 6 +- .../sets/betrayersofkamigawa/AuraBarbs.java | 2 +- .../betrayersofkamigawa/MinamosMeddling.java | 2 +- .../betrayersofkamigawa/MistbladeShinobi.java | 2 +- .../OpalEyeKondasYojimbo.java | 2 +- .../betrayersofkamigawa/OrnateKanzashi.java | 2 +- .../betrayersofkamigawa/ShiningShoal.java | 2 +- .../betrayersofkamigawa/Skullsnatcher.java | 2 +- .../betrayersofkamigawa/ThroatSlitter.java | 2 +- .../sets/betrayersofkamigawa/WardOfPiety.java | 2 +- .../sets/bornofthegods/AcolytesReward.java | 2 +- .../mage/sets/bornofthegods/BileBlight.java | 4 +- .../sets/bornofthegods/PerplexingChimera.java | 2 +- .../sets/bornofthegods/SatyrFiredancer.java | 2 +- .../sets/bornofthegods/SatyrWayfinder.java | 2 +- .../sets/bornofthegods/WhimsOfTheFates.java | 6 +- .../sets/championsofkamigawa/CandlesGlow.java | 2 +- .../CranialExtraction.java | 4 +- .../mage/sets/championsofkamigawa/Hinder.java | 2 +- .../championsofkamigawa/NightDealings.java | 2 +- .../championsofkamigawa/ReverseTheSands.java | 6 +- .../ShimatsuTheBloodcloaked.java | 2 +- .../sets/championsofkamigawa/TideOfWar.java | 2 +- .../sets/championsofkamigawa/VassalsDuty.java | 2 +- .../mage/sets/commander/AllianceOfArms.java | 2 +- .../sets/commander/ChorusOfTheConclave.java | 2 +- .../mage/sets/commander/CollectiveVoyage.java | 2 +- .../mage/sets/commander/HydraOmnivore.java | 2 +- .../sets/commander/ManaChargedDragon.java | 2 +- .../src/mage/sets/commander/MindsAglow.java | 2 +- .../sets/commander/RikuOfTwoReflections.java | 2 +- .../src/mage/sets/commander/SewerNemesis.java | 2 +- .../src/mage/sets/commander/SharedTrauma.java | 2 +- .../src/mage/sets/commander/SpellCrumple.java | 2 +- .../src/mage/sets/commander/Stranglehold.java | 2 +- .../mage/sets/commander2013/EyeOfDoom.java | 2 +- .../sets/commander2013/NayaSoulbeast.java | 8 +- .../sets/commander2013/OrderOfSuccession.java | 4 +- .../sets/commander2013/Reincarnation.java | 2 +- .../sets/commander2013/TemptWithGlory.java | 4 +- .../commander2013/TemptWithReflections.java | 2 +- .../sets/commander2013/TrueNameNemesis.java | 4 +- .../commander2013/UnexpectedlyAbsent.java | 4 +- .../sets/commander2013/WellOfLostDreams.java | 2 +- .../mage/sets/commander2014/AssaultSuit.java | 2 +- .../mage/sets/commander2014/BitterFeud.java | 2 +- .../mage/sets/commander2014/GraveSifter.java | 2 +- .../commander2014/MaliciousAffliction.java | 2 +- .../sets/commander2014/VolcanicOffering.java | 4 +- Mage.Sets/src/mage/sets/conflux/Nyxathid.java | 2 +- .../mage/sets/conflux/SkywardEyeProphets.java | 2 +- .../sets/darkascension/HauntedFengraf.java | 2 +- .../darkascension/IncreasingVengeance.java | 4 +- .../sets/darkascension/LostInTheWoods.java | 2 +- .../mage/sets/darkascension/SoulSeizer.java | 2 +- .../src/mage/sets/darksteel/SerumPowder.java | 2 +- .../dissension/NovijenHeartOfProgress.java | 2 +- .../sets/dissension/ResearchDevelopment.java | 9 +- .../src/mage/sets/dissension/RiseFall.java | 2 +- .../mage/sets/dissension/UtopiaSprawl.java | 2 +- .../sets/dragonsmaze/DeadbridgeChant.java | 2 +- .../dragonsmaze/MirkoVoskMindDrinker.java | 2 +- .../mage/sets/dragonsmaze/ReapIntellect.java | 2 +- .../sets/dragonsoftarkir/GurmagDrowner.java | 2 +- .../sets/dragonsoftarkir/KeeperOfTheLens.java | 4 +- .../dragonsoftarkir/NarsetTranscendent.java | 4 +- .../sets/dragonsoftarkir/RevealingWind.java | 2 +- .../ShorecrasherElemental.java | 2 +- .../sets/elspethvstezzeret/EchoingTruth.java | 2 +- .../elvesvsgoblins/SkirkDrillSergeant.java | 2 +- .../sets/eventide/AshlingTheExtinguisher.java | 2 +- .../mage/sets/eventide/CankerAbomination.java | 2 +- .../src/mage/sets/eventide/MirrorSheen.java | 2 +- .../src/mage/sets/eventide/NeedleSpecter.java | 2 +- .../src/mage/sets/exodus/EntropicSpecter.java | 2 +- .../mage/sets/exodus/SoltariVisionary.java | 2 +- .../mage/sets/fatereforged/FriendlyFire.java | 2 +- .../fatereforged/GhastlyConscription.java | 4 +- .../sets/fatereforged/HumbleDefector.java | 2 +- .../sets/fatereforged/JeskaiInfiltrator.java | 2 +- .../fatereforged/RenownedWeaponsmith.java | 2 +- .../fatereforged/TasigurTheGoldenFang.java | 2 +- .../sets/fatereforged/WriteIntoBeing.java | 4 +- .../sets/fifthdawn/PlungeIntoDarkness.java | 2 +- .../src/mage/sets/fifthdawn/SummonersEgg.java | 2 +- .../src/mage/sets/fifthedition/Juxtapose.java | 4 +- .../mage/sets/fifthedition/SylvanLibrary.java | 4 +- .../mage/sets/fifthedition/WindsOfChange.java | 2 +- .../src/mage/sets/fourthedition/TheRack.java | 2 +- .../src/mage/sets/futuresight/Delay.java | 4 +- .../sets/gatecrash/AngelicSkirmisher.java | 2 +- .../mage/sets/gatecrash/BalustradeSpy.java | 2 +- .../mage/sets/gatecrash/BaneAlleyBroker.java | 4 +- .../sets/gatecrash/DiluvianPrimordial.java | 2 +- .../src/mage/sets/gatecrash/DomriRade.java | 4 +- .../mage/sets/gatecrash/DuskmantleSeer.java | 5 +- .../sets/gatecrash/IllusionistsBracers.java | 2 +- .../sets/gatecrash/LuminatePrimordial.java | 2 +- .../src/mage/sets/gatecrash/MindGrind.java | 2 +- .../mage/sets/gatecrash/MoltenPrimordial.java | 2 +- .../mage/sets/gatecrash/NightveilSpecter.java | 2 +- .../sets/gatecrash/SepulchralPrimordial.java | 2 +- .../mage/sets/gatecrash/SylvanPrimordial.java | 2 +- .../mage/sets/gatecrash/ThrullParasite.java | 2 +- .../mage/sets/gatecrash/VizkopaConfessor.java | 2 +- .../src/mage/sets/guildpact/Ghostway.java | 2 +- .../sets/heroesvsmonsters/KavuPredator.java | 2 +- .../src/mage/sets/innistrad/CaravanVigil.java | 2 +- .../sets/innistrad/CharmbreakerDevils.java | 2 +- .../src/mage/sets/innistrad/Ghoulraiser.java | 2 +- .../src/mage/sets/innistrad/MakeAWish.java | 2 +- Mage.Sets/src/mage/sets/innistrad/Mulch.java | 2 +- .../mage/sets/innistrad/WoodlandSleuth.java | 2 +- .../mage/sets/invasion/DromarTheBanisher.java | 2 +- .../src/mage/sets/invasion/FactOrFiction.java | 2 +- .../mage/sets/invasion/RevivingVapors.java | 2 +- .../mage/sets/invasion/RithTheAwakener.java | 2 +- .../mage/sets/invasion/TrevaTheRenewer.java | 2 +- .../journeyintonyx/AjaniMentorOfHeroes.java | 2 +- .../journeyintonyx/AthreosGodOfPassage.java | 2 +- .../mage/sets/journeyintonyx/BrainMaggot.java | 2 +- .../mage/sets/journeyintonyx/DakraMystic.java | 2 +- .../sets/journeyintonyx/HallOfTriumph.java | 2 +- .../sets/journeyintonyx/QuarryColossus.java | 4 +- .../mage/sets/journeyintonyx/SageOfHours.java | 2 +- .../src/mage/sets/judgment/Browbeat.java | 2 +- .../mage/sets/judgment/FlashOfInsight.java | 4 +- .../mage/sets/judgment/WorldgorgerDragon.java | 2 +- .../src/mage/sets/judgment/WormfangDrake.java | 2 +- .../sets/khansoftarkir/ButcherOfTheHorde.java | 2 +- .../sets/khansoftarkir/LensOfClarity.java | 6 +- .../NarsetEnlightenedMaster.java | 2 +- .../sets/khansoftarkir/ScoutTheBorders.java | 2 +- .../sets/khansoftarkir/SeeTheUnwritten.java | 2 +- .../mage/sets/khansoftarkir/SmokeTeller.java | 2 +- .../sets/khansoftarkir/SultaiSoothsayer.java | 2 +- .../sets/khansoftarkir/TaigamsScheming.java | 4 +- .../mage/sets/khansoftarkir/UginsNexus.java | 2 +- .../src/mage/sets/legends/ChainLightning.java | 2 +- .../src/mage/sets/legions/MistformSliver.java | 2 +- .../src/mage/sets/limitedalpha/BlackVise.java | 2 +- .../mage/sets/limitedalpha/JadeMonolith.java | 12 +-- .../mage/sets/lorwyn/AshlingThePilgrim.java | 3 +- .../mage/sets/lorwyn/RingsOfBrighthearth.java | 2 +- .../src/mage/sets/magic2010/HarmsWay.java | 2 +- .../sets/magic2010/LightwielderPaladin.java | 2 +- .../mage/sets/magic2011/ConundrumSphinx.java | 2 +- .../sets/magic2012/AdaptiveAutomaton.java | 2 +- .../mage/sets/magic2012/GrandAbolisher.java | 2 +- .../mage/sets/magic2012/SphinxOfUthuun.java | 2 +- .../src/mage/sets/magic2012/SuturedGhoul.java | 2 +- .../mage/sets/magic2013/MindclawShaman.java | 24 +++--- .../mage/sets/magic2013/ShimianSpecter.java | 2 +- .../mage/sets/magic2014/BanisherPriest.java | 2 +- .../mage/sets/magic2014/DevoutInvocation.java | 2 +- .../mage/sets/magic2014/DoorOfDestinies.java | 2 +- .../src/mage/sets/magic2014/MoltenBirth.java | 8 +- .../sets/magic2014/StrionicResonator.java | 2 +- .../src/mage/sets/magic2015/AEtherspouts.java | 4 +- .../sets/magic2015/ConstrictingSliver.java | 2 +- .../src/mage/sets/magic2015/GenesisHydra.java | 2 +- .../magic2015/JaliraMasterPolymorphist.java | 2 +- .../sets/magic2015/KurkeshOnakkeAncient.java | 2 +- .../sets/magic2015/MasterOfPredicaments.java | 6 +- .../src/mage/sets/magic2015/ObeliskOfUrd.java | 2 +- .../sets/mercadianmasques/CausticWasps.java | 2 +- .../src/mage/sets/mirage/ForbiddenCrypt.java | 2 +- .../src/mage/sets/mirage/IllicitAuction.java | 9 +- .../mage/sets/mirrodin/ExtraplanarLens.java | 2 +- .../mage/sets/mirrodin/GoblinCharbelcher.java | 2 +- .../mage/sets/mirrodin/IsochronScepter.java | 2 +- .../src/mage/sets/mirrodin/KrarksThumb.java | 4 +- .../src/mage/sets/mirrodin/RustmouthOgre.java | 2 +- .../src/mage/sets/mirrodin/SoulFoundry.java | 2 +- .../mage/sets/mirrodin/SpoilsOfTheVault.java | 2 +- .../mirrodinbesieged/DistantMemories.java | 2 +- .../sets/modernmasters/EchoingCourage.java | 2 +- .../sets/modernmasters/JhoiraOfTheGhitu.java | 2 +- .../sets/modernmasters/RiftElemental.java | 2 +- .../sets/modernmasters/TrygonPredator.java | 2 +- .../mage/sets/morningtide/GreatbowDoyen.java | 2 +- .../mage/sets/morningtide/Slithermuse.java | 2 +- .../mage/sets/newphyrexia/ArmWithAEther.java | 2 +- .../mage/sets/newphyrexia/BlindZealot.java | 4 +- .../sets/newphyrexia/ExclusionRitual.java | 2 +- .../mage/sets/newphyrexia/PraetorsGrasp.java | 2 +- .../src/mage/sets/newphyrexia/Spellskite.java | 2 +- .../sets/newphyrexia/SurgicalExtraction.java | 6 +- .../src/mage/sets/newphyrexia/Xenograft.java | 2 +- .../mage/sets/ninthedition/StorageMatrix.java | 2 +- .../src/mage/sets/odyssey/SparkMage.java | 2 +- .../src/mage/sets/odyssey/WildMongrel.java | 2 +- .../mage/sets/onslaught/AkromasBlessing.java | 2 +- .../src/mage/sets/onslaught/AstralSlide.java | 2 +- .../src/mage/sets/onslaught/ChainOfVapor.java | 2 +- .../DarigaazTheIgniter.java | 2 +- .../src/mage/sets/planarchaos/Extirpate.java | 2 +- .../sets/planarchaos/IntetTheDreamer.java | 4 +- .../sets/planarchaos/Phantasmagorian.java | 2 +- .../mage/sets/planechase2012/MassMutiny.java | 2 +- .../sets/planechase2012/WhirlpoolWarrior.java | 2 +- .../sets/planeshift/SkyshipWeatherlight.java | 2 +- .../mage/sets/ravnica/BottledCloister.java | 4 +- .../returntoravnica/DesecrationDemon.java | 4 +- .../sets/returntoravnica/DetentionSphere.java | 8 +- .../returntoravnica/FiremindsForesight.java | 2 +- .../sets/returntoravnica/GrislySalvage.java | 2 +- .../mage/sets/returntoravnica/GuildFeud.java | 4 +- .../JaceArchitectOfThought.java | 4 +- .../sets/returntoravnica/PalisadeGiant.java | 2 +- .../sets/returntoravnica/RakdosCharm.java | 2 +- .../returntoravnica/ShriekingAffliction.java | 2 +- .../returntoravnica/TabletOfTheGuilds.java | 2 +- .../sets/returntoravnica/TavernSwindler.java | 2 +- .../riseoftheeldrazi/CurseOfWizardry.java | 2 +- .../riseoftheeldrazi/RealmsUncharted.java | 2 +- .../sets/riseoftheeldrazi/SurrealMemoir.java | 2 +- .../sets/saviorsofkamigawa/BloodClock.java | 4 +- .../saviorsofkamigawa/ChoiceOfDamnations.java | 2 +- .../DescendantOfMasumaro.java | 2 +- .../saviorsofkamigawa/ElderPineOfJukai.java | 2 +- .../KahoMinamoHistorian.java | 2 +- .../sets/saviorsofkamigawa/PainsReward.java | 8 +- .../saviorsofkamigawa/SokenzanRenegade.java | 2 +- .../sets/saviorsofkamigawa/UndyingFlames.java | 2 +- .../sets/scarsofmirrodin/GenesisWave.java | 2 +- .../sets/scarsofmirrodin/MoltenPsyche.java | 2 +- .../sets/scarsofmirrodin/MyrBattlesphere.java | 2 +- .../scarsofmirrodin/VenserTheSojourner.java | 2 +- .../src/mage/sets/scourge/KaronaFalseGod.java | 2 +- .../sets/shadowmoor/AdviceFromTheFae.java | 2 +- .../src/mage/sets/shadowmoor/FossilFind.java | 2 +- .../sets/shadowmoor/GhastlordOfFugue.java | 2 +- .../mage/sets/shadowmoor/ImpromptuRaid.java | 2 +- .../sets/shadowmoor/KnollspineDragon.java | 4 +- .../sets/shadowmoor/LureboundScarecrow.java | 2 +- .../mage/sets/shadowmoor/MedicineRunner.java | 2 +- .../mage/sets/shadowmoor/PaintersServant.java | 2 +- .../mage/sets/shadowmoor/PaleWayfarer.java | 2 +- .../mage/sets/shadowmoor/PlagueOfVermin.java | 2 +- .../mage/sets/shadowmoor/PuresightMerrow.java | 2 +- .../sets/shadowmoor/WheelOfSunAndMoon.java | 2 +- .../shardsofalara/BrilliantUltimatum.java | 4 +- .../sets/shardsofalara/CovenantOfMinds.java | 4 +- .../mage/sets/stronghold/CrovaxTheCursed.java | 4 +- .../src/mage/sets/stronghold/HermitDruid.java | 2 +- .../src/mage/sets/stronghold/ShamanEnKor.java | 2 +- .../src/mage/sets/tempest/CursedScroll.java | 2 +- .../src/mage/sets/tempest/LegacysAllure.java | 6 +- .../src/mage/sets/tempest/LivingDeath.java | 2 +- Mage.Sets/src/mage/sets/tempest/Lobotomy.java | 2 +- .../src/mage/sets/tempest/ScrollRack.java | 8 +- Mage.Sets/src/mage/sets/tempest/WoodSage.java | 2 +- .../sets/theros/AshiokNightmareWeaver.java | 6 +- .../mage/sets/theros/ChainedToTheRocks.java | 2 +- .../mage/sets/theros/CommuneWithTheGods.java | 2 +- .../src/mage/sets/theros/DaxosOfMeletis.java | 2 +- .../mage/sets/theros/MeletisCharlatan.java | 2 +- .../mage/sets/theros/PsychicIntrusion.java | 4 +- .../mage/sets/theros/PyxisOfPandemonium.java | 2 +- .../src/mage/sets/theros/SteamAugury.java | 4 +- .../mage/sets/timeshifted/GaeasBlessing.java | 2 +- .../src/mage/sets/timespiral/LivingEnd.java | 2 +- .../src/mage/sets/timespiral/StuffyDoll.java | 2 +- .../mage/sets/unlimitededition/TimeVault.java | 2 +- .../sets/urzassaga/PhyrexianProcessor.java | 2 +- .../mage/sets/vintagemasters/ChaosWarp.java | 2 +- .../sets/vintagemasters/CouncilsJudgment.java | 4 +- .../sets/vintagemasters/PleaForPower.java | 4 +- .../mage/sets/visions/GoblinRecruiter.java | 2 +- .../src/mage/sets/weatherlight/Tariff.java | 4 +- .../src/mage/sets/worldwake/HammerOfRuin.java | 2 +- .../sets/worldwake/JaceTheMindSculptor.java | 2 +- .../mage/sets/worldwake/MordantDragon.java | 2 +- .../mage/sets/worldwake/RefractionTrap.java | 2 +- .../sets/worldwake/ThadaAdelAcquisitor.java | 2 +- .../src/mage/sets/zendikar/BalaGedThief.java | 2 +- .../src/mage/sets/zendikar/BeastHunt.java | 2 +- .../mage/sets/zendikar/BraveTheElements.java | 2 +- .../src/mage/sets/zendikar/GoblinGuide.java | 2 +- .../sets/zendikar/IonaShieldOfEmeria.java | 2 +- .../src/mage/sets/zendikar/KabiraEvangel.java | 2 +- .../cards/abilities/keywords/HauntTest.java | 6 +- .../abilities/keywords/ManifestTest.java | 34 ++++---- .../cards/abilities/keywords/MorphTest.java | 48 +++++------ .../ExileAndReturnUnderYourControl.java | 4 +- .../facedown/GhastlyConscriptionTest.java | 2 +- .../prevent/DeflectingPalmTest.java | 2 +- .../ths/PurphorosGodOfTheForgeTest.java | 4 +- .../triggers/dies/TidehollowScullerTest.java | 4 +- .../dies/WhisperwoodElementalTest.java | 2 +- .../java/org/mage/test/player/TestPlayer.java | 7 +- .../base/impl/CardTestPlayerAPIImpl.java | 8 +- Mage/src/mage/MageObjectImpl.java | 3 +- Mage/src/mage/abilities/AbilityImpl.java | 15 ++-- .../abilities/abilityword/KinshipAbility.java | 4 +- .../common/CastCommanderAbility.java | 2 +- .../costs/common/ExileFromStackCost.java | 2 +- .../costs/common/ExileSourceCost.java | 2 +- .../costs/common/RemoveCounterCost.java | 2 +- .../RevealHandSourceControllerCost.java | 2 +- .../abilities/effects/ContinuousEffects.java | 2 +- .../PlaneswalkerRedirectionEffect.java | 2 +- .../effects/common/AmplifyEffect.java | 2 +- .../effects/common/ChooseColorEffect.java | 2 +- .../common/ChooseCreatureTypeEffect.java | 2 +- .../effects/common/ChooseModeEffect.java | 2 +- .../abilities/effects/common/ClashEffect.java | 14 +-- .../CopySpellForEachItCouldTargetEffect.java | 2 +- .../effects/common/CopyTargetSpellEffect.java | 2 +- .../common/DoUnlessAnyPlayerPaysEffect.java | 4 +- .../effects/common/ExileSourceEffect.java | 2 +- .../common/ExileTargetForSourceEffect.java | 4 +- .../effects/common/FlipSourceEffect.java | 2 +- .../LookLibraryAndPickControllerEffect.java | 2 +- .../LookLibraryMayPutToBottomEffect.java | 2 +- .../LookLibraryTopCardTargetPlayerEffect.java | 2 +- ...reventDamageToTargetMultiAmountEffect.java | 2 +- .../PutTokenOntoBattlefieldCopySource.java | 4 +- .../effects/common/ReturnFromExileEffect.java | 4 +- .../ReturnFromExileForSourceEffect.java | 2 +- ...vealAndShuffleIntoLibrarySourceEffect.java | 2 +- .../BecomesColorOrColorsTargetEffect.java | 2 +- .../continuous/BecomesColorTargetEffect.java | 2 +- .../CommanderReplacementEffect.java | 4 +- .../GainProtectionFromColorTargetEffect.java | 2 +- .../common/counter/AddCountersAllEffect.java | 2 +- .../counter/AddCountersSourceEffect.java | 4 +- .../counter/AddCountersTargetEffect.java | 6 +- .../common/counter/ProliferateEffect.java | 2 +- .../DiscardCardYouChooseTargetEffect.java | 4 +- .../SearchLibraryPutOnLibraryEffect.java | 4 +- ...dHandLibraryForCardNameAndExileEffect.java | 8 +- .../abilities/keyword/ConspireAbility.java | 2 +- .../abilities/keyword/ConvokeAbility.java | 2 +- .../mage/abilities/keyword/DredgeAbility.java | 2 +- .../abilities/keyword/FlashbackAbility.java | 2 +- .../mage/abilities/keyword/KickerAbility.java | 2 +- .../abilities/keyword/ReplicateAbility.java | 2 +- .../abilities/keyword/SunburstAbility.java | 2 +- .../abilities/keyword/SuspendAbility.java | 2 +- .../abilities/keyword/TributeAbility.java | 8 +- .../abilities/keyword/UnleashAbility.java | 2 +- Mage/src/mage/actions/MageDrawAction.java | 4 +- Mage/src/mage/cards/CardImpl.java | 12 +-- .../predicate/mageobject/NamePredicate.java | 6 +- Mage/src/mage/game/GameCommanderImpl.java | 2 +- Mage/src/mage/game/GameImpl.java | 22 ++--- Mage/src/mage/game/combat/Combat.java | 6 +- Mage/src/mage/game/command/Commander.java | 3 +- Mage/src/mage/game/command/Emblem.java | 3 +- Mage/src/mage/game/match/MatchImpl.java | 2 +- .../mage/game/permanent/PermanentImpl.java | 9 +- Mage/src/mage/game/permanent/token/Token.java | 2 +- Mage/src/mage/game/stack/Spell.java | 8 +- Mage/src/mage/game/stack/StackAbility.java | 5 +- Mage/src/mage/players/Player.java | 1 + Mage/src/mage/players/PlayerImpl.java | 79 +++++++++-------- Mage/src/mage/target/TargetPlayer.java | 2 +- .../target/common/TargetCreatureOrPlayer.java | 2 +- .../common/TargetCreatureOrPlayerAmount.java | 2 +- .../mage/target/common/TargetDefender.java | 2 +- .../common/TargetPermanentOrPlayer.java | 2 +- Mage/src/mage/util/GameLog.java | 85 +++++++++++++++++++ .../watchers/common/CommanderInfoWatcher.java | 4 +- .../mage/watchers/common/SoulbondWatcher.java | 4 +- 384 files changed, 745 insertions(+), 636 deletions(-) create mode 100644 Mage/src/mage/util/GameLog.java diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java index 5937360b8b..08cb77829f 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java @@ -7,7 +7,6 @@ import com.mortennobel.imagescaling.ResampleOp; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.image.BufferedImage; -import java.io.EOFException; import java.io.File; import java.io.IOException; import java.util.Map; @@ -105,8 +104,15 @@ public class ImageCache { thumbnailFile = new TFile(thumbnailPath); } catch (Exception ex) { } - - if (thumbnailFile != null && thumbnailFile.exists()) { + boolean exists =false; + if (thumbnailFile != null) { + try { + exists = thumbnailFile.exists(); + } catch(Exception ex) { + exists = false; + } + } + if (exists) { log.debug("loading thumbnail for " + key + ", path="+thumbnailPath); return loadImage(thumbnailFile); } else { diff --git a/Mage.Common/src/mage/view/CardsView.java b/Mage.Common/src/mage/view/CardsView.java index 6f61d93769..6402ebd242 100644 --- a/Mage.Common/src/mage/view/CardsView.java +++ b/Mage.Common/src/mage/view/CardsView.java @@ -114,7 +114,7 @@ public class CardsView extends LinkedHashMap { } else { sourceCardView = new CardView(sourceObject); } - abilityView = new AbilityView(ability, sourceObject.getLogName(), sourceCardView); + abilityView = new AbilityView(ability, sourceObject.getName(), sourceCardView); } if (ability.getTargets().size() > 0) { abilityView.setTargets(ability.getTargets()); @@ -133,7 +133,7 @@ public class CardsView extends LinkedHashMap { for (UUID uuid : abilityTargets) { MageObject mageObject = game.getObject(uuid); if (mageObject != null) { - names.add(mageObject.getLogName()); + names.add(mageObject.getName()); } } if (!names.isEmpty()) { @@ -150,7 +150,7 @@ public class CardsView extends LinkedHashMap { for (Ability ability: abilities) { Card sourceCard = state.getPermanent(ability.getSourceId()); if (sourceCard != null) { - this.put(ability.getId(), new AbilityView(ability, sourceCard.getLogName(), new CardView(sourceCard))); + this.put(ability.getId(), new AbilityView(ability, sourceCard.getName(), new CardView(sourceCard))); } } } diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java index 08f09ce3ed..b3a64aac02 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java @@ -24,7 +24,7 @@ import java.util.*; public class RateCard { private static Map ratings; - private static Map rated = new HashMap(); + private static final Map rated = new HashMap<>(); private static Integer min = Integer.MAX_VALUE, max = 0; /** @@ -47,16 +47,17 @@ public class RateCard { * If allowedColors is null then the rating is retrieved from the cache * * @param card + * @param allowedColors * @return */ public static int rateCard(Card card, List allowedColors) { if (allowedColors == null && rated.containsKey(card.getName())) { return rated.get(card.getName()); } - int type = 0; + int type; if (card.getCardType().contains(CardType.PLANESWALKER)) { type = 15; - } if (card.getCardType().contains(CardType.CREATURE)) { + } else if (card.getCardType().contains(CardType.CREATURE)) { type = 10; } else if (card.getSubtype().contains("Equipment")) { type = 8; diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index 03323883f0..5e76695a2e 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -336,8 +336,8 @@ public class GameController implements GameCallback { joinType = "rejoined"; } user.addGame(playerId, gameSession); - logger.debug("Player " + player.getName()+ " " + playerId + " has " + joinType + " gameId: " + game.getId()); - ChatManager.getInstance().broadcast(chatId, "", game.getPlayer(playerId).getName() + " has " + joinType + " the game", MessageColor.ORANGE, true, MessageType.GAME); + logger.debug("Player " + player.getLogName()+ " " + playerId + " has " + joinType + " gameId: " + game.getId()); + ChatManager.getInstance().broadcast(chatId, "", game.getPlayer(playerId).getLogName() + " has " + joinType + " the game", MessageColor.ORANGE, true, MessageType.GAME); checkStart(); } @@ -361,19 +361,19 @@ public class GameController implements GameCallback { // join the game because player has not joined are was removed because of disconnect user.removeConstructing(player.getId()); GameManager.getInstance().joinGame(game.getId(), user.getId()); - logger.debug("Player " + user.getName() + " (disconnected) has joined gameId: " +game.getId()); + logger.debug("Player " + player.getLogName() + " (disconnected) has joined gameId: " +game.getId()); } ChatManager.getInstance().broadcast(chatId, player.getName(), user.getPingInfo() + " is pending to join the game", MessageColor.BLUE, true, ChatMessage.MessageType.STATUS); if (user.getSecondsDisconnected() > 240) { // Cancel player join possibility lately after 4 minutes - logger.debug("Player " + user.getName() + " - canceled game (after 240 seconds) gameId: " +game.getId()); + logger.debug("Player " + player.getLogName() + " - canceled game (after 240 seconds) gameId: " +game.getId()); player.leave(); } } } else { if (!player.hasLeft()) { - logger.debug("Player " + player.getName() + " canceled game (no user) gameId: " + game.getId()); + logger.debug("Player " + player.getLogName() + " canceled game (no user) gameId: " + game.getId()); player.leave(); } } @@ -581,7 +581,7 @@ public class GameController implements GameCallback { public void idleTimeout(UUID playerId) { Player player = game.getPlayer(playerId); if (player != null) { - String sb = player.getName() + + String sb = player.getLogName() + " has timed out (player had priority and was not active for " + ConfigSettings.getInstance().getMaxSecondsIdle() + " seconds ) - Auto concede."; ChatManager.getInstance().broadcast(chatId, "", sb, MessageColor.BLACK, true, MessageType.STATUS); @@ -800,7 +800,7 @@ public class GameController implements GameCallback { if (game.getStep() != null) { message.append(game.getStep().getType().toString()).append(" - "); } - message.append("Waiting for ").append(game.getPlayer(playerId).getName()); + message.append("Waiting for ").append(game.getPlayer(playerId).getLogName()); for (final Entry entry: gameSessions.entrySet()) { if (!entry.getKey().equals(playerId)) { entry.getValue().inform(message.toString()); diff --git a/Mage.Server/src/main/java/mage/server/tournament/TournamentController.java b/Mage.Server/src/main/java/mage/server/tournament/TournamentController.java index 301055bcd2..2136cd3346 100644 --- a/Mage.Server/src/main/java/mage/server/tournament/TournamentController.java +++ b/Mage.Server/src/main/java/mage/server/tournament/TournamentController.java @@ -143,7 +143,7 @@ public class TournamentController { if (!player.getPlayer().isHuman()) { player.setJoined(); logger.debug("player " + player.getPlayer().getId() + " has joined tournament " + tournament.getId()); - ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getName() + " has joined the tournament", MessageColor.BLACK, true, MessageType.STATUS); + ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getLogName() + " has joined the tournament", MessageColor.BLACK, true, MessageType.STATUS); } } checkStart(); @@ -173,7 +173,7 @@ public class TournamentController { TournamentPlayer player = tournament.getPlayer(playerId); player.setJoined(); logger.debug("player " +player.getPlayer().getName() + " - client has joined tournament " + tournament.getId()); - ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getName() + " has joined the tournament", MessageColor.BLACK, true, MessageType.STATUS); + ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getLogName() + " has joined the tournament", MessageColor.BLACK, true, MessageType.STATUS); checkStart(); } else { logger.error("User not found userId: " + userId + " tournamentId: " + tournament.getId()); @@ -296,7 +296,7 @@ public class TournamentController { TournamentPlayer player = tournament.getPlayer(playerId); if (player != null && !player.hasQuit()) { tournamentSessions.get(playerId).submitDeck(deck); - ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getName() + " has submitted his tournament deck", MessageColor.BLACK, true, MessageType.STATUS, SoundToPlay.PlayerSubmittedDeck); + ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getLogName() + " has submitted his tournament deck", MessageColor.BLACK, true, MessageType.STATUS, SoundToPlay.PlayerSubmittedDeck); } } } @@ -380,7 +380,7 @@ public class TournamentController { tournamentPlayer.setQuit(info); tournament.quit(playerId); tournamentSession.quit(); - ChatManager.getInstance().broadcast(chatId, "", tournamentPlayer.getPlayer().getName() + " has quit the tournament", MessageColor.BLACK, true, MessageType.STATUS, SoundToPlay.PlayerQuitTournament); + ChatManager.getInstance().broadcast(chatId, "", tournamentPlayer.getPlayer().getLogName() + " has quit the tournament", MessageColor.BLACK, true, MessageType.STATUS, SoundToPlay.PlayerQuitTournament); } } @@ -407,7 +407,7 @@ public class TournamentController { user.removeTable(leavingPlayer.getPlayer().getId()); user.removeTournament(leavingPlayer.getPlayer().getId()); } - ChatManager.getInstance().broadcast(chatId, "", leavingPlayer.getPlayer().getName() + " was replaced by draftbot", MessageColor.BLACK, true, MessageType.STATUS); + ChatManager.getInstance().broadcast(chatId, "", leavingPlayer.getPlayer().getLogName() + " was replaced by draftbot", MessageColor.BLACK, true, MessageType.STATUS); } return true; } diff --git a/Mage.Sets/src/mage/sets/alarareborn/ClovenCasting.java b/Mage.Sets/src/mage/sets/alarareborn/ClovenCasting.java index 7df3af24ec..9e04db2d82 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/ClovenCasting.java +++ b/Mage.Sets/src/mage/sets/alarareborn/ClovenCasting.java @@ -107,7 +107,7 @@ class ClovenCastingEffect extends OneShotEffect { if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } - game.informPlayers(player.getName() + " copies " + activateMessage); + game.informPlayers(player.getLogName() + " copies " + activateMessage); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/alarareborn/EnigmaSphinx.java b/Mage.Sets/src/mage/sets/alarareborn/EnigmaSphinx.java index 48d5400637..819fd8fda9 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/EnigmaSphinx.java +++ b/Mage.Sets/src/mage/sets/alarareborn/EnigmaSphinx.java @@ -148,7 +148,7 @@ class EnigmaSphinxEffect extends OneShotEffect { Player owner = game.getPlayer(card.getOwnerId()); if (owner != null && card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true)) { // Move Sphinx to third position - game.informPlayers(card.getName() + " is put into " + owner.getName() +"'s library third from the top"); + game.informPlayers(card.getLogName() + " is put into " + owner.getLogName() +"'s library third from the top"); Library lib = owner.getLibrary(); if (lib != null) { Card card1 = lib.removeFromTop(game); diff --git a/Mage.Sets/src/mage/sets/apocalypse/EnlistmentOfficer.java b/Mage.Sets/src/mage/sets/apocalypse/EnlistmentOfficer.java index 1e4cbf73ad..a3f6738cd1 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/EnlistmentOfficer.java +++ b/Mage.Sets/src/mage/sets/apocalypse/EnlistmentOfficer.java @@ -108,7 +108,7 @@ class EnlistmentOfficerEffect extends OneShotEffect { } Cards cards = new CardsImpl(); cards.addAll(controller.getLibrary().getTopCards(game, 4)); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); for (Card card: cards.getCards(game)) { if (filter.match(card, game)) { controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); diff --git a/Mage.Sets/src/mage/sets/apocalypse/GoblinRingleader.java b/Mage.Sets/src/mage/sets/apocalypse/GoblinRingleader.java index 20ff8370a0..895d492e28 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/GoblinRingleader.java +++ b/Mage.Sets/src/mage/sets/apocalypse/GoblinRingleader.java @@ -108,7 +108,7 @@ class GoblinRingleaderEffect extends OneShotEffect { } Cards cards = new CardsImpl(); cards.addAll(controller.getLibrary().getTopCards(game, 4)); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); for (Card card: cards.getCards(game)) { if (filter.match(card, game)) { controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); diff --git a/Mage.Sets/src/mage/sets/apocalypse/KavuHowler.java b/Mage.Sets/src/mage/sets/apocalypse/KavuHowler.java index 0fc658ffdd..c4374c797a 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/KavuHowler.java +++ b/Mage.Sets/src/mage/sets/apocalypse/KavuHowler.java @@ -106,7 +106,7 @@ class KavuHowlerEffect extends OneShotEffect { } Cards cards = new CardsImpl(); cards.addAll(controller.getLibrary().getTopCards(game, 4)); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); for (Card card: cards.getCards(game)) { if (filter.match(card, game)) { controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); diff --git a/Mage.Sets/src/mage/sets/apocalypse/Spiritmonger.java b/Mage.Sets/src/mage/sets/apocalypse/Spiritmonger.java index df2baf3098..19adbfc75f 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/Spiritmonger.java +++ b/Mage.Sets/src/mage/sets/apocalypse/Spiritmonger.java @@ -103,7 +103,7 @@ class SpiritmongerChangeColorEffect extends OneShotEffect { if (player != null && wildMongrel != null) { ChoiceColor colorChoice = new ChoiceColor(); if (player.choose(Outcome.Neutral, colorChoice, game)) { - game.informPlayers(wildMongrel.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); + game.informPlayers(wildMongrel.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice()); ContinuousEffect effect = new BecomesColorTargetEffect(colorChoice.getColor(), Duration.EndOfTurn, "is " + colorChoice.getChoice()); effect.setTargetPointer(new FixedTarget(source.getSourceId())); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/sets/apocalypse/SylvanMessenger.java b/Mage.Sets/src/mage/sets/apocalypse/SylvanMessenger.java index 4bab649352..06e255af14 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/SylvanMessenger.java +++ b/Mage.Sets/src/mage/sets/apocalypse/SylvanMessenger.java @@ -108,7 +108,7 @@ class SylvanMessengerEffect extends OneShotEffect { } Cards cards = new CardsImpl(); cards.addAll(controller.getLibrary().getTopCards(game, 4)); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); for (Card card: cards.getCards(game)) { if (filter.match(card, game)) { controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); diff --git a/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java b/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java index 71640c0deb..859098b82f 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java @@ -120,7 +120,7 @@ class CavernOfSoulsEffect extends OneShotEffect { return false; } } - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice()); game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice()); permanent.addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen type: " + typeChoice.getChoice()), game); } @@ -146,7 +146,7 @@ class CavernOfSoulsManaBuilder extends ConditionalManaBuilder { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (controller != null && sourceObject != null) { - game.informPlayers(controller.getName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() + + game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() + " (can only be spend to cast for creatures of type " + creatureType + " and that spell can't be countered)"); } return super.setMana(mana, source, game); diff --git a/Mage.Sets/src/mage/sets/avacynrestored/DescendantsPath.java b/Mage.Sets/src/mage/sets/avacynrestored/DescendantsPath.java index e2e38f88eb..4679052d6b 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/DescendantsPath.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/DescendantsPath.java @@ -114,7 +114,7 @@ class DescendantsPathEffect extends OneShotEffect { if (player.chooseUse(Outcome.Benefit, "Cast the card?", game)) { player.cast(card.getSpellAbility(), game, true); } else { - game.informPlayers("DescendantsPath: " + player.getName() + " canceled casting the card."); + game.informPlayers("DescendantsPath: " + player.getLogName() + " canceled casting the card."); player.getLibrary().putOnBottom(card, game); } } else { diff --git a/Mage.Sets/src/mage/sets/avacynrestored/DescentIntoMadness.java b/Mage.Sets/src/mage/sets/avacynrestored/DescentIntoMadness.java index 2ecdf10794..03137ec0c2 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/DescentIntoMadness.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/DescentIntoMadness.java @@ -180,7 +180,7 @@ class DescentIntoMadnessEffect extends OneShotEffect { Permanent chosen = game.getPermanent(targetId); if (chosen != null) { amount--; - game.informPlayers(player.getName() + " selects " + chosen.getLogName() + " from battlefield"); + game.informPlayers(player.getLogName() + " selects " + chosen.getLogName() + " from battlefield"); selectedObjects.add(targetId); } } @@ -213,7 +213,7 @@ class DescentIntoMadnessEffect extends OneShotEffect { } } if (cardsFromHand > 0) { - game.informPlayers(player.getName() + " selects " + cardsFromHand + (cardsFromHand == 1?" card":" cards") + " from his or her hand"); + game.informPlayers(player.getLogName() + " selects " + cardsFromHand + (cardsFromHand == 1?" card":" cards") + " from his or her hand"); } } } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/DivineDeflection.java b/Mage.Sets/src/mage/sets/avacynrestored/DivineDeflection.java index 8bdfdfe74d..2a19ea694b 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/DivineDeflection.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/DivineDeflection.java @@ -130,7 +130,7 @@ class DivineDeflectionPreventDamageTargetEffect extends PreventionEffectImpl { } Player player = game.getPlayer(dealDamageTo); if (player != null) { - game.informPlayers("Dealing " + prevented + " to " + player.getName() + " instead"); + game.informPlayers("Dealing " + prevented + " to " + player.getLogName() + " instead"); player.damage(prevented, source.getSourceId(), game, false, true); } } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/KillingWave.java b/Mage.Sets/src/mage/sets/avacynrestored/KillingWave.java index 260d356274..36b008df3e 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/KillingWave.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/KillingWave.java @@ -108,10 +108,10 @@ class KillingWaveEffect extends OneShotEffect { for (Permanent creature : creatures) { String message = "Pay " + amount + " life? If you don't, " + creature.getName() + " will be sacrificed."; if (playerLife - amount - lifePaid >= 0 && player != null && player.chooseUse(Outcome.Neutral, message, game)) { - game.informPlayers(player.getName() + " pays " + amount + " life. He will not sacrifice " + creature.getName()); + game.informPlayers(player.getLogName() + " pays " + amount + " life. He will not sacrifice " + creature.getName()); lifePaid += amount; } else { - game.informPlayers(player.getName() + " will sacrifice " + creature.getName()); + game.informPlayers(player.getLogName() + " will sacrifice " + creature.getName()); sacrifices.add(creature); } } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/RidersOfGavony.java b/Mage.Sets/src/mage/sets/avacynrestored/RidersOfGavony.java index fb1ffba09b..5080131283 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/RidersOfGavony.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/RidersOfGavony.java @@ -108,7 +108,7 @@ class RidersOfGavonyEffect extends OneShotEffect { } } if (typeChoice.getChoice() != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice()); game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice()); permanent.addInfo("chosen type", "Chosen type: " + typeChoice.getChoice().toString() + "", game); } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/VexingDevil.java b/Mage.Sets/src/mage/sets/avacynrestored/VexingDevil.java index b3a341f7ea..f5592e79af 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/VexingDevil.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/VexingDevil.java @@ -90,14 +90,14 @@ class VexingDevilEffect extends OneShotEffect { if (controller != null && permanent != null) { for (UUID opponentUuid : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(opponentUuid); - if (opponent != null && opponent.chooseUse(Outcome.LoseLife, "Make " + permanent.getName() + " deal 4 damage to you?", game)) { - game.informPlayers(opponent.getName() + " has chosen to receive 4 damage from " + permanent.getName()); + if (opponent != null && opponent.chooseUse(Outcome.LoseLife, "Make " + permanent.getLogName() + " deal 4 damage to you?", game)) { + game.informPlayers(opponent.getLogName() + " has chosen to receive 4 damage from " + permanent.getLogName()); opponent.damage(4, permanent.getId(), game, false, true); permanent.sacrifice(source.getSourceId(), game); return true; } } - game.informPlayers("4 damage wasn't dealt so " + permanent.getName() + " won't be sacrificed."); + game.informPlayers("4 damage wasn't dealt so " + permanent.getLogName() + " won't be sacrificed."); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java index 3126c106bf..0078099c73 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java @@ -88,7 +88,7 @@ public class AuraBarbs extends CardImpl { Player controller = game.getPlayer(permanent.getControllerId()); if (controller != null) { controller.damage(2, permanent.getId(), game, false, true); - game.informPlayers("2 damage assigned to " + controller.getName() + " from " + permanent.getName()); + game.informPlayers("2 damage assigned to " + controller.getLogName() + " from " + permanent.getName()); } } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MinamosMeddling.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MinamosMeddling.java index 64e066f576..bc639937d5 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MinamosMeddling.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MinamosMeddling.java @@ -99,7 +99,7 @@ class MinamosMeddlingCounterTargetEffect extends OneShotEffect { game.getStack().counter(targetId, source.getSourceId(), game); Player spellController = game.getPlayer(spell.getControllerId()); if (spellController != null) { - spellController.revealCards(sourceObject.getLogName(), spellController.getHand(), game); + spellController.revealCards(sourceObject.getName(), spellController.getHand(), game); Cards cardsToDiscard = new CardsImpl(); for (SpellAbility spellAbility : spell.getSpellAbilities()) { if (spellAbility.getSpellAbilityType().equals(SpellAbilityType.SPLICE)) { diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MistbladeShinobi.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MistbladeShinobi.java index 8a0a1c8542..37421d0a93 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MistbladeShinobi.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MistbladeShinobi.java @@ -99,7 +99,7 @@ class MistbladeShinobiTriggeredAbility extends TriggeredAbilityImpl { && event.getSourceId().equals(sourceId)) { Player opponent = game.getPlayer(event.getPlayerId()); if (opponent != null) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls"); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls"); filter.add(new ControllerIdPredicate(opponent.getId())); this.getTargets().clear(); this.addTarget(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/OpalEyeKondasYojimbo.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/OpalEyeKondasYojimbo.java index 41d4b62f08..b045c84b84 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/OpalEyeKondasYojimbo.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/OpalEyeKondasYojimbo.java @@ -140,7 +140,7 @@ class OpalEyeKondasYojimboRedirectionEffect extends ReplacementEffectImpl { else { Player targetPlayer = game.getPlayer(event.getTargetId()); if (targetPlayer != null) { - message.append(targetPlayer.getName()); + message.append(targetPlayer.getLogName()); } else { message.append("unknown"); diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/OrnateKanzashi.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/OrnateKanzashi.java index bc86c84277..e18a544749 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/OrnateKanzashi.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/OrnateKanzashi.java @@ -104,7 +104,7 @@ class OrnateKanzashiEffect extends OneShotEffect { Library library = opponent.getLibrary(); Card card = library.getFromTop(game); if (card != null) { - opponent.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, true); + opponent.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); ContinuousEffect effect = new OrnateKanzashiCastFromExileEffect(card.getId()); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/ShiningShoal.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/ShiningShoal.java index d150629642..1ec9d5c6a0 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/ShiningShoal.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/ShiningShoal.java @@ -149,7 +149,7 @@ class ShiningShoalPreventDamageTargetEffect extends PreventionEffectImpl { } Player player = game.getPlayer(redirectTo); if (player != null) { - game.informPlayers("Dealing " + prevented + " to " + player.getName() + " instead"); + game.informPlayers("Dealing " + prevented + " to " + player.getLogName() + " instead"); // keep the original source id as it is redirecting player.damage(prevented, event.getSourceId(), game, true, false, event.getAppliedEffects()); } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/Skullsnatcher.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/Skullsnatcher.java index dfab885d0b..afecc1ee78 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/Skullsnatcher.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/Skullsnatcher.java @@ -111,7 +111,7 @@ class SkullsnatcherTriggeredAbility extends TriggeredAbilityImpl { FilterCard filter = new FilterCard("up to two target cards from that player's graveyard"); filter.add(new OwnerIdPredicate(event.getPlayerId())); - filter.setMessage("up to two cards in " + game.getPlayer(event.getTargetId()).getName() + "'s graveyard"); + filter.setMessage("up to two cards in " + game.getPlayer(event.getTargetId()).getLogName() + "'s graveyard"); this.getTargets().clear(); this.addTarget(new TargetCardInOpponentsGraveyard(0,2,filter)); return true; diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/ThroatSlitter.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/ThroatSlitter.java index f19f9d5e95..68a1e0c9b6 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/ThroatSlitter.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/ThroatSlitter.java @@ -103,7 +103,7 @@ class ThroatSlitterTriggeredAbility extends TriggeredAbilityImpl { FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature that player controls"); filter.add(new ControllerIdPredicate(event.getPlayerId())); filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); - filter.setMessage("nonblack creature controlled by " + game.getPlayer(event.getTargetId()).getName()); + filter.setMessage("nonblack creature controlled by " + game.getPlayer(event.getTargetId()).getLogName()); this.getTargets().clear(); this.addTarget(new TargetPermanent(filter)); return true; diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/WardOfPiety.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/WardOfPiety.java index 0437207829..638675c31f 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/WardOfPiety.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/WardOfPiety.java @@ -119,7 +119,7 @@ class WardOfPietyPreventDamageTargetEffect extends PreventionEffectImpl { } Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); if (player != null) { - game.informPlayers("Dealing " + preventionData.getPreventedDamage() + " damage to " + player.getName() + " instead"); + game.informPlayers("Dealing " + preventionData.getPreventedDamage() + " damage to " + player.getLogName() + " instead"); // keep the original source id as it is redirecting player.damage(preventionData.getPreventedDamage(), event.getSourceId(), game, false, true); } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java b/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java index baec1ad1db..430a98e976 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java @@ -133,7 +133,7 @@ class AcolytesRewardEffect extends PreventionEffectImpl { Player targetPlayer = game.getPlayer(source.getTargets().get(1).getFirstTarget()); if (targetPlayer != null) { targetPlayer.damage(toPrevent, source.getSourceId(), game, false, true); - game.informPlayers(new StringBuilder("Acolyte's Reward ").append("deals ").append(toPrevent).append(" damage to ").append(targetPlayer.getName()).toString()); + game.informPlayers(new StringBuilder("Acolyte's Reward ").append("deals ").append(toPrevent).append(" damage to ").append(targetPlayer.getLogName()).toString()); } else { Permanent targetDamageCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (targetDamageCreature != null) { diff --git a/Mage.Sets/src/mage/sets/bornofthegods/BileBlight.java b/Mage.Sets/src/mage/sets/bornofthegods/BileBlight.java index c4452c57ac..e58018949a 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/BileBlight.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/BileBlight.java @@ -87,9 +87,9 @@ class BileBlightEffect extends BoostAllEffect { if (target.getName().isEmpty()) { // face down creature affectedObjectList.add(new MageObjectReference(target, game)); } else { - String name = target.getLogName(); + String name = target.getName(); for (Permanent perm : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { - if (perm.getLogName().equals(name)) { + if (perm.getName().equals(name)) { affectedObjectList.add(new MageObjectReference(perm, game)); } } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/PerplexingChimera.java b/Mage.Sets/src/mage/sets/bornofthegods/PerplexingChimera.java index 168aad1e10..44d4e5f70b 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/PerplexingChimera.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/PerplexingChimera.java @@ -179,7 +179,7 @@ class PerplexingChimeraControlExchangeEffect extends OneShotEffect { spell.setControllerId(controller.getId()); // and chooses new targets spell.chooseNewTargets(game, controller.getId()); - game.informPlayers(new StringBuilder(controller.getName()).append(" got control of ").append(spell.getName()).append(" spell.").toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" got control of ").append(spell.getName()).append(" spell.").toString()); // and spell controller get control of Perplexing Chimera if (spellCaster != null) { ContinuousEffect effect = new PerplexingChimeraControlEffect(); diff --git a/Mage.Sets/src/mage/sets/bornofthegods/SatyrFiredancer.java b/Mage.Sets/src/mage/sets/bornofthegods/SatyrFiredancer.java index 9f285c595f..ee73a251b4 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/SatyrFiredancer.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/SatyrFiredancer.java @@ -80,7 +80,7 @@ public class SatyrFiredancer extends CardImpl { if (ability instanceof SatyrFiredancerTriggeredAbility) { Player opponent = game.getPlayer(ability.getEffects().get(0).getTargetPointer().getFirst(game, ability)); if (opponent != null) { - FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature controlled by ").append(opponent.getName()).toString()); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature controlled by " + opponent.getLogName()); filter.add(new ControllerIdPredicate(opponent.getId())); ability.getTargets().add(new TargetCreaturePermanent(filter)); } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/SatyrWayfinder.java b/Mage.Sets/src/mage/sets/bornofthegods/SatyrWayfinder.java index 9ab83afe4c..b9f599d97a 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/SatyrWayfinder.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/SatyrWayfinder.java @@ -102,7 +102,7 @@ class SatyrWayfinderEffect extends OneShotEffect { cards.addAll(player.getLibrary().getTopCards(game, 4)); boolean properCardFound = cards.count(filterPutInHand, source.getControllerId(), source.getSourceId(), game) > 0; if (!cards.isEmpty()) { - player.revealCards(sourceObject.getLogName(), cards, game); + player.revealCards(sourceObject.getName(), cards, game); TargetCard target = new TargetCard(Zone.LIBRARY, filterPutInHand); if (properCardFound && player.chooseUse(outcome, "Put a land card into your hand?", game) && diff --git a/Mage.Sets/src/mage/sets/bornofthegods/WhimsOfTheFates.java b/Mage.Sets/src/mage/sets/bornofthegods/WhimsOfTheFates.java index 6333d9a778..4f288614b3 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/WhimsOfTheFates.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/WhimsOfTheFates.java @@ -139,7 +139,7 @@ class WhimsOfTheFateEffect extends OneShotEffect { } target.setRequired(false); currentPlayer.chooseTarget(outcome, target, source, game); - StringBuilder message = new StringBuilder(currentPlayer.getName()).append(" pile ").append(i).append(": "); + StringBuilder message = new StringBuilder(currentPlayer.getLogName()).append(" pile ").append(i).append(": "); if (target.getTargets().isEmpty()) { message.append(" (empty)"); } else { @@ -155,7 +155,7 @@ class WhimsOfTheFateEffect extends OneShotEffect { } // add all permanents not targeted yet to the third pile - StringBuilder message = new StringBuilder(currentPlayer.getName()).append(" pile 3: "); + StringBuilder message = new StringBuilder(currentPlayer.getLogName()).append(" pile 3: "); for (Permanent permanent : game.getState().getBattlefield().getAllActivePermanents(currentPlayer.getId())) { if (!playerPiles.get(1).contains(permanent.getId()) && !playerPiles.get(2).contains(permanent.getId())) { playerPiles.get(3).add(permanent.getId()); @@ -175,7 +175,7 @@ class WhimsOfTheFateEffect extends OneShotEffect { if (player != null) { // decide which pile to sacrifice int sacrificePile = rnd.nextInt(3) + 1; // random number from 1 - 3 - game.informPlayers(new StringBuilder(player.getName()).append(" sacrifices pile number ").append(sacrificePile).toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" sacrifices pile number ").append(sacrificePile).toString()); for (UUID permanentId : playerPiles.getValue().get(sacrificePile)) { Permanent permanent = game.getPermanent(permanentId); if (permanent != null) { diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/CandlesGlow.java b/Mage.Sets/src/mage/sets/championsofkamigawa/CandlesGlow.java index f194316564..cdc8a85bb0 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/CandlesGlow.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/CandlesGlow.java @@ -119,7 +119,7 @@ class CandlesGlowPreventDamageTargetEffect extends PreventionEffectImpl { if (controller != null) { controller.gainLife(prevented, game); game.informPlayers(new StringBuilder("Candles' Glow: Prevented ").append(prevented).append(" damage ").toString()); - game.informPlayers(new StringBuilder("Candles' Glow: ").append(controller.getName()).append(" gained ").append(prevented).append("life").toString()); + game.informPlayers(new StringBuilder("Candles' Glow: ").append(controller.getLogName()).append(" gained ").append(prevented).append("life").toString()); } } } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/CranialExtraction.java b/Mage.Sets/src/mage/sets/championsofkamigawa/CranialExtraction.java index 0824c85c6f..631678c7a1 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/CranialExtraction.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/CranialExtraction.java @@ -118,8 +118,8 @@ class CranialExtractionEffect extends OneShotEffect { controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true); } } - controller.lookAtCards(sourceObject.getLogName() + " Hand", player.getHand(), game); - controller.lookAtCards(sourceObject.getLogName() + " Library", new CardsImpl(Zone.PICK, player.getLibrary().getCards(game)), game); + controller.lookAtCards(sourceObject.getName() + " Hand", player.getHand(), game); + controller.lookAtCards(sourceObject.getName() + " Library", new CardsImpl(Zone.PICK, player.getLibrary().getCards(game)), game); player.shuffleLibrary(game); } return true; diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/Hinder.java b/Mage.Sets/src/mage/sets/championsofkamigawa/Hinder.java index b607d22bce..1400bb86b3 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/Hinder.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/Hinder.java @@ -172,7 +172,7 @@ class HinderReplacementEffect extends ReplacementEffectImpl { if (player != null) { boolean top = player.chooseUse(Outcome.Neutral, "Put " + card.getName() + " on top of the library? Otherwise it will be put on the bottom.", game); if (card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, top, event.getAppliedEffects())) { - game.informPlayers(player.getName() + " has put " + card.getName() + " on " + (top ? "top" : "the bottom") + " of the library."); + game.informPlayers(player.getLogName() + " has put " + card.getName() + " on " + (top ? "top" : "the bottom") + " of the library."); } return true; } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/NightDealings.java b/Mage.Sets/src/mage/sets/championsofkamigawa/NightDealings.java index 4dc321dea1..2a9ee7434d 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/NightDealings.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/NightDealings.java @@ -202,7 +202,7 @@ public class NightDealings extends CardImpl { name = sourceCard.getName(); } player.revealCards(name, cards, game); - game.informPlayers(player.getName() + " reveals " + card.getName()); + game.informPlayers(player.getLogName() + " reveals " + card.getName()); } player.shuffleLibrary(game); return true; diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/ReverseTheSands.java b/Mage.Sets/src/mage/sets/championsofkamigawa/ReverseTheSands.java index c75963b94f..0df4894351 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/ReverseTheSands.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/ReverseTheSands.java @@ -92,7 +92,7 @@ class ReverseTheSandsEffect extends OneShotEffect { for (UUID playerId : controller.getInRange()) { Player player = game.getPlayer(playerId); if (player != null) { - choices.add(new StringBuilder(Integer.toString(player.getLife())).append(" life of ").append(player.getName()).toString()); + choices.add(new StringBuilder(Integer.toString(player.getLife())).append(" life of ").append(player.getLogName()).toString()); } } lifeChoice.setChoices(choices); @@ -101,7 +101,7 @@ class ReverseTheSandsEffect extends OneShotEffect { if (player != null) { String selectedChoice; if (choices.size() > 1) { - lifeChoice.setMessage("Which players life should get player " + player.getName()); + lifeChoice.setMessage("Which players life should get player " + player.getLogName()); controller.choose(Outcome.Detriment, lifeChoice, game); selectedChoice = lifeChoice.getChoice(); } else { @@ -113,7 +113,7 @@ class ReverseTheSandsEffect extends OneShotEffect { int life = Integer.parseInt(lifeString); player.setLife(life, game); choices.remove(selectedChoice); - game.informPlayers(new StringBuilder("Player ").append(player.getName()).append(" life set to ").append(life).toString()); + game.informPlayers(new StringBuilder("Player ").append(player.getLogName()).append(" life set to ").append(life).toString()); } } } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/ShimatsuTheBloodcloaked.java b/Mage.Sets/src/mage/sets/championsofkamigawa/ShimatsuTheBloodcloaked.java index 2c01f7d33c..49f139f263 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/ShimatsuTheBloodcloaked.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/ShimatsuTheBloodcloaked.java @@ -112,7 +112,7 @@ class ShimatsuTheBloodcloakedEffect extends ReplacementEffectImpl { controller.chooseTarget(Outcome.Detriment, target, source, game); if (target.getTargets().size() > 0) { int sacrificedCreatures = target.getTargets().size(); - game.informPlayers(new StringBuilder(controller.getName()).append(" sacrifices ").append(sacrificedCreatures).append(" creatures for ").append(creature.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" sacrifices ").append(sacrificedCreatures).append(" creatures for ").append(creature.getName()).toString()); for (UUID targetId: target.getTargets()) { Permanent targetCreature = game.getPermanent(targetId); if (targetCreature == null || !targetCreature.sacrifice(source.getSourceId(), game)) { diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/TideOfWar.java b/Mage.Sets/src/mage/sets/championsofkamigawa/TideOfWar.java index 4a9ff6ae69..9c4ed40f93 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/TideOfWar.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/TideOfWar.java @@ -148,7 +148,7 @@ class TideOfWarEffect extends OneShotEffect { creature.sacrifice(source.getSourceId(), game); Player player = game.getPlayer(creature.getControllerId()); if (player != null) { - game.informPlayers(new StringBuilder(player.getName()).append(" sacrifices ").append(creature.getName()).toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" sacrifices ").append(creature.getName()).toString()); } } } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/VassalsDuty.java b/Mage.Sets/src/mage/sets/championsofkamigawa/VassalsDuty.java index 06f277cbc7..ac0e847c64 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/VassalsDuty.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/VassalsDuty.java @@ -103,7 +103,7 @@ class VassalsDutyPreventDamageTargetEffect extends PreventionEffectImpl { UUID redirectTo = source.getControllerId(); Player player = game.getPlayer(redirectTo); if (player != null) { - game.informPlayers("Dealing " + preventionResult.getPreventedDamage() + " to " + player.getName() + " instead"); + game.informPlayers("Dealing " + preventionResult.getPreventedDamage() + " to " + player.getLogName() + " instead"); // keep the original source id as it is redirecting player.damage(preventionResult.getPreventedDamage(), event.getSourceId(), game, false, true); } diff --git a/Mage.Sets/src/mage/sets/commander/AllianceOfArms.java b/Mage.Sets/src/mage/sets/commander/AllianceOfArms.java index 4f5a877ab4..93db52dfce 100644 --- a/Mage.Sets/src/mage/sets/commander/AllianceOfArms.java +++ b/Mage.Sets/src/mage/sets/commander/AllianceOfArms.java @@ -127,7 +127,7 @@ class AllianceOfArmsEffect extends OneShotEffect { payed = true; } } - game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString()); return xValue; } } diff --git a/Mage.Sets/src/mage/sets/commander/ChorusOfTheConclave.java b/Mage.Sets/src/mage/sets/commander/ChorusOfTheConclave.java index 9eb88e564d..fc8e0235a8 100644 --- a/Mage.Sets/src/mage/sets/commander/ChorusOfTheConclave.java +++ b/Mage.Sets/src/mage/sets/commander/ChorusOfTheConclave.java @@ -157,7 +157,7 @@ class ChorusOfTheConclaveReplacementEffect extends ReplacementEffectImpl { payed = true; } } - game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString()); return xValue; } diff --git a/Mage.Sets/src/mage/sets/commander/CollectiveVoyage.java b/Mage.Sets/src/mage/sets/commander/CollectiveVoyage.java index 347b9fb81e..5a96e72447 100644 --- a/Mage.Sets/src/mage/sets/commander/CollectiveVoyage.java +++ b/Mage.Sets/src/mage/sets/commander/CollectiveVoyage.java @@ -136,7 +136,7 @@ class CollectiveVoyageEffect extends OneShotEffect { payed = true; } } - game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString()); return xValue; } } diff --git a/Mage.Sets/src/mage/sets/commander/HydraOmnivore.java b/Mage.Sets/src/mage/sets/commander/HydraOmnivore.java index e76f8d4e83..8774003097 100644 --- a/Mage.Sets/src/mage/sets/commander/HydraOmnivore.java +++ b/Mage.Sets/src/mage/sets/commander/HydraOmnivore.java @@ -96,7 +96,7 @@ class HydraOmnivoreEffect extends OneShotEffect { Player opponent = game.getPlayer(playerId); if (opponent != null) { int dealtDamage = opponent.damage(amount, source.getSourceId(), game, false, true); - game.informPlayers(new StringBuilder(object.getName()).append(" deals ").append(dealtDamage).append(" damage to ").append(opponent.getName()).toString()); + game.informPlayers(object.getLogName() + " deals " + dealtDamage + " damage to " + opponent.getLogName()); } } } diff --git a/Mage.Sets/src/mage/sets/commander/ManaChargedDragon.java b/Mage.Sets/src/mage/sets/commander/ManaChargedDragon.java index 0ae2681fd2..116b0b82e4 100644 --- a/Mage.Sets/src/mage/sets/commander/ManaChargedDragon.java +++ b/Mage.Sets/src/mage/sets/commander/ManaChargedDragon.java @@ -105,7 +105,7 @@ class ManaChargedDragonEffect extends OneShotEffect { payed = true; } } - game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString()); return xValue; } diff --git a/Mage.Sets/src/mage/sets/commander/MindsAglow.java b/Mage.Sets/src/mage/sets/commander/MindsAglow.java index 83d23a6836..142f665af3 100644 --- a/Mage.Sets/src/mage/sets/commander/MindsAglow.java +++ b/Mage.Sets/src/mage/sets/commander/MindsAglow.java @@ -125,7 +125,7 @@ class MindsAglowEffect extends OneShotEffect { payed = true; } } - game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString()); return xValue; } } diff --git a/Mage.Sets/src/mage/sets/commander/RikuOfTwoReflections.java b/Mage.Sets/src/mage/sets/commander/RikuOfTwoReflections.java index ec60a7d42e..e975b2db45 100644 --- a/Mage.Sets/src/mage/sets/commander/RikuOfTwoReflections.java +++ b/Mage.Sets/src/mage/sets/commander/RikuOfTwoReflections.java @@ -128,7 +128,7 @@ class RikuOfTwoReflectionsCopyEffect extends OneShotEffect { if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } - game.informPlayers(player.getName() + " copies " + activateMessage); + game.informPlayers(player.getLogName() + " copies " + activateMessage); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/commander/SewerNemesis.java b/Mage.Sets/src/mage/sets/commander/SewerNemesis.java index 7afb81dbaa..e26bc7fbdc 100644 --- a/Mage.Sets/src/mage/sets/commander/SewerNemesis.java +++ b/Mage.Sets/src/mage/sets/commander/SewerNemesis.java @@ -107,7 +107,7 @@ class SewerNemesisChoosePlayerEffect extends OneShotEffect { if (player.choose(this.outcome, target, source.getSourceId(), game)) { Player chosenPlayer = game.getPlayer(target.getFirstTarget()); if (chosenPlayer != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName()); game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget()); return true; } diff --git a/Mage.Sets/src/mage/sets/commander/SharedTrauma.java b/Mage.Sets/src/mage/sets/commander/SharedTrauma.java index 7eb80a3f40..baebd28888 100644 --- a/Mage.Sets/src/mage/sets/commander/SharedTrauma.java +++ b/Mage.Sets/src/mage/sets/commander/SharedTrauma.java @@ -126,7 +126,7 @@ class SharedTraumaEffect extends OneShotEffect { payed = true; } } - game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString()); return xValue; } } diff --git a/Mage.Sets/src/mage/sets/commander/SpellCrumple.java b/Mage.Sets/src/mage/sets/commander/SpellCrumple.java index 8672d70ff5..1541a3e34e 100644 --- a/Mage.Sets/src/mage/sets/commander/SpellCrumple.java +++ b/Mage.Sets/src/mage/sets/commander/SpellCrumple.java @@ -173,7 +173,7 @@ class SpellCrumpleReplacementEffect extends ReplacementEffectImpl { if (card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false, event.getAppliedEffects())) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - game.informPlayers(controller.getName() + " has put " + card.getName() + " on the bottom of the library."); + game.informPlayers(controller.getLogName() + " has put " + card.getName() + " on the bottom of the library."); } return true; } diff --git a/Mage.Sets/src/mage/sets/commander/Stranglehold.java b/Mage.Sets/src/mage/sets/commander/Stranglehold.java index 90c8b91ead..d62ba85345 100644 --- a/Mage.Sets/src/mage/sets/commander/Stranglehold.java +++ b/Mage.Sets/src/mage/sets/commander/Stranglehold.java @@ -138,7 +138,7 @@ class StrangleholdSkipExtraTurnsEffect extends ReplacementEffectImpl { Player player = game.getPlayer(event.getPlayerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null && sourceObject != null) { - game.informPlayers(sourceObject.getLogName() + ": Extra turn of " + player.getName() + " skipped"); + game.informPlayers(sourceObject.getLogName() + ": Extra turn of " + player.getLogName() + " skipped"); } return true; } diff --git a/Mage.Sets/src/mage/sets/commander2013/EyeOfDoom.java b/Mage.Sets/src/mage/sets/commander2013/EyeOfDoom.java index 219ad9c8d1..9483679697 100644 --- a/Mage.Sets/src/mage/sets/commander2013/EyeOfDoom.java +++ b/Mage.Sets/src/mage/sets/commander2013/EyeOfDoom.java @@ -117,7 +117,7 @@ class EyeOfDoomEffect extends OneShotEffect { Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { permanents.add(permanent); - game.informPlayers((new StringBuilder(player.getName()).append(" chooses ").append(permanent.getName()).toString())); + game.informPlayers((new StringBuilder(player.getLogName()).append(" chooses ").append(permanent.getName()).toString())); } } player = playerList.getNext(game); diff --git a/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java b/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java index 79ca8fa153..c4fee52aee 100644 --- a/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java +++ b/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java @@ -29,6 +29,7 @@ package mage.sets.commander2013; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; @@ -101,7 +102,8 @@ class NayaSoulbeastCastEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { int cmc = 0; for (UUID playerId :controller.getInRange()) { Player player = game.getPlayer(playerId); @@ -109,13 +111,13 @@ class NayaSoulbeastCastEffect extends OneShotEffect { if (player.getLibrary().size() > 0) { Card card = player.getLibrary().getFromTop(game); cmc += card.getManaCost().convertedManaCost(); - player.revealCards(new StringBuilder("Naya Soulbeast (").append(player.getName()).append(")").toString(), new CardsImpl(card), game); + player.revealCards(sourceObject.getName() + " " + player.getName() + ")", new CardsImpl(card), game); } } } for (Effect effect : source.getEffects()) { if (effect instanceof NayaSoulbeastReplacementEffect) { - effect.setValue("NayaSoulbeastCounters", new Integer(cmc)); + effect.setValue("NayaSoulbeastCounters", cmc); } } return true; diff --git a/Mage.Sets/src/mage/sets/commander2013/OrderOfSuccession.java b/Mage.Sets/src/mage/sets/commander2013/OrderOfSuccession.java index b8c0b6e817..01a642e4c1 100644 --- a/Mage.Sets/src/mage/sets/commander2013/OrderOfSuccession.java +++ b/Mage.Sets/src/mage/sets/commander2013/OrderOfSuccession.java @@ -122,7 +122,7 @@ class OrderOfSuccessionEffect extends OneShotEffect { } // if player is in range he chooses a creature to control if (currentPlayer != null && controller.getInRange().contains(currentPlayer.getId())) { - FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature controlled by ").append(nextPlayer.getName()).toString()); + FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature controlled by ").append(nextPlayer.getLogName()).toString()); filter.add(new ControllerIdPredicate(nextPlayer.getId())); Target target = new TargetCreaturePermanent(filter); target.setNotTarget(false); @@ -143,7 +143,7 @@ class OrderOfSuccessionEffect extends OneShotEffect { ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, player.getId()); effect.setTargetPointer(new FixedTarget(creature.getId())); game.addEffect(effect, source); - game.informPlayers(new StringBuilder(player.getName()).append(" gains control of ").append(creature.getName()).toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" gains control of ").append(creature.getName()).toString()); } } } diff --git a/Mage.Sets/src/mage/sets/commander2013/Reincarnation.java b/Mage.Sets/src/mage/sets/commander2013/Reincarnation.java index 45dde8d09e..f467f3cfee 100644 --- a/Mage.Sets/src/mage/sets/commander2013/Reincarnation.java +++ b/Mage.Sets/src/mage/sets/commander2013/Reincarnation.java @@ -167,7 +167,7 @@ class ReincarnationDelayedEffect extends OneShotEffect { if (permanent != null && controller != null) { Player player = game.getPlayer(permanent.getOwnerId()); if (player != null) { - FilterCreatureCard filter = new FilterCreatureCard(new StringBuilder("a creature card from ").append(player.getName()).append("'s graveyard").toString()); + FilterCreatureCard filter = new FilterCreatureCard(new StringBuilder("a creature card from ").append(player.getLogName()).append("'s graveyard").toString()); filter.add(new OwnerIdPredicate(player.getId())); Target targetCreature = new TargetCardInGraveyard(filter); if (targetCreature.canChoose(source.getSourceId(), controller.getId(), game) diff --git a/Mage.Sets/src/mage/sets/commander2013/TemptWithGlory.java b/Mage.Sets/src/mage/sets/commander2013/TemptWithGlory.java index cd3a5ca013..fb2c038188 100644 --- a/Mage.Sets/src/mage/sets/commander2013/TemptWithGlory.java +++ b/Mage.Sets/src/mage/sets/commander2013/TemptWithGlory.java @@ -95,10 +95,10 @@ class TemptWithGloryEffect extends OneShotEffect { for (UUID playerId : game.getOpponents(controller.getId())) { Player opponent = game.getPlayer(playerId); if (opponent != null) { - if (opponent.chooseUse(outcome, new StringBuilder("Put a +1/+1 counter on each creature you control?").toString(), game)) { + if (opponent.chooseUse(outcome, "Put a +1/+1 counter on each creature you control?", game)) { opponentsAddedCounters++; addCounterToEachCreature(playerId, counter, game); - game.informPlayers(new StringBuilder(opponent.getName()).append(" added a +1/+1 counter on each of its creatures").toString()); + game.informPlayers(opponent.getLogName() + " added a +1/+1 counter on each of its creatures"); } } } diff --git a/Mage.Sets/src/mage/sets/commander2013/TemptWithReflections.java b/Mage.Sets/src/mage/sets/commander2013/TemptWithReflections.java index 7e9754483d..94dd73f30d 100644 --- a/Mage.Sets/src/mage/sets/commander2013/TemptWithReflections.java +++ b/Mage.Sets/src/mage/sets/commander2013/TemptWithReflections.java @@ -111,7 +111,7 @@ class TemptWithReflectionsEffect extends OneShotEffect { } else { decision = " won't copy "; } - game.informPlayers((new StringBuilder(player.getName()).append(decision).append(permanent.getName()).toString())); + game.informPlayers((new StringBuilder(player.getLogName()).append(decision).append(permanent.getName()).toString())); } player = playerList.getNext(game); } while (!player.getId().equals(game.getActivePlayerId())); diff --git a/Mage.Sets/src/mage/sets/commander2013/TrueNameNemesis.java b/Mage.Sets/src/mage/sets/commander2013/TrueNameNemesis.java index c7a8c34194..63ff5ea9ba 100644 --- a/Mage.Sets/src/mage/sets/commander2013/TrueNameNemesis.java +++ b/Mage.Sets/src/mage/sets/commander2013/TrueNameNemesis.java @@ -111,9 +111,9 @@ class TrueNameNemesisChoosePlayerEffect extends OneShotEffect { if (player.choose(this.outcome, target, source.getSourceId(), game)) { Player chosenPlayer = game.getPlayer(target.getFirstTarget()); if (chosenPlayer != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName()); game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget()); - permanent.addInfo("chosen player", "Chosen player: " + chosenPlayer.getName() + "", game); + permanent.addInfo("chosen player", "Chosen player: " + chosenPlayer.getLogName() + "", game); return true; } } diff --git a/Mage.Sets/src/mage/sets/commander2013/UnexpectedlyAbsent.java b/Mage.Sets/src/mage/sets/commander2013/UnexpectedlyAbsent.java index 888921c95e..e192668f0b 100644 --- a/Mage.Sets/src/mage/sets/commander2013/UnexpectedlyAbsent.java +++ b/Mage.Sets/src/mage/sets/commander2013/UnexpectedlyAbsent.java @@ -117,10 +117,10 @@ class UnexpectedlyAbsentEffect extends OneShotEffect { cardIds.push(card.getId()); } // return cards back to library - game.informPlayers(new StringBuilder(controller.getName()) + game.informPlayers(new StringBuilder(controller.getLogName()) .append(" puts ").append(permanent.getName()) .append(" beneath the top ").append(xValue) - .append(" cards of ").append(owner.getName()).append("'s library").toString()); + .append(" cards of ").append(owner.getLogName()).append("'s library").toString()); permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); while(!cardIds.isEmpty()) { UUID cardId = cardIds.poll(); diff --git a/Mage.Sets/src/mage/sets/commander2013/WellOfLostDreams.java b/Mage.Sets/src/mage/sets/commander2013/WellOfLostDreams.java index fe9753c815..7035616728 100644 --- a/Mage.Sets/src/mage/sets/commander2013/WellOfLostDreams.java +++ b/Mage.Sets/src/mage/sets/commander2013/WellOfLostDreams.java @@ -88,7 +88,7 @@ class WellOfLostDreamsEffect extends OneShotEffect { int xValue = controller.announceXMana(0, amount, "Announce X Value", game, source); if (xValue > 0) { if (new GenericManaCost(xValue).pay(source, game, source.getSourceId(), controller.getId(), false)) { - game.informPlayers(new StringBuilder(controller.getName()).append(" payed {").append(xValue).append("}").toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" payed {").append(xValue).append("}").toString()); controller.drawCards(xValue, game); } else { return false; diff --git a/Mage.Sets/src/mage/sets/commander2014/AssaultSuit.java b/Mage.Sets/src/mage/sets/commander2014/AssaultSuit.java index 78844178e3..42d7ff1ed9 100644 --- a/Mage.Sets/src/mage/sets/commander2014/AssaultSuit.java +++ b/Mage.Sets/src/mage/sets/commander2014/AssaultSuit.java @@ -160,7 +160,7 @@ class AssaultSuitGainControlEffect extends OneShotEffect { if (equipment.getAttachedTo() != null) { Permanent equippedCreature = game.getPermanent(equipment.getAttachedTo()); if (equippedCreature != null && controller.chooseUse(outcome, - "Let have " + activePlayer.getName() + " gain control of " + equippedCreature.getLogName() + "?", game)) { + "Let have " + activePlayer.getLogName() + " gain control of " + equippedCreature.getLogName() + "?", game)) { equippedCreature.untap(game); ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn, activePlayer.getId()); effect.setTargetPointer(new FixedTarget(equipment.getAttachedTo())); diff --git a/Mage.Sets/src/mage/sets/commander2014/BitterFeud.java b/Mage.Sets/src/mage/sets/commander2014/BitterFeud.java index 7e9579dbc6..19a6e12f6c 100644 --- a/Mage.Sets/src/mage/sets/commander2014/BitterFeud.java +++ b/Mage.Sets/src/mage/sets/commander2014/BitterFeud.java @@ -102,7 +102,7 @@ class BitterFeudEntersBattlefieldEffect extends OneShotEffect { if (player1 != null && player2 != null) { game.getState().setValue(source.getSourceId() + "_player1", player1); game.getState().setValue(source.getSourceId() + "_player2", player2); - game.informPlayers(permanent.getName() + ": " + controller.getName() + " has chosen " + player1.getName() + " and " + player2.getName()); + game.informPlayers(permanent.getLogName() + ": " + controller.getLogName() + " has chosen " + player1.getLogName() + " and " + player2.getLogName()); permanent.addInfo("chosen players", "Chosen players: " + player1.getName() +", " + player2.getName() + "", game); return true; } diff --git a/Mage.Sets/src/mage/sets/commander2014/GraveSifter.java b/Mage.Sets/src/mage/sets/commander2014/GraveSifter.java index 46ef31fe5a..e74d7aa910 100644 --- a/Mage.Sets/src/mage/sets/commander2014/GraveSifter.java +++ b/Mage.Sets/src/mage/sets/commander2014/GraveSifter.java @@ -107,7 +107,7 @@ class GraveSifterEffect extends OneShotEffect { if (player != null) { typeChoice.clearChoice(); if (player.choose(outcome, typeChoice, game)) { - game.informPlayers(player.getName() + " has chosen: " + typeChoice.getChoice()); + game.informPlayers(player.getLogName() + " has chosen: " + typeChoice.getChoice()); FilterCard filter = new FilterCreatureCard("creature cards with creature type " + typeChoice.getChoice()+ " from your graveyard"); filter.add(new SubtypePredicate(typeChoice.getChoice())); Target target = new TargetCardInYourGraveyard(0,Integer.MAX_VALUE, filter); diff --git a/Mage.Sets/src/mage/sets/commander2014/MaliciousAffliction.java b/Mage.Sets/src/mage/sets/commander2014/MaliciousAffliction.java index 424debd887..1506d29276 100644 --- a/Mage.Sets/src/mage/sets/commander2014/MaliciousAffliction.java +++ b/Mage.Sets/src/mage/sets/commander2014/MaliciousAffliction.java @@ -122,7 +122,7 @@ class CopySourceSpellEffect extends OneShotEffect { if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } - game.informPlayers(controller.getName() + " copies " + activateMessage); + game.informPlayers(controller.getLogName() + " copies " + activateMessage); return true; } } diff --git a/Mage.Sets/src/mage/sets/commander2014/VolcanicOffering.java b/Mage.Sets/src/mage/sets/commander2014/VolcanicOffering.java index fb93b23fb8..fc298fa5d8 100644 --- a/Mage.Sets/src/mage/sets/commander2014/VolcanicOffering.java +++ b/Mage.Sets/src/mage/sets/commander2014/VolcanicOffering.java @@ -86,13 +86,13 @@ public class VolcanicOffering extends CardImpl { if (controller != null && (ability instanceof SpellAbility)) { ability.getTargets().clear(); ability.addTarget(new TargetPermanent(filterLand)); - FilterLandPermanent filterLandForOpponent = new FilterLandPermanent("nonbasic land not controlled by " + controller.getName()); + FilterLandPermanent filterLandForOpponent = new FilterLandPermanent("nonbasic land not controlled by " + controller.getLogName()); filterLandForOpponent.add(Predicates.not(new SupertypePredicate("Basic"))); filterLandForOpponent.add(Predicates.not(new ControllerIdPredicate(controller.getId()))); ability.addTarget(new TargetOpponentsChoicePermanent(filterLandForOpponent)); ability.addTarget(new TargetPermanent(filterCreature)); - FilterCreaturePermanent filterCreatureForOpponent = new FilterCreaturePermanent("creature not controlled by " + controller.getName()); + FilterCreaturePermanent filterCreatureForOpponent = new FilterCreaturePermanent("creature not controlled by " + controller.getLogName()); filterCreatureForOpponent.add(Predicates.not(new ControllerIdPredicate(controller.getId()))); ability.addTarget(new TargetOpponentsChoicePermanent(filterCreatureForOpponent)); } diff --git a/Mage.Sets/src/mage/sets/conflux/Nyxathid.java b/Mage.Sets/src/mage/sets/conflux/Nyxathid.java index 80d7090fec..a1b2505911 100644 --- a/Mage.Sets/src/mage/sets/conflux/Nyxathid.java +++ b/Mage.Sets/src/mage/sets/conflux/Nyxathid.java @@ -105,7 +105,7 @@ class ChooseOpponent extends OneShotEffect { if (player.choose(this.outcome, target, source.getSourceId(), game)) { Player chosenPlayer = game.getPlayer(target.getFirstTarget()); if (chosenPlayer != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName()); game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget()); return true; } diff --git a/Mage.Sets/src/mage/sets/conflux/SkywardEyeProphets.java b/Mage.Sets/src/mage/sets/conflux/SkywardEyeProphets.java index e61f5bc3e3..1981dc4c66 100644 --- a/Mage.Sets/src/mage/sets/conflux/SkywardEyeProphets.java +++ b/Mage.Sets/src/mage/sets/conflux/SkywardEyeProphets.java @@ -107,7 +107,7 @@ public class SkywardEyeProphets extends CardImpl { return false; } cards.add(card); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); if (card.getCardType().contains(CardType.LAND)) { return controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId()); } else { diff --git a/Mage.Sets/src/mage/sets/darkascension/HauntedFengraf.java b/Mage.Sets/src/mage/sets/darkascension/HauntedFengraf.java index 402eff44bb..0e48f13ce1 100644 --- a/Mage.Sets/src/mage/sets/darkascension/HauntedFengraf.java +++ b/Mage.Sets/src/mage/sets/darkascension/HauntedFengraf.java @@ -101,7 +101,7 @@ class HauntedFengrafEffect extends OneShotEffect { Random rnd = new Random(); Card card = cards[rnd.nextInt(cards.length)]; card.moveToZone(Zone.HAND, source.getSourceId(), game, true); - game.informPlayers(card.getName() + " returned to the hand of " + player.getName()); + game.informPlayers(card.getName() + " returned to the hand of " + player.getLogName()); return true; } } diff --git a/Mage.Sets/src/mage/sets/darkascension/IncreasingVengeance.java b/Mage.Sets/src/mage/sets/darkascension/IncreasingVengeance.java index b3336bae57..94e7334883 100644 --- a/Mage.Sets/src/mage/sets/darkascension/IncreasingVengeance.java +++ b/Mage.Sets/src/mage/sets/darkascension/IncreasingVengeance.java @@ -107,7 +107,7 @@ class IncreasingVengeanceEffect extends OneShotEffect { copy.setCopiedSpell(true); game.getStack().push(copy); copy.chooseNewTargets(game, source.getControllerId()); - game.informPlayers(new StringBuilder(controller.getName()).append(copy.getActivatedMessage(game)).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(copy.getActivatedMessage(game)).toString()); Spell sourceSpell = (Spell) game.getStack().getStackObject(source.getSourceId()); if (sourceSpell != null) { if (sourceSpell.getFromZone() == Zone.GRAVEYARD) { @@ -116,7 +116,7 @@ class IncreasingVengeanceEffect extends OneShotEffect { copy.setCopiedSpell(true); game.getStack().push(copy); copy.chooseNewTargets(game, source.getControllerId()); - game.informPlayers(new StringBuilder(controller.getName()).append(copy.getActivatedMessage(game)).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(copy.getActivatedMessage(game)).toString()); } } return true; diff --git a/Mage.Sets/src/mage/sets/darkascension/LostInTheWoods.java b/Mage.Sets/src/mage/sets/darkascension/LostInTheWoods.java index a7a9b10583..2e3990ee91 100644 --- a/Mage.Sets/src/mage/sets/darkascension/LostInTheWoods.java +++ b/Mage.Sets/src/mage/sets/darkascension/LostInTheWoods.java @@ -94,7 +94,7 @@ class LostInTheWoodsEffect extends OneShotEffect { Card card = controller.getLibrary().getFromTop(game); Cards cards = new CardsImpl(); cards.add(card); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); if (card != null) { if (card.getSubtype().contains("Forest")) { diff --git a/Mage.Sets/src/mage/sets/darkascension/SoulSeizer.java b/Mage.Sets/src/mage/sets/darkascension/SoulSeizer.java index 007b538237..4df41668b2 100644 --- a/Mage.Sets/src/mage/sets/darkascension/SoulSeizer.java +++ b/Mage.Sets/src/mage/sets/darkascension/SoulSeizer.java @@ -106,7 +106,7 @@ class SoulSeizerTriggeredAbility extends TriggeredAbilityImpl { if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())) { Player opponent = game.getPlayer(event.getPlayerId()); if (opponent != null) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls"); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls"); filter.add(new ControllerIdPredicate(opponent.getId())); this.getTargets().clear(); diff --git a/Mage.Sets/src/mage/sets/darksteel/SerumPowder.java b/Mage.Sets/src/mage/sets/darksteel/SerumPowder.java index 62c1ed537a..9df0425724 100644 --- a/Mage.Sets/src/mage/sets/darksteel/SerumPowder.java +++ b/Mage.Sets/src/mage/sets/darksteel/SerumPowder.java @@ -98,7 +98,7 @@ class SerumPowderReplaceEffect extends ReplacementEffectImpl { } controller.drawCards(cardsHand, game); } - game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getName()).append(" exiles hand and draws ").append(cardsHand).append(" card(s)").toString()); + game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getLogName()).append(" exiles hand and draws ").append(cardsHand).append(" card(s)").toString()); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/dissension/NovijenHeartOfProgress.java b/Mage.Sets/src/mage/sets/dissension/NovijenHeartOfProgress.java index cbc0dc7915..2b592312e3 100644 --- a/Mage.Sets/src/mage/sets/dissension/NovijenHeartOfProgress.java +++ b/Mage.Sets/src/mage/sets/dissension/NovijenHeartOfProgress.java @@ -99,7 +99,7 @@ class NovijenHeartOfProgressEffect extends OneShotEffect { for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) { if (permanent.getTurnsOnBattlefield() == 0) { permanent.addCounters(CounterType.P1P1.createInstance(), game); - game.informPlayers(sourceObject.getLogName()+ ": " + controller.getName() + " puts a +1/+1 counter on " + permanent.getLogName()); + game.informPlayers(sourceObject.getLogName()+ ": " + controller.getLogName() + " puts a +1/+1 counter on " + permanent.getLogName()); } } return true; diff --git a/Mage.Sets/src/mage/sets/dissension/ResearchDevelopment.java b/Mage.Sets/src/mage/sets/dissension/ResearchDevelopment.java index 70c9c67226..6862047730 100644 --- a/Mage.Sets/src/mage/sets/dissension/ResearchDevelopment.java +++ b/Mage.Sets/src/mage/sets/dissension/ResearchDevelopment.java @@ -146,7 +146,7 @@ class ResearchEffect extends OneShotEffect { } } - game.informPlayers(player.getName() + " has chosen " + count + " card(s) to shuffle into his or her library."); + game.informPlayers(player.getLogName() + " has chosen " + count + " card(s) to shuffle into his or her library."); if (count > 0) { player.shuffleLibrary(game); @@ -175,14 +175,13 @@ class DevelopmentEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); if (player != null) { for (int i = 0; i < 3; i++) { - StringBuilder sb = new StringBuilder(); - sb.append("Allow ").append(player.getName()).append(" to draw a card instead? (" + Integer.toString(i+1) + ")"); Set opponents = game.getOpponents(source.getControllerId()); boolean putToken = true; for (UUID opponentUuid : opponents) { Player opponent = game.getPlayer(opponentUuid); - if (opponent != null && opponent.chooseUse(Outcome.Detriment, sb.toString(), game)) { - game.informPlayers(opponent.getName() + " had chosen to let " + player.getName() + " draw a card."); + if (opponent != null && opponent.chooseUse(Outcome.Detriment, + "Allow " + player.getLogName() + " to draw a card instead? (" + Integer.toString(i+1) + ")", game)) { + game.informPlayers(opponent.getLogName() + " had chosen to let " + player.getLogName() + " draw a card."); player.drawCards(1, game); putToken = false; break; diff --git a/Mage.Sets/src/mage/sets/dissension/RiseFall.java b/Mage.Sets/src/mage/sets/dissension/RiseFall.java index e362408806..bfae999412 100644 --- a/Mage.Sets/src/mage/sets/dissension/RiseFall.java +++ b/Mage.Sets/src/mage/sets/dissension/RiseFall.java @@ -146,7 +146,7 @@ class FallEffect extends OneShotEffect { } while (cards.contains(card.getId())); cards.add(card); } - targetPlayer.revealCards(sourceObject.getLogName(), cards, game); + targetPlayer.revealCards(sourceObject.getName(), cards, game); for (Card cardToDiscard: cards.getCards(game)) { if (!cardToDiscard.getCardType().contains(CardType.LAND)) { targetPlayer.discard(cardToDiscard, source, game); diff --git a/Mage.Sets/src/mage/sets/dissension/UtopiaSprawl.java b/Mage.Sets/src/mage/sets/dissension/UtopiaSprawl.java index ea25502379..7a9a97db67 100644 --- a/Mage.Sets/src/mage/sets/dissension/UtopiaSprawl.java +++ b/Mage.Sets/src/mage/sets/dissension/UtopiaSprawl.java @@ -113,7 +113,7 @@ class ChooseColorEffect extends OneShotEffect { if (player != null && permanent != null) { ChoiceColor colorChoice = new ChoiceColor(); if (player.choose(Outcome.Neutral, colorChoice, game)) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor()); permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getColor().getDescription() + "", game); } diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/DeadbridgeChant.java b/Mage.Sets/src/mage/sets/dragonsmaze/DeadbridgeChant.java index 138f397219..be7459a316 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/DeadbridgeChant.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/DeadbridgeChant.java @@ -105,7 +105,7 @@ class DeadbridgeChantEffect extends OneShotEffect { text = " put onto battlefield for "; } card.moveToZone(targetZone, source.getSourceId(), game, false); - game.informPlayers(new StringBuilder("Deadbridge Chant: ").append(card.getName()).append(text).append(player.getName()).toString()); + game.informPlayers(new StringBuilder("Deadbridge Chant: ").append(card.getName()).append(text).append(player.getLogName()).toString()); return true; } } diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/MirkoVoskMindDrinker.java b/Mage.Sets/src/mage/sets/dragonsmaze/MirkoVoskMindDrinker.java index 9c552dc8d6..9168862caa 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/MirkoVoskMindDrinker.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/MirkoVoskMindDrinker.java @@ -117,7 +117,7 @@ class MirkoVoskMindDrinkerEffect extends OneShotEffect { } } } - player.revealCards(new StringBuilder("by ").append(sourceCard.getName()).append(" from ").append(player.getName()).toString(), cards, game); + player.revealCards("by " + sourceCard.getName() + " from " + player.getName(), cards, game); for(Card card : cards.getCards(game)){ if(card != null){ card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, false); diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/ReapIntellect.java b/Mage.Sets/src/mage/sets/dragonsmaze/ReapIntellect.java index 2395bbb2f6..606a53a3db 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/ReapIntellect.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/ReapIntellect.java @@ -105,7 +105,7 @@ class ReapIntellectEffect extends OneShotEffect { if (targetPlayer != null && sourceObject != null && controller != null) { // reveal hand of target player - targetPlayer.revealCards(sourceObject.getLogName(), targetPlayer.getHand(), game); + targetPlayer.revealCards(sourceObject.getName(), targetPlayer.getHand(), game); // Chose cards to exile from hand Cards exiledCards = new CardsImpl(); diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/GurmagDrowner.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/GurmagDrowner.java index 945c5e3721..438f200282 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/GurmagDrowner.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/GurmagDrowner.java @@ -103,7 +103,7 @@ class GurmagDrownerEffect extends OneShotEffect { cards.addAll(controller.getLibrary().getTopCards(game, 4)); if (cards.size() > 0) { - controller.lookAtCards(sourceObject.getLogName(), cards, game); + controller.lookAtCards(sourceObject.getName(), cards, game); TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put in your hand")); if (controller.choose(Outcome.Benefit, cards, target, game)) { diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/KeeperOfTheLens.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/KeeperOfTheLens.java index 635be0be72..25b4210c60 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/KeeperOfTheLens.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/KeeperOfTheLens.java @@ -134,9 +134,9 @@ class KeeperOfTheLensLookFaceDownEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.add(copyFaceDown); Player player = game.getPlayer(faceDownCreature.getControllerId()); - controller.lookAtCards("face down card - " + mageObject.getLogName(), cards, game); + controller.lookAtCards("face down card - " + mageObject.getName(), cards, game); if (player != null) { - game.informPlayers(controller.getName() + " looks at a face down creature of " + player.getName()); + game.informPlayers(controller.getLogName() + " looks at a face down creature of " + player.getLogName()); } } else { return false; diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/NarsetTranscendent.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/NarsetTranscendent.java index e7a888462b..39e70a117d 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/NarsetTranscendent.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/NarsetTranscendent.java @@ -119,11 +119,11 @@ class NarsetTranscendentEffect1 extends OneShotEffect { if (card != null) { CardsImpl cards = new CardsImpl(); cards.add(card); - controller.lookAtCards(sourceObject.getLogName(), cards, game); + controller.lookAtCards(sourceObject.getName(), cards, game); if (!card.getCardType().contains(CardType.CREATURE) && !card.getCardType().contains(CardType.LAND)) { if (controller.chooseUse(outcome, "Reveal " + card.getName() + " and put it into your hand?", game)) { controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); } } return true; diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java index a54250fd54..a057081e31 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java @@ -112,7 +112,7 @@ class RevealingWindEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.add(card); controller.lookAtCards(sourceObject.getName(), cards, game); - game.informPlayers(controller.getName() + " look at a face-down attacking creature"); + game.informPlayers(controller.getLogName() + " look at a face-down attacking creature"); } } } diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ShorecrasherElemental.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ShorecrasherElemental.java index e61983447f..05cd4d5675 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/ShorecrasherElemental.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ShorecrasherElemental.java @@ -109,7 +109,7 @@ class ShorecrasherElementalEffect extends OneShotEffect { if (shorecrasherElemental != null && sourceObject != null && new MageObjectReference(sourceObject, game).refersTo(shorecrasherElemental, game)) { - if (shorecrasherElemental.moveToExile(source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game)) { + if (shorecrasherElemental.moveToExile(source.getSourceId(), sourceObject.getName(), source.getSourceId(), game)) { Card card = game.getExile().getCard(source.getSourceId(), game); if (card != null) { game.addEffect(new BecomesFaceDownCreatureEffect(Duration.Custom, FaceDownType.MEGAMORPHED), source); diff --git a/Mage.Sets/src/mage/sets/elspethvstezzeret/EchoingTruth.java b/Mage.Sets/src/mage/sets/elspethvstezzeret/EchoingTruth.java index 9ce94a08f0..772509be82 100644 --- a/Mage.Sets/src/mage/sets/elspethvstezzeret/EchoingTruth.java +++ b/Mage.Sets/src/mage/sets/elspethvstezzeret/EchoingTruth.java @@ -96,7 +96,7 @@ class ReturnToHandAllNamedPermanentsEffect extends OneShotEffect { if (permanent.getName().isEmpty()) { filter.add(new PermanentIdPredicate(permanent.getId())); // if no name (face down creature) only the creature itself is selected } else { - filter.add(new NamePredicate(permanent.getLogName())); + filter.add(new NamePredicate(permanent.getName())); } for (Permanent perm: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { controller.moveCardToHandWithInfo(perm, source.getSourceId(), game, Zone.BATTLEFIELD); diff --git a/Mage.Sets/src/mage/sets/elvesvsgoblins/SkirkDrillSergeant.java b/Mage.Sets/src/mage/sets/elvesvsgoblins/SkirkDrillSergeant.java index 13a931a804..3215431858 100644 --- a/Mage.Sets/src/mage/sets/elvesvsgoblins/SkirkDrillSergeant.java +++ b/Mage.Sets/src/mage/sets/elvesvsgoblins/SkirkDrillSergeant.java @@ -119,7 +119,7 @@ class SkirkDrillSergeantEffect extends OneShotEffect { Card card = player.getLibrary().getFromTop(game); Cards cards = new CardsImpl(); cards.add(card); - player.revealCards(sourceObject.getLogName(), cards, game); + player.revealCards(sourceObject.getName(), cards, game); if (card != null) { if (filter.match(card, game)) { diff --git a/Mage.Sets/src/mage/sets/eventide/AshlingTheExtinguisher.java b/Mage.Sets/src/mage/sets/eventide/AshlingTheExtinguisher.java index 92a16f89a2..67825bacac 100644 --- a/Mage.Sets/src/mage/sets/eventide/AshlingTheExtinguisher.java +++ b/Mage.Sets/src/mage/sets/eventide/AshlingTheExtinguisher.java @@ -96,7 +96,7 @@ class AshlingTheExtinguisherTriggeredAbility extends TriggeredAbilityImpl { if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())) { Player opponent = game.getPlayer(event.getPlayerId()); if (opponent != null) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls"); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls"); filter.add(new ControllerIdPredicate(opponent.getId())); this.getTargets().clear(); diff --git a/Mage.Sets/src/mage/sets/eventide/CankerAbomination.java b/Mage.Sets/src/mage/sets/eventide/CankerAbomination.java index 4087cc293f..405401dedd 100644 --- a/Mage.Sets/src/mage/sets/eventide/CankerAbomination.java +++ b/Mage.Sets/src/mage/sets/eventide/CankerAbomination.java @@ -104,7 +104,7 @@ class CankerAbominationEffect extends OneShotEffect { if (player != null && CankerAbomination != null) { Player chosenPlayer = game.getPlayer(source.getFirstTarget()); if (chosenPlayer != null) { - game.informPlayers(CankerAbomination.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.informPlayers(CankerAbomination.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName()); int amount = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), chosenPlayer.getId(), game).size(); CankerAbomination.addCounters(CounterType.M1M1.createInstance(amount), game); return true; diff --git a/Mage.Sets/src/mage/sets/eventide/MirrorSheen.java b/Mage.Sets/src/mage/sets/eventide/MirrorSheen.java index e6af4f0bf4..c814d91768 100644 --- a/Mage.Sets/src/mage/sets/eventide/MirrorSheen.java +++ b/Mage.Sets/src/mage/sets/eventide/MirrorSheen.java @@ -111,7 +111,7 @@ class MirrorSheenEffect extends OneShotEffect { if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } - game.informPlayers(player.getName() + " copies " + activateMessage); + game.informPlayers(player.getLogName() + " copies " + activateMessage); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/eventide/NeedleSpecter.java b/Mage.Sets/src/mage/sets/eventide/NeedleSpecter.java index 60bc3a2bac..a492fdefcd 100644 --- a/Mage.Sets/src/mage/sets/eventide/NeedleSpecter.java +++ b/Mage.Sets/src/mage/sets/eventide/NeedleSpecter.java @@ -99,7 +99,7 @@ class NeedleSpecterEffect extends OneShotEffect { if (targetPlayer != null) { int damage = (Integer)getValue("damage"); targetPlayer.discard(damage, source, game); - game.informPlayers(targetPlayer.getName() + "discards " + damage + " card(s)"); + game.informPlayers(targetPlayer.getLogName() + "discards " + damage + " card(s)"); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/exodus/EntropicSpecter.java b/Mage.Sets/src/mage/sets/exodus/EntropicSpecter.java index b874880909..f11db9b01c 100644 --- a/Mage.Sets/src/mage/sets/exodus/EntropicSpecter.java +++ b/Mage.Sets/src/mage/sets/exodus/EntropicSpecter.java @@ -112,7 +112,7 @@ class ChooseOpponent extends OneShotEffect { if (player.choose(this.outcome, target, source.getSourceId(), game)) { Player chosenPlayer = game.getPlayer(target.getFirstTarget()); if (chosenPlayer != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName()); game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget()); return true; } diff --git a/Mage.Sets/src/mage/sets/exodus/SoltariVisionary.java b/Mage.Sets/src/mage/sets/exodus/SoltariVisionary.java index 0a17ab5364..d0e0283a89 100644 --- a/Mage.Sets/src/mage/sets/exodus/SoltariVisionary.java +++ b/Mage.Sets/src/mage/sets/exodus/SoltariVisionary.java @@ -99,7 +99,7 @@ class SoltariVisionaryTriggeredAbility extends TriggeredAbilityImpl { if (soltari != null && soltari.getId() == this.getSourceId()) { FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("enchantment that player controls."); filter.add(new ControllerIdPredicate(event.getPlayerId())); - filter.setMessage("enchantment controlled by " + game.getPlayer(event.getTargetId()).getName()); + filter.setMessage("enchantment controlled by " + game.getPlayer(event.getTargetId()).getLogName()); this.getTargets().clear(); this.addTarget(new TargetPermanent(filter)); return true; diff --git a/Mage.Sets/src/mage/sets/fatereforged/FriendlyFire.java b/Mage.Sets/src/mage/sets/fatereforged/FriendlyFire.java index 712d46860d..53b1b38643 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/FriendlyFire.java +++ b/Mage.Sets/src/mage/sets/fatereforged/FriendlyFire.java @@ -98,7 +98,7 @@ class FriendlyFireEffect extends OneShotEffect { Cards cards = new CardsImpl(); Card card = controllerOfTargetCreature.getHand().getRandom(game); cards.add(card); - controllerOfTargetCreature.revealCards(sourceObject.getLogName(), cards, game); + controllerOfTargetCreature.revealCards(sourceObject.getName(), cards, game); int damage = card.getManaCost().convertedManaCost(); targetCreature.damage(damage, source.getSourceId(), game, false, true); controllerOfTargetCreature.damage(damage, source.getSourceId(), game, false, true); diff --git a/Mage.Sets/src/mage/sets/fatereforged/GhastlyConscription.java b/Mage.Sets/src/mage/sets/fatereforged/GhastlyConscription.java index 1dbab9b2dc..333415da47 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/GhastlyConscription.java +++ b/Mage.Sets/src/mage/sets/fatereforged/GhastlyConscription.java @@ -101,7 +101,7 @@ class GhastlyConscriptionEffect extends OneShotEffect { controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true); } Collections.shuffle(cardsToManifest); - game.informPlayers(controller.getName() + " shuffles the face-down pile"); + game.informPlayers(controller.getLogName() + " shuffles the face-down pile"); Ability newSource = source.copy(); newSource.setWorksFaceDown(true); for (Card card: cardsToManifest) { @@ -115,7 +115,7 @@ class GhastlyConscriptionEffect extends OneShotEffect { MageObjectReference objectReference= new MageObjectReference(card.getId(), card.getZoneChangeCounter(game) +1, game); game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource); if (controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId(), false, true)) { - game.informPlayers(new StringBuilder(controller.getName()) + game.informPlayers(new StringBuilder(controller.getLogName()) .append(" puts facedown card from exile onto the battlefield").toString()); } } diff --git a/Mage.Sets/src/mage/sets/fatereforged/HumbleDefector.java b/Mage.Sets/src/mage/sets/fatereforged/HumbleDefector.java index d0837e25da..eea0386187 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/HumbleDefector.java +++ b/Mage.Sets/src/mage/sets/fatereforged/HumbleDefector.java @@ -107,7 +107,7 @@ class HumbleDefectorEffect extends OneShotEffect { if (targetOpponent != null && humbleDefector != null) { ContinuousEffect effect = new HumbleDefectorControlSourceEffect(); game.addEffect(effect, source); - game.informPlayers(humbleDefector.getName() + " is now controlled by " + targetOpponent.getName()); + game.informPlayers(humbleDefector.getName() + " is now controlled by " + targetOpponent.getLogName()); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/fatereforged/JeskaiInfiltrator.java b/Mage.Sets/src/mage/sets/fatereforged/JeskaiInfiltrator.java index c29ed4bc44..f0010e1d53 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/JeskaiInfiltrator.java +++ b/Mage.Sets/src/mage/sets/fatereforged/JeskaiInfiltrator.java @@ -136,7 +136,7 @@ class JeskaiInfiltratorEffect extends OneShotEffect { MageObjectReference objectReference= new MageObjectReference(card.getId(), card.getZoneChangeCounter(game) +1, game); game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource); if (player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId(), false, true)) { - game.informPlayers(new StringBuilder(player.getName()) + game.informPlayers(new StringBuilder(player.getLogName()) .append(" puts facedown card from exile onto the battlefield").toString()); } } diff --git a/Mage.Sets/src/mage/sets/fatereforged/RenownedWeaponsmith.java b/Mage.Sets/src/mage/sets/fatereforged/RenownedWeaponsmith.java index e25692eac7..1797c0979b 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/RenownedWeaponsmith.java +++ b/Mage.Sets/src/mage/sets/fatereforged/RenownedWeaponsmith.java @@ -149,7 +149,7 @@ class RenownedWeaponsmithEffect extends OneShotEffect { Card card = game.getCard(target.getFirstTarget()); Cards revealed = new CardsImpl(); revealed.add(card); - controller.revealCards(sourceObject.getLogName(), revealed, game); + controller.revealCards(sourceObject.getName(), revealed, game); controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); } } diff --git a/Mage.Sets/src/mage/sets/fatereforged/TasigurTheGoldenFang.java b/Mage.Sets/src/mage/sets/fatereforged/TasigurTheGoldenFang.java index 68dcc156a1..466312f6bc 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/TasigurTheGoldenFang.java +++ b/Mage.Sets/src/mage/sets/fatereforged/TasigurTheGoldenFang.java @@ -114,7 +114,7 @@ class TasigurTheGoldenFangEffect extends OneShotEffect { if (opponentId != null) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - FilterNonlandCard filter = new FilterNonlandCard("nonland card from " + controller.getName() + " graveyard"); + FilterNonlandCard filter = new FilterNonlandCard("nonland card from " + controller.getLogName() + " graveyard"); filter.add(new OwnerIdPredicate(controller.getId())); Target target = new TargetCardInGraveyard(filter); opponent.chooseTarget(outcome, target, source, game); diff --git a/Mage.Sets/src/mage/sets/fatereforged/WriteIntoBeing.java b/Mage.Sets/src/mage/sets/fatereforged/WriteIntoBeing.java index cc4f1058f7..06df7949b2 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/WriteIntoBeing.java +++ b/Mage.Sets/src/mage/sets/fatereforged/WriteIntoBeing.java @@ -92,7 +92,7 @@ class WriteIntoBeingEffect extends OneShotEffect { if (sourceObject != null && controller != null) { Cards cards = new CardsImpl(); cards.addAll(controller.getLibrary().getTopCards(game, 2)); - controller.lookAtCards(sourceObject.getLogName(), cards, game); + controller.lookAtCards(sourceObject.getName(), cards, game); Card cardToManifest = null; if (cards.size() > 1) { TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to manifest")); @@ -116,7 +116,7 @@ class WriteIntoBeingEffect extends OneShotEffect { cardToPutBack.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); position = "on bottom"; } - game.informPlayers(sourceObject.getLogName() + ": " + controller.getName() + " puts the other card " + position + " of his or her library"); + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " puts the other card " + position + " of his or her library"); } return true; } diff --git a/Mage.Sets/src/mage/sets/fifthdawn/PlungeIntoDarkness.java b/Mage.Sets/src/mage/sets/fifthdawn/PlungeIntoDarkness.java index a2a8ccab08..9e7d3e1620 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/PlungeIntoDarkness.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/PlungeIntoDarkness.java @@ -168,7 +168,7 @@ class PlungeIntoDarknessSearchEffect extends OneShotEffect { if (card != null) { cards.remove(card); card.moveToZone(Zone.HAND, source.getSourceId(), game, false); - game.informPlayers("Plunge into Darkness: " + player.getName() + " puts a card into his or her hand"); + game.informPlayers("Plunge into Darkness: " + player.getLogName() + " puts a card into his or her hand"); } } for (UUID cardId : cards) { diff --git a/Mage.Sets/src/mage/sets/fifthdawn/SummonersEgg.java b/Mage.Sets/src/mage/sets/fifthdawn/SummonersEgg.java index 1b6facb521..1fd2ea4f74 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/SummonersEgg.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/SummonersEgg.java @@ -97,7 +97,7 @@ class SummonersEggImprintEffect extends OneShotEffect { && controller.choose(Outcome.Benefit, controller.getHand(), target, game)) { Card card = controller.getHand().get(target.getFirstTarget(), game); if (card != null) { - controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getLogName() +" (Imprint)", source.getSourceId(), game, Zone.HAND, true); + controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getName() +" (Imprint)", source.getSourceId(), game, Zone.HAND, true); card.setFaceDown(true, game); Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { diff --git a/Mage.Sets/src/mage/sets/fifthedition/Juxtapose.java b/Mage.Sets/src/mage/sets/fifthedition/Juxtapose.java index b37c6bf841..15f44e2324 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/Juxtapose.java +++ b/Mage.Sets/src/mage/sets/fifthedition/Juxtapose.java @@ -138,8 +138,8 @@ class JuxtaposeEffect extends ContinuousEffectImpl { permanent1.changeControllerId(targetPlayer.getId(), game); permanent2.changeControllerId(you.getId(), game); - game.informPlayers(new StringBuilder(sourceObject != null ? sourceObject.getName() : "").append(": ").append(you.getName()) - .append(" and ").append(targetPlayer.getName()).append(" exchange control of ").append(permanent1.getName()) + game.informPlayers(new StringBuilder(sourceObject != null ? sourceObject.getLogName() : "").append(": ").append(you.getLogName()) + .append(" and ").append(targetPlayer.getLogName()).append(" exchange control of ").append(permanent1.getLogName()) .append(" and ").append(permanent2.getName()).toString()); } else { // discard if there are less than 2 permanents diff --git a/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java b/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java index 6beb7cf031..f5e96d16ab 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java +++ b/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java @@ -123,7 +123,7 @@ class SylvanLibraryEffect extends OneShotEffect { && controller.getLife() >= 4 && controller.chooseUse(outcome, new StringBuilder("Pay 4 life for ").append(card.getName()).append("? (Otherwise it's put on top of your library)").toString(), game)) { controller.loseLife(4, game); - game.informPlayers(new StringBuilder(controller.getName()).append(" pays 4 life to keep a card on hand").toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" pays 4 life to keep a card on hand").toString()); } else { cardsPutBack.add(card); } @@ -147,7 +147,7 @@ class SylvanLibraryEffect extends OneShotEffect { card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); } if (numberOfCardsToPutBack > 0) { - game.informPlayers(new StringBuilder(controller.getName()).append(" puts ").append(numberOfCardsToPutBack).append(" card(s) back to library").toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" puts ").append(numberOfCardsToPutBack).append(" card(s) back to library").toString()); } } } diff --git a/Mage.Sets/src/mage/sets/fifthedition/WindsOfChange.java b/Mage.Sets/src/mage/sets/fifthedition/WindsOfChange.java index e735d36e56..a5adc541a4 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/WindsOfChange.java +++ b/Mage.Sets/src/mage/sets/fifthedition/WindsOfChange.java @@ -94,7 +94,7 @@ class WindsOfChangeEffect extends OneShotEffect { player.removeFromHand(card, game); card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); } - game.informPlayers(player.getName() + " shuffles the cards from his or her hand into his or her library"); + game.informPlayers(player.getLogName() + " shuffles the cards from his or her hand into his or her library"); player.shuffleLibrary(game); player.drawCards(cardsHand, game); } diff --git a/Mage.Sets/src/mage/sets/fourthedition/TheRack.java b/Mage.Sets/src/mage/sets/fourthedition/TheRack.java index 08d2c16b51..d87b9cab0b 100644 --- a/Mage.Sets/src/mage/sets/fourthedition/TheRack.java +++ b/Mage.Sets/src/mage/sets/fourthedition/TheRack.java @@ -126,7 +126,7 @@ class ChooseOpponent extends OneShotEffect { if (player.choose(this.outcome, target, source.getSourceId(), game)) { Player chosenPlayer = game.getPlayer(target.getFirstTarget()); if (chosenPlayer != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName()); game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget()); return true; } diff --git a/Mage.Sets/src/mage/sets/futuresight/Delay.java b/Mage.Sets/src/mage/sets/futuresight/Delay.java index fdb9d364f1..bad6a96dfa 100644 --- a/Mage.Sets/src/mage/sets/futuresight/Delay.java +++ b/Mage.Sets/src/mage/sets/futuresight/Delay.java @@ -101,12 +101,12 @@ class DelayEffect extends OneShotEffect { if (card != null && effect.apply(game, source) && Zone.EXILED.equals(game.getState().getZone(card.getId()))) { boolean hasSuspend = card.getAbilities().containsClass(SuspendAbility.class); UUID exileId = SuspendAbility.getSuspendExileId(controller.getId(), game); - if (controller.moveCardToExileWithInfo(card, exileId, "Suspended cards of " + controller.getName(), source.getSourceId(), game, Zone.HAND, true)) { + if (controller.moveCardToExileWithInfo(card, exileId, "Suspended cards of " + controller.getLogName(), source.getSourceId(), game, Zone.HAND, true)) { card.addCounters(CounterType.TIME.createInstance(3), game); if (!hasSuspend) { game.addEffect(new GainSuspendEffect(new MageObjectReference(card, game)), source); } - game.informPlayers(controller.getName() + " suspends 3 - " + card.getName()); + game.informPlayers(controller.getLogName() + " suspends 3 - " + card.getName()); } } return true; diff --git a/Mage.Sets/src/mage/sets/gatecrash/AngelicSkirmisher.java b/Mage.Sets/src/mage/sets/gatecrash/AngelicSkirmisher.java index 40778ed130..e0a460c573 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/AngelicSkirmisher.java +++ b/Mage.Sets/src/mage/sets/gatecrash/AngelicSkirmisher.java @@ -126,7 +126,7 @@ class AngelicSkirmisherEffect extends OneShotEffect { game.addEffect(effect, source); game.informPlayers(new StringBuilder(sourcePermanent.getName()) .append(": ") - .append(controller.getName()) + .append(controller.getLogName()) .append(" has chosen ") .append(abilityChoice.getChoice().toLowerCase()).toString()); return true; diff --git a/Mage.Sets/src/mage/sets/gatecrash/BalustradeSpy.java b/Mage.Sets/src/mage/sets/gatecrash/BalustradeSpy.java index 6d5cda6300..7cb7f38bff 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/BalustradeSpy.java +++ b/Mage.Sets/src/mage/sets/gatecrash/BalustradeSpy.java @@ -115,7 +115,7 @@ class BalustradeSpyEffect extends OneShotEffect { } if (!cards.isEmpty()) { controller.moveCardsToGraveyardWithInfo(cards, source, game, Zone.LIBRARY); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); return true; } return true; diff --git a/Mage.Sets/src/mage/sets/gatecrash/BaneAlleyBroker.java b/Mage.Sets/src/mage/sets/gatecrash/BaneAlleyBroker.java index bff58c49db..a465546929 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/BaneAlleyBroker.java +++ b/Mage.Sets/src/mage/sets/gatecrash/BaneAlleyBroker.java @@ -146,7 +146,7 @@ class BaneAlleyBrokerDrawExileEffect extends OneShotEffect { Card card = game.getCard(target.getFirstTarget()); MageObject sourceObject = game.getObject(source.getSourceId()); if (card != null && sourceObject != null) { - if (card.moveToExile(CardUtil.getCardExileZoneId(game, source), new StringBuilder(sourceObject.getLogName()).toString(), source.getSourceId(), game)) { + if (card.moveToExile(CardUtil.getCardExileZoneId(game, source), new StringBuilder(sourceObject.getName()).toString(), source.getSourceId(), game)) { card.setFaceDown(true, game); return true; } @@ -258,7 +258,7 @@ class BaneAlleyBrokerLookAtCardEffect extends AsThoughEffectImpl { Cards cards = new CardsImpl(card); Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - controller.lookAtCards("Exiled with " + sourceObject.getLogName(), cards, game); + controller.lookAtCards("Exiled with " + sourceObject.getName(), cards, game); } } } diff --git a/Mage.Sets/src/mage/sets/gatecrash/DiluvianPrimordial.java b/Mage.Sets/src/mage/sets/gatecrash/DiluvianPrimordial.java index 8a251fee2f..1818195012 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/DiluvianPrimordial.java +++ b/Mage.Sets/src/mage/sets/gatecrash/DiluvianPrimordial.java @@ -84,7 +84,7 @@ public class DiluvianPrimordial extends CardImpl { for(UUID opponentId : game.getOpponents(ability.getControllerId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - FilterCard filter = new FilterCard(new StringBuilder("instant or sorcery card from ").append(opponent.getName()).append("'s graveyard").toString()); + FilterCard filter = new FilterCard("instant or sorcery card from " + opponent.getLogName() + "'s graveyard"); filter.add(new OwnerIdPredicate(opponentId)); filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT),new CardTypePredicate(CardType.SORCERY))); TargetCardInOpponentsGraveyard target = new TargetCardInOpponentsGraveyard(0,1, filter); diff --git a/Mage.Sets/src/mage/sets/gatecrash/DomriRade.java b/Mage.Sets/src/mage/sets/gatecrash/DomriRade.java index a88d2a4080..673dcad729 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/DomriRade.java +++ b/Mage.Sets/src/mage/sets/gatecrash/DomriRade.java @@ -124,11 +124,11 @@ class DomriRadeEffect1 extends OneShotEffect { if (card != null) { CardsImpl cards = new CardsImpl(); cards.add(card); - controller.lookAtCards(sourceObject.getLogName(), cards, game); + controller.lookAtCards(sourceObject.getName(), cards, game); if (card.getCardType().contains(CardType.CREATURE)) { if (controller.chooseUse(outcome, "Reveal " + card.getName() + " and put it into your hand?", game)) { controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); } } return true; diff --git a/Mage.Sets/src/mage/sets/gatecrash/DuskmantleSeer.java b/Mage.Sets/src/mage/sets/gatecrash/DuskmantleSeer.java index 028277c3e0..5b4eaa5851 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/DuskmantleSeer.java +++ b/Mage.Sets/src/mage/sets/gatecrash/DuskmantleSeer.java @@ -108,9 +108,8 @@ class DuskmantleSeerEffect extends OneShotEffect { if (card != null) { Cards cards = new CardsImpl(); cards.add(card); - player.revealCards(new StringBuilder(sourceCard.getName()).append(": Revealed by ").append(player.getName()).toString(), cards, game); - int lifeLost = player.loseLife(card.getManaCost().convertedManaCost(), game); - game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(player.getName()).append(" loses ").append(lifeLost).append(" life").toString()); + player.revealCards(sourceCard.getName() + ": Revealed by " + player.getName(), cards, game); + player.loseLife(card.getManaCost().convertedManaCost(), game); card.moveToZone(Zone.HAND, source.getSourceId(), game, true); } } diff --git a/Mage.Sets/src/mage/sets/gatecrash/IllusionistsBracers.java b/Mage.Sets/src/mage/sets/gatecrash/IllusionistsBracers.java index 6dfbb6a91b..ff3acf0236 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/IllusionistsBracers.java +++ b/Mage.Sets/src/mage/sets/gatecrash/IllusionistsBracers.java @@ -143,7 +143,7 @@ class CopyActivatedAbilityEffect extends OneShotEffect { } } } - game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getName()).append(" copied activated ability").toString()); + game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getLogName()).append(" copied activated ability").toString()); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/gatecrash/LuminatePrimordial.java b/Mage.Sets/src/mage/sets/gatecrash/LuminatePrimordial.java index 645e5adfef..8c918e51f3 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/LuminatePrimordial.java +++ b/Mage.Sets/src/mage/sets/gatecrash/LuminatePrimordial.java @@ -75,7 +75,7 @@ public class LuminatePrimordial extends CardImpl { for(UUID opponentId : game.getOpponents(ability.getControllerId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature from opponent ").append(opponent.getName()).toString()); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature from opponent " + opponent.getLogName()); filter.add(new ControllerIdPredicate(opponentId)); TargetCreaturePermanent target = new TargetCreaturePermanent(0,1, filter,false); ability.addTarget(target); diff --git a/Mage.Sets/src/mage/sets/gatecrash/MindGrind.java b/Mage.Sets/src/mage/sets/gatecrash/MindGrind.java index ddd579eebb..979427a83d 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/MindGrind.java +++ b/Mage.Sets/src/mage/sets/gatecrash/MindGrind.java @@ -118,7 +118,7 @@ class MindGrindEffect extends OneShotEffect { } } } - player.revealCards(new StringBuilder("by ").append(sourceCard.getName()).append(" from ").append(player.getName()).toString(), cards, game); + player.revealCards("by " + sourceCard.getName() + " from " + player.getName(), cards, game); for(Card card : cards.getCards(game)){ if(card != null){ card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, false); diff --git a/Mage.Sets/src/mage/sets/gatecrash/MoltenPrimordial.java b/Mage.Sets/src/mage/sets/gatecrash/MoltenPrimordial.java index ffdc04c482..ea24c63438 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/MoltenPrimordial.java +++ b/Mage.Sets/src/mage/sets/gatecrash/MoltenPrimordial.java @@ -80,7 +80,7 @@ public class MoltenPrimordial extends CardImpl { for(UUID opponentId : game.getOpponents(ability.getControllerId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature from opponent ").append(opponent.getName()).toString()); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature from opponent " + opponent.getLogName()); filter.add(new ControllerIdPredicate(opponentId)); TargetCreaturePermanent target = new TargetCreaturePermanent(0,1, filter,false); ability.addTarget(target); diff --git a/Mage.Sets/src/mage/sets/gatecrash/NightveilSpecter.java b/Mage.Sets/src/mage/sets/gatecrash/NightveilSpecter.java index 8f9ba1725b..e85489098f 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/NightveilSpecter.java +++ b/Mage.Sets/src/mage/sets/gatecrash/NightveilSpecter.java @@ -113,7 +113,7 @@ class NightveilSpecterExileEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); MageObject sourceObject = game.getObject(source.getSourceId()); if (card != null && sourceObject != null) { - player.moveCardToExileWithInfo(card, CardUtil.getCardExileZoneId(game, source), sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, true); + player.moveCardToExileWithInfo(card, CardUtil.getCardExileZoneId(game, source), sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/gatecrash/SepulchralPrimordial.java b/Mage.Sets/src/mage/sets/gatecrash/SepulchralPrimordial.java index b84365351f..03c8187374 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/SepulchralPrimordial.java +++ b/Mage.Sets/src/mage/sets/gatecrash/SepulchralPrimordial.java @@ -77,7 +77,7 @@ public class SepulchralPrimordial extends CardImpl { for(UUID opponentId : game.getOpponents(ability.getControllerId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - FilterCard filter = new FilterCreatureCard(new StringBuilder("creature card from ").append(opponent.getName()).append("'s graveyard").toString()); + FilterCard filter = new FilterCreatureCard("creature card from " + opponent.getLogName() + "'s graveyard"); filter.add(new OwnerIdPredicate(opponentId)); TargetCardInOpponentsGraveyard target = new TargetCardInOpponentsGraveyard(0,1, filter); ability.addTarget(target); diff --git a/Mage.Sets/src/mage/sets/gatecrash/SylvanPrimordial.java b/Mage.Sets/src/mage/sets/gatecrash/SylvanPrimordial.java index 5e00d6e6b7..2f39447078 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/SylvanPrimordial.java +++ b/Mage.Sets/src/mage/sets/gatecrash/SylvanPrimordial.java @@ -80,7 +80,7 @@ public class SylvanPrimordial extends CardImpl { for(UUID opponentId : game.getOpponents(ability.getControllerId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - FilterPermanent filter = new FilterPermanent(new StringBuilder("noncreature permanent from opponent ").append(opponent.getName()).toString()); + FilterPermanent filter = new FilterPermanent("noncreature permanent from opponent " + opponent.getLogName()); filter.add(new ControllerIdPredicate(opponentId)); filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); TargetPermanent target = new TargetPermanent(0,1, filter,false); diff --git a/Mage.Sets/src/mage/sets/gatecrash/ThrullParasite.java b/Mage.Sets/src/mage/sets/gatecrash/ThrullParasite.java index cedd7d7408..99c398e672 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/ThrullParasite.java +++ b/Mage.Sets/src/mage/sets/gatecrash/ThrullParasite.java @@ -149,7 +149,7 @@ class RemoveCounterTargetEffect extends OneShotEffect { permanent.getCounters().removeCounter(counterName); } result |= true; - game.informPlayers(new StringBuilder(controller.getName()).append(" removes a ").append(counterName).append(" counter from ").append(permanent.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" removes a ").append(counterName).append(" counter from ").append(permanent.getName()).toString()); } } } diff --git a/Mage.Sets/src/mage/sets/gatecrash/VizkopaConfessor.java b/Mage.Sets/src/mage/sets/gatecrash/VizkopaConfessor.java index 12762cb790..d16c7aa851 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/VizkopaConfessor.java +++ b/Mage.Sets/src/mage/sets/gatecrash/VizkopaConfessor.java @@ -108,7 +108,7 @@ class VizkopaConfessorEffect extends OneShotEffect { int payLife = controller.getAmount(0, controller.getLife(),"Pay how many life?", game); if (payLife > 0) { controller.loseLife(payLife, game); - game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getName()).append(" pays ").append(payLife).append(" life").toString()); + game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getLogName()).append(" pays ").append(payLife).append(" life").toString()); Cards cardsInHand = new CardsImpl(); cardsInHand.addAll(targetPlayer.getHand()); diff --git a/Mage.Sets/src/mage/sets/guildpact/Ghostway.java b/Mage.Sets/src/mage/sets/guildpact/Ghostway.java index 7615dbfb09..55bc13ccd3 100644 --- a/Mage.Sets/src/mage/sets/guildpact/Ghostway.java +++ b/Mage.Sets/src/mage/sets/guildpact/Ghostway.java @@ -98,7 +98,7 @@ class GhostwayEffect extends OneShotEffect { UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { if (creature != null) { - controller.moveCardToExileWithInfo(creature, exileId,sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); + controller.moveCardToExileWithInfo(creature, exileId,sourceObject.getName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); numberCreatures++; } } diff --git a/Mage.Sets/src/mage/sets/heroesvsmonsters/KavuPredator.java b/Mage.Sets/src/mage/sets/heroesvsmonsters/KavuPredator.java index 6e845420ad..630ffa24b1 100644 --- a/Mage.Sets/src/mage/sets/heroesvsmonsters/KavuPredator.java +++ b/Mage.Sets/src/mage/sets/heroesvsmonsters/KavuPredator.java @@ -130,7 +130,7 @@ class KavuPredatorEffect extends OneShotEffect { permanent.addCounters(CounterType.P1P1.createInstance(gainedLife.intValue()), game); Player player = game.getPlayer(source.getControllerId()); if (player != null) { - game.informPlayers(new StringBuilder(player.getName()).append(" puts ").append(gainedLife).append(" +1/+1 counter on ").append(permanent.getName()).toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" puts ").append(gainedLife).append(" +1/+1 counter on ").append(permanent.getName()).toString()); } } return true; diff --git a/Mage.Sets/src/mage/sets/innistrad/CaravanVigil.java b/Mage.Sets/src/mage/sets/innistrad/CaravanVigil.java index 99c5774763..9c45c44fd6 100644 --- a/Mage.Sets/src/mage/sets/innistrad/CaravanVigil.java +++ b/Mage.Sets/src/mage/sets/innistrad/CaravanVigil.java @@ -106,7 +106,7 @@ class CaravanVigilEffect extends OneShotEffect { } else { controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); } - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); } } controller.shuffleLibrary(game); diff --git a/Mage.Sets/src/mage/sets/innistrad/CharmbreakerDevils.java b/Mage.Sets/src/mage/sets/innistrad/CharmbreakerDevils.java index 9eff8e5f91..3c3cc65b8d 100644 --- a/Mage.Sets/src/mage/sets/innistrad/CharmbreakerDevils.java +++ b/Mage.Sets/src/mage/sets/innistrad/CharmbreakerDevils.java @@ -118,7 +118,7 @@ class CharmbreakerDevilsEffect extends OneShotEffect { Random rnd = new Random(); Card card = cards[rnd.nextInt(cards.length)]; card.moveToZone(Zone.HAND, source.getSourceId(), game, true); - game.informPlayers(new StringBuilder("Charmbreaker Devils: ").append(card.getName()).append(" returned to the hand of ").append(player.getName()).toString()); + game.informPlayers(new StringBuilder("Charmbreaker Devils: ").append(card.getName()).append(" returned to the hand of ").append(player.getLogName()).toString()); return true; } } diff --git a/Mage.Sets/src/mage/sets/innistrad/Ghoulraiser.java b/Mage.Sets/src/mage/sets/innistrad/Ghoulraiser.java index cd3ed6fa72..2b3eba2a76 100644 --- a/Mage.Sets/src/mage/sets/innistrad/Ghoulraiser.java +++ b/Mage.Sets/src/mage/sets/innistrad/Ghoulraiser.java @@ -100,7 +100,7 @@ class GhoulraiserEffect extends OneShotEffect { Random rnd = new Random(); Card card = cards[rnd.nextInt(cards.length)]; card.moveToZone(Zone.HAND, source.getSourceId(), game, true); - game.informPlayers(card.getName() + "returned to the hand of" + player.getName()); + game.informPlayers(card.getName() + "returned to the hand of" + player.getLogName()); return true; } } diff --git a/Mage.Sets/src/mage/sets/innistrad/MakeAWish.java b/Mage.Sets/src/mage/sets/innistrad/MakeAWish.java index 938cf58eae..887a7d1236 100644 --- a/Mage.Sets/src/mage/sets/innistrad/MakeAWish.java +++ b/Mage.Sets/src/mage/sets/innistrad/MakeAWish.java @@ -92,7 +92,7 @@ class MakeAWishEffect extends OneShotEffect { if (card != null) { card.moveToZone(Zone.HAND, source.getSourceId(), game, true); cards.remove(card); - game.informPlayers(card.getName() + " returned to the hand of " + player.getName()); + game.informPlayers(card.getName() + " returned to the hand of " + player.getLogName()); } } return true; diff --git a/Mage.Sets/src/mage/sets/innistrad/Mulch.java b/Mage.Sets/src/mage/sets/innistrad/Mulch.java index 5b20db2be0..ead8493f27 100644 --- a/Mage.Sets/src/mage/sets/innistrad/Mulch.java +++ b/Mage.Sets/src/mage/sets/innistrad/Mulch.java @@ -101,7 +101,7 @@ class MulchEffect extends OneShotEffect { controller.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); } } - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); } return true; } diff --git a/Mage.Sets/src/mage/sets/innistrad/WoodlandSleuth.java b/Mage.Sets/src/mage/sets/innistrad/WoodlandSleuth.java index 5790b816c6..52a0db5689 100644 --- a/Mage.Sets/src/mage/sets/innistrad/WoodlandSleuth.java +++ b/Mage.Sets/src/mage/sets/innistrad/WoodlandSleuth.java @@ -104,7 +104,7 @@ class WoodlandSleuthEffect extends OneShotEffect { Random rnd = new Random(); Card card = cards[rnd.nextInt(cards.length)]; card.moveToZone(Zone.HAND, source.getSourceId(), game, true); - game.informPlayers(card.getName() + " returned to the hand of " + player.getName()); + game.informPlayers(card.getName() + " returned to the hand of " + player.getLogName()); return true; } } diff --git a/Mage.Sets/src/mage/sets/invasion/DromarTheBanisher.java b/Mage.Sets/src/mage/sets/invasion/DromarTheBanisher.java index 697805916a..ebb9fb95f5 100644 --- a/Mage.Sets/src/mage/sets/invasion/DromarTheBanisher.java +++ b/Mage.Sets/src/mage/sets/invasion/DromarTheBanisher.java @@ -104,7 +104,7 @@ class DromarTheBanisherEffect extends OneShotEffect { ChoiceColor choice = new ChoiceColor(); player.choose(outcome, choice, game); if (choice.getColor() != null) { - game.informPlayers(new StringBuilder(player.getName()).append(" chooses ").append(choice.getColor()).toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" chooses ").append(choice.getColor()).toString()); FilterPermanent filter = new FilterPermanent(); filter.add(new ColorPredicate(choice.getColor())); new ReturnToHandFromBattlefieldAllEffect(filter).apply(game, source); diff --git a/Mage.Sets/src/mage/sets/invasion/FactOrFiction.java b/Mage.Sets/src/mage/sets/invasion/FactOrFiction.java index 82ad3e52e5..e3d50bdb29 100644 --- a/Mage.Sets/src/mage/sets/invasion/FactOrFiction.java +++ b/Mage.Sets/src/mage/sets/invasion/FactOrFiction.java @@ -99,7 +99,7 @@ class FactOrFictionEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.addAll(controller.getLibrary().getTopCards(game, 5)); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); Set opponents = game.getOpponents(source.getControllerId()); if (!opponents.isEmpty()) { diff --git a/Mage.Sets/src/mage/sets/invasion/RevivingVapors.java b/Mage.Sets/src/mage/sets/invasion/RevivingVapors.java index 39f116021e..aff5c131df 100644 --- a/Mage.Sets/src/mage/sets/invasion/RevivingVapors.java +++ b/Mage.Sets/src/mage/sets/invasion/RevivingVapors.java @@ -99,7 +99,7 @@ class RevivingVaporsEffect extends OneShotEffect { } if (!cards.isEmpty()) { - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); Card card = null; if (cards.size() == 1) { card = cards.getRandom(game); diff --git a/Mage.Sets/src/mage/sets/invasion/RithTheAwakener.java b/Mage.Sets/src/mage/sets/invasion/RithTheAwakener.java index c26cb6a0fc..52468a645e 100644 --- a/Mage.Sets/src/mage/sets/invasion/RithTheAwakener.java +++ b/Mage.Sets/src/mage/sets/invasion/RithTheAwakener.java @@ -107,7 +107,7 @@ class RithTheAwakenerEffect extends OneShotEffect { ChoiceColor choice = new ChoiceColor(); controller.choose(outcome, choice, game); if (choice.getColor() != null) { - game.informPlayers(new StringBuilder(controller.getName()).append(" chooses ").append(choice.getColor()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" chooses ").append(choice.getColor()).toString()); FilterPermanent filter = new FilterPermanent(); filter.add(new ColorPredicate(choice.getColor())); int cardsWithColor = game.getBattlefield().count(filter, source.getSourceId(), controller.getId(), game); diff --git a/Mage.Sets/src/mage/sets/invasion/TrevaTheRenewer.java b/Mage.Sets/src/mage/sets/invasion/TrevaTheRenewer.java index df2fd0bc08..c49cefa38b 100644 --- a/Mage.Sets/src/mage/sets/invasion/TrevaTheRenewer.java +++ b/Mage.Sets/src/mage/sets/invasion/TrevaTheRenewer.java @@ -101,7 +101,7 @@ class TrevaTheRenewerEffect extends OneShotEffect { ChoiceColor choice = new ChoiceColor(); controller.choose(outcome, choice, game); if (choice.getColor() != null) { - game.informPlayers(new StringBuilder(controller.getName()).append(" chooses ").append(choice.getColor()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" chooses ").append(choice.getColor()).toString()); FilterPermanent filter = new FilterPermanent(); filter.add(new ColorPredicate(choice.getColor())); int cardsWithColor = game.getBattlefield().count(filter, source.getSourceId(), controller.getId(), game); diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/AjaniMentorOfHeroes.java b/Mage.Sets/src/mage/sets/journeyintonyx/AjaniMentorOfHeroes.java index 4cb592bfb9..dbb7c67427 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/AjaniMentorOfHeroes.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/AjaniMentorOfHeroes.java @@ -128,7 +128,7 @@ class AjaniMentorOfHeroesAddCountersEffect extends OneShotEffect { Permanent permanent = game.getPermanent(target); if (permanent != null) { permanent.addCounters(CounterType.P1P1.createInstance(multiTarget.getTargetAmount(target)), game); - game.informPlayers(new StringBuilder(controller.getName()).append(" puts ").append(multiTarget.getTargetAmount(target)).append(" ").append(CounterType.P1P1.getName().toLowerCase()).append(" counter on ").append(permanent.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" puts ").append(multiTarget.getTargetAmount(target)).append(" ").append(CounterType.P1P1.getName().toLowerCase()).append(" counter on ").append(permanent.getName()).toString()); } } return true; diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/AthreosGodOfPassage.java b/Mage.Sets/src/mage/sets/journeyintonyx/AthreosGodOfPassage.java index 0e10b4c724..672ff9d126 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/AthreosGodOfPassage.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/AthreosGodOfPassage.java @@ -131,7 +131,7 @@ class AthreosGodOfPassageReturnEffect extends OneShotEffect { if (opponent != null) { Cost cost = new PayLifeCost(3); if (cost.canPay(source, source.getSourceId(), opponent.getId(), game) - && opponent.chooseUse(outcome, new StringBuilder("Pay 3 live to prevent that ").append(creature.getLogName()).append(" returns to ").append(controller.getName()).append("'s hand?").toString(), game)) { + && opponent.chooseUse(outcome, new StringBuilder("Pay 3 live to prevent that ").append(creature.getLogName()).append(" returns to ").append(controller.getLogName()).append("'s hand?").toString(), game)) { if (cost.pay(source, game, source.getSourceId(), opponent.getId(), false)) { paid = true; } diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/BrainMaggot.java b/Mage.Sets/src/mage/sets/journeyintonyx/BrainMaggot.java index b4f45c4e24..7f732a973f 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/BrainMaggot.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/BrainMaggot.java @@ -111,7 +111,7 @@ class BrainMaggotExileEffect extends OneShotEffect { Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (controller != null && opponent != null && sourcePermanent != null) { if (!opponent.getHand().isEmpty()) { - opponent.revealCards(sourcePermanent.getLogName(), opponent.getHand(), game); + opponent.revealCards(sourcePermanent.getName(), opponent.getHand(), game); FilterCard filter = new FilterNonlandCard("nonland card to exile"); TargetCard target = new TargetCard(Zone.HAND, filter); diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DakraMystic.java b/Mage.Sets/src/mage/sets/journeyintonyx/DakraMystic.java index 008ab701d1..b609ee7bb8 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/DakraMystic.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DakraMystic.java @@ -101,7 +101,7 @@ class DakraMysticEffect extends OneShotEffect { for(UUID playerId: controller.getInRange()) { Player player = game.getPlayer(playerId); if (player != null && player.getLibrary().size() > 0) { - player.revealCards(player.getName(), new CardsImpl(player.getLibrary().getFromTop(game)), game); + player.revealCards(player.getLogName(), new CardsImpl(player.getLibrary().getFromTop(game)), game); } } if (controller.chooseUse(outcome, "Put revealed cards into graveyard?", game)) { diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java b/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java index 1e0088195f..9b93ba4a78 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java @@ -100,7 +100,7 @@ class HallOfTriumphEffect extends OneShotEffect { } } if (colorChoice.getChoice() != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor()); permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getColor().getDescription() + "", game); } diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java b/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java index 92ff675aaf..75843aaaba 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java @@ -114,10 +114,10 @@ class QuarryColossusReturnLibraryEffect extends OneShotEffect { } // return cards back to library permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - game.informPlayers(new StringBuilder(controller.getName()) + game.informPlayers(new StringBuilder(controller.getLogName()) .append(" puts ").append(permanent.getName()) .append(" beneath the top ").append(xValue) - .append(" cards of ").append(owner.getName()).append("'s library").toString()); + .append(" cards of ").append(owner.getLogName()).append("'s library").toString()); while(!cardIds.isEmpty()) { UUID cardId = cardIds.poll(); Card card = cards.get(cardId, game); diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/SageOfHours.java b/Mage.Sets/src/mage/sets/journeyintonyx/SageOfHours.java index e66321a330..0222107dc6 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/SageOfHours.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/SageOfHours.java @@ -155,7 +155,7 @@ class SageOfHoursEffect extends OneShotEffect { game.getState().getTurnMods().add(new TurnMod(player.getId(), false)); } game.informPlayers(new StringBuilder("Removed ").append(countersRemoved) - .append(" +1/+1 counters: ").append(player.getName()).append(" takes ") + .append(" +1/+1 counters: ").append(player.getLogName()).append(" takes ") .append(CardUtil.numberToText(turns, "an")) .append(turns > 1 ? " extra turns ":" extra turn ") .append("after this one").toString()); diff --git a/Mage.Sets/src/mage/sets/judgment/Browbeat.java b/Mage.Sets/src/mage/sets/judgment/Browbeat.java index e3053c6080..cf1b55a36f 100644 --- a/Mage.Sets/src/mage/sets/judgment/Browbeat.java +++ b/Mage.Sets/src/mage/sets/judgment/Browbeat.java @@ -102,7 +102,7 @@ class BrowbeatDrawEffect extends OneShotEffect { if(player != null && player.chooseUse(Outcome.Detriment, "Have " + spell.getName() + " deal 5 damage to you?", game)){ drawCards = false; player.damage(5, source.getSourceId(), game, false, true); - game.informPlayers(player.getName() + " has " + spell.getName() + " deal 5 to him or her"); + game.informPlayers(player.getLogName() + " has " + spell.getName() + " deal 5 to him or her"); } } if (drawCards) { diff --git a/Mage.Sets/src/mage/sets/judgment/FlashOfInsight.java b/Mage.Sets/src/mage/sets/judgment/FlashOfInsight.java index 791d9473ed..9f9f8c89fb 100644 --- a/Mage.Sets/src/mage/sets/judgment/FlashOfInsight.java +++ b/Mage.Sets/src/mage/sets/judgment/FlashOfInsight.java @@ -130,14 +130,14 @@ class FlashOfInsightEffect extends OneShotEffect { if (card != null) { cards.remove(card); card.moveToZone(Zone.HAND, source.getSourceId(), game, false); - game.informPlayers(sourceObject.getName() + ": " + player.getName() + " puts a card into his or her hand"); + game.informPlayers(sourceObject.getName() + ": " + player.getLogName() + " puts a card into his or her hand"); } } target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library")); if (cards.size() > 0) { game.informPlayers(new StringBuilder(sourceObject.getName()).append(": ") - .append(player.getName()).append(" puts ") + .append(player.getLogName()).append(" puts ") .append(cards.size() == 1 ? "a":cards.size()) .append(" card").append(cards.size() > 1 ? "s":"") .append(" on the bottom of his or her library").toString()); diff --git a/Mage.Sets/src/mage/sets/judgment/WorldgorgerDragon.java b/Mage.Sets/src/mage/sets/judgment/WorldgorgerDragon.java index 7944d12674..9faac36e7f 100644 --- a/Mage.Sets/src/mage/sets/judgment/WorldgorgerDragon.java +++ b/Mage.Sets/src/mage/sets/judgment/WorldgorgerDragon.java @@ -115,7 +115,7 @@ class WorldgorgerDragonEntersEffect extends OneShotEffect { if (exileId != null) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { if (!permanent.getId().equals(source.getSourceId())) { // Another - controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); + controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); } } return true; diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index e8c5687970..4a3b650618 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -134,7 +134,7 @@ class WormfangDrakeExileCost extends CostImpl { if (permanent == null) { return false; } - paid |= controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName() + " exiled permanents", sourceId, game, Zone.BATTLEFIELD, true); + paid |= controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getName() + " exiled permanents", sourceId, game, Zone.BATTLEFIELD, true); } } } diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/ButcherOfTheHorde.java b/Mage.Sets/src/mage/sets/khansoftarkir/ButcherOfTheHorde.java index 16d8490d97..3d18f486f8 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/ButcherOfTheHorde.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/ButcherOfTheHorde.java @@ -137,7 +137,7 @@ class ButcherOfTheHordeEffect extends OneShotEffect { } if (ability != null) { - game.informPlayers(sourceObject.getLogName() + ": " + controller.getName() + " has chosen: " + chosen); + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen: " + chosen); ContinuousEffect effect = new GainAbilitySourceEffect(ability, Duration.EndOfTurn); game.addEffect(effect, source); return true; diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/LensOfClarity.java b/Mage.Sets/src/mage/sets/khansoftarkir/LensOfClarity.java index e20963a0d1..1659663ecd 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/LensOfClarity.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/LensOfClarity.java @@ -123,7 +123,7 @@ class LensOfClarityLookLibraryEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.add(card); controller.lookAtCards("top card of library - " + controller.getName(), cards, game); - game.informPlayers(controller.getName() + " looks at the top card of his or her library"); + game.informPlayers(controller.getLogName() + " looks at the top card of his or her library"); } else { return false; } @@ -188,9 +188,9 @@ class LensOfClarityLookFaceDownEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.add(copyFaceDown); Player player = game.getPlayer(faceDownCreature.getControllerId()); - controller.lookAtCards("face down card - " + mageObject.getLogName(), cards, game); + controller.lookAtCards("face down card - " + mageObject.getName(), cards, game); if (player != null) { - game.informPlayers(controller.getName() + " looks at a face down creature of " + player.getName()); + game.informPlayers(controller.getLogName() + " looks at a face down creature of " + player.getLogName()); } } else { return false; diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/NarsetEnlightenedMaster.java b/Mage.Sets/src/mage/sets/khansoftarkir/NarsetEnlightenedMaster.java index 95e02a2ec9..b349e2286c 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/NarsetEnlightenedMaster.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/NarsetEnlightenedMaster.java @@ -108,7 +108,7 @@ class NarsetEnlightenedMasterExileEffect extends OneShotEffect { if (player.getLibrary().size() > 0) { Card card = player.getLibrary().getFromTop(game); if (card != null) { - player.moveCardToExileWithInfo(card, CardUtil.getCardExileZoneId(game, source), sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, true); + player.moveCardToExileWithInfo(card, CardUtil.getCardExileZoneId(game, source), sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); if (!card.getCardType().contains(CardType.CREATURE) && !card.getCardType().contains(CardType.LAND)) { ContinuousEffect effect = new NarsetEnlightenedMasterCastFromExileEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/ScoutTheBorders.java b/Mage.Sets/src/mage/sets/khansoftarkir/ScoutTheBorders.java index 2883a73682..477448ba70 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/ScoutTheBorders.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/ScoutTheBorders.java @@ -113,7 +113,7 @@ class ScoutTheBordersEffect extends OneShotEffect { } if (!cards.isEmpty()) { - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); TargetCard target = new TargetCard(Zone.LIBRARY, filterPutInHand); if (properCardFound && controller.choose(Outcome.DrawCard, cards, target, game)) { Card card = game.getCard(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/SeeTheUnwritten.java b/Mage.Sets/src/mage/sets/khansoftarkir/SeeTheUnwritten.java index d73da7a933..265554316f 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/SeeTheUnwritten.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/SeeTheUnwritten.java @@ -125,7 +125,7 @@ class SeeTheUnwrittenEffect extends OneShotEffect { } if (!cards.isEmpty()) { - player.revealCards(sourceObject.getLogName(), cards, game); + player.revealCards(sourceObject.getName(), cards, game); if (creatureCardsFound > 0 && player.chooseUse(outcome, "Put creature(s) into play?", game)) { int cardsToChoose = Math.min(numberOfCardsToPutIntoPlay, creatureCardsFound); TargetCard target = new TargetCard(cardsToChoose, cardsToChoose, Zone.LIBRARY, filter); diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/SmokeTeller.java b/Mage.Sets/src/mage/sets/khansoftarkir/SmokeTeller.java index 7c00d2fb3f..2c855d8eef 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/SmokeTeller.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/SmokeTeller.java @@ -115,7 +115,7 @@ class SmokeTellerLookFaceDownEffect extends OneShotEffect { copyFaceDown.setFaceDown(false, game); Cards cards = new CardsImpl(); cards.add(copyFaceDown); - player.lookAtCards("face down card - " + mageObject.getLogName(), cards, game); + player.lookAtCards("face down card - " + mageObject.getName(), cards, game); } else { return false; } diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/SultaiSoothsayer.java b/Mage.Sets/src/mage/sets/khansoftarkir/SultaiSoothsayer.java index cadfb45072..0e5e001ebe 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/SultaiSoothsayer.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/SultaiSoothsayer.java @@ -103,7 +103,7 @@ class SultaiSoothsayerEffect extends OneShotEffect { cards.addAll(controller.getLibrary().getTopCards(game, 4)); if (cards.size() > 0) { - controller.lookAtCards(sourceObject.getLogName(), cards, game); + controller.lookAtCards(sourceObject.getName(), cards, game); TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put in your hand")); if (controller.choose(Outcome.Benefit, cards, target, game)) { diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/TaigamsScheming.java b/Mage.Sets/src/mage/sets/khansoftarkir/TaigamsScheming.java index 63bb5495d3..868dd6501f 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/TaigamsScheming.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/TaigamsScheming.java @@ -99,7 +99,7 @@ class TaigamsSchemingEffect extends OneShotEffect { int count = Math.min(controller.getLibrary().size(), 5); if (count > 0) { cards.addAll(controller.getLibrary().getTopCards(game, count)); - controller.lookAtCards(sourceObject.getLogName(), cards, game); + controller.lookAtCards(sourceObject.getName(), cards, game); // pick cards going to graveyard TargetCard target = new TargetCard(0,5, Zone.LIBRARY, new FilterCard("cards to put into your graveyard")); if (controller.choose(Outcome.Detriment, cards, target, game)) { @@ -113,7 +113,7 @@ class TaigamsSchemingEffect extends OneShotEffect { } // The rest goes back to library in any order if (cards.size() > 0) { - game.informPlayers(controller.getName() + " puts " + cards.size() + " card" + (cards.size() ==1 ? "":"s") + " back to his or her library"); + game.informPlayers(controller.getLogName() + " puts " + cards.size() + " card" + (cards.size() ==1 ? "":"s") + " back to his or her library"); target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put on your library (last chosen will be on top)")); while (controller.isInGame() && cards.size() > 1) { controller.choose(Outcome.Neutral, cards, target, game); diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/UginsNexus.java b/Mage.Sets/src/mage/sets/khansoftarkir/UginsNexus.java index a42e7fcc9c..a066b66d67 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/UginsNexus.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/UginsNexus.java @@ -100,7 +100,7 @@ class UginsNexusSkipExtraTurnsEffect extends ReplacementEffectImpl { Player player = game.getPlayer(event.getPlayerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null && sourceObject != null) { - game.informPlayers(sourceObject.getLogName() + ": Extra turn of " + player.getName() + " skipped"); + game.informPlayers(sourceObject.getLogName() + ": Extra turn of " + player.getLogName() + " skipped"); } return true; } diff --git a/Mage.Sets/src/mage/sets/legends/ChainLightning.java b/Mage.Sets/src/mage/sets/legends/ChainLightning.java index ed2d755256..d7b201d44c 100644 --- a/Mage.Sets/src/mage/sets/legends/ChainLightning.java +++ b/Mage.Sets/src/mage/sets/legends/ChainLightning.java @@ -114,7 +114,7 @@ class ChainLightningEffect extends OneShotEffect { copy.setCopiedSpell(true); game.getStack().push(copy); copy.chooseNewTargets(game, affectedPlayer.getId()); - game.informPlayers(affectedPlayer.getName() + " copies " + copy.getName() + "."); + game.informPlayers(affectedPlayer.getLogName() + " copies " + copy.getName() + "."); } } } diff --git a/Mage.Sets/src/mage/sets/legions/MistformSliver.java b/Mage.Sets/src/mage/sets/legions/MistformSliver.java index 79a0ff890c..4bddd33dbb 100644 --- a/Mage.Sets/src/mage/sets/legions/MistformSliver.java +++ b/Mage.Sets/src/mage/sets/legions/MistformSliver.java @@ -108,7 +108,7 @@ public class MistformSliver extends CardImpl { return false; } } - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice()); ContinuousEffect effect = new AddCardSubTypeTargetEffect(typeChoice.getChoice(), Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(permanent.getId())); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/sets/limitedalpha/BlackVise.java b/Mage.Sets/src/mage/sets/limitedalpha/BlackVise.java index 7ea759e5ce..26e436ef11 100644 --- a/Mage.Sets/src/mage/sets/limitedalpha/BlackVise.java +++ b/Mage.Sets/src/mage/sets/limitedalpha/BlackVise.java @@ -96,7 +96,7 @@ class BlackViseChooseOpponent extends OneShotEffect { if (player.choose(this.outcome, target, source.getSourceId(), game)) { Player chosenPlayer = game.getPlayer(target.getFirstTarget()); if (chosenPlayer != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName()); game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget()); return true; } diff --git a/Mage.Sets/src/mage/sets/limitedalpha/JadeMonolith.java b/Mage.Sets/src/mage/sets/limitedalpha/JadeMonolith.java index a27d5fcc2c..7ab124a2d6 100644 --- a/Mage.Sets/src/mage/sets/limitedalpha/JadeMonolith.java +++ b/Mage.Sets/src/mage/sets/limitedalpha/JadeMonolith.java @@ -106,17 +106,17 @@ class JadeMonolithRedirectionEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Player you = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); Permanent targetCreature = game.getPermanent(source.getFirstTarget()); MageObject sourceObject = game.getObject(source.getSourceId()); DamageEvent damageEvent = (DamageEvent) event; - if (you != null && targetCreature != null) { + if (controller != null && targetCreature != null) { this.used = true; - you.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), damageEvent.getAppliedEffects()); + controller.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), damageEvent.getAppliedEffects()); - StringBuilder sb = new StringBuilder(sourceObject != null ? sourceObject.getName() : ""); - sb.append(": ").append(damageEvent.getAmount()).append(" damage redirected from ").append(targetCreature.getName()); - sb.append(" to ").append(you.getName()); + StringBuilder sb = new StringBuilder(sourceObject != null ? sourceObject.getLogName() : ""); + sb.append(": ").append(damageEvent.getAmount()).append(" damage redirected from ").append(targetCreature.getLogName()); + sb.append(" to ").append(controller.getLogName()); game.informPlayers(sb.toString()); return true; diff --git a/Mage.Sets/src/mage/sets/lorwyn/AshlingThePilgrim.java b/Mage.Sets/src/mage/sets/lorwyn/AshlingThePilgrim.java index d7ce6a7005..b92aa5e891 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/AshlingThePilgrim.java +++ b/Mage.Sets/src/mage/sets/lorwyn/AshlingThePilgrim.java @@ -59,7 +59,6 @@ public class AshlingThePilgrim extends CardImpl { this.subtype.add("Elemental"); this.subtype.add("Shaman"); - this.color.setRed(true); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -93,7 +92,7 @@ class AshlingThePilgrimEffect extends OneShotEffect { } public AshlingThePilgrimEffect(final AshlingThePilgrimEffect effect) { - super(effect); + super(effect); } @Override diff --git a/Mage.Sets/src/mage/sets/lorwyn/RingsOfBrighthearth.java b/Mage.Sets/src/mage/sets/lorwyn/RingsOfBrighthearth.java index 36c67fdf17..291cbdf40d 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/RingsOfBrighthearth.java +++ b/Mage.Sets/src/mage/sets/lorwyn/RingsOfBrighthearth.java @@ -142,7 +142,7 @@ class RingsOfBrighthearthEffect extends OneShotEffect { } } } - game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getName()).append(" copied activated ability").toString()); + game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getLogName()).append(" copied activated ability").toString()); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/magic2010/HarmsWay.java b/Mage.Sets/src/mage/sets/magic2010/HarmsWay.java index 7ff3ddb4c9..4dc73f4e9b 100644 --- a/Mage.Sets/src/mage/sets/magic2010/HarmsWay.java +++ b/Mage.Sets/src/mage/sets/magic2010/HarmsWay.java @@ -106,7 +106,7 @@ class HarmsWayPreventDamageTargetEffect extends PreventionEffectImpl { } Player player = game.getPlayer(redirectTo); if (player != null) { - game.informPlayers("Dealing " + preventionData.getPreventedDamage() + " to " + player.getName() + " instead"); + game.informPlayers("Dealing " + preventionData.getPreventedDamage() + " to " + player.getLogName() + " instead"); // keep the original source id as it is redirecting player.damage(preventionData.getPreventedDamage(), event.getSourceId(), game, false, true); } diff --git a/Mage.Sets/src/mage/sets/magic2010/LightwielderPaladin.java b/Mage.Sets/src/mage/sets/magic2010/LightwielderPaladin.java index 3169c5ea0a..52660fedb7 100644 --- a/Mage.Sets/src/mage/sets/magic2010/LightwielderPaladin.java +++ b/Mage.Sets/src/mage/sets/magic2010/LightwielderPaladin.java @@ -99,7 +99,7 @@ class LightwielderPaladinTriggeredAbility extends TriggeredAbilityImpl { && ((DamagedPlayerEvent) event).isCombatDamage()) { Player player = game.getPlayer(event.getTargetId()); if (player != null) { - FilterPermanent filter = new FilterPermanent("black or red permanent controlled by " + player.getName()); + FilterPermanent filter = new FilterPermanent("black or red permanent controlled by " + player.getLogName()); filter.add(Predicates.or( new ColorPredicate(ObjectColor.BLACK), new ColorPredicate(ObjectColor.RED))); diff --git a/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java b/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java index b619e86f3f..17727ef55e 100644 --- a/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java +++ b/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java @@ -101,7 +101,7 @@ class ConundrumSphinxEffect extends OneShotEffect { } } String cardName = cardChoice.getChoice(); - game.informPlayers("Conundrum Sphinx, player: " + player.getName() + ", named card: [" + cardName + "]"); + game.informPlayers("Conundrum Sphinx, player: " + player.getLogName() + ", named card: [" + cardName + "]"); Card card = player.getLibrary().removeFromTop(game); Cards cards = new CardsImpl(); cards.add(card); diff --git a/Mage.Sets/src/mage/sets/magic2012/AdaptiveAutomaton.java b/Mage.Sets/src/mage/sets/magic2012/AdaptiveAutomaton.java index dbe6f8d852..dcce392fd6 100644 --- a/Mage.Sets/src/mage/sets/magic2012/AdaptiveAutomaton.java +++ b/Mage.Sets/src/mage/sets/magic2012/AdaptiveAutomaton.java @@ -100,7 +100,7 @@ class AdaptiveAutomatonEffect extends OneShotEffect { return false; } } - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice()); game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice()); permanent.addInfo("chosen type", "Chosen type: " + typeChoice.getChoice().toString() + "", game); } diff --git a/Mage.Sets/src/mage/sets/magic2012/GrandAbolisher.java b/Mage.Sets/src/mage/sets/magic2012/GrandAbolisher.java index e08b5280a8..e836a032e6 100644 --- a/Mage.Sets/src/mage/sets/magic2012/GrandAbolisher.java +++ b/Mage.Sets/src/mage/sets/magic2012/GrandAbolisher.java @@ -99,7 +99,7 @@ class GrandAbolisherEffect extends ContinuousRuleModifyingEffectImpl { Player activePlayer = game.getPlayer(game.getActivePlayerId()); MageObject mageObject = game.getObject(source.getSourceId()); if (activePlayer != null && mageObject != null) { - return "You can't cast spells or activate abilities of artifacts, creatures, or enchantments during the turns of " + activePlayer.getName() + + return "You can't cast spells or activate abilities of artifacts, creatures, or enchantments during the turns of " + activePlayer.getLogName() + " (" + mageObject.getLogName() + ")"; } return null; diff --git a/Mage.Sets/src/mage/sets/magic2012/SphinxOfUthuun.java b/Mage.Sets/src/mage/sets/magic2012/SphinxOfUthuun.java index 1835e37f31..53923fd153 100644 --- a/Mage.Sets/src/mage/sets/magic2012/SphinxOfUthuun.java +++ b/Mage.Sets/src/mage/sets/magic2012/SphinxOfUthuun.java @@ -111,7 +111,7 @@ class SphinxOfUthuunEffect extends OneShotEffect { game.setZone(card.getId(), Zone.PICK); } } - player.revealCards(sourceObject.getLogName(), cards, game); + player.revealCards(sourceObject.getName(), cards, game); Set opponents = game.getOpponents(source.getControllerId()); if (!opponents.isEmpty()) { diff --git a/Mage.Sets/src/mage/sets/magic2012/SuturedGhoul.java b/Mage.Sets/src/mage/sets/magic2012/SuturedGhoul.java index 5ef8a6cc04..f293171d7a 100644 --- a/Mage.Sets/src/mage/sets/magic2012/SuturedGhoul.java +++ b/Mage.Sets/src/mage/sets/magic2012/SuturedGhoul.java @@ -117,7 +117,7 @@ class SuturedGhoulEffect extends OneShotEffect { } String msg = count == 1 ? "1 card" : count + "cards"; - game.informPlayers("Sutured Ghoul: " + player.getName() + " exiled " + msg); + game.informPlayers("Sutured Ghoul: " + player.getLogName() + " exiled " + msg); } } else { diff --git a/Mage.Sets/src/mage/sets/magic2013/MindclawShaman.java b/Mage.Sets/src/mage/sets/magic2013/MindclawShaman.java index 7e5b608423..c4cb42cf08 100644 --- a/Mage.Sets/src/mage/sets/magic2013/MindclawShaman.java +++ b/Mage.Sets/src/mage/sets/magic2013/MindclawShaman.java @@ -32,6 +32,7 @@ import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -106,22 +107,21 @@ class MindclawShamanEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player targetOpponent = game.getPlayer(source.getFirstTarget()); - if (targetOpponent != null) { + MageObject sourceObject = source.getSourceObject(game); + if (targetOpponent != null && sourceObject != null) { if (targetOpponent.getHand().size() > 0) { - targetOpponent.revealCards("Mindclaw Shaman", targetOpponent.getHand(), game); - Player you = game.getPlayer(source.getControllerId()); - if (you != null) { - TargetCard target = new TargetCard(Zone.PICK, filter); + targetOpponent.revealCards(sourceObject.getName(), targetOpponent.getHand(), game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + TargetCard target = new TargetCard(Zone.HAND, filter); target.setNotTarget(true); - if (you.choose(Outcome.Benefit, targetOpponent.getHand(), target, game)) { + if (controller.choose(Outcome.Benefit, targetOpponent.getHand(), target, game)) { Card chosenCard = targetOpponent.getHand().get(target.getFirstTarget(), game); if (chosenCard != null) { - if (targetOpponent != null) { - if (you.chooseUse(Outcome.Benefit, "Cast the chosen card?", game)) { - you.cast(chosenCard.getSpellAbility(), game, true); - } else { - game.informPlayers("Mindclaw Shaman: " + you.getName() + " canceled casting the card."); - } + if (controller.chooseUse(Outcome.Benefit, "Cast the chosen card?", game)) { + controller.cast(chosenCard.getSpellAbility(), game, true); + } else { + game.informPlayers(sourceObject.getLogName() +": " + controller.getLogName() + " canceled casting the card."); } } } diff --git a/Mage.Sets/src/mage/sets/magic2013/ShimianSpecter.java b/Mage.Sets/src/mage/sets/magic2013/ShimianSpecter.java index 24482d0267..8b38fd97f2 100644 --- a/Mage.Sets/src/mage/sets/magic2013/ShimianSpecter.java +++ b/Mage.Sets/src/mage/sets/magic2013/ShimianSpecter.java @@ -106,7 +106,7 @@ class ShimianSpecterEffect extends OneShotEffect { if (targetPlayer != null && sourceObject != null && controller != null) { // reveal hand of target player - targetPlayer.revealCards(sourceObject.getLogName(), targetPlayer.getHand(), game); + targetPlayer.revealCards(sourceObject.getName(), targetPlayer.getHand(), game); // You choose a nonland card from it TargetCardInHand target = new TargetCardInHand(new FilterNonlandCard()); diff --git a/Mage.Sets/src/mage/sets/magic2014/BanisherPriest.java b/Mage.Sets/src/mage/sets/magic2014/BanisherPriest.java index 527bac746a..eb9577c065 100644 --- a/Mage.Sets/src/mage/sets/magic2014/BanisherPriest.java +++ b/Mage.Sets/src/mage/sets/magic2014/BanisherPriest.java @@ -107,7 +107,7 @@ class BanisherPriestExileEffect extends OneShotEffect { // If Banisher Priest leaves the battlefield before its triggered ability resolves, // the target creature won't be exiled. if (permanent != null) { - return new ExileTargetEffect(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), permanent.getLogName()).apply(game, source); + return new ExileTargetEffect(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), permanent.getName()).apply(game, source); } return false; } diff --git a/Mage.Sets/src/mage/sets/magic2014/DevoutInvocation.java b/Mage.Sets/src/mage/sets/magic2014/DevoutInvocation.java index ea5558ca8b..712d33eeb2 100644 --- a/Mage.Sets/src/mage/sets/magic2014/DevoutInvocation.java +++ b/Mage.Sets/src/mage/sets/magic2014/DevoutInvocation.java @@ -118,7 +118,7 @@ class DevoutInvocationEffect extends OneShotEffect { if (tappedAmount > 0) { AngelToken angelToken = new AngelToken(); angelToken.putOntoBattlefield(tappedAmount, game, source.getSourceId(), source.getControllerId()); - game.informPlayers(new StringBuilder(controller.getName()).append(" puts ").append(tappedAmount).append(" token").append(tappedAmount != 1 ?"s":"").append(" onto the battlefield").toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" puts ").append(tappedAmount).append(" token").append(tappedAmount != 1 ?"s":"").append(" onto the battlefield").toString()); } return true; } diff --git a/Mage.Sets/src/mage/sets/magic2014/DoorOfDestinies.java b/Mage.Sets/src/mage/sets/magic2014/DoorOfDestinies.java index 83b84120e5..162acea479 100644 --- a/Mage.Sets/src/mage/sets/magic2014/DoorOfDestinies.java +++ b/Mage.Sets/src/mage/sets/magic2014/DoorOfDestinies.java @@ -112,7 +112,7 @@ class ChooseCreatureTypeEffect extends OneShotEffect { return false; } } - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice()); game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice()); permanent.addInfo("chosen type", "Chosen type: " + typeChoice.getChoice().toString() + "", game); } diff --git a/Mage.Sets/src/mage/sets/magic2014/MoltenBirth.java b/Mage.Sets/src/mage/sets/magic2014/MoltenBirth.java index 6cabd5835e..39c2c1676d 100644 --- a/Mage.Sets/src/mage/sets/magic2014/MoltenBirth.java +++ b/Mage.Sets/src/mage/sets/magic2014/MoltenBirth.java @@ -88,14 +88,14 @@ class MoltenBirthEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player you = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); Card molten = game.getCard(source.getSourceId()); - if (you != null) { + if (controller != null) { ElementalToken token = new ElementalToken(); token.putOntoBattlefield(2, game, source.getSourceId(), source.getControllerId()); - if (you.flipCoin(game)) { + if (controller.flipCoin(game)) { molten.moveToZone(Zone.HAND, source.getSourceId(), game, true); - game.informPlayers(new StringBuilder(you.getName()).append(" won the flip. ").append(molten.getLogName()).append(" is returned to ").append(you.getName()).append(" hand.").toString()); + game.informPlayers(controller.getLogName() + " won the flip. " + molten.getLogName() +" is returned to "+ controller.getLogName() + "'s hand."); } return true; } diff --git a/Mage.Sets/src/mage/sets/magic2014/StrionicResonator.java b/Mage.Sets/src/mage/sets/magic2014/StrionicResonator.java index 9bc4df3023..3b5a1d0fe2 100644 --- a/Mage.Sets/src/mage/sets/magic2014/StrionicResonator.java +++ b/Mage.Sets/src/mage/sets/magic2014/StrionicResonator.java @@ -109,7 +109,7 @@ class StrionicResonatorEffect extends OneShotEffect { } } } - game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getName()).append(" copied activated ability").toString()); + game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getLogName()).append(" copied activated ability").toString()); return true; } } diff --git a/Mage.Sets/src/mage/sets/magic2015/AEtherspouts.java b/Mage.Sets/src/mage/sets/magic2015/AEtherspouts.java index e4bce4bc10..8a9251e46d 100644 --- a/Mage.Sets/src/mage/sets/magic2015/AEtherspouts.java +++ b/Mage.Sets/src/mage/sets/magic2015/AEtherspouts.java @@ -114,10 +114,10 @@ class AEtherspoutsEffect extends OneShotEffect { if (permanent.getOwnerId().equals(player.getId())) { if (player.chooseUse(outcome, "Put " + permanent.getLogName() + " to the top? (else it goes to bottom)", game)) { permanentsToTop.add(permanent); - game.informPlayers(permanent.getLogName() + " goes to the top of " + player.getName() + "'s library"); + game.informPlayers(permanent.getLogName() + " goes to the top of " + player.getLogName() + "'s library"); } else { permanentsToBottom.add(permanent); - game.informPlayers(permanent.getLogName() + " goes to the bottom of " + player.getName() + "'s library"); + game.informPlayers(permanent.getLogName() + " goes to the bottom of " + player.getLogName() + "'s library"); } } } diff --git a/Mage.Sets/src/mage/sets/magic2015/ConstrictingSliver.java b/Mage.Sets/src/mage/sets/magic2015/ConstrictingSliver.java index ea6658e57a..343b9cd59b 100644 --- a/Mage.Sets/src/mage/sets/magic2015/ConstrictingSliver.java +++ b/Mage.Sets/src/mage/sets/magic2015/ConstrictingSliver.java @@ -118,7 +118,7 @@ class ConstrictingSliverExileEffect extends OneShotEffect { // If the creature leaves the battlefield before its triggered ability resolves, // the target creature won't be exiled. if (permanent != null) { - return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getLogName()).apply(game, source); + return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source); } return false; } diff --git a/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java b/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java index bea718c045..b96d572bd2 100644 --- a/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java +++ b/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java @@ -178,7 +178,7 @@ class GenesisHydraPutOntoBattlefieldEffect extends OneShotEffect { } target1.clearChosen(); } else { - game.informPlayers(controller.getName() + " didn't choose anything"); + game.informPlayers(controller.getLogName() + " didn't choose anything"); } } else { game.informPlayers("No nonland permanent card with converted mana cost " + count + " or less to choose."); diff --git a/Mage.Sets/src/mage/sets/magic2015/JaliraMasterPolymorphist.java b/Mage.Sets/src/mage/sets/magic2015/JaliraMasterPolymorphist.java index 38d13e8048..089edf281c 100644 --- a/Mage.Sets/src/mage/sets/magic2015/JaliraMasterPolymorphist.java +++ b/Mage.Sets/src/mage/sets/magic2015/JaliraMasterPolymorphist.java @@ -133,7 +133,7 @@ class JaliraMasterPolymorphistEffect extends OneShotEffect { } while (library.size() > 0 && card != null && !filter.match(card, game)); // reveal cards if (!cards.isEmpty()) { - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); } // put nonlegendary creature card to battlefield controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId()); diff --git a/Mage.Sets/src/mage/sets/magic2015/KurkeshOnakkeAncient.java b/Mage.Sets/src/mage/sets/magic2015/KurkeshOnakkeAncient.java index 8e3c3812ac..2cb5ba363d 100644 --- a/Mage.Sets/src/mage/sets/magic2015/KurkeshOnakkeAncient.java +++ b/Mage.Sets/src/mage/sets/magic2015/KurkeshOnakkeAncient.java @@ -155,7 +155,7 @@ class KurkeshOnakkeAncientEffect extends OneShotEffect { } } } - game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getName()).append(" copied activated ability").toString()); + game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getLogName()).append(" copied activated ability").toString()); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/magic2015/MasterOfPredicaments.java b/Mage.Sets/src/mage/sets/magic2015/MasterOfPredicaments.java index 83b99c9652..f43dc4a2d7 100644 --- a/Mage.Sets/src/mage/sets/magic2015/MasterOfPredicaments.java +++ b/Mage.Sets/src/mage/sets/magic2015/MasterOfPredicaments.java @@ -114,13 +114,13 @@ class MasterOfPredicamentsEffect extends OneShotEffect { } boolean guessWrong; if (attackedPlayer.chooseUse(Outcome.Detriment, "Is the chosen card's converted mana cost greater than 4?", game)) { - game.informPlayers(attackedPlayer.getName() + " guessed that the chosen card's converted mana cost is greater than 4"); + game.informPlayers(attackedPlayer.getLogName() + " guessed that the chosen card's converted mana cost is greater than 4"); guessWrong = cardFromHand.getManaCost().convertedManaCost() <= 4; } else { - game.informPlayers(attackedPlayer.getName() + " guessed that the chosen card's converted mana cost is not greater than 4"); + game.informPlayers(attackedPlayer.getLogName() + " guessed that the chosen card's converted mana cost is not greater than 4"); guessWrong = cardFromHand.getManaCost().convertedManaCost() > 4; } - game.informPlayers(attackedPlayer.getName() + " guessed " + (guessWrong ? "wrong" : "right")); + game.informPlayers(attackedPlayer.getLogName() + " guessed " + (guessWrong ? "wrong" : "right")); if (guessWrong) { if (cardFromHand.getCardType().contains(CardType.LAND)) { // If the revealed card is a land, you can't cast it. So nothing happens diff --git a/Mage.Sets/src/mage/sets/magic2015/ObeliskOfUrd.java b/Mage.Sets/src/mage/sets/magic2015/ObeliskOfUrd.java index 676b584c8e..4b7687d0e3 100644 --- a/Mage.Sets/src/mage/sets/magic2015/ObeliskOfUrd.java +++ b/Mage.Sets/src/mage/sets/magic2015/ObeliskOfUrd.java @@ -110,7 +110,7 @@ class ObeliskOfUrdEnterBattlefieldEffect extends OneShotEffect { return false; } } - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice()); game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice()); permanent.addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen type: " + typeChoice.getChoice()), game); } diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/CausticWasps.java b/Mage.Sets/src/mage/sets/mercadianmasques/CausticWasps.java index a908c4d602..fd83ec1cc8 100644 --- a/Mage.Sets/src/mage/sets/mercadianmasques/CausticWasps.java +++ b/Mage.Sets/src/mage/sets/mercadianmasques/CausticWasps.java @@ -99,7 +99,7 @@ class CausticWaspsTriggeredAbility extends TriggeredAbilityImpl { && ((DamagedPlayerEvent) event).isCombatDamage()) { Player player = game.getPlayer(event.getTargetId()); if (player != null) { - FilterPermanent filter = new FilterPermanent("an artifact controlled by " + player.getName()); + FilterPermanent filter = new FilterPermanent("an artifact controlled by " + player.getLogName()); filter.add(Predicates.or( new CardTypePredicate(CardType.ARTIFACT))); filter.add(new ControllerIdPredicate(event.getTargetId())); diff --git a/Mage.Sets/src/mage/sets/mirage/ForbiddenCrypt.java b/Mage.Sets/src/mage/sets/mirage/ForbiddenCrypt.java index e5ec2847eb..84f2652dba 100644 --- a/Mage.Sets/src/mage/sets/mirage/ForbiddenCrypt.java +++ b/Mage.Sets/src/mage/sets/mirage/ForbiddenCrypt.java @@ -112,7 +112,7 @@ class ForbiddenCryptDrawCardReplacementEffect extends ReplacementEffectImpl { } } if (!cardReturned) { - game.informPlayers(new StringBuilder(player.getName()).append(" can't return a card from graveyard to hand.").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" can't return a card from graveyard to hand.").toString()); player.lost(game); } return true; diff --git a/Mage.Sets/src/mage/sets/mirage/IllicitAuction.java b/Mage.Sets/src/mage/sets/mirage/IllicitAuction.java index 32b4260b56..8b96e6155d 100644 --- a/Mage.Sets/src/mage/sets/mirage/IllicitAuction.java +++ b/Mage.Sets/src/mage/sets/mirage/IllicitAuction.java @@ -95,24 +95,23 @@ class IllicitAuctionEffect extends GainControlTargetEffect { Player winner = game.getPlayer(game.getActivePlayerId()); int highBid = 0; - game.informPlayers(new StringBuilder(winner.getName()).append(" has bet 0 lifes").toString()); + game.informPlayers(winner.getLogName()+ " has bet 0 lifes"); Player currentPlayer = playerList.getNextInRange(controller, game); while (currentPlayer != winner) { - String text = winner.getName() + " has bet " + highBid + " life" + (highBid > 1 ? "s" : "") + ". Top the bid?"; + String text = winner.getLogName() + " has bet " + highBid + " life" + (highBid > 1 ? "s" : "") + ". Top the bid?"; if (currentPlayer.chooseUse(Outcome.Detriment, text, game)) { int newBid = currentPlayer.getAmount(highBid + 1, Integer.MAX_VALUE, "Choose bid", game); if (newBid > highBid) { highBid = newBid; winner = currentPlayer; - game.informPlayers(new StringBuilder(currentPlayer.getName()).append(" bet ") - .append(newBid).append(" life").append(newBid > 1 ? "s" : "").toString()); + game.informPlayers(currentPlayer.getLogName() + " bet " + newBid + " life" + (newBid > 1 ? "s" : "")); } } currentPlayer = playerList.getNextInRange(controller, game); } - game.informPlayers(winner.getName() + " won the auction with a bid of " + highBid + " life" + (highBid > 1 ? "s" : "")); + game.informPlayers(winner.getLogName() + " won the auction with a bid of " + highBid + " life" + (highBid > 1 ? "s" : "")); winner.loseLife(highBid, game); super.controllingPlayerId = winner.getId(); } diff --git a/Mage.Sets/src/mage/sets/mirrodin/ExtraplanarLens.java b/Mage.Sets/src/mage/sets/mirrodin/ExtraplanarLens.java index dad4a998ab..b019f5c019 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/ExtraplanarLens.java +++ b/Mage.Sets/src/mage/sets/mirrodin/ExtraplanarLens.java @@ -107,7 +107,7 @@ class ExtraplanarLensImprintEffect extends OneShotEffect { && controller.choose(Outcome.Neutral, target, source.getSourceId(), game)) { Permanent targetLand = game.getPermanent(target.getFirstTarget()); if (targetLand != null) { - targetLand.moveToExile(null, extraplanarLens.getLogName() + " (Imprint)", source.getSourceId(), game); + targetLand.moveToExile(null, extraplanarLens.getName() + " (Imprint)", source.getSourceId(), game); extraplanarLens.imprint(targetLand.getId(), game); extraplanarLens.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + targetLand.getLogName() + "]"), game); } diff --git a/Mage.Sets/src/mage/sets/mirrodin/GoblinCharbelcher.java b/Mage.Sets/src/mage/sets/mirrodin/GoblinCharbelcher.java index aa61f300ea..4d592923a7 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/GoblinCharbelcher.java +++ b/Mage.Sets/src/mage/sets/mirrodin/GoblinCharbelcher.java @@ -116,7 +116,7 @@ class GoblinCharbelcherEffect extends OneShotEffect { } } - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); int damage = cards.size(); if (landFound) { damage--; diff --git a/Mage.Sets/src/mage/sets/mirrodin/IsochronScepter.java b/Mage.Sets/src/mage/sets/mirrodin/IsochronScepter.java index 9ba91ef89f..a1b31dbabf 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/IsochronScepter.java +++ b/Mage.Sets/src/mage/sets/mirrodin/IsochronScepter.java @@ -109,7 +109,7 @@ class IsochronScepterImprintEffect extends OneShotEffect { && controller.choose(Outcome.Benefit, controller.getHand(), target, game)) { Card card = controller.getHand().get(target.getFirstTarget(), game); if (card != null) { - controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getLogName() +" (Imprint)", source.getSourceId(), game, Zone.HAND, true); + controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getName() +" (Imprint)", source.getSourceId(), game, Zone.HAND, true); Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { permanent.imprint(card.getId(), game); diff --git a/Mage.Sets/src/mage/sets/mirrodin/KrarksThumb.java b/Mage.Sets/src/mage/sets/mirrodin/KrarksThumb.java index d8fb55f483..efd82bfd8e 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/KrarksThumb.java +++ b/Mage.Sets/src/mage/sets/mirrodin/KrarksThumb.java @@ -83,9 +83,9 @@ class KrarksThumbEffect extends ReplacementEffectImpl { boolean secondCoinFlip = player.flipCoin(game, event.getAppliedEffects()); if (player.chooseUse(outcome, "Ignore the first coin flip?", game)) { event.setFlag(secondCoinFlip); - game.informPlayers(new StringBuilder(player.getName()).append(" ignores the first coin flip.").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" ignores the first coin flip.").toString()); } else { - game.informPlayers(new StringBuilder(player.getName()).append(" ignores the second coin flip.").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" ignores the second coin flip.").toString()); } } return false; diff --git a/Mage.Sets/src/mage/sets/mirrodin/RustmouthOgre.java b/Mage.Sets/src/mage/sets/mirrodin/RustmouthOgre.java index eeb2edc226..b49b93b28b 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/RustmouthOgre.java +++ b/Mage.Sets/src/mage/sets/mirrodin/RustmouthOgre.java @@ -93,7 +93,7 @@ class RustmouthOgreTriggeredAbility extends TriggeredAbilityImpl { if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())) { FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact that player controls"); filter.add(new ControllerIdPredicate(event.getPlayerId())); - filter.setMessage("artifact controlled by " + game.getPlayer(event.getTargetId()).getName()); + filter.setMessage("artifact controlled by " + game.getPlayer(event.getTargetId()).getLogName()); this.getTargets().clear(); this.addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/mirrodin/SoulFoundry.java b/Mage.Sets/src/mage/sets/mirrodin/SoulFoundry.java index ace0be33b2..c505eaed3e 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/SoulFoundry.java +++ b/Mage.Sets/src/mage/sets/mirrodin/SoulFoundry.java @@ -130,7 +130,7 @@ class SoulFoundryImprintEffect extends OneShotEffect { && controller.choose(Outcome.Benefit, controller.getHand(), target, game)) { Card card = controller.getHand().get(target.getFirstTarget(), game); if (card != null) { - controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getLogName() + " (Imprint)", source.getSourceId(), game, Zone.HAND, true); + controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getName() + " (Imprint)", source.getSourceId(), game, Zone.HAND, true); Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { permanent.imprint(card.getId(), game); diff --git a/Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java b/Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java index a7b79feb94..bd1eb4da7b 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java +++ b/Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java @@ -114,7 +114,7 @@ class SpoilsOfTheVaultEffect extends OneShotEffect { } } - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); controller.loseLife(cards.size(), game); return true; diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/DistantMemories.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/DistantMemories.java index f73f059aea..3798873d38 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/DistantMemories.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/DistantMemories.java @@ -97,7 +97,7 @@ class DistantMemoriesEffect extends OneShotEffect { player.shuffleLibrary(game); StringBuilder sb = new StringBuilder(); - sb.append("Have ").append(player.getName()).append(" put ").append(card.getName()); + sb.append("Have ").append(player.getLogName()).append(" put ").append(card.getName()); sb.append(" in his hand? If none of his opponents says yes, he'll draw three cards."); boolean putInHand = false; diff --git a/Mage.Sets/src/mage/sets/modernmasters/EchoingCourage.java b/Mage.Sets/src/mage/sets/modernmasters/EchoingCourage.java index ee09700eab..65f53560ec 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/EchoingCourage.java +++ b/Mage.Sets/src/mage/sets/modernmasters/EchoingCourage.java @@ -95,7 +95,7 @@ class EchoingCourageEffect extends OneShotEffect { if (targetPermanent.getName().isEmpty()) { filter.add(new PermanentIdPredicate(targetPermanent.getId())); // if no name (face down creature) only the creature itself is selected } else { - filter.add(new NamePredicate(targetPermanent.getLogName())); + filter.add(new NamePredicate(targetPermanent.getName())); } ContinuousEffect effect = new BoostAllEffect(2,2, Duration.EndOfTurn, filter, false); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/sets/modernmasters/JhoiraOfTheGhitu.java b/Mage.Sets/src/mage/sets/modernmasters/JhoiraOfTheGhitu.java index efaa8d7b16..5e3b939447 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/JhoiraOfTheGhitu.java +++ b/Mage.Sets/src/mage/sets/modernmasters/JhoiraOfTheGhitu.java @@ -125,7 +125,7 @@ class JhoiraOfTheGhituSuspendEffect extends OneShotEffect { if (!hasSuspend) { game.addEffect(new GainSuspendEffect(new MageObjectReference(card, game)), source); } - game.informPlayers(controller.getName() + " suspends 4 - " + card.getName()); + game.informPlayers(controller.getLogName() + " suspends 4 - " + card.getName()); return true; } } diff --git a/Mage.Sets/src/mage/sets/modernmasters/RiftElemental.java b/Mage.Sets/src/mage/sets/modernmasters/RiftElemental.java index 01e868f1ce..8af03ab160 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/RiftElemental.java +++ b/Mage.Sets/src/mage/sets/modernmasters/RiftElemental.java @@ -180,7 +180,7 @@ class RemoveCounterFromCardCost extends CostImpl { card.getCounters(game).removeCounter(counterName); } this.paid = true; - game.informPlayers(new StringBuilder(controller.getName()).append(" removes a ").append(counterName).append(" counter from ").append(card.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" removes a ").append(counterName).append(" counter from ").append(card.getName()).toString()); } } } diff --git a/Mage.Sets/src/mage/sets/modernmasters/TrygonPredator.java b/Mage.Sets/src/mage/sets/modernmasters/TrygonPredator.java index acd44721d5..2f179b2690 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/TrygonPredator.java +++ b/Mage.Sets/src/mage/sets/modernmasters/TrygonPredator.java @@ -100,7 +100,7 @@ class TrygonPredatorTriggeredAbility extends TriggeredAbilityImpl { && ((DamagedPlayerEvent) event).isCombatDamage()) { Player player = game.getPlayer(event.getTargetId()); if (player != null) { - FilterPermanent filter = new FilterPermanent("an artifact or enchantment controlled by " + player.getName()); + FilterPermanent filter = new FilterPermanent("an artifact or enchantment controlled by " + player.getLogName()); filter.add(Predicates.or( new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT))); diff --git a/Mage.Sets/src/mage/sets/morningtide/GreatbowDoyen.java b/Mage.Sets/src/mage/sets/morningtide/GreatbowDoyen.java index 9f78f1740f..92a7c8c84a 100644 --- a/Mage.Sets/src/mage/sets/morningtide/GreatbowDoyen.java +++ b/Mage.Sets/src/mage/sets/morningtide/GreatbowDoyen.java @@ -154,7 +154,7 @@ class GreatbowDoyenEffect extends OneShotEffect { Player player = game.getPlayer(controllerId); if (player != null) { player.damage(damageAmount, sourceOfDamage, game, false, true); - game.informPlayers(new StringBuilder(permanent.getName()).append(" deals ").append(damageAmount).append(" damage to ").append(player.getName()).toString()); + game.informPlayers(new StringBuilder(permanent.getName()).append(" deals ").append(damageAmount).append(" damage to ").append(player.getLogName()).toString()); return true; } } diff --git a/Mage.Sets/src/mage/sets/morningtide/Slithermuse.java b/Mage.Sets/src/mage/sets/morningtide/Slithermuse.java index d300c3a306..7bd3003bf1 100644 --- a/Mage.Sets/src/mage/sets/morningtide/Slithermuse.java +++ b/Mage.Sets/src/mage/sets/morningtide/Slithermuse.java @@ -107,7 +107,7 @@ class SlithermuseEffect extends OneShotEffect { if (player.choose(this.outcome, target, source.getSourceId(), game)) { Player chosenPlayer = game.getPlayer(target.getFirstTarget()); if (chosenPlayer != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName()); int diff = chosenPlayer.getHand().size() - player.getHand().size(); if (diff > 0) { player.drawCards(diff, game); diff --git a/Mage.Sets/src/mage/sets/newphyrexia/ArmWithAEther.java b/Mage.Sets/src/mage/sets/newphyrexia/ArmWithAEther.java index 8bd395e89b..af2f6b9a93 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/ArmWithAEther.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/ArmWithAEther.java @@ -91,7 +91,7 @@ class ArmWithAEtherTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Player opponent = game.getPlayer(event.getPlayerId()); if (opponent != null && event.getType() == GameEvent.EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls"); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls"); filter.add(new ControllerIdPredicate(opponent.getId())); this.getTargets().clear(); diff --git a/Mage.Sets/src/mage/sets/newphyrexia/BlindZealot.java b/Mage.Sets/src/mage/sets/newphyrexia/BlindZealot.java index 03c6c8ecdb..15b6e72e37 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/BlindZealot.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/BlindZealot.java @@ -106,11 +106,11 @@ class BlindZealotTriggeredAbility extends TriggeredAbilityImpl { StringBuilder sb = new StringBuilder(); sb.append("Do you wish to sacrifice ").append(sourcePermanent.getName()); sb.append(" to destroy target creature controlled by "); - sb.append(game.getPlayer(event.getTargetId()).getName()).append("?"); + sb.append(game.getPlayer(event.getTargetId()).getLogName()).append("?"); if (player.chooseUse(Outcome.DestroyPermanent, sb.toString(), game)) { FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new ControllerIdPredicate(event.getTargetId())); - filter.setMessage("creature controlled by " + game.getPlayer(event.getTargetId()).getName()); + filter.setMessage("creature controlled by " + game.getPlayer(event.getTargetId()).getLogName()); this.getTargets().clear(); this.addTarget(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/newphyrexia/ExclusionRitual.java b/Mage.Sets/src/mage/sets/newphyrexia/ExclusionRitual.java index 8a890c5eb2..d3b42ea3e8 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/ExclusionRitual.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/ExclusionRitual.java @@ -96,7 +96,7 @@ class ExclusionRitualImprintEffect extends OneShotEffect { Permanent targetPermanent = game.getPermanent(targetPointer.getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); if (controller != null && sourcePermanent != null && targetPermanent != null) { - controller.moveCardToExileWithInfo(targetPermanent, getId(), sourcePermanent.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); + controller.moveCardToExileWithInfo(targetPermanent, getId(), sourcePermanent.getName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); sourcePermanent.imprint(targetPermanent.getId(), game); } return true; diff --git a/Mage.Sets/src/mage/sets/newphyrexia/PraetorsGrasp.java b/Mage.Sets/src/mage/sets/newphyrexia/PraetorsGrasp.java index a9015ce170..544113d9c9 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/PraetorsGrasp.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/PraetorsGrasp.java @@ -105,7 +105,7 @@ class PraetorsGraspEffect extends OneShotEffect { Card card = opponent.getLibrary().getCard(targetId, game); UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); if (card != null && exileId != null) { - game.informPlayers(controller.getName() + " moves the searched card face down to exile"); + game.informPlayers(controller.getLogName() + " moves the searched card face down to exile"); card.moveToExile(exileId, sourceObject.getName(), source.getSourceId(), game); card.setFaceDown(true, game); game.addEffect(new PraetorsGraspPlayEffect(card.getId()), source); diff --git a/Mage.Sets/src/mage/sets/newphyrexia/Spellskite.java b/Mage.Sets/src/mage/sets/newphyrexia/Spellskite.java index e1e1757aea..b2d1733d1a 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/Spellskite.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/Spellskite.java @@ -125,7 +125,7 @@ class SpellskiteEffect extends OneShotEffect { String name; if (object == null) { Player targetPlayer = game.getPlayer(targetId); - name = targetPlayer.getName(); + name = targetPlayer.getLogName(); } else { name = object.getName(); } diff --git a/Mage.Sets/src/mage/sets/newphyrexia/SurgicalExtraction.java b/Mage.Sets/src/mage/sets/newphyrexia/SurgicalExtraction.java index 7917f1c3eb..a4e5255fdb 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/SurgicalExtraction.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/SurgicalExtraction.java @@ -119,7 +119,7 @@ class SurgicalExtractionEffect extends OneShotEffect { // cards in Graveyard int cardsCount = owner.getGraveyard().count(filterNamedCard, game); if (cardsCount > 0) { - filterNamedCard.setMessage("card named " + chosenCard.getName() + " in the graveyard of " + owner.getName()); + filterNamedCard.setMessage("card named " + chosenCard.getLogName() + " in the graveyard of " + owner.getLogName()); TargetCardInGraveyard target = new TargetCardInGraveyard(0, cardsCount, filterNamedCard); if (controller.choose(Outcome.Exile, owner.getGraveyard(), target, game)) { List targets = target.getTargets(); @@ -133,7 +133,7 @@ class SurgicalExtractionEffect extends OneShotEffect { } // cards in Hand - filterNamedCard.setMessage("card named " + chosenCard.getName() + " in the hand of " + owner.getName()); + filterNamedCard.setMessage("card named " + chosenCard.getLogName() + " in the hand of " + owner.getLogName()); TargetCardInHand targetCardInHand = new TargetCardInHand(0, Integer.MAX_VALUE, filterNamedCard); if (controller.choose(Outcome.Exile, owner.getHand(), targetCardInHand, game)) { List targets = targetCardInHand.getTargets(); @@ -146,7 +146,7 @@ class SurgicalExtractionEffect extends OneShotEffect { } // cards in Library - filterNamedCard.setMessage("card named " + chosenCard.getName() + " in the library of " + owner.getName()); + filterNamedCard.setMessage("card named " + chosenCard.getLogName() + " in the library of " + owner.getLogName()); TargetCardInLibrary targetCardInLibrary = new TargetCardInLibrary(0, Integer.MAX_VALUE, filterNamedCard); if (controller.searchLibrary(targetCardInLibrary, game, owner.getId())) { List targets = targetCardInLibrary.getTargets(); diff --git a/Mage.Sets/src/mage/sets/newphyrexia/Xenograft.java b/Mage.Sets/src/mage/sets/newphyrexia/Xenograft.java index 7ab55a16d2..74020d1cd4 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/Xenograft.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/Xenograft.java @@ -102,7 +102,7 @@ class XenograftEffect extends OneShotEffect { return false; } } - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice()); game.getState().setValue(source.getSourceId() + "_XenograftType", typeChoice.getChoice()); permanent.addInfo("chosen type", "Chosen type: " + typeChoice.getChoice().toString() + "", game); } diff --git a/Mage.Sets/src/mage/sets/ninthedition/StorageMatrix.java b/Mage.Sets/src/mage/sets/ninthedition/StorageMatrix.java index d737d5509b..26540a0fb8 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/StorageMatrix.java +++ b/Mage.Sets/src/mage/sets/ninthedition/StorageMatrix.java @@ -111,7 +111,7 @@ class StorageMatrixRestrictionEffect extends RestrictionEffect { // player has to choose } String choosenType = choiceImpl.getChoice(); - game.informPlayers(new StringBuilder(storageMatrix.getName()).append(": ").append(player.getName()).append(" chose to untap ").append(choosenType).toString()); + game.informPlayers(new StringBuilder(storageMatrix.getName()).append(": ").append(player.getLogName()).append(" chose to untap ").append(choosenType).toString()); if(choosenType.equals(CardType.ARTIFACT.toString())){ type = CardType.ARTIFACT; diff --git a/Mage.Sets/src/mage/sets/odyssey/SparkMage.java b/Mage.Sets/src/mage/sets/odyssey/SparkMage.java index d55aab04dd..1032baf656 100644 --- a/Mage.Sets/src/mage/sets/odyssey/SparkMage.java +++ b/Mage.Sets/src/mage/sets/odyssey/SparkMage.java @@ -96,7 +96,7 @@ class SparkMageTriggeredAbility extends TriggeredAbilityImpl { if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())){ Player opponent = game.getPlayer(event.getPlayerId()); if (opponent != null) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls"); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls"); filter.add(new ControllerIdPredicate(opponent.getId())); this.getTargets().clear(); this.getTargets().add(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/odyssey/WildMongrel.java b/Mage.Sets/src/mage/sets/odyssey/WildMongrel.java index 0c23a53b9d..a865a8e9f0 100644 --- a/Mage.Sets/src/mage/sets/odyssey/WildMongrel.java +++ b/Mage.Sets/src/mage/sets/odyssey/WildMongrel.java @@ -100,7 +100,7 @@ class ChangeColorEffect extends OneShotEffect { if (player != null && wildMongrel != null) { ChoiceColor colorChoice = new ChoiceColor(); if (player.choose(Outcome.Neutral, colorChoice, game)) { - game.informPlayers(wildMongrel.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); + game.informPlayers(wildMongrel.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice()); ContinuousEffect effect = new BecomesColorTargetEffect(colorChoice.getColor(), Duration.EndOfTurn, "is " + colorChoice.getChoice()); effect.setTargetPointer(new FixedTarget(source.getSourceId())); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/sets/onslaught/AkromasBlessing.java b/Mage.Sets/src/mage/sets/onslaught/AkromasBlessing.java index dd70e9ea2d..a1b5e2f424 100644 --- a/Mage.Sets/src/mage/sets/onslaught/AkromasBlessing.java +++ b/Mage.Sets/src/mage/sets/onslaught/AkromasBlessing.java @@ -107,7 +107,7 @@ class AkromasBlessingChooseColorEffect extends OneShotEffect { if (choice.getColor() == null) { return false; } - game.informPlayers(sourceObject.getName() + ": " + controller.getName() + " has chosen " + choice.getChoice()); + game.informPlayers(sourceObject.getName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); FilterCard filterColor = new FilterCard(); filterColor.add(new ColorPredicate(choice.getColor())); filterColor.setMessage(choice.getChoice()); diff --git a/Mage.Sets/src/mage/sets/onslaught/AstralSlide.java b/Mage.Sets/src/mage/sets/onslaught/AstralSlide.java index 8cc47028c7..ce33277daf 100644 --- a/Mage.Sets/src/mage/sets/onslaught/AstralSlide.java +++ b/Mage.Sets/src/mage/sets/onslaught/AstralSlide.java @@ -92,7 +92,7 @@ class AstralSlideEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { UUID exileId = UUID.randomUUID(); - if (controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) { + if (controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) { //create delayed triggered ability AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(exileId, Zone.BATTLEFIELD, false)); delayedAbility.setSourceId(source.getSourceId()); diff --git a/Mage.Sets/src/mage/sets/onslaught/ChainOfVapor.java b/Mage.Sets/src/mage/sets/onslaught/ChainOfVapor.java index 2d00b1f51b..4e677aad2c 100644 --- a/Mage.Sets/src/mage/sets/onslaught/ChainOfVapor.java +++ b/Mage.Sets/src/mage/sets/onslaught/ChainOfVapor.java @@ -116,7 +116,7 @@ class ChainOfVaporEffect extends OneShotEffect { if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } - game.informPlayers(player.getName() + " copies " + activateMessage); + game.informPlayers(player.getLogName() + " copies " + activateMessage); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/phyrexiavsthecoalition/DarigaazTheIgniter.java b/Mage.Sets/src/mage/sets/phyrexiavsthecoalition/DarigaazTheIgniter.java index e15861e977..b817645245 100644 --- a/Mage.Sets/src/mage/sets/phyrexiavsthecoalition/DarigaazTheIgniter.java +++ b/Mage.Sets/src/mage/sets/phyrexiavsthecoalition/DarigaazTheIgniter.java @@ -107,7 +107,7 @@ class DarigaazTheIgniterEffect extends OneShotEffect { } if (choice.getColor() != null) { - game.informPlayers(controller.getName() + " chooses " + choice.getColor()); + game.informPlayers(controller.getLogName() + " chooses " + choice.getColor()); Player damagedPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (damagedPlayer != null) { damagedPlayer.revealCards("hand of " + damagedPlayer.getName(), damagedPlayer.getHand(), game); diff --git a/Mage.Sets/src/mage/sets/planarchaos/Extirpate.java b/Mage.Sets/src/mage/sets/planarchaos/Extirpate.java index 02837c1e70..3fc6247b90 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/Extirpate.java +++ b/Mage.Sets/src/mage/sets/planarchaos/Extirpate.java @@ -125,7 +125,7 @@ class ExtirpateEffect extends OneShotEffect { } // search cards in hand - filterNamedCard.setMessage("card named " + chosenCard.getName() + " in the hand of " + owner.getName()); + filterNamedCard.setMessage("card named " + chosenCard.getLogName() + " in the hand of " + owner.getLogName()); TargetCardInHand targetCardInHand = new TargetCardInHand(0, Integer.MAX_VALUE, filterNamedCard); if (controller.choose(Outcome.Exile, owner.getHand(), targetCardInHand, game)) { List targets = targetCardInHand.getTargets(); diff --git a/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java b/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java index 6be8869dd3..0bd95f4c0a 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java +++ b/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java @@ -104,7 +104,7 @@ class IntetTheDreamerExileEffect extends OneShotEffect { MageObject sourceObject = source.getSourceObject(game); if (card != null && sourceObject != null) { UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); - player.moveCardToExileWithInfo(card, exileZoneId, sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, false); + player.moveCardToExileWithInfo(card, exileZoneId, sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, false); card.setFaceDown(true, game); return true; } @@ -151,7 +151,7 @@ class IntetTheDreamerEffect extends AsThoughEffectImpl { if (controller.chooseUse(outcome, "Look at the card?", game)) { Cards cards = new CardsImpl(); cards.add(card); - controller.lookAtCards(sourceObject.getLogName(), cards, game); + controller.lookAtCards(sourceObject.getName(), cards, game); return false; } controller.setCastSourceIdWithoutMana(objectId); diff --git a/Mage.Sets/src/mage/sets/planarchaos/Phantasmagorian.java b/Mage.Sets/src/mage/sets/planarchaos/Phantasmagorian.java index 630a7fa050..4bcfb976c1 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/Phantasmagorian.java +++ b/Mage.Sets/src/mage/sets/planarchaos/Phantasmagorian.java @@ -109,7 +109,7 @@ class CounterSourceEffect extends OneShotEffect { if(player.chooseUse(Outcome.Detriment, "Discard three cards to counter " + spell.getName() + "?", game)){ DiscardTargetCost cost = new DiscardTargetCost(new TargetCardInHand(3, 3, new FilterCard())); if(cost.pay(source, game, source.getSourceId(), uuid, false)){ - game.informPlayers(player.getName() + " discards 3 cards to counter " + spell.getName() + "."); + game.informPlayers(player.getLogName() + " discards 3 cards to counter " + spell.getName() + "."); game.getStack().counter(spell.getId(), source.getSourceId(), game); return true; } diff --git a/Mage.Sets/src/mage/sets/planechase2012/MassMutiny.java b/Mage.Sets/src/mage/sets/planechase2012/MassMutiny.java index b6c061cc7a..9a85a24a36 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/MassMutiny.java +++ b/Mage.Sets/src/mage/sets/planechase2012/MassMutiny.java @@ -72,7 +72,7 @@ public class MassMutiny extends CardImpl { Player opponent = game.getPlayer(opponentId); if (opponent != null) { ability.getTargets().clear(); - FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature from opponent ").append(opponent.getName()).toString()); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature from opponent " + opponent.getLogName()); filter.add(new ControllerIdPredicate(opponentId)); TargetCreaturePermanent target = new TargetCreaturePermanent(0,1, filter,false); ability.addTarget(target); diff --git a/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java b/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java index 3d9fc4a149..e068da9d60 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java +++ b/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java @@ -149,7 +149,7 @@ class WhirlpoolWarriorActivatedEffect extends OneShotEffect { card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); } } - game.informPlayers(player.getName() + " shuffles the cards from his or her hand into his or her library"); + game.informPlayers(player.getLogName() + " shuffles the cards from his or her hand into his or her library"); player.shuffleLibrary(game); player.drawCards(cardsHand, game); } diff --git a/Mage.Sets/src/mage/sets/planeshift/SkyshipWeatherlight.java b/Mage.Sets/src/mage/sets/planeshift/SkyshipWeatherlight.java index c07f29f080..341b2d8ab9 100644 --- a/Mage.Sets/src/mage/sets/planeshift/SkyshipWeatherlight.java +++ b/Mage.Sets/src/mage/sets/planeshift/SkyshipWeatherlight.java @@ -98,7 +98,7 @@ class SkyshipWeatherlightEffect extends SearchEffect { for (UUID cardID : target.getTargets()) { Card card = controller.getLibrary().getCard(cardID, game); if (card != null) { - controller.moveCardToExileWithInfo(card, exileZone, sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, true); + controller.moveCardToExileWithInfo(card, exileZone, sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); } } } diff --git a/Mage.Sets/src/mage/sets/ravnica/BottledCloister.java b/Mage.Sets/src/mage/sets/ravnica/BottledCloister.java index 1abbb400e6..a621354a49 100644 --- a/Mage.Sets/src/mage/sets/ravnica/BottledCloister.java +++ b/Mage.Sets/src/mage/sets/ravnica/BottledCloister.java @@ -104,7 +104,7 @@ class BottledCloisterExileEffect extends OneShotEffect { card.moveToExile(exileId, sourcePermanent.getName(), source.getSourceId(), game); card.setFaceDown(true, game); } - game.informPlayers(sourcePermanent.getName() + ": " + controller.getName() + " exiles his or her hand face down (" + numberOfCards + "card" + (numberOfCards > 1 ?"s":"") +")"); + game.informPlayers(sourcePermanent.getName() + ": " + controller.getLogName() + " exiles his or her hand face down (" + numberOfCards + "card" + (numberOfCards > 1 ?"s":"") +")"); } return true; } @@ -146,7 +146,7 @@ class BottledCloisterReturnEffect extends OneShotEffect { } } if (numberOfCards > 0) { - game.informPlayers(sourcePermanent.getLogName() + ": " + controller.getName() + " returns "+ numberOfCards + " card" + (numberOfCards > 1 ?"s":"") + " from exile to hand"); + game.informPlayers(sourcePermanent.getLogName() + ": " + controller.getLogName() + " returns "+ numberOfCards + " card" + (numberOfCards > 1 ?"s":"") + " from exile to hand"); } return true; } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/DesecrationDemon.java b/Mage.Sets/src/mage/sets/returntoravnica/DesecrationDemon.java index b982f79435..3caa252cb6 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/DesecrationDemon.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/DesecrationDemon.java @@ -103,13 +103,13 @@ class DesecrationDemonEffect extends OneShotEffect { filter.add(new ControllerPredicate(TargetController.YOU)); TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false); if (target.canChoose(opponent.getId(), game)) { - if (opponent.chooseUse(Outcome.AIDontUseIt, new StringBuilder("Sacrifice a creature to tap ").append(descrationDemon.getName()).append("and put a +1/+1 counter on it?").toString(), game)) + if (opponent.chooseUse(Outcome.AIDontUseIt, "Sacrifice a creature to tap " + descrationDemon.getLogName() + "and put a +1/+1 counter on it?", game)) { opponent.choose(Outcome.Sacrifice, target, source.getSourceId(), game); Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { permanent.sacrifice(source.getSourceId(), game); - game.informPlayers(new StringBuilder(opponent.getName()).append(" sacrifices ").append(permanent.getName()).append(" to tap ").append(descrationDemon.getName()).append(". A +1/+1 counter was put on it").toString()); + game.informPlayers(opponent.getLogName() + " sacrifices " + permanent.getLogName() + " to tap " + descrationDemon.getLogName() + ". A +1/+1 counter was put on it"); descrationDemon.tap(game); descrationDemon.addCounters(CounterType.P1P1.createInstance(), game); } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/DetentionSphere.java b/Mage.Sets/src/mage/sets/returntoravnica/DetentionSphere.java index f8d49279e9..768775cb50 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/DetentionSphere.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/DetentionSphere.java @@ -114,12 +114,12 @@ class DetentionSphereEntersEffect extends OneShotEffect { if (sourceObject != null && exileId != null && targetPermanent != null && controller != null) { if (targetPermanent.getName().isEmpty()) { // face down creature - controller.moveCardToExileWithInfo(targetPermanent, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); + controller.moveCardToExileWithInfo(targetPermanent, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); } else { - String name = targetPermanent.getLogName(); + String name = targetPermanent.getName(); for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { - if (permanent != null && permanent.getLogName().equals(name)) { - controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); + if (permanent != null && permanent.getName().equals(name)) { + controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); } } } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/FiremindsForesight.java b/Mage.Sets/src/mage/sets/returntoravnica/FiremindsForesight.java index d28df37e41..cb996fe6f8 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/FiremindsForesight.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/FiremindsForesight.java @@ -119,7 +119,7 @@ class FiremindsForesightSearchEffect extends OneShotEffect { Card card = player.getLibrary().remove(cardId, game); if (card != null){ card.moveToZone(Zone.HAND, source.getSourceId(), game, false); - game.informPlayers(sourceCard.getName()+": " + player.getName() + " chose " + card.getName() ); + game.informPlayers(sourceCard.getName()+": " + player.getLogName() + " chose " + card.getName() ); cardsInLibrary.remove(card); cardToReveal.add(card); player.revealCards(sourceCard.getName(), cardToReveal, game); diff --git a/Mage.Sets/src/mage/sets/returntoravnica/GrislySalvage.java b/Mage.Sets/src/mage/sets/returntoravnica/GrislySalvage.java index 509ccbec06..6dafb2fa83 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/GrislySalvage.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/GrislySalvage.java @@ -109,7 +109,7 @@ class GrislySalvageEffect extends OneShotEffect { } if (!cards.isEmpty()) { - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); TargetCard target = new TargetCard(Zone.LIBRARY, filterPutInHand); if (properCardFound && controller.choose(Outcome.DrawCard, cards, target, game)) { Card card = game.getCard(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/returntoravnica/GuildFeud.java b/Mage.Sets/src/mage/sets/returntoravnica/GuildFeud.java index 2c30a39eb8..7cd8fe1722 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/GuildFeud.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/GuildFeud.java @@ -111,7 +111,7 @@ class GuildFeudEffect extends OneShotEffect { } } } - player.revealCards(player.getName() + " top three library cards", topThreeCards, game); + player.revealCards(player.getLogName() + " top three library cards", topThreeCards, game); Card creatureToBattlefield; if (!topThreeCards.isEmpty()) { if (player.chooseUse(Outcome.PutCreatureInPlay, "Put a creature card among them to the battlefield?", game)) { @@ -124,7 +124,7 @@ class GuildFeudEffect extends OneShotEffect { topThreeCards.remove(creatureToBattlefield); if (creatureToBattlefield.putOntoBattlefield(game, Zone.PICK, source.getSourceId(), player.getId())) { - game.informPlayers("Guild Feud: " + player.getName() + " put " + creatureToBattlefield.getName() + " to the battlefield"); + game.informPlayers("Guild Feud: " + player.getLogName() + " put " + creatureToBattlefield.getName() + " to the battlefield"); if (activePlayer == 0) { opponentCreature = game.getPermanent(creatureToBattlefield.getId()); } else { diff --git a/Mage.Sets/src/mage/sets/returntoravnica/JaceArchitectOfThought.java b/Mage.Sets/src/mage/sets/returntoravnica/JaceArchitectOfThought.java index f1eeaf6e9a..f9c9ad44d4 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/JaceArchitectOfThought.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/JaceArchitectOfThought.java @@ -235,7 +235,7 @@ class JaceArchitectOfThoughtEffect2 extends OneShotEffect { cardsToHand = pile1; cardsToLibrary = cards; } - game.informPlayers(player.getName() +" chose pile" + (pileChoice?"1":"2")); + game.informPlayers(player.getLogName() +" chose pile" + (pileChoice?"1":"2")); for (UUID cardUuid : cardsToHand) { Card card = cardsToHand.get(cardUuid, game); @@ -300,7 +300,7 @@ class JaceArchitectOfThoughtEffect3 extends OneShotEffect { } for (UUID playerId : controller.getInRange()) { Player player = game.getPlayer(playerId); - String playerName = new StringBuilder(player.getName()).append("'s").toString(); + String playerName = new StringBuilder(player.getLogName()).append("'s").toString(); if (source.getControllerId().equals(player.getId())) { playerName = "your"; } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/PalisadeGiant.java b/Mage.Sets/src/mage/sets/returntoravnica/PalisadeGiant.java index f264c80e8f..672cab8fe3 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/PalisadeGiant.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/PalisadeGiant.java @@ -150,7 +150,7 @@ class PalisadeGiantReplacementEffect extends ReplacementEffectImpl { else { Player targetPlayer = game.getPlayer(event.getTargetId()); if (targetPlayer != null) { - message.append(targetPlayer.getName()); + message.append(targetPlayer.getLogName()); } else { message.append("unknown"); diff --git a/Mage.Sets/src/mage/sets/returntoravnica/RakdosCharm.java b/Mage.Sets/src/mage/sets/returntoravnica/RakdosCharm.java index abc02b708d..ca28bc80c6 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/RakdosCharm.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/RakdosCharm.java @@ -105,7 +105,7 @@ public class RakdosCharm extends CardImpl { Player controller = game.getPlayer(permanent.getControllerId()); if (controller != null) { controller.damage(1, permanent.getId(), game, false, true); - game.informPlayers("1 damage to " + controller.getName() + " from " + permanent.getName()); + game.informPlayers("1 damage to " + controller.getLogName() + " from " + permanent.getName()); } } return true; diff --git a/Mage.Sets/src/mage/sets/returntoravnica/ShriekingAffliction.java b/Mage.Sets/src/mage/sets/returntoravnica/ShriekingAffliction.java index ba52624dbe..dd80626f93 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/ShriekingAffliction.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/ShriekingAffliction.java @@ -135,7 +135,7 @@ class ShriekingAfflictionTargetEffect extends OneShotEffect { if (player != null && player.getHand().size() < 2) { Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent != null) { - game.informPlayers(sourcePermanent.getName() + ": " + player.getName() + " loses 3 life"); + game.informPlayers(sourcePermanent.getName() + ": " + player.getLogName() + " loses 3 life"); } player.loseLife(3, game); return true; diff --git a/Mage.Sets/src/mage/sets/returntoravnica/TabletOfTheGuilds.java b/Mage.Sets/src/mage/sets/returntoravnica/TabletOfTheGuilds.java index 6e0a57ee64..9d6141b3a9 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/TabletOfTheGuilds.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/TabletOfTheGuilds.java @@ -106,7 +106,7 @@ class TabletOfTheGuildsEntersBattlefieldEffect extends OneShotEffect { } game.getState().setValue(permanent.getId() + "_color2", colorChoice.getColor().toString()); colors = colors + colorChoice.getChoice().toLowerCase(); - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colors); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + colors); } return false; } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/TavernSwindler.java b/Mage.Sets/src/mage/sets/returntoravnica/TavernSwindler.java index f6049e2e5d..c5473d76dc 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/TavernSwindler.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/TavernSwindler.java @@ -91,7 +91,7 @@ class TavernSwindlerEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (controller.flipCoin(game)) { - game.informPlayers(controller.getName() + " got " + controller.gainLife(6, game)+ " live"); + game.informPlayers(controller.getLogName() + " got " + controller.gainLife(6, game)+ " live"); } } return false; diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/CurseOfWizardry.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CurseOfWizardry.java index 4f6b1818ee..765c9420e8 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/CurseOfWizardry.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CurseOfWizardry.java @@ -95,7 +95,7 @@ class CurseOfWizardryChooseColorEffect extends OneShotEffect { if (player != null && curseOfWizardry != null) { ChoiceColor colorChoice = new ChoiceColor(); if (player.choose(Outcome.Detriment, colorChoice, game)) { - game.informPlayers(curseOfWizardry.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); + game.informPlayers(curseOfWizardry.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(curseOfWizardry.getId() + "_color", colorChoice.getColor()); curseOfWizardry.addInfo("chosen color", "Chosen color: " + colorChoice.getColor().getDescription() + "", game); } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/RealmsUncharted.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/RealmsUncharted.java index 3e9387e775..628f32db77 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/RealmsUncharted.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/RealmsUncharted.java @@ -108,7 +108,7 @@ class RealmsUnchartedEffect extends OneShotEffect { cards.add(card); } } - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); CardsImpl cardsToKeep = new CardsImpl(); if (cards.size() > 2) { diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SurrealMemoir.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SurrealMemoir.java index e7dbf839e7..b2f3ba73a4 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SurrealMemoir.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SurrealMemoir.java @@ -97,7 +97,7 @@ class SurrealMemoirEffect extends OneShotEffect { Random rnd = new Random(); Card card = cards[rnd.nextInt(cards.length)]; card.moveToZone(Zone.HAND, source.getSourceId(), game, true); - game.informPlayers(card.getName() + "returned to the hand of" + player.getName()); + game.informPlayers(card.getName() + "returned to the hand of" + player.getLogName()); return true; } } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java index 9751ecb7bb..af22a86067 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java @@ -93,14 +93,14 @@ class BloodClockEffect extends OneShotEffect { } if (player.getLife() > 2 && player.chooseUse(Outcome.Neutral, "Pay 2 life? If you don't, return a permanent you control to its owner's hand.", game)) { player.loseLife(2, game); - game.informPlayers(player.getName() + " pays 2 life. He will not return a permanent he or she controls."); + game.informPlayers(player.getLogName() + " pays 2 life. He will not return a permanent he or she controls."); return true; } else { Target target = new TargetControlledPermanent(); if (target.canChoose(source.getSourceId(), player.getId(), game) && player.chooseTarget(outcome, target, source, game)) { Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { - game.informPlayers(player.getName() + " returns " + permanent.getName() + " to hand."); + game.informPlayers(player.getLogName() + " returns " + permanent.getName() + " to hand."); return permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java index b28bd2b792..95a195ae04 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java @@ -93,7 +93,7 @@ class ChoiceOfDamnationsEffect extends OneShotEffect { int amount = targetPlayer.getAmount(0, Integer.MAX_VALUE, "Chooses a number", game); Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - String sb = String.valueOf("Shall " + targetPlayer.getName() + " lose ") + Integer.toString(amount) + " life?"; + String sb = String.valueOf("Shall " + targetPlayer.getLogName() + " lose ") + Integer.toString(amount) + " life?"; if (controller.chooseUse(outcome, sb, game)) { targetPlayer.loseLife(amount, game); } else { diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/DescendantOfMasumaro.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/DescendantOfMasumaro.java index 1e21e307d3..30fe71593a 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/DescendantOfMasumaro.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/DescendantOfMasumaro.java @@ -102,7 +102,7 @@ class DescendantOfMasumaroEffect extends OneShotEffect { Player targetOpponent = game.getPlayer(getTargetPointer().getFirst(game, source)); if (targetOpponent != null && targetOpponent.getHand().size() > 0) { sourcePermanent.getCounters().removeCounter(CounterType.P1P1, targetOpponent.getHand().size()); - game.informPlayers(controller.getName() + " removes " + targetOpponent.getHand().size() + " +1/+1 counters from " + sourcePermanent.getLogName()); + game.informPlayers(controller.getLogName() + " removes " + targetOpponent.getHand().size() + " +1/+1 counters from " + sourcePermanent.getLogName()); } return true; } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ElderPineOfJukai.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ElderPineOfJukai.java index ff7a9ba805..f19e97deae 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ElderPineOfJukai.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ElderPineOfJukai.java @@ -103,7 +103,7 @@ class ElderPineOfJukaiEffect extends OneShotEffect { } Cards cards = new CardsImpl(); cards.addAll(controller.getLibrary().getTopCards(game, 3)); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); for (Card card: cards.getCards(game)) { if (card.getCardType().contains(CardType.LAND)) { controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/KahoMinamoHistorian.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/KahoMinamoHistorian.java index 9e6c96a56d..ec90fd5768 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/KahoMinamoHistorian.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/KahoMinamoHistorian.java @@ -122,7 +122,7 @@ class KahoMinamoHistorianEffect extends SearchEffect { for (UUID cardId : target.getTargets()) { Card card = controller.getLibrary().getCard(cardId, game); if (card != null) { - controller.moveCardToExileWithInfo(card, exileZone, sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, true); + controller.moveCardToExileWithInfo(card, exileZone, sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); } } } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/PainsReward.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/PainsReward.java index bf4539245f..e4af0b81ee 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/PainsReward.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/PainsReward.java @@ -90,23 +90,23 @@ class PainsRewardEffect extends OneShotEffect { Player winner = game.getPlayer(controller.getId()); int highBid = controller.getAmount(0, Integer.MAX_VALUE, "Choose amount of life to bid", game); - game.informPlayers(winner.getName() + " has bet " + highBid + " lifes"); + game.informPlayers(winner.getLogName() + " has bet " + highBid + " lifes"); Player currentPlayer = playerList.getNextInRange(controller, game); while (currentPlayer != winner) { - String text = winner.getName() + " has bet " + highBid + " life" + (highBid > 1 ? "s" : "") + ". Top the bid?"; + String text = winner.getLogName() + " has bet " + highBid + " life" + (highBid > 1 ? "s" : "") + ". Top the bid?"; if (currentPlayer.chooseUse(Outcome.Detriment, text, game)) { int newBid = currentPlayer.getAmount(highBid + 1, Integer.MAX_VALUE, "Choose amount of life to bid", game); if (newBid > highBid) { highBid = newBid; winner = currentPlayer; - game.informPlayers(currentPlayer.getName() + " bet " + newBid + " life" + (newBid > 1 ? "s" : "")); + game.informPlayers(currentPlayer.getLogName() + " bet " + newBid + " life" + (newBid > 1 ? "s" : "")); } } currentPlayer = playerList.getNextInRange(controller, game); } - game.informPlayers(winner.getName() + " won the auction with a bid of " + highBid + " life" + (highBid > 1 ? "s" : "")); + game.informPlayers(winner.getLogName() + " won the auction with a bid of " + highBid + " life" + (highBid > 1 ? "s" : "")); winner.loseLife(highBid, game); winner.drawCards(4, game); return true; diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SokenzanRenegade.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SokenzanRenegade.java index 99cfea299f..3713f41202 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SokenzanRenegade.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SokenzanRenegade.java @@ -124,7 +124,7 @@ class SokenzanRenegadeEffect extends OneShotEffect { effect.setTargetPointer(new FixedTarget(newController.getId())); game.addEffect(effect, source); if (!source.getControllerId().equals(newController.getId())) { - game.informPlayers(newController.getName() + " got controll of " + sourcePermanent.getLogName()); + game.informPlayers(newController.getLogName() + " got controll of " + sourcePermanent.getLogName()); } return true; } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/UndyingFlames.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/UndyingFlames.java index a05d337c04..07014e7666 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/UndyingFlames.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/UndyingFlames.java @@ -109,7 +109,7 @@ class UndyingFlamesEffect extends OneShotEffect { Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (player != null) { player.damage(card.getManaCost().convertedManaCost(), source.getSourceId(), game, false, true); - game.informPlayers(new StringBuilder(sourceCard.getName()).append(" deals ").append(damage).append(" damage to ").append(player.getName()).toString()); + game.informPlayers(new StringBuilder(sourceCard.getName()).append(" deals ").append(damage).append(" damage to ").append(player.getLogName()).toString()); applied = true; break; } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/GenesisWave.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/GenesisWave.java index 1cf4fcb544..60c365bc76 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/GenesisWave.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/GenesisWave.java @@ -102,7 +102,7 @@ class GenesisWaveEffect extends OneShotEffect { cards.add(card); } if (cards.size() > 0) { - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); FilterCard filter = new FilterCard("cards with converted mana cost " + xValue + " or less to put onto the battlefield"); filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, xValue + 1)); filter.add( diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java index 244cf5be5a..023e8de55d 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java @@ -99,7 +99,7 @@ class MoltenPsycheEffect extends OneShotEffect { card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); } } - game.informPlayers(player.getName() + " shuffles the cards from his or her hand into his or her library"); + game.informPlayers(player.getLogName() + " shuffles the cards from his or her hand into his or her library"); player.shuffleLibrary(game); player.drawCards(count, game); if (MetalcraftCondition.getInstance().apply(game, source) && !playerId.equals(source.getControllerId())) { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/MyrBattlesphere.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/MyrBattlesphere.java index 660cc56156..6b53dcbc27 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/MyrBattlesphere.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/MyrBattlesphere.java @@ -130,7 +130,7 @@ class MyrBattlesphereEffect extends OneShotEffect { } } if (tappedAmount > 0) { - game.informPlayers(new StringBuilder(controller.getName()).append(" taps ").append(tappedAmount).append(" Myrs").toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" taps ").append(tappedAmount).append(" Myrs").toString()); // boost effect game.addEffect(new BoostSourceEffect(tappedAmount, 0, Duration.EndOfTurn), source); // damage to defender diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/VenserTheSojourner.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/VenserTheSojourner.java index 985e07ae6f..111361e994 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/VenserTheSojourner.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/VenserTheSojourner.java @@ -131,7 +131,7 @@ class VenserTheSojournerEffect extends OneShotEffect { if (getTargetPointer().getFirst(game, source) != null) { Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (permanent != null) { - if (controller.moveCardToExileWithInfo(permanent, source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) { + if (controller.moveCardToExileWithInfo(permanent, source.getSourceId(), sourceObject.getName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) { //create delayed triggered ability AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD)); delayedAbility.setSourceId(source.getSourceId()); diff --git a/Mage.Sets/src/mage/sets/scourge/KaronaFalseGod.java b/Mage.Sets/src/mage/sets/scourge/KaronaFalseGod.java index 71e3318fd3..bc93b1ed61 100644 --- a/Mage.Sets/src/mage/sets/scourge/KaronaFalseGod.java +++ b/Mage.Sets/src/mage/sets/scourge/KaronaFalseGod.java @@ -154,7 +154,7 @@ class KaronaFalseGodEffect extends OneShotEffect { } String typeChosen = typeChoice.getChoice(); if (!typeChosen.isEmpty()) { - game.informPlayers(controller.getName() + " has chosen " + typeChosen); + game.informPlayers(controller.getLogName() + " has chosen " + typeChosen); FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new SubtypePredicate(typeChosen)); game.addEffect(new BoostAllEffect(3,3,Duration.EndOfTurn, filter, false), source); diff --git a/Mage.Sets/src/mage/sets/shadowmoor/AdviceFromTheFae.java b/Mage.Sets/src/mage/sets/shadowmoor/AdviceFromTheFae.java index ae8ad26b0b..402a2e440a 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/AdviceFromTheFae.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/AdviceFromTheFae.java @@ -100,7 +100,7 @@ class AdviceFromTheFaeEffect extends OneShotEffect { for (Card card : cardsFromTopLibrary) { cards.add(card); } - controller.lookAtCards(mageObject.getLogName(), cards, game); + controller.lookAtCards(mageObject.getName(), cards, game); int max = 0; for (UUID playerId : controller.getInRange()) { FilterCreaturePermanent filter = new FilterCreaturePermanent(); diff --git a/Mage.Sets/src/mage/sets/shadowmoor/FossilFind.java b/Mage.Sets/src/mage/sets/shadowmoor/FossilFind.java index 607f37cce6..328636fdec 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/FossilFind.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/FossilFind.java @@ -89,7 +89,7 @@ class FossilFindEffect extends OneShotEffect { Card card = player.getGraveyard().getRandom(game); if (card != null) { card.moveToZone(Zone.HAND, source.getSourceId(), game, true); - game.informPlayers(card.getName() + "returned to the hand of" + player.getName()); + game.informPlayers(card.getName() + "returned to the hand of" + player.getLogName()); return true; } } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/GhastlordOfFugue.java b/Mage.Sets/src/mage/sets/shadowmoor/GhastlordOfFugue.java index ec0b9809e6..188934d1d3 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/GhastlordOfFugue.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/GhastlordOfFugue.java @@ -103,7 +103,7 @@ class GhastlordOfFugueEffect extends OneShotEffect { && controller != null) { // reveal hand of target player - targetPlayer.revealCards(sourceObject.getLogName(), targetPlayer.getHand(), game); + targetPlayer.revealCards(sourceObject.getName(), targetPlayer.getHand(), game); // You choose a card from it TargetCardInHand target = new TargetCardInHand(new FilterCard()); diff --git a/Mage.Sets/src/mage/sets/shadowmoor/ImpromptuRaid.java b/Mage.Sets/src/mage/sets/shadowmoor/ImpromptuRaid.java index 583e2c8601..fa448a0c0e 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/ImpromptuRaid.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/ImpromptuRaid.java @@ -111,7 +111,7 @@ class ImpromptuRaidEffect extends OneShotEffect { Cards cards = new CardsImpl(); if (card != null) { cards.add(card); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); if (filterPutInGraveyard.match(card, source.getSourceId(), source.getControllerId(), game)) { controller.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); return true; diff --git a/Mage.Sets/src/mage/sets/shadowmoor/KnollspineDragon.java b/Mage.Sets/src/mage/sets/shadowmoor/KnollspineDragon.java index 6abdaa0a54..bc35be4cbe 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/KnollspineDragon.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/KnollspineDragon.java @@ -98,11 +98,11 @@ class KnollspineDragonEffect extends OneShotEffect { if (watcher != null) { int drawAmount = watcher.getAmountOfDamageReceivedThisTurn(targetOpponent.getId()); controller.drawCards(drawAmount, game); - game.informPlayers(controller.getName() + "draws " + drawAmount + " cards"); + game.informPlayers(controller.getLogName() + "draws " + drawAmount + " cards"); return true; } } - game.informPlayers(controller.getName() + "drew no cards"); + game.informPlayers(controller.getLogName() + "drew no cards"); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/shadowmoor/LureboundScarecrow.java b/Mage.Sets/src/mage/sets/shadowmoor/LureboundScarecrow.java index 288e5cb8cf..68066d7030 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/LureboundScarecrow.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/LureboundScarecrow.java @@ -98,7 +98,7 @@ class LureboundScarecrowChooseColorEffect extends OneShotEffect { if (player != null && sourceStackObject != null && permanent != null) { ChoiceColor colorChoice = new ChoiceColor(); if (player.choose(Outcome.BoostCreature, colorChoice, game)) { - game.informPlayers(sourceStackObject.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); + game.informPlayers(sourceStackObject.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor()); permanent.addInfo("chosen color", new StringBuilder("Chosen color: ").append(colorChoice.getColor().getDescription()).append("").toString(), game); } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/MedicineRunner.java b/Mage.Sets/src/mage/sets/shadowmoor/MedicineRunner.java index b11ab87ecd..002c393ef7 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/MedicineRunner.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/MedicineRunner.java @@ -141,7 +141,7 @@ class RemoveCounterTargetEffect extends OneShotEffect { permanent.getCounters().removeCounter(counterName); } result |= true; - game.informPlayers(new StringBuilder(controller.getName()).append(" removes a ").append(counterName).append(" counter from ").append(permanent.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" removes a ").append(counterName).append(" counter from ").append(permanent.getName()).toString()); } } } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/PaintersServant.java b/Mage.Sets/src/mage/sets/shadowmoor/PaintersServant.java index db41305754..18dbad17b8 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/PaintersServant.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/PaintersServant.java @@ -102,7 +102,7 @@ class ChooseColorEffect extends OneShotEffect { if (player != null && permanent != null) { ChoiceColor colorChoice = new ChoiceColor(); if (player.choose(Outcome.Neutral, colorChoice, game)) { - game.informPlayers(new StringBuilder(permanent.getName()).append(": ").append(player.getName()).append(" has chosen ").append(colorChoice.getChoice()).toString()); + game.informPlayers(new StringBuilder(permanent.getName()).append(": ").append(player.getLogName()).append(" has chosen ").append(colorChoice.getChoice()).toString()); game.getState().setValue(source.getSourceId() + "_color", colorChoice.getColor()); permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getColor().getDescription() + "", game); } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/PaleWayfarer.java b/Mage.Sets/src/mage/sets/shadowmoor/PaleWayfarer.java index 2d25615796..c8c2caf8c5 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/PaleWayfarer.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/PaleWayfarer.java @@ -99,7 +99,7 @@ class PaleWayfarerEffect extends OneShotEffect { if (player != null) { ChoiceColor colorChoice = new ChoiceColor(); if (player.choose(Outcome.Neutral, colorChoice, game)) { - game.informPlayers(targetCreature.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); + game.informPlayers(targetCreature.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(targetCreature.getId() + "_color", colorChoice.getColor()); } } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/PlagueOfVermin.java b/Mage.Sets/src/mage/sets/shadowmoor/PlagueOfVermin.java index 259966b2f4..0ee7214ad8 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/PlagueOfVermin.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/PlagueOfVermin.java @@ -118,7 +118,7 @@ class PlagueOfVerminEffect extends OneShotEffect { payLife.put(currentPlayer.getId(), currentLifePaid + totalPaidLife); } } - game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(currentPlayer.getName()).append(" pays ").append(payLife.get(currentPlayer.getId())).append(" life").toString()); + game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(currentPlayer.getLogName()).append(" pays ").append(payLife.get(currentPlayer.getId())).append(" life").toString()); firstInactivePlayer = null; } } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/PuresightMerrow.java b/Mage.Sets/src/mage/sets/shadowmoor/PuresightMerrow.java index a6423e24b9..2f643cf339 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/PuresightMerrow.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/PuresightMerrow.java @@ -107,7 +107,7 @@ class PuresightMerrowEffect extends OneShotEffect { if (controller.chooseUse(Outcome.Removal, "Do you wish to exile the card from the top of your library?", game)) { controller.moveCardToExileWithInfo(card, source.getSourceId(), "Puresight Merrow", source.getSourceId(), game, Zone.LIBRARY, true); } else { - game.informPlayers(controller.getName() + " puts the card back on top of their library."); + game.informPlayers(controller.getLogName() + " puts the card back on top of their library."); } return true; } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/WheelOfSunAndMoon.java b/Mage.Sets/src/mage/sets/shadowmoor/WheelOfSunAndMoon.java index 2a72c839f4..ab0b4277c2 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/WheelOfSunAndMoon.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/WheelOfSunAndMoon.java @@ -133,7 +133,7 @@ class WheelOfSunAndMoonEffect extends ReplacementEffectImpl { if (card != null) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; Cards cards = new CardsImpl(card); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, zEvent.getFromZone(), false, true); return true; } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java b/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java index b8dfd38cba..f53143dc2d 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java @@ -140,7 +140,7 @@ class BrilliantUltimatumEffect extends OneShotEffect { boolean choice = you.choosePile(Outcome.PlayForFree, "Which pile (play for free)?", pileOne, pileTwo, game); if (choice) { - game.informPlayer(you, you.getName() + " chose Pile 1."); + game.informPlayer(you, you.getLogName() + " chose Pile 1."); while (!pileOne.isEmpty() && you.chooseUse(Outcome.PlayForFree, "Do you want to play a card from Pile 1?", game)) { TargetCard targetExiledCard = new TargetCard(Zone.EXILED, new FilterCard()); if (you.chooseTarget(Outcome.PlayForFree, pile1, targetExiledCard, source, game)) { @@ -159,7 +159,7 @@ class BrilliantUltimatumEffect extends OneShotEffect { } } } else { - game.informPlayer(you, you.getName() + " chose Pile 2."); + game.informPlayer(you, you.getLogName() + " chose Pile 2."); while (!pileTwo.isEmpty() && you.chooseUse(Outcome.PlayForFree, "Do you want to play a card from Pile 2?", game)) { TargetCard targetExiledCard = new TargetCard(Zone.EXILED, new FilterCard()); if (you.chooseTarget(Outcome.PlayForFree, pile2, targetExiledCard, source, game)) { diff --git a/Mage.Sets/src/mage/sets/shardsofalara/CovenantOfMinds.java b/Mage.Sets/src/mage/sets/shardsofalara/CovenantOfMinds.java index 8bb39c490d..e22555dd56 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/CovenantOfMinds.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/CovenantOfMinds.java @@ -103,7 +103,7 @@ class CovenantOfMindsEffect extends OneShotEffect { player.revealCards("Covenant of Minds", cards, game); StringBuilder sb = new StringBuilder(); - sb.append("Put the revealed cards into ").append(player.getName()).append("'s hand?"); + sb.append("Put the revealed cards into ").append(player.getLogName()).append("'s hand?"); sb.append(" If you don't, those cards are put into his graveyard and he will draw five cards."); Zone zone = Zone.GRAVEYARD; @@ -118,7 +118,7 @@ class CovenantOfMindsEffect extends OneShotEffect { } } else { StringBuilder sb = new StringBuilder(); - sb.append(player.getName()).append("'s library is empty? Do you want him to draw five cards?"); + sb.append(player.getLogName()).append("'s library is empty? Do you want him to draw five cards?"); if (!opponent.chooseUse(Outcome.Benefit, sb.toString(), game)) { player.drawCards(5, game); } diff --git a/Mage.Sets/src/mage/sets/stronghold/CrovaxTheCursed.java b/Mage.Sets/src/mage/sets/stronghold/CrovaxTheCursed.java index 9028a043d2..903d9c6f3c 100644 --- a/Mage.Sets/src/mage/sets/stronghold/CrovaxTheCursed.java +++ b/Mage.Sets/src/mage/sets/stronghold/CrovaxTheCursed.java @@ -115,13 +115,13 @@ class CrovaxTheCursedEffect extends OneShotEffect { if (new SacrificeControllerEffect(new FilterCreaturePermanent(), 1, "").apply(game, source)) { if (sourceObject != null) { sourceObject.getCounters().addCounter(CounterType.P1P1.createInstance()); - game.informPlayers(controller.getName() + " puts a +1/+1 counter on " + sourceObject.getName()); + game.informPlayers(controller.getLogName() + " puts a +1/+1 counter on " + sourceObject.getName()); } } } else { if (sourceObject != null && sourceObject.getCounters().containsKey(CounterType.P1P1)) { sourceObject.getCounters().removeCounter(CounterType.P1P1, 1); - game.informPlayers(controller.getName() + " removes a +1/+1 counter from " + sourceObject.getName()); + game.informPlayers(controller.getLogName() + " removes a +1/+1 counter from " + sourceObject.getName()); } } return true; diff --git a/Mage.Sets/src/mage/sets/stronghold/HermitDruid.java b/Mage.Sets/src/mage/sets/stronghold/HermitDruid.java index ca1b11557a..01963c7225 100644 --- a/Mage.Sets/src/mage/sets/stronghold/HermitDruid.java +++ b/Mage.Sets/src/mage/sets/stronghold/HermitDruid.java @@ -130,7 +130,7 @@ class HermitDruidEffect extends OneShotEffect { if (card != null) { cards.add(card); } - player.revealCards(sourceObject.getLogName(), cards, game); + player.revealCards(sourceObject.getName(), cards, game); } return true; } diff --git a/Mage.Sets/src/mage/sets/stronghold/ShamanEnKor.java b/Mage.Sets/src/mage/sets/stronghold/ShamanEnKor.java index 45329b2df9..4fc4630be7 100644 --- a/Mage.Sets/src/mage/sets/stronghold/ShamanEnKor.java +++ b/Mage.Sets/src/mage/sets/stronghold/ShamanEnKor.java @@ -197,7 +197,7 @@ class ShamanEnKorReplacementEffect extends ReplacementEffectImpl { else { Player targetPlayer = game.getPlayer(event.getTargetId()); if (targetPlayer != null) { - message.append(targetPlayer.getName()); + message.append(targetPlayer.getLogName()); } else { message.append("unknown"); diff --git a/Mage.Sets/src/mage/sets/tempest/CursedScroll.java b/Mage.Sets/src/mage/sets/tempest/CursedScroll.java index e25bd3e206..110111ffe0 100644 --- a/Mage.Sets/src/mage/sets/tempest/CursedScroll.java +++ b/Mage.Sets/src/mage/sets/tempest/CursedScroll.java @@ -99,7 +99,7 @@ class CursedScrollEffect extends OneShotEffect { Cards revealed = new CardsImpl(); Card card = you.getHand().getRandom(game); revealed.add(card); - you.revealCards(sourceObject.getLogName(), revealed, game); + you.revealCards(sourceObject.getName(), revealed, game); if (card.getName().equals(cardName)) { Permanent creature = game.getPermanent(targetPointer.getFirst(game, source)); if (creature != null) { diff --git a/Mage.Sets/src/mage/sets/tempest/LegacysAllure.java b/Mage.Sets/src/mage/sets/tempest/LegacysAllure.java index 915cd8b689..902a744273 100644 --- a/Mage.Sets/src/mage/sets/tempest/LegacysAllure.java +++ b/Mage.Sets/src/mage/sets/tempest/LegacysAllure.java @@ -58,14 +58,12 @@ public class LegacysAllure extends CardImpl { super(ownerId, 71, "Legacy's Allure", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); this.expansionSetCode = "TMP"; - this.color.setBlue(true); - // At the beginning of your upkeep, you may put a treasure counter on Legacy's Allure. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(new Counter("treasure")), TargetController.YOU, true)); // Sacrifice Legacy's Allure: Gain control of target creature with power less than or equal to the number of treasure counters on Legacy's Allure. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainControlTargetEffect(Duration.EndOfGame, true),new SacrificeSourceCost()); - ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on Legacy's Allure"))); + ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on " + getLogName()))); this.addAbility(ability); } @@ -79,7 +77,7 @@ public class LegacysAllure extends CardImpl { Permanent sourcePermanent = game.getPermanent(ability.getSourceId()); if (sourcePermanent != null) { int numbCounters = sourcePermanent.getCounters().getCount("treasure"); - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on Legacy's Allure"); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on " + getLogName()); filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, numbCounters + 1)); ability.getTargets().clear(); ability.getTargets().add(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/tempest/LivingDeath.java b/Mage.Sets/src/mage/sets/tempest/LivingDeath.java index 9bf26ec389..2afec1061a 100644 --- a/Mage.Sets/src/mage/sets/tempest/LivingDeath.java +++ b/Mage.Sets/src/mage/sets/tempest/LivingDeath.java @@ -94,7 +94,7 @@ class LivingDeathEffect extends OneShotEffect { Player player = game.getPlayer(playerId); if (player != null) { for (Card card :player.getGraveyard().getCards(new FilterCreatureCard(), game)) { - controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game, Zone.GRAVEYARD, true); + controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getName(), source.getSourceId(), game, Zone.GRAVEYARD, true); } } } diff --git a/Mage.Sets/src/mage/sets/tempest/Lobotomy.java b/Mage.Sets/src/mage/sets/tempest/Lobotomy.java index 145fa76581..039f4ec719 100644 --- a/Mage.Sets/src/mage/sets/tempest/Lobotomy.java +++ b/Mage.Sets/src/mage/sets/tempest/Lobotomy.java @@ -98,7 +98,7 @@ class LobotomyEffect extends OneShotEffect { if (targetPlayer != null && sourceObject != null && controller != null) { // reveal hand of target player - targetPlayer.revealCards(sourceObject.getLogName(), targetPlayer.getHand(), game); + targetPlayer.revealCards(sourceObject.getName(), targetPlayer.getHand(), game); // You choose card other than a basic land card TargetCardInHand target = new TargetCardInHand(filter); diff --git a/Mage.Sets/src/mage/sets/tempest/ScrollRack.java b/Mage.Sets/src/mage/sets/tempest/ScrollRack.java index 455dc63578..50cf767d80 100644 --- a/Mage.Sets/src/mage/sets/tempest/ScrollRack.java +++ b/Mage.Sets/src/mage/sets/tempest/ScrollRack.java @@ -101,7 +101,7 @@ class ScrollRackEffect extends OneShotEffect { for (UUID targetId : targets) { Card card = game.getCard(targetId); if (card != null) { - if (card.moveToExile(source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game)) { + if (card.moveToExile(source.getSourceId(), sourceObject.getName(), source.getSourceId(), game)) { card.setFaceDown(true, game); amountExiled++; } @@ -109,7 +109,7 @@ class ScrollRackEffect extends OneShotEffect { } } } - game.informPlayers(controller.getName() + " exiles " + amountExiled + " card" + (amountExiled == 1 ? " ":"s ") + "face down from his or her hand"); + game.informPlayers(controller.getLogName() + " exiles " + amountExiled + " card" + (amountExiled == 1 ? " ":"s ") + "face down from his or her hand"); if (amountExiled > 0) { int count = Math.min(controller.getLibrary().size(), amountExiled); for (int i = 0; i < count; i++) { @@ -119,13 +119,13 @@ class ScrollRackEffect extends OneShotEffect { } } } - game.informPlayers(controller.getName() + " moves " + amountExiled + " card" + (amountExiled == 1 ? " ":"s ") + "from library to hand"); + game.informPlayers(controller.getLogName() + " moves " + amountExiled + " card" + (amountExiled == 1 ? " ":"s ") + "from library to hand"); TargetCardInExile target2 = new TargetCardInExile(filter2, source.getSourceId()); ExileZone scrollRackExileZone = game.getExile().getExileZone(source.getSourceId()); if (scrollRackExileZone != null) { while (controller.isInGame() && scrollRackExileZone.count(filter, game) > 1) { - controller.lookAtCards("exiled cards with " + sourceObject.getLogName(), scrollRackExileZone, game); + controller.lookAtCards("exiled cards with " + sourceObject.getName(), scrollRackExileZone, game); controller.choose(Outcome.Neutral, scrollRackExileZone, target2, game); Card card = game.getCard(target2.getFirstTarget()); if (card != null) { diff --git a/Mage.Sets/src/mage/sets/tempest/WoodSage.java b/Mage.Sets/src/mage/sets/tempest/WoodSage.java index 3634914039..9c563be407 100644 --- a/Mage.Sets/src/mage/sets/tempest/WoodSage.java +++ b/Mage.Sets/src/mage/sets/tempest/WoodSage.java @@ -116,7 +116,7 @@ class WoodSageEffect extends OneShotEffect { cards.addAll(controller.getLibrary().getTopCards(game, 4)); if (!cards.isEmpty()) { - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); for (Card card: cards.getCards(game)) { if (card.getName().equals(cardName)) { controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, true); diff --git a/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java b/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java index 8fb027f894..610bdfd133 100644 --- a/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java +++ b/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java @@ -128,7 +128,7 @@ class AshiokNightmareWeaverExileEffect extends OneShotEffect { for (int i = 0; i < 3; i++) { Card card = opponent.getLibrary().getFromTop(game); if (card != null) { - controller.moveCardToExileWithInfo(card, exileZone, sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, true); + controller.moveCardToExileWithInfo(card, exileZone, sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); } } return true; @@ -277,7 +277,7 @@ class AshiokNightmareWeaverExileAllEffect extends OneShotEffect { for (UUID cardId : cards) { Card card = game.getCard(cardId); if (card != null) { - controller.moveCardToExileWithInfo(card, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.HAND, true); + controller.moveCardToExileWithInfo(card, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.HAND, true); } } cards.clear(); @@ -285,7 +285,7 @@ class AshiokNightmareWeaverExileAllEffect extends OneShotEffect { for (UUID cardId :cards) { Card card = game.getCard(cardId); if (card != null) { - controller.moveCardToExileWithInfo(card, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.GRAVEYARD, true); + controller.moveCardToExileWithInfo(card, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.GRAVEYARD, true); } } } diff --git a/Mage.Sets/src/mage/sets/theros/ChainedToTheRocks.java b/Mage.Sets/src/mage/sets/theros/ChainedToTheRocks.java index a3bb45fe77..401616dcda 100644 --- a/Mage.Sets/src/mage/sets/theros/ChainedToTheRocks.java +++ b/Mage.Sets/src/mage/sets/theros/ChainedToTheRocks.java @@ -145,7 +145,7 @@ class ChainedToTheRocksEffect extends OneShotEffect { // If Chained to the Rocks leaves the battlefield before its triggered ability resolves, // the target creature won't be exiled. if (permanent != null) { - return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getLogName()).apply(game, source); + return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source); } return false; } diff --git a/Mage.Sets/src/mage/sets/theros/CommuneWithTheGods.java b/Mage.Sets/src/mage/sets/theros/CommuneWithTheGods.java index baa7f2f2b0..d69861c23d 100644 --- a/Mage.Sets/src/mage/sets/theros/CommuneWithTheGods.java +++ b/Mage.Sets/src/mage/sets/theros/CommuneWithTheGods.java @@ -114,7 +114,7 @@ class CommuneWithTheGodsEffect extends OneShotEffect { } if (!cards.isEmpty()) { - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); TargetCard target = new TargetCard(0, 1, Zone.LIBRARY, filterPutInHand); if (properCardFound && controller.choose(Outcome.DrawCard, cards, target, game)) { Card card = game.getCard(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/theros/DaxosOfMeletis.java b/Mage.Sets/src/mage/sets/theros/DaxosOfMeletis.java index ee392a9f08..a561322d07 100644 --- a/Mage.Sets/src/mage/sets/theros/DaxosOfMeletis.java +++ b/Mage.Sets/src/mage/sets/theros/DaxosOfMeletis.java @@ -121,7 +121,7 @@ class DaxosOfMeletisEffect extends OneShotEffect { Card card = damagedPlayer.getLibrary().getFromTop(game); if (card != null) { // move card to exile - controller.moveCardToExileWithInfo(card, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, true); + controller.moveCardToExileWithInfo(card, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); // player gains life int cmc = card.getManaCost().convertedManaCost(); if (cmc > 0) { diff --git a/Mage.Sets/src/mage/sets/theros/MeletisCharlatan.java b/Mage.Sets/src/mage/sets/theros/MeletisCharlatan.java index 748bf320ff..b925757ca2 100644 --- a/Mage.Sets/src/mage/sets/theros/MeletisCharlatan.java +++ b/Mage.Sets/src/mage/sets/theros/MeletisCharlatan.java @@ -114,7 +114,7 @@ class MeletisCharlatanCopyTargetSpellEffect extends OneShotEffect { if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } - game.informPlayers(player.getName() + " copies " + activateMessage);; + game.informPlayers(player.getLogName() + " copies " + activateMessage);; return true; } return false; diff --git a/Mage.Sets/src/mage/sets/theros/PsychicIntrusion.java b/Mage.Sets/src/mage/sets/theros/PsychicIntrusion.java index 4d0a3eaa4e..975237a114 100644 --- a/Mage.Sets/src/mage/sets/theros/PsychicIntrusion.java +++ b/Mage.Sets/src/mage/sets/theros/PsychicIntrusion.java @@ -103,7 +103,7 @@ class PsychicIntrusionExileEffect extends OneShotEffect { Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); MageObject sourceObject = game.getObject(source.getSourceId()); if (opponent != null && sourceObject != null) { - opponent.revealCards(sourceObject.getLogName(), opponent.getHand(), game); + opponent.revealCards(sourceObject.getName(), opponent.getHand(), game); Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int cardsGraveyard = opponent.getGraveyard().count(filter, game); @@ -137,7 +137,7 @@ class PsychicIntrusionExileEffect extends OneShotEffect { if (card != null) { // move card to exile UUID exileId = CardUtil.getCardExileZoneId(game, source); - controller.moveCardToExileWithInfo(card, exileId, sourceObject.getLogName(), source.getSourceId(), game, fromHand ? Zone.HAND:Zone.GRAVEYARD, true); + controller.moveCardToExileWithInfo(card, exileId, sourceObject.getName(), source.getSourceId(), game, fromHand ? Zone.HAND:Zone.GRAVEYARD, true); // allow to cast the card ContinuousEffect effect = new PsychicIntrusionCastFromExileEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); diff --git a/Mage.Sets/src/mage/sets/theros/PyxisOfPandemonium.java b/Mage.Sets/src/mage/sets/theros/PyxisOfPandemonium.java index df79ac0ef3..05ebfb9baa 100644 --- a/Mage.Sets/src/mage/sets/theros/PyxisOfPandemonium.java +++ b/Mage.Sets/src/mage/sets/theros/PyxisOfPandemonium.java @@ -122,7 +122,7 @@ class PyxisOfPandemoniumExileEffect extends OneShotEffect { exileIds.put(exileKey, exileId); } player.moveCardToExileWithInfo(card, exileId, - new StringBuilder(sourceObject.getLogName() +" (").append(player.getName()).append(")").toString(), + new StringBuilder(sourceObject.getName() +" (").append(player.getLogName()).append(")").toString(), source.getSourceId(), game, Zone.LIBRARY, true); card.setFaceDown(true, game); } diff --git a/Mage.Sets/src/mage/sets/theros/SteamAugury.java b/Mage.Sets/src/mage/sets/theros/SteamAugury.java index 8345e09289..d55c0665bf 100644 --- a/Mage.Sets/src/mage/sets/theros/SteamAugury.java +++ b/Mage.Sets/src/mage/sets/theros/SteamAugury.java @@ -104,7 +104,7 @@ class SteamAuguryEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.addAll(controller.getLibrary().getTopCards(game, 5)); - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); Player opponent; Set opponents = game.getOpponents(controller.getId()); @@ -140,7 +140,7 @@ class SteamAuguryEffect extends OneShotEffect { pile2CardsIds.add(card.getId()); } } - boolean choice = opponent.choosePile(Outcome.Detriment, new StringBuilder("Choose a pile to put into ").append(controller.getName()).append("'s hand.").toString(), pile1, pile2, game); + boolean choice = opponent.choosePile(Outcome.Detriment, new StringBuilder("Choose a pile to put into ").append(controller.getLogName()).append("'s hand.").toString(), pile1, pile2, game); Zone pile1Zone = Zone.GRAVEYARD; Zone pile2Zone = Zone.HAND; diff --git a/Mage.Sets/src/mage/sets/timeshifted/GaeasBlessing.java b/Mage.Sets/src/mage/sets/timeshifted/GaeasBlessing.java index 9de1bd5b44..0dc1ca3492 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/GaeasBlessing.java +++ b/Mage.Sets/src/mage/sets/timeshifted/GaeasBlessing.java @@ -184,7 +184,7 @@ class GaeasBlessingGraveToLibraryEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - game.informPlayers(new StringBuilder(controller.getName()).append(" shuffle his or her graveyard into his or her library").toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" shuffle his or her graveyard into his or her library").toString()); for (Card card: controller.getGraveyard().getCards(game)) { controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD, true, true); } diff --git a/Mage.Sets/src/mage/sets/timespiral/LivingEnd.java b/Mage.Sets/src/mage/sets/timespiral/LivingEnd.java index 1420cf0dd8..e350f20eac 100644 --- a/Mage.Sets/src/mage/sets/timespiral/LivingEnd.java +++ b/Mage.Sets/src/mage/sets/timespiral/LivingEnd.java @@ -102,7 +102,7 @@ class LivingEndEffect extends OneShotEffect { Player player = game.getPlayer(playerId); if (player != null) { for (Card card :player.getGraveyard().getCards(new FilterCreatureCard(), game)) { - controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game, Zone.GRAVEYARD, true); + controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getName(), source.getSourceId(), game, Zone.GRAVEYARD, true); } } } diff --git a/Mage.Sets/src/mage/sets/timespiral/StuffyDoll.java b/Mage.Sets/src/mage/sets/timespiral/StuffyDoll.java index 7dc9b946c4..aef854c420 100644 --- a/Mage.Sets/src/mage/sets/timespiral/StuffyDoll.java +++ b/Mage.Sets/src/mage/sets/timespiral/StuffyDoll.java @@ -107,7 +107,7 @@ class StuffyDollChoosePlayerEffect extends OneShotEffect { if (player.choose(this.outcome, target, source.getSourceId(), game)) { Player chosenPlayer = game.getPlayer(target.getFirstTarget()); if (chosenPlayer != null) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName()); game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget()); return true; } diff --git a/Mage.Sets/src/mage/sets/unlimitededition/TimeVault.java b/Mage.Sets/src/mage/sets/unlimitededition/TimeVault.java index 4c0c6768e4..e5525fea2b 100644 --- a/Mage.Sets/src/mage/sets/unlimitededition/TimeVault.java +++ b/Mage.Sets/src/mage/sets/unlimitededition/TimeVault.java @@ -121,7 +121,7 @@ class TimeVaultReplacementEffect extends ReplacementEffectImpl { if (player != null && permanent != null) { if (player.chooseUse(Outcome.Untap, "Skip your turn to untap " + permanent.getName() + "?", game)) { permanent.untap(game); - game.informPlayers(player.getName() + " skips his or her turn to untap " + permanent.getLogName()); + game.informPlayers(player.getLogName() + " skips his or her turn to untap " + permanent.getLogName()); return true; } } diff --git a/Mage.Sets/src/mage/sets/urzassaga/PhyrexianProcessor.java b/Mage.Sets/src/mage/sets/urzassaga/PhyrexianProcessor.java index 349e7ea908..6c5eab1115 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/PhyrexianProcessor.java +++ b/Mage.Sets/src/mage/sets/urzassaga/PhyrexianProcessor.java @@ -96,7 +96,7 @@ class PhyrexianProcessorEffect extends OneShotEffect { Card sourceCard = game.getCard(source.getSourceId()); int payAmount = controller.getAmount(0, controller.getLife(), staticText, game); controller.loseLife(payAmount, game); - game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getName()) + game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getLogName()) .append(" pays ").append(payAmount).append(" life.").toString()); String key = CardUtil.getCardZoneString("lifePaid", source.getSourceId(), game); game.getState().setValue(key, payAmount); diff --git a/Mage.Sets/src/mage/sets/vintagemasters/ChaosWarp.java b/Mage.Sets/src/mage/sets/vintagemasters/ChaosWarp.java index c17ca5be81..5186fc4ebf 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/ChaosWarp.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/ChaosWarp.java @@ -141,7 +141,7 @@ public ChaosWarpRevealEffect() { if (card != null) { Cards cards = new CardsImpl(); cards.add(card); - owner.revealCards(sourceObject.getLogName(), cards, game); + owner.revealCards(sourceObject.getName(), cards, game); if (new FilterPermanentCard().match(card, game)) { owner.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId()); } diff --git a/Mage.Sets/src/mage/sets/vintagemasters/CouncilsJudgment.java b/Mage.Sets/src/mage/sets/vintagemasters/CouncilsJudgment.java index 5db5ef855b..bb818127be 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/CouncilsJudgment.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/CouncilsJudgment.java @@ -96,7 +96,7 @@ class CouncilsJudgmentEffect extends OneShotEffect { if (controller != null) { Map chosenCards = new HashMap<>(2); int maxCount = 0; - FilterNonlandPermanent filter = new FilterNonlandPermanent("a nonland permanent " + controller.getName() + " doesn't control"); + FilterNonlandPermanent filter = new FilterNonlandPermanent("a nonland permanent " + controller.getLogName() + " doesn't control"); filter.add(Predicates.not(new ControllerIdPredicate(controller.getId()))); //Players each choose a legal permanent PlayerList playerList = game.getState().getPlayerList().copy(); @@ -124,7 +124,7 @@ class CouncilsJudgmentEffect extends OneShotEffect { } chosenCards.put(permanent, 1); } - game.informPlayers(player.getName() + " has chosen: " + permanent.getName()); + game.informPlayers(player.getLogName() + " has chosen: " + permanent.getName()); } } } diff --git a/Mage.Sets/src/mage/sets/vintagemasters/PleaForPower.java b/Mage.Sets/src/mage/sets/vintagemasters/PleaForPower.java index 0a0668a2d9..c52d1898eb 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/PleaForPower.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/PleaForPower.java @@ -88,11 +88,11 @@ class PleaForPowerEffect extends OneShotEffect { Player player = game.getPlayer(playerId); if (player.chooseUse(Outcome.ExtraTurn, "Choose time?", game)) { timeCount++; - game.informPlayers(player.getName() + " has chosen: time"); + game.informPlayers(player.getLogName() + " has chosen: time"); } else { knowledgeCount++; - game.informPlayers(player.getName() + " has chosen: knowledge"); + game.informPlayers(player.getLogName() + " has chosen: knowledge"); } } if (timeCount > knowledgeCount) { diff --git a/Mage.Sets/src/mage/sets/visions/GoblinRecruiter.java b/Mage.Sets/src/mage/sets/visions/GoblinRecruiter.java index e8f73ed7b9..9e5507b369 100644 --- a/Mage.Sets/src/mage/sets/visions/GoblinRecruiter.java +++ b/Mage.Sets/src/mage/sets/visions/GoblinRecruiter.java @@ -140,7 +140,7 @@ class GoblinRecruiterEffect extends OneShotEffect { } } - game.informPlayers(new StringBuilder(player.getName()).append(" puts ") + game.informPlayers(new StringBuilder(player.getLogName()).append(" puts ") .append(numberOfGoblins).append(" Goblin").append(numberOfGoblins == 1 ? " card" : " cards") .append(" on top of his library").toString()); diff --git a/Mage.Sets/src/mage/sets/weatherlight/Tariff.java b/Mage.Sets/src/mage/sets/weatherlight/Tariff.java index 3d2c627465..56637675f1 100644 --- a/Mage.Sets/src/mage/sets/weatherlight/Tariff.java +++ b/Mage.Sets/src/mage/sets/weatherlight/Tariff.java @@ -121,13 +121,13 @@ class TariffEffect extends OneShotEffect { if (player.chooseUse(Outcome.Benefit, message, game)) { if (manaCost.pay(source, game, source.getSourceId(), player.getId(), false)) { game.informPlayers(new StringBuilder(sourceObject != null ? sourceObject.getName() : "") - .append(": ").append(player.getName()).append(" has paid").toString()); + .append(": ").append(player.getLogName()).append(" has paid").toString()); return; } } game.informPlayers(new StringBuilder(sourceObject != null ? sourceObject.getName() : "") - .append(": ").append(player.getName()).append(" hasn't paid").toString()); + .append(": ").append(player.getLogName()).append(" hasn't paid").toString()); creatureToPayFor.sacrifice(source.getSourceId(), game); } } diff --git a/Mage.Sets/src/mage/sets/worldwake/HammerOfRuin.java b/Mage.Sets/src/mage/sets/worldwake/HammerOfRuin.java index 34c8149a01..12d98026bf 100644 --- a/Mage.Sets/src/mage/sets/worldwake/HammerOfRuin.java +++ b/Mage.Sets/src/mage/sets/worldwake/HammerOfRuin.java @@ -104,7 +104,7 @@ class HammerOfRuinTriggeredAbility extends TriggeredAbilityImpl { FilterPermanent filter = new FilterPermanent("Equipment that player controls"); filter.add(new SubtypePredicate("Equipment")); filter.add(new ControllerIdPredicate(event.getPlayerId())); - filter.setMessage("creature controlled by " + game.getPlayer(event.getTargetId()).getName()); + filter.setMessage("creature controlled by " + game.getPlayer(event.getTargetId()).getLogName()); this.getTargets().clear(); this.addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java b/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java index 09411bfbfe..410a15a87d 100644 --- a/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java +++ b/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java @@ -125,7 +125,7 @@ class JaceTheMindSculptorEffect1 extends OneShotEffect { if (controller.chooseUse(outcome, "Do you wish to put card on the bottom of player's library?", game)) { controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, false, false); } else { - game.informPlayers(controller.getName() + " puts the card back on top of the library."); + game.informPlayers(controller.getLogName() + " puts the card back on top of the library."); } return true; } diff --git a/Mage.Sets/src/mage/sets/worldwake/MordantDragon.java b/Mage.Sets/src/mage/sets/worldwake/MordantDragon.java index f1946f15e7..c2bd4cc1d8 100644 --- a/Mage.Sets/src/mage/sets/worldwake/MordantDragon.java +++ b/Mage.Sets/src/mage/sets/worldwake/MordantDragon.java @@ -97,7 +97,7 @@ class MordantDragonEffect extends OneShotEffect { if (player != null) { int amount = (Integer) getValue("damage"); if (amount > 0) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + player.getName() + " controls"); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + player.getLogName() + " controls"); filter.add(new ControllerIdPredicate(player.getId())); TargetCreaturePermanent target = new TargetCreaturePermanent(filter); if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.Damage, source.getControllerId(), source.getSourceId(), game)) { diff --git a/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java b/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java index c169fb0906..b5b0983399 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java +++ b/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java @@ -208,7 +208,7 @@ class RefractionTrapPreventDamageEffect extends PreventionEffectImpl { } Player player = game.getPlayer(damageTarget); if (player != null) { - game.informPlayers("Dealing " + prevented + " to " + player.getName()); + game.informPlayers("Dealing " + prevented + " to " + player.getLogName()); player.damage(prevented, source.getSourceId(), game, true, false); } } diff --git a/Mage.Sets/src/mage/sets/worldwake/ThadaAdelAcquisitor.java b/Mage.Sets/src/mage/sets/worldwake/ThadaAdelAcquisitor.java index 8d98e4ec56..6ae2163f6a 100644 --- a/Mage.Sets/src/mage/sets/worldwake/ThadaAdelAcquisitor.java +++ b/Mage.Sets/src/mage/sets/worldwake/ThadaAdelAcquisitor.java @@ -108,7 +108,7 @@ class ThadaAdelAcquisitorEffect extends OneShotEffect { if (target.getTargets().size() > 0) { Card card = damagedPlayer.getLibrary().remove(target.getFirstTarget(), game); if (card != null) { - controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, true); + controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); ContinuousEffect effect = new ThadaAdelPlayFromExileEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/sets/zendikar/BalaGedThief.java b/Mage.Sets/src/mage/sets/zendikar/BalaGedThief.java index 7ba58470e0..0d8da7c331 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BalaGedThief.java +++ b/Mage.Sets/src/mage/sets/zendikar/BalaGedThief.java @@ -149,7 +149,7 @@ class BalaGedThiefEffect extends OneShotEffect { Card card = revealedCards.get(targetInHand.getFirstTarget(), game); if (card != null) { targetPlayer.discard(card, source, game); - game.informPlayers(new StringBuilder("Bala Ged Thief: ").append(targetPlayer.getName()).append(" discarded ").append(card.getName()).toString()); + game.informPlayers(new StringBuilder("Bala Ged Thief: ").append(targetPlayer.getLogName()).append(" discarded ").append(card.getName()).toString()); } } return true; diff --git a/Mage.Sets/src/mage/sets/zendikar/BeastHunt.java b/Mage.Sets/src/mage/sets/zendikar/BeastHunt.java index 1afeac92cc..4787a3f1fb 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BeastHunt.java +++ b/Mage.Sets/src/mage/sets/zendikar/BeastHunt.java @@ -103,7 +103,7 @@ class BeastHuntEffect extends OneShotEffect { } if (!cards.isEmpty()) { - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); } return true; diff --git a/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java b/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java index c610b6753a..1bc6732b5b 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java +++ b/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java @@ -113,7 +113,7 @@ class BraveTheElementsChooseColorEffect extends OneShotEffect { if (choice.getColor() == null) { return false; } - game.informPlayers(sourceObject.getName() + ": " + controller.getName() + " has chosen " + choice.getChoice()); + game.informPlayers(sourceObject.getName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); FilterCard filterColor = new FilterCard(); filterColor.add(new ColorPredicate(choice.getColor())); filterColor.setMessage(choice.getChoice()); diff --git a/Mage.Sets/src/mage/sets/zendikar/GoblinGuide.java b/Mage.Sets/src/mage/sets/zendikar/GoblinGuide.java index dfbbb8b4dd..c5f6beb8c6 100644 --- a/Mage.Sets/src/mage/sets/zendikar/GoblinGuide.java +++ b/Mage.Sets/src/mage/sets/zendikar/GoblinGuide.java @@ -156,7 +156,7 @@ class GoblinGuideEffect extends OneShotEffect { Card card = defender.getLibrary().getFromTop(game); if (card != null) { cards.add(card); - defender.revealCards(sourceObject.getLogName(), cards, game); + defender.revealCards(sourceObject.getName(), cards, game); if (card.getCardType().contains(CardType.LAND)) { defender.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); } diff --git a/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java b/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java index e566f1f124..36cc4ab4b1 100644 --- a/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java +++ b/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java @@ -105,7 +105,7 @@ class IonaShieldOfEmeriaChooseColorEffect extends OneShotEffect { if (player != null && permanent != null) { ChoiceColor colorChoice = new ChoiceColor(); if (player.choose(Outcome.Detriment, colorChoice, game)) { - game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor()); permanent.addInfo("chosen color", CardUtil.addToolTipMarkTags("Chosen color: " + colorChoice.getColor().getDescription()), game); } diff --git a/Mage.Sets/src/mage/sets/zendikar/KabiraEvangel.java b/Mage.Sets/src/mage/sets/zendikar/KabiraEvangel.java index 666f953c91..c87e8982a3 100644 --- a/Mage.Sets/src/mage/sets/zendikar/KabiraEvangel.java +++ b/Mage.Sets/src/mage/sets/zendikar/KabiraEvangel.java @@ -126,7 +126,7 @@ class KabiraEvangelChooseColorEffect extends OneShotEffect { if (choice.getColor() == null) { return false; } - game.informPlayers(sourceObject.getName() + ": " + controller.getName() + " has chosen " + choice.getChoice()); + game.informPlayers(sourceObject.getName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); FilterCard filterColor = new FilterCard(); filterColor.add(new ColorPredicate(choice.getColor())); filterColor.setMessage(choice.getChoice()); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HauntTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HauntTest.java index dc75c05888..2142275973 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HauntTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HauntTest.java @@ -71,7 +71,7 @@ public class HauntTest extends CardTestPlayerBase { for (Card card : currentGame.getExile().getAllCards(currentGame)) { if (card.getName().equals("Blind Hunter")) { for (String rule : card.getRules(currentGame)) { - if (rule.startsWith("Haunting Goblin Roughrider")) { + if (rule.startsWith("Haunting") && rule.contains("Goblin Roughrider")) { found = true; } } @@ -83,7 +83,7 @@ public class HauntTest extends CardTestPlayerBase { for (Card card : currentGame.getBattlefield().getAllActivePermanents()) { if (card.getName().equals("Goblin Roughrider")) { for (String rule : card.getRules(currentGame)) { - if (rule.startsWith("Haunted by Blind Hunter")) { + if (rule.startsWith("Haunted by") && rule.contains("Blind Hunter")) { found = true; } } @@ -117,7 +117,7 @@ public class HauntTest extends CardTestPlayerBase { for (Card card : currentGame.getPlayer(playerA.getId()).getGraveyard().getCards(currentGame)) { if (card.getName().equals("Goblin Roughrider")) { for (String rule : card.getRules(currentGame)) { - if (rule.startsWith("Haunted by Blind Hunter")) { + if (rule.startsWith("Haunted by") && rule.contains("Blind Hunter")) { found = true; } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java index b17ebe4dcc..8fed441a11 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java @@ -66,10 +66,10 @@ public class ManifestTest extends CardTestPlayerBase { assertLife(playerA, 20); assertLife(playerB, 20); // a facedown creature is on the battlefield - assertPermanentCount(playerA, "face down creature", 1); - assertPowerToughness(playerA, "face down creature", 2, 2); + assertPermanentCount(playerA, "", 1); + assertPowerToughness(playerA, "", 2, 2); // not tapped - assertTapped("face down creature", false); + assertTapped("", false); } /** @@ -97,8 +97,8 @@ public class ManifestTest extends CardTestPlayerBase { assertLife(playerA, 20); assertLife(playerB, 20); // a facedown creature is on the battlefield - assertPermanentCount(playerA, "face down creature", 1); - assertPowerToughness(playerA, "face down creature", 2, 2); + assertPermanentCount(playerA, "", 1); + assertPowerToughness(playerA, "", 2, 2); // PlayerB's Silvercoat Lion should not have get -1/-1/ assertPermanentCount(playerB, "Silvercoat Lion", 1); assertPowerToughness(playerB, "Silvercoat Lion", 2, 2); @@ -132,8 +132,8 @@ public class ManifestTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Reality Shift", 1); assertExileCount("Silvercoat Lion" , 1); // a facedown creature is on the battlefield - assertPermanentCount(playerA, "face down creature", 1); - assertPowerToughness(playerA, "face down creature", 2, 2); + assertPermanentCount(playerA, "", 1); + assertPowerToughness(playerA, "", 2, 2); // PlayerA's Pillarfield Ox should not have get -1/-1/ assertPermanentCount(playerB, "Pillarfield Ox", 1); assertPowerToughness(playerB, "Pillarfield Ox", 2, 4); @@ -166,8 +166,8 @@ public class ManifestTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Reality Shift", 1); assertExileCount("Silvercoat Lion" , 1); // a facedown creature is on the battlefield - assertPermanentCount(playerA, "face down creature", 1); - assertPowerToughness(playerA, "face down creature", 2, 2); + assertPermanentCount(playerA, "", 1); + assertPowerToughness(playerA, "", 2, 2); } @@ -202,8 +202,8 @@ public class ManifestTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Reality Shift", 1); assertExileCount("Silvercoat Lion" , 1); // a facedown creature is on the battlefield - assertPermanentCount(playerA, "face down creature", 1); - assertPowerToughness(playerA, "face down creature", 2, 2); + assertPermanentCount(playerA, "", 1); + assertPowerToughness(playerA, "", 2, 2); assertPowerToughness(playerA, "Foundry Street Denizen", 1, 1); } @@ -220,7 +220,7 @@ public class ManifestTest extends CardTestPlayerBase { // Strive — Silence the Believers costs more to cast for each target beyond the first. // Exile any number of target creatures and all Auras attached to them. addCard(Zone.HAND, playerB, "Silence the Believers"); - addTarget(playerB, "face down creature"); + addTarget(playerB, ""); // Gore Swine {2}{R} // 4/1 addCard(Zone.LIBRARY, playerA, "Gore Swine"); @@ -231,7 +231,7 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Reality Shift", "Silvercoat Lion"); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Silence the Believers", "face down creature"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Silence the Believers", ""); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -243,7 +243,7 @@ public class ManifestTest extends CardTestPlayerBase { assertExileCount("Silvercoat Lion" , 1); assertExileCount("Gore Swine" , 1); // no facedown creature is on the battlefield - assertPermanentCount(playerA, "face down creature", 0); + assertPermanentCount(playerA, "", 0); for (Card card :currentGame.getExile().getAllCards(currentGame)){ if (card.getName().equals("Gore Swine")) { @@ -284,7 +284,7 @@ public class ManifestTest extends CardTestPlayerBase { // a facedown creature is on the battlefield - assertPermanentCount(playerB, "face down creature", 1); + assertPermanentCount(playerB, "", 1); } @@ -319,7 +319,7 @@ public class ManifestTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Silvercoat Lion", 1); - assertPermanentCount(playerB, "face down creature", 0); + assertPermanentCount(playerB, "", 0); assertPermanentCount(playerB, "Sandstorm Charger", 1); assertPowerToughness(playerB, "Sandstorm Charger", 4, 5); // 3/4 and the +1/+1 counter from Megamorph @@ -359,7 +359,7 @@ public class ManifestTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Silvercoat Lion", 1); - assertPermanentCount(playerB, "face down creature", 1); + assertPermanentCount(playerB, "", 1); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java index 00eb58e0e9..f751c9bab8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java @@ -84,8 +84,8 @@ public class MorphTest extends CardTestPlayerBase { setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); - assertPermanentCount(playerA, "face down creature", 1); - assertPowerToughness(playerA, "face down creature", 2, 2); + assertPermanentCount(playerA, "", 1); + assertPowerToughness(playerA, "", 2, 2); } /** @@ -99,7 +99,7 @@ public class MorphTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Pine Walker"); setChoice(playerA, "Yes"); // cast it face down as 2/2 creature - attack(3, playerA, "face down creature"); + attack(3, playerA, ""); activateAbility(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "{4}{G}: Turn this face-down permanent face up."); setStopAt(3, PhaseStep.END_TURN); @@ -107,7 +107,7 @@ public class MorphTest extends CardTestPlayerBase { assertLife(playerB, 18); - assertPermanentCount(playerA, "face down creature", 0); + assertPermanentCount(playerA, "", 0); assertPermanentCount(playerA, "Pine Walker", 1); assertPowerToughness(playerA, "Pine Walker", 5, 5); assertTapped("Pine Walker", false); @@ -133,8 +133,8 @@ public class MorphTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Icefeather Aven"); setChoice(playerA, "Yes"); // cast it face down as 2/2 creature - attack(3, playerA, "face down creature"); - attack(3, playerA, "face down creature"); + attack(3, playerA, ""); + attack(3, playerA, ""); activateAbility(3, PhaseStep.DECLARE_BLOCKERS, playerA, "{1}{G}{U}: Turn this face-down permanent face up."); setChoice(playerA, "No"); // Don't use return permanent to hand effect @@ -146,7 +146,7 @@ public class MorphTest extends CardTestPlayerBase { assertHandCount(playerA, "Pine Walker", 0); assertHandCount(playerA, "Icefeather Aven", 0); - assertPermanentCount(playerA, "face down creature", 1); + assertPermanentCount(playerA, "", 1); assertPermanentCount(playerA, "Icefeather Aven", 1); assertTapped("Icefeather Aven", true); @@ -178,7 +178,7 @@ public class MorphTest extends CardTestPlayerBase { assertLife(playerB, 20); // and not 21 - assertPermanentCount(playerA, "face down creature", 1); + assertPermanentCount(playerA, "", 1); assertPermanentCount(playerB, "Soldier of the Pantheon", 1); } @@ -204,17 +204,17 @@ public class MorphTest extends CardTestPlayerBase { castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Clever Impersonator"); setChoice(playerB, "Yes"); // use to copy a nonland permanent - addTarget(playerB, "face down creature"); // Morphed creature + addTarget(playerB, ""); // Morphed creature setStopAt(2, PhaseStep.BEGIN_COMBAT); execute(); assertLife(playerB, 20); - assertPermanentCount(playerA, "face down creature", 1); - assertPowerToughness(playerA, "face down creature", 2,2); - assertPermanentCount(playerB, "a creature without name", 1); - assertPowerToughness(playerB, "a creature without name", 2,2); + assertPermanentCount(playerA, "", 1); + assertPowerToughness(playerA, "", 2,2); + assertPermanentCount(playerB, "", 1); + assertPowerToughness(playerB, "", 2,2); } @@ -249,7 +249,7 @@ public class MorphTest extends CardTestPlayerBase { assertHandCount(playerA, "Pine Walker", 0); assertHandCount(playerB, "Doomwake Giant", 0); - assertPermanentCount(playerA, "face down creature", 0); + assertPermanentCount(playerA, "", 0); assertPermanentCount(playerB, "Doomwake Giant", 1); assertPermanentCount(playerA, "Pine Walker", 1); assertPowerToughness(playerA, "Pine Walker", 4,4); @@ -289,7 +289,7 @@ public class MorphTest extends CardTestPlayerBase { assertHandCount(playerA, "Ponyback Brigade", 0); assertHandCount(playerB, "Doomwake Giant", 0); - assertPermanentCount(playerA, "face down creature", 0); + assertPermanentCount(playerA, "", 0); assertPermanentCount(playerA, "Goblin", 3); assertPowerToughness(playerA, "Goblin", 1,1,Filter.ComparisonScope.Any); assertPermanentCount(playerB, "Doomwake Giant", 1); @@ -361,7 +361,7 @@ public class MorphTest extends CardTestPlayerBase { assertHandCount(playerA, "Sagu Mauler", 0); assertHandCount(playerB, "Disdainful Stroke", 1); // can't be cast - assertPermanentCount(playerA, "face down creature", 1); + assertPermanentCount(playerA, "", 1); } @@ -390,7 +390,7 @@ public class MorphTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sagu Mauler"); setChoice(playerA, "Yes"); // cast it face down as 2/2 creature - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Echoing Decay", "face down creature"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Echoing Decay", ""); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -400,7 +400,7 @@ public class MorphTest extends CardTestPlayerBase { assertHandCount(playerA, "Sagu Mauler", 0); assertHandCount(playerB, "Echoing Decay", 0); - assertPermanentCount(playerA, "face down creature", 1); + assertPermanentCount(playerA, "", 1); } @@ -449,7 +449,7 @@ public class MorphTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Birchlore Rangers"); setChoice(playerA, "Yes"); // cast it face down as 2/2 creature - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Swords to Plowshares", "face down creature"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Swords to Plowshares", ""); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -490,7 +490,7 @@ public class MorphTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ashcloud Phoenix"); setChoice(playerA, "Yes"); // cast it face down as 2/2 creature - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "face down creature"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", ""); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -533,7 +533,7 @@ public class MorphTest extends CardTestPlayerBase { setChoice(playerA, "Yes"); // cast it face down as 2/2 creature attack(2, playerB, "Mirri, Cat Warrior"); - block(2, playerA, "face down creature", "Mirri, Cat Warrior"); + block(2, playerA, "", "Mirri, Cat Warrior"); setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); execute(); @@ -570,7 +570,7 @@ public class MorphTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akroma, Angel of Fury"); setChoice(playerA, "Yes"); // cast it face down as 2/2 creature - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Supplant Form", "face down creature"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Supplant Form", ""); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -581,8 +581,8 @@ public class MorphTest extends CardTestPlayerBase { assertHandCount(playerA, "Akroma, Angel of Fury", 1); assertPermanentCount(playerB, "Akroma, Angel of Fury", 0); - assertPermanentCount(playerB, "a creature without name", 1); - assertPowerToughness(playerB, "a creature without name", 2, 2); + assertPermanentCount(playerB, "", 1); + assertPowerToughness(playerB, "", 2, 2); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/ExileAndReturnUnderYourControl.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/ExileAndReturnUnderYourControl.java index eb98e6c612..5f1c950fb7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/ExileAndReturnUnderYourControl.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/ExileAndReturnUnderYourControl.java @@ -102,8 +102,8 @@ public class ExileAndReturnUnderYourControl extends CardTestPlayerBase { assertExileCount("Secret Plans", 0); assertPermanentCount(playerA, "Secret Plans", 1); - assertPermanentCount(playerA, "face down creature", 1); - assertPowerToughness(playerA, "face down creature", 2, 3); + assertPermanentCount(playerA, "", 1); + assertPowerToughness(playerA, "", 2, 3); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/facedown/GhastlyConscriptionTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/facedown/GhastlyConscriptionTest.java index 638ac645a7..e4a92ee726 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/facedown/GhastlyConscriptionTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/facedown/GhastlyConscriptionTest.java @@ -38,7 +38,7 @@ public class GhastlyConscriptionTest extends CardTestPlayerBase { assertLife(playerB, 20); assertGraveyardCount(playerA, 2); - assertPermanentCount(playerA, "face down creature", 2); + assertPermanentCount(playerA, "", 2); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/prevent/DeflectingPalmTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/prevent/DeflectingPalmTest.java index 4f50777cfd..8bbcff4218 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/prevent/DeflectingPalmTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/prevent/DeflectingPalmTest.java @@ -55,7 +55,7 @@ public class DeflectingPalmTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Plains"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Deflecting Palm", "", "Lightning Bolt"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Deflecting Palm", null, "Lightning Bolt"); setChoice(playerB, "Lightning Bolt"); setStopAt(1, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/ths/PurphorosGodOfTheForgeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/ths/PurphorosGodOfTheForgeTest.java index afff4e98d8..2567bb9647 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/ths/PurphorosGodOfTheForgeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/ths/PurphorosGodOfTheForgeTest.java @@ -75,7 +75,7 @@ public class PurphorosGodOfTheForgeTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Reach of Shadows", 1); assertPermanentCount(playerA, "Ashcloud Phoenix", 0); - assertPermanentCount(playerA, "face down creature", 1); + assertPermanentCount(playerA, "", 1); Permanent purphorosGodOfTheForge = getPermanent("Purphoros, God of the Forge", playerA); Assert.assertFalse("Purphoros may not be a creature but it is", purphorosGodOfTheForge.getCardType().contains(CardType.CREATURE)); @@ -107,7 +107,7 @@ public class PurphorosGodOfTheForgeTest extends CardTestPlayerBase { execute(); assertPermanentCount(playerA, "Ashcloud Phoenix", 0); - assertPermanentCount(playerA, "face down creature", 1); + assertPermanentCount(playerA, "", 1); assertLife(playerA, 18); // 2 damage from Eidolon of the Great Revel assertLife(playerB, 18); // 2 damage from Purphoros for the morphed Phoenix diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TidehollowScullerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TidehollowScullerTest.java index bc44c73121..0e88d0e7e4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TidehollowScullerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TidehollowScullerTest.java @@ -66,8 +66,8 @@ public class TidehollowScullerTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tidehollow Sculler"); addTarget(playerA, "Bloodflow Connoisseur"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Boomerang", "Tidehollow Sculler"); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Scout's Warning", "", "Boomerang"); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tidehollow Sculler", "", "", "When {this} leaves the battlefield, return the exiled card to its owner's hand."); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Scout's Warning", null, "Boomerang"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tidehollow Sculler", null, "", "When {this} leaves the battlefield, return the exiled card to its owner's hand."); addTarget(playerA, "Silvercoat Lion"); setStopAt(1, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/WhisperwoodElementalTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/WhisperwoodElementalTest.java index 1f967f23ca..e273d287a6 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/WhisperwoodElementalTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/WhisperwoodElementalTest.java @@ -66,7 +66,7 @@ public class WhisperwoodElementalTest extends CardTestPlayerBase { assertGraveyardCount(playerA, "Silvercoat Lion", 1); // Manifested creature from dying Silvercoat Lion - assertPermanentCount(playerA, "face down creature", 1); + assertPermanentCount(playerA, "", 1); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index 67d85968b8..2cce693986 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -213,7 +213,7 @@ public class TestPlayer extends ComputerPlayer { if (group.startsWith("planeswalker=")) { String planeswalkerName = group.substring(group.indexOf("planeswalker=") + 13); for (Permanent permanent :game.getBattlefield().getAllActivePermanents(new FilterPlaneswalkerPermanent(), game)) { - if (permanent.getLogName().equals(planeswalkerName)) { + if (permanent.getName().equals(planeswalkerName)) { defenderId = permanent.getId(); } } @@ -649,7 +649,7 @@ public class TestPlayer extends ComputerPlayer { private boolean handleNonPlayerTargetTarget(String target, Ability ability, Game game) { boolean result = true; - if (target.isEmpty()) { + if (target == null) { return true; // needed if spell has no target but waits until spell is on the stack } String[] targetList = target.split("\\^"); @@ -672,7 +672,8 @@ public class TestPlayer extends ComputerPlayer { } for (UUID id: ability.getTargets().get(0).possibleTargets(ability.getSourceId(), ability.getControllerId(), game)) { MageObject object = game.getObject(id); - if (object != null && object.getLogName().startsWith(targetName)) { + if (object != null && + ((!targetName.isEmpty() && object.getName().startsWith(targetName)) || (targetName.isEmpty() && object.getName().isEmpty()))) { if (index >= ability.getTargets().size()) { index--; } diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java b/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java index 5f0ae2f5ea..1b1e73dc94 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java @@ -321,7 +321,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement int foundToughness = 0; int found = 0; for (Permanent permanent : currentGame.getBattlefield().getAllPermanents()) { - if (permanent.getLogName().equals(cardName) && permanent.getControllerId().equals(player.getId())) { + if (permanent.getName().equals(cardName) && permanent.getControllerId().equals(player.getId())) { count++; if (scope.equals(Filter.ComparisonScope.All)) { Assert.assertEquals("Power is not the same (" + power + " vs. " + permanent.getPower().getValue() + ")", @@ -450,7 +450,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement int actualCount = 0; for (Permanent permanent : currentGame.getBattlefield().getAllPermanents()) { if (permanent.getControllerId().equals(player.getId())) { - if (permanent.getLogName().equals(cardName)) { + if (permanent.getName().equals(cardName)) { actualCount++; } } @@ -561,7 +561,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement public void assertTapped(String cardName, boolean tapped) throws AssertionError { Permanent found = null; for (Permanent permanent : currentGame.getBattlefield().getAllActivePermanents()) { - if (permanent.getLogName().equals(cardName)) { + if (permanent.getName().equals(cardName)) { found = permanent; } } @@ -580,7 +580,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement public void assertAttacking(String cardName, boolean attacking) throws AssertionError { Permanent found = null; for (Permanent permanent : currentGame.getBattlefield().getAllActivePermanents()) { - if (permanent.getLogName().equals(cardName)) { + if (permanent.getName().equals(cardName)) { found = permanent; } } diff --git a/Mage/src/mage/MageObjectImpl.java b/Mage/src/mage/MageObjectImpl.java index a7631c6c18..ea8ec87718 100644 --- a/Mage/src/mage/MageObjectImpl.java +++ b/Mage/src/mage/MageObjectImpl.java @@ -40,6 +40,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.keyword.ChangelingAbility; import mage.constants.CardType; import mage.game.Game; +import mage.util.GameLog; public abstract class MageObjectImpl implements MageObject { @@ -97,7 +98,7 @@ public abstract class MageObjectImpl implements MageObject { @Override public String getLogName() { - return name; + return GameLog.getColoredObjectName(this); } @Override diff --git a/Mage/src/mage/abilities/AbilityImpl.java b/Mage/src/mage/abilities/AbilityImpl.java index 1cad9c0a08..cc35790778 100644 --- a/Mage/src/mage/abilities/AbilityImpl.java +++ b/Mage/src/mage/abilities/AbilityImpl.java @@ -74,6 +74,7 @@ import mage.game.stack.StackAbility; import mage.players.Player; import mage.target.Target; import mage.target.Targets; +import mage.util.GameLog; import mage.util.ThreadLocalStringBuilder; import mage.watchers.Watcher; import org.apache.log4j.Logger; @@ -396,7 +397,7 @@ public abstract class AbilityImpl implements Ability { } if (variableManaCost != null) { int xValue = getManaCostsToPay().getX(); - game.informPlayers(new StringBuilder(controller.getName()).append(" announces a value of ").append(xValue).append(" for ").append(variableManaCost.getText()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" announces a value of ").append(xValue).append(" for ").append(variableManaCost.getText()).toString()); } } activated = true; @@ -483,7 +484,7 @@ public abstract class AbilityImpl implements Ability { // set the xcosts to paid variableCost.setAmount(xValue); ((Cost) variableCost).setPaid(); - String message = new StringBuilder(controller.getName()) + String message = new StringBuilder(controller.getLogName()) .append(" announces a value of ").append(xValue).append(" (").append(variableCost.getActionText()).append(")").toString(); if (announceString == null) { announceString = message; @@ -997,9 +998,9 @@ public abstract class AbilityImpl implements Ability { if (object instanceof StackAbility) { Card card = game.getCard(((StackAbility) object).getSourceId()); if (card != null) { - sb.append(card.getLogName()); + sb.append(GameLog.getColoredObjectName(card)); } else { - sb.append(object.getName()); + sb.append(GameLog.getColoredObjectName(object)); } } else { if (object instanceof Spell) { @@ -1011,7 +1012,7 @@ public abstract class AbilityImpl implements Ability { } sb.append(getOptionalTextSuffix(game, spell)); } else { - sb.append(object.getLogName()); + sb.append(GameLog.getColoredObjectName(object)); } } } else { @@ -1074,7 +1075,7 @@ public abstract class AbilityImpl implements Ability { } protected String getTargetDescriptionForLog(Targets targets, Game game) { - StringBuilder sb = threadLocalBuilder.get(); + StringBuilder sb = new StringBuilder(); // threadLocal StringBuilder can't be used because calling method already uses it if (targets.size() > 0) { String usedVerb = null; for (Target target : targets) { @@ -1099,7 +1100,7 @@ public abstract class AbilityImpl implements Ability { } private String getOptionalTextSuffix(Game game, Spell spell) { - StringBuilder sb = threadLocalBuilder.get(); + StringBuilder sb = new StringBuilder(); for (Ability ability : spell.getAbilities()) { if (ability instanceof OptionalAdditionalSourceCosts) { sb.append(((OptionalAdditionalSourceCosts) ability).getCastMessageSuffix()); diff --git a/Mage/src/mage/abilities/abilityword/KinshipAbility.java b/Mage/src/mage/abilities/abilityword/KinshipAbility.java index cb7e6a978c..d040323225 100644 --- a/Mage/src/mage/abilities/abilityword/KinshipAbility.java +++ b/Mage/src/mage/abilities/abilityword/KinshipAbility.java @@ -125,10 +125,10 @@ class KinshipBaseEffect extends OneShotEffect { Card card = controller.getLibrary().getFromTop(game); if (card != null) { Cards cards = new CardsImpl(card); - controller.lookAtCards(sourcePermanent.getLogName(), cards, game); + controller.lookAtCards(sourcePermanent.getName(), cards, game); if (CardUtil.shareSubtypes(sourcePermanent, card)) { if (controller.chooseUse(outcome,new StringBuilder("Kinship - Reveal ").append(card.getLogName()).append("?").toString(), game)) { - controller.revealCards(sourcePermanent.getLogName(), cards, game); + controller.revealCards(sourcePermanent.getName(), cards, game); for (Effect effect: kinshipEffects) { effect.setTargetPointer(new FixedTarget(card.getId())); if (effect.getEffectType().equals(EffectType.ONESHOT)) { diff --git a/Mage/src/mage/abilities/common/CastCommanderAbility.java b/Mage/src/mage/abilities/common/CastCommanderAbility.java index daaeee63ce..faaf804a0e 100644 --- a/Mage/src/mage/abilities/common/CastCommanderAbility.java +++ b/Mage/src/mage/abilities/common/CastCommanderAbility.java @@ -42,7 +42,7 @@ import mage.game.Game; public class CastCommanderAbility extends SpellAbility { public CastCommanderAbility(Card card) { - super(card.getManaCost(), card.getLogName(), Zone.COMMAND, SpellAbilityType.BASE); + super(card.getManaCost(), card.getName(), Zone.COMMAND, SpellAbilityType.BASE); this.timing = TimingRule.SORCERY; this.usesStack = true; this.controllerId = card.getOwnerId(); diff --git a/Mage/src/mage/abilities/costs/common/ExileFromStackCost.java b/Mage/src/mage/abilities/costs/common/ExileFromStackCost.java index 0ab5b115cb..64f9c36d72 100644 --- a/Mage/src/mage/abilities/costs/common/ExileFromStackCost.java +++ b/Mage/src/mage/abilities/costs/common/ExileFromStackCost.java @@ -64,7 +64,7 @@ public class ExileFromStackCost extends CostImpl { } paid |= spellToExile.moveToExile(null, "", ability.getSourceId(), game); if (paid && !game.isSimulation()) { - game.informPlayers(player.getName() + " exiles " + spellToExile.getName() +" (as costs)"); + game.informPlayers(player.getLogName() + " exiles " + spellToExile.getName() +" (as costs)"); } } } diff --git a/Mage/src/mage/abilities/costs/common/ExileSourceCost.java b/Mage/src/mage/abilities/costs/common/ExileSourceCost.java index 20f184d205..0246273ad3 100644 --- a/Mage/src/mage/abilities/costs/common/ExileSourceCost.java +++ b/Mage/src/mage/abilities/costs/common/ExileSourceCost.java @@ -73,7 +73,7 @@ public class ExileSourceCost extends CostImpl { String exileZoneName = ""; if (toUniqueExileZone) { exileZoneId = CardUtil.getExileZoneId(game, ability.getSourceId(), ability.getSourceObjectZoneChangeCounter()); - exileZoneName = sourceObject.getLogName(); + exileZoneName = sourceObject.getName(); } paid = controller.moveCardToExileWithInfo((Card) sourceObject, exileZoneId, exileZoneName, sourceId, game, game.getState().getZone(sourceObject.getId()), true); } diff --git a/Mage/src/mage/abilities/costs/common/RemoveCounterCost.java b/Mage/src/mage/abilities/costs/common/RemoveCounterCost.java index bdffc9255c..589f477d89 100644 --- a/Mage/src/mage/abilities/costs/common/RemoveCounterCost.java +++ b/Mage/src/mage/abilities/costs/common/RemoveCounterCost.java @@ -131,7 +131,7 @@ public class RemoveCounterCost extends CostImpl { } countersRemoved += numberOfCountersSelected; if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()) + game.informPlayers(new StringBuilder(controller.getLogName()) .append(" removes ").append(numberOfCountersSelected == 1 ? "a":numberOfCountersSelected).append(" ") .append(counterName).append(numberOfCountersSelected == 1 ? " counter from ":" counters from ") .append(permanent.getName()).toString()); diff --git a/Mage/src/mage/abilities/costs/common/RevealHandSourceControllerCost.java b/Mage/src/mage/abilities/costs/common/RevealHandSourceControllerCost.java index 9afc3c2af2..3850e142e2 100644 --- a/Mage/src/mage/abilities/costs/common/RevealHandSourceControllerCost.java +++ b/Mage/src/mage/abilities/costs/common/RevealHandSourceControllerCost.java @@ -54,7 +54,7 @@ public class RevealHandSourceControllerCost extends CostImpl { Player controller = game.getPlayer(controllerId); MageObject sourceObject = game.getObject(sourceId); if (controller != null && sourceObject != null) { - controller.revealCards(sourceObject.getLogName(), controller.getHand(), game); + controller.revealCards(sourceObject.getName(), controller.getHand(), game); paid = true; } return paid; diff --git a/Mage/src/mage/abilities/effects/ContinuousEffects.java b/Mage/src/mage/abilities/effects/ContinuousEffects.java index 58305dd268..0f76f9b572 100644 --- a/Mage/src/mage/abilities/effects/ContinuousEffects.java +++ b/Mage/src/mage/abilities/effects/ContinuousEffects.java @@ -1084,7 +1084,7 @@ public class ContinuousEffects implements Serializable { for (Ability ability :entry.getValue()) { MageObject object = game.getObject(ability.getSourceId()); if (object != null) { - texts.put(ability.getId().toString() + "_" + entry.getKey().getId().toString(), object.getLogName() +": " + ability.getRule(object.getLogName())); + texts.put(ability.getId().toString() + "_" + entry.getKey().getId().toString(), object.getName() +": " + ability.getRule(object.getName())); } else { texts.put(ability.getId().toString() + "_" + entry.getKey().getId().toString(), entry.getKey().getText(null)); } diff --git a/Mage/src/mage/abilities/effects/PlaneswalkerRedirectionEffect.java b/Mage/src/mage/abilities/effects/PlaneswalkerRedirectionEffect.java index a026282ad5..8a1ec5aa8a 100644 --- a/Mage/src/mage/abilities/effects/PlaneswalkerRedirectionEffect.java +++ b/Mage/src/mage/abilities/effects/PlaneswalkerRedirectionEffect.java @@ -83,7 +83,7 @@ public class PlaneswalkerRedirectionEffect extends RedirectionEffect { player.choose(Outcome.Damage, redirectTarget, null, game); } if (!game.isSimulation()) - game.informPlayers(new StringBuilder(player.getName()).append(" redirects ") + game.informPlayers(new StringBuilder(player.getLogName()).append(" redirects ") .append(event.getAmount()) .append(" damage to ") .append(game.getPermanent(redirectTarget.getFirstTarget()).getLogName()).toString()); diff --git a/Mage/src/mage/abilities/effects/common/AmplifyEffect.java b/Mage/src/mage/abilities/effects/common/AmplifyEffect.java index 3713801a12..2cfb394c77 100644 --- a/Mage/src/mage/abilities/effects/common/AmplifyEffect.java +++ b/Mage/src/mage/abilities/effects/common/AmplifyEffect.java @@ -116,7 +116,7 @@ public class AmplifyEffect extends ReplacementEffectImpl { cards.addAll(target.getTargets()); int amountCounters = cards.size() * amplifyFactor.getFactor(); sourceCreature.addCounters(CounterType.P1P1.createInstance(amountCounters), game); - controller.revealCards(sourceCreature.getLogName(), cards, game); + controller.revealCards(sourceCreature.getName(), cards, game); } } } diff --git a/Mage/src/mage/abilities/effects/common/ChooseColorEffect.java b/Mage/src/mage/abilities/effects/common/ChooseColorEffect.java index e95c60f13f..21d0b75964 100644 --- a/Mage/src/mage/abilities/effects/common/ChooseColorEffect.java +++ b/Mage/src/mage/abilities/effects/common/ChooseColorEffect.java @@ -64,7 +64,7 @@ public class ChooseColorEffect extends OneShotEffect { } } if (!game.isSimulation()) - game.informPlayers(new StringBuilder(permanent.getLogName()).append(": ").append(controller.getName()).append(" has chosen ").append(choice.getChoice()).toString()); + game.informPlayers(new StringBuilder(permanent.getLogName()).append(": ").append(controller.getLogName()).append(" has chosen ").append(choice.getChoice()).toString()); game.getState().setValue(source.getSourceId() + "_color", choice.getColor()); permanent.addInfo("chosen color", "Chosen color: " + choice.getColor().getDescription() + "", game); return true; diff --git a/Mage/src/mage/abilities/effects/common/ChooseCreatureTypeEffect.java b/Mage/src/mage/abilities/effects/common/ChooseCreatureTypeEffect.java index 2f26fa3a1b..b48288ca75 100644 --- a/Mage/src/mage/abilities/effects/common/ChooseCreatureTypeEffect.java +++ b/Mage/src/mage/abilities/effects/common/ChooseCreatureTypeEffect.java @@ -68,7 +68,7 @@ public class ChooseCreatureTypeEffect extends OneShotEffect { } } if (!game.isSimulation()) - game.informPlayers(permanent.getName() + ": " + controller.getName() + " has chosen " + typeChoice.getChoice()); + game.informPlayers(permanent.getName() + ": " + controller.getLogName() + " has chosen " + typeChoice.getChoice()); game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice()); permanent.addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen type: " + typeChoice.getChoice()), game); } diff --git a/Mage/src/mage/abilities/effects/common/ChooseModeEffect.java b/Mage/src/mage/abilities/effects/common/ChooseModeEffect.java index 7bd9c288e4..83fcbb8703 100644 --- a/Mage/src/mage/abilities/effects/common/ChooseModeEffect.java +++ b/Mage/src/mage/abilities/effects/common/ChooseModeEffect.java @@ -81,7 +81,7 @@ public class ChooseModeEffect extends OneShotEffect { } if (choice.isChosen()) { if (!game.isSimulation()) - game.informPlayers(new StringBuilder(sourcePermanent.getLogName()).append(": ").append(controller.getName()).append(" has chosen ").append(choice.getChoice()).toString()); + game.informPlayers(new StringBuilder(sourcePermanent.getLogName()).append(": ").append(controller.getLogName()).append(" has chosen ").append(choice.getChoice()).toString()); game.getState().setValue(source.getSourceId() + "_modeChoice", choice.getChoice()); sourcePermanent.addInfo("_modeChoice", "Chosen mode: " + choice.getChoice() + "", game); } diff --git a/Mage/src/mage/abilities/effects/common/ClashEffect.java b/Mage/src/mage/abilities/effects/common/ClashEffect.java index 72eeba5165..145faf5175 100644 --- a/Mage/src/mage/abilities/effects/common/ClashEffect.java +++ b/Mage/src/mage/abilities/effects/common/ClashEffect.java @@ -109,23 +109,23 @@ public class ClashEffect extends OneShotEffect implements MageSingleton { boolean topOpponent = true; // Reveal top cards of involved players StringBuilder message = new StringBuilder("Clash: "); - message.append(controller.getName()); + message.append(controller.getLogName()); if (controller.getLibrary().size() > 0) { Cards cards = new CardsImpl(); cardController = controller.getLibrary().getFromTop(game); cards.add(cardController); - controller.revealCards("for clash by " + controller.getName(), cards, game); + controller.revealCards("for clash by " + controller.getLogName(), cards, game); cmcController = cardController.getManaCost().convertedManaCost(); message.append(" (").append(cmcController).append(")"); } else { message.append(" no card"); } - message.append(" vs. ").append(opponent.getName()); + message.append(" vs. ").append(opponent.getLogName()); if (opponent.getLibrary().size() > 0) { Cards cards = new CardsImpl(); cardOpponent = opponent.getLibrary().getFromTop(game); cards.add(cardOpponent); - opponent.revealCards("for clash by " + opponent.getName(), cards, game); + opponent.revealCards("for clash by " + opponent.getLogName(), cards, game); cmcOpponent = cardOpponent.getManaCost().convertedManaCost(); message.append(" (").append(cmcOpponent).append(")"); } else { @@ -134,11 +134,11 @@ public class ClashEffect extends OneShotEffect implements MageSingleton { message.append(" - "); if (!game.isSimulation()) { if (cmcController > cmcOpponent) { - message.append(controller.getName()).append(" won the clash"); + message.append(controller.getLogName()).append(" won the clash"); game.informPlayer(controller, "You won the clash!"); } else if (cmcController < cmcOpponent) { - message.append(opponent.getName()).append(" won the clash"); - game.informPlayer(controller, opponent.getName() + " won the clash!"); + message.append(opponent.getLogName()).append(" won the clash"); + game.informPlayer(controller, opponent.getLogName() + " won the clash!"); } else { message.append(" no winner "); } diff --git a/Mage/src/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java b/Mage/src/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java index eb7c43deaf..ba97a140e4 100644 --- a/Mage/src/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java @@ -465,7 +465,7 @@ class TargetWithAdditionalFilter extends TargetImpl { } else { Player player = game.getPlayer(targetId); if (player != null) { - sb.append(player.getName()).append(" "); + sb.append(player.getLogName()).append(" "); } } } diff --git a/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java b/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java index b79f192b9a..2037ef3833 100644 --- a/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java +++ b/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java @@ -70,7 +70,7 @@ public class CopyTargetSpellEffect extends OneShotEffect { activateMessage = activateMessage.substring(6); } if (!game.isSimulation()) - game.informPlayers(player.getName() + " copies " + activateMessage); + game.informPlayers(player.getLogName() + " copies " + activateMessage); return true; } return false; diff --git a/Mage/src/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java b/Mage/src/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java index 73e5063cfc..5cea6d5782 100644 --- a/Mage/src/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java +++ b/Mage/src/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java @@ -85,7 +85,7 @@ public class DoUnlessAnyPlayerPaysEffect extends OneShotEffect { } else { message = chooseUseText; } - message = CardUtil.replaceSourceName(message, sourceObject.getLogName()); + message = CardUtil.replaceSourceName(message, sourceObject.getName()); boolean result = true; boolean doEffect = true; // check if any player is willing to pay @@ -95,7 +95,7 @@ public class DoUnlessAnyPlayerPaysEffect extends OneShotEffect { cost.clearPaid(); if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) { if (!game.isSimulation()) - game.informPlayers(player.getName() + " pays the cost to prevent the effect"); + game.informPlayers(player.getLogName() + " pays the cost to prevent the effect"); doEffect = false; break; } diff --git a/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java b/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java index d9e8dd5754..f60cf67ba1 100644 --- a/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java @@ -81,7 +81,7 @@ public class ExileSourceEffect extends OneShotEffect { String exileZoneName = ""; if (toUniqueExileZone) { exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); - exileZoneName = sourceObject.getLogName(); + exileZoneName = sourceObject.getName(); } Card sourceCard = (Card) sourceObject; return controller.moveCardToExileWithInfo(sourceCard, exileZoneId, exileZoneName, source.getSourceId(), game, game.getState().getZone(sourceCard.getId()), true); diff --git a/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java b/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java index d9181c43ab..dd7769ea75 100644 --- a/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java @@ -71,11 +71,11 @@ public class ExileTargetForSourceEffect extends OneShotEffect { Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); if (permanent != null) { - return controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); + return controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); } else { Card card = game.getCard(getTargetPointer().getFirst(game, source)); if (card != null) { - return controller.moveCardToExileWithInfo(card, exileId, sourceObject.getLogName(), source.getSourceId(), game, game.getState().getZone(card.getId()), true); + return controller.moveCardToExileWithInfo(card, exileId, sourceObject.getName(), source.getSourceId(), game, game.getState().getZone(card.getId()), true); } } } diff --git a/Mage/src/mage/abilities/effects/common/FlipSourceEffect.java b/Mage/src/mage/abilities/effects/common/FlipSourceEffect.java index e695082a33..83790807c7 100644 --- a/Mage/src/mage/abilities/effects/common/FlipSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/FlipSourceEffect.java @@ -39,7 +39,7 @@ public class FlipSourceEffect extends OneShotEffect { ContinuousEffect effect = new ConditionalContinuousEffect(new CopyTokenEffect(flipToken), FlippedCondition.getInstance(), ""); game.addEffect(effect, source); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()).append(" flips ").append(permanent.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" flips ").append(permanent.getName()).toString()); return true; } } diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java index a2e2dc94ab..eb80a1b122 100644 --- a/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java @@ -142,7 +142,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff } else { card.moveToZone(targetPickedCards, source.getSourceId(), game, false); if (!game.isSimulation()) - game.informPlayers(player.getName() + " moves a card to " + targetPickedCards.toString().toLowerCase()); + game.informPlayers(player.getLogName() + " moves a card to " + targetPickedCards.toString().toLowerCase()); } if (revealPickedCards) { reveal.add(card); diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java b/Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java index 62981ad01a..b352e9042d 100644 --- a/Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java +++ b/Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java @@ -44,7 +44,7 @@ public class LookLibraryMayPutToBottomEffect extends OneShotEffect { if (card == null) { return false; } - controller.lookAtCards(sourceObject.getLogName(), new CardsImpl(card), game); + controller.lookAtCards(sourceObject.getName(), new CardsImpl(card), game); boolean toBottom = controller.chooseUse(outcome, "Put card on the bottom of your library?", game); return controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, !toBottom, false); } diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java b/Mage/src/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java index fda6b269f3..e2994edc63 100644 --- a/Mage/src/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java +++ b/Mage/src/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java @@ -67,7 +67,7 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect { if (card != null) { CardsImpl cards = new CardsImpl(); cards.add(card); - player.lookAtCards(sourceObject.getLogName(), cards, game); + player.lookAtCards(sourceObject.getName(), cards, game); } return true; } diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java b/Mage/src/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java index 67380af9da..40d358d8fe 100644 --- a/Mage/src/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java +++ b/Mage/src/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java @@ -83,7 +83,7 @@ public class PreventDamageToTargetMultiAmountEffect extends PreventionEffectImpl StringBuilder sb = new StringBuilder(sourceObject.getName()).append(": Prevent the next "); sb.append(multiTarget.getTargetAmount(targetId)).append(" damage to "); if (player != null) { - sb.append(player.getName()); + sb.append(player.getLogName()); } else if (permanent != null) { sb.append(permanent.getName()); } diff --git a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopySource.java b/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopySource.java index f61f0c6b01..78ebf7f019 100644 --- a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopySource.java +++ b/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopySource.java @@ -70,7 +70,7 @@ public class PutTokenOntoBattlefieldCopySource extends OneShotEffect { CardUtil.copyTo(token).from((Permanent)thisCard); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()) + game.informPlayers(new StringBuilder(controller.getLogName()) .append(" puts a ").append(token.getName()).append(" token ").append("onto the Battlefield").toString()); return true; } @@ -81,7 +81,7 @@ public class PutTokenOntoBattlefieldCopySource extends OneShotEffect { CardUtil.copyTo(token).from(permanent); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()) + game.informPlayers(new StringBuilder(controller.getLogName()) .append(" puts a ").append(token.getName()).append(" token ").append("onto the Battlefield").toString()); return true; } diff --git a/Mage/src/mage/abilities/effects/common/ReturnFromExileEffect.java b/Mage/src/mage/abilities/effects/common/ReturnFromExileEffect.java index 035d000559..8ef7f04f93 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnFromExileEffect.java +++ b/Mage/src/mage/abilities/effects/common/ReturnFromExileEffect.java @@ -93,7 +93,7 @@ public class ReturnFromExileEffect extends OneShotEffect { case BATTLEFIELD: card.moveToZone(zone, source.getSourceId(), game, tapped); if (!game.isSimulation()) { - game.informPlayers(controller.getName() + " moves " + card.getName() + " to " + zone.toString().toLowerCase()); + game.informPlayers(controller.getLogName() + " moves " + card.getName() + " to " + zone.toString().toLowerCase()); } break; case HAND: @@ -108,7 +108,7 @@ public class ReturnFromExileEffect extends OneShotEffect { default: card.moveToZone(zone, source.getSourceId(), game, tapped); if (!game.isSimulation()) { - game.informPlayers(controller.getName() + " moves " + card.getName() + " to " + zone.toString().toLowerCase()); + game.informPlayers(controller.getLogName() + " moves " + card.getName() + " to " + zone.toString().toLowerCase()); } } } diff --git a/Mage/src/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java b/Mage/src/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java index 6b22884e07..f1e2347565 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java @@ -107,7 +107,7 @@ public class ReturnFromExileForSourceEffect extends OneShotEffect { return false; } if (!game.isSimulation()) { - game.informPlayers(controller.getName() + " moves " + card.getLogName() + " from exile to " + returnToZone.toString().toLowerCase()); + game.informPlayers(controller.getLogName() + " moves " + card.getLogName() + " from exile to " + returnToZone.toString().toLowerCase()); } card.moveToZone(returnToZone, source.getSourceId(), game, tapped); } diff --git a/Mage/src/mage/abilities/effects/common/RevealAndShuffleIntoLibrarySourceEffect.java b/Mage/src/mage/abilities/effects/common/RevealAndShuffleIntoLibrarySourceEffect.java index f13a8e9d98..9165ed4bfa 100644 --- a/Mage/src/mage/abilities/effects/common/RevealAndShuffleIntoLibrarySourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/RevealAndShuffleIntoLibrarySourceEffect.java @@ -82,7 +82,7 @@ public class RevealAndShuffleIntoLibrarySourceEffect extends OneShotEffect { if (owner != null) { Zone fromZone = game.getState().getZone(sourceObject.getId()); if (!cards.isEmpty()) { - controller.revealCards(sourceObject.getLogName(), cards, game); + controller.revealCards(sourceObject.getName(), cards, game); } if (permanent != null) { controller.moveCardToLibraryWithInfo(permanent, source.getSourceId(), game, fromZone, true, true); diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesColorOrColorsTargetEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BecomesColorOrColorsTargetEffect.java index 01d0237bc5..8aac40950b 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesColorOrColorsTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/BecomesColorOrColorsTargetEffect.java @@ -82,7 +82,7 @@ public class BecomesColorOrColorsTargetEffect extends OneShotEffect { return false; } if (!game.isSimulation()) - game.informPlayers(target.getName() + ": " + controller.getName() + " has chosen " + choiceColor.getChoice()); + game.informPlayers(target.getName() + ": " + controller.getLogName() + " has chosen " + choiceColor.getChoice()); if (choiceColor.getColor().isBlack()) { sb.append("B"); } else if (choiceColor.getColor().isBlue()) { diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java index f49e7a27ac..c17456326f 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java @@ -97,7 +97,7 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { return false; } if (!game.isSimulation()) - game.informPlayers(controller.getName() + " has chosen the color: " + objectColor.toString()); + game.informPlayers(controller.getLogName() + " has chosen the color: " + objectColor.toString()); } else { objectColor = this.setColor; } diff --git a/Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java b/Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java index 561bf3cfa1..7d0a1fc6b2 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java @@ -135,7 +135,7 @@ public class CommanderReplacementEffect extends ReplacementEffectImpl { if (player != null && player.chooseUse(Outcome.Benefit, "Move commander to command zone?", game)){ boolean result = permanent.moveToZone(Zone.COMMAND, source.getSourceId(), game, false); if (!game.isSimulation()) - game.informPlayers(player.getName() + " has moved his or her commander to the command zone"); + game.informPlayers(player.getLogName() + " has moved his or her commander to the command zone"); return result; } } @@ -155,7 +155,7 @@ public class CommanderReplacementEffect extends ReplacementEffectImpl { if (player != null && player.chooseUse(Outcome.Benefit, "Move commander to command zone?", game)){ boolean result = card.moveToZone(Zone.COMMAND, source.getSourceId(), game, false); if (!game.isSimulation()) - game.informPlayers(player.getName() + " has moved his or her commander to the command zone"); + game.informPlayers(player.getLogName() + " has moved his or her commander to the command zone"); return result; } } diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromColorTargetEffect.java b/Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromColorTargetEffect.java index 8e23b6a79c..1767fb43c2 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromColorTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromColorTargetEffect.java @@ -78,7 +78,7 @@ public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect } } if (choice.isChosen() && !game.isSimulation()) { - game.informPlayers(sourceObject.getLogName() + ": " + controller.getName() + " has chosen protection from " + choice.getChoice()); + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen protection from " + choice.getChoice()); } } } diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersAllEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddCountersAllEffect.java index a92b901ded..a818747e8e 100644 --- a/Mage/src/mage/abilities/effects/common/counter/AddCountersAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddCountersAllEffect.java @@ -74,7 +74,7 @@ public class AddCountersAllEffect extends OneShotEffect { permanent.addCounters(counter.copy(), game); if (!game.isSimulation()) game.informPlayers(new StringBuilder(sourceObject.getName()).append(": ") - .append(controller.getName()).append(" puts ") + .append(controller.getLogName()).append(" puts ") .append(counter.getCount()).append(" ").append(counter.getName().toLowerCase()) .append(" counter on ").append(permanent.getName()).toString()); } diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersSourceEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddCountersSourceEffect.java index 9f89a253f9..82c14c0cdb 100644 --- a/Mage/src/mage/abilities/effects/common/counter/AddCountersSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddCountersSourceEffect.java @@ -106,7 +106,7 @@ public class AddCountersSourceEffect extends OneShotEffect { if (informPlayers && !game.isSimulation()) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - game.informPlayers(new StringBuilder(player.getName()).append(" puts ").append(newCounter.getCount()).append(" ").append(newCounter.getName().toLowerCase()).append(" counter on ").append(card.getLogName()).toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" puts ").append(newCounter.getCount()).append(" ").append(newCounter.getName().toLowerCase()).append(" counter on ").append(card.getLogName()).toString()); } } } @@ -129,7 +129,7 @@ public class AddCountersSourceEffect extends OneShotEffect { int amountAdded = permanent.getCounters().getCount(newCounter.getName()) - before; Player player = game.getPlayer(source.getControllerId()); if (player != null) { - game.informPlayers(player.getName()+" puts "+amountAdded+" "+newCounter.getName().toLowerCase()+" counter on "+permanent.getLogName()); + game.informPlayers(player.getLogName()+" puts "+amountAdded+" "+newCounter.getName().toLowerCase()+" counter on "+permanent.getLogName()); } } } diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java index 5ae4cd6e31..922f5a03dd 100644 --- a/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java @@ -96,7 +96,7 @@ public class AddCountersTargetEffect extends OneShotEffect { int numberAdded = permanent.getCounters().getCount(counter.getName()) - before; affectedTargets ++; if (!game.isSimulation()) { - game.informPlayers(sourceObject.getLogName() +": "+ controller.getName()+ " puts " + + game.informPlayers(sourceObject.getLogName() +": "+ controller.getLogName()+ " puts " + numberAdded + " " + counter.getName().toLowerCase() + " counter on " + permanent.getLogName()); } } @@ -109,9 +109,9 @@ public class AddCountersTargetEffect extends OneShotEffect { affectedTargets ++; if (!game.isSimulation()) game.informPlayers(new StringBuilder(sourceObject.getLogName()).append(": ") - .append(controller.getName()).append(" puts ") + .append(controller.getLogName()).append(" puts ") .append(counter.getCount()).append(" ").append(counter.getName().toLowerCase()) - .append(" counter on ").append(player.getName()).toString()); + .append(" counter on ").append(player.getLogName()).toString()); } } } diff --git a/Mage/src/mage/abilities/effects/common/counter/ProliferateEffect.java b/Mage/src/mage/abilities/effects/common/counter/ProliferateEffect.java index 6d86478974..363012453c 100644 --- a/Mage/src/mage/abilities/effects/common/counter/ProliferateEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/ProliferateEffect.java @@ -113,7 +113,7 @@ public class ProliferateEffect extends OneShotEffect { choices.add(counter.getName()); } choice.setChoices(choices); - choice.setMessage("Choose a counter to proliferate (" + player.getName() + ")"); + choice.setMessage("Choose a counter to proliferate (" + player.getLogName() + ")"); controller.choose(Outcome.Benefit, choice, game); for (Counter counter : player.getCounters().values()) { if (counter.getName().equals(choice.getChoice())) { diff --git a/Mage/src/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java b/Mage/src/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java index 9f8ed201e8..e88dd52e0b 100644 --- a/Mage/src/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java @@ -134,9 +134,9 @@ public class DiscardCardYouChooseTargetEffect extends OneShotEffect { Cards revealedCards = new CardsImpl(Zone.HAND); numberToReveal = Math.min(player.getHand().size(), numberToReveal); if (player.getHand().size() > numberToReveal) { - TargetCardInHand chosenCards = new TargetCardInHand(numberToReveal, numberToReveal, new FilterCard("card in target player's hand")); + TargetCardInHand chosenCards = new TargetCardInHand(numberToReveal, numberToReveal, new FilterCard("card in "+ player.getLogName() +"'s hand")); chosenCards.setNotTarget(true); - if (chosenCards.canChoose(player.getId(), game) && player.choose(Outcome.Discard, player.getHand(), chosenCards, game)) { + if (chosenCards.canChoose(player.getId(), game) && player.chooseTarget(Outcome.Discard, player.getHand(), chosenCards, source, game)) { if (!chosenCards.getTargets().isEmpty()) { List targets = chosenCards.getTargets(); for (UUID targetid : targets) { diff --git a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java b/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java index c8de005262..33e6558d8e 100644 --- a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java +++ b/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java @@ -93,13 +93,13 @@ public class SearchLibraryPutOnLibraryEffect extends SearchEffect { Cards foundCards = new CardsImpl(); foundCards.addAll(cards); if (reveal) { - controller.revealCards(sourceObject.getLogName(), foundCards, game); + controller.revealCards(sourceObject.getName(), foundCards, game); } if (forceShuffle) { controller.shuffleLibrary(game); } if (cards.size() > 0 && !game.isSimulation()) { - game.informPlayers(controller.getName() + " moves " + cards.size() + " card" + (cards.size() == 1 ? " ":"s ") + "on top of his or her library"); + game.informPlayers(controller.getLogName() + " moves " + cards.size() + " card" + (cards.size() == 1 ? " ":"s ") + "on top of his or her library"); } for (Card card: cards) { card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); diff --git a/Mage/src/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java b/Mage/src/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java index 5fea547044..7b9cf6400b 100644 --- a/Mage/src/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java +++ b/Mage/src/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java @@ -96,7 +96,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect // cards in Graveyard int cardsCount = (cardName.isEmpty() ? 0 :targetPlayer.getGraveyard().count(filter, game)); if (cardsCount > 0) { - filter.setMessage("card named " + cardName + " in the graveyard of " + targetPlayer.getName()); + filter.setMessage("card named " + cardName + " in the graveyard of " + targetPlayer.getLogName()); TargetCard target = new TargetCard((graveyardExileOptional ? 0 :cardsCount), cardsCount,Zone.GRAVEYARD, filter); if (controller.choose(Outcome.Exile, targetPlayer.getGraveyard(), target, game)) { List targets = target.getTargets(); @@ -113,7 +113,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect // cards in Hand cardsCount = (cardName.isEmpty() ? 0 :targetPlayer.getHand().count(filter, game)); if (cardsCount > 0) { - filter.setMessage("card named " + cardName + " in the hand of " + targetPlayer.getName()); + filter.setMessage("card named " + cardName + " in the hand of " + targetPlayer.getLogName()); TargetCard target = new TargetCard(0, cardsCount, Zone.HAND, filter); if (controller.choose(Outcome.Exile, targetPlayer.getHand(), target, game)) { List targets = target.getTargets(); @@ -127,7 +127,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect } } else { if (targetPlayer.getHand().size() > 0) { - controller.lookAtCards(targetPlayer.getName() + " hand", targetPlayer.getHand(), game); + controller.lookAtCards(targetPlayer.getLogName() + " hand", targetPlayer.getHand(), game); } } @@ -136,7 +136,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect cardsInLibrary.addAll(targetPlayer.getLibrary().getCards(game)); cardsCount = (cardName.isEmpty() ? 0 : cardsInLibrary.count(filter, game)); if (cardsCount > 0) { - filter.setMessage("card named " + cardName + " in the library of " + targetPlayer.getName()); + filter.setMessage("card named " + cardName + " in the library of " + targetPlayer.getLogName()); TargetCardInLibrary target = new TargetCardInLibrary(0, cardsCount, filter); if (controller.choose(Outcome.Exile, cardsInLibrary, target, game)) { List targets = target.getTargets(); diff --git a/Mage/src/mage/abilities/keyword/ConspireAbility.java b/Mage/src/mage/abilities/keyword/ConspireAbility.java index f22c6699ec..311b659709 100644 --- a/Mage/src/mage/abilities/keyword/ConspireAbility.java +++ b/Mage/src/mage/abilities/keyword/ConspireAbility.java @@ -246,7 +246,7 @@ class ConspireEffect extends OneShotEffect { game.getStack().push(copy); copy.chooseNewTargets(game, source.getControllerId()); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()).append(copy.getActivatedMessage(game)).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(copy.getActivatedMessage(game)).toString()); return true; } } diff --git a/Mage/src/mage/abilities/keyword/ConvokeAbility.java b/Mage/src/mage/abilities/keyword/ConvokeAbility.java index 2d817b6e1f..fef21bc10e 100644 --- a/Mage/src/mage/abilities/keyword/ConvokeAbility.java +++ b/Mage/src/mage/abilities/keyword/ConvokeAbility.java @@ -252,7 +252,7 @@ class ConvokeEffect extends OneShotEffect { manaName = "colorless"; } if (!game.isSimulation()) - game.informPlayers("Convoke: " + controller.getName() + " taps " + perm.getLogName() + " to pay one " + manaName + " mana"); + game.informPlayers("Convoke: " + controller.getLogName() + " taps " + perm.getLogName() + " to pay one " + manaName + " mana"); } } diff --git a/Mage/src/mage/abilities/keyword/DredgeAbility.java b/Mage/src/mage/abilities/keyword/DredgeAbility.java index 3bf8d0b04b..0ef0acc1de 100644 --- a/Mage/src/mage/abilities/keyword/DredgeAbility.java +++ b/Mage/src/mage/abilities/keyword/DredgeAbility.java @@ -100,7 +100,7 @@ class DredgeEffect extends ReplacementEffectImpl { && player.chooseUse(outcome, new StringBuilder("Dredge ").append(sourceCard.getName()). append("? (").append(amount).append(" cards go from top of library to graveyard)").toString(), game)) { if (!game.isSimulation()) { - game.informPlayers(new StringBuilder(player.getName()).append(" dreges ").append(sourceCard.getName()).toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" dreges ").append(sourceCard.getName()).toString()); } Cards cardsToGrave = new CardsImpl(); cardsToGrave.addAll(player.getLibrary().getTopCards(game, amount)); diff --git a/Mage/src/mage/abilities/keyword/FlashbackAbility.java b/Mage/src/mage/abilities/keyword/FlashbackAbility.java index f0551e0923..2b963972ea 100644 --- a/Mage/src/mage/abilities/keyword/FlashbackAbility.java +++ b/Mage/src/mage/abilities/keyword/FlashbackAbility.java @@ -212,7 +212,7 @@ class FlashbackEffect extends OneShotEffect { spellAbility.getManaCostsToPay().setX(amount); } if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()).append(" flashbacks ").append(card.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" flashbacks ").append(card.getName()).toString()); spellAbility.setCostModificationActive(false); // prevents to apply cost modification twice for flashbacked spells if (controller.cast(spellAbility, game, true)) { game.addEffect(new FlashbackReplacementEffect(), source); diff --git a/Mage/src/mage/abilities/keyword/KickerAbility.java b/Mage/src/mage/abilities/keyword/KickerAbility.java index 4fc6c6aea0..fef48ffa24 100644 --- a/Mage/src/mage/abilities/keyword/KickerAbility.java +++ b/Mage/src/mage/abilities/keyword/KickerAbility.java @@ -219,7 +219,7 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo xManaValue = game.getPlayer(this.controllerId).announceXMana(varCosts.get(0).getMinX(), Integer.MAX_VALUE, "Announce kicker value for " + varCosts.get(0).getText(), game, this); // kicker variable X costs handled internally as multikicker with {1} cost (no multikicker on card) if (!game.isSimulation()) { - game.informPlayers(new StringBuilder(game.getPlayer(this.controllerId).getName()).append(" announced a value of ").append(xManaValue).append(" for ").append(" kicker X ").toString()); + game.informPlayers(game.getPlayer(this.controllerId).getLogName() + " announced a value of " + xManaValue +" for " + " kicker X "); } ability.getManaCostsToPay().add(new GenericManaCost(xManaValue)); } else { diff --git a/Mage/src/mage/abilities/keyword/ReplicateAbility.java b/Mage/src/mage/abilities/keyword/ReplicateAbility.java index 6b82031029..c78f079044 100644 --- a/Mage/src/mage/abilities/keyword/ReplicateAbility.java +++ b/Mage/src/mage/abilities/keyword/ReplicateAbility.java @@ -255,7 +255,7 @@ class ReplicateCopyEffect extends OneShotEffect { game.getStack().push(copy); copy.chooseNewTargets(game, source.getControllerId()); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()).append(copy.getActivatedMessage(game)).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(copy.getActivatedMessage(game)).toString()); } return true; } diff --git a/Mage/src/mage/abilities/keyword/SunburstAbility.java b/Mage/src/mage/abilities/keyword/SunburstAbility.java index f60d93126e..12b9d7834a 100644 --- a/Mage/src/mage/abilities/keyword/SunburstAbility.java +++ b/Mage/src/mage/abilities/keyword/SunburstAbility.java @@ -109,7 +109,7 @@ class SunburstEffect extends OneShotEffect { if (!game.isSimulation()) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - game.informPlayers(player.getName()+ " puts " + counter.getCount() + " " + counter.getName() + " counter on " + permanent.getName()); + game.informPlayers(player.getLogName()+ " puts " + counter.getCount() + " " + counter.getName() + " counter on " + permanent.getName()); } } } diff --git a/Mage/src/mage/abilities/keyword/SuspendAbility.java b/Mage/src/mage/abilities/keyword/SuspendAbility.java index a4c3c565a4..559b9c5c9a 100644 --- a/Mage/src/mage/abilities/keyword/SuspendAbility.java +++ b/Mage/src/mage/abilities/keyword/SuspendAbility.java @@ -282,7 +282,7 @@ class SuspendExileEffect extends OneShotEffect { } card.addCounters(CounterType.TIME.createInstance(suspend), game); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()).append(" suspends (").append(suspend).append(") ").append(card.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" suspends (").append(suspend).append(") ").append(card.getName()).toString()); return true; } } diff --git a/Mage/src/mage/abilities/keyword/TributeAbility.java b/Mage/src/mage/abilities/keyword/TributeAbility.java index c1835b8746..5c31ca8ab3 100644 --- a/Mage/src/mage/abilities/keyword/TributeAbility.java +++ b/Mage/src/mage/abilities/keyword/TributeAbility.java @@ -120,13 +120,13 @@ class TributeEffect extends OneShotEffect { sb.append(tributeValue > 1 ? "s":"").append(" to it)?"); if (opponent.chooseUse(outcome, sb.toString(), game)) { if (!game.isSimulation()) - game.informPlayers(new StringBuilder(opponent.getName()).append(" pays tribute to ").append(sourcePermanent.getName()).toString()); - game.getState().setValue(new StringBuilder("tributeValue").append(source.getSourceId()).toString(), "yes"); + game.informPlayers(opponent.getLogName() + " pays tribute to " + sourcePermanent.getLogName()); + game.getState().setValue("tributeValue" + source.getSourceId(), "yes"); return new AddCountersSourceEffect(CounterType.P1P1.createInstance(tributeValue), true).apply(game, source); } else { if (!game.isSimulation()) - game.informPlayers(new StringBuilder(opponent.getName()).append(" does not pay tribute to ").append(sourcePermanent.getName()).toString()); - game.getState().setValue(new StringBuilder("tributeValue").append(source.getSourceId()).toString(), "no"); + game.informPlayers(opponent.getLogName() + " does not pay tribute to " + sourcePermanent.getLogName()); + game.getState().setValue("tributeValue"+ source.getSourceId(), "no"); } return true; } diff --git a/Mage/src/mage/abilities/keyword/UnleashAbility.java b/Mage/src/mage/abilities/keyword/UnleashAbility.java index 42dafa9632..023b276fa1 100644 --- a/Mage/src/mage/abilities/keyword/UnleashAbility.java +++ b/Mage/src/mage/abilities/keyword/UnleashAbility.java @@ -113,7 +113,7 @@ class UnleashReplacementEffect extends ReplacementEffectImpl { if (creature != null && controller != null) { if (controller.chooseUse(outcome, "Unleash "+ creature.getName() +"?", game)) { if (!game.isSimulation()) - game.informPlayers(controller.getName() + " unleashes " + creature.getName()); + game.informPlayers(controller.getLogName() + " unleashes " + creature.getName()); creature.addCounters(CounterType.P1P1.createInstance(), game); } } diff --git a/Mage/src/mage/actions/MageDrawAction.java b/Mage/src/mage/actions/MageDrawAction.java index f3d8e13400..60cd6dcbd8 100644 --- a/Mage/src/mage/actions/MageDrawAction.java +++ b/Mage/src/mage/actions/MageDrawAction.java @@ -54,7 +54,7 @@ public class MageDrawAction extends MageAction { score += value; } if (!player.isTopCardRevealed() && numDrawn > 0) { - game.fireInformEvent(player.getName() + " draws " + CardUtil.numberToText(numDrawn, "a") + " card" + (numDrawn > 1 ? "s" : "")); + game.fireInformEvent(player.getLogName() + " draws " + CardUtil.numberToText(numDrawn, "a") + " card" + (numDrawn > 1 ? "s" : "")); } if (player.isEmptyDraw()) { GameEvent event = GameEvent.getEvent(GameEvent.EventType.EMPTY_DRAW, player.getId(), player.getId()); @@ -85,7 +85,7 @@ public class MageDrawAction extends MageAction { drawnCards.add(card); card.moveToZone(Zone.HAND, null, game, false); if (player.isTopCardRevealed()) { - game.fireInformEvent(player.getName() + " draws a revealed card (" + card.getLogName() + ")"); + game.fireInformEvent(player.getLogName() + " draws a revealed card (" + card.getLogName() + ")"); } game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DREW_CARD, card.getId(), player.getId())); diff --git a/Mage/src/mage/cards/CardImpl.java b/Mage/src/mage/cards/CardImpl.java index d248e8ed28..9458a22fe1 100644 --- a/Mage/src/mage/cards/CardImpl.java +++ b/Mage/src/mage/cards/CardImpl.java @@ -67,6 +67,7 @@ import mage.game.events.ZoneChangeEvent; import mage.game.permanent.PermanentCard; import mage.game.stack.Spell; import mage.game.stack.StackObject; +import mage.util.GameLog; import mage.watchers.Watcher; import org.apache.log4j.Logger; @@ -208,7 +209,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card { @Override public List getRules() { try { - return abilities.getRules(this.getLogName()); + return abilities.getRules(this.getName()); } catch (Exception e) { logger.info("Exception in rules generation for card: " + this.getName(), e); } @@ -741,10 +742,11 @@ public abstract class CardImpl extends MageObjectImpl implements Card { @Override public String getLogName() { -// if (this.isFaceDown()) { -// return "facedown card"; -// } - return name; + if (name.isEmpty()) { + return GameLog.getNeutralColoredText("face down card"); + } else { + return GameLog.getColoredObjectName(this); + } } @Override diff --git a/Mage/src/mage/filter/predicate/mageobject/NamePredicate.java b/Mage/src/mage/filter/predicate/mageobject/NamePredicate.java index 7cbc903f15..40e9e0adf4 100644 --- a/Mage/src/mage/filter/predicate/mageobject/NamePredicate.java +++ b/Mage/src/mage/filter/predicate/mageobject/NamePredicate.java @@ -51,12 +51,12 @@ public class NamePredicate implements Predicate { // If a player names a card, the player may name either half of a split card, but not both. // A split card has the chosen name if one of its two names matches the chosen name. if (input instanceof SplitCard) { - return name.equals(((SplitCard)input).getLeftHalfCard().getName()) || name.equals(((SplitCard)input).getRightHalfCard().getLogName()); + return name.equals(((SplitCard)input).getLeftHalfCard().getName()) || name.equals(((SplitCard)input).getRightHalfCard().getName()); } else if (input instanceof Spell && ((Spell)input).getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.SPLIT_FUSED)){ SplitCard card = (SplitCard) ((Spell)input).getCard(); - return name.equals(card.getLeftHalfCard().getName()) || name.equals(card.getRightHalfCard().getLogName()); + return name.equals(card.getLeftHalfCard().getName()) || name.equals(card.getRightHalfCard().getName()); } else { - return name.equals(input.getLogName()); + return name.equals(input.getName()); } } diff --git a/Mage/src/mage/game/GameCommanderImpl.java b/Mage/src/mage/game/GameCommanderImpl.java index f11afffb70..b5e4fae424 100644 --- a/Mage/src/mage/game/GameCommanderImpl.java +++ b/Mage/src/mage/game/GameCommanderImpl.java @@ -150,7 +150,7 @@ public abstract class GameCommanderImpl extends GameImpl { } } player.drawCards(numCards - deduction, this); - fireInformEvent(new StringBuilder(player.getName()) + fireInformEvent(new StringBuilder(player.getLogName()) .append(" mulligans ") .append(numCards) .append(numCards == 1? " card":" cards") diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index 6508fdb0a4..0dd2f2f881 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -538,7 +538,7 @@ public abstract class GameImpl implements Game, Serializable { if (winnerId == null) { return "Game is a draw"; } - return new StringBuilder("Player ").append(state.getPlayer(winnerId).getName()).append(" is the winner").toString(); + return "Player "+ state.getPlayer(winnerId).getName() + " is the winner"; } @Override @@ -699,7 +699,7 @@ public abstract class GameImpl implements Game, Serializable { state.setExtraTurn(true); state.setTurnId(extraTurn.getId()); if (!this.isSimulation()) { - informPlayers(extraPlayer.getName() + " takes an extra turn"); + informPlayers(extraPlayer.getLogName() + " takes an extra turn"); } playTurn(extraPlayer); state.setTurnNum(state.getTurnNum() + 1); @@ -747,7 +747,7 @@ public abstract class GameImpl implements Game, Serializable { private void logStartOfTurn(Player player) { StringBuilder sb = new StringBuilder("Turn ").append(state.getTurnNum()).append(" "); - sb.append(player.getName()); + sb.append(player.getLogName()); sb.append(" ("); int delimiter = this.getPlayers().size() - 1; for (Player gamePlayer : this.getPlayers().values()) { @@ -817,11 +817,11 @@ public abstract class GameImpl implements Game, Serializable { if (choosingPlayer != null && choosingPlayer.choose(Outcome.Benefit, targetPlayer, null, this)) { startingPlayerId = targetPlayer.getTargets().get(0); Player startingPlayer = state.getPlayer(startingPlayerId); - StringBuilder message = new StringBuilder(choosingPlayer.getName()).append(" chooses that "); + StringBuilder message = new StringBuilder(choosingPlayer.getLogName()).append(" chooses that "); if (choosingPlayer.getId().equals(startingPlayerId)) { message.append("he or she"); } else { - message.append(startingPlayer.getName()); + message.append(startingPlayer.getLogName()); } message.append(" takes the first turn"); @@ -868,10 +868,10 @@ public abstract class GameImpl implements Game, Serializable { if (keep) { endMulligan(player.getId()); keepPlayers.add(playerId); - fireInformEvent(player.getName() + " keeps hand"); + fireInformEvent(player.getLogName() + " keeps hand"); } else { mulliganPlayers.add(playerId); - fireInformEvent(player.getName() + " decides to take mulligan"); + fireInformEvent(player.getLogName() + " decides to take mulligan"); } } } @@ -959,7 +959,7 @@ public abstract class GameImpl implements Game, Serializable { protected UUID pickChoosingPlayer() { UUID[] players = getPlayers().keySet().toArray(new UUID[0]); UUID playerId = players[rnd.nextInt(players.length)]; - fireInformEvent(state.getPlayer(playerId).getName() + " won the toss"); + fireInformEvent(state.getPlayer(playerId).getLogName() + " won the toss"); return playerId; } @@ -1031,7 +1031,7 @@ public abstract class GameImpl implements Game, Serializable { usedFreeMulligans.put(player.getId(), 1); } } - fireInformEvent(new StringBuilder(player.getName()) + fireInformEvent(new StringBuilder(player.getLogName()) .append(" mulligans") .append(deduction == 0 ? " for free and draws ":" down to ") .append(Integer.toString(numCards - deduction)) @@ -1074,7 +1074,7 @@ public abstract class GameImpl implements Game, Serializable { Player player = state.getPlayer(playerId); if (player != null) { logger.debug(new StringBuilder("Player ").append(player.getName()).append(" concedes game ").append(this.getId())); - fireInformEvent(player.getName() + " has conceded."); + fireInformEvent(player.getLogName() + " has conceded."); player.concede(this); } } @@ -2142,7 +2142,7 @@ public abstract class GameImpl implements Game, Serializable { if (targetObject == null) { Player targetPlayer = game.getPlayer(event.getTargetId()); if (targetPlayer != null) { - targetName = targetPlayer.getName(); + targetName = targetPlayer.getLogName(); } } else { targetName = targetObject.getLogName(); diff --git a/Mage/src/mage/game/combat/Combat.java b/Mage/src/mage/game/combat/Combat.java index e09997e387..b70442fc7e 100644 --- a/Mage/src/mage/game/combat/Combat.java +++ b/Mage/src/mage/game/combat/Combat.java @@ -231,7 +231,7 @@ public class Combat implements Serializable, Copyable { } game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARED_ATTACKERS, attackerId, attackerId)); if (!game.isSimulation()) { - game.informPlayers(new StringBuilder(player.getName()).append(" attacks with ").append(groups.size()).append(groups.size() == 1 ? " creature":" creatures").toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" attacks with ").append(groups.size()).append(groups.size() == 1 ? " creature":" creatures").toString()); } } @@ -382,7 +382,7 @@ public class Combat implements Serializable, Copyable { for (CombatGroup group : this.getGroups()) { if (group.defendingPlayerId.equals(defender.getId())) { if (!shownDefendingPlayer) { - game.informPlayers(new StringBuilder("Attacked player: ").append(defender.getName()).toString()); + game.informPlayers("Attacked player: " + defender.getLogName()); shownDefendingPlayer = true; } StringBuilder sb = new StringBuilder(); @@ -899,7 +899,7 @@ public class Combat implements Serializable, Copyable { game.informPlayer(attackingPlayer, new StringBuilder("No more than ") .append(CardUtil.numberToText(defendingPlayer.getMaxAttackedBy())) .append(" creatures can attack ") - .append(defendingPlayer.getName()).toString()); + .append(defendingPlayer.getLogName()).toString()); } return false; } diff --git a/Mage/src/mage/game/command/Commander.java b/Mage/src/mage/game/command/Commander.java index 915f0aec39..f3d7d0859c 100644 --- a/Mage/src/mage/game/command/Commander.java +++ b/Mage/src/mage/game/command/Commander.java @@ -42,6 +42,7 @@ import mage.game.Game; import java.util.List; import java.util.UUID; +import mage.util.GameLog; /** * @@ -100,7 +101,7 @@ public class Commander implements CommandObject{ @Override public String getLogName() { - return card.getName(); + return GameLog.getColoredObjectName(this); } @Override diff --git a/Mage/src/mage/game/command/Emblem.java b/Mage/src/mage/game/command/Emblem.java index 78350feebb..7fb4552aa3 100644 --- a/Mage/src/mage/game/command/Emblem.java +++ b/Mage/src/mage/game/command/Emblem.java @@ -40,6 +40,7 @@ import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; import mage.constants.CardType; import mage.game.Game; +import mage.util.GameLog; /** * @author nantuko @@ -100,7 +101,7 @@ public class Emblem implements CommandObject { @Override public String getLogName() { - return name; + return GameLog.getColoredObjectName(this); } @Override diff --git a/Mage/src/mage/game/match/MatchImpl.java b/Mage/src/mage/game/match/MatchImpl.java index 0807738674..956f32bebd 100644 --- a/Mage/src/mage/game/match/MatchImpl.java +++ b/Mage/src/mage/game/match/MatchImpl.java @@ -420,7 +420,7 @@ public abstract class MatchImpl implements Match { StringBuilder sb = new StringBuilder(); sb.append("
Match score:
"); for (MatchPlayer mp :this.getPlayers()) { - sb.append(" ").append(mp.getName()); + sb.append(" ").append(mp.getPlayer().getLogName()); sb.append(" - ").append(mp.getWins()).append(mp.getWins()==1?" win":" wins"); if (mp.hasQuit()) { sb.append(" QUITTED"); diff --git a/Mage/src/mage/game/permanent/PermanentImpl.java b/Mage/src/mage/game/permanent/PermanentImpl.java index 95e6da42ec..c443897bc2 100644 --- a/Mage/src/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/mage/game/permanent/PermanentImpl.java @@ -76,6 +76,7 @@ import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.game.stack.StackObject; import mage.players.Player; +import mage.util.GameLog; import mage.util.ThreadLocalStringBuilder; /** @@ -996,7 +997,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { moveToZone(Zone.GRAVEYARD, sourceId, game, false); Player player = game.getPlayer(getControllerId()); if (player != null && !game.isSimulation()) { - game.informPlayers(new StringBuilder(player.getName()).append(" sacrificed ").append(this.getLogName()).toString()); + game.informPlayers(new StringBuilder(player.getLogName()).append(" sacrificed ").append(this.getLogName()).toString()); } game.fireEvent(GameEvent.getEvent(EventType.SACRIFICED_PERMANENT, objectId, sourceId, controllerId)); return true; @@ -1280,12 +1281,12 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { public String getLogName() { if (name.isEmpty()) { if (faceDown) { - return "face down creature"; + return GameLog.getNeutralColoredText("face down creature"); } else { - return "a creature without name"; + return GameLog.getNeutralColoredText("a creature without name"); } } - return name; + return GameLog.getColoredObjectName(this); } @Override diff --git a/Mage/src/mage/game/permanent/token/Token.java b/Mage/src/mage/game/permanent/token/Token.java index fd8a46bb1b..db626620e9 100644 --- a/Mage/src/mage/game/permanent/token/Token.java +++ b/Mage/src/mage/game/permanent/token/Token.java @@ -165,7 +165,7 @@ public class Token extends MageObjectImpl { } } if (!game.isSimulation()) { - game.informPlayers(new StringBuilder(controller.getName()).append(" puts ") + game.informPlayers(new StringBuilder(controller.getLogName()).append(" puts ") .append(CardUtil.numberToText(amount, "a")).append(" ").append(this.getName()).append(" token").append(amount==1?"":"s") .append(" onto the battlefield").toString()); } diff --git a/Mage/src/mage/game/stack/Spell.java b/Mage/src/mage/game/stack/Spell.java index 438a26ded3..7a9821ed6c 100644 --- a/Mage/src/mage/game/stack/Spell.java +++ b/Mage/src/mage/game/stack/Spell.java @@ -63,6 +63,7 @@ import mage.game.permanent.PermanentCard; import mage.players.Player; import mage.target.Target; import mage.target.TargetAmount; +import mage.util.GameLog; /** * @@ -168,8 +169,7 @@ public class Spell implements StackObject, Card { return "a card face down"; } } - return getSpellAbility().toString(); - + return GameLog.replaceNameByColoredName(card, getSpellAbility().toString()); } @Override @@ -512,7 +512,7 @@ public class Spell implements StackObject, Card { if (object == null) { Player targetPlayer = game.getPlayer(targetId); if (targetPlayer != null) { - name = targetPlayer.getName(); + name = targetPlayer.getLogName(); } } else { name = object.getName(); @@ -545,7 +545,7 @@ public class Spell implements StackObject, Card { @Override public String getLogName() { - return card.getName(); + return GameLog.getColoredObjectName(card); } @Override diff --git a/Mage/src/mage/game/stack/StackAbility.java b/Mage/src/mage/game/stack/StackAbility.java index d4ae324444..f2cc75b1fb 100644 --- a/Mage/src/mage/game/stack/StackAbility.java +++ b/Mage/src/mage/game/stack/StackAbility.java @@ -63,6 +63,7 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetAmount; +import mage.util.GameLog; import mage.watchers.Watcher; /** @@ -131,7 +132,7 @@ public class StackAbility implements StackObject, Ability { @Override public String getLogName() { - return name; + return GameLog.getColoredObjectName(this); } @Override @@ -730,7 +731,7 @@ public class StackAbility implements StackObject, Ability { if (object == null) { Player targetPlayer = game.getPlayer(targetId); if (targetPlayer != null) { - targetNames = targetPlayer.getName(); + targetNames = targetPlayer.getLogName(); } } else { targetNames = object.getName(); diff --git a/Mage/src/mage/players/Player.java b/Mage/src/mage/players/Player.java index f514bee995..3c4f0d64fa 100644 --- a/Mage/src/mage/players/Player.java +++ b/Mage/src/mage/players/Player.java @@ -82,6 +82,7 @@ public interface Player extends MageItem, Copyable { boolean isHuman(); String getName(); + String getLogName(); RangeOfInfluence getRange(); Library getLibrary(); Cards getSideboard(); diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 0832a81f22..33092b77f9 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -127,6 +127,7 @@ import mage.target.TargetPermanent; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetDiscard; import mage.util.CardUtil; +import mage.util.GameLog; import mage.watchers.common.BloodthirstWatcher; import org.apache.log4j.Logger; @@ -632,7 +633,7 @@ public abstract class PlayerImpl implements Player, Serializable { public void discardToMax(Game game) { if (hand.size() > this.maxHandSize) { if (!game.isSimulation()) - game.informPlayers(new StringBuilder(getName()).append(" discards down to ").append(this.maxHandSize).append(this.maxHandSize == 1 ? " hand card" : " hand cards").toString()); + game.informPlayers(getLogName() + " discards down to " + this.maxHandSize + (this.maxHandSize == 1 ? " hand card" : " hand cards")); discard(hand.size() - this.maxHandSize, null, game); } } @@ -726,7 +727,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (card != null) { // write info to game log first so game log infos from triggered or replacement effects follow in the game log if (!game.isSimulation()) - game.informPlayers(new StringBuilder(name).append(" discards ").append(card.getName()).toString()); + game.informPlayers(getLogName() + " discards " + card.getLogName()); /* If a card is discarded while Rest in Peace is on the battlefield, abilities that function * when a card is discarded (such as madness) still work, even though that card never reaches * a graveyard. In addition, spells or abilities that check the characteristics of a discarded @@ -917,11 +918,16 @@ public abstract class PlayerImpl implements Player, Serializable { } setCastSourceIdWithoutMana(null); if (spell.activate(game, noMana)) { +// for (Ability spellAbility: spell.getSpellAbilities()) { +// for (Effect effect: spellAbility.getEffects()) { +// effect.getTargetPointer().init(game, ability); +// } +// } GameEvent event = GameEvent.getEvent(GameEvent.EventType.SPELL_CAST, spell.getSpellAbility().getId(), spell.getSpellAbility().getSourceId(), playerId); event.setZone(fromZone); game.fireEvent(event); if (!game.isSimulation()) { - game.informPlayers(new StringBuilder(name).append(spell.getActivatedMessage(game)).toString()); + game.informPlayers(getLogName() + spell.getActivatedMessage(game)); } game.removeBookmark(bookmark); resetStoredBookmark(game); @@ -973,7 +979,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (card.putOntoBattlefield(game, zone, null, playerId)) { landsPlayed++; game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LAND_PLAYED, card.getId(), card.getId(), playerId)); - game.fireInformEvent(name + " plays " + card.getName()); + game.fireInformEvent(getLogName() + " plays " + card.getLogName()); // game.removeBookmark(bookmark); resetStoredBookmark(game); return true; @@ -1012,7 +1018,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (ability.activate(game, false)) { game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ACTIVATED_ABILITY, ability.getId(), ability.getSourceId(), playerId)); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(name).append(ability.getGameLogMessage(game)).toString()); + game.informPlayers(getLogName() + ability.getGameLogMessage(game)); game.removeBookmark(bookmark); resetStoredBookmark(game); return true; @@ -1039,7 +1045,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (action.activate(game, false)) { game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ACTIVATED_ABILITY, action.getSourceId(), action.getId(), playerId)); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(name).append(action.getGameLogMessage(game)).toString()); + game.informPlayers(getLogName() + action.getGameLogMessage(game)); if (action.resolve(game)) { game.removeBookmark(bookmark); resetStoredBookmark(game); @@ -1265,7 +1271,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.SHUFFLE_LIBRARY, playerId, playerId))) { this.library.shuffle(); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(this.name).append(" shuffles his or her library.").toString()); + game.informPlayers(getLogName() + " shuffles his or her library."); game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LIBRARY_SHUFFLED, playerId, playerId)); } } @@ -1279,11 +1285,11 @@ public abstract class PlayerImpl implements Player, Serializable { public void revealCards(String name, Cards cards, Game game, boolean postToLog) { game.getState().getRevealed().add(name, cards); if (postToLog && !game.isSimulation()) { - StringBuilder sb = new StringBuilder(this.getName()).append(" reveals "); + StringBuilder sb = new StringBuilder(getLogName()).append(" reveals "); int current = 0, last = cards.size(); for (Card card : cards.getCards(game)) { current++; - sb.append(card.getName()); + sb.append(card.getLogName()); if (current < last) { sb.append(", "); } @@ -1359,7 +1365,7 @@ public abstract class PlayerImpl implements Player, Serializable { StringBuilder sb = new StringBuilder(message).append(" to untap").append(" (").append(Math.min(leftForUntap.size(), numberToUntap)).append(" in total"); MageObject effectSource = game.getObject(ability.getSourceId()); if (effectSource != null) { - sb.append(" from ").append(effectSource.getName()).toString(); + sb.append(" from ").append(effectSource.getLogName()).toString(); } sb.append(")"); filter.setMessage(sb.toString()); @@ -1407,7 +1413,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (!game.isSimulation()) { // show in log which permanents were selected to untap for (Permanent permanent : selectedToUntap) { - game.informPlayers(new StringBuilder(this.getName()).append(" untapped ").append(permanent.getName()).toString()); + game.informPlayers(this.getLogName() + " untapped " + permanent.getLogName()); } } // untap if permanent is not concerned by notMoreThan effects or is included in the selectedToUntapList @@ -1488,6 +1494,11 @@ public abstract class PlayerImpl implements Player, Serializable { return name; } + @Override + public String getLogName() { + return GameLog.getColoredPlayerName(name); + } + @Override public boolean isHuman() { return human; @@ -1558,7 +1569,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (!game.replaceEvent(event)) { this.life -= event.getAmount(); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(this.getName()).append(" loses ").append(event.getAmount()).append(" life").toString()); + game.informPlayers(this.getLogName() + " loses " + event.getAmount() + " life"); game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, amount)); return amount; } @@ -1583,8 +1594,9 @@ public abstract class PlayerImpl implements Player, Serializable { GameEvent event = new GameEvent(GameEvent.EventType.GAIN_LIFE, playerId, playerId, playerId, amount, false); if (!game.replaceEvent(event)) { this.life += event.getAmount(); - if (!game.isSimulation()) - game.informPlayers(new StringBuilder(this.getName()).append(" gains ").append(event.getAmount()).append(" life").toString()); + if (!game.isSimulation()) { + game.informPlayers(this.getLogName() + " gains " + event.getAmount() + " life"); + } game.fireEvent(GameEvent.getEvent(GameEvent.EventType.GAINED_LIFE, playerId, playerId, playerId, event.getAmount())); return event.getAmount(); } @@ -1774,7 +1786,7 @@ public abstract class PlayerImpl implements Player, Serializable { quit = true; this.concede(game); logger.debug(getName() + " quits the match."); - game.informPlayers(getName() + " quits the match."); + game.informPlayers(getLogName() + " quits the match."); } @Override @@ -1782,7 +1794,7 @@ public abstract class PlayerImpl implements Player, Serializable { quit = true; timerTimeout = true; this.concede(game); - game.informPlayers(getName() + " has run out of time. Loosing the Match."); + game.informPlayers(getLogName() + " has run out of time. Loosing the Match."); } @Override @@ -1790,7 +1802,7 @@ public abstract class PlayerImpl implements Player, Serializable { quit = true; idleTimeout = true; this.concede(game); - game.informPlayers(new StringBuilder(getName()).append(" was idle for too long. Loosing the Match.").toString()); + game.informPlayers(new StringBuilder(getLogName()).append(" was idle for too long. Loosing the Match.").toString()); } @Override @@ -1889,14 +1901,14 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public void lostForced(Game game) { - logger.debug(this.getName() + " has lost gameId: " + game.getId()); + logger.debug(this.getLogName() + " has lost gameId: " + game.getId()); //20100423 - 603.9 if (!this.wins) { this.loses = true; game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST, null, null, playerId)); - game.informPlayers(this.getName() + " has lost the game."); + game.informPlayers(this.getLogName() + " has lost the game."); } else { - logger.debug(this.getName() + " has already won - stop lost"); + logger.debug(this.getLogName() + " has already won - stop lost"); } // for draw - first all players that have lost have to be set to lost if (!hasLeft()) { @@ -1945,7 +1957,7 @@ public abstract class PlayerImpl implements Player, Serializable { } if (opponentsAlive == 0 && !hasWon()) { logger.debug("player won -> No more opponents alive game won: " + this.getName()); - game.informPlayers(new StringBuilder(this.getName()).append(" has won the game").toString()); + game.informPlayers(this.getLogName() + " has won the game"); this.wins = true; game.end(); } @@ -2012,12 +2024,12 @@ public abstract class PlayerImpl implements Player, Serializable { Library searchedLibrary = null; String searchInfo = null; if (targetPlayerId.equals(playerId)) { - searchInfo = getName() + " searches his or her library"; + searchInfo = getLogName() + " searches his or her library"; searchedLibrary = library; } else { Player targetPlayer = game.getPlayer(targetPlayerId); if (targetPlayer != null) { - searchInfo = getName() + " searches the library of " + targetPlayer.getName(); + searchInfo = getLogName() + " searches the library of " + targetPlayer.getLogName(); searchedLibrary = targetPlayer.getLibrary(); } } @@ -2068,7 +2080,7 @@ public abstract class PlayerImpl implements Player, Serializable { public boolean flipCoin(Game game, ArrayList appliedEffects) { boolean result = rnd.nextBoolean(); if (!game.isSimulation()) - game.informPlayers("[Flip a coin] " + getName() + (result ? " won (head)." : " lost (tail).")); + game.informPlayers("[Flip a coin] " + getLogName() + (result ? " won (head)." : " lost (tail).")); GameEvent event = new GameEvent(GameEvent.EventType.FLIP_COIN, playerId, null, playerId, 0, result); event.setAppliedEffects(appliedEffects); game.replaceEvent(event); @@ -2734,7 +2746,7 @@ public abstract class PlayerImpl implements Player, Serializable { public void revealFaceDownCard(Card card, Game game) { if (game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.REVEAL_FACE_DOWN, this.getId(), game)) { Cards cards = new CardsImpl(card); - this.revealCards(name, cards, game); + this.revealCards(getName(), cards, game); } } @@ -2803,7 +2815,7 @@ public abstract class PlayerImpl implements Player, Serializable { card = game.getCard(card.getId()); } if (!game.isSimulation()) { - StringBuilder sb = new StringBuilder(this.getName()).append(" puts ").append(withName ? card.getLogName() : "a face down card"); + StringBuilder sb = new StringBuilder(this.getLogName()).append(" puts ").append(withName ? card.getLogName() : "a face down card"); switch(fromZone) { case EXILED: sb.append(" from exile zone "); @@ -2890,7 +2902,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (card instanceof PermanentCard) { card = game.getCard(card.getId()); } - StringBuilder sb = new StringBuilder(this.getName()) + StringBuilder sb = new StringBuilder(this.getLogName()) .append(" puts ").append(card.getLogName()).append(" ") .append(fromZone != null ? new StringBuilder("from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" ") : ""); if (card.getOwnerId().equals(getId())) { @@ -2913,7 +2925,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (card instanceof PermanentCard) { card = game.getCard(card.getId()); } - StringBuilder sb = new StringBuilder(this.getName()) + StringBuilder sb = new StringBuilder(this.getLogName()) .append(" puts ").append(withName ? card.getLogName() : "a card").append(" "); if (fromZone != null) { if (fromZone.equals(Zone.PICK)) { @@ -2928,7 +2940,7 @@ public abstract class PlayerImpl implements Player, Serializable { } else { Player player = game.getPlayer(card.getOwnerId()); if (player != null) { - sb.append(" of ").append(player.getName()).append("'s library"); + sb.append(" of ").append(player.getLogName()).append("'s library"); } } game.informPlayers(sb.toString()); @@ -2946,10 +2958,9 @@ public abstract class PlayerImpl implements Player, Serializable { if (card instanceof PermanentCard) { card = game.getCard(card.getId()); } - game.informPlayers(new StringBuilder(this.getName()) - .append(" moves ").append(withName ? card.getLogName() : "a card face down").append(" ") - .append(fromZone != null ? new StringBuilder("from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" ") : "") - .append("to the exile zone").toString()); + game.informPlayers(this.getLogName() + " moves " + (withName ? card.getLogName() : "a card face down") + " " + + (fromZone != null ? new StringBuilder("from ") + fromZone.toString().toLowerCase(Locale.ENGLISH) + " " : "") + + "to the exile zone"); } result = true; } @@ -2971,7 +2982,7 @@ public abstract class PlayerImpl implements Player, Serializable { boolean result = false; if (card.putOntoBattlefield(game, fromZone, sourceId, this.getId(), tapped, facedown)) { if (!game.isSimulation()) - game.informPlayers(new StringBuilder(this.getName()) + game.informPlayers(new StringBuilder(this.getLogName()) .append(" puts ").append(facedown ? "a card face down ":card.getLogName()) .append(" from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" ") .append("onto the Battlefield").toString()); diff --git a/Mage/src/mage/target/TargetPlayer.java b/Mage/src/mage/target/TargetPlayer.java index 1cd83f26d4..944b49fc7b 100644 --- a/Mage/src/mage/target/TargetPlayer.java +++ b/Mage/src/mage/target/TargetPlayer.java @@ -198,7 +198,7 @@ public class TargetPlayer extends TargetImpl { for (UUID targetId: getTargets()) { Player player = game.getPlayer(targetId); if (player != null) { - sb.append(player.getName()).append(" "); + sb.append(player.getLogName()).append(" "); } else { sb.append("[target missing]"); } diff --git a/Mage/src/mage/target/common/TargetCreatureOrPlayer.java b/Mage/src/mage/target/common/TargetCreatureOrPlayer.java index 9c18a671d1..eef898e4dd 100644 --- a/Mage/src/mage/target/common/TargetCreatureOrPlayer.java +++ b/Mage/src/mage/target/common/TargetCreatureOrPlayer.java @@ -229,7 +229,7 @@ public class TargetCreatureOrPlayer extends TargetImpl { else { Player player = game.getPlayer(targetId); if (player != null) { - sb.append(player.getName()).append(" "); + sb.append(player.getLogName()).append(" "); } } } diff --git a/Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java b/Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java index 9709f99edf..c8f9eb2258 100644 --- a/Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java +++ b/Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java @@ -212,7 +212,7 @@ public class TargetCreatureOrPlayerAmount extends TargetAmount { } else { Player player = game.getPlayer(targetId); - sb.append(player.getName()).append("(").append(getTargetAmount(targetId)).append(") "); + sb.append(player.getLogName()).append("(").append(getTargetAmount(targetId)).append(") "); } } return sb.toString(); diff --git a/Mage/src/mage/target/common/TargetDefender.java b/Mage/src/mage/target/common/TargetDefender.java index 105e6d1276..003b7ed0ef 100644 --- a/Mage/src/mage/target/common/TargetDefender.java +++ b/Mage/src/mage/target/common/TargetDefender.java @@ -174,7 +174,7 @@ public class TargetDefender extends TargetImpl { } else { Player player = game.getPlayer(targetId); - sb.append(player.getName()).append(" "); + sb.append(player.getLogName()).append(" "); } } return sb.toString(); diff --git a/Mage/src/mage/target/common/TargetPermanentOrPlayer.java b/Mage/src/mage/target/common/TargetPermanentOrPlayer.java index 8047006ebf..d43b565090 100644 --- a/Mage/src/mage/target/common/TargetPermanentOrPlayer.java +++ b/Mage/src/mage/target/common/TargetPermanentOrPlayer.java @@ -252,7 +252,7 @@ public class TargetPermanentOrPlayer extends TargetImpl { } else { Player player = game.getPlayer(targetId); - sb.append(player.getName()).append(" "); + sb.append(player.getLogName()).append(" "); } } return sb.toString(); diff --git a/Mage/src/mage/util/GameLog.java b/Mage/src/mage/util/GameLog.java new file mode 100644 index 0000000000..9b8c8ce4de --- /dev/null +++ b/Mage/src/mage/util/GameLog.java @@ -0,0 +1,85 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.util; + +import mage.MageObject; +import mage.ObjectColor; + +/** + * + * @author LevelX2 + */ +public class GameLog { + + static final String LOG_COLOR_PLAYER = "#20B2AA"; // LightSeaGreen + static final String LOG_COLOR_GREEN = "#90EE90"; // LightGreen + static final String LOG_COLOR_RED = "#FF6347"; // Tomato + static final String LOG_COLOR_BLUE = "#87CEFA"; // LightSkyBlue + static final String LOG_COLOR_BLACK = "#696969"; // DimGray // "#5F9EA0"; // CadetBlue + static final String LOG_COLOR_WHITE = "#F0E68C"; // Khaki + static final String LOG_COLOR_MULTI = "#DAA520"; // GoldenRod + static final String LOG_COLOR_COLORLESS = "#B0C4DE"; // LightSteelBlue + static final String LOG_COLOR_NEUTRAL = "#F0F8FF"; // AliceBlue + + + + public static String replaceNameByColoredName(MageObject mageObject, String text) { + return text.replaceAll(mageObject.getName(), getColoredObjectName(mageObject)); + } + + public static String getColoredObjectName(MageObject mageObject) { + return "" + mageObject.getName() + ""; + } + + public static String getNeutralColoredText(String text) { + return "" + text + ""; + } + + public static String getColoredPlayerName(String name) { + return "" + name + ""; + } + + private static String getColorName(ObjectColor objectColor) { + if (objectColor.isMulticolored()) { + return LOG_COLOR_MULTI; + } else if (objectColor.isColorless()){ + return LOG_COLOR_COLORLESS; + } else if (objectColor.isRed()){ + return LOG_COLOR_RED; + } else if (objectColor.isGreen()){ + return LOG_COLOR_GREEN; + } else if (objectColor.isBlue()){ + return LOG_COLOR_BLUE; + } else if (objectColor.isWhite()){ + return LOG_COLOR_WHITE; + } else { + return LOG_COLOR_BLACK; + } + } +} diff --git a/Mage/src/mage/watchers/common/CommanderInfoWatcher.java b/Mage/src/mage/watchers/common/CommanderInfoWatcher.java index 57cc1d8334..a59f3eb800 100644 --- a/Mage/src/mage/watchers/common/CommanderInfoWatcher.java +++ b/Mage/src/mage/watchers/common/CommanderInfoWatcher.java @@ -89,7 +89,7 @@ public class CommanderInfoWatcher extends Watcher { MageObject commander = game.getObject(sourceId); if (player != null && commander != null){ if (!game.isSimulation()) - game.informPlayers(commander.getLogName() + " did " + damage + " combat damage to " + player.getName() + " during the game."); + game.informPlayers(commander.getLogName() + " did " + damage + " combat damage to " + player.getLogName() + " during the game."); this.addCardInfoToCommander(game); } } @@ -119,7 +119,7 @@ public class CommanderInfoWatcher extends Watcher { for (Map.Entry entry : damageToPlayer.entrySet()) { Player damagedPlayer = game.getPlayer(entry.getKey()); sb.setLength(0); - sb.append("Commander did ").append(entry.getValue()).append(" combat damage to player ").append(damagedPlayer.getName()).append("."); + sb.append("Commander did ").append(entry.getValue()).append(" combat damage to player ").append(damagedPlayer.getLogName()).append("."); this.addInfo(object, new StringBuilder("Commander").append(entry.getKey()).toString(),sb.toString(), game); } } diff --git a/Mage/src/mage/watchers/common/SoulbondWatcher.java b/Mage/src/mage/watchers/common/SoulbondWatcher.java index 4acc178b30..c86e9b8fe2 100644 --- a/Mage/src/mage/watchers/common/SoulbondWatcher.java +++ b/Mage/src/mage/watchers/common/SoulbondWatcher.java @@ -89,7 +89,7 @@ public class SoulbondWatcher extends Watcher { chosen.setPairedCard(permanent.getId()); permanent.setPairedCard(chosen.getId()); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()).append(" souldbonds ").append(permanent.getLogName()).append(" with ").append(chosen.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" souldbonds ").append(permanent.getLogName()).append(" with ").append(chosen.getName()).toString()); } } } @@ -114,7 +114,7 @@ public class SoulbondWatcher extends Watcher { chosen.setPairedCard(permanent.getId()); permanent.setPairedCard(chosen.getId()); if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getName()).append(" souldbonds ").append(permanent.getLogName()).append(" with ").append(chosen.getName()).toString()); + game.informPlayers(new StringBuilder(controller.getLogName()).append(" souldbonds ").append(permanent.getLogName()).append(" with ").append(chosen.getName()).toString()); break; } }