Fixed a bug of the Revolt ability word that prevented that ot triggered always correctly.

This commit is contained in:
LevelX2 2017-01-21 01:33:46 +01:00
parent cdf05069d2
commit fe4abd26c9
2 changed files with 3 additions and 5 deletions

View file

@ -45,7 +45,7 @@ public class RevoltCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
RevoltWatcher watcher = (RevoltWatcher) game.getState().getWatchers().get("Revolt");
RevoltWatcher watcher = (RevoltWatcher) game.getState().getWatchers().get(RevoltWatcher.class.getName());
return watcher != null && watcher.revoltActive(source.getControllerId());
}

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.watchers.common;
import java.util.HashSet;
@ -49,11 +48,12 @@ public class RevoltWatcher extends Watcher {
private final Set<UUID> revoltActivePlayerIds = new HashSet<>(0);
public RevoltWatcher() {
super("Revolt", WatcherScope.GAME);
super(RevoltWatcher.class.getName(), WatcherScope.GAME);
}
public RevoltWatcher(final RevoltWatcher watcher) {
super(watcher);
this.revoltActivePlayerIds.addAll(watcher.revoltActivePlayerIds);
}
@Override
@ -78,8 +78,6 @@ public class RevoltWatcher extends Watcher {
revoltActivePlayerIds.clear();
}
@Override
public RevoltWatcher copy() {
return new RevoltWatcher(this);