From 702a1f2498389e492b783236f3ed8c37793b64d6 Mon Sep 17 00:00:00 2001 From: Ingmar Goudt Date: Sun, 29 Dec 2019 19:18:20 +0100 Subject: [PATCH] remove all copy constructors and copy methods for all watchers --- .../classes/mage/game/OathbreakerDuel.class | Bin 0 -> 1540 bytes .../mage/game/OathbreakerDuelMatch.class | Bin 0 -> 1573 bytes .../mage/game/OathbreakerDuelType.class | Bin 0 -> 995 bytes .../mage/game/OathbreakerFreeForAll$1.class | Bin 0 -> 803 bytes .../mage/game/OathbreakerFreeForAll.class | Bin 0 -> 7859 bytes .../game/OathbreakerFreeForAllMatch.class | Bin 0 -> 1603 bytes .../mage/game/OathbreakerFreeForAllType.class | Bin 0 -> 1023 bytes .../mage/cards/a/AbandonedSarcophagus.java | 12 ---- .../src/mage/cards/a/AdmiralBeckettBrass.java | 16 +----- Mage.Sets/src/mage/cards/a/Aggravate.java | 2 +- .../src/mage/cards/a/AngerOfTheGods.java | 2 +- .../src/mage/cards/a/AnnihilatingFire.java | 2 +- .../mage/cards/a/ApproachOfTheSecondSun.java | 9 --- Mage.Sets/src/mage/cards/a/ArchiveTrap.java | 10 ---- .../src/mage/cards/a/ArclightPhoenix.java | 10 ---- .../src/mage/cards/a/AsmiraHolyAvenger.java | 10 ---- Mage.Sets/src/mage/cards/a/AureliasFury.java | 11 ---- Mage.Sets/src/mage/cards/b/Berserk.java | 8 --- Mage.Sets/src/mage/cards/b/BlazingEffigy.java | 10 ---- .../mage/cards/b/BoseijuWhoSheltersAll.java | 17 +----- .../BurningCinderFuryOfCrimsonChaosFire.java | 9 --- .../src/mage/cards/c/CallerOfTheClaw.java | 10 ---- Mage.Sets/src/mage/cards/c/Carbonize.java | 2 +- .../src/mage/cards/c/CathedralMembrane.java | 10 ---- Mage.Sets/src/mage/cards/c/CavernOfSouls.java | 17 +----- .../src/mage/cards/c/CerebralVortex.java | 12 ---- Mage.Sets/src/mage/cards/c/CobraTrap.java | 9 --- Mage.Sets/src/mage/cards/c/ConduitOfRuin.java | 11 ---- Mage.Sets/src/mage/cards/c/CorrosiveOoze.java | 18 ------ .../src/mage/cards/c/CustodiSoulcaller.java | 10 ---- Mage.Sets/src/mage/cards/c/CyclopeanTomb.java | 14 ----- .../src/mage/cards/d/DarkbladeAgent.java | 10 ---- Mage.Sets/src/mage/cards/d/Demonfire.java | 2 +- Mage.Sets/src/mage/cards/d/Desolation.java | 13 +---- .../src/mage/cards/d/DiseasedVermin.java | 11 ---- Mage.Sets/src/mage/cards/d/DreamSalvage.java | 12 ---- Mage.Sets/src/mage/cards/d/DungeonGeists.java | 9 --- .../src/mage/cards/e/ErdwalIlluminator.java | 9 --- .../src/mage/cards/e/EtherswornCanonist.java | 11 ---- .../mage/cards/f/FairgroundsTrumpeter.java | 9 --- Mage.Sets/src/mage/cards/f/FaithsReward.java | 10 ---- Mage.Sets/src/mage/cards/f/FblthpTheLost.java | 10 ---- Mage.Sets/src/mage/cards/f/FellShepherd.java | 10 ---- Mage.Sets/src/mage/cards/f/Flamebreak.java | 2 +- Mage.Sets/src/mage/cards/f/FleshAllergy.java | 9 --- .../src/mage/cards/f/FreeRangeChicken.java | 12 ---- Mage.Sets/src/mage/cards/f/Frostwielder.java | 2 +- .../src/mage/cards/g/GarnaTheBloodflame.java | 10 ---- .../src/mage/cards/g/GeneratorServant.java | 10 ---- .../src/mage/cards/g/GideonsTriumph.java | 11 ---- Mage.Sets/src/mage/cards/g/GisaAndGeralf.java | 10 ---- Mage.Sets/src/mage/cards/g/Gomazoa.java | 10 ---- .../src/mage/cards/g/GontisMachinations.java | 9 --- .../src/mage/cards/g/GrandWarlordRadha.java | 11 ---- Mage.Sets/src/mage/cards/g/GrimReminder.java | 12 ---- .../mage/cards/g/GrothamaAllDevouring.java | 16 ------ .../src/mage/cards/g/GuildmagesForum.java | 10 ---- .../src/mage/cards/h/HallOfTheBanditLord.java | 11 ---- .../mage/cards/h/HomicidalBruteWatcher.java | 9 --- .../src/mage/cards/h/HopeOfGhirapur.java | 14 ----- .../src/mage/cards/h/HotheadedGiant.java | 10 ---- Mage.Sets/src/mage/cards/i/IcefallRegent.java | 9 --- .../src/mage/cards/i/IchneumonDruid.java | 12 ---- .../src/mage/cards/i/ImpactResonance.java | 10 ---- .../src/mage/cards/i/IncendiaryFlow.java | 2 +- Mage.Sets/src/mage/cards/i/Incinerate.java | 2 +- Mage.Sets/src/mage/cards/i/InfernoTrap.java | 9 --- .../src/mage/cards/i/InsatiableRakghoul.java | 9 --- Mage.Sets/src/mage/cards/i/Insist.java | 10 ---- Mage.Sets/src/mage/cards/j/JandorsRing.java | 12 +--- .../src/mage/cards/j/JayaBallardTaskMage.java | 2 +- .../mage/cards/j/JelevaNephaliasScourge.java | 9 --- .../mage/cards/k/KaradorGhostChieftain.java | 10 ---- .../src/mage/cards/k/KessDissidentMage.java | 11 ---- .../mage/cards/k/KnightsOfTheBlackRose.java | 7 --- .../src/mage/cards/k/KrovikanVampire.java | 20 ------- .../mage/cards/k/KumanoMasterYamabushi.java | 2 +- .../src/mage/cards/k/KumanosBlessing.java | 10 ---- Mage.Sets/src/mage/cards/k/KumanosPupils.java | 2 +- .../mage/cards/k/KydeleChosenOfKruphix.java | 10 ---- Mage.Sets/src/mage/cards/m/ManaMaze.java | 10 ---- .../src/mage/cards/m/MasterWarcraft.java | 10 ---- .../src/mage/cards/m/MindstormCrown.java | 9 --- Mage.Sets/src/mage/cards/m/MoltenPsyche.java | 10 ---- .../mage/cards/m/MuldrothaTheGravetide.java | 10 ---- .../src/mage/cards/m/MultanisPresence.java | 10 ---- .../src/mage/cards/n/NoRestForTheWicked.java | 11 ---- Mage.Sets/src/mage/cards/o/OathOfChandra.java | 10 ---- Mage.Sets/src/mage/cards/o/OathOfLiliana.java | 9 --- Mage.Sets/src/mage/cards/o/OpalPalace.java | 11 ---- Mage.Sets/src/mage/cards/o/Overmaster.java | 9 --- .../mage/cards/p/PalladiaMorsTheRuiner.java | 10 ---- .../src/mage/cards/p/PatriciansScorn.java | 9 --- Mage.Sets/src/mage/cards/p/PillarOfFlame.java | 2 +- Mage.Sets/src/mage/cards/p/PowerSurge.java | 10 ---- .../src/mage/cards/p/PredatoryAdvantage.java | 9 --- .../src/mage/cards/p/PrematureBurial.java | 13 ----- Mage.Sets/src/mage/cards/q/Quicken.java | 9 --- .../src/mage/cards/r/RageOfPurphoros.java | 2 +- .../src/mage/cards/r/RasputinDreamweaver.java | 12 +--- Mage.Sets/src/mage/cards/r/RedSunsZenith.java | 2 +- .../src/mage/cards/r/ReversePolarity.java | 11 ---- .../src/mage/cards/r/RocketLauncher.java | 10 ---- Mage.Sets/src/mage/cards/r/Runesword.java | 2 +- .../src/mage/cards/s/SavageSummoning.java | 16 ------ Mage.Sets/src/mage/cards/s/ScoutsWarning.java | 9 --- Mage.Sets/src/mage/cards/s/SeaTroll.java | 10 ---- .../src/mage/cards/s/SeasonOfTheWitch.java | 10 ---- Mage.Sets/src/mage/cards/s/SecondSunrise.java | 10 ---- Mage.Sets/src/mage/cards/s/SentinelTower.java | 10 ---- .../src/mage/cards/s/SerpentineSpike.java | 2 +- .../src/mage/cards/s/ShapeOfTheWiitigo.java | 13 ----- .../src/mage/cards/s/ShipbreakerKraken.java | 9 --- .../src/mage/cards/s/SiftThroughSands.java | 13 +---- Mage.Sets/src/mage/cards/s/Skeletonize.java | 2 +- Mage.Sets/src/mage/cards/s/SoulReap.java | 10 ---- .../src/mage/cards/s/SpinerockKnoll.java | 12 ---- Mage.Sets/src/mage/cards/s/SpinyStarfish.java | 34 +++--------- .../mage/cards/s/SpiritOfTheLabyrinth.java | 11 ---- Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java | 9 --- Mage.Sets/src/mage/cards/s/SteelHellkite.java | 10 ---- .../src/mage/cards/s/StorrevDevkarinLich.java | 9 --- Mage.Sets/src/mage/cards/s/SummoningTrap.java | 10 ---- Mage.Sets/src/mage/cards/s/SylvanLibrary.java | 10 ---- .../src/mage/cards/t/TalarasBattalion.java | 10 ---- .../src/mage/cards/t/TapestryOfTheAges.java | 10 ---- .../src/mage/cards/t/TerritorialHellkite.java | 17 +----- Mage.Sets/src/mage/cards/t/TheChainVeil.java | 10 ---- Mage.Sets/src/mage/cards/t/TheFallen.java | 10 ---- Mage.Sets/src/mage/cards/t/ThirstingAxe.java | 10 ---- .../src/mage/cards/t/ThousandYearStorm.java | 13 ----- .../src/mage/cards/t/TidebinderMage.java | 9 --- Mage.Sets/src/mage/cards/t/TimeOfIce.java | 9 --- Mage.Sets/src/mage/cards/t/TimeToReflect.java | 10 ---- .../src/mage/cards/t/TouchOfTheVoid.java | 2 +- Mage.Sets/src/mage/cards/t/TritonTactics.java | 9 --- Mage.Sets/src/mage/cards/t/TunnelIgnus.java | 12 ---- .../src/mage/cards/t/TuvasaTheSunlit.java | 10 ---- .../src/mage/cards/t/TymnaTheWeaver.java | 14 ----- Mage.Sets/src/mage/cards/u/UbaMask.java | 10 ---- Mage.Sets/src/mage/cards/u/UphillBattle.java | 11 ---- Mage.Sets/src/mage/cards/u/UrzasMiter.java | 10 ---- .../src/mage/cards/v/VeneratedLoxodon.java | 13 ----- Mage.Sets/src/mage/cards/v/Vengevine.java | 10 ---- Mage.Sets/src/mage/cards/v/VileRedeemer.java | 10 ---- .../src/mage/cards/v/VizierOfManyFaces.java | 10 ---- .../src/mage/cards/v/VodalianWarMachine.java | 15 +---- .../src/mage/cards/w/WhisperingSnitch.java | 9 --- Mage.Sets/src/mage/cards/w/Wiitigo.java | 13 ----- Mage.Sets/src/mage/cards/w/WookieeMystic.java | 2 +- .../src/mage/cards/y/YamabushisFlame.java | 2 +- .../src/mage/cards/y/YamabushisStorm.java | 2 +- .../java/mage/verify/VerifyCardDataTest.java | 19 ++++++- .../mage/abilities/keyword/ExertAbility.java | 10 ---- .../mage/abilities/keyword/MeleeAbility.java | 12 +--- Mage/src/main/java/mage/watchers/Watcher.java | 52 +++++++++++------- ...CardsCycledOrDiscardedThisTurnWatcher.java | 16 ------ .../watchers/common/CommanderInfoWatcher.java | 11 ---- .../watchers/common/DamagedByWatcher.java | 15 ----- .../watchers/common/FirstTimeStepWatcher.java | 10 ---- 160 files changed, 94 insertions(+), 1445 deletions(-) create mode 100644 Mage.Server.Plugins/Mage.Game.OathbreakerDuel/target/classes/mage/game/OathbreakerDuel.class create mode 100644 Mage.Server.Plugins/Mage.Game.OathbreakerDuel/target/classes/mage/game/OathbreakerDuelMatch.class create mode 100644 Mage.Server.Plugins/Mage.Game.OathbreakerDuel/target/classes/mage/game/OathbreakerDuelType.class create mode 100644 Mage.Server.Plugins/Mage.Game.OathbreakerFreeForAll/target/classes/mage/game/OathbreakerFreeForAll$1.class create mode 100644 Mage.Server.Plugins/Mage.Game.OathbreakerFreeForAll/target/classes/mage/game/OathbreakerFreeForAll.class create mode 100644 Mage.Server.Plugins/Mage.Game.OathbreakerFreeForAll/target/classes/mage/game/OathbreakerFreeForAllMatch.class create mode 100644 Mage.Server.Plugins/Mage.Game.OathbreakerFreeForAll/target/classes/mage/game/OathbreakerFreeForAllType.class diff --git a/Mage.Server.Plugins/Mage.Game.OathbreakerDuel/target/classes/mage/game/OathbreakerDuel.class b/Mage.Server.Plugins/Mage.Game.OathbreakerDuel/target/classes/mage/game/OathbreakerDuel.class new file mode 100644 index 0000000000000000000000000000000000000000..14929cf0617aef8a9108bc15053c51bb4f46ac8c GIT binary patch literal 1540 zcmbVMYflqV5IvV}--YrP2mPQ; zB=HCMql`1#g)X&5W14K|&dxb==FIN?`1$QSfOWh`Ac0&Q5#%{qiefnd4J%O;5|n(* z$tN7GMzJOkd1+XNyCHC%Dc5906?EHbxYBYPh25s<8g)}%DreJmrGBwjcMaPrcGta? zRz>Zdm8>(fsVrUj1r=FSg<8`zjf%9G%nOR8?2&->%05*B>9S#|*Uj3Aat`E)NtxlY ztxNMrItHKpq~=zQhQM^YvB$e7-Rg;>+X<^^VZmUg5IOn6(oabf?$s5iD8`GI!& zPGIp5JMA!dR?li%o$}jmPz_f_a`_fQ zoo)#)J4XEDUZ?SP)lH`erl}{5kGq)hxmKx$d&jPz9k&qvL~&bt#LG{4Ogu0T-_}eo z1ZI8w68-bNzVOE`SUM7vur1_uIf2#7^IfEe7w93J|l1^Q=I;oMimyA|~Z6ouO~9{ACJf(e%K HT+99f8k9H! literal 0 HcmV?d00001 diff --git a/Mage.Server.Plugins/Mage.Game.OathbreakerDuel/target/classes/mage/game/OathbreakerDuelMatch.class b/Mage.Server.Plugins/Mage.Game.OathbreakerDuel/target/classes/mage/game/OathbreakerDuelMatch.class new file mode 100644 index 0000000000000000000000000000000000000000..57f30413e5d558c516f5d50efed1c21e67b26ab6 GIT binary patch literal 1573 zcmaJ>=~5Fx5dJ0!YzWJJiQM230wIcs3J4-+AR!8fCI5zH2n(AHwV7D*RF+j%D7DH5 z@S!Ywb^}?0@MCAEd%o`e`k49i_vdc_Q`n231&`~{jA#U-h^b{Pf^oz(Oei6tmM0O^ z;;C9DBLsb>c2jEiTv<-n;{{%7c%@;6p?1!+O*zjn6iwxLRwS}KClWa>jpIaGt(h}v z=Iz4l=pI98DSs#!no_1Mwu-p};q3AQi!`mNyuqzK?wCq0D?{?wEHDiE{ARd3K5zs- z70z-|SZ;t>1}*OeVd(dP|3iYIt{}N1*N7xTFsev-nv{7&8kS@T=ZcnPX1UGK=l53D zCeq~%#SN)s8G3xMDux7#tb8$q$4`Tjck)HY5UZw2yt@kTW;AiaKXV+ZuLs?BWBJ z?N(ndp=-f>WliSJEQYR%v8wA;x(vOQ6Q5OiB4`e>LS9yL_xy~?F%lj1)$+0tS0z^< zs$etOtvW(n+R~6vE2(t@zIfH`@&eTRLegkOlXu3WSc>DKl-xM=XfwnvIT|$9lH0PN z_(}83;^)HgW63;B=G)xP`g5z;xhI*Uq9(ZPRiG)0=mt)SEvf^hO@gWIh$0Y z-&GKD=~x)2OZi-m+lO?kxGEt{c646>It{vPQmD4>sC$zZg@SwDPDM~tny@Ij#Ex`K zJFBWi4zB|{qBn8Mb67na-ZgCVzZ^>Cz7;iD+EHhlJ^P|GtwhQ!NQ%Sevu|jAVVRGGyAW`q2aB*5EiPj8JS|CyzL`V^hc@)Y- kgIGr&`iW)-rZIp)q8cZ82*c!QgzzCcdqCeq+6VCHA2|q^(EtDd literal 0 HcmV?d00001 diff --git a/Mage.Server.Plugins/Mage.Game.OathbreakerDuel/target/classes/mage/game/OathbreakerDuelType.class b/Mage.Server.Plugins/Mage.Game.OathbreakerDuel/target/classes/mage/game/OathbreakerDuelType.class new file mode 100644 index 0000000000000000000000000000000000000000..59b0495b1711c40f16aa86d891a8909acb5254e7 GIT binary patch literal 995 zcmah{U2hUm5IvXgUA6_Ot)&B8m2(%sqNX}kwCmsZ3-lw`5h&YtJ|J>HFR4lXvmgBnL^!fOQ$IVo8u^% z2z&NGV6*PZuClt)Ro00Nd#ympGZj1^DyK2(t3!dU$`usut+_I6_qc+5wEg}_pj@e5 zQ7Ewf7iXej9sgFM-ukIO4BG02&10?ZBgj^5)r}UiB#)zBAF%k?( zGd@O&A>K&84UCzu=r5bLWuyC73>np=gIQ z>4=u6l9u{Bo{Xg6heEcb5Uo&}zW?xmA9Lzq1&$v^UNG*8coMoARyC~YFtDzph)X)| zp{k>XIu%kW4W9?&MlZBy&ZOlD-?gL+rH=cGwt*_ciu&!wm`_FH+|I@$2E82wGzXtY zk%$;dXO;V-1L4FB%NJB(s3eTj@ixvGZ|<1;Gu2?dR^RJf#D7lnH+#DbtN%mQLg{(| z_mfAXS1dRC-LBbtZ4LJObj;z~R|Cu3v<5U}yZxqT4&M!|eS6F5bV?OkqyjA#E0xud zl}8aBb7U_Q`h+xjz_TAHpl8?x-Wb3fJ!7(``$3~KsSVWc_DRwGR2&2_VnrJmE zc4y zdMx8ZjZiXr5~~J&H;La%;==}>O7YM~Wc8ydG~oB^@iBbVz{gYAhR5XECk#AYk1Ozu zfji4B#|A!~!j<@pfzPI}2cI+W`4slzPYnF2fj>*)&r{fkzeu4S ze`(+g2L39AZakL67v=X$a^TnDGGll=ce;arnR);Q8wTkqTc@) z_@;sXRWOHL*Uk@StwO;rD5Tut;;F24&dzh9h84Cg>Dh!c=UQGdZ%-`Q*(~=qjofM7 zWu=RrlTDwrmiiRx!ZQj3Yj=-Crl(I2AMcCICv2~3`)J=$5^VHYk6GUQbl$cWv`j67 zV<%7cj~*Wyzhkuje2nGJ(Ex8PZ>cgD&V zZH3(x6efmm9__#F^!U&n6Q_noMigp~IIiOzRk*WbWYLtoh3^*V+RN3tVKJ$Sj=XfIm;DddeArAc}5{Vn46(=n?@Yh z9xX0T+xgq9=`2?oM{*e}d&bH;G7lEx-n>IE?C}|Ex)D3wl(+4ha{2yjmin7kL{f#z z)=43e7d1jIWiwQ%r;seErLZd^RB5%WECYq!$a^EsEJ?Qo;=G6k+BmYWuyxM%26Kyx zmODf9oLjO-^>TYjCo4ZwNDuPa*STIK)MZL{6*dPhD_>!xOo&Sv&DzKYzD14_3L(qe zEiW@~=M|1sbDZk*DW3Ju6c{y&i#azPUS=@l0s{2PRualAgqz1Li8Q9%R3*=$*;zZ| z(bxUeJbjLSJQmWYbfyNOW=%U;$8+pLx?hjZ^@$y60e6PWIaguOzg<2U?v+H3MAVo& zz%a_%vyPpe87vW@9)^GaoWd2A^h%7GQND;olXWFlXb@v*uLhU6uZFq(pE3Z=U4C6!g;#qwc4$$ zb}}Y|4BZogNuOOiQySt^^fT^MZ&otGI*I{Cy13iV9Bo0)HtcTDn* zAl`N6E=tg|4)7`4w95vbCXD$p$>^===wvn7P*}Sf@9?oNlUrg0?Oj7N5`Am%tRV^l zh2a?zKM`o-`?4Yv%CHscFA$;S3}8Z6G2fpthpMK+a3t~CLQwKHhpVOg3Rn37{bD?* zd)_Xv?J)3v2A(tUZI)<-ssAULs{%%s&NY@4uhAuD)>@pNvD#ewY}?BydNlGXQ$>s+ zzOPxZ>6pY_e(8)-xSD2~$QAP$`zA-qRLi>lIw)O&i66iu)3@9)oUjV>Ojg(m-7l<-dZ|od-J)O!lqiK8dPkPp=uiNh^gW#VW?VD87j%O zIzy#QRj*8iD|O-4vAM2XEVLoIvXYU9E@*8_SU?Xke;C>KfvesSe{lCRACc;cV8P zv$A4jd+6?rty^GfecD}cb7$Sw5GGqaGHn&LUT)$6JSf^+tFWUisvuJs(!+FJ$-pnH zh(K3ESs1^~SJ+aGz*~!1r38^PrLI%gE9?(2R>#8F^quVFf@&RI;c;wGH?Y)L88Ii{pQ7|5F%v0- z(b6?rbTg8z=>dnKSST*qc`3nV&4{&Z)n;?~AuBUq0sZS;_9f~iO8N#2yJXtSDGdAX zQ)Bsw9N|BIPTPx(Yl4+onx#fopE7StDB@UmOpOKT7213xITLC zg-z&_idvPu9Ubpkj>{sxZ5=9|6gg>S3%L{QJlWsKaKxF;TcS}%a6z{QT7{{psR)xm z0}*(;wow_1Lfoli&s72zR@;hWB^2^c=xV#AimA|F6ATh;FWK-#>{=@1*H!VSaRLly z%=n`!!oq%y=^|>^T1!i|7_KL3+tPt5Qw12vxNP(rxFupVUufkOjt<&dikS#(@@&$} z`4kmy_#QNf5)mB?dcw!%!&Ou?g3Bgf8Y^5Bc#?8#EZE+7F>9Z33L-RL2s(7IrbsyS z_l_#sB?2Nt%~Fx!T*C`&4@%lbI?tpN!q4_K+a*|{7{OYCX!B1-VK#`#NJy@^sNV#>uT7t2lvOq1sO5s)K`Wb`ptt)B zHK5R5Wsvps;diSSKZia1w)aYY@J#TND7$BlV$xaj!{@DfJkB|r?8v+Yx8XGBXY~Fi ze%8D_GT(?z++*j?=M+!8m6Q|wZSU$n(6cSR4Ar%Y*yJ*5oRjFgBm@usa9MIH5&+Z zA9v)`Kv(xNjItDK1nT}El20JXpLo}k6a*_s#lUHT)B0dqmUuS|QtY5?JNZ?37j~eN zA9cHMh@VmWaX?GH-RBxgK7cvupt#C+fk3u#JqI>-uYj*44AT1!2K*w7>I4`H?YX5iyWWgka0>VcG=CuwOGs8wSwI-@WhqDiDk6vrET$t@y=E3ne6fzg!dEcGF--0 zy$O=pJK3D@k1nH46Iw<4z!)9GUHqPY zKZfwjT)lu{e3i-fHGX)1mdPiveS)^TpONdKNIzY`jl6M|4yQds`(Fy}e+hTvoQ|nW z_#vLFA-_-Khv}2J4gdzqb9h$bi`_n-;{T_3N)j^NeL$5w(i?A%KZEUopL*ln2b$w6 zxVDBG#(P$99aR<8;yN^1v^b}T8@Hm7;k1MJ&`tz6NJJ>7XF3!&jW=lgkcfRF?$P3= z@uM8okj7Q`F}#VC-%R>`ddPW60)Ow`K$WDZ(r(}_0WQ6jC-@%Y2OS>bDGBO6qRcX` zr;~N+v~-n&u;lm~&Z9||gHQ>V%f9omXNqdRnqc-C+Vr*jx0C5eF7$=U_2DOUx{0rS zUr6G`5!<(gqWvV^9te1dYD>~4SJBJ3>Z{DOSxw#a&ji#JehT*m_tX59`w2>(e4K-5 znl3~xC&J73eT=0Cbf;;!JB;N{z8^a@3!>F+f@fPn)SFnI7$as&$%1>m2A$`1bR=ijlOX2TEh z^B8T8%Y?x6Fa{#)*ET1@^{&YJ?o}Koe)vc+L~tOln>0Y&{M7m9mwLoDe$pIeB!Rh_ zWS*ML(EZHF0p_I5V1FA^;Q=PZJD3RXV`ueeSl|w2Oq=} J!Dt0fd>2#N8DIba literal 0 HcmV?d00001 diff --git a/Mage.Server.Plugins/Mage.Game.OathbreakerFreeForAll/target/classes/mage/game/OathbreakerFreeForAllMatch.class b/Mage.Server.Plugins/Mage.Game.OathbreakerFreeForAll/target/classes/mage/game/OathbreakerFreeForAllMatch.class new file mode 100644 index 0000000000000000000000000000000000000000..a3dbe6e9b70eaa461ea5e1516e7df3289e456724 GIT binary patch literal 1603 zcmah}ZBx@g5Pq&Lq?CxfBjOvNSgN&(hzf`z@=|H30^;bmBOE1=rc8Qukv4FLg$yru z6KKUfUM3O*z0bQz-aTN?sdhZXBLj~OObfKm+ODnV1csBjk}RrBQI=GuB(=4d$@5w` z)OOje%#3dd#1_gsO5l9XcGX(7w5_~Nx$TgqJ6E=(vn4&7<+?Ja_w0(mSSW5m>b-4G z$phsrc}gvny?Mv+)657M9%G1G6TcV9vx-JTowF;yD&5K%)UoLz#GiMH5R{=1?mpvUq7?6*&`mteGg_m5J9_ zH?U!16K@2r|0kkPPGGPB3za)tI&=gE8aA%?X#oT-H7p^o`n=GT6qP=y^5)SY6=*a$ z9;)$4gHBt)AgXC6`SEa^_|gbbi>ald@-+1oXb+_nxR%VGnU8WY$9b)#br8@NNS$!B zXy~r|C%@!9t4m#hK$SMZ=v4cuSB z&Z^{0maoJ>Md^h-WgRS(OC{;jmeIr~-!q`!qN}JCw{?T>Q(jdnzP*=u|RohM`XIC_3>F_h3 zYN-2iXGh?VRE6z*W$Bsm_ZX%Zt&849AOd=a&_io4NpmDe=--;Ubqw*@xA)PS@U`dA zf)4bP+#jGYfD0rMp6@5c5E#NGvT>|Wq>a&kwX=6N^#zd{qQNg#LreZUTHght5&Yt} zhmO&C&AOMu2*!Q`JF27y literal 0 HcmV?d00001 diff --git a/Mage.Server.Plugins/Mage.Game.OathbreakerFreeForAll/target/classes/mage/game/OathbreakerFreeForAllType.class b/Mage.Server.Plugins/Mage.Game.OathbreakerFreeForAll/target/classes/mage/game/OathbreakerFreeForAllType.class new file mode 100644 index 0000000000000000000000000000000000000000..dd02f0e8f209c5407a653806626f07929ef30125 GIT binary patch literal 1023 zcma))ZEq4m6ot?5zRMPnS}d(?seOa3cGXtD)HER`BqnH$B_#T7fC;Q+cgeD-{a5+{ zn`q(>@JAW%UC<(l2_ZSm+&%NmxijhkwLr1>nKy( z8(aw-lq(A@7ufj68Ir7*e|VHbzwkzWTh(lCZ1cZ~kKW4<(m)nDfz=sTi5n|XXC-RQ zz#;A%cz`1V7Ry7HM|f=DnB{~eizfm*3mg(#3kFtE6e!;K=USj6ap|o2QaGa3mu}a( z2z=Y^a(9mW^tvyvluuV9UU0#7{}xj2$Z06)(6{VpsH#CA+n48q!1i2nzY|DN^$h_D zzdW=%s^v+)LuBgJ`=~l}V6(S4m+Z9C#5TRH3_VXE2HFHU(pxkO5TOxZn%59!J~Bqs z%;{sq%)}URGdf1XjE#|GN%2(sLhcCir2EiF(?m3&V~Lm|$s}wd{IEU~Mw_5=RRXL{0T%r;AZ~ue()?m=W^sI)Lts7J;_h#r(#?1P literal 0 HcmV?d00001 diff --git a/Mage.Sets/src/mage/cards/a/AbandonedSarcophagus.java b/Mage.Sets/src/mage/cards/a/AbandonedSarcophagus.java index e66954c891..17c45bb926 100644 --- a/Mage.Sets/src/mage/cards/a/AbandonedSarcophagus.java +++ b/Mage.Sets/src/mage/cards/a/AbandonedSarcophagus.java @@ -138,13 +138,6 @@ class AbandonedSarcophagusWatcher extends Watcher { super(WatcherScope.GAME); } - private AbandonedSarcophagusWatcher(final AbandonedSarcophagusWatcher watcher) { - super(watcher); - for (Entry entry : watcher.cycledCardsThisTurn.entrySet()) { - cycledCardsThisTurn.put(entry.getKey(), entry.getValue().copy()); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.CYCLE_CARD @@ -170,9 +163,4 @@ class AbandonedSarcophagusWatcher extends Watcher { super.reset(); cycledCardsThisTurn.clear(); } - - @Override - public AbandonedSarcophagusWatcher copy() { - return new AbandonedSarcophagusWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java b/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java index 8f3a011dcf..9c1bc82650 100644 --- a/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java +++ b/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java @@ -74,27 +74,13 @@ class DamagedByPiratesWatcher extends Watcher { super(WatcherScope.GAME); } - private DamagedByPiratesWatcher(final DamagedByPiratesWatcher watcher) { - super(watcher); - for (UUID playerId : watcher.damageSourceIds.keySet()) { - Set creatures = new HashSet<>(); - creatures.addAll(watcher.damageSourceIds.get(playerId)); - this.damageSourceIds.put(playerId, creatures); - } - } - - @Override - public DamagedByPiratesWatcher copy() { - return new DamagedByPiratesWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { if (((DamagedPlayerEvent) event).isCombatDamage()) { Permanent creature = game.getPermanentOrLKIBattlefield(event.getSourceId()); if (creature != null && creature.hasSubtype(SubType.PIRATE, game)) { - if (damageSourceIds.keySet().contains(event.getTargetId())) { + if (damageSourceIds.containsKey(event.getTargetId())) { damageSourceIds.get(event.getTargetId()).add(creature.getId()); } else { Set creatureSet = new HashSet<>(); diff --git a/Mage.Sets/src/mage/cards/a/Aggravate.java b/Mage.Sets/src/mage/cards/a/Aggravate.java index 21d9585854..03dc189b34 100644 --- a/Mage.Sets/src/mage/cards/a/Aggravate.java +++ b/Mage.Sets/src/mage/cards/a/Aggravate.java @@ -30,7 +30,7 @@ public final class Aggravate extends CardImpl { this.getSpellAbility().addTarget(new TargetPlayer()); // Each creature dealt damage this way attacks this turn if able. this.getSpellAbility().addEffect(new AggravateRequirementEffect()); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public Aggravate(final Aggravate card) { diff --git a/Mage.Sets/src/mage/cards/a/AngerOfTheGods.java b/Mage.Sets/src/mage/cards/a/AngerOfTheGods.java index b728ff4450..e0b651856d 100644 --- a/Mage.Sets/src/mage/cards/a/AngerOfTheGods.java +++ b/Mage.Sets/src/mage/cards/a/AngerOfTheGods.java @@ -26,7 +26,7 @@ public final class AngerOfTheGods extends CardImpl { //If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public AngerOfTheGods(final AngerOfTheGods card) { diff --git a/Mage.Sets/src/mage/cards/a/AnnihilatingFire.java b/Mage.Sets/src/mage/cards/a/AnnihilatingFire.java index a504f93055..111d248ebe 100644 --- a/Mage.Sets/src/mage/cards/a/AnnihilatingFire.java +++ b/Mage.Sets/src/mage/cards/a/AnnihilatingFire.java @@ -54,7 +54,7 @@ public final class AnnihilatingFire extends CardImpl { // If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public AnnihilatingFire(final AnnihilatingFire card) { diff --git a/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java b/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java index 76cf887d40..ea4a3c9548 100644 --- a/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java +++ b/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java @@ -99,11 +99,6 @@ class ApproachOfTheSecondSunWatcher extends Watcher { super(WatcherScope.GAME); } - public ApproachOfTheSecondSunWatcher(final ApproachOfTheSecondSunWatcher watcher) { - super(watcher); - approachesCast = new HashMap<>(watcher.approachesCast); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { @@ -118,8 +113,4 @@ class ApproachOfTheSecondSunWatcher extends Watcher { return approachesCast.getOrDefault(player, 0); } - @Override - public ApproachOfTheSecondSunWatcher copy() { - return new ApproachOfTheSecondSunWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/a/ArchiveTrap.java b/Mage.Sets/src/mage/cards/a/ArchiveTrap.java index ead89d87a5..0f9f757cc4 100644 --- a/Mage.Sets/src/mage/cards/a/ArchiveTrap.java +++ b/Mage.Sets/src/mage/cards/a/ArchiveTrap.java @@ -57,16 +57,6 @@ class ArchiveTrapWatcher extends Watcher { super(WatcherScope.GAME); } - private ArchiveTrapWatcher(final ArchiveTrapWatcher watcher) { - super(watcher); - this.playerIds.addAll(watcher.playerIds); - } - - @Override - public ArchiveTrapWatcher copy() { - return new ArchiveTrapWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.LIBRARY_SEARCHED diff --git a/Mage.Sets/src/mage/cards/a/ArclightPhoenix.java b/Mage.Sets/src/mage/cards/a/ArclightPhoenix.java index 5cb55edbc2..ee0bfe50ec 100644 --- a/Mage.Sets/src/mage/cards/a/ArclightPhoenix.java +++ b/Mage.Sets/src/mage/cards/a/ArclightPhoenix.java @@ -87,16 +87,6 @@ class ArclightPhoenixWatcher extends Watcher { super(WatcherScope.GAME); } - public ArclightPhoenixWatcher(final ArclightPhoenixWatcher watcher) { - super(watcher); - this.instantSorceryCount.putAll(watcher.instantSorceryCount); - } - - @Override - public ArclightPhoenixWatcher copy() { - return new ArclightPhoenixWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { diff --git a/Mage.Sets/src/mage/cards/a/AsmiraHolyAvenger.java b/Mage.Sets/src/mage/cards/a/AsmiraHolyAvenger.java index ee45b419a1..8785e05066 100644 --- a/Mage.Sets/src/mage/cards/a/AsmiraHolyAvenger.java +++ b/Mage.Sets/src/mage/cards/a/AsmiraHolyAvenger.java @@ -60,16 +60,6 @@ class AsmiraHolyAvengerWatcher extends Watcher { condition = true; } - public AsmiraHolyAvengerWatcher(final AsmiraHolyAvengerWatcher watcher) { - super(watcher); - this.creaturesCount = watcher.creaturesCount; - } - - @Override - public AsmiraHolyAvengerWatcher copy() { - return new AsmiraHolyAvengerWatcher(this); - } - public int getCreaturesCount() { return creaturesCount; } diff --git a/Mage.Sets/src/mage/cards/a/AureliasFury.java b/Mage.Sets/src/mage/cards/a/AureliasFury.java index 634de83e29..170392da35 100644 --- a/Mage.Sets/src/mage/cards/a/AureliasFury.java +++ b/Mage.Sets/src/mage/cards/a/AureliasFury.java @@ -175,17 +175,6 @@ class AureliasFuryDamagedByWatcher extends Watcher { super(WatcherScope.CARD); } - private AureliasFuryDamagedByWatcher(final AureliasFuryDamagedByWatcher watcher) { - super(watcher); - this.damagedCreatures.addAll(watcher.damagedCreatures); - this.damagedPlayers.addAll(watcher.damagedPlayers); - } - - @Override - public AureliasFuryDamagedByWatcher copy() { - return new AureliasFuryDamagedByWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DAMAGED_CREATURE) { diff --git a/Mage.Sets/src/mage/cards/b/Berserk.java b/Mage.Sets/src/mage/cards/b/Berserk.java index 4a5cbc6440..cd620758c5 100644 --- a/Mage.Sets/src/mage/cards/b/Berserk.java +++ b/Mage.Sets/src/mage/cards/b/Berserk.java @@ -99,10 +99,6 @@ class CombatDamageStepStartedWatcher extends Watcher { super(WatcherScope.GAME); } - public CombatDamageStepStartedWatcher(final CombatDamageStepStartedWatcher watcher) { - super(watcher); - } - @Override public void watch(GameEvent event, Game game) { // if no damage happens, the first event after is END_COMBAT_STEP_PRE @@ -111,10 +107,6 @@ class CombatDamageStepStartedWatcher extends Watcher { } } - @Override - public CombatDamageStepStartedWatcher copy() { - return new CombatDamageStepStartedWatcher(this); - } } class BerserkDestroyEffect extends OneShotEffect { diff --git a/Mage.Sets/src/mage/cards/b/BlazingEffigy.java b/Mage.Sets/src/mage/cards/b/BlazingEffigy.java index b61c69b42c..ddf098cd72 100644 --- a/Mage.Sets/src/mage/cards/b/BlazingEffigy.java +++ b/Mage.Sets/src/mage/cards/b/BlazingEffigy.java @@ -87,16 +87,6 @@ class BlazingEffigyWatcher extends Watcher { super(WatcherScope.GAME); } - public BlazingEffigyWatcher(final BlazingEffigyWatcher watcher) { - super(watcher); - this.damagedObjects.putAll(watcher.damagedObjects); - } - - @Override - public BlazingEffigyWatcher copy() { - return new BlazingEffigyWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE) { diff --git a/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java b/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java index 5a8195beb8..86f68cfe0b 100644 --- a/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java +++ b/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java @@ -59,28 +59,17 @@ public final class BoseijuWhoSheltersAll extends CardImpl { class BoseijuWhoSheltersAllWatcher extends Watcher { private List spells = new ArrayList<>(); - private final String originalId; + private final UUID originalId; public BoseijuWhoSheltersAllWatcher(UUID originalId) { super(WatcherScope.CARD); - this.originalId = originalId.toString(); - } - - public BoseijuWhoSheltersAllWatcher(final BoseijuWhoSheltersAllWatcher watcher) { - super(watcher); - this.spells.addAll(watcher.spells); - this.originalId = watcher.originalId; - } - - @Override - public BoseijuWhoSheltersAllWatcher copy() { - return new BoseijuWhoSheltersAllWatcher(this); + this.originalId = originalId; } @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.MANA_PAID) { - if (event.getData() != null && event.getData().equals(originalId)) { + if (event.getData() != null && event.getData().equals(originalId.toString())) { Card spell = game.getSpell(event.getTargetId()); if (spell != null && (spell.isInstant() || spell.isSorcery())) { spells.add(event.getTargetId()); diff --git a/Mage.Sets/src/mage/cards/b/BurningCinderFuryOfCrimsonChaosFire.java b/Mage.Sets/src/mage/cards/b/BurningCinderFuryOfCrimsonChaosFire.java index 6cda9d99ce..eb514f24dd 100644 --- a/Mage.Sets/src/mage/cards/b/BurningCinderFuryOfCrimsonChaosFire.java +++ b/Mage.Sets/src/mage/cards/b/BurningCinderFuryOfCrimsonChaosFire.java @@ -204,10 +204,6 @@ class BurningCinderFuryOfCrimsonChaosFireWatcher extends Watcher { super(WatcherScope.GAME); } - public BurningCinderFuryOfCrimsonChaosFireWatcher(final BurningCinderFuryOfCrimsonChaosFireWatcher watcher) { - super(watcher); - this.tappedActivePlayerIds.addAll(watcher.tappedActivePlayerIds); - } @Override public void watch(GameEvent event, Game game) { @@ -227,9 +223,4 @@ class BurningCinderFuryOfCrimsonChaosFireWatcher extends Watcher { public void reset() { tappedActivePlayerIds.clear(); } - - @Override - public BurningCinderFuryOfCrimsonChaosFireWatcher copy() { - return new BurningCinderFuryOfCrimsonChaosFireWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java b/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java index fc0c0aee3f..97a4917a43 100644 --- a/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java +++ b/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java @@ -64,16 +64,6 @@ class CallerOfTheClawWatcher extends Watcher { condition = true; } - public CallerOfTheClawWatcher(final CallerOfTheClawWatcher watcher) { - super(watcher); - this.creaturesCount = watcher.creaturesCount; - } - - @Override - public CallerOfTheClawWatcher copy() { - return new CallerOfTheClawWatcher(this); - } - public int getCreaturesCount() { return creaturesCount; } diff --git a/Mage.Sets/src/mage/cards/c/Carbonize.java b/Mage.Sets/src/mage/cards/c/Carbonize.java index 94dd6beab0..d53273d054 100644 --- a/Mage.Sets/src/mage/cards/c/Carbonize.java +++ b/Mage.Sets/src/mage/cards/c/Carbonize.java @@ -26,7 +26,7 @@ public final class Carbonize extends CardImpl { this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "That creature")); this.getSpellAbility().addEffect(new ExileTargetIfDiesEffect().setText("If the creature would die this turn, exile it instead")); this.getSpellAbility().addTarget(new TargetAnyTarget()); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } diff --git a/Mage.Sets/src/mage/cards/c/CathedralMembrane.java b/Mage.Sets/src/mage/cards/c/CathedralMembrane.java index 80ce89d1f8..e6fc406db1 100644 --- a/Mage.Sets/src/mage/cards/c/CathedralMembrane.java +++ b/Mage.Sets/src/mage/cards/c/CathedralMembrane.java @@ -114,16 +114,6 @@ class CathedralMembraneWatcher extends Watcher { super(WatcherScope.CARD); } - private CathedralMembraneWatcher(final CathedralMembraneWatcher watcher) { - super(watcher); - this.blockedCreatures.addAll(watcher.blockedCreatures); - } - - @Override - public CathedralMembraneWatcher copy() { - return new CathedralMembraneWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED && event.getSourceId().equals(sourceId)) { diff --git a/Mage.Sets/src/mage/cards/c/CavernOfSouls.java b/Mage.Sets/src/mage/cards/c/CavernOfSouls.java index 0cb6fdf728..1700ea17be 100644 --- a/Mage.Sets/src/mage/cards/c/CavernOfSouls.java +++ b/Mage.Sets/src/mage/cards/c/CavernOfSouls.java @@ -122,28 +122,17 @@ class CavernOfSoulsManaCondition extends CreatureCastManaCondition { class CavernOfSoulsWatcher extends Watcher { private List spells = new ArrayList<>(); - private final String originalId; + private final UUID originalId; public CavernOfSoulsWatcher(UUID originalId) { super(WatcherScope.CARD); - this.originalId = originalId.toString(); - } - - public CavernOfSoulsWatcher(final CavernOfSoulsWatcher watcher) { - super(watcher); - this.spells.addAll(watcher.spells); - this.originalId = watcher.originalId; - } - - @Override - public CavernOfSoulsWatcher copy() { - return new CavernOfSoulsWatcher(this); + this.originalId = originalId; } @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.MANA_PAID) { - if (event.getData() != null && event.getData().equals(originalId)) { + if (event.getData() != null && event.getData().equals(originalId.toString())) { spells.add(event.getTargetId()); } } diff --git a/Mage.Sets/src/mage/cards/c/CerebralVortex.java b/Mage.Sets/src/mage/cards/c/CerebralVortex.java index 1329470ef8..573ef7aa01 100644 --- a/Mage.Sets/src/mage/cards/c/CerebralVortex.java +++ b/Mage.Sets/src/mage/cards/c/CerebralVortex.java @@ -84,13 +84,6 @@ class CerebralVortexWatcher extends Watcher { super(WatcherScope.GAME); } - CerebralVortexWatcher(final CerebralVortexWatcher watcher) { - super(watcher); - for (Entry entry: watcher.draws.entrySet()) { - draws.put(entry.getKey(), entry.getValue()); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DREW_CARD) { @@ -111,9 +104,4 @@ class CerebralVortexWatcher extends Watcher { public int getDraws(UUID playerId) { return draws.getOrDefault(playerId, 0); } - - @Override - public CerebralVortexWatcher copy() { - return new CerebralVortexWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/c/CobraTrap.java b/Mage.Sets/src/mage/cards/c/CobraTrap.java index 69b1011f58..2ecb0f346b 100644 --- a/Mage.Sets/src/mage/cards/c/CobraTrap.java +++ b/Mage.Sets/src/mage/cards/c/CobraTrap.java @@ -74,15 +74,6 @@ class CobraTrapWatcher extends Watcher { super(WatcherScope.GAME); } - public CobraTrapWatcher(final CobraTrapWatcher watcher) { - super(watcher); - } - - @Override - public CobraTrapWatcher copy() { - return new CobraTrapWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DESTROYED_PERMANENT) { diff --git a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java index b5f0b3842a..3e857fc82d 100644 --- a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java +++ b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java @@ -78,12 +78,6 @@ class ConduitOfRuinWatcher extends Watcher { playerCreatureSpells = new HashMap<>(); } - public ConduitOfRuinWatcher(final ConduitOfRuinWatcher watcher) { - super(watcher); - this.playerCreatureSpells = new HashMap<>(); - playerCreatureSpells.putAll(watcher.playerCreatureSpells); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { @@ -98,11 +92,6 @@ class ConduitOfRuinWatcher extends Watcher { return playerCreatureSpells.getOrDefault(playerId, 0); } - @Override - public ConduitOfRuinWatcher copy() { - return new ConduitOfRuinWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/c/CorrosiveOoze.java b/Mage.Sets/src/mage/cards/c/CorrosiveOoze.java index c1965a1d60..d6845d3243 100644 --- a/Mage.Sets/src/mage/cards/c/CorrosiveOoze.java +++ b/Mage.Sets/src/mage/cards/c/CorrosiveOoze.java @@ -125,18 +125,6 @@ class CorrosiveOozeCombatWatcher extends Watcher { super(WatcherScope.GAME); } - public CorrosiveOozeCombatWatcher(final CorrosiveOozeCombatWatcher watcher) { - super(watcher); - for (Map.Entry> entry : watcher.oozeBlocksOrBlocked.entrySet()) { - Set newSet = new HashSet<>(entry.getValue()); - oozeBlocksOrBlocked.put(entry.getKey(), newSet); - } - for (Map.Entry> entry : watcher.oozeEquipmentsToDestroy.entrySet()) { - Set newSet = new HashSet<>(entry.getValue()); - oozeEquipmentsToDestroy.put(entry.getKey(), newSet); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BEGIN_COMBAT_STEP_PRE) { @@ -208,10 +196,4 @@ class CorrosiveOozeCombatWatcher extends Watcher { oozeEquipmentsToDestroy.remove(ooze); // remove here to get no overlap with creatures leaving meanwhile return equipmentsToDestroy; } - - @Override - public CorrosiveOozeCombatWatcher copy() { - return new CorrosiveOozeCombatWatcher(this); - } - } diff --git a/Mage.Sets/src/mage/cards/c/CustodiSoulcaller.java b/Mage.Sets/src/mage/cards/c/CustodiSoulcaller.java index b8950d773c..be2e69ad38 100644 --- a/Mage.Sets/src/mage/cards/c/CustodiSoulcaller.java +++ b/Mage.Sets/src/mage/cards/c/CustodiSoulcaller.java @@ -86,11 +86,6 @@ class CustodiSoulcallerWatcher extends Watcher { super(WatcherScope.GAME); } - CustodiSoulcallerWatcher(final CustodiSoulcallerWatcher watcher) { - super(watcher); - this.playersAttacked.putAll(watcher.playersAttacked); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.BEGIN_COMBAT_STEP_PRE) { @@ -105,9 +100,4 @@ class CustodiSoulcallerWatcher extends Watcher { public int getNumberOfAttackedPlayers(UUID attackerId) { return this.playersAttacked.get(attackerId).size(); } - - @Override - public CustodiSoulcallerWatcher copy() { - return new CustodiSoulcallerWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/c/CyclopeanTomb.java b/Mage.Sets/src/mage/cards/c/CyclopeanTomb.java index d572a307b3..66d2a6f2ca 100644 --- a/Mage.Sets/src/mage/cards/c/CyclopeanTomb.java +++ b/Mage.Sets/src/mage/cards/c/CyclopeanTomb.java @@ -193,20 +193,6 @@ class CyclopeanTombCounterWatcher extends Watcher { super(WatcherScope.GAME); } - private CyclopeanTombCounterWatcher(final CyclopeanTombCounterWatcher watcher) { - super(watcher); - for (MageObjectReference mageObjectReference : watcher.counterData.keySet()) { - Set miredLands = new HashSet<>(); - miredLands.addAll(watcher.counterData.get(mageObjectReference)); - counterData.put(mageObjectReference, miredLands); - } - } - - @Override - public CyclopeanTombCounterWatcher copy() { - return new CyclopeanTombCounterWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.COUNTERS_ADDED && event.getData().equals(CounterType.MIRE.getName()) && event.getAmount() > 0) { diff --git a/Mage.Sets/src/mage/cards/d/DarkbladeAgent.java b/Mage.Sets/src/mage/cards/d/DarkbladeAgent.java index 8af32ccef8..169b2cee2f 100644 --- a/Mage.Sets/src/mage/cards/d/DarkbladeAgent.java +++ b/Mage.Sets/src/mage/cards/d/DarkbladeAgent.java @@ -88,16 +88,6 @@ class DarkbladeAgentWatcher extends Watcher { super(WatcherScope.GAME); } - public DarkbladeAgentWatcher(final DarkbladeAgentWatcher watcher) { - super(watcher); - this.surveiledThisTurn.addAll(watcher.surveiledThisTurn); - } - - @Override - public DarkbladeAgentWatcher copy() { - return new DarkbladeAgentWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SURVEILED) { diff --git a/Mage.Sets/src/mage/cards/d/Demonfire.java b/Mage.Sets/src/mage/cards/d/Demonfire.java index b8dfbc7148..3ed35ff32f 100644 --- a/Mage.Sets/src/mage/cards/d/Demonfire.java +++ b/Mage.Sets/src/mage/cards/d/Demonfire.java @@ -37,7 +37,7 @@ public final class Demonfire extends CardImpl { // If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); // Hellbent - If you have no cards in hand, Demonfire can't be countered and the damage can't be prevented. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( diff --git a/Mage.Sets/src/mage/cards/d/Desolation.java b/Mage.Sets/src/mage/cards/d/Desolation.java index 27824d61c0..532dd4f9c3 100644 --- a/Mage.Sets/src/mage/cards/d/Desolation.java +++ b/Mage.Sets/src/mage/cards/d/Desolation.java @@ -109,10 +109,6 @@ class DesolationWatcher extends Watcher { super( WatcherScope.GAME); } - public DesolationWatcher(final DesolationWatcher watcher) { - super(watcher); - this.tappedForManaThisTurnPlayers.addAll(watcher.tappedForManaThisTurnPlayers); - } @Override public void watch(GameEvent event, Game game) { @@ -131,10 +127,7 @@ class DesolationWatcher extends Watcher { } public Set getPlayersTappedForMana() { - if (tappedForManaThisTurnPlayers != null) { - return tappedForManaThisTurnPlayers; - } - return new HashSet<>(); + return tappedForManaThisTurnPlayers; } @Override @@ -143,8 +136,4 @@ class DesolationWatcher extends Watcher { tappedForManaThisTurnPlayers.clear(); } - @Override - public DesolationWatcher copy() { - return new DesolationWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/d/DiseasedVermin.java b/Mage.Sets/src/mage/cards/d/DiseasedVermin.java index e4c8c5108a..8cb88d9f1b 100644 --- a/Mage.Sets/src/mage/cards/d/DiseasedVermin.java +++ b/Mage.Sets/src/mage/cards/d/DiseasedVermin.java @@ -141,17 +141,6 @@ class DiseasedVerminWatcher extends Watcher { damagedPlayers = new HashSet<>(); } - public DiseasedVerminWatcher(final DiseasedVerminWatcher watcher) { - super(watcher); - this.damagedPlayers = new HashSet<>(); - this.damagedPlayers.addAll(watcher.damagedPlayers); - } - - @Override - public DiseasedVerminWatcher copy() { - return new DiseasedVerminWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DAMAGED_PLAYER diff --git a/Mage.Sets/src/mage/cards/d/DreamSalvage.java b/Mage.Sets/src/mage/cards/d/DreamSalvage.java index df6fe89ffc..a62f2ea0c5 100644 --- a/Mage.Sets/src/mage/cards/d/DreamSalvage.java +++ b/Mage.Sets/src/mage/cards/d/DreamSalvage.java @@ -52,13 +52,6 @@ class CardsDiscardedThisTurnWatcher extends Watcher { super(WatcherScope.GAME); } - public CardsDiscardedThisTurnWatcher(final CardsDiscardedThisTurnWatcher watcher) { - super(watcher); - for (Entry entry : watcher.amountOfCardsDiscardedThisTurn.entrySet()) { - amountOfCardsDiscardedThisTurn.put(entry.getKey(), entry.getValue()); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DISCARDED_CARD) { @@ -77,11 +70,6 @@ class CardsDiscardedThisTurnWatcher extends Watcher { public void reset() { amountOfCardsDiscardedThisTurn.clear(); } - - @Override - public CardsDiscardedThisTurnWatcher copy() { - return new CardsDiscardedThisTurnWatcher(this); - } } class DreamSalvageEffect extends OneShotEffect { diff --git a/Mage.Sets/src/mage/cards/d/DungeonGeists.java b/Mage.Sets/src/mage/cards/d/DungeonGeists.java index fe37bde78b..ff105f4b1e 100644 --- a/Mage.Sets/src/mage/cards/d/DungeonGeists.java +++ b/Mage.Sets/src/mage/cards/d/DungeonGeists.java @@ -134,10 +134,6 @@ class DungeonGeistsWatcher extends Watcher { super(WatcherScope.CARD); } - DungeonGeistsWatcher(DungeonGeistsWatcher watcher) { - super(watcher); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.LOST_CONTROL && event.getPlayerId().equals(controllerId) && event.getTargetId().equals(sourceId)) { @@ -158,9 +154,4 @@ class DungeonGeistsWatcher extends Watcher { public void reset() { //don't reset condition each turn - only when this leaves the battlefield } - - @Override - public DungeonGeistsWatcher copy() { - return new DungeonGeistsWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/e/ErdwalIlluminator.java b/Mage.Sets/src/mage/cards/e/ErdwalIlluminator.java index 048335a056..bca010845b 100644 --- a/Mage.Sets/src/mage/cards/e/ErdwalIlluminator.java +++ b/Mage.Sets/src/mage/cards/e/ErdwalIlluminator.java @@ -89,15 +89,6 @@ class InvestigatedWatcher extends Watcher { super(WatcherScope.GAME); } - public InvestigatedWatcher(final InvestigatedWatcher watcher) { - super(watcher); - } - - @Override - public InvestigatedWatcher copy() { - return new InvestigatedWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.INVESTIGATED) { diff --git a/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java b/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java index 9cfb604d03..740ac5348e 100644 --- a/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java +++ b/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java @@ -54,11 +54,6 @@ class EtherswornCanonistWatcher extends Watcher { super(WatcherScope.GAME); } - public EtherswornCanonistWatcher(final EtherswornCanonistWatcher watcher) { - super(watcher); - this.castNonartifactSpell.addAll(watcher.castNonartifactSpell); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getPlayerId() != null) { @@ -83,12 +78,6 @@ class EtherswornCanonistWatcher extends Watcher { public boolean castNonArtifactSpell(UUID playerId) { return castNonartifactSpell.contains(playerId); } - - @Override - public EtherswornCanonistWatcher copy() { - return new EtherswornCanonistWatcher(this); - } - } class EtherswornCanonistReplacementEffect extends ContinuousRuleModifyingEffectImpl { diff --git a/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java b/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java index 1ae545be10..7edce41a7c 100644 --- a/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java +++ b/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java @@ -76,11 +76,6 @@ class FairgroundsTrumpeterWatcher extends Watcher { super(WatcherScope.GAME); } - public FairgroundsTrumpeterWatcher(final FairgroundsTrumpeterWatcher watcher) { - super(watcher); - this.players.addAll(watcher.players); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.COUNTER_ADDED && event.getData().equals(CounterType.P1P1.getName())) { @@ -103,8 +98,4 @@ class FairgroundsTrumpeterWatcher extends Watcher { return players.contains(playerId); } - @Override - public FairgroundsTrumpeterWatcher copy() { - return new FairgroundsTrumpeterWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/f/FaithsReward.java b/Mage.Sets/src/mage/cards/f/FaithsReward.java index 17121aa83c..32b993daf1 100644 --- a/Mage.Sets/src/mage/cards/f/FaithsReward.java +++ b/Mage.Sets/src/mage/cards/f/FaithsReward.java @@ -83,11 +83,6 @@ class FaithsRewardWatcher extends Watcher { super(WatcherScope.GAME); } - public FaithsRewardWatcher(final FaithsRewardWatcher watcher) { - super(watcher); - this.cards.addAll(watcher.cards); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) { @@ -99,11 +94,6 @@ class FaithsRewardWatcher extends Watcher { return cards; } - @Override - public FaithsRewardWatcher copy() { - return new FaithsRewardWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/f/FblthpTheLost.java b/Mage.Sets/src/mage/cards/f/FblthpTheLost.java index 3de4f8abcd..1effc82a04 100644 --- a/Mage.Sets/src/mage/cards/f/FblthpTheLost.java +++ b/Mage.Sets/src/mage/cards/f/FblthpTheLost.java @@ -104,11 +104,6 @@ class FblthpTheLostWatcher extends Watcher { super(WatcherScope.GAME); } - private FblthpTheLostWatcher(final FblthpTheLostWatcher watcher) { - super(watcher); - spellsCastFromLibrary.addAll(watcher.spellsCastFromLibrary); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone() == Zone.LIBRARY) { @@ -130,11 +125,6 @@ class FblthpTheLostWatcher extends Watcher { super.reset(); spellsCastFromLibrary.clear(); } - - @Override - public FblthpTheLostWatcher copy() { - return new FblthpTheLostWatcher(this); - } } class FblthpTheLostTargetedTriggeredAbility extends TriggeredAbilityImpl { diff --git a/Mage.Sets/src/mage/cards/f/FellShepherd.java b/Mage.Sets/src/mage/cards/f/FellShepherd.java index 6e2e833391..d194211d72 100644 --- a/Mage.Sets/src/mage/cards/f/FellShepherd.java +++ b/Mage.Sets/src/mage/cards/f/FellShepherd.java @@ -69,16 +69,6 @@ class FellShepherdWatcher extends Watcher { condition = true; } - public FellShepherdWatcher(final FellShepherdWatcher watcher) { - super(watcher); - this.creatureIds.addAll(watcher.creatureIds); - } - - @Override - public FellShepherdWatcher copy() { - return new FellShepherdWatcher(this); - } - public Set getCreaturesIds() { return creatureIds; } diff --git a/Mage.Sets/src/mage/cards/f/Flamebreak.java b/Mage.Sets/src/mage/cards/f/Flamebreak.java index 1e834bd05a..ecda085357 100644 --- a/Mage.Sets/src/mage/cards/f/Flamebreak.java +++ b/Mage.Sets/src/mage/cards/f/Flamebreak.java @@ -39,7 +39,7 @@ public final class Flamebreak extends CardImpl { // Flamebreak deals 3 damage to each creature without flying and each player. Creatures dealt damage this way can't be regenerated this turn. this.getSpellAbility().addEffect(new DamageEverythingEffect(new StaticValue(3), filter1)); this.getSpellAbility().addEffect(new FlamebreakCantRegenerateEffect()); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public Flamebreak(final Flamebreak card) { diff --git a/Mage.Sets/src/mage/cards/f/FleshAllergy.java b/Mage.Sets/src/mage/cards/f/FleshAllergy.java index 1ea3c3d811..7ac5f4227f 100644 --- a/Mage.Sets/src/mage/cards/f/FleshAllergy.java +++ b/Mage.Sets/src/mage/cards/f/FleshAllergy.java @@ -60,15 +60,6 @@ class FleshAllergyWatcher extends Watcher { super(WatcherScope.GAME); } - private FleshAllergyWatcher(final FleshAllergyWatcher watcher) { - super(watcher); - } - - @Override - public FleshAllergyWatcher copy() { - return new FleshAllergyWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) { diff --git a/Mage.Sets/src/mage/cards/f/FreeRangeChicken.java b/Mage.Sets/src/mage/cards/f/FreeRangeChicken.java index 44fa863213..b52ab4b477 100644 --- a/Mage.Sets/src/mage/cards/f/FreeRangeChicken.java +++ b/Mage.Sets/src/mage/cards/f/FreeRangeChicken.java @@ -101,13 +101,6 @@ class FreeRangeChickenWatcher extends Watcher { super(WatcherScope.GAME); } - public FreeRangeChickenWatcher(final FreeRangeChickenWatcher watcher) { - super(watcher); - for (Map.Entry entry : watcher.totalRolls.entrySet()) { - this.totalRolls.put(entry.getKey(), entry.getValue()); - } - } - @Override public void watch(GameEvent event, Game game) { } @@ -117,11 +110,6 @@ class FreeRangeChickenWatcher extends Watcher { totalRolls.clear(); } - @Override - public FreeRangeChickenWatcher copy() { - return new FreeRangeChickenWatcher(this); - } - public void addRoll(UUID sourceId, int roll) { totalRolls.put(sourceId, roll); } diff --git a/Mage.Sets/src/mage/cards/f/Frostwielder.java b/Mage.Sets/src/mage/cards/f/Frostwielder.java index 909e6c7c72..2863b56a69 100644 --- a/Mage.Sets/src/mage/cards/f/Frostwielder.java +++ b/Mage.Sets/src/mage/cards/f/Frostwielder.java @@ -37,7 +37,7 @@ public final class Frostwielder extends CardImpl { ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // If a creature dealt damage by Frostwielder this turn would die, exile it instead. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher(false)); } diff --git a/Mage.Sets/src/mage/cards/g/GarnaTheBloodflame.java b/Mage.Sets/src/mage/cards/g/GarnaTheBloodflame.java index 2583df059c..2158c290c1 100644 --- a/Mage.Sets/src/mage/cards/g/GarnaTheBloodflame.java +++ b/Mage.Sets/src/mage/cards/g/GarnaTheBloodflame.java @@ -112,11 +112,6 @@ class GarnaTheBloodflameWatcher extends Watcher { super(WatcherScope.GAME); } - public GarnaTheBloodflameWatcher(final GarnaTheBloodflameWatcher watcher) { - super(watcher); - this.cards.addAll(watcher.cards); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD) { @@ -127,11 +122,6 @@ class GarnaTheBloodflameWatcher extends Watcher { } } - @Override - public GarnaTheBloodflameWatcher copy() { - return new GarnaTheBloodflameWatcher(this); - } - public Set getCardsPutToGraveyardThisTurn() { return cards; } diff --git a/Mage.Sets/src/mage/cards/g/GeneratorServant.java b/Mage.Sets/src/mage/cards/g/GeneratorServant.java index 1cf33279df..31bd03c29f 100644 --- a/Mage.Sets/src/mage/cards/g/GeneratorServant.java +++ b/Mage.Sets/src/mage/cards/g/GeneratorServant.java @@ -66,16 +66,6 @@ class GeneratorServantWatcher extends Watcher { super(WatcherScope.CARD); } - private GeneratorServantWatcher(final GeneratorServantWatcher watcher) { - super(watcher); - this.creatures.addAll(watcher.creatures); - } - - @Override - public GeneratorServantWatcher copy() { - return new GeneratorServantWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.MANA_PAID) { diff --git a/Mage.Sets/src/mage/cards/g/GideonsTriumph.java b/Mage.Sets/src/mage/cards/g/GideonsTriumph.java index cd8c9b6242..8a9cec0d9d 100644 --- a/Mage.Sets/src/mage/cards/g/GideonsTriumph.java +++ b/Mage.Sets/src/mage/cards/g/GideonsTriumph.java @@ -101,11 +101,6 @@ class GideonsTriumphWatcher extends Watcher { super(WatcherScope.GAME); } - private GideonsTriumphWatcher(final GideonsTriumphWatcher watcher) { - super(watcher); - this.attackedOrBlockedThisTurnCreatures.addAll(watcher.attackedOrBlockedThisTurnCreatures); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED || event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { @@ -117,12 +112,6 @@ class GideonsTriumphWatcher extends Watcher { return this.attackedOrBlockedThisTurnCreatures.contains(new MageObjectReference(permanent, game)); } - - @Override - public GideonsTriumphWatcher copy() { - return new GideonsTriumphWatcher(this); - } - @Override public void reset() { attackedOrBlockedThisTurnCreatures.clear(); diff --git a/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java b/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java index b0080c17d2..22a8b29021 100644 --- a/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java +++ b/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java @@ -136,11 +136,6 @@ class GisaAndGeralfWatcher extends Watcher { super(WatcherScope.CARD); } - GisaAndGeralfWatcher(final GisaAndGeralfWatcher watcher) { - super(watcher); - this.abilityUsed = watcher.abilityUsed; - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone() == Zone.GRAVEYARD) { @@ -151,11 +146,6 @@ class GisaAndGeralfWatcher extends Watcher { } } - @Override - public GisaAndGeralfWatcher copy() { - return new GisaAndGeralfWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/g/Gomazoa.java b/Mage.Sets/src/mage/cards/g/Gomazoa.java index fb217b8627..d402f5ae66 100644 --- a/Mage.Sets/src/mage/cards/g/Gomazoa.java +++ b/Mage.Sets/src/mage/cards/g/Gomazoa.java @@ -123,16 +123,6 @@ class BlockedByWatcher extends Watcher { super(WatcherScope.CARD); } - private BlockedByWatcher(final BlockedByWatcher watcher) { - super(watcher); - this.blockedByWatcher.addAll(watcher.blockedByWatcher); - } - - @Override - public BlockedByWatcher copy() { - return new BlockedByWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { diff --git a/Mage.Sets/src/mage/cards/g/GontisMachinations.java b/Mage.Sets/src/mage/cards/g/GontisMachinations.java index c69a3692b4..7222bdb483 100644 --- a/Mage.Sets/src/mage/cards/g/GontisMachinations.java +++ b/Mage.Sets/src/mage/cards/g/GontisMachinations.java @@ -100,11 +100,6 @@ class GontisMachinationsFirstLostLifeThisTurnWatcher extends Watcher { super(WatcherScope.GAME); } - public GontisMachinationsFirstLostLifeThisTurnWatcher(final GontisMachinationsFirstLostLifeThisTurnWatcher watcher) { - super(watcher); - this.playersLostLife.putAll(watcher.playersLostLife); - } - @Override public void watch(GameEvent event, Game game) { switch (event.getType()) { @@ -115,10 +110,6 @@ class GontisMachinationsFirstLostLifeThisTurnWatcher extends Watcher { } } - @Override - public GontisMachinationsFirstLostLifeThisTurnWatcher copy() { - return new GontisMachinationsFirstLostLifeThisTurnWatcher(this); - } @Override public void reset() { diff --git a/Mage.Sets/src/mage/cards/g/GrandWarlordRadha.java b/Mage.Sets/src/mage/cards/g/GrandWarlordRadha.java index 9eefb0a7f1..a12f01e9c5 100644 --- a/Mage.Sets/src/mage/cards/g/GrandWarlordRadha.java +++ b/Mage.Sets/src/mage/cards/g/GrandWarlordRadha.java @@ -68,11 +68,6 @@ class CreaturesAttackedWatcher extends Watcher { super(WatcherScope.GAME); } - public CreaturesAttackedWatcher(final CreaturesAttackedWatcher watcher) { - super(watcher); - this.attackedThisTurnCreatures.addAll(watcher.attackedThisTurnCreatures); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BEGIN_COMBAT_STEP_PRE) { @@ -86,12 +81,6 @@ class CreaturesAttackedWatcher extends Watcher { public Set getAttackedThisTurnCreatures() { return this.attackedThisTurnCreatures; } - - @Override - public CreaturesAttackedWatcher copy() { - return new CreaturesAttackedWatcher(this); - } - } class GrandWarlordRadhaTriggeredAbility extends TriggeredAbilityImpl { diff --git a/Mage.Sets/src/mage/cards/g/GrimReminder.java b/Mage.Sets/src/mage/cards/g/GrimReminder.java index b2c5af2216..e864a5d2fb 100644 --- a/Mage.Sets/src/mage/cards/g/GrimReminder.java +++ b/Mage.Sets/src/mage/cards/g/GrimReminder.java @@ -119,13 +119,6 @@ class GrimReminderWatcher extends Watcher { super(WatcherScope.GAME); } - public GrimReminderWatcher(final GrimReminderWatcher watcher) { - super(watcher); - for (Map.Entry> entry : watcher.playersCastSpell.entrySet()) { - playersCastSpell.put(entry.getKey(), entry.getValue()); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { @@ -147,9 +140,4 @@ class GrimReminderWatcher extends Watcher { return playersCastSpell.getOrDefault(spellName, new HashSet<>()); } - @Override - public GrimReminderWatcher copy() { - return new GrimReminderWatcher(this); - } - } diff --git a/Mage.Sets/src/mage/cards/g/GrothamaAllDevouring.java b/Mage.Sets/src/mage/cards/g/GrothamaAllDevouring.java index 21997da89a..c576139f72 100644 --- a/Mage.Sets/src/mage/cards/g/GrothamaAllDevouring.java +++ b/Mage.Sets/src/mage/cards/g/GrothamaAllDevouring.java @@ -174,22 +174,6 @@ class GrothamaAllDevouringWatcher extends Watcher { super(WatcherScope.GAME); } - GrothamaAllDevouringWatcher(final GrothamaAllDevouringWatcher watcher) { - super(watcher); - for (MageObjectReference mor : watcher.damageMap.keySet()) { - this.damageMap.putIfAbsent(mor, new HashMap<>()); - for (UUID key : watcher.damageMap.get(mor).keySet()) { - this.damageMap.get(mor).putIfAbsent(key, 0); - this.damageMap.get(mor).compute(key, (k, damage) -> damage + watcher.damageMap.get(mor).get(key)); - } - } - } - - @Override - public GrothamaAllDevouringWatcher copy() { - return new GrothamaAllDevouringWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() != GameEvent.EventType.DAMAGED_CREATURE) { diff --git a/Mage.Sets/src/mage/cards/g/GuildmagesForum.java b/Mage.Sets/src/mage/cards/g/GuildmagesForum.java index f13e1700f9..c2ad5d9765 100644 --- a/Mage.Sets/src/mage/cards/g/GuildmagesForum.java +++ b/Mage.Sets/src/mage/cards/g/GuildmagesForum.java @@ -62,16 +62,6 @@ class GuildmagesForumWatcher extends Watcher { this.source = source; } - GuildmagesForumWatcher(final GuildmagesForumWatcher watcher) { - super(watcher); - this.source = watcher.source; - } - - @Override - public GuildmagesForumWatcher copy() { - return new GuildmagesForumWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.MANA_PAID) { diff --git a/Mage.Sets/src/mage/cards/h/HallOfTheBanditLord.java b/Mage.Sets/src/mage/cards/h/HallOfTheBanditLord.java index 067ac1c399..74b4f6f11c 100644 --- a/Mage.Sets/src/mage/cards/h/HallOfTheBanditLord.java +++ b/Mage.Sets/src/mage/cards/h/HallOfTheBanditLord.java @@ -70,17 +70,6 @@ class HallOfTheBanditLordWatcher extends Watcher { this.source = source; } - HallOfTheBanditLordWatcher(final HallOfTheBanditLordWatcher watcher) { - super(watcher); - this.creatures.addAll(watcher.creatures); - this.source = watcher.source; - } - - @Override - public HallOfTheBanditLordWatcher copy() { - return new HallOfTheBanditLordWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.MANA_PAID) { diff --git a/Mage.Sets/src/mage/cards/h/HomicidalBruteWatcher.java b/Mage.Sets/src/mage/cards/h/HomicidalBruteWatcher.java index 944a748140..4425e8cba3 100644 --- a/Mage.Sets/src/mage/cards/h/HomicidalBruteWatcher.java +++ b/Mage.Sets/src/mage/cards/h/HomicidalBruteWatcher.java @@ -11,15 +11,6 @@ public class HomicidalBruteWatcher extends Watcher { super(WatcherScope.CARD); } - public HomicidalBruteWatcher(final HomicidalBruteWatcher watcher) { - super(watcher); - } - - @Override - public HomicidalBruteWatcher copy() { - return new HomicidalBruteWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (condition) { diff --git a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java index c20236e8c1..0143975285 100644 --- a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java +++ b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java @@ -142,20 +142,6 @@ class HopeOfGhirapurCombatDamageWatcher extends Watcher { super(WatcherScope.GAME); } - public HopeOfGhirapurCombatDamageWatcher(final HopeOfGhirapurCombatDamageWatcher watcher) { - super(watcher); - for (MageObjectReference damager : watcher.combatDamagedPlayers.keySet()) { - Set players = new HashSet<>(); - players.addAll(watcher.combatDamagedPlayers.get(damager)); - this.combatDamagedPlayers.put(damager, players); - } - } - - @Override - public HopeOfGhirapurCombatDamageWatcher copy() { - return new HopeOfGhirapurCombatDamageWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DAMAGED_PLAYER && ((DamagedPlayerEvent) event).isCombatDamage()) { diff --git a/Mage.Sets/src/mage/cards/h/HotheadedGiant.java b/Mage.Sets/src/mage/cards/h/HotheadedGiant.java index e475b41aad..deb65034b7 100644 --- a/Mage.Sets/src/mage/cards/h/HotheadedGiant.java +++ b/Mage.Sets/src/mage/cards/h/HotheadedGiant.java @@ -85,16 +85,6 @@ class HotHeadedGiantWatcher extends Watcher { this.cardId = cardId; } - public HotHeadedGiantWatcher(final HotHeadedGiantWatcher watcher) { - super(watcher); - this.cardId = watcher.cardId; - } - - @Override - public HotHeadedGiantWatcher copy() { - return new HotHeadedGiantWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (condition == true) { //no need to check - condition has already occured diff --git a/Mage.Sets/src/mage/cards/i/IcefallRegent.java b/Mage.Sets/src/mage/cards/i/IcefallRegent.java index ec71d65553..c18b392006 100644 --- a/Mage.Sets/src/mage/cards/i/IcefallRegent.java +++ b/Mage.Sets/src/mage/cards/i/IcefallRegent.java @@ -146,10 +146,6 @@ class IcefallRegentWatcher extends Watcher { super(WatcherScope.CARD); } - IcefallRegentWatcher(IcefallRegentWatcher watcher) { - super(watcher); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.LOST_CONTROL && event.getPlayerId().equals(controllerId) && event.getTargetId().equals(sourceId)) { @@ -170,11 +166,6 @@ class IcefallRegentWatcher extends Watcher { public void reset() { //don't reset condition each turn - only when this leaves the battlefield } - - @Override - public IcefallRegentWatcher copy() { - return new IcefallRegentWatcher(this); - } } class IcefallRegentCostIncreaseEffect extends CostModificationEffectImpl { diff --git a/Mage.Sets/src/mage/cards/i/IchneumonDruid.java b/Mage.Sets/src/mage/cards/i/IchneumonDruid.java index 0e878b9815..c341056251 100644 --- a/Mage.Sets/src/mage/cards/i/IchneumonDruid.java +++ b/Mage.Sets/src/mage/cards/i/IchneumonDruid.java @@ -100,18 +100,6 @@ class IchneumonDruidWatcher extends Watcher { super(WatcherScope.GAME); } - public IchneumonDruidWatcher(final IchneumonDruidWatcher watcher) { - super(watcher); - for (Map.Entry entry : watcher.playerInstantCount.entrySet()) { - playerInstantCount.put(entry.getKey(), entry.getValue()); - } - } - - @Override - public IchneumonDruidWatcher copy() { - return new IchneumonDruidWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.SPELL_CAST) { diff --git a/Mage.Sets/src/mage/cards/i/ImpactResonance.java b/Mage.Sets/src/mage/cards/i/ImpactResonance.java index 2706a61606..6a570a9fe3 100644 --- a/Mage.Sets/src/mage/cards/i/ImpactResonance.java +++ b/Mage.Sets/src/mage/cards/i/ImpactResonance.java @@ -93,16 +93,6 @@ class GreatestAmountOfDamageWatcher extends Watcher { super(WatcherScope.GAME); } - public GreatestAmountOfDamageWatcher(final GreatestAmountOfDamageWatcher watcher) { - super(watcher); - this.damageAmount = watcher.damageAmount; - } - - @Override - public GreatestAmountOfDamageWatcher copy() { - return new GreatestAmountOfDamageWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { switch(event.getType()) { diff --git a/Mage.Sets/src/mage/cards/i/IncendiaryFlow.java b/Mage.Sets/src/mage/cards/i/IncendiaryFlow.java index 5aad5c9cb5..d65967082a 100644 --- a/Mage.Sets/src/mage/cards/i/IncendiaryFlow.java +++ b/Mage.Sets/src/mage/cards/i/IncendiaryFlow.java @@ -27,7 +27,7 @@ public final class IncendiaryFlow extends CardImpl { Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); effect.setText("If a creature dealt damage this way would die this turn, exile it instead"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public IncendiaryFlow(final IncendiaryFlow card) { diff --git a/Mage.Sets/src/mage/cards/i/Incinerate.java b/Mage.Sets/src/mage/cards/i/Incinerate.java index 4a0a926243..bf0a47ca75 100644 --- a/Mage.Sets/src/mage/cards/i/Incinerate.java +++ b/Mage.Sets/src/mage/cards/i/Incinerate.java @@ -29,7 +29,7 @@ public final class Incinerate extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new IncinerateEffect()); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public Incinerate(final Incinerate card) { diff --git a/Mage.Sets/src/mage/cards/i/InfernoTrap.java b/Mage.Sets/src/mage/cards/i/InfernoTrap.java index f2fcc17d1c..45a6e42594 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoTrap.java +++ b/Mage.Sets/src/mage/cards/i/InfernoTrap.java @@ -75,11 +75,6 @@ class InfernoTrapWatcher extends Watcher { super(WatcherScope.GAME); } - public InfernoTrapWatcher(final InfernoTrapWatcher watcher) { - super(watcher); - playerDamagedByCreature.putAll(watcher.playerDamagedByCreature); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER @@ -106,8 +101,4 @@ class InfernoTrapWatcher extends Watcher { playerDamagedByCreature.clear(); } - @Override - public InfernoTrapWatcher copy() { - return new InfernoTrapWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java b/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java index 37b3660d76..d4d4765c4f 100644 --- a/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java +++ b/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java @@ -86,10 +86,6 @@ class NonArtifactCreaturesDiedWatcher extends Watcher { super(WatcherScope.GAME); } - public NonArtifactCreaturesDiedWatcher(final NonArtifactCreaturesDiedWatcher watcher) { - super(watcher); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { @@ -102,9 +98,4 @@ class NonArtifactCreaturesDiedWatcher extends Watcher { } } - @Override - public NonArtifactCreaturesDiedWatcher copy() { - return new NonArtifactCreaturesDiedWatcher(this); - } - } diff --git a/Mage.Sets/src/mage/cards/i/Insist.java b/Mage.Sets/src/mage/cards/i/Insist.java index 8d2f4d559b..f2d7b9d1e3 100644 --- a/Mage.Sets/src/mage/cards/i/Insist.java +++ b/Mage.Sets/src/mage/cards/i/Insist.java @@ -107,16 +107,6 @@ class InsistWatcher extends Watcher { super(WatcherScope.PLAYER); } - InsistWatcher(final InsistWatcher watcher) { - super(watcher); - this.uncounterableSpell = watcher.uncounterableSpell; - } - - @Override - public InsistWatcher copy() { - return new InsistWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST && ready) { diff --git a/Mage.Sets/src/mage/cards/j/JandorsRing.java b/Mage.Sets/src/mage/cards/j/JandorsRing.java index eab1ac4cfb..c9022834ae 100644 --- a/Mage.Sets/src/mage/cards/j/JandorsRing.java +++ b/Mage.Sets/src/mage/cards/j/JandorsRing.java @@ -100,11 +100,6 @@ class JandorsRingWatcher extends Watcher { super(WatcherScope.GAME); } - public JandorsRingWatcher(final JandorsRingWatcher watcher) { - super(watcher); - this.lastDrawnCards.putAll(watcher.lastDrawnCards); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DREW_CARD) { @@ -112,11 +107,6 @@ class JandorsRingWatcher extends Watcher { } } - @Override - public JandorsRingWatcher copy() { - return new JandorsRingWatcher(this); - } - @Override public void reset() { super.reset(); @@ -124,7 +114,7 @@ class JandorsRingWatcher extends Watcher { } public UUID getLastDrewCard(UUID playerId) { - return lastDrawnCards.getOrDefault(null, playerId); + return lastDrawnCards.get(playerId); } } diff --git a/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java b/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java index 2939117b8b..7fb9ad232c 100644 --- a/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java +++ b/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java @@ -59,7 +59,7 @@ public final class JayaBallardTaskMage extends CardImpl { ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); ability.addEffect(new CantRegenerateEffect()); - this.addAbility(ability, new DamagedByWatcher()); + this.addAbility(ability, new DamagedByWatcher(false)); // {5}{R}{R}, {tap}, Discard a card: Jaya Ballard deals 6 damage to each creature and each player. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEverythingEffect(6), new ManaCostsImpl("{5}{R}{R}")); diff --git a/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java b/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java index 4dc59ed8f2..77a311f856 100644 --- a/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java +++ b/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java @@ -147,15 +147,6 @@ class JelevaNephaliasWatcher extends Watcher { super(WatcherScope.GAME); } - public JelevaNephaliasWatcher(final JelevaNephaliasWatcher watcher) { - super(watcher); - } - - @Override - public JelevaNephaliasWatcher copy() { - return new JelevaNephaliasWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { // Watcher saves all casts becaus of possible Clone cards that copy Jeleva diff --git a/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java b/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java index 1ea6ab2fe6..8fb5c83c0a 100644 --- a/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java +++ b/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java @@ -178,11 +178,6 @@ class KaradorGhostChieftainWatcher extends Watcher { super(WatcherScope.CARD); } - KaradorGhostChieftainWatcher(final KaradorGhostChieftainWatcher watcher) { - super(watcher); - this.abilityUsed = watcher.abilityUsed; - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST @@ -194,11 +189,6 @@ class KaradorGhostChieftainWatcher extends Watcher { } } - @Override - public KaradorGhostChieftainWatcher copy() { - return new KaradorGhostChieftainWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/k/KessDissidentMage.java b/Mage.Sets/src/mage/cards/k/KessDissidentMage.java index 3e4e88f607..618935d7f3 100644 --- a/Mage.Sets/src/mage/cards/k/KessDissidentMage.java +++ b/Mage.Sets/src/mage/cards/k/KessDissidentMage.java @@ -162,12 +162,6 @@ class KessDissidentMageWatcher extends Watcher { super(WatcherScope.GAME); } - private KessDissidentMageWatcher(final KessDissidentMageWatcher watcher) { - super(watcher); - this.allowingObjects.addAll(watcher.allowingObjects); - this.castSpells.putAll(watcher.castSpells); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST @@ -184,11 +178,6 @@ class KessDissidentMageWatcher extends Watcher { } } - @Override - public KessDissidentMageWatcher copy() { - return new KessDissidentMageWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/k/KnightsOfTheBlackRose.java b/Mage.Sets/src/mage/cards/k/KnightsOfTheBlackRose.java index 7d0f2532e8..7862b08344 100644 --- a/Mage.Sets/src/mage/cards/k/KnightsOfTheBlackRose.java +++ b/Mage.Sets/src/mage/cards/k/KnightsOfTheBlackRose.java @@ -108,9 +108,6 @@ class MonarchAtTurnStartWatcher extends Watcher { super(WatcherScope.GAME); } - public MonarchAtTurnStartWatcher(final MonarchAtTurnStartWatcher watcher) { - super(watcher); - } @Override public void watch(GameEvent event, Game game) { @@ -120,10 +117,6 @@ class MonarchAtTurnStartWatcher extends Watcher { } } - @Override - public MonarchAtTurnStartWatcher copy() { - return new MonarchAtTurnStartWatcher(this); - } @Override public void reset() { diff --git a/Mage.Sets/src/mage/cards/k/KrovikanVampire.java b/Mage.Sets/src/mage/cards/k/KrovikanVampire.java index 47197080a5..b8247dd765 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanVampire.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanVampire.java @@ -147,16 +147,6 @@ class KrovikanVampireCreaturesDamagedWatcher extends Watcher { super(WatcherScope.GAME); } - public KrovikanVampireCreaturesDamagedWatcher(final KrovikanVampireCreaturesDamagedWatcher watcher) { - super(watcher); - this.damagedBySource.addAll(watcher.damagedBySource); - } - - @Override - public KrovikanVampireCreaturesDamagedWatcher copy() { - return new KrovikanVampireCreaturesDamagedWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DAMAGED_CREATURE @@ -183,11 +173,6 @@ class KrovikanVampireCreaturesDiedWatcher extends Watcher { super(WatcherScope.GAME); } - public KrovikanVampireCreaturesDiedWatcher(final KrovikanVampireCreaturesDiedWatcher watcher) { - super(watcher); - this.diedThisTurn.addAll(watcher.diedThisTurn); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { @@ -208,11 +193,6 @@ class KrovikanVampireCreaturesDiedWatcher extends Watcher { public Set getDiedThisTurn() { return this.diedThisTurn; } - - @Override - public KrovikanVampireCreaturesDiedWatcher copy() { - return new KrovikanVampireCreaturesDiedWatcher(this); - } } class KrovikanVampireDelayedTriggeredAbility extends DelayedTriggeredAbility { diff --git a/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java b/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java index d7ee89ce65..371a716cbf 100644 --- a/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java +++ b/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java @@ -67,7 +67,7 @@ public final class KumanoMasterYamabushi extends CardImpl { ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // If a creature dealt damage by Kumano this turn would die, exile it instead. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher(false)); } diff --git a/Mage.Sets/src/mage/cards/k/KumanosBlessing.java b/Mage.Sets/src/mage/cards/k/KumanosBlessing.java index 675c8c6973..196790799e 100644 --- a/Mage.Sets/src/mage/cards/k/KumanosBlessing.java +++ b/Mage.Sets/src/mage/cards/k/KumanosBlessing.java @@ -112,16 +112,6 @@ class DamagedByEnchantedWatcher extends Watcher { super(WatcherScope.CARD); } - public DamagedByEnchantedWatcher(final DamagedByEnchantedWatcher watcher) { - super(watcher); - this.damagedCreatures.addAll(watcher.damagedCreatures); - } - - @Override - public DamagedByEnchantedWatcher copy() { - return new DamagedByEnchantedWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DAMAGED_CREATURE) { diff --git a/Mage.Sets/src/mage/cards/k/KumanosPupils.java b/Mage.Sets/src/mage/cards/k/KumanosPupils.java index 5dc8e2ceb8..160eeebc17 100644 --- a/Mage.Sets/src/mage/cards/k/KumanosPupils.java +++ b/Mage.Sets/src/mage/cards/k/KumanosPupils.java @@ -28,7 +28,7 @@ public final class KumanosPupils extends CardImpl { this.toughness = new MageInt(3); // If a creature dealt damage by Kumano's Pupils this turn would die, exile it instead. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher(false)); } public KumanosPupils(final KumanosPupils card) { diff --git a/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java b/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java index 2bd53139c8..413693b66d 100644 --- a/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java +++ b/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java @@ -88,11 +88,6 @@ class KydeleCardsDrawnThisTurnWatcher extends Watcher { super(WatcherScope.GAME); } - public KydeleCardsDrawnThisTurnWatcher(final KydeleCardsDrawnThisTurnWatcher watcher) { - super(watcher); - this.cardsDrawnThisTurn.putAll(watcher.cardsDrawnThisTurn); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DREW_CARD) { @@ -111,9 +106,4 @@ class KydeleCardsDrawnThisTurnWatcher extends Watcher { cardsDrawnThisTurn.clear(); } - - @Override - public KydeleCardsDrawnThisTurnWatcher copy() { - return new KydeleCardsDrawnThisTurnWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/m/ManaMaze.java b/Mage.Sets/src/mage/cards/m/ManaMaze.java index 3d3504a2b4..bcdb38d061 100644 --- a/Mage.Sets/src/mage/cards/m/ManaMaze.java +++ b/Mage.Sets/src/mage/cards/m/ManaMaze.java @@ -90,16 +90,6 @@ class LastSpellCastWatcher extends Watcher { super(WatcherScope.GAME); } - public LastSpellCastWatcher(final LastSpellCastWatcher watcher) { - super(watcher); - this.lastSpellCast = watcher.getLastSpellCast(); - } - - @Override - public LastSpellCastWatcher copy() { - return new LastSpellCastWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.SPELL_CAST) { diff --git a/Mage.Sets/src/mage/cards/m/MasterWarcraft.java b/Mage.Sets/src/mage/cards/m/MasterWarcraft.java index 4889ff1da7..3fabd6af7e 100644 --- a/Mage.Sets/src/mage/cards/m/MasterWarcraft.java +++ b/Mage.Sets/src/mage/cards/m/MasterWarcraft.java @@ -257,11 +257,6 @@ class MasterWarcraftCastWatcher extends Watcher { super(WatcherScope.GAME); } - public MasterWarcraftCastWatcher(final MasterWarcraftCastWatcher watcher) { - super(watcher); - this.copyCount = watcher.copyCount; - this.copyCountApply = watcher.copyCountApply; - } @Override public void reset() { @@ -269,11 +264,6 @@ class MasterWarcraftCastWatcher extends Watcher { copyCountApply = 0; } - @Override - public MasterWarcraftCastWatcher copy() { - return new MasterWarcraftCastWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { } diff --git a/Mage.Sets/src/mage/cards/m/MindstormCrown.java b/Mage.Sets/src/mage/cards/m/MindstormCrown.java index 61b16ec257..bb350724be 100644 --- a/Mage.Sets/src/mage/cards/m/MindstormCrown.java +++ b/Mage.Sets/src/mage/cards/m/MindstormCrown.java @@ -83,11 +83,6 @@ class MindstormCrownWatcher extends Watcher { super(WatcherScope.GAME); } - public MindstormCrownWatcher(final MindstormCrownWatcher watcher) { - super(watcher); - cardsInHandCount = watcher.cardsInHandCount; - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BEGINNING_PHASE_PRE @@ -110,8 +105,4 @@ class MindstormCrownWatcher extends Watcher { cardsInHandCount = 0; } - @Override - public MindstormCrownWatcher copy() { - return new MindstormCrownWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/m/MoltenPsyche.java b/Mage.Sets/src/mage/cards/m/MoltenPsyche.java index b8b6f7f18c..74a8fef6c5 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenPsyche.java +++ b/Mage.Sets/src/mage/cards/m/MoltenPsyche.java @@ -114,11 +114,6 @@ class MoltenPsycheWatcher extends Watcher { super(WatcherScope.GAME); } - public MoltenPsycheWatcher(final MoltenPsycheWatcher watcher) { - super(watcher); - this.draws.putAll(watcher.draws); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DREW_CARD) { @@ -140,9 +135,4 @@ class MoltenPsycheWatcher extends Watcher { return draws.getOrDefault(playerId, 0); } - @Override - public MoltenPsycheWatcher copy() { - return new MoltenPsycheWatcher(this); - } - } diff --git a/Mage.Sets/src/mage/cards/m/MuldrothaTheGravetide.java b/Mage.Sets/src/mage/cards/m/MuldrothaTheGravetide.java index fc55065416..67f5a5ff6d 100644 --- a/Mage.Sets/src/mage/cards/m/MuldrothaTheGravetide.java +++ b/Mage.Sets/src/mage/cards/m/MuldrothaTheGravetide.java @@ -124,16 +124,6 @@ class MuldrothaTheGravetideWatcher extends Watcher { super(WatcherScope.GAME); } - public MuldrothaTheGravetideWatcher(final MuldrothaTheGravetideWatcher watcher) { - super(watcher); - sourcePlayedPermanentTypes.putAll(watcher.sourcePlayedPermanentTypes); - } - - @Override - public MuldrothaTheGravetideWatcher copy() { - return new MuldrothaTheGravetideWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.PLAY_LAND) { diff --git a/Mage.Sets/src/mage/cards/m/MultanisPresence.java b/Mage.Sets/src/mage/cards/m/MultanisPresence.java index 3000f24d96..20268de193 100644 --- a/Mage.Sets/src/mage/cards/m/MultanisPresence.java +++ b/Mage.Sets/src/mage/cards/m/MultanisPresence.java @@ -78,16 +78,6 @@ class MultanisPresenceWatcher extends Watcher { super(WatcherScope.GAME); } - public MultanisPresenceWatcher(final MultanisPresenceWatcher watcher) { - super(watcher); - this.spellsCast.putAll(watcher.spellsCast); - } - - @Override - public MultanisPresenceWatcher copy() { - return new MultanisPresenceWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (GameEvent.EventType.SPELL_CAST == event.getType()) { diff --git a/Mage.Sets/src/mage/cards/n/NoRestForTheWicked.java b/Mage.Sets/src/mage/cards/n/NoRestForTheWicked.java index 0b0ceb3c9b..30a203e54b 100644 --- a/Mage.Sets/src/mage/cards/n/NoRestForTheWicked.java +++ b/Mage.Sets/src/mage/cards/n/NoRestForTheWicked.java @@ -98,12 +98,6 @@ class NoRestForTheWickedWatcher extends Watcher { this.cards = new ArrayList<>(); } - public NoRestForTheWickedWatcher(final NoRestForTheWickedWatcher watcher) { - super(watcher); - this.cards = new ArrayList<>(); - this.cards.addAll(watcher.cards); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE @@ -113,11 +107,6 @@ class NoRestForTheWickedWatcher extends Watcher { } } - @Override - public NoRestForTheWickedWatcher copy() { - return new NoRestForTheWickedWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/o/OathOfChandra.java b/Mage.Sets/src/mage/cards/o/OathOfChandra.java index 57f63826f9..a6018a68aa 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfChandra.java +++ b/Mage.Sets/src/mage/cards/o/OathOfChandra.java @@ -88,11 +88,6 @@ class OathOfChandraWatcher extends Watcher { super(WatcherScope.GAME); } - public OathOfChandraWatcher(final OathOfChandraWatcher watcher) { - super(watcher); - this.players.addAll(watcher.players); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { @@ -113,9 +108,4 @@ class OathOfChandraWatcher extends Watcher { return players.contains(playerId); } - @Override - public OathOfChandraWatcher copy() { - return new OathOfChandraWatcher(this); - } - } diff --git a/Mage.Sets/src/mage/cards/o/OathOfLiliana.java b/Mage.Sets/src/mage/cards/o/OathOfLiliana.java index d6e81fc775..cfa8e7ebef 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfLiliana.java +++ b/Mage.Sets/src/mage/cards/o/OathOfLiliana.java @@ -76,11 +76,6 @@ class OathOfLilianaWatcher extends Watcher { super(WatcherScope.GAME); } - public OathOfLilianaWatcher(final OathOfLilianaWatcher watcher) { - super(watcher); - this.players.addAll(watcher.players); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { @@ -101,9 +96,5 @@ class OathOfLilianaWatcher extends Watcher { return players.contains(playerId); } - @Override - public OathOfLilianaWatcher copy() { - return new OathOfLilianaWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/o/OpalPalace.java b/Mage.Sets/src/mage/cards/o/OpalPalace.java index e010390c4f..7e1111639a 100644 --- a/Mage.Sets/src/mage/cards/o/OpalPalace.java +++ b/Mage.Sets/src/mage/cards/o/OpalPalace.java @@ -71,21 +71,10 @@ class OpalPalaceWatcher extends Watcher { this.originalId = originalId; } - private OpalPalaceWatcher(final OpalPalaceWatcher watcher) { - super(watcher); - this.commanderId.addAll(watcher.commanderId); - this.originalId = watcher.originalId; - } - public boolean manaUsedToCastCommander(UUID id){ return commanderId.contains(id); } - @Override - public OpalPalaceWatcher copy() { - return new OpalPalaceWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.MANA_PAID) { diff --git a/Mage.Sets/src/mage/cards/o/Overmaster.java b/Mage.Sets/src/mage/cards/o/Overmaster.java index 1f91bc9841..cad85af450 100644 --- a/Mage.Sets/src/mage/cards/o/Overmaster.java +++ b/Mage.Sets/src/mage/cards/o/Overmaster.java @@ -109,15 +109,6 @@ class OvermasterWatcher extends Watcher { super(WatcherScope.PLAYER); } - OvermasterWatcher(final OvermasterWatcher watcher) { - super(watcher); - this.uncounterableSpell = watcher.uncounterableSpell; - } - - @Override - public OvermasterWatcher copy() { - return new OvermasterWatcher(this); - } @Override public void watch(GameEvent event, Game game) { diff --git a/Mage.Sets/src/mage/cards/p/PalladiaMorsTheRuiner.java b/Mage.Sets/src/mage/cards/p/PalladiaMorsTheRuiner.java index f65845133d..87a4da96fe 100644 --- a/Mage.Sets/src/mage/cards/p/PalladiaMorsTheRuiner.java +++ b/Mage.Sets/src/mage/cards/p/PalladiaMorsTheRuiner.java @@ -97,16 +97,6 @@ class PalladiaMorsTheRuinerWatcher extends Watcher { super(WatcherScope.GAME); } - public PalladiaMorsTheRuinerWatcher(final PalladiaMorsTheRuinerWatcher watcher) { - super(watcher); - damagers.addAll(watcher.damagers); - } - - @Override - public PalladiaMorsTheRuinerWatcher copy() { - return new PalladiaMorsTheRuinerWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { switch (event.getType()) { diff --git a/Mage.Sets/src/mage/cards/p/PatriciansScorn.java b/Mage.Sets/src/mage/cards/p/PatriciansScorn.java index c9f0ed7d5f..55f37ce127 100644 --- a/Mage.Sets/src/mage/cards/p/PatriciansScorn.java +++ b/Mage.Sets/src/mage/cards/p/PatriciansScorn.java @@ -76,15 +76,6 @@ class PatriciansScornWatcher extends Watcher { super(WatcherScope.CARD); } - public PatriciansScornWatcher(final PatriciansScornWatcher watcher) { - super(watcher); - } - - @Override - public PatriciansScornWatcher copy() { - return new PatriciansScornWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (condition) { //no need to check - condition has already occured diff --git a/Mage.Sets/src/mage/cards/p/PillarOfFlame.java b/Mage.Sets/src/mage/cards/p/PillarOfFlame.java index 1c8fc6bbf0..a860c2b310 100644 --- a/Mage.Sets/src/mage/cards/p/PillarOfFlame.java +++ b/Mage.Sets/src/mage/cards/p/PillarOfFlame.java @@ -25,7 +25,7 @@ public final class PillarOfFlame extends CardImpl { this.getSpellAbility().addTarget(new TargetAnyTarget()); // If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public PillarOfFlame(final PillarOfFlame card) { diff --git a/Mage.Sets/src/mage/cards/p/PowerSurge.java b/Mage.Sets/src/mage/cards/p/PowerSurge.java index dd2ee01afd..22ca93093d 100644 --- a/Mage.Sets/src/mage/cards/p/PowerSurge.java +++ b/Mage.Sets/src/mage/cards/p/PowerSurge.java @@ -94,11 +94,6 @@ class PowerSurgeWatcher extends Watcher { super(WatcherScope.GAME); } - public PowerSurgeWatcher(final PowerSurgeWatcher watcher) { - super(watcher); - untappedLandCount = watcher.untappedLandCount; - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BEGINNING_PHASE_PRE @@ -115,9 +110,4 @@ class PowerSurgeWatcher extends Watcher { public void reset() { untappedLandCount = 0; } - - @Override - public PowerSurgeWatcher copy() { - return new PowerSurgeWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/p/PredatoryAdvantage.java b/Mage.Sets/src/mage/cards/p/PredatoryAdvantage.java index 8b7bba0c13..fc3ca9a5b9 100644 --- a/Mage.Sets/src/mage/cards/p/PredatoryAdvantage.java +++ b/Mage.Sets/src/mage/cards/p/PredatoryAdvantage.java @@ -68,10 +68,6 @@ class CastCreatureWatcher extends Watcher { super(WatcherScope.CARD); } - public CastCreatureWatcher(final CastCreatureWatcher watcher) { - super(watcher); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST @@ -83,9 +79,4 @@ class CastCreatureWatcher extends Watcher { } } } - - @Override - public CastCreatureWatcher copy() { - return new CastCreatureWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/p/PrematureBurial.java b/Mage.Sets/src/mage/cards/p/PrematureBurial.java index a4542bed63..090465914f 100644 --- a/Mage.Sets/src/mage/cards/p/PrematureBurial.java +++ b/Mage.Sets/src/mage/cards/p/PrematureBurial.java @@ -107,14 +107,6 @@ class ETBSinceYourLastTurnWatcher extends Watcher { this.playerToETBMap = new HashMap<>(); } - public ETBSinceYourLastTurnWatcher(ETBSinceYourLastTurnWatcher watcher) { - super(watcher); - this.playerToETBMap = new HashMap<>(); - for (UUID player : watcher.playerToETBMap.keySet()){ - this.playerToETBMap.put(player, new HashSet<>(watcher.playerToETBMap.get(player))); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.END_TURN_STEP_POST){ @@ -137,9 +129,4 @@ class ETBSinceYourLastTurnWatcher extends Watcher { public boolean enteredSinceLastTurn(UUID player, MageObjectReference mor){ return playerToETBMap.get(player).contains(mor); } - - @Override - public ETBSinceYourLastTurnWatcher copy() { - return new ETBSinceYourLastTurnWatcher(this); - } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/q/Quicken.java b/Mage.Sets/src/mage/cards/q/Quicken.java index 3ccc2a178b..e476a897f8 100644 --- a/Mage.Sets/src/mage/cards/q/Quicken.java +++ b/Mage.Sets/src/mage/cards/q/Quicken.java @@ -103,15 +103,6 @@ class QuickenWatcher extends Watcher { super(WatcherScope.GAME); } - private QuickenWatcher(final QuickenWatcher watcher) { - super(watcher); - } - - @Override - public QuickenWatcher copy() { - return new QuickenWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { diff --git a/Mage.Sets/src/mage/cards/r/RageOfPurphoros.java b/Mage.Sets/src/mage/cards/r/RageOfPurphoros.java index 90d1701511..c6dd62267e 100644 --- a/Mage.Sets/src/mage/cards/r/RageOfPurphoros.java +++ b/Mage.Sets/src/mage/cards/r/RageOfPurphoros.java @@ -28,7 +28,7 @@ public final class RageOfPurphoros extends CardImpl { this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "It")); this.getSpellAbility().addEffect(new ScryEffect(1)); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public RageOfPurphoros(final RageOfPurphoros card) { diff --git a/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java b/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java index 73f4feebf4..e3fc6822f8 100644 --- a/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java +++ b/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java @@ -107,20 +107,10 @@ class RasputinDreamweaverStartedUntappedWatcher extends Watcher { super(WatcherScope.GAME); } - RasputinDreamweaverStartedUntappedWatcher(final RasputinDreamweaverStartedUntappedWatcher watcher) { - super(watcher); - this.startedUntapped.addAll(watcher.startedUntapped); - } - - @Override - public RasputinDreamweaverStartedUntappedWatcher copy() { - return new RasputinDreamweaverStartedUntappedWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.BEGINNING_PHASE_PRE) { - game.getBattlefield().getAllActivePermanents(filter, game).stream().forEach(permanent -> startedUntapped.add(permanent.getId())); + game.getBattlefield().getAllActivePermanents(filter, game).forEach(permanent -> startedUntapped.add(permanent.getId())); } } diff --git a/Mage.Sets/src/mage/cards/r/RedSunsZenith.java b/Mage.Sets/src/mage/cards/r/RedSunsZenith.java index 9d39917e0c..49507924fe 100644 --- a/Mage.Sets/src/mage/cards/r/RedSunsZenith.java +++ b/Mage.Sets/src/mage/cards/r/RedSunsZenith.java @@ -29,7 +29,7 @@ public final class RedSunsZenith extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance)); this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); this.getSpellAbility().addEffect(ShuffleSpellEffect.getInstance()); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public RedSunsZenith(final RedSunsZenith card) { diff --git a/Mage.Sets/src/mage/cards/r/ReversePolarity.java b/Mage.Sets/src/mage/cards/r/ReversePolarity.java index 360daa6ed2..98c2ba6738 100644 --- a/Mage.Sets/src/mage/cards/r/ReversePolarity.java +++ b/Mage.Sets/src/mage/cards/r/ReversePolarity.java @@ -72,13 +72,6 @@ class ReversePolarityWatcher extends Watcher { super(WatcherScope.GAME); } - public ReversePolarityWatcher(final ReversePolarityWatcher watcher) { - super(watcher); - for (Entry entry : watcher.artifactDamageReceivedThisTurn.entrySet()) { - artifactDamageReceivedThisTurn.put(entry.getKey(), entry.getValue()); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { @@ -102,8 +95,4 @@ class ReversePolarityWatcher extends Watcher { artifactDamageReceivedThisTurn.clear(); } - @Override - public ReversePolarityWatcher copy() { - return new ReversePolarityWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/r/RocketLauncher.java b/Mage.Sets/src/mage/cards/r/RocketLauncher.java index ed0fcbcc7b..498e855652 100644 --- a/Mage.Sets/src/mage/cards/r/RocketLauncher.java +++ b/Mage.Sets/src/mage/cards/r/RocketLauncher.java @@ -61,12 +61,6 @@ class RocketLauncherWatcher extends Watcher { this.cardId = cardId; } - public RocketLauncherWatcher(final RocketLauncherWatcher watcher) { - super(watcher); - this.changedControllerOR1stTurn = watcher.isChangedControllerOR1stTurn(); - this.cardId = watcher.cardId; - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.CLEANUP_STEP_POST) { @@ -78,10 +72,6 @@ class RocketLauncherWatcher extends Watcher { } } - @Override - public RocketLauncherWatcher copy() { - return new RocketLauncherWatcher(this); - } @Override public void reset() { diff --git a/Mage.Sets/src/mage/cards/r/Runesword.java b/Mage.Sets/src/mage/cards/r/Runesword.java index 5692512b9e..0f879aa7a7 100644 --- a/Mage.Sets/src/mage/cards/r/Runesword.java +++ b/Mage.Sets/src/mage/cards/r/Runesword.java @@ -47,7 +47,7 @@ public final class Runesword extends CardImpl { ability.addEffect(new RuneswordCantBeRegeneratedEffect()); // If a creature dealt damage by the targeted creature would die this turn, exile that creature instead. SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.Custom)); - ability2.addWatcher(new DamagedByWatcher()); + ability2.addWatcher(new DamagedByWatcher(false)); ability2.setRuleVisible(false); ability.addEffect(new GainAbilityTargetEffect(ability2, Duration.EndOfTurn, null, false).setText( "If a creature dealt damage by the targeted creature would die this turn, exile that creature instead")); diff --git a/Mage.Sets/src/mage/cards/s/SavageSummoning.java b/Mage.Sets/src/mage/cards/s/SavageSummoning.java index f20f939cf8..8c4d07ebba 100644 --- a/Mage.Sets/src/mage/cards/s/SavageSummoning.java +++ b/Mage.Sets/src/mage/cards/s/SavageSummoning.java @@ -125,22 +125,6 @@ class SavageSummoningWatcher extends Watcher { super(WatcherScope.PLAYER); } - public SavageSummoningWatcher(final SavageSummoningWatcher watcher) { - super(watcher); - this.savageSummoningSpells.addAll(watcher.savageSummoningSpells); - for (Entry> entry : watcher.spellsCastWithSavageSummoning.entrySet()) { - this.spellsCastWithSavageSummoning.put(entry.getKey(), entry.getValue()); - } - for (Entry> entry : watcher.cardsCastWithSavageSummoning.entrySet()) { - this.cardsCastWithSavageSummoning.put(entry.getKey(), entry.getValue()); - } - } - - @Override - public SavageSummoningWatcher copy() { - return new SavageSummoningWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { diff --git a/Mage.Sets/src/mage/cards/s/ScoutsWarning.java b/Mage.Sets/src/mage/cards/s/ScoutsWarning.java index 0310f8d1f5..4797b0fffb 100644 --- a/Mage.Sets/src/mage/cards/s/ScoutsWarning.java +++ b/Mage.Sets/src/mage/cards/s/ScoutsWarning.java @@ -104,15 +104,6 @@ class ScoutsWarningWatcher extends Watcher { super(WatcherScope.PLAYER); } - public ScoutsWarningWatcher(final ScoutsWarningWatcher watcher) { - super(watcher); - } - - @Override - public ScoutsWarningWatcher copy() { - return new ScoutsWarningWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { diff --git a/Mage.Sets/src/mage/cards/s/SeaTroll.java b/Mage.Sets/src/mage/cards/s/SeaTroll.java index 2db49072d5..fecb5898b0 100644 --- a/Mage.Sets/src/mage/cards/s/SeaTroll.java +++ b/Mage.Sets/src/mage/cards/s/SeaTroll.java @@ -62,11 +62,6 @@ class SeaTrollWatcher extends Watcher { blockedOrBlockedByBlueThisTurnCreatures = new HashSet<>(); } - public SeaTrollWatcher(SeaTrollWatcher watcher) { - super(watcher); - this.blockedOrBlockedByBlueThisTurnCreatures = new HashSet<>(watcher.blockedOrBlockedByBlueThisTurnCreatures); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { @@ -90,11 +85,6 @@ class SeaTrollWatcher extends Watcher { public boolean blockedOrBlockedByBlueCreatureThisTurn(MageObjectReference creature){ return blockedOrBlockedByBlueThisTurnCreatures.contains(creature); } - - @Override - public SeaTrollWatcher copy() { - return new SeaTrollWatcher(this); - } } class SeaTrollCondition implements Condition { diff --git a/Mage.Sets/src/mage/cards/s/SeasonOfTheWitch.java b/Mage.Sets/src/mage/cards/s/SeasonOfTheWitch.java index f50857d9f2..35ec167b15 100644 --- a/Mage.Sets/src/mage/cards/s/SeasonOfTheWitch.java +++ b/Mage.Sets/src/mage/cards/s/SeasonOfTheWitch.java @@ -115,11 +115,6 @@ class CouldAttackThisTurnWatcher extends Watcher { super(WatcherScope.GAME); } - public CouldAttackThisTurnWatcher(final CouldAttackThisTurnWatcher watcher) { - super(watcher); - this.couldAttackThisTurnCreatures.addAll(watcher.couldAttackThisTurnCreatures); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DECLARE_ATTACKERS_STEP_PRE) { @@ -151,11 +146,6 @@ class CouldAttackThisTurnWatcher extends Watcher { return this.couldAttackThisTurnCreatures; } - @Override - public CouldAttackThisTurnWatcher copy() { - return new CouldAttackThisTurnWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/s/SecondSunrise.java b/Mage.Sets/src/mage/cards/s/SecondSunrise.java index 80eab7a411..3d173af885 100644 --- a/Mage.Sets/src/mage/cards/s/SecondSunrise.java +++ b/Mage.Sets/src/mage/cards/s/SecondSunrise.java @@ -85,11 +85,6 @@ class SecondSunriseWatcher extends Watcher { super(WatcherScope.GAME); } - public SecondSunriseWatcher(final SecondSunriseWatcher watcher) { - super(watcher); - this.cards.addAll(watcher.cards); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) { @@ -97,11 +92,6 @@ class SecondSunriseWatcher extends Watcher { } } - @Override - public SecondSunriseWatcher copy() { - return new SecondSunriseWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/s/SentinelTower.java b/Mage.Sets/src/mage/cards/s/SentinelTower.java index 7b0f0667b1..bc33d74c3b 100644 --- a/Mage.Sets/src/mage/cards/s/SentinelTower.java +++ b/Mage.Sets/src/mage/cards/s/SentinelTower.java @@ -105,16 +105,6 @@ class SentinelTowerWatcher extends Watcher { this.spellsThisTurn = new ArrayList<>(); } - SentinelTowerWatcher(final SentinelTowerWatcher effect) { - super(effect); - this.spellsThisTurn = effect.spellsThisTurn; - } - - @Override - public SentinelTowerWatcher copy() { - return new SentinelTowerWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { diff --git a/Mage.Sets/src/mage/cards/s/SerpentineSpike.java b/Mage.Sets/src/mage/cards/s/SerpentineSpike.java index 4a88f807b4..1f60475aee 100644 --- a/Mage.Sets/src/mage/cards/s/SerpentineSpike.java +++ b/Mage.Sets/src/mage/cards/s/SerpentineSpike.java @@ -53,7 +53,7 @@ public final class SerpentineSpike extends CardImpl { Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); effect.setText("If a creature dealt damage this way would die this turn, exile it instead"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public SerpentineSpike(final SerpentineSpike card) { diff --git a/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java b/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java index 1d2774317e..ee651c858a 100644 --- a/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java +++ b/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java @@ -98,14 +98,6 @@ class AttackedOrBlockedSinceYourLastUpkeepWatcher extends Watcher{ super(WatcherScope.GAME); } - public AttackedOrBlockedSinceYourLastUpkeepWatcher(AttackedOrBlockedSinceYourLastUpkeepWatcher watcher) { - super(watcher); - for (Map.Entry> entry : watcher.attackedOrBlockedCreatures.entrySet()) { - Set allAttackersCopy = new HashSet<>(entry.getValue()); - attackedOrBlockedCreatures.put(entry.getKey(), allAttackersCopy); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.UPKEEP_STEP_POST){ @@ -125,9 +117,4 @@ class AttackedOrBlockedSinceYourLastUpkeepWatcher extends Watcher{ public boolean attackedSinceLastUpkeep(MageObjectReference mor, UUID upkeepPlayer){ return attackedOrBlockedCreatures.get(upkeepPlayer).contains(mor); } - - @Override - public AttackedOrBlockedSinceYourLastUpkeepWatcher copy() { - return new AttackedOrBlockedSinceYourLastUpkeepWatcher(this); - } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/ShipbreakerKraken.java b/Mage.Sets/src/mage/cards/s/ShipbreakerKraken.java index 8fa2848498..2d20ff90ff 100644 --- a/Mage.Sets/src/mage/cards/s/ShipbreakerKraken.java +++ b/Mage.Sets/src/mage/cards/s/ShipbreakerKraken.java @@ -124,10 +124,6 @@ class ShipbreakerKrakenWatcher extends Watcher { super(WatcherScope.CARD); } - ShipbreakerKrakenWatcher(ShipbreakerKrakenWatcher watcher) { - super(watcher); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.LOST_CONTROL && event.getPlayerId().equals(controllerId) && event.getTargetId().equals(sourceId)) { @@ -148,9 +144,4 @@ class ShipbreakerKrakenWatcher extends Watcher { public void reset() { //don't reset condition each turn - only when this leaves the battlefield } - - @Override - public ShipbreakerKrakenWatcher copy() { - return new ShipbreakerKrakenWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/s/SiftThroughSands.java b/Mage.Sets/src/mage/cards/s/SiftThroughSands.java index 496d32332f..72fcbdae29 100644 --- a/Mage.Sets/src/mage/cards/s/SiftThroughSands.java +++ b/Mage.Sets/src/mage/cards/s/SiftThroughSands.java @@ -83,20 +83,9 @@ class SiftThroughSandsWatcher extends Watcher { super(WatcherScope.PLAYER); } - public SiftThroughSandsWatcher(final SiftThroughSandsWatcher watcher) { - super(watcher); - this.castPeerThroughDepths = watcher.castPeerThroughDepths; - this.castReachThroughMists = watcher.castReachThroughMists; - } - - @Override - public SiftThroughSandsWatcher copy() { - return new SiftThroughSandsWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { - if (condition == true) { //no need to check - condition has already occured + if (condition) { //no need to check - condition has already occured return; } if (event.getType() == EventType.SPELL_CAST diff --git a/Mage.Sets/src/mage/cards/s/Skeletonize.java b/Mage.Sets/src/mage/cards/s/Skeletonize.java index d00c5ef374..edf74e5841 100644 --- a/Mage.Sets/src/mage/cards/s/Skeletonize.java +++ b/Mage.Sets/src/mage/cards/s/Skeletonize.java @@ -34,7 +34,7 @@ public final class Skeletonize extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // When a creature dealt damage this way dies this turn, create a 1/1 black Skeleton creature token with "{B}: Regenerate this creature." this.getSpellAbility().addEffect(new SkeletonizeEffect()); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public Skeletonize(final Skeletonize card) { diff --git a/Mage.Sets/src/mage/cards/s/SoulReap.java b/Mage.Sets/src/mage/cards/s/SoulReap.java index d0b9a7d1df..ba1fb190a2 100644 --- a/Mage.Sets/src/mage/cards/s/SoulReap.java +++ b/Mage.Sets/src/mage/cards/s/SoulReap.java @@ -88,16 +88,6 @@ class SoulReapWatcher extends Watcher { this.cardId = cardId; } - public SoulReapWatcher(final SoulReapWatcher watcher) { - super(watcher); - this.cardId = watcher.cardId; - } - - @Override - public SoulReapWatcher copy() { - return new SoulReapWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (condition == true) { //no need to check - condition has already occured diff --git a/Mage.Sets/src/mage/cards/s/SpinerockKnoll.java b/Mage.Sets/src/mage/cards/s/SpinerockKnoll.java index b4f870c9e9..2a9ea0a9dd 100644 --- a/Mage.Sets/src/mage/cards/s/SpinerockKnoll.java +++ b/Mage.Sets/src/mage/cards/s/SpinerockKnoll.java @@ -94,13 +94,6 @@ class SpinerockKnollWatcher extends Watcher { super(WatcherScope.CARD); } - SpinerockKnollWatcher(final SpinerockKnollWatcher watcher) { - super(watcher); - for (Entry entry : watcher.amountOfDamageReceivedThisTurn.entrySet()) { - amountOfDamageReceivedThisTurn.put(entry.getKey(), entry.getValue()); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DAMAGED_PLAYER) { @@ -121,9 +114,4 @@ class SpinerockKnollWatcher extends Watcher { public void reset() { amountOfDamageReceivedThisTurn.clear(); } - - @Override - public SpinerockKnollWatcher copy() { - return new SpinerockKnollWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/s/SpinyStarfish.java b/Mage.Sets/src/mage/cards/s/SpinyStarfish.java index e5c93b3751..8c577809ac 100644 --- a/Mage.Sets/src/mage/cards/s/SpinyStarfish.java +++ b/Mage.Sets/src/mage/cards/s/SpinyStarfish.java @@ -1,8 +1,5 @@ package mage.cards.s; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; @@ -16,16 +13,16 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.TargetController; -import mage.constants.WatcherScope; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.token.StarfishToken; import mage.watchers.Watcher; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + /** * @author spike */ @@ -36,10 +33,10 @@ public final class SpinyStarfish extends CardImpl { this.subtype.add(SubType.STARFISH); this.power = new MageInt(0); this.toughness = new MageInt(1); - + // {U}: Regenerate Spiny Starfish. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{U}"))); - + // At the beginning of each end step, if Spiny Starfish regenerated this turn, create a 0/1 blue Starfish creature token for each time it regenerated this turn. this.addAbility( new ConditionalInterveningIfTriggeredAbility( @@ -48,7 +45,7 @@ public final class SpinyStarfish extends CardImpl { new StarfishToken(), new SpinyStarfishDynamicValue()), TargetController.ANY, - false), + false), SpinyStarfishCondition.instance, "At the beginning of each end step, if {this} regenerated this turn, create a 0/1 blue Starfish creature token for each time it regenerated this turn."), new SpinyStarfishWatcher()); @@ -91,11 +88,6 @@ class SpinyStarfishWatcher extends Watcher { super(WatcherScope.GAME); } - public SpinyStarfishWatcher(final SpinyStarfishWatcher watcher) { - super(watcher); - this.regeneratedCount.putAll(watcher.regeneratedCount); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.REGENERATED) { @@ -115,17 +107,9 @@ class SpinyStarfishWatcher extends Watcher { } public int regeneratedCount(UUID sourceId) { - Integer count = regeneratedCount.get(sourceId); - if (count == null) { - return 0; - } - return count; + return regeneratedCount.getOrDefault(sourceId, 0); } - @Override - public SpinyStarfishWatcher copy() { - return new SpinyStarfishWatcher(this); - } } class SpinyStarfishDynamicValue implements DynamicValue { diff --git a/Mage.Sets/src/mage/cards/s/SpiritOfTheLabyrinth.java b/Mage.Sets/src/mage/cards/s/SpiritOfTheLabyrinth.java index 9742ff206e..e2b1572387 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritOfTheLabyrinth.java +++ b/Mage.Sets/src/mage/cards/s/SpiritOfTheLabyrinth.java @@ -54,17 +54,6 @@ class SpiritOfTheLabyrinthWatcher extends Watcher { this.playersThatDrewCard = new HashSet<>(); } - public SpiritOfTheLabyrinthWatcher(final SpiritOfTheLabyrinthWatcher watcher) { - super(watcher); - this.playersThatDrewCard = new HashSet<>(); - playersThatDrewCard.addAll(watcher.playersThatDrewCard); - } - - @Override - public SpiritOfTheLabyrinthWatcher copy() { - return new SpiritOfTheLabyrinthWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DREW_CARD ) { diff --git a/Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java b/Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java index 065afc0eaf..ba8ba86f38 100644 --- a/Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java +++ b/Mage.Sets/src/mage/cards/s/SpoilsOfBlood.java @@ -87,15 +87,6 @@ class CreaturesDiedThisTurnWatcher extends Watcher { super(WatcherScope.GAME); } - public CreaturesDiedThisTurnWatcher(final CreaturesDiedThisTurnWatcher watcher) { - super(watcher); - } - - @Override - public CreaturesDiedThisTurnWatcher copy() { - return new CreaturesDiedThisTurnWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) { diff --git a/Mage.Sets/src/mage/cards/s/SteelHellkite.java b/Mage.Sets/src/mage/cards/s/SteelHellkite.java index b114bfb4d6..52b4356493 100644 --- a/Mage.Sets/src/mage/cards/s/SteelHellkite.java +++ b/Mage.Sets/src/mage/cards/s/SteelHellkite.java @@ -107,11 +107,6 @@ class SteelHellkiteWatcher extends Watcher { super(WatcherScope.GAME); } - public SteelHellkiteWatcher(final SteelHellkiteWatcher watcher) { - super(watcher); - this.damageMap.putAll(watcher.damageMap); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER @@ -127,11 +122,6 @@ class SteelHellkiteWatcher extends Watcher { this.damageMap.clear(); } - @Override - public Watcher copy() { - return new SteelHellkiteWatcher(this); - } - public Set getDamagedPlayers(UUID damagerId) { return damageMap.getOrDefault(damagerId, new HashSet<>()); } diff --git a/Mage.Sets/src/mage/cards/s/StorrevDevkarinLich.java b/Mage.Sets/src/mage/cards/s/StorrevDevkarinLich.java index 1190dcee43..37f697ef68 100644 --- a/Mage.Sets/src/mage/cards/s/StorrevDevkarinLich.java +++ b/Mage.Sets/src/mage/cards/s/StorrevDevkarinLich.java @@ -93,11 +93,6 @@ class StorrevDevkarinLichWatcher extends Watcher { super(WatcherScope.GAME); } - private StorrevDevkarinLichWatcher(final StorrevDevkarinLichWatcher watcher) { - super(watcher); - this.cards.addAll(watcher.cards); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BEGIN_COMBAT_STEP_PRE) { @@ -112,10 +107,6 @@ class StorrevDevkarinLichWatcher extends Watcher { } } - @Override - public StorrevDevkarinLichWatcher copy() { - return new StorrevDevkarinLichWatcher(this); - } boolean wasPutInAGraveyardThisCombat(UUID cardId, Game game) { for (MageObjectReference mor : cards) { diff --git a/Mage.Sets/src/mage/cards/s/SummoningTrap.java b/Mage.Sets/src/mage/cards/s/SummoningTrap.java index f7d55ddde2..26b70f88fd 100644 --- a/Mage.Sets/src/mage/cards/s/SummoningTrap.java +++ b/Mage.Sets/src/mage/cards/s/SummoningTrap.java @@ -73,16 +73,6 @@ class SummoningTrapWatcher extends Watcher { super(WatcherScope.GAME); } - public SummoningTrapWatcher(final SummoningTrapWatcher watcher) { - super(watcher); - this.players.addAll(watcher.players); - } - - @Override - public SummoningTrapWatcher copy() { - return new SummoningTrapWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.COUNTERED) { diff --git a/Mage.Sets/src/mage/cards/s/SylvanLibrary.java b/Mage.Sets/src/mage/cards/s/SylvanLibrary.java index 259f1d9622..f18b270789 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanLibrary.java +++ b/Mage.Sets/src/mage/cards/s/SylvanLibrary.java @@ -122,11 +122,6 @@ class SylvanLibraryCardsDrawnThisTurnWatcher extends Watcher { super(WatcherScope.GAME); } - public SylvanLibraryCardsDrawnThisTurnWatcher(final SylvanLibraryCardsDrawnThisTurnWatcher watcher) { - super(watcher); - this.cardsDrawnThisTurn.putAll(watcher.cardsDrawnThisTurn); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DREW_CARD) { @@ -146,11 +141,6 @@ class SylvanLibraryCardsDrawnThisTurnWatcher extends Watcher { super.reset(); cardsDrawnThisTurn.clear(); } - - @Override - public SylvanLibraryCardsDrawnThisTurnWatcher copy() { - return new SylvanLibraryCardsDrawnThisTurnWatcher(this); - } } class CardIdPredicate implements Predicate { diff --git a/Mage.Sets/src/mage/cards/t/TalarasBattalion.java b/Mage.Sets/src/mage/cards/t/TalarasBattalion.java index cba7bb5c0f..105b37f6e3 100644 --- a/Mage.Sets/src/mage/cards/t/TalarasBattalion.java +++ b/Mage.Sets/src/mage/cards/t/TalarasBattalion.java @@ -116,16 +116,6 @@ class TalarasBattalionWatcher extends Watcher { this.cardId = cardId; } - public TalarasBattalionWatcher(final TalarasBattalionWatcher watcher) { - super(watcher); - this.cardId = watcher.cardId; - } - - @Override - public TalarasBattalionWatcher copy() { - return new TalarasBattalionWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (condition == true) { //no need to check - condition has already occured diff --git a/Mage.Sets/src/mage/cards/t/TapestryOfTheAges.java b/Mage.Sets/src/mage/cards/t/TapestryOfTheAges.java index f73f6f4151..9bd1cbbc3c 100644 --- a/Mage.Sets/src/mage/cards/t/TapestryOfTheAges.java +++ b/Mage.Sets/src/mage/cards/t/TapestryOfTheAges.java @@ -74,11 +74,6 @@ class PlayerCastNonCreatureSpellWatcher extends Watcher { super(WatcherScope.GAME); } - public PlayerCastNonCreatureSpellWatcher(final PlayerCastNonCreatureSpellWatcher watcher) { - super(watcher); - this.playerIds.addAll(watcher.playerIds); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { @@ -89,11 +84,6 @@ class PlayerCastNonCreatureSpellWatcher extends Watcher { } } - @Override - public PlayerCastNonCreatureSpellWatcher copy() { - return new PlayerCastNonCreatureSpellWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/t/TerritorialHellkite.java b/Mage.Sets/src/mage/cards/t/TerritorialHellkite.java index 6dfeef8232..216087e911 100644 --- a/Mage.Sets/src/mage/cards/t/TerritorialHellkite.java +++ b/Mage.Sets/src/mage/cards/t/TerritorialHellkite.java @@ -67,21 +67,12 @@ public final class TerritorialHellkite extends CardImpl { class AttackedLastCombatWatcher extends Watcher { // Map> - public final Map> attackedLastCombatPlayers = new HashMap<>(); + private final Map> attackedLastCombatPlayers = new HashMap<>(); public AttackedLastCombatWatcher() { super(WatcherScope.GAME); } - public AttackedLastCombatWatcher(final AttackedLastCombatWatcher watcher) { - super(watcher); - for (Entry> entry : watcher.attackedLastCombatPlayers.entrySet()) { - Map allAttackersCopy = new HashMap<>(); - allAttackersCopy.putAll(entry.getValue()); - attackedLastCombatPlayers.put(entry.getKey(), allAttackersCopy); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DECLARE_ATTACKERS_STEP_PRE) { @@ -104,12 +95,6 @@ class AttackedLastCombatWatcher extends Watcher { public Map getAttackedLastCombatPlayers(UUID combatPlayerId) { return attackedLastCombatPlayers.get(combatPlayerId); } - - @Override - public AttackedLastCombatWatcher copy() { - return new AttackedLastCombatWatcher(this); - } - } class AttackIfAbleTargetRandoOpponentSourceEffect extends OneShotEffect { diff --git a/Mage.Sets/src/mage/cards/t/TheChainVeil.java b/Mage.Sets/src/mage/cards/t/TheChainVeil.java index 972b89e991..a7b8d24235 100644 --- a/Mage.Sets/src/mage/cards/t/TheChainVeil.java +++ b/Mage.Sets/src/mage/cards/t/TheChainVeil.java @@ -63,11 +63,6 @@ class ActivatedLoyaltyAbilityWatcher extends Watcher { super(WatcherScope.GAME); } - public ActivatedLoyaltyAbilityWatcher(final ActivatedLoyaltyAbilityWatcher watcher) { - super(watcher); - playerIds.addAll(watcher.playerIds); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ACTIVATED_ABILITY) { @@ -85,11 +80,6 @@ class ActivatedLoyaltyAbilityWatcher extends Watcher { playerIds.clear(); } - @Override - public ActivatedLoyaltyAbilityWatcher copy() { - return new ActivatedLoyaltyAbilityWatcher(this); - } - public boolean activatedLoyaltyAbility(UUID playerId) { return playerIds.contains(playerId); } diff --git a/Mage.Sets/src/mage/cards/t/TheFallen.java b/Mage.Sets/src/mage/cards/t/TheFallen.java index 1696dd0d6d..38e010e466 100644 --- a/Mage.Sets/src/mage/cards/t/TheFallen.java +++ b/Mage.Sets/src/mage/cards/t/TheFallen.java @@ -83,11 +83,6 @@ class TheFallenWatcher extends Watcher { super(WatcherScope.GAME); } - public TheFallenWatcher(final TheFallenWatcher watcher) { - super(watcher); - playersAndWalkersDealtDamageThisGame = new HashMap<>(watcher.playersAndWalkersDealtDamageThisGame); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER @@ -109,9 +104,4 @@ class TheFallenWatcher extends Watcher { public Set getPlayersAndWalkersDealtDamageThisGame(UUID creatureId) { return playersAndWalkersDealtDamageThisGame.get(creatureId); } - - @Override - public TheFallenWatcher copy() { - return new TheFallenWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/t/ThirstingAxe.java b/Mage.Sets/src/mage/cards/t/ThirstingAxe.java index 7462f5396c..d00bb9320e 100644 --- a/Mage.Sets/src/mage/cards/t/ThirstingAxe.java +++ b/Mage.Sets/src/mage/cards/t/ThirstingAxe.java @@ -91,16 +91,6 @@ class CombatDamageToCreatureWatcher extends Watcher { dealtCombatDamageToCreature = new HashSet<>(); } - public CombatDamageToCreatureWatcher(final CombatDamageToCreatureWatcher watcher) { - super(watcher); - dealtCombatDamageToCreature = new HashSet<>(watcher.dealtCombatDamageToCreature); - } - - @Override - public CombatDamageToCreatureWatcher copy() { - return new CombatDamageToCreatureWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE) { diff --git a/Mage.Sets/src/mage/cards/t/ThousandYearStorm.java b/Mage.Sets/src/mage/cards/t/ThousandYearStorm.java index 77f82d9ddd..1e23deb503 100644 --- a/Mage.Sets/src/mage/cards/t/ThousandYearStorm.java +++ b/Mage.Sets/src/mage/cards/t/ThousandYearStorm.java @@ -91,13 +91,6 @@ class ThousandYearWatcher extends Watcher { super(WatcherScope.GAME); } - public ThousandYearWatcher(final ThousandYearWatcher watcher) { - super(watcher); - for (Entry entry : watcher.amountOfInstantSorcerySpellsCastOnCurrentTurn.entrySet()) { - amountOfInstantSorcerySpellsCastOnCurrentTurn.put(entry.getKey(), entry.getValue()); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST && !sourceId.equals(event.getTargetId())) { @@ -124,10 +117,4 @@ class ThousandYearWatcher extends Watcher { public int getAmountOfSpellsPlayerCastOnCurrentTurn(UUID playerId) { return amountOfInstantSorcerySpellsCastOnCurrentTurn.getOrDefault(playerId, 0); } - - @Override - public ThousandYearWatcher copy() { - return new ThousandYearWatcher(this); - } - } diff --git a/Mage.Sets/src/mage/cards/t/TidebinderMage.java b/Mage.Sets/src/mage/cards/t/TidebinderMage.java index c4f3efa11b..b7bf7262d8 100644 --- a/Mage.Sets/src/mage/cards/t/TidebinderMage.java +++ b/Mage.Sets/src/mage/cards/t/TidebinderMage.java @@ -133,10 +133,6 @@ class TidebinderMageWatcher extends Watcher { super(WatcherScope.CARD); } - TidebinderMageWatcher(TidebinderMageWatcher watcher) { - super(watcher); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.LOST_CONTROL && event.getPlayerId().equals(controllerId) && event.getTargetId().equals(sourceId)) { @@ -157,9 +153,4 @@ class TidebinderMageWatcher extends Watcher { public void reset() { //don't reset condition each turn - only when this leaves the battlefield } - - @Override - public TidebinderMageWatcher copy() { - return new TidebinderMageWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/t/TimeOfIce.java b/Mage.Sets/src/mage/cards/t/TimeOfIce.java index 580d0b9c17..8307685b69 100644 --- a/Mage.Sets/src/mage/cards/t/TimeOfIce.java +++ b/Mage.Sets/src/mage/cards/t/TimeOfIce.java @@ -144,10 +144,6 @@ class TimeOfIceWatcher extends Watcher { super(WatcherScope.CARD); } - TimeOfIceWatcher(TimeOfIceWatcher watcher) { - super(watcher); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.LOST_CONTROL && event.getPlayerId().equals(controllerId) && event.getTargetId().equals(sourceId)) { @@ -168,9 +164,4 @@ class TimeOfIceWatcher extends Watcher { public void reset() { //don't reset condition each turn - only when this leaves the battlefield } - - @Override - public TimeOfIceWatcher copy() { - return new TimeOfIceWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/t/TimeToReflect.java b/Mage.Sets/src/mage/cards/t/TimeToReflect.java index 8dfd1c7131..ab4fa8e02d 100644 --- a/Mage.Sets/src/mage/cards/t/TimeToReflect.java +++ b/Mage.Sets/src/mage/cards/t/TimeToReflect.java @@ -76,16 +76,6 @@ class BlockedOrWasBlockedByAZombieWatcher extends Watcher { blockedOrWasBlockedByAZombieWatcher = new HashSet<>(); } - public BlockedOrWasBlockedByAZombieWatcher(final BlockedOrWasBlockedByAZombieWatcher watcher) { - super(watcher); - blockedOrWasBlockedByAZombieWatcher = new HashSet<>(watcher.blockedOrWasBlockedByAZombieWatcher); - } - - @Override - public BlockedOrWasBlockedByAZombieWatcher copy() { - return new BlockedOrWasBlockedByAZombieWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { diff --git a/Mage.Sets/src/mage/cards/t/TouchOfTheVoid.java b/Mage.Sets/src/mage/cards/t/TouchOfTheVoid.java index d09585e40b..f59386bd04 100644 --- a/Mage.Sets/src/mage/cards/t/TouchOfTheVoid.java +++ b/Mage.Sets/src/mage/cards/t/TouchOfTheVoid.java @@ -31,7 +31,7 @@ public final class TouchOfTheVoid extends CardImpl { Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); effect.setText("If a creature dealt damage this way would die this turn, exile it instead"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public TouchOfTheVoid(final TouchOfTheVoid card) { diff --git a/Mage.Sets/src/mage/cards/t/TritonTactics.java b/Mage.Sets/src/mage/cards/t/TritonTactics.java index f5f5a68fb8..16fc8601f6 100644 --- a/Mage.Sets/src/mage/cards/t/TritonTactics.java +++ b/Mage.Sets/src/mage/cards/t/TritonTactics.java @@ -188,10 +188,6 @@ class BlockedCreaturesWatcher extends Watcher { super(WatcherScope.CARD); } - public BlockedCreaturesWatcher(final BlockedCreaturesWatcher watcher) { - super(watcher); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { @@ -226,9 +222,4 @@ class BlockedCreaturesWatcher extends Watcher { attackers.add(CardUtil.getCardZoneString(null, attackerId, game)); game.getState().setValue("blockedAttackers" + getSourceId().toString(), attackerMap); } - - @Override - public BlockedCreaturesWatcher copy() { - return new BlockedCreaturesWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/t/TunnelIgnus.java b/Mage.Sets/src/mage/cards/t/TunnelIgnus.java index 7de16b3c3e..696611db50 100644 --- a/Mage.Sets/src/mage/cards/t/TunnelIgnus.java +++ b/Mage.Sets/src/mage/cards/t/TunnelIgnus.java @@ -56,18 +56,6 @@ class TunnelIgnusWatcher extends Watcher { super(WatcherScope.PLAYER); } - public TunnelIgnusWatcher(final TunnelIgnusWatcher watcher) { - super(watcher); - for (Entry entry : watcher.counts.entrySet()) { - counts.put(entry.getKey(), entry.getValue()); - } - } - - @Override - public TunnelIgnusWatcher copy() { - return new TunnelIgnusWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) { diff --git a/Mage.Sets/src/mage/cards/t/TuvasaTheSunlit.java b/Mage.Sets/src/mage/cards/t/TuvasaTheSunlit.java index 3cda3fa397..f0e8b6b702 100644 --- a/Mage.Sets/src/mage/cards/t/TuvasaTheSunlit.java +++ b/Mage.Sets/src/mage/cards/t/TuvasaTheSunlit.java @@ -122,11 +122,6 @@ class TuvasaTheSunlitWatcher extends Watcher { super( WatcherScope.GAME); } - public TuvasaTheSunlitWatcher(final TuvasaTheSunlitWatcher watcher) { - super(watcher); - this.firstEnchantmentThisTurn.putAll(watcher.firstEnchantmentThisTurn); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SPELL_CAST) { @@ -148,9 +143,4 @@ class TuvasaTheSunlitWatcher extends Watcher { public UUID getFirstEnchantmentThisTurn(UUID playerId) { return firstEnchantmentThisTurn.get(playerId); } - - @Override - public Watcher copy() { - return new TuvasaTheSunlitWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/t/TymnaTheWeaver.java b/Mage.Sets/src/mage/cards/t/TymnaTheWeaver.java index 648aa4891d..9dd2b4b8d4 100644 --- a/Mage.Sets/src/mage/cards/t/TymnaTheWeaver.java +++ b/Mage.Sets/src/mage/cards/t/TymnaTheWeaver.java @@ -100,20 +100,6 @@ class TymnaTheWeaverWatcher extends Watcher { super(WatcherScope.GAME); } - public TymnaTheWeaverWatcher(final TymnaTheWeaverWatcher watcher) { - super(watcher); - for (UUID playerId : watcher.players.keySet()) { - Set opponents = new HashSet<>(); - opponents.addAll(watcher.players.get(playerId)); - players.put(playerId, opponents); - } - } - - @Override - public TymnaTheWeaverWatcher copy() { - return new TymnaTheWeaverWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DAMAGED_PLAYER) { diff --git a/Mage.Sets/src/mage/cards/u/UbaMask.java b/Mage.Sets/src/mage/cards/u/UbaMask.java index 9f56aea2ef..5e2597bf0d 100644 --- a/Mage.Sets/src/mage/cards/u/UbaMask.java +++ b/Mage.Sets/src/mage/cards/u/UbaMask.java @@ -135,16 +135,6 @@ class UbaMaskExiledCardsWatcher extends Watcher { super(WatcherScope.GAME); } - public UbaMaskExiledCardsWatcher(final UbaMaskExiledCardsWatcher watcher) { - super(watcher); - exiledCards.putAll(watcher.exiledCards); - } - - @Override - public UbaMaskExiledCardsWatcher copy() { - return new UbaMaskExiledCardsWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { // no events to watch diff --git a/Mage.Sets/src/mage/cards/u/UphillBattle.java b/Mage.Sets/src/mage/cards/u/UphillBattle.java index de4f6e2521..c17232c30f 100644 --- a/Mage.Sets/src/mage/cards/u/UphillBattle.java +++ b/Mage.Sets/src/mage/cards/u/UphillBattle.java @@ -53,17 +53,6 @@ class PlayCreatureLandWatcher extends Watcher { super(WatcherScope.GAME); } - public PlayCreatureLandWatcher(final PlayCreatureLandWatcher watcher) { - super(watcher); - playerPlayedLand.addAll(watcher.playerPlayedLand); - landPlayed.addAll(watcher.landPlayed); - } - - @Override - public PlayCreatureLandWatcher copy() { - return new PlayCreatureLandWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.PLAY_LAND) { diff --git a/Mage.Sets/src/mage/cards/u/UrzasMiter.java b/Mage.Sets/src/mage/cards/u/UrzasMiter.java index 9294d12231..ff4a772bee 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasMiter.java +++ b/Mage.Sets/src/mage/cards/u/UrzasMiter.java @@ -78,11 +78,6 @@ class UrzasMiterWatcher extends Watcher { this.cards = new ArrayList<>(); } - public UrzasMiterWatcher(final UrzasMiterWatcher watcher) { - super(watcher); - this.cards = new ArrayList<>(); - this.cards.addAll(watcher.cards); - } @Override public void watch(GameEvent event, Game game) { @@ -91,11 +86,6 @@ class UrzasMiterWatcher extends Watcher { } } - @Override - public UrzasMiterWatcher copy() { - return new UrzasMiterWatcher(this); - } - @Override public void reset() { super.reset(); diff --git a/Mage.Sets/src/mage/cards/v/VeneratedLoxodon.java b/Mage.Sets/src/mage/cards/v/VeneratedLoxodon.java index b1696346d9..fe6e849c35 100644 --- a/Mage.Sets/src/mage/cards/v/VeneratedLoxodon.java +++ b/Mage.Sets/src/mage/cards/v/VeneratedLoxodon.java @@ -100,15 +100,6 @@ class VeneratedLoxodonWatcher extends Watcher { super(WatcherScope.GAME); } - public VeneratedLoxodonWatcher(final VeneratedLoxodonWatcher watcher) { - super(watcher); - for (Entry> entry : watcher.convokingCreatures.entrySet()) { - Set creatures = new HashSet<>(); - creatures.addAll(entry.getValue()); - convokingCreatures.put(entry.getKey(), creatures); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.CONVOKED) { @@ -138,8 +129,4 @@ class VeneratedLoxodonWatcher extends Watcher { convokingCreatures.clear(); } - @Override - public VeneratedLoxodonWatcher copy() { - return new VeneratedLoxodonWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/v/Vengevine.java b/Mage.Sets/src/mage/cards/v/Vengevine.java index 925fe3fc64..5b52c37b3f 100644 --- a/Mage.Sets/src/mage/cards/v/Vengevine.java +++ b/Mage.Sets/src/mage/cards/v/Vengevine.java @@ -94,16 +94,6 @@ class VengevineWatcher extends Watcher { super(WatcherScope.PLAYER); } - public VengevineWatcher(final VengevineWatcher watcher) { - super(watcher); - this.creatureSpellCount = watcher.creatureSpellCount; - } - - @Override - public VengevineWatcher copy() { - return new VengevineWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { condition = false; diff --git a/Mage.Sets/src/mage/cards/v/VileRedeemer.java b/Mage.Sets/src/mage/cards/v/VileRedeemer.java index c766a49f45..e4fc6d5fb1 100644 --- a/Mage.Sets/src/mage/cards/v/VileRedeemer.java +++ b/Mage.Sets/src/mage/cards/v/VileRedeemer.java @@ -100,10 +100,6 @@ class VileRedeemerNonTokenCreaturesDiedWatcher extends Watcher { super(WatcherScope.GAME); } - public VileRedeemerNonTokenCreaturesDiedWatcher(final VileRedeemerNonTokenCreaturesDiedWatcher watcher) { - super(watcher); - this.amountOfCreaturesThatDied.putAll(watcher.amountOfCreaturesThatDied); - } @Override public void watch(GameEvent event, Game game) { @@ -127,10 +123,4 @@ class VileRedeemerNonTokenCreaturesDiedWatcher extends Watcher { public int getAmountOfNontokenCreatureDiedThisTurn(UUID playerId) { return amountOfCreaturesThatDied.getOrDefault(playerId, 0); } - - @Override - public VileRedeemerNonTokenCreaturesDiedWatcher copy() { - return new VileRedeemerNonTokenCreaturesDiedWatcher(this); - } - } diff --git a/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java b/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java index 27efbbf652..ba8cc9edb2 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java @@ -101,16 +101,6 @@ class EmbalmedThisTurnWatcher extends Watcher { embalmedThisTurnTokens = new HashSet<>(); } - public EmbalmedThisTurnWatcher(final EmbalmedThisTurnWatcher watcher) { - super(watcher); - embalmedThisTurnTokens = new HashSet<>(watcher.embalmedThisTurnTokens); - } - - @Override - public Watcher copy() { - return new EmbalmedThisTurnWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.EMBALMED_CREATURE) { diff --git a/Mage.Sets/src/mage/cards/v/VodalianWarMachine.java b/Mage.Sets/src/mage/cards/v/VodalianWarMachine.java index 8c925e69cc..4a319095d8 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianWarMachine.java +++ b/Mage.Sets/src/mage/cards/v/VodalianWarMachine.java @@ -160,25 +160,12 @@ class VodalianWarMachineEffect extends OneShotEffect { class VodalianWarMachineWatcher extends Watcher { - public Map> tappedMerfolkIds = new HashMap<>(); + private Map> tappedMerfolkIds = new HashMap<>(); public VodalianWarMachineWatcher() { super(WatcherScope.GAME); } - public VodalianWarMachineWatcher(final VodalianWarMachineWatcher watcher) { - super(watcher); - // We have for sure to use copied collections, but there is no need to copy the MageObjectReference objects. - for (Entry> entry : watcher.tappedMerfolkIds.entrySet()) { - this.tappedMerfolkIds.put(entry.getKey(), new HashSet<>(entry.getValue())); - } - } - - @Override - public VodalianWarMachineWatcher copy() { - return new VodalianWarMachineWatcher(this); - } - public Set getTappedMerfolkIds(Permanent permanent, Game game) { return tappedMerfolkIds.get(new MageObjectReference(permanent, game)); } diff --git a/Mage.Sets/src/mage/cards/w/WhisperingSnitch.java b/Mage.Sets/src/mage/cards/w/WhisperingSnitch.java index 3452d35243..9a7e7f7aaa 100644 --- a/Mage.Sets/src/mage/cards/w/WhisperingSnitch.java +++ b/Mage.Sets/src/mage/cards/w/WhisperingSnitch.java @@ -92,15 +92,6 @@ class WhisperingSnitchWatcher extends Watcher { super(WatcherScope.GAME); } - public WhisperingSnitchWatcher(final WhisperingSnitchWatcher watcher) { - super(watcher); - } - - @Override - public WhisperingSnitchWatcher copy() { - return new WhisperingSnitchWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.SURVEILED) { diff --git a/Mage.Sets/src/mage/cards/w/Wiitigo.java b/Mage.Sets/src/mage/cards/w/Wiitigo.java index 7493405c22..74ba69202a 100644 --- a/Mage.Sets/src/mage/cards/w/Wiitigo.java +++ b/Mage.Sets/src/mage/cards/w/Wiitigo.java @@ -99,14 +99,6 @@ class BlockedOrBeenBlockedSinceYourLastUpkeepWatcher extends Watcher { super(WatcherScope.GAME); } - public BlockedOrBeenBlockedSinceYourLastUpkeepWatcher(BlockedOrBeenBlockedSinceYourLastUpkeepWatcher watcher) { - super(watcher); - for (Map.Entry> entry : watcher.blockedOrBeenBlockedCreatures.entrySet()) { - Set creaturesThatBlockedOrWereBlocked = new HashSet<>(entry.getValue()); - blockedOrBeenBlockedCreatures.put(entry.getKey(), creaturesThatBlockedOrWereBlocked); - } - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.UPKEEP_STEP_POST) { @@ -128,9 +120,4 @@ class BlockedOrBeenBlockedSinceYourLastUpkeepWatcher extends Watcher { return (blockedOrBeenBlockedCreatures.get(player) != null) && blockedOrBeenBlockedCreatures.get(player).contains(mor); } - - @Override - public BlockedOrBeenBlockedSinceYourLastUpkeepWatcher copy() { - return new BlockedOrBeenBlockedSinceYourLastUpkeepWatcher(this); - } } diff --git a/Mage.Sets/src/mage/cards/w/WookieeMystic.java b/Mage.Sets/src/mage/cards/w/WookieeMystic.java index 655ffc900a..f9551231db 100644 --- a/Mage.Sets/src/mage/cards/w/WookieeMystic.java +++ b/Mage.Sets/src/mage/cards/w/WookieeMystic.java @@ -76,7 +76,7 @@ class WookieeMysticWatcher extends Watcher { private Ability source; private List creatures = new ArrayList<>(); - WookieeMysticWatcher() { + public WookieeMysticWatcher() { super(WatcherScope.CARD); } diff --git a/Mage.Sets/src/mage/cards/y/YamabushisFlame.java b/Mage.Sets/src/mage/cards/y/YamabushisFlame.java index d26477cde8..6bcd0ec831 100644 --- a/Mage.Sets/src/mage/cards/y/YamabushisFlame.java +++ b/Mage.Sets/src/mage/cards/y/YamabushisFlame.java @@ -54,7 +54,7 @@ public final class YamabushisFlame extends CardImpl { // If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public YamabushisFlame(final YamabushisFlame card) { diff --git a/Mage.Sets/src/mage/cards/y/YamabushisStorm.java b/Mage.Sets/src/mage/cards/y/YamabushisStorm.java index f4345489b8..bfe867d8a7 100644 --- a/Mage.Sets/src/mage/cards/y/YamabushisStorm.java +++ b/Mage.Sets/src/mage/cards/y/YamabushisStorm.java @@ -53,7 +53,7 @@ public final class YamabushisStorm extends CardImpl { // If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); - this.getSpellAbility().addWatcher(new DamagedByWatcher()); + this.getSpellAbility().addWatcher(new DamagedByWatcher(false)); } public YamabushisStorm(final YamabushisStorm card) { diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index b3fcd37e40..eb2eaed0f3 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -450,9 +450,24 @@ public class VerifyCardDataTest { // errors on create try { - Constructor constructor = watcherClass.getDeclaredConstructor(); + List constructors = Arrays.asList(watcherClass.getDeclaredConstructors()); + + Constructor constructor = (Constructor) constructors.get(0); + + Object[] args = new Object[constructor.getParameterCount()]; + for (int index = 0; index < constructor.getParameterTypes().length; index++) { + Class parameterType = constructor.getParameterTypes()[index]; + if(parameterType.getSimpleName().equalsIgnoreCase("boolean")){ + args[index]=false; + } + else { + args[index] = null; + } + + } + constructor.setAccessible(true); - Watcher w1 = constructor.newInstance(); + Watcher w1 = constructor.newInstance(args); // errors on copy try { diff --git a/Mage/src/main/java/mage/abilities/keyword/ExertAbility.java b/Mage/src/main/java/mage/abilities/keyword/ExertAbility.java index 18f10b4289..61258ee24a 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ExertAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ExertAbility.java @@ -149,16 +149,6 @@ class ExertedThisTurnWatcher extends Watcher { exertedThisTurnCreatures = new HashSet<>(); } - public ExertedThisTurnWatcher(final ExertedThisTurnWatcher watcher) { - super(watcher); - exertedThisTurnCreatures = new HashSet<>(watcher.exertedThisTurnCreatures); - } - - @Override - public Watcher copy() { - return new ExertedThisTurnWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.BECOMES_EXERTED) { diff --git a/Mage/src/main/java/mage/abilities/keyword/MeleeAbility.java b/Mage/src/main/java/mage/abilities/keyword/MeleeAbility.java index 061c000e83..2e4f406775 100644 --- a/Mage/src/main/java/mage/abilities/keyword/MeleeAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MeleeAbility.java @@ -45,15 +45,10 @@ class MeleeWatcher extends Watcher { private Map> playersAttacked = new HashMap<>(0); - MeleeWatcher() { + public MeleeWatcher() { super(WatcherScope.GAME); } - MeleeWatcher(final MeleeWatcher watcher) { - super(watcher); - this.playersAttacked.putAll(watcher.playersAttacked); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.BEGIN_COMBAT_STEP_PRE) { @@ -72,11 +67,6 @@ class MeleeWatcher extends Watcher { } return 0; } - - @Override - public MeleeWatcher copy() { - return new MeleeWatcher(this); - } } class MeleeDynamicValue implements DynamicValue { diff --git a/Mage/src/main/java/mage/watchers/Watcher.java b/Mage/src/main/java/mage/watchers/Watcher.java index 05efdc76f3..6e7c28a0b0 100644 --- a/Mage/src/main/java/mage/watchers/Watcher.java +++ b/Mage/src/main/java/mage/watchers/Watcher.java @@ -1,10 +1,8 @@ package mage.watchers; -import mage.Mana; import mage.constants.WatcherScope; import mage.game.Game; -import mage.game.turn.Step; import mage.game.events.GameEvent; import org.apache.log4j.Logger; @@ -12,6 +10,7 @@ import java.io.Serializable; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Modifier; import java.util.*; /** @@ -85,35 +84,48 @@ public abstract class Watcher implements Serializable { public T copy() { try { - List constructors = Arrays.asList(this.getClass().getConstructors()); + //use getDeclaredConstructors to allow for package-private constructors (i.e. omit public) + List constructors = Arrays.asList(this.getClass().getDeclaredConstructors()); if (constructors.size() > 1) { logger.error(getClass().getSimpleName() + " has multiple constructors"); return null; } Constructor constructor = (Constructor) constructors.get(0); - if (constructor.getParameterCount() > 0) { - logger.error(getClass().getSimpleName() + " constructor has arguments, should be 0 and inject the parameters by setters"); - return null; - } + constructor.setAccessible(true); - T watcher = (T) constructor.newInstance(); + Object[] args = new Object[constructor.getParameterCount()]; + for (int index = 0; index < constructor.getParameterTypes().length; index++) { + Class parameterType = constructor.getParameterTypes()[index]; + if(parameterType.isPrimitive()){ + if(parameterType.getSimpleName().equalsIgnoreCase("boolean")){ + args[index]=false; + } + } + else { + args[index] = null; + } + + } + T watcher = (T) constructor.newInstance(args); List allFields = new ArrayList<>(); allFields.addAll(Arrays.asList(getClass().getDeclaredFields())); allFields.addAll(Arrays.asList(getClass().getSuperclass().getDeclaredFields())); for (Field field : allFields) { - field.setAccessible(true); - if (field.getType() == Set.class) { - ((Set) field.get(watcher)).clear(); - ((Set) field.get(watcher)).addAll((Set) field.get(this)); - } else if (field.getType() == Map.class) { - ((Map) field.get(watcher)).clear(); - ((Map) field.get(watcher)).putAll((Map) field.get(this)); - } else if (field.getType() == List.class) { - ((List) field.get(watcher)).clear(); - ((List) field.get(watcher)).addAll((List) field.get(this)); - } else { - if (field.getType() != Logger.class) { + if (!Modifier.isStatic(field.getModifiers())) { + + field.setAccessible(true); + if (field.getType() == Set.class) { + ((Set) field.get(watcher)).clear(); + ((Set) field.get(watcher)).addAll((Set) field.get(this)); + } else if (field.getType() == Map.class) { + ((Map) field.get(watcher)).clear(); + ((Map) field.get(watcher)).putAll((Map) field.get(this)); + } else if (field.getType() == List.class) { + ((List) field.get(watcher)).clear(); + ((List) field.get(watcher)).addAll((List) field.get(this)); + + } else { field.set(watcher, field.get(this)); } } diff --git a/Mage/src/main/java/mage/watchers/common/CardsCycledOrDiscardedThisTurnWatcher.java b/Mage/src/main/java/mage/watchers/common/CardsCycledOrDiscardedThisTurnWatcher.java index 05f94ff6c8..0cb116c282 100644 --- a/Mage/src/main/java/mage/watchers/common/CardsCycledOrDiscardedThisTurnWatcher.java +++ b/Mage/src/main/java/mage/watchers/common/CardsCycledOrDiscardedThisTurnWatcher.java @@ -30,18 +30,6 @@ public class CardsCycledOrDiscardedThisTurnWatcher extends Watcher { super(WatcherScope.GAME); } - public CardsCycledOrDiscardedThisTurnWatcher(final CardsCycledOrDiscardedThisTurnWatcher watcher) { - super(watcher); - for (Entry entry : watcher.cycledOrDiscardedCardsThisTurn.entrySet()) { - cycledOrDiscardedCardsThisTurn.put(entry.getKey(), entry.getValue().copy()); - } - for (Entry> entry : watcher.numberOfCycledOrDiscardedCardsThisTurn.entrySet()) { - Set cycledOrDiscardedCards = new HashSet<>(); - cycledOrDiscardedCards.addAll(entry.getValue()); - numberOfCycledOrDiscardedCardsThisTurn.put(entry.getKey(), cycledOrDiscardedCards); - } - numberOfCycledOrDiscardedCardsThisTurn.putAll(watcher.numberOfCycledOrDiscardedCardsThisTurn); - } @Override public void watch(GameEvent event, Game game) { @@ -81,8 +69,4 @@ public class CardsCycledOrDiscardedThisTurnWatcher extends Watcher { numberOfCycledOrDiscardedCardsThisTurn.clear(); } - @Override - public CardsCycledOrDiscardedThisTurnWatcher copy() { - return new CardsCycledOrDiscardedThisTurnWatcher(this); - } } diff --git a/Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java b/Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java index 99e7996ac0..30b8cfc557 100644 --- a/Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java +++ b/Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java @@ -33,17 +33,6 @@ public class CommanderInfoWatcher extends Watcher { this.checkCommanderDamage = checkCommanderDamage; } - public CommanderInfoWatcher(final CommanderInfoWatcher watcher) { - super(watcher); - this.damageToPlayer.putAll(watcher.damageToPlayer); - this.checkCommanderDamage = watcher.checkCommanderDamage; - } - - @Override - public CommanderInfoWatcher copy() { - return new CommanderInfoWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (checkCommanderDamage && event.getType() == EventType.DAMAGED_PLAYER && event instanceof DamagedPlayerEvent) { diff --git a/Mage/src/main/java/mage/watchers/common/DamagedByWatcher.java b/Mage/src/main/java/mage/watchers/common/DamagedByWatcher.java index 746d286f45..b7c3243f98 100644 --- a/Mage/src/main/java/mage/watchers/common/DamagedByWatcher.java +++ b/Mage/src/main/java/mage/watchers/common/DamagedByWatcher.java @@ -23,26 +23,11 @@ public class DamagedByWatcher extends Watcher { private final boolean watchPlaneswalkers; - public DamagedByWatcher() { - this(false); - } - public DamagedByWatcher(boolean watchPlaneswalkers) { super(WatcherScope.CARD); this.watchPlaneswalkers = watchPlaneswalkers; } - public DamagedByWatcher(final DamagedByWatcher watcher) { - super(watcher); - this.damagedBySource.addAll(watcher.damagedBySource); - this.watchPlaneswalkers = watcher.watchPlaneswalkers; - } - - @Override - public DamagedByWatcher copy() { - return new DamagedByWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { boolean eventHasAppropriateType = (event.getType() == EventType.DAMAGED_CREATURE) || diff --git a/Mage/src/main/java/mage/watchers/common/FirstTimeStepWatcher.java b/Mage/src/main/java/mage/watchers/common/FirstTimeStepWatcher.java index 26d8a0d393..ebb2f8c232 100644 --- a/Mage/src/main/java/mage/watchers/common/FirstTimeStepWatcher.java +++ b/Mage/src/main/java/mage/watchers/common/FirstTimeStepWatcher.java @@ -22,16 +22,6 @@ public class FirstTimeStepWatcher extends Watcher { this.eventType = eventType; } - public FirstTimeStepWatcher(final FirstTimeStepWatcher watcher) { - super(watcher); - this.eventType = watcher.eventType; - } - - @Override - public FirstTimeStepWatcher copy() { - return new FirstTimeStepWatcher(this); - } - @Override public void watch(GameEvent event, Game game) { if (event.getType() == eventType) {