added reset to Arclight Phoenix watcher

This commit is contained in:
Evan Kranzler 2018-09-13 15:48:07 -04:00
parent f19d722ab2
commit 2f55ae1d4b

View file

@ -72,7 +72,7 @@ enum ArclightPhoenixCondition implements Condition {
= (ArclightPhoenixWatcher) game.getState().getWatchers().get(
ArclightPhoenixWatcher.class.getSimpleName()
);
return watcher.getInstantSorceryCount(source.getControllerId()) > 2;
return watcher != null && watcher.getInstantSorceryCount(source.getControllerId()) > 2;
}
}
@ -108,6 +108,12 @@ class ArclightPhoenixWatcher extends Watcher {
}
}
@Override
public void reset() {
super.reset();
this.instantSorceryCount.clear();
}
public int getInstantSorceryCount(UUID playerId) {
return this.instantSorceryCount.getOrDefault(playerId, 0);
}