From 0cc530810090311b177d18c5079acbc359b2faaf Mon Sep 17 00:00:00 2001 From: North Date: Sat, 31 May 2014 19:35:21 +0300 Subject: [PATCH] [refactor] removed Watcher interface and renamed WatcherImpl to Watcher --- .../mage/sets/alarareborn/MaelstromNexus.java | 4 +- .../sets/alarareborn/PredatoryAdvantage.java | 3 +- .../alarareborn/UnscytheKillerOfKings.java | 4 +- .../sets/avacynrestored/CavernOfSouls.java | 4 +- .../betrayersofkamigawa/GoblinCohort.java | 4 +- .../betrayersofkamigawa/KumanosBlessing.java | 4 +- .../bornofthegods/EpharaGodOfThePolis.java | 3 +- .../bornofthegods/SpiritOfTheLabyrinth.java | 3 +- .../BoseijuWhoSheltersAll.java | 4 +- .../FloatingDreamZubera.java | 4 +- .../championsofkamigawa/SiftThroughSands.java | 4 +- .../mage/sets/commander2013/FellShepherd.java | 4 +- .../commander2013/JelevaNephaliasScourge.java | 5 +- .../mage/sets/commander2013/OpalPalace.java | 4 +- .../sets/darkascension/CurseOfExhaustion.java | 3 +- .../sets/darkascension/DungeonGeists.java | 4 +- .../src/mage/sets/eventide/DreamThief.java | 4 +- .../mage/sets/eventide/GroundlingPouncer.java | 4 +- .../mage/sets/eventide/HotheadedGiant.java | 4 +- .../src/mage/sets/eventide/SoulReap.java | 4 +- .../mage/sets/eventide/TalarasBattalion.java | 4 +- .../mage/sets/fifthedition/SylvanLibrary.java | 4 +- .../sets/futuresight/PatriciansScorn.java | 4 +- .../src/mage/sets/gatecrash/AureliasFury.java | 4 +- .../sets/gatecrash/IncursionSpecialist.java | 3 +- .../src/mage/sets/guildpact/Quicken.java | 4 +- .../src/mage/sets/iceage/TinderWall.java | 4 +- .../mage/sets/innistrad/CivilizedScholar.java | 4 +- .../mage/sets/lorwyn/WindbriskHeights.java | 3 +- .../mage/sets/magic2011/AngelicArbiter.java | 5 +- .../src/mage/sets/magic2013/FaithsReward.java | 4 +- .../mage/sets/magic2014/SavageSummoning.java | 4 +- .../mage/sets/magic2014/TidebinderMage.java | 4 +- .../src/mage/sets/mirrodin/SecondSunrise.java | 4 +- .../sets/newphyrexia/CathedralMembrane.java | 4 +- .../src/mage/sets/newphyrexia/FreshMeat.java | 4 +- .../riseoftheeldrazi/CastThroughTime.java | 4 +- .../mage/sets/riseoftheeldrazi/Vengevine.java | 3 +- .../sets/scarsofmirrodin/FleshAllergy.java | 4 +- .../sets/scarsofmirrodin/MoltenPsyche.java | 4 +- .../sets/scarsofmirrodin/SteelHellkite.java | 4 +- .../sets/scarsofmirrodin/TunnelIgnus.java | 4 +- .../shardsofalara/EtherswornCanonist.java | 4 +- .../mage/sets/theros/ShipbreakerKraken.java | 4 +- .../src/mage/sets/theros/TritonTactics.java | 4 +- .../mage/sets/worldwake/PermafrostTrap.java | 4 +- .../mage/sets/worldwake/RefractionTrap.java | 4 +- .../src/mage/sets/worldwake/RicochetTrap.java | 4 +- .../src/mage/sets/zendikar/ArchiveTrap.java | 5 +- .../mage/sets/zendikar/ArchmageAscension.java | 4 +- .../mage/sets/zendikar/BalothCageTrap.java | 4 +- .../src/mage/sets/zendikar/CobraTrap.java | 3 +- Mage.Sets/src/mage/sets/zendikar/Gomazoa.java | 4 +- .../src/mage/sets/zendikar/InfernoTrap.java | 4 +- .../src/mage/sets/zendikar/LavaballTrap.java | 4 +- .../mage/sets/zendikar/LullmageMentor.java | 4 +- .../src/mage/sets/zendikar/MindbreakTrap.java | 3 +- .../src/mage/sets/zendikar/RuneflareTrap.java | 4 +- .../src/mage/sets/zendikar/SummoningTrap.java | 3 +- .../src/mage/sets/zendikar/WhiplashTrap.java | 4 +- .../abilities/keyword/MadnessAbility.java | 4 +- Mage/src/mage/watchers/Watcher.java | 71 ++++++++++-- Mage/src/mage/watchers/WatcherImpl.java | 104 ------------------ .../common/AttackedThisTurnWatcher.java | 4 +- .../watchers/common/BloodthirstWatcher.java | 4 +- .../CardsDrawnDuringDrawStepWatcher.java | 4 +- .../common/CardsPutIntoGraveyardWatcher.java | 4 +- .../watchers/common/CastFromHandWatcher.java | 4 +- .../common/CastSpellLastTurnWatcher.java | 4 +- .../common/CommanderCombatDamageWatcher.java | 4 +- .../watchers/common/DamagedByWatcher.java | 4 +- .../mage/watchers/common/LandfallWatcher.java | 4 +- .../mage/watchers/common/MiracleWatcher.java | 4 +- .../mage/watchers/common/MorbidWatcher.java | 4 +- .../common/PlayerDamagedBySourceWatcher.java | 4 +- .../common/PlayerGainedLifeWatcher.java | 4 +- .../common/PlayerLostLifeWatcher.java | 4 +- .../mage/watchers/common/ProwlWatcher.java | 4 +- .../mage/watchers/common/SoulbondWatcher.java | 4 +- .../common/SourceDidDamageWatcher.java | 4 +- 80 files changed, 207 insertions(+), 273 deletions(-) delete mode 100644 Mage/src/mage/watchers/WatcherImpl.java diff --git a/Mage.Sets/src/mage/sets/alarareborn/MaelstromNexus.java b/Mage.Sets/src/mage/sets/alarareborn/MaelstromNexus.java index 22f78ee5d7..9708fc1aaf 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/MaelstromNexus.java +++ b/Mage.Sets/src/mage/sets/alarareborn/MaelstromNexus.java @@ -44,7 +44,7 @@ import mage.game.events.GameEvent; import mage.game.stack.Spell; import mage.players.Player; import mage.target.targetpointer.FixedTarget; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -114,7 +114,7 @@ class MaelstromNexusTriggeredAbility extends TriggeredAbilityImpl { +class FirstSpellCastThisTurnWatcher extends Watcher { int spellCount = 0; diff --git a/Mage.Sets/src/mage/sets/alarareborn/PredatoryAdvantage.java b/Mage.Sets/src/mage/sets/alarareborn/PredatoryAdvantage.java index ad34335a31..e2639dc825 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/PredatoryAdvantage.java +++ b/Mage.Sets/src/mage/sets/alarareborn/PredatoryAdvantage.java @@ -46,7 +46,6 @@ import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; import mage.game.stack.Spell; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -97,7 +96,7 @@ class DidNotCastCreatureCondition implements Condition { } } -class CastCreatureWatcher extends WatcherImpl { +class CastCreatureWatcher extends Watcher { public CastCreatureWatcher() { super("CastCreature", WatcherScope.CARD); diff --git a/Mage.Sets/src/mage/sets/alarareborn/UnscytheKillerOfKings.java b/Mage.Sets/src/mage/sets/alarareborn/UnscytheKillerOfKings.java index 46ee19f76b..97f9f346c8 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/UnscytheKillerOfKings.java +++ b/Mage.Sets/src/mage/sets/alarareborn/UnscytheKillerOfKings.java @@ -56,7 +56,7 @@ import mage.game.permanent.Permanent; import mage.game.permanent.token.ZombieToken; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.targetpointer.FixedTarget; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -167,7 +167,7 @@ class UnscytheEffect extends OneShotEffect { } } -class EquippedDidDamageWatcher extends WatcherImpl { +class EquippedDidDamageWatcher extends Watcher { public List equippedDamagedTargets = new ArrayList(); diff --git a/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java b/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java index baeddbf526..ec1a1478d6 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java @@ -57,7 +57,7 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -172,7 +172,7 @@ class CavernOfSoulsManaCondition extends CreatureCastManaCondition { } } -class CavernOfSoulsWatcher extends WatcherImpl { +class CavernOfSoulsWatcher extends Watcher { public List spells = new ArrayList<>(); diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/GoblinCohort.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/GoblinCohort.java index 29b8635539..3b5e2f14c0 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/GoblinCohort.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/GoblinCohort.java @@ -47,7 +47,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.stack.Spell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -121,7 +121,7 @@ class GoblinCohortEffect extends RestrictionEffect { } } -class PlayerCastCreatureWatcher extends WatcherImpl { +class PlayerCastCreatureWatcher extends Watcher { Set playerIds = new HashSet<>(); diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/KumanosBlessing.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/KumanosBlessing.java index 4a3736d391..f2b57c3b69 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/KumanosBlessing.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/KumanosBlessing.java @@ -51,7 +51,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -134,7 +134,7 @@ class KumanosBlessingEffect extends ReplacementEffectImpl } -class DamagedByEnchantedWatcher extends WatcherImpl { +class DamagedByEnchantedWatcher extends Watcher { public List damagedCreatures = new ArrayList<>(); diff --git a/Mage.Sets/src/mage/sets/bornofthegods/EpharaGodOfThePolis.java b/Mage.Sets/src/mage/sets/bornofthegods/EpharaGodOfThePolis.java index b3df206894..fa51924b15 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/EpharaGodOfThePolis.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/EpharaGodOfThePolis.java @@ -50,7 +50,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -109,7 +108,7 @@ class HadAnotherCreatureEnterTheBattlefieldCondition implements Condition { } } -class CreatureEnteredBattlefieldLastTurnWatcher extends WatcherImpl { +class CreatureEnteredBattlefieldLastTurnWatcher extends Watcher { private boolean anotherCreatureEntered = false; diff --git a/Mage.Sets/src/mage/sets/bornofthegods/SpiritOfTheLabyrinth.java b/Mage.Sets/src/mage/sets/bornofthegods/SpiritOfTheLabyrinth.java index 54555e6e8e..c585e9b76e 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/SpiritOfTheLabyrinth.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/SpiritOfTheLabyrinth.java @@ -42,7 +42,6 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -75,7 +74,7 @@ public class SpiritOfTheLabyrinth extends CardImpl { } } -class SpiritOfTheLabyrinthWatcher extends WatcherImpl { +class SpiritOfTheLabyrinthWatcher extends Watcher { public SpiritOfTheLabyrinthWatcher() { super("DrewCard", WatcherScope.PLAYER); diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BoseijuWhoSheltersAll.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BoseijuWhoSheltersAll.java index 237acdbf34..ed80192163 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/BoseijuWhoSheltersAll.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BoseijuWhoSheltersAll.java @@ -52,7 +52,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; import mage.players.Player; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -90,7 +90,7 @@ public class BoseijuWhoSheltersAll extends CardImpl { } } -class BoseijuWhoSheltersAllWatcher extends WatcherImpl { +class BoseijuWhoSheltersAllWatcher extends Watcher { public List spells = new ArrayList<>(); diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/FloatingDreamZubera.java b/Mage.Sets/src/mage/sets/championsofkamigawa/FloatingDreamZubera.java index 3b02a2696e..c85783f06c 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/FloatingDreamZubera.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/FloatingDreamZubera.java @@ -44,7 +44,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @author Loki @@ -75,7 +75,7 @@ public class FloatingDreamZubera extends CardImpl { } -class ZuberasDiedWatcher extends WatcherImpl { +class ZuberasDiedWatcher extends Watcher { public int zuberasDiedThisTurn = 0; diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SiftThroughSands.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SiftThroughSands.java index 3c48ff15ab..74db27ae5d 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SiftThroughSands.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SiftThroughSands.java @@ -46,7 +46,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.target.common.TargetCardInLibrary; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -99,7 +99,7 @@ class SiftThroughSandsCondition implements Condition { } } -class SiftThroughSandsWatcher extends WatcherImpl { +class SiftThroughSandsWatcher extends Watcher { boolean castPeerThroughDepths = false; boolean castReachThroughMists = false; diff --git a/Mage.Sets/src/mage/sets/commander2013/FellShepherd.java b/Mage.Sets/src/mage/sets/commander2013/FellShepherd.java index 42e34c7dba..bf1b120098 100644 --- a/Mage.Sets/src/mage/sets/commander2013/FellShepherd.java +++ b/Mage.Sets/src/mage/sets/commander2013/FellShepherd.java @@ -55,7 +55,7 @@ import mage.game.events.GameEvent.EventType; import mage.game.events.ZoneChangeEvent; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -99,7 +99,7 @@ public class FellShepherd extends CardImpl { } } -class FellShepherdWatcher extends WatcherImpl { +class FellShepherdWatcher extends Watcher { private Set creatureIds = new HashSet(); diff --git a/Mage.Sets/src/mage/sets/commander2013/JelevaNephaliasScourge.java b/Mage.Sets/src/mage/sets/commander2013/JelevaNephaliasScourge.java index 0960159208..1ec4eb2278 100644 --- a/Mage.Sets/src/mage/sets/commander2013/JelevaNephaliasScourge.java +++ b/Mage.Sets/src/mage/sets/commander2013/JelevaNephaliasScourge.java @@ -45,13 +45,12 @@ import mage.constants.WatcherScope; import mage.filter.common.FilterInstantOrSorceryCard; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.game.stack.StackObject; import mage.players.Player; import mage.target.common.TargetCardInExile; import mage.util.CardUtil; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -173,7 +172,7 @@ class JelevaNephaliasCastEffect extends OneShotEffect } } -class JelevaNephaliasWatcher extends WatcherImpl { +class JelevaNephaliasWatcher extends Watcher { private Map manaSpendToCast = new HashMap(); // cast diff --git a/Mage.Sets/src/mage/sets/commander2013/OpalPalace.java b/Mage.Sets/src/mage/sets/commander2013/OpalPalace.java index 27c2f88a8b..9000c879e3 100644 --- a/Mage.Sets/src/mage/sets/commander2013/OpalPalace.java +++ b/Mage.Sets/src/mage/sets/commander2013/OpalPalace.java @@ -56,7 +56,7 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -162,7 +162,7 @@ class OpalPalaceManaEffect extends ManaEffect { } } -class OpalPalaceWatcher extends WatcherImpl { +class OpalPalaceWatcher extends Watcher { public List commanderId = new ArrayList(); diff --git a/Mage.Sets/src/mage/sets/darkascension/CurseOfExhaustion.java b/Mage.Sets/src/mage/sets/darkascension/CurseOfExhaustion.java index 0616f6c51e..9ecf65f64b 100644 --- a/Mage.Sets/src/mage/sets/darkascension/CurseOfExhaustion.java +++ b/Mage.Sets/src/mage/sets/darkascension/CurseOfExhaustion.java @@ -42,7 +42,6 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPlayer; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -79,7 +78,7 @@ public class CurseOfExhaustion extends CardImpl { } } -class CurseOfExhaustionWatcher extends WatcherImpl { +class CurseOfExhaustionWatcher extends Watcher { public CurseOfExhaustionWatcher() { super("SpellCast", WatcherScope.PLAYER); diff --git a/Mage.Sets/src/mage/sets/darkascension/DungeonGeists.java b/Mage.Sets/src/mage/sets/darkascension/DungeonGeists.java index 32f5a7346a..0c2674783f 100644 --- a/Mage.Sets/src/mage/sets/darkascension/DungeonGeists.java +++ b/Mage.Sets/src/mage/sets/darkascension/DungeonGeists.java @@ -45,7 +45,7 @@ import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.UUID; import mage.game.permanent.Permanent; @@ -155,7 +155,7 @@ class DungeonGeistsEffect extends ReplacementEffectImpl { } } -class DungeonGeistsWatcher extends WatcherImpl { +class DungeonGeistsWatcher extends Watcher { DungeonGeistsWatcher () { super("ControlLost", WatcherScope.CARD); diff --git a/Mage.Sets/src/mage/sets/eventide/DreamThief.java b/Mage.Sets/src/mage/sets/eventide/DreamThief.java index 4d81934dff..3f66b3a217 100644 --- a/Mage.Sets/src/mage/sets/eventide/DreamThief.java +++ b/Mage.Sets/src/mage/sets/eventide/DreamThief.java @@ -46,7 +46,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -97,7 +97,7 @@ class CastBlueSpellThisTurnCondition implements Condition { } } -class DreamThiefWatcher extends WatcherImpl { +class DreamThiefWatcher extends Watcher { private static final FilterSpell filter = new FilterSpell(); static { diff --git a/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java b/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java index 24dea74ff8..f16ee0dff9 100644 --- a/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java +++ b/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java @@ -52,7 +52,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.StackAbility; import mage.game.stack.StackObject; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -119,7 +119,7 @@ class GroundingPouncerCondition implements Condition { } } -class ActivatedAbilityUsedThisTurnWatcher extends WatcherImpl { +class ActivatedAbilityUsedThisTurnWatcher extends Watcher { public Set activatedThisTurn = new HashSet(); diff --git a/Mage.Sets/src/mage/sets/eventide/HotheadedGiant.java b/Mage.Sets/src/mage/sets/eventide/HotheadedGiant.java index 2fa79332ae..600d6b8984 100644 --- a/Mage.Sets/src/mage/sets/eventide/HotheadedGiant.java +++ b/Mage.Sets/src/mage/sets/eventide/HotheadedGiant.java @@ -48,7 +48,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -98,7 +98,7 @@ class CastRedSpellThisTurnCondition implements Condition { } } -class HotHeadedGiantWatcher extends WatcherImpl { +class HotHeadedGiantWatcher extends Watcher { private static final FilterSpell filter = new FilterSpell(); static { diff --git a/Mage.Sets/src/mage/sets/eventide/SoulReap.java b/Mage.Sets/src/mage/sets/eventide/SoulReap.java index 711f7764cb..fe6fdd4678 100644 --- a/Mage.Sets/src/mage/sets/eventide/SoulReap.java +++ b/Mage.Sets/src/mage/sets/eventide/SoulReap.java @@ -52,7 +52,7 @@ import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -104,7 +104,7 @@ class CastBlackSpellThisTurnCondition implements Condition { } } -class SoulReapWatcher extends WatcherImpl { +class SoulReapWatcher extends Watcher { private static final FilterSpell filter = new FilterSpell(); diff --git a/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java b/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java index 0653831b86..d1bf404247 100644 --- a/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java +++ b/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java @@ -48,7 +48,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -135,7 +135,7 @@ class CastGreenSpellThisTurnCondition implements Condition { } } -class TalarasBattalionWatcher extends WatcherImpl { +class TalarasBattalionWatcher extends Watcher { private static final FilterSpell filter = new FilterSpell(); diff --git a/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java b/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java index 9085a70b0e..ef048e9eaf 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java +++ b/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java @@ -49,7 +49,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; import mage.target.TargetCard; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -161,7 +161,7 @@ class SylvanLibraryEffect extends OneShotEffect { } } -class CardsDrawnThisTurnWatcher extends WatcherImpl { +class CardsDrawnThisTurnWatcher extends Watcher { private final Set cardsDrawnThisTurn = new HashSet(); diff --git a/Mage.Sets/src/mage/sets/futuresight/PatriciansScorn.java b/Mage.Sets/src/mage/sets/futuresight/PatriciansScorn.java index ee989a0aa2..141f7c1923 100644 --- a/Mage.Sets/src/mage/sets/futuresight/PatriciansScorn.java +++ b/Mage.Sets/src/mage/sets/futuresight/PatriciansScorn.java @@ -44,7 +44,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -93,7 +93,7 @@ class CastWhiteSpellThisTurnCondition implements Condition { } } -class PatriciansScornWatcher extends WatcherImpl { +class PatriciansScornWatcher extends Watcher { private static final FilterSpell filter = new FilterSpell(); static { diff --git a/Mage.Sets/src/mage/sets/gatecrash/AureliasFury.java b/Mage.Sets/src/mage/sets/gatecrash/AureliasFury.java index 96bb833330..51ea28803c 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/AureliasFury.java +++ b/Mage.Sets/src/mage/sets/gatecrash/AureliasFury.java @@ -50,7 +50,7 @@ import mage.game.stack.Spell; import mage.players.Player; import mage.target.common.TargetCreatureOrPlayerAmount; import mage.target.targetpointer.FixedTarget; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.ArrayList; import java.util.List; @@ -188,7 +188,7 @@ class AureliasFuryCantCastEffect extends ReplacementEffectImpl { +class AureliasFuryDamagedByWatcher extends Watcher { public List damagedCreatures = new ArrayList(); public List damagedPlayers = new ArrayList(); diff --git a/Mage.Sets/src/mage/sets/gatecrash/IncursionSpecialist.java b/Mage.Sets/src/mage/sets/gatecrash/IncursionSpecialist.java index 788c50f8cd..56f9c9ada6 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/IncursionSpecialist.java +++ b/Mage.Sets/src/mage/sets/gatecrash/IncursionSpecialist.java @@ -39,7 +39,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -105,7 +104,7 @@ class IncursionTriggeredAbility extends TriggeredAbilityImpl { +class IncursionWatcher extends Watcher { int spellCount = 0; diff --git a/Mage.Sets/src/mage/sets/guildpact/Quicken.java b/Mage.Sets/src/mage/sets/guildpact/Quicken.java index c91db77387..dc9402eecf 100644 --- a/Mage.Sets/src/mage/sets/guildpact/Quicken.java +++ b/Mage.Sets/src/mage/sets/guildpact/Quicken.java @@ -44,7 +44,7 @@ import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -126,7 +126,7 @@ class QuickenAsThoughEffect extends AsThoughEffectImpl { } -class QuickenWatcher extends WatcherImpl { +class QuickenWatcher extends Watcher { public List activeQuickenSpells = new ArrayList(); diff --git a/Mage.Sets/src/mage/sets/iceage/TinderWall.java b/Mage.Sets/src/mage/sets/iceage/TinderWall.java index dba488dd32..c561c0d6ba 100644 --- a/Mage.Sets/src/mage/sets/iceage/TinderWall.java +++ b/Mage.Sets/src/mage/sets/iceage/TinderWall.java @@ -48,7 +48,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.ArrayList; import java.util.List; @@ -97,7 +97,7 @@ public class TinderWall extends CardImpl { } -class BlockedByWatcher extends WatcherImpl { +class BlockedByWatcher extends Watcher { public List blockedByWatcher = new ArrayList(); diff --git a/Mage.Sets/src/mage/sets/innistrad/CivilizedScholar.java b/Mage.Sets/src/mage/sets/innistrad/CivilizedScholar.java index 89bafd059c..8997fd6364 100644 --- a/Mage.Sets/src/mage/sets/innistrad/CivilizedScholar.java +++ b/Mage.Sets/src/mage/sets/innistrad/CivilizedScholar.java @@ -43,7 +43,7 @@ import mage.target.common.TargetDiscard; import java.util.UUID; import mage.game.events.GameEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @author nantuko @@ -80,7 +80,7 @@ public class CivilizedScholar extends CardImpl { } } -class HomicidalBruteWatcher extends WatcherImpl { +class HomicidalBruteWatcher extends Watcher { public HomicidalBruteWatcher() { super("HomicidalBruteAttacked", WatcherScope.CARD); diff --git a/Mage.Sets/src/mage/sets/lorwyn/WindbriskHeights.java b/Mage.Sets/src/mage/sets/lorwyn/WindbriskHeights.java index d3b5e8c507..919bc8d7f2 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/WindbriskHeights.java +++ b/Mage.Sets/src/mage/sets/lorwyn/WindbriskHeights.java @@ -44,7 +44,6 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -80,7 +79,7 @@ public class WindbriskHeights extends CardImpl { } } -class WindbriskHeightsWatcher extends WatcherImpl { +class WindbriskHeightsWatcher extends Watcher { private int numberOfattackers; diff --git a/Mage.Sets/src/mage/sets/magic2011/AngelicArbiter.java b/Mage.Sets/src/mage/sets/magic2011/AngelicArbiter.java index f6f80ef431..4fd8233afc 100644 --- a/Mage.Sets/src/mage/sets/magic2011/AngelicArbiter.java +++ b/Mage.Sets/src/mage/sets/magic2011/AngelicArbiter.java @@ -45,7 +45,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -79,7 +78,7 @@ public class AngelicArbiter extends CardImpl { } -class AngelicArbiterWatcher1 extends WatcherImpl { +class AngelicArbiterWatcher1 extends Watcher { public AngelicArbiterWatcher1() { super("OpponentCastSpell", WatcherScope.PLAYER); @@ -104,7 +103,7 @@ class AngelicArbiterWatcher1 extends WatcherImpl { } -class AngelicArbiterWatcher2 extends WatcherImpl { +class AngelicArbiterWatcher2 extends Watcher { public AngelicArbiterWatcher2() { super("OpponentAttacked", WatcherScope.PLAYER); diff --git a/Mage.Sets/src/mage/sets/magic2013/FaithsReward.java b/Mage.Sets/src/mage/sets/magic2013/FaithsReward.java index 2acc04dbcc..639565bcfb 100644 --- a/Mage.Sets/src/mage/sets/magic2013/FaithsReward.java +++ b/Mage.Sets/src/mage/sets/magic2013/FaithsReward.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.ArrayList; import java.util.UUID; @@ -99,7 +99,7 @@ class FaithsRewardEffect extends OneShotEffect { } } -class FaithsRewardWatcher extends WatcherImpl { +class FaithsRewardWatcher extends Watcher { ArrayList cards = new ArrayList(); public FaithsRewardWatcher() { diff --git a/Mage.Sets/src/mage/sets/magic2014/SavageSummoning.java b/Mage.Sets/src/mage/sets/magic2014/SavageSummoning.java index 0bcbd93830..4d875e21af 100644 --- a/Mage.Sets/src/mage/sets/magic2014/SavageSummoning.java +++ b/Mage.Sets/src/mage/sets/magic2014/SavageSummoning.java @@ -50,7 +50,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.stack.Spell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -139,7 +139,7 @@ class SavageSummoningAsThoughEffect extends AsThoughEffectImpl { +class SavageSummoningWatcher extends Watcher { private Set savageSummoningSpells = new HashSet();; private Map> spellsCastWithSavageSummoning = new LinkedHashMap>(); diff --git a/Mage.Sets/src/mage/sets/magic2014/TidebinderMage.java b/Mage.Sets/src/mage/sets/magic2014/TidebinderMage.java index c2ca6f1514..b735606a50 100644 --- a/Mage.Sets/src/mage/sets/magic2014/TidebinderMage.java +++ b/Mage.Sets/src/mage/sets/magic2014/TidebinderMage.java @@ -53,7 +53,7 @@ import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -159,7 +159,7 @@ class TidebinderMageEffect extends ReplacementEffectImpl { } } -class TidebinderMageWatcher extends WatcherImpl { +class TidebinderMageWatcher extends Watcher { TidebinderMageWatcher () { super("ControlLost", WatcherScope.CARD); diff --git a/Mage.Sets/src/mage/sets/mirrodin/SecondSunrise.java b/Mage.Sets/src/mage/sets/mirrodin/SecondSunrise.java index e2dbb70d5d..0cc88ceaaf 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/SecondSunrise.java +++ b/Mage.Sets/src/mage/sets/mirrodin/SecondSunrise.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -101,7 +101,7 @@ class SecondSunriseEffect extends OneShotEffect { } } -class SecondSunriseWatcher extends WatcherImpl { +class SecondSunriseWatcher extends Watcher { ArrayList cards = new ArrayList(); public SecondSunriseWatcher() { diff --git a/Mage.Sets/src/mage/sets/newphyrexia/CathedralMembrane.java b/Mage.Sets/src/mage/sets/newphyrexia/CathedralMembrane.java index 54c34204d1..b40bde34d7 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/CathedralMembrane.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/CathedralMembrane.java @@ -37,7 +37,7 @@ import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.ArrayList; import java.util.List; @@ -135,7 +135,7 @@ class CathedralMembraneEffect extends OneShotEffect { } } -class CathedralMembraneWatcher extends WatcherImpl { +class CathedralMembraneWatcher extends Watcher { public List blockedCreatures = new ArrayList(); diff --git a/Mage.Sets/src/mage/sets/newphyrexia/FreshMeat.java b/Mage.Sets/src/mage/sets/newphyrexia/FreshMeat.java index 517d4375b9..af9b05329f 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/FreshMeat.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/FreshMeat.java @@ -43,7 +43,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.token.BeastToken; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -71,7 +71,7 @@ public class FreshMeat extends CardImpl { } } -class FreshMeatWatcher extends WatcherImpl { +class FreshMeatWatcher extends Watcher { private int creaturesCount = 0; diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/CastThroughTime.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CastThroughTime.java index cd6e247d32..bffe75f588 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/CastThroughTime.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CastThroughTime.java @@ -44,7 +44,7 @@ import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.Iterator; import java.util.UUID; @@ -129,7 +129,7 @@ class GainReboundEffect extends ContinuousEffectImpl { class AttachedReboundAbility extends ReboundAbility {} -class LeavesBattlefieldWatcher extends WatcherImpl { +class LeavesBattlefieldWatcher extends Watcher { public LeavesBattlefieldWatcher() { super("LeavesBattlefieldWatcher", WatcherScope.CARD); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vengevine.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vengevine.java index bf24ff4ca8..6f45f6f5f2 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vengevine.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vengevine.java @@ -43,7 +43,6 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -109,7 +108,7 @@ class VengevineAbility extends TriggeredAbilityImpl { } -class VengevineWatcher extends WatcherImpl { +class VengevineWatcher extends Watcher { int creatureSpellCount = 0; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/FleshAllergy.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/FleshAllergy.java index d2f34b06f4..47c13475fc 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/FleshAllergy.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/FleshAllergy.java @@ -49,7 +49,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -78,7 +78,7 @@ public class FleshAllergy extends CardImpl { } } -class FleshAllergyWatcher extends WatcherImpl { +class FleshAllergyWatcher extends Watcher { public int creaturesDiedThisTurn = 0; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java index f17d11441c..d170502e20 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java @@ -44,7 +44,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -116,7 +116,7 @@ class MoltenPsycheEffect extends OneShotEffect { } -class MoltenPsycheWatcher extends WatcherImpl { +class MoltenPsycheWatcher extends Watcher { private final Map draws = new HashMap<>(); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/SteelHellkite.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/SteelHellkite.java index 4217e8380f..8ee72d8c52 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/SteelHellkite.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/SteelHellkite.java @@ -43,7 +43,7 @@ import mage.game.Game; import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.ArrayList; import java.util.List; @@ -114,7 +114,7 @@ class SteelHellkiteDestroyEffect extends OneShotEffect { } } -class SteelHellkiteWatcher extends WatcherImpl { +class SteelHellkiteWatcher extends Watcher { public List damagedPlayers = new ArrayList(); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TunnelIgnus.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TunnelIgnus.java index 1ddb91c3a4..47dc8de872 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/TunnelIgnus.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TunnelIgnus.java @@ -44,7 +44,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.UUID; import mage.constants.WatcherScope; @@ -76,7 +76,7 @@ public class TunnelIgnus extends CardImpl { } -class TunnelIgnusWatcher extends WatcherImpl { +class TunnelIgnusWatcher extends Watcher { protected Map counts = new HashMap(); public TunnelIgnusWatcher() { diff --git a/Mage.Sets/src/mage/sets/shardsofalara/EtherswornCanonist.java b/Mage.Sets/src/mage/sets/shardsofalara/EtherswornCanonist.java index 208f74fca1..9add8f4c14 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/EtherswornCanonist.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/EtherswornCanonist.java @@ -40,7 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -73,7 +73,7 @@ public class EtherswornCanonist extends CardImpl { } } -class EtherswornCanonistWatcher extends WatcherImpl { +class EtherswornCanonistWatcher extends Watcher { private Map castNonartifactSpell = new HashMap(); diff --git a/Mage.Sets/src/mage/sets/theros/ShipbreakerKraken.java b/Mage.Sets/src/mage/sets/theros/ShipbreakerKraken.java index 6f7547f5d3..011efd4811 100644 --- a/Mage.Sets/src/mage/sets/theros/ShipbreakerKraken.java +++ b/Mage.Sets/src/mage/sets/theros/ShipbreakerKraken.java @@ -47,7 +47,7 @@ import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -144,7 +144,7 @@ class ShipbreakerKrakenReplacementEffect extends ReplacementEffectImpl { +class ShipbreakerKrakenWatcher extends Watcher { ShipbreakerKrakenWatcher () { super("ControlLost", WatcherScope.CARD); diff --git a/Mage.Sets/src/mage/sets/theros/TritonTactics.java b/Mage.Sets/src/mage/sets/theros/TritonTactics.java index 092b2924b1..f8692fcd4e 100644 --- a/Mage.Sets/src/mage/sets/theros/TritonTactics.java +++ b/Mage.Sets/src/mage/sets/theros/TritonTactics.java @@ -53,7 +53,7 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; import mage.target.targetpointer.FixedTarget; import mage.util.CardUtil; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -206,7 +206,7 @@ class TritonTacticsEndOfCombatEffect extends OneShotEffect { +class BlockedCreaturesWatcher extends Watcher { public BlockedCreaturesWatcher() { super("BlockedCreatures", WatcherScope.CARD); diff --git a/Mage.Sets/src/mage/sets/worldwake/PermafrostTrap.java b/Mage.Sets/src/mage/sets/worldwake/PermafrostTrap.java index 3d31937270..eebf6cbb6b 100644 --- a/Mage.Sets/src/mage/sets/worldwake/PermafrostTrap.java +++ b/Mage.Sets/src/mage/sets/worldwake/PermafrostTrap.java @@ -43,7 +43,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -79,7 +79,7 @@ public class PermafrostTrap extends CardImpl { } } -class PermafrostTrapWatcher extends WatcherImpl { +class PermafrostTrapWatcher extends Watcher { public PermafrostTrapWatcher() { super("PermafrostTrapWatcher", WatcherScope.GAME); diff --git a/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java b/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java index de1cf2ee17..a9f27c2061 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java +++ b/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java @@ -47,7 +47,7 @@ import mage.game.stack.Spell; import mage.players.Player; import mage.target.TargetSource; import mage.target.common.TargetCreatureOrPlayer; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -83,7 +83,7 @@ public class RefractionTrap extends CardImpl { } } -class RefractionTrapWatcher extends WatcherImpl { +class RefractionTrapWatcher extends Watcher { public RefractionTrapWatcher() { super("RefractionTrapWatcher", WatcherScope.GAME); diff --git a/Mage.Sets/src/mage/sets/worldwake/RicochetTrap.java b/Mage.Sets/src/mage/sets/worldwake/RicochetTrap.java index 8e0582017f..8974dba03a 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RicochetTrap.java +++ b/Mage.Sets/src/mage/sets/worldwake/RicochetTrap.java @@ -45,7 +45,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.target.TargetSpell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -86,7 +86,7 @@ public class RicochetTrap extends CardImpl { } } -class RicochetTrapWatcher extends WatcherImpl { +class RicochetTrapWatcher extends Watcher { public RicochetTrapWatcher() { super("RicochetTrapWatcher", WatcherScope.GAME); diff --git a/Mage.Sets/src/mage/sets/zendikar/ArchiveTrap.java b/Mage.Sets/src/mage/sets/zendikar/ArchiveTrap.java index f38afe8342..f0d467f1b2 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ArchiveTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/ArchiveTrap.java @@ -31,6 +31,7 @@ package mage.sets.zendikar; import mage.constants.CardType; import mage.constants.Rarity; import mage.abilities.Ability; +import mage.constants.WatcherScope; import mage.abilities.costs.AlternativeCostImpl; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; @@ -40,10 +41,8 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.target.common.TargetOpponent; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; import java.util.UUID; -import mage.constants.WatcherScope; /** * @author BetaSteward_at_googlemail.com @@ -74,7 +73,7 @@ public class ArchiveTrap extends CardImpl { } -class ArchiveTrapWatcher extends WatcherImpl { +class ArchiveTrapWatcher extends Watcher { public ArchiveTrapWatcher() { super("LibrarySearched", WatcherScope.PLAYER); diff --git a/Mage.Sets/src/mage/sets/zendikar/ArchmageAscension.java b/Mage.Sets/src/mage/sets/zendikar/ArchmageAscension.java index 16d52661e8..1c546e0915 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ArchmageAscension.java +++ b/Mage.Sets/src/mage/sets/zendikar/ArchmageAscension.java @@ -42,7 +42,7 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInLibrary; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.UUID; @@ -108,7 +108,7 @@ class ArchmageAscensionTriggeredAbility extends TriggeredAbilityImpl { +class CardsDrawnControllerWatcher extends Watcher { int cardsDrawn; diff --git a/Mage.Sets/src/mage/sets/zendikar/BalothCageTrap.java b/Mage.Sets/src/mage/sets/zendikar/BalothCageTrap.java index f6b1aa322e..c9c31f7edd 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BalothCageTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/BalothCageTrap.java @@ -43,7 +43,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -76,7 +76,7 @@ public class BalothCageTrap extends CardImpl { } } -class BalothCageTrapWatcher extends WatcherImpl { +class BalothCageTrapWatcher extends Watcher { public BalothCageTrapWatcher() { super("BalothCageTrapWatcher", WatcherScope.GAME); diff --git a/Mage.Sets/src/mage/sets/zendikar/CobraTrap.java b/Mage.Sets/src/mage/sets/zendikar/CobraTrap.java index ff8d0294b3..97db88dd31 100644 --- a/Mage.Sets/src/mage/sets/zendikar/CobraTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/CobraTrap.java @@ -46,7 +46,6 @@ import mage.game.permanent.token.SnakeToken; import mage.game.stack.StackObject; import mage.players.Player; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -79,7 +78,7 @@ public class CobraTrap extends CardImpl { } } -class CobraTrapWatcher extends WatcherImpl { +class CobraTrapWatcher extends Watcher { public CobraTrapWatcher() { super("noncreature permanent destroyed", WatcherScope.PLAYER); diff --git a/Mage.Sets/src/mage/sets/zendikar/Gomazoa.java b/Mage.Sets/src/mage/sets/zendikar/Gomazoa.java index 678a73c11a..702abe19a7 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Gomazoa.java +++ b/Mage.Sets/src/mage/sets/zendikar/Gomazoa.java @@ -47,7 +47,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -140,7 +140,7 @@ class GomazoaEffect extends OneShotEffect { } } -class BlockedByWatcher extends WatcherImpl { +class BlockedByWatcher extends Watcher { public List blockedByWatcher = new ArrayList<>(); diff --git a/Mage.Sets/src/mage/sets/zendikar/InfernoTrap.java b/Mage.Sets/src/mage/sets/zendikar/InfernoTrap.java index 7ab1a538d3..26fc4c4b56 100644 --- a/Mage.Sets/src/mage/sets/zendikar/InfernoTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/InfernoTrap.java @@ -41,7 +41,7 @@ import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -75,7 +75,7 @@ public class InfernoTrap extends CardImpl { } } -class ControllerDamagedByCreatureWatcher extends WatcherImpl { +class ControllerDamagedByCreatureWatcher extends Watcher { int numCreaturesDamagedController; diff --git a/Mage.Sets/src/mage/sets/zendikar/LavaballTrap.java b/Mage.Sets/src/mage/sets/zendikar/LavaballTrap.java index 67aaaff89e..36f59abc68 100644 --- a/Mage.Sets/src/mage/sets/zendikar/LavaballTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/LavaballTrap.java @@ -45,7 +45,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.common.TargetLandPermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -81,7 +81,7 @@ public class LavaballTrap extends CardImpl { } } -class LavaballTrapWatcher extends WatcherImpl { +class LavaballTrapWatcher extends Watcher { private Map amountOfLandsPlayedThisTurn = new HashMap(); diff --git a/Mage.Sets/src/mage/sets/zendikar/LullmageMentor.java b/Mage.Sets/src/mage/sets/zendikar/LullmageMentor.java index 25613b565d..3f481b6f09 100644 --- a/Mage.Sets/src/mage/sets/zendikar/LullmageMentor.java +++ b/Mage.Sets/src/mage/sets/zendikar/LullmageMentor.java @@ -55,7 +55,7 @@ import mage.game.stack.StackObject; import mage.target.Target; import mage.target.TargetSpell; import mage.target.common.TargetControlledCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -143,7 +143,7 @@ class MerfolkToken extends Token { } } -class CastedSpellsWithSpellTarget extends WatcherImpl { +class CastedSpellsWithSpellTarget extends Watcher { // private Map casted = new HashMap(); diff --git a/Mage.Sets/src/mage/sets/zendikar/MindbreakTrap.java b/Mage.Sets/src/mage/sets/zendikar/MindbreakTrap.java index 0e8116c90d..e664cca9b9 100644 --- a/Mage.Sets/src/mage/sets/zendikar/MindbreakTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/MindbreakTrap.java @@ -47,7 +47,6 @@ import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.target.TargetSpell; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -83,7 +82,7 @@ public class MindbreakTrap extends CardImpl { } } -class MindbreakTrapWatcher extends WatcherImpl { +class MindbreakTrapWatcher extends Watcher { private Map counts = new HashMap(); diff --git a/Mage.Sets/src/mage/sets/zendikar/RuneflareTrap.java b/Mage.Sets/src/mage/sets/zendikar/RuneflareTrap.java index fbaa2df113..0509fe6c53 100644 --- a/Mage.Sets/src/mage/sets/zendikar/RuneflareTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/RuneflareTrap.java @@ -40,7 +40,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; import mage.target.TargetPlayer; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.UUID; @@ -105,7 +105,7 @@ class TargetPlayerCardsInHandCount implements DynamicValue { } } -class CardsDrawnOpponentWatcher extends WatcherImpl { +class CardsDrawnOpponentWatcher extends Watcher { int cardsDrawn; diff --git a/Mage.Sets/src/mage/sets/zendikar/SummoningTrap.java b/Mage.Sets/src/mage/sets/zendikar/SummoningTrap.java index d0f7e773c1..2ae8242abe 100644 --- a/Mage.Sets/src/mage/sets/zendikar/SummoningTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/SummoningTrap.java @@ -51,7 +51,6 @@ import mage.game.stack.StackObject; import mage.players.Player; import mage.target.TargetCard; import mage.watchers.Watcher; -import mage.watchers.WatcherImpl; /** * @@ -89,7 +88,7 @@ public class SummoningTrap extends CardImpl { } } -class SummoningTrapWatcher extends WatcherImpl { +class SummoningTrapWatcher extends Watcher { public SummoningTrapWatcher() { super("CreatureSpellCountered", WatcherScope.PLAYER); diff --git a/Mage.Sets/src/mage/sets/zendikar/WhiplashTrap.java b/Mage.Sets/src/mage/sets/zendikar/WhiplashTrap.java index 1760a7d032..443a5ce8cf 100644 --- a/Mage.Sets/src/mage/sets/zendikar/WhiplashTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/WhiplashTrap.java @@ -43,7 +43,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -78,7 +78,7 @@ public class WhiplashTrap extends CardImpl { } } -class WhiplashTrapWatcher extends WatcherImpl { +class WhiplashTrapWatcher extends Watcher { private Map amountOfCreaturesPlayedThisTurn = new HashMap(); diff --git a/Mage/src/mage/abilities/keyword/MadnessAbility.java b/Mage/src/mage/abilities/keyword/MadnessAbility.java index 3f7555d9ff..b2820c8190 100644 --- a/Mage/src/mage/abilities/keyword/MadnessAbility.java +++ b/Mage/src/mage/abilities/keyword/MadnessAbility.java @@ -15,7 +15,7 @@ import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.UUID; @@ -214,7 +214,7 @@ class MadnessExileEffect extends OneShotEffect { /** * Whenever phase is changed, this watcher returns all cards exiled by madness to graveyard and informs players about it. */ -class MadnessCleanUpWatcher extends WatcherImpl { +class MadnessCleanUpWatcher extends Watcher { public MadnessCleanUpWatcher() { super("MadnessPlayWasCanceled", WatcherScope.GAME); diff --git a/Mage/src/mage/watchers/Watcher.java b/Mage/src/mage/watchers/Watcher.java index 364f9ff2a7..4040e98df9 100644 --- a/Mage/src/mage/watchers/Watcher.java +++ b/Mage/src/mage/watchers/Watcher.java @@ -30,23 +30,74 @@ package mage.watchers; import java.io.Serializable; import java.util.UUID; +import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; /** + * + * watches for certain game events to occur and flags condition * * @author BetaSteward_at_googlemail.com */ -public interface Watcher> extends Serializable { +public abstract class Watcher> implements Serializable { - UUID getControllerId(); - void setControllerId(UUID controllerId); - UUID getSourceId(); - void setSourceId(UUID sourceId); - String getKey(); - void watch(GameEvent event, Game game); - boolean conditionMet(); - void reset(); + protected UUID controllerId; + protected UUID sourceId; + protected String key; + protected boolean condition; + protected WatcherScope scope; - T copy(); + public Watcher(String key, WatcherScope scope) { + this.key = key; + this.scope = scope; + } + + public Watcher(final Watcher watcher) { + this.condition = watcher.condition; + this.key = watcher.key; + this.controllerId = watcher.controllerId; + this.sourceId = watcher.sourceId; + this.scope = watcher.scope; + } + + public UUID getControllerId() { + return controllerId; + } + + public void setControllerId(UUID controllerId) { + this.controllerId = controllerId; + } + + public UUID getSourceId() { + return sourceId; + } + + public void setSourceId(UUID sourceId) { + this.sourceId = sourceId; + } + + public String getKey() { + switch (scope) { + case GAME: + return key; + case PLAYER: + return controllerId + key; + case CARD: + return sourceId + key; + } + return key; + } + + public boolean conditionMet() { + return condition; + } + + public void reset() { + condition = false; + } + + public abstract void watch(GameEvent event, Game game); + + public abstract T copy(); } diff --git a/Mage/src/mage/watchers/WatcherImpl.java b/Mage/src/mage/watchers/WatcherImpl.java deleted file mode 100644 index 9e4fd8ec8c..0000000000 --- a/Mage/src/mage/watchers/WatcherImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ - -package mage.watchers; - -import java.util.UUID; -import mage.constants.WatcherScope; - -/** - * - * watches for certain game events to occur and flags condition - * - * @author BetaSteward_at_googlemail.com - */ -public abstract class WatcherImpl> implements Watcher { - - protected UUID controllerId; - protected UUID sourceId; - protected String key; - protected boolean condition; - protected WatcherScope scope; - - public WatcherImpl(String key, WatcherScope scope) { - this.key = key; - this.scope = scope; - } - - public WatcherImpl(final WatcherImpl watcher) { - this.condition = watcher.condition; - this.key = watcher.key; - this.controllerId = watcher.controllerId; - this.sourceId = watcher.sourceId; - this.scope = watcher.scope; - } - - @Override - public UUID getControllerId() { - return controllerId; - } - - @Override - public void setControllerId(UUID controllerId) { - this.controllerId = controllerId; - } - - @Override - public UUID getSourceId() { - return sourceId; - } - - @Override - public void setSourceId(UUID sourceId) { - this.sourceId = sourceId; - } - - @Override - public String getKey() { - switch (scope) { - case GAME: - return key; - case PLAYER: - return controllerId + key; - case CARD: - return sourceId + key; - } - return key; - } - - @Override - public boolean conditionMet() { - return condition; - } - - @Override - public void reset() { - condition = false; - } - -} diff --git a/Mage/src/mage/watchers/common/AttackedThisTurnWatcher.java b/Mage/src/mage/watchers/common/AttackedThisTurnWatcher.java index 94a74728d5..b4fd2e145e 100644 --- a/Mage/src/mage/watchers/common/AttackedThisTurnWatcher.java +++ b/Mage/src/mage/watchers/common/AttackedThisTurnWatcher.java @@ -30,7 +30,7 @@ package mage.watchers.common; import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.HashSet; import java.util.Set; @@ -39,7 +39,7 @@ import java.util.UUID; /** * @author magenoxx_at_gmail.com */ -public class AttackedThisTurnWatcher extends WatcherImpl { +public class AttackedThisTurnWatcher extends Watcher { public Set attackedThisTurnCreatures = new HashSet(); diff --git a/Mage/src/mage/watchers/common/BloodthirstWatcher.java b/Mage/src/mage/watchers/common/BloodthirstWatcher.java index 9def07f0b8..19c98e9a7c 100644 --- a/Mage/src/mage/watchers/common/BloodthirstWatcher.java +++ b/Mage/src/mage/watchers/common/BloodthirstWatcher.java @@ -31,7 +31,7 @@ import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.UUID; @@ -39,7 +39,7 @@ import java.util.UUID; * Must be installed to player for proper Bloodthirst work * @author Loki */ -public class BloodthirstWatcher extends WatcherImpl { +public class BloodthirstWatcher extends Watcher { public BloodthirstWatcher(UUID controllerId) { super("DamagedOpponents", WatcherScope.PLAYER); this.controllerId = controllerId; diff --git a/Mage/src/mage/watchers/common/CardsDrawnDuringDrawStepWatcher.java b/Mage/src/mage/watchers/common/CardsDrawnDuringDrawStepWatcher.java index fdb883019a..ac8e65f4be 100644 --- a/Mage/src/mage/watchers/common/CardsDrawnDuringDrawStepWatcher.java +++ b/Mage/src/mage/watchers/common/CardsDrawnDuringDrawStepWatcher.java @@ -36,7 +36,7 @@ import mage.constants.PhaseStep; import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @@ -46,7 +46,7 @@ import mage.watchers.WatcherImpl; * */ -public class CardsDrawnDuringDrawStepWatcher extends WatcherImpl { +public class CardsDrawnDuringDrawStepWatcher extends Watcher { private final Map amountOfCardsDrawnThisTurn = new HashMap<>(); diff --git a/Mage/src/mage/watchers/common/CardsPutIntoGraveyardWatcher.java b/Mage/src/mage/watchers/common/CardsPutIntoGraveyardWatcher.java index de0c28b5a0..bbaafe5934 100644 --- a/Mage/src/mage/watchers/common/CardsPutIntoGraveyardWatcher.java +++ b/Mage/src/mage/watchers/common/CardsPutIntoGraveyardWatcher.java @@ -39,7 +39,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * Counts amount of cards put into graveyards of players during the current turn. @@ -47,7 +47,7 @@ import mage.watchers.WatcherImpl; * * @author LevelX2 */ -public class CardsPutIntoGraveyardWatcher extends WatcherImpl { +public class CardsPutIntoGraveyardWatcher extends Watcher { private final Map amountOfCardsThisTurn = new HashMap(); private final Set cardsPutToGraveyardFromBattlefield = new HashSet(); diff --git a/Mage/src/mage/watchers/common/CastFromHandWatcher.java b/Mage/src/mage/watchers/common/CastFromHandWatcher.java index e724786335..084827e8ca 100644 --- a/Mage/src/mage/watchers/common/CastFromHandWatcher.java +++ b/Mage/src/mage/watchers/common/CastFromHandWatcher.java @@ -5,9 +5,9 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; -public class CastFromHandWatcher extends WatcherImpl { +public class CastFromHandWatcher extends Watcher { public CastFromHandWatcher() { super("CastFromHand", WatcherScope.CARD); } diff --git a/Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java b/Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java index ce4a46a8fc..98c9fdaafe 100644 --- a/Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java +++ b/Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java @@ -34,7 +34,7 @@ import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; @@ -42,7 +42,7 @@ import mage.watchers.WatcherImpl; * * @author nantuko, BetaSteward_at_googlemail.com */ -public class CastSpellLastTurnWatcher extends WatcherImpl { +public class CastSpellLastTurnWatcher extends Watcher { private final Map amountOfSpellsCastOnPrevTurn = new HashMap<>(); private final Map amountOfSpellsCastOnCurrentTurn = new HashMap<>(); diff --git a/Mage/src/mage/watchers/common/CommanderCombatDamageWatcher.java b/Mage/src/mage/watchers/common/CommanderCombatDamageWatcher.java index ec294f316f..cab92598eb 100644 --- a/Mage/src/mage/watchers/common/CommanderCombatDamageWatcher.java +++ b/Mage/src/mage/watchers/common/CommanderCombatDamageWatcher.java @@ -39,7 +39,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /* 20130711 *903.14a A player that’s been dealt 21 or more combat damage by the same commander @@ -48,7 +48,7 @@ import mage.watchers.WatcherImpl; * * @author Plopman */ -public class CommanderCombatDamageWatcher extends WatcherImpl { +public class CommanderCombatDamageWatcher extends Watcher { public Map damageToPlayer = new HashMap(); diff --git a/Mage/src/mage/watchers/common/DamagedByWatcher.java b/Mage/src/mage/watchers/common/DamagedByWatcher.java index 220d3c3736..1f846ca109 100644 --- a/Mage/src/mage/watchers/common/DamagedByWatcher.java +++ b/Mage/src/mage/watchers/common/DamagedByWatcher.java @@ -31,7 +31,7 @@ import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.ArrayList; import java.util.List; @@ -41,7 +41,7 @@ import java.util.UUID; * * @author BetaSteward_at_googlemail.com */ -public class DamagedByWatcher extends WatcherImpl { +public class DamagedByWatcher extends Watcher { public List damagedCreatures = new ArrayList<>(); diff --git a/Mage/src/mage/watchers/common/LandfallWatcher.java b/Mage/src/mage/watchers/common/LandfallWatcher.java index a51201bfad..b4876e8c2f 100644 --- a/Mage/src/mage/watchers/common/LandfallWatcher.java +++ b/Mage/src/mage/watchers/common/LandfallWatcher.java @@ -5,13 +5,13 @@ import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * @author BetaSteward_at_googlemail.com * @author Loki */ -public class LandfallWatcher extends WatcherImpl { +public class LandfallWatcher extends Watcher { public LandfallWatcher() { super("LandPlayed", WatcherScope.PLAYER); diff --git a/Mage/src/mage/watchers/common/MiracleWatcher.java b/Mage/src/mage/watchers/common/MiracleWatcher.java index 9b41375936..b02d3a2cdb 100644 --- a/Mage/src/mage/watchers/common/MiracleWatcher.java +++ b/Mage/src/mage/watchers/common/MiracleWatcher.java @@ -45,7 +45,7 @@ import mage.cards.CardsImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; @@ -55,7 +55,7 @@ import mage.watchers.WatcherImpl; * * @author noxx */ -public class MiracleWatcher extends WatcherImpl { +public class MiracleWatcher extends Watcher { private final Map amountOfCardsDrawnThisTurn = new HashMap<>(); diff --git a/Mage/src/mage/watchers/common/MorbidWatcher.java b/Mage/src/mage/watchers/common/MorbidWatcher.java index f8d61e3982..f6cf64d713 100644 --- a/Mage/src/mage/watchers/common/MorbidWatcher.java +++ b/Mage/src/mage/watchers/common/MorbidWatcher.java @@ -35,13 +35,13 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * * @author BetaSteward_at_googlemail.com */ -public class MorbidWatcher extends WatcherImpl { +public class MorbidWatcher extends Watcher { public MorbidWatcher() { super("Morbid", WatcherScope.GAME); diff --git a/Mage/src/mage/watchers/common/PlayerDamagedBySourceWatcher.java b/Mage/src/mage/watchers/common/PlayerDamagedBySourceWatcher.java index 605905bf61..efb75b53d2 100644 --- a/Mage/src/mage/watchers/common/PlayerDamagedBySourceWatcher.java +++ b/Mage/src/mage/watchers/common/PlayerDamagedBySourceWatcher.java @@ -35,14 +35,14 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.util.CardUtil; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * Watcher stores whitch sources did damage to a player * * @author LevelX */ -public class PlayerDamagedBySourceWatcher extends WatcherImpl { +public class PlayerDamagedBySourceWatcher extends Watcher { private Set damageSourceIds = new HashSet(); diff --git a/Mage/src/mage/watchers/common/PlayerGainedLifeWatcher.java b/Mage/src/mage/watchers/common/PlayerGainedLifeWatcher.java index 97bc0d5851..f91b664a4f 100644 --- a/Mage/src/mage/watchers/common/PlayerGainedLifeWatcher.java +++ b/Mage/src/mage/watchers/common/PlayerGainedLifeWatcher.java @@ -35,7 +35,7 @@ import java.util.UUID; import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; @@ -45,7 +45,7 @@ import mage.watchers.WatcherImpl; * * @author LevelX2 */ -public class PlayerGainedLifeWatcher extends WatcherImpl { +public class PlayerGainedLifeWatcher extends Watcher { private Map amountOfLifeGainedThisTurn = new HashMap(); diff --git a/Mage/src/mage/watchers/common/PlayerLostLifeWatcher.java b/Mage/src/mage/watchers/common/PlayerLostLifeWatcher.java index 4bd73ad2fc..f2223f3e48 100644 --- a/Mage/src/mage/watchers/common/PlayerLostLifeWatcher.java +++ b/Mage/src/mage/watchers/common/PlayerLostLifeWatcher.java @@ -35,7 +35,7 @@ import java.util.UUID; import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; @@ -45,7 +45,7 @@ import mage.watchers.WatcherImpl; * * @author LevelX2 */ -public class PlayerLostLifeWatcher extends WatcherImpl { +public class PlayerLostLifeWatcher extends Watcher { private final Map amountOfLifeLostThisTurn = new HashMap<>(); diff --git a/Mage/src/mage/watchers/common/ProwlWatcher.java b/Mage/src/mage/watchers/common/ProwlWatcher.java index 063c8bed82..0b064e5c7b 100644 --- a/Mage/src/mage/watchers/common/ProwlWatcher.java +++ b/Mage/src/mage/watchers/common/ProwlWatcher.java @@ -41,7 +41,7 @@ import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * Watcher stores with which creature subtypes a player made combat damage to @@ -49,7 +49,7 @@ import mage.watchers.WatcherImpl; * * @author LevelX */ -public class ProwlWatcher extends WatcherImpl { +public class ProwlWatcher extends Watcher { private Map> damagingSubtypes = new HashMap>(); private Set allSubtypes = new HashSet(); diff --git a/Mage/src/mage/watchers/common/SoulbondWatcher.java b/Mage/src/mage/watchers/common/SoulbondWatcher.java index ed03e4ae4f..00d7932bf4 100644 --- a/Mage/src/mage/watchers/common/SoulbondWatcher.java +++ b/Mage/src/mage/watchers/common/SoulbondWatcher.java @@ -44,14 +44,14 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetControlledPermanent; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; /** * Reacts on various events to pair or unpair creatures on the battlefield. * * @author noxx */ -public class SoulbondWatcher extends WatcherImpl { +public class SoulbondWatcher extends Watcher { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another not paired creature you control"); diff --git a/Mage/src/mage/watchers/common/SourceDidDamageWatcher.java b/Mage/src/mage/watchers/common/SourceDidDamageWatcher.java index 42ccee335d..b1c96fb29e 100644 --- a/Mage/src/mage/watchers/common/SourceDidDamageWatcher.java +++ b/Mage/src/mage/watchers/common/SourceDidDamageWatcher.java @@ -31,7 +31,7 @@ import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.watchers.WatcherImpl; +import mage.watchers.Watcher; import java.util.ArrayList; import java.util.List; @@ -42,7 +42,7 @@ import java.util.UUID; * * @author jeffwadsworth */ -public class SourceDidDamageWatcher extends WatcherImpl { +public class SourceDidDamageWatcher extends Watcher { public List damageSources = new ArrayList();