forked from External/mage
added reset to Arclight Phoenix watcher
This commit is contained in:
parent
f19d722ab2
commit
2f55ae1d4b
1 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue