add doc comments for usage of default watchers

This commit is contained in:
xenohedron 2023-11-29 20:57:12 -05:00
parent a4cc086775
commit 1ac4fe4e4a
11 changed files with 28 additions and 6 deletions

View file

@ -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;
}
}

View file

@ -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());

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -15,6 +15,7 @@ public class MorbidWatcher extends Watcher {
/**
* Game default watcher
* TODO: Merge with CreaturesDiedWatcher
*/
public MorbidWatcher() {
super(WatcherScope.GAME);

View file

@ -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);
}

View file

@ -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);
}