forked from External/mage
add nullchecks on watchers
This commit is contained in:
parent
5cab28182d
commit
95a31759b5
53 changed files with 134 additions and 85 deletions
|
|
@ -24,6 +24,9 @@ public enum NoSpellsWereCastLastTurnCondition implements Condition {
|
|||
}
|
||||
|
||||
CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get(CastSpellLastTurnWatcher.class.getSimpleName());
|
||||
if(watcher == null){
|
||||
return false;
|
||||
}
|
||||
// if any player cast spell, return false
|
||||
for (Integer count : watcher.getAmountOfSpellsCastOnPrevTurn().values()) {
|
||||
if (count > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue