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
|
|
@ -1,10 +1,8 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
|
|
@ -45,10 +43,10 @@ public class MeleeAbility extends AttacksTriggeredAbility {
|
|||
|
||||
class MeleeWatcher extends Watcher {
|
||||
|
||||
private HashMap<UUID, Set<UUID>> playersAttacked = new HashMap<>(0);
|
||||
private Map<UUID, Set<UUID>> playersAttacked = new HashMap<>(0);
|
||||
|
||||
MeleeWatcher() {
|
||||
super("MeleeWatcher", WatcherScope.GAME);
|
||||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
||||
MeleeWatcher(final MeleeWatcher watcher) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue