forked from External/mage
changed the constructor for a Watcher. Before, you had to explictly pass the name of the watcher as an argument. But most of the time this was the name of the class itself. So the watcher now determines internally its name. The method 'getBasicKey' can be overridden. Also updated some encapsulation
This commit is contained in:
parent
5c1f41f3a7
commit
c4eeec1bb2
178 changed files with 313 additions and 296 deletions
|
|
@ -5,10 +5,8 @@
|
|||
*/
|
||||
package mage.watchers.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -25,11 +23,11 @@ import mage.watchers.Watcher;
|
|||
*/
|
||||
public class SpellsCastWatcher extends Watcher {
|
||||
|
||||
private final HashMap<UUID, List<Spell>> spellsCast = new HashMap<>();
|
||||
private final Map<UUID, List<Spell>> spellsCast = new HashMap<>();
|
||||
private int nonCreatureSpells;
|
||||
|
||||
public SpellsCastWatcher() {
|
||||
super(SpellsCastWatcher.class.getSimpleName(), WatcherScope.GAME);
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
||||
public SpellsCastWatcher(final SpellsCastWatcher watcher) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue