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
|
|
@ -14,7 +14,10 @@ public class ZuberasDiedDynamicValue implements DynamicValue {
|
|||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
ZuberasDiedWatcher watcher = (ZuberasDiedWatcher) game.getState().getWatchers().get(ZuberasDiedWatcher.class.getSimpleName());
|
||||
return watcher.zuberasDiedThisTurn;
|
||||
if(watcher == null){
|
||||
return 0;
|
||||
}
|
||||
return watcher.zuberasDiedThisTurn;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue