mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[refactor] removed Watcher interface and renamed WatcherImpl to Watcher
This commit is contained in:
parent
9a9567c359
commit
0cc5308100
80 changed files with 207 additions and 273 deletions
|
@ -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<MaelstromNexus
|
|||
}
|
||||
}
|
||||
|
||||
class FirstSpellCastThisTurnWatcher extends WatcherImpl<FirstSpellCastThisTurnWatcher> {
|
||||
class FirstSpellCastThisTurnWatcher extends Watcher<FirstSpellCastThisTurnWatcher> {
|
||||
|
||||
int spellCount = 0;
|
||||
|
||||
|
|
|
@ -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<CastCreatureWatcher> {
|
||||
class CastCreatureWatcher extends Watcher<CastCreatureWatcher> {
|
||||
|
||||
public CastCreatureWatcher() {
|
||||
super("CastCreature", WatcherScope.CARD);
|
||||
|
|
|
@ -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<UnscytheEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class EquippedDidDamageWatcher extends WatcherImpl<EquippedDidDamageWatcher> {
|
||||
class EquippedDidDamageWatcher extends Watcher<EquippedDidDamageWatcher> {
|
||||
|
||||
public List<UUID> equippedDamagedTargets = new ArrayList<UUID>();
|
||||
|
||||
|
|
|
@ -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<CavernOfSoulsWatcher> {
|
||||
class CavernOfSoulsWatcher extends Watcher<CavernOfSoulsWatcher> {
|
||||
|
||||
public List<UUID> spells = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -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<GoblinCohortEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class PlayerCastCreatureWatcher extends WatcherImpl<PlayerCastCreatureWatcher> {
|
||||
class PlayerCastCreatureWatcher extends Watcher<PlayerCastCreatureWatcher> {
|
||||
|
||||
Set<UUID> playerIds = new HashSet<>();
|
||||
|
||||
|
|
|
@ -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<KumanosBlessingEffect>
|
|||
|
||||
}
|
||||
|
||||
class DamagedByEnchantedWatcher extends WatcherImpl<DamagedByEnchantedWatcher> {
|
||||
class DamagedByEnchantedWatcher extends Watcher<DamagedByEnchantedWatcher> {
|
||||
|
||||
public List<UUID> damagedCreatures = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -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<CreatureEnteredBattlefieldLastTurnWatcher> {
|
||||
class CreatureEnteredBattlefieldLastTurnWatcher extends Watcher<CreatureEnteredBattlefieldLastTurnWatcher> {
|
||||
|
||||
private boolean anotherCreatureEntered = false;
|
||||
|
||||
|
|
|
@ -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<SpiritOfTheLabyrinth> {
|
|||
}
|
||||
}
|
||||
|
||||
class SpiritOfTheLabyrinthWatcher extends WatcherImpl<SpiritOfTheLabyrinthWatcher> {
|
||||
class SpiritOfTheLabyrinthWatcher extends Watcher<SpiritOfTheLabyrinthWatcher> {
|
||||
|
||||
public SpiritOfTheLabyrinthWatcher() {
|
||||
super("DrewCard", WatcherScope.PLAYER);
|
||||
|
|
|
@ -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<BoseijuWhoSheltersAll> {
|
|||
}
|
||||
}
|
||||
|
||||
class BoseijuWhoSheltersAllWatcher extends WatcherImpl<BoseijuWhoSheltersAllWatcher> {
|
||||
class BoseijuWhoSheltersAllWatcher extends Watcher<BoseijuWhoSheltersAllWatcher> {
|
||||
|
||||
public List<UUID> spells = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -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<FloatingDreamZubera> {
|
|||
}
|
||||
|
||||
|
||||
class ZuberasDiedWatcher extends WatcherImpl<ZuberasDiedWatcher> {
|
||||
class ZuberasDiedWatcher extends Watcher<ZuberasDiedWatcher> {
|
||||
|
||||
public int zuberasDiedThisTurn = 0;
|
||||
|
||||
|
|
|
@ -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<SiftThroughSandsWatcher> {
|
||||
class SiftThroughSandsWatcher extends Watcher<SiftThroughSandsWatcher> {
|
||||
|
||||
boolean castPeerThroughDepths = false;
|
||||
boolean castReachThroughMists = false;
|
||||
|
|
|
@ -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<FellShepherd> {
|
|||
}
|
||||
}
|
||||
|
||||
class FellShepherdWatcher extends WatcherImpl<FellShepherdWatcher> {
|
||||
class FellShepherdWatcher extends Watcher<FellShepherdWatcher> {
|
||||
|
||||
private Set<UUID> creatureIds = new HashSet<UUID>();
|
||||
|
||||
|
|
|
@ -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<JelevaNephaliasCastEffect>
|
|||
}
|
||||
}
|
||||
|
||||
class JelevaNephaliasWatcher extends WatcherImpl<JelevaNephaliasWatcher> {
|
||||
class JelevaNephaliasWatcher extends Watcher<JelevaNephaliasWatcher> {
|
||||
|
||||
private Map<Integer, Integer> manaSpendToCast = new HashMap<Integer, Integer>(); // cast
|
||||
|
||||
|
|
|
@ -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<OpalPalaceManaEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class OpalPalaceWatcher extends WatcherImpl<OpalPalaceWatcher> {
|
||||
class OpalPalaceWatcher extends Watcher<OpalPalaceWatcher> {
|
||||
|
||||
public List<UUID> commanderId = new ArrayList<UUID>();
|
||||
|
||||
|
|
|
@ -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<CurseOfExhaustion> {
|
|||
}
|
||||
}
|
||||
|
||||
class CurseOfExhaustionWatcher extends WatcherImpl<CurseOfExhaustionWatcher> {
|
||||
class CurseOfExhaustionWatcher extends Watcher<CurseOfExhaustionWatcher> {
|
||||
|
||||
public CurseOfExhaustionWatcher() {
|
||||
super("SpellCast", WatcherScope.PLAYER);
|
||||
|
|
|
@ -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<DungeonGeistsEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class DungeonGeistsWatcher extends WatcherImpl<DungeonGeistsWatcher> {
|
||||
class DungeonGeistsWatcher extends Watcher<DungeonGeistsWatcher> {
|
||||
|
||||
DungeonGeistsWatcher () {
|
||||
super("ControlLost", WatcherScope.CARD);
|
||||
|
|
|
@ -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<DreamThiefWatcher> {
|
||||
class DreamThiefWatcher extends Watcher<DreamThiefWatcher> {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell();
|
||||
static {
|
||||
|
|
|
@ -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<ActivatedAbilityUsedThisTurnWatcher> {
|
||||
class ActivatedAbilityUsedThisTurnWatcher extends Watcher<ActivatedAbilityUsedThisTurnWatcher> {
|
||||
|
||||
public Set<UUID> activatedThisTurn = new HashSet<UUID>();
|
||||
|
||||
|
|
|
@ -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<HotHeadedGiantWatcher> {
|
||||
class HotHeadedGiantWatcher extends Watcher<HotHeadedGiantWatcher> {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell();
|
||||
static {
|
||||
|
|
|
@ -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<SoulReapWatcher> {
|
||||
class SoulReapWatcher extends Watcher<SoulReapWatcher> {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell();
|
||||
|
||||
|
|
|
@ -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<TalarasBattalionWatcher> {
|
||||
class TalarasBattalionWatcher extends Watcher<TalarasBattalionWatcher> {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell();
|
||||
|
||||
|
|
|
@ -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<SylvanLibraryEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class CardsDrawnThisTurnWatcher extends WatcherImpl<CardsDrawnThisTurnWatcher> {
|
||||
class CardsDrawnThisTurnWatcher extends Watcher<CardsDrawnThisTurnWatcher> {
|
||||
|
||||
private final Set<UUID> cardsDrawnThisTurn = new HashSet<UUID>();
|
||||
|
||||
|
|
|
@ -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<PatriciansScornWatcher> {
|
||||
class PatriciansScornWatcher extends Watcher<PatriciansScornWatcher> {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell();
|
||||
static {
|
||||
|
|
|
@ -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<AureliasFuryCantC
|
|||
}
|
||||
}
|
||||
|
||||
class AureliasFuryDamagedByWatcher extends WatcherImpl<AureliasFuryDamagedByWatcher> {
|
||||
class AureliasFuryDamagedByWatcher extends Watcher<AureliasFuryDamagedByWatcher> {
|
||||
|
||||
public List<UUID> damagedCreatures = new ArrayList<UUID>();
|
||||
public List<UUID> damagedPlayers = new ArrayList<UUID>();
|
||||
|
|
|
@ -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<IncursionTriggeredA
|
|||
}
|
||||
}
|
||||
|
||||
class IncursionWatcher extends WatcherImpl<IncursionWatcher> {
|
||||
class IncursionWatcher extends Watcher<IncursionWatcher> {
|
||||
|
||||
int spellCount = 0;
|
||||
|
||||
|
|
|
@ -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<QuickenAsThoughEffect> {
|
|||
|
||||
}
|
||||
|
||||
class QuickenWatcher extends WatcherImpl<QuickenWatcher> {
|
||||
class QuickenWatcher extends Watcher<QuickenWatcher> {
|
||||
|
||||
public List<String> activeQuickenSpells = new ArrayList<String>();
|
||||
|
||||
|
|
|
@ -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<TinderWall> {
|
|||
}
|
||||
|
||||
|
||||
class BlockedByWatcher extends WatcherImpl<BlockedByWatcher> {
|
||||
class BlockedByWatcher extends Watcher<BlockedByWatcher> {
|
||||
|
||||
public List<UUID> blockedByWatcher = new ArrayList<UUID>();
|
||||
|
||||
|
|
|
@ -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<CivilizedScholar> {
|
|||
}
|
||||
}
|
||||
|
||||
class HomicidalBruteWatcher extends WatcherImpl<HomicidalBruteWatcher> {
|
||||
class HomicidalBruteWatcher extends Watcher<HomicidalBruteWatcher> {
|
||||
|
||||
public HomicidalBruteWatcher() {
|
||||
super("HomicidalBruteAttacked", WatcherScope.CARD);
|
||||
|
|
|
@ -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<WindbriskHeights> {
|
|||
}
|
||||
}
|
||||
|
||||
class WindbriskHeightsWatcher extends WatcherImpl<WindbriskHeightsWatcher> {
|
||||
class WindbriskHeightsWatcher extends Watcher<WindbriskHeightsWatcher> {
|
||||
|
||||
private int numberOfattackers;
|
||||
|
||||
|
|
|
@ -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<AngelicArbiter> {
|
|||
|
||||
}
|
||||
|
||||
class AngelicArbiterWatcher1 extends WatcherImpl<AngelicArbiterWatcher1> {
|
||||
class AngelicArbiterWatcher1 extends Watcher<AngelicArbiterWatcher1> {
|
||||
|
||||
public AngelicArbiterWatcher1() {
|
||||
super("OpponentCastSpell", WatcherScope.PLAYER);
|
||||
|
@ -104,7 +103,7 @@ class AngelicArbiterWatcher1 extends WatcherImpl<AngelicArbiterWatcher1> {
|
|||
|
||||
}
|
||||
|
||||
class AngelicArbiterWatcher2 extends WatcherImpl<AngelicArbiterWatcher2> {
|
||||
class AngelicArbiterWatcher2 extends Watcher<AngelicArbiterWatcher2> {
|
||||
|
||||
public AngelicArbiterWatcher2() {
|
||||
super("OpponentAttacked", WatcherScope.PLAYER);
|
||||
|
|
|
@ -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<FaithsRewardEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class FaithsRewardWatcher extends WatcherImpl<FaithsRewardWatcher> {
|
||||
class FaithsRewardWatcher extends Watcher<FaithsRewardWatcher> {
|
||||
ArrayList<UUID> cards = new ArrayList<UUID>();
|
||||
|
||||
public FaithsRewardWatcher() {
|
||||
|
|
|
@ -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<SavageSummoningAs
|
|||
}
|
||||
|
||||
|
||||
class SavageSummoningWatcher extends WatcherImpl<SavageSummoningWatcher> {
|
||||
class SavageSummoningWatcher extends Watcher<SavageSummoningWatcher> {
|
||||
|
||||
private Set<String> savageSummoningSpells = new HashSet<String>();;
|
||||
private Map<UUID, Set<String>> spellsCastWithSavageSummoning = new LinkedHashMap<UUID, Set<String>>();
|
||||
|
|
|
@ -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<TidebinderMageEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class TidebinderMageWatcher extends WatcherImpl<TidebinderMageWatcher> {
|
||||
class TidebinderMageWatcher extends Watcher<TidebinderMageWatcher> {
|
||||
|
||||
TidebinderMageWatcher () {
|
||||
super("ControlLost", WatcherScope.CARD);
|
||||
|
|
|
@ -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<SecondSunriseEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class SecondSunriseWatcher extends WatcherImpl<SecondSunriseWatcher> {
|
||||
class SecondSunriseWatcher extends Watcher<SecondSunriseWatcher> {
|
||||
ArrayList<UUID> cards = new ArrayList<UUID>();
|
||||
|
||||
public SecondSunriseWatcher() {
|
||||
|
|
|
@ -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<CathedralMembraneEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class CathedralMembraneWatcher extends WatcherImpl<CathedralMembraneWatcher> {
|
||||
class CathedralMembraneWatcher extends Watcher<CathedralMembraneWatcher> {
|
||||
|
||||
public List<UUID> blockedCreatures = new ArrayList<UUID>();
|
||||
|
||||
|
|
|
@ -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<FreshMeat> {
|
|||
}
|
||||
}
|
||||
|
||||
class FreshMeatWatcher extends WatcherImpl<FreshMeatWatcher> {
|
||||
class FreshMeatWatcher extends Watcher<FreshMeatWatcher> {
|
||||
|
||||
private int creaturesCount = 0;
|
||||
|
||||
|
|
|
@ -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<GainReboundEffect> {
|
|||
|
||||
class AttachedReboundAbility extends ReboundAbility {}
|
||||
|
||||
class LeavesBattlefieldWatcher extends WatcherImpl<LeavesBattlefieldWatcher> {
|
||||
class LeavesBattlefieldWatcher extends Watcher<LeavesBattlefieldWatcher> {
|
||||
|
||||
public LeavesBattlefieldWatcher() {
|
||||
super("LeavesBattlefieldWatcher", WatcherScope.CARD);
|
||||
|
|
|
@ -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<VengevineAbility> {
|
|||
}
|
||||
|
||||
|
||||
class VengevineWatcher extends WatcherImpl<VengevineWatcher> {
|
||||
class VengevineWatcher extends Watcher<VengevineWatcher> {
|
||||
|
||||
int creatureSpellCount = 0;
|
||||
|
||||
|
|
|
@ -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<FleshAllergy> {
|
|||
}
|
||||
}
|
||||
|
||||
class FleshAllergyWatcher extends WatcherImpl<FleshAllergyWatcher> {
|
||||
class FleshAllergyWatcher extends Watcher<FleshAllergyWatcher> {
|
||||
|
||||
public int creaturesDiedThisTurn = 0;
|
||||
|
||||
|
|
|
@ -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<MoltenPsycheEffect> {
|
|||
|
||||
}
|
||||
|
||||
class MoltenPsycheWatcher extends WatcherImpl<MoltenPsycheWatcher> {
|
||||
class MoltenPsycheWatcher extends Watcher<MoltenPsycheWatcher> {
|
||||
|
||||
private final Map<UUID, Integer> draws = new HashMap<>();
|
||||
|
||||
|
|
|
@ -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<SteelHellkiteWatcher> {
|
||||
class SteelHellkiteWatcher extends Watcher<SteelHellkiteWatcher> {
|
||||
|
||||
public List<UUID> damagedPlayers = new ArrayList<UUID>();
|
||||
|
||||
|
|
|
@ -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<TunnelIgnus> {
|
|||
|
||||
}
|
||||
|
||||
class TunnelIgnusWatcher extends WatcherImpl {
|
||||
class TunnelIgnusWatcher extends Watcher {
|
||||
protected Map<UUID, Integer> counts = new HashMap<UUID, Integer>();
|
||||
|
||||
public TunnelIgnusWatcher() {
|
||||
|
|
|
@ -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<EtherswornCanonist> {
|
|||
}
|
||||
}
|
||||
|
||||
class EtherswornCanonistWatcher extends WatcherImpl<EtherswornCanonistWatcher> {
|
||||
class EtherswornCanonistWatcher extends Watcher<EtherswornCanonistWatcher> {
|
||||
|
||||
private Map<UUID, Boolean> castNonartifactSpell = new HashMap<UUID, Boolean>();
|
||||
|
||||
|
|
|
@ -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<Shipbreak
|
|||
}
|
||||
}
|
||||
|
||||
class ShipbreakerKrakenWatcher extends WatcherImpl<ShipbreakerKrakenWatcher> {
|
||||
class ShipbreakerKrakenWatcher extends Watcher<ShipbreakerKrakenWatcher> {
|
||||
|
||||
ShipbreakerKrakenWatcher () {
|
||||
super("ControlLost", WatcherScope.CARD);
|
||||
|
|
|
@ -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<TritonTacticsEndOfCom
|
|||
}
|
||||
}
|
||||
|
||||
class BlockedCreaturesWatcher extends WatcherImpl<BlockedCreaturesWatcher> {
|
||||
class BlockedCreaturesWatcher extends Watcher<BlockedCreaturesWatcher> {
|
||||
|
||||
public BlockedCreaturesWatcher() {
|
||||
super("BlockedCreatures", WatcherScope.CARD);
|
||||
|
|
|
@ -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<PermafrostTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class PermafrostTrapWatcher extends WatcherImpl<PermafrostTrapWatcher> {
|
||||
class PermafrostTrapWatcher extends Watcher<PermafrostTrapWatcher> {
|
||||
|
||||
public PermafrostTrapWatcher() {
|
||||
super("PermafrostTrapWatcher", WatcherScope.GAME);
|
||||
|
|
|
@ -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<RefractionTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class RefractionTrapWatcher extends WatcherImpl<RefractionTrapWatcher> {
|
||||
class RefractionTrapWatcher extends Watcher<RefractionTrapWatcher> {
|
||||
|
||||
public RefractionTrapWatcher() {
|
||||
super("RefractionTrapWatcher", WatcherScope.GAME);
|
||||
|
|
|
@ -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<RicochetTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class RicochetTrapWatcher extends WatcherImpl<RicochetTrapWatcher> {
|
||||
class RicochetTrapWatcher extends Watcher<RicochetTrapWatcher> {
|
||||
|
||||
public RicochetTrapWatcher() {
|
||||
super("RicochetTrapWatcher", WatcherScope.GAME);
|
||||
|
|
|
@ -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<ArchiveTrap> {
|
|||
|
||||
}
|
||||
|
||||
class ArchiveTrapWatcher extends WatcherImpl<ArchiveTrapWatcher> {
|
||||
class ArchiveTrapWatcher extends Watcher<ArchiveTrapWatcher> {
|
||||
|
||||
public ArchiveTrapWatcher() {
|
||||
super("LibrarySearched", WatcherScope.PLAYER);
|
||||
|
|
|
@ -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<ArchmageAsc
|
|||
}
|
||||
}
|
||||
|
||||
class CardsDrawnControllerWatcher extends WatcherImpl<CardsDrawnControllerWatcher> {
|
||||
class CardsDrawnControllerWatcher extends Watcher<CardsDrawnControllerWatcher> {
|
||||
|
||||
int cardsDrawn;
|
||||
|
||||
|
|
|
@ -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<BalothCageTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class BalothCageTrapWatcher extends WatcherImpl<BalothCageTrapWatcher> {
|
||||
class BalothCageTrapWatcher extends Watcher<BalothCageTrapWatcher> {
|
||||
|
||||
public BalothCageTrapWatcher() {
|
||||
super("BalothCageTrapWatcher", WatcherScope.GAME);
|
||||
|
|
|
@ -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<CobraTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class CobraTrapWatcher extends WatcherImpl<CobraTrapWatcher> {
|
||||
class CobraTrapWatcher extends Watcher<CobraTrapWatcher> {
|
||||
|
||||
public CobraTrapWatcher() {
|
||||
super("noncreature permanent destroyed", WatcherScope.PLAYER);
|
||||
|
|
|
@ -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<GomazoaEffect> {
|
|||
}
|
||||
}
|
||||
|
||||
class BlockedByWatcher extends WatcherImpl<BlockedByWatcher> {
|
||||
class BlockedByWatcher extends Watcher<BlockedByWatcher> {
|
||||
|
||||
public List<UUID> blockedByWatcher = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -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<InfernoTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class ControllerDamagedByCreatureWatcher extends WatcherImpl<ControllerDamagedByCreatureWatcher> {
|
||||
class ControllerDamagedByCreatureWatcher extends Watcher<ControllerDamagedByCreatureWatcher> {
|
||||
|
||||
int numCreaturesDamagedController;
|
||||
|
||||
|
|
|
@ -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<LavaballTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class LavaballTrapWatcher extends WatcherImpl<LavaballTrapWatcher> {
|
||||
class LavaballTrapWatcher extends Watcher<LavaballTrapWatcher> {
|
||||
|
||||
private Map<UUID, Integer> amountOfLandsPlayedThisTurn = new HashMap<UUID, Integer>();
|
||||
|
||||
|
|
|
@ -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<CastedSpellsWithSpellTarget> {
|
||||
class CastedSpellsWithSpellTarget extends Watcher<CastedSpellsWithSpellTarget> {
|
||||
|
||||
// <SourceId_TargetSpellId, controllerId>
|
||||
private Map<String, UUID> casted = new HashMap<String, UUID>();
|
||||
|
|
|
@ -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<MindbreakTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class MindbreakTrapWatcher extends WatcherImpl<MindbreakTrapWatcher> {
|
||||
class MindbreakTrapWatcher extends Watcher<MindbreakTrapWatcher> {
|
||||
|
||||
private Map<UUID, Integer> counts = new HashMap<UUID, Integer>();
|
||||
|
||||
|
|
|
@ -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<CardsDrawnOpponentWatcher> {
|
||||
class CardsDrawnOpponentWatcher extends Watcher<CardsDrawnOpponentWatcher> {
|
||||
|
||||
int cardsDrawn;
|
||||
|
||||
|
|
|
@ -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<SummoningTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class SummoningTrapWatcher extends WatcherImpl<SummoningTrapWatcher> {
|
||||
class SummoningTrapWatcher extends Watcher<SummoningTrapWatcher> {
|
||||
|
||||
public SummoningTrapWatcher() {
|
||||
super("CreatureSpellCountered", WatcherScope.PLAYER);
|
||||
|
|
|
@ -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<WhiplashTrap> {
|
|||
}
|
||||
}
|
||||
|
||||
class WhiplashTrapWatcher extends WatcherImpl<WhiplashTrapWatcher> {
|
||||
class WhiplashTrapWatcher extends Watcher<WhiplashTrapWatcher> {
|
||||
|
||||
private Map<UUID, Integer> amountOfCreaturesPlayedThisTurn = new HashMap<UUID, Integer>();
|
||||
|
||||
|
|
|
@ -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<MadnessExileEffect> {
|
|||
/**
|
||||
* Whenever phase is changed, this watcher returns all cards exiled by madness to graveyard and informs players about it.
|
||||
*/
|
||||
class MadnessCleanUpWatcher extends WatcherImpl<MadnessCleanUpWatcher> {
|
||||
class MadnessCleanUpWatcher extends Watcher<MadnessCleanUpWatcher> {
|
||||
|
||||
public MadnessCleanUpWatcher() {
|
||||
super("MadnessPlayWasCanceled", WatcherScope.GAME);
|
||||
|
|
|
@ -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<T extends Watcher<T>> extends Serializable {
|
||||
public abstract class Watcher<T extends Watcher<T>> 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();
|
||||
}
|
||||
|
|
|
@ -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<T extends WatcherImpl<T>> implements Watcher<T> {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
|
@ -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<AttackedThisTurnWatcher> {
|
||||
public class AttackedThisTurnWatcher extends Watcher<AttackedThisTurnWatcher> {
|
||||
|
||||
public Set<UUID> attackedThisTurnCreatures = new HashSet<UUID>();
|
||||
|
||||
|
|
|
@ -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<BloodthirstWatcher> {
|
||||
public class BloodthirstWatcher extends Watcher<BloodthirstWatcher> {
|
||||
public BloodthirstWatcher(UUID controllerId) {
|
||||
super("DamagedOpponents", WatcherScope.PLAYER);
|
||||
this.controllerId = controllerId;
|
||||
|
|
|
@ -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<CardsDrawnDuringDrawStepWatcher> {
|
||||
public class CardsDrawnDuringDrawStepWatcher extends Watcher<CardsDrawnDuringDrawStepWatcher> {
|
||||
|
||||
private final Map<UUID, Integer> amountOfCardsDrawnThisTurn = new HashMap<>();
|
||||
|
||||
|
|
|
@ -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<CardsPutIntoGraveyardWatcher> {
|
||||
public class CardsPutIntoGraveyardWatcher extends Watcher<CardsPutIntoGraveyardWatcher> {
|
||||
|
||||
private final Map<UUID, Integer> amountOfCardsThisTurn = new HashMap<UUID, Integer>();
|
||||
private final Set<UUID> cardsPutToGraveyardFromBattlefield = new HashSet<UUID>();
|
||||
|
|
|
@ -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<CastFromHandWatcher> {
|
||||
public class CastFromHandWatcher extends Watcher<CastFromHandWatcher> {
|
||||
public CastFromHandWatcher() {
|
||||
super("CastFromHand", WatcherScope.CARD);
|
||||
}
|
||||
|
|
|
@ -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<CastSpellLastTurnWatcher> {
|
||||
public class CastSpellLastTurnWatcher extends Watcher<CastSpellLastTurnWatcher> {
|
||||
|
||||
private final Map<UUID, Integer> amountOfSpellsCastOnPrevTurn = new HashMap<>();
|
||||
private final Map<UUID, Integer> amountOfSpellsCastOnCurrentTurn = new HashMap<>();
|
||||
|
|
|
@ -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<CommanderCombatDamageWatcher> {
|
||||
public class CommanderCombatDamageWatcher extends Watcher<CommanderCombatDamageWatcher> {
|
||||
|
||||
public Map<UUID, Integer> damageToPlayer = new HashMap<UUID, Integer>();
|
||||
|
||||
|
|
|
@ -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<DamagedByWatcher> {
|
||||
public class DamagedByWatcher extends Watcher<DamagedByWatcher> {
|
||||
|
||||
public List<UUID> damagedCreatures = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -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<LandfallWatcher> {
|
||||
public class LandfallWatcher extends Watcher<LandfallWatcher> {
|
||||
|
||||
public LandfallWatcher() {
|
||||
super("LandPlayed", WatcherScope.PLAYER);
|
||||
|
|
|
@ -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<MiracleWatcher> {
|
||||
public class MiracleWatcher extends Watcher<MiracleWatcher> {
|
||||
|
||||
private final Map<UUID, Integer> amountOfCardsDrawnThisTurn = new HashMap<>();
|
||||
|
||||
|
|
|
@ -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<MorbidWatcher> {
|
||||
public class MorbidWatcher extends Watcher<MorbidWatcher> {
|
||||
|
||||
public MorbidWatcher() {
|
||||
super("Morbid", WatcherScope.GAME);
|
||||
|
|
|
@ -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<PlayerDamagedBySourceWatcher> {
|
||||
public class PlayerDamagedBySourceWatcher extends Watcher<PlayerDamagedBySourceWatcher> {
|
||||
|
||||
private Set<String> damageSourceIds = new HashSet<String>();
|
||||
|
||||
|
|
|
@ -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<PlayerGainedLifeWatcher> {
|
||||
public class PlayerGainedLifeWatcher extends Watcher<PlayerGainedLifeWatcher> {
|
||||
|
||||
private Map<UUID, Integer> amountOfLifeGainedThisTurn = new HashMap<UUID, Integer>();
|
||||
|
||||
|
|
|
@ -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<PlayerLostLifeWatcher> {
|
||||
public class PlayerLostLifeWatcher extends Watcher<PlayerLostLifeWatcher> {
|
||||
|
||||
private final Map<UUID, Integer> amountOfLifeLostThisTurn = new HashMap<>();
|
||||
|
||||
|
|
|
@ -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<ProwlWatcher> {
|
||||
public class ProwlWatcher extends Watcher<ProwlWatcher> {
|
||||
|
||||
private Map<UUID, Set<String>> damagingSubtypes = new HashMap<UUID, Set<String>>();
|
||||
private Set<UUID> allSubtypes = new HashSet<UUID>();
|
||||
|
|
|
@ -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<SoulbondWatcher> {
|
||||
public class SoulbondWatcher extends Watcher<SoulbondWatcher> {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another not paired creature you control");
|
||||
|
||||
|
|
|
@ -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<SourceDidDamageWatcher> {
|
||||
public class SourceDidDamageWatcher extends Watcher<SourceDidDamageWatcher> {
|
||||
|
||||
public List<UUID> damageSources = new ArrayList<UUID>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue