mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
add doc comments for usage of default watchers
This commit is contained in:
parent
a4cc086775
commit
1ac4fe4e4a
11 changed files with 28 additions and 6 deletions
|
|
@ -8,8 +8,6 @@ import mage.game.Game;
|
|||
import mage.watchers.common.CardsDrawnThisTurnWatcher;
|
||||
|
||||
/**
|
||||
* Don't forget to add CardsDrawnThisTurnWatcher in card's definition
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum CardsDrawnThisTurnDynamicValue implements DynamicValue {
|
||||
|
|
@ -45,4 +43,3 @@ public enum CardsDrawnThisTurnDynamicValue implements DynamicValue {
|
|||
return hint;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1340,10 +1340,10 @@ public abstract class GameImpl implements Game {
|
|||
newWatchers.add(new CastSpellLastTurnWatcher());
|
||||
newWatchers.add(new PlayerLostLifeWatcher());
|
||||
newWatchers.add(new BlockedAttackerWatcher());
|
||||
newWatchers.add(new DamageDoneWatcher());
|
||||
newWatchers.add(new PlanarRollWatcher());
|
||||
newWatchers.add(new DamageDoneWatcher()); // TODO: no need to be default watcher
|
||||
newWatchers.add(new PlanarRollWatcher()); // TODO: no need to be default watcher
|
||||
newWatchers.add(new AttackedThisTurnWatcher());
|
||||
newWatchers.add(new PlayersAttackedThisTurnWatcher());
|
||||
newWatchers.add(new PlayersAttackedThisTurnWatcher()); // TODO: no need to be default watcher
|
||||
newWatchers.add(new CardsDrawnThisTurnWatcher());
|
||||
newWatchers.add(new ManaSpentToCastWatcher());
|
||||
newWatchers.add(new ManaPaidSourceWatcher());
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ public class AttackedThisTurnWatcher extends Watcher {
|
|||
// issue with Robber of the Rich. it needs to check the subtype of the LKI of the permanent on the battlefield and this fails with MageObjectReference
|
||||
private final Set<Permanent> attackedThisTurnCreaturesPermanentLKI = new HashSet<>();
|
||||
|
||||
/**
|
||||
* Game default watcher
|
||||
*/
|
||||
public AttackedThisTurnWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ public class BlockingOrBlockedWatcher extends Watcher {
|
|||
|
||||
private final Map<MageObjectReference, Set<MageObjectReference>> blockerMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Game default watcher
|
||||
*/
|
||||
public BlockingOrBlockedWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ public class CommanderPlaysCountWatcher extends Watcher {
|
|||
private final Map<UUID, Integer> playsCount = new HashMap<>();
|
||||
private final Map<UUID, Integer> playerCount = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Game default watcher
|
||||
*/
|
||||
public CommanderPlaysCountWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ public class EndStepCountWatcher extends Watcher {
|
|||
|
||||
private final Map<UUID, Integer> playerMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Game default watcher
|
||||
*/
|
||||
public EndStepCountWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,9 @@ public class ManaPaidSourceWatcher extends Watcher {
|
|||
private static final ManaPaidTracker emptyTracker = new ManaPaidTracker();
|
||||
private final Map<UUID, ManaPaidTracker> manaMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Game default watcher
|
||||
*/
|
||||
public ManaPaidSourceWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ public class ManaSpentToCastWatcher extends Watcher {
|
|||
|
||||
private final Map<MageObjectReference, Mana> manaMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Game default watcher
|
||||
*/
|
||||
public ManaSpentToCastWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ public class MorbidWatcher extends Watcher {
|
|||
|
||||
/**
|
||||
* Game default watcher
|
||||
* TODO: Merge with CreaturesDiedWatcher
|
||||
*/
|
||||
public MorbidWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ public class SpellsCastWatcher extends Watcher {
|
|||
private final Map<UUID, List<Spell>> spellsCastFromGraveyard = new HashMap<>();
|
||||
private int nonCreatureSpells;
|
||||
|
||||
/**
|
||||
* Game default watcher
|
||||
*/
|
||||
public SpellsCastWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ public class TemptedByTheRingWatcher extends Watcher {
|
|||
|
||||
private final Map<UUID, Integer> map = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Game default watcher
|
||||
*/
|
||||
public TemptedByTheRingWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue