Fixed potential NPE errors in getPhase usage (fixed Berserker's Frenzy, etc)

This commit is contained in:
Oleg Agafonov 2023-03-25 16:01:27 +04:00
parent cfd7464b49
commit a15a0daa04
81 changed files with 162 additions and 130 deletions

View file

@ -47,7 +47,7 @@ public class DontUntapInControllersUntapStepSourceEffect extends ContinuousRuleM
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (game.getTurn().getStepType() == PhaseStep.UNTAP
if (game.getTurnStepType() == PhaseStep.UNTAP
&& event.getTargetId().equals(source.getSourceId())) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null && permanent.isControlledBy(game.getActivePlayerId())) {