fixed Monstrous Step targeting

This commit is contained in:
Evan Kranzler 2020-04-23 20:06:03 -04:00
parent 862cdf5420
commit 1ad3a0f768

View file

@ -75,12 +75,11 @@ class MonstrousStepEffect extends RequirementEffect {
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
BlockedAttackerWatcher watcher = game.getState().getWatcher(BlockedAttackerWatcher.class);
if (watcher == null
|| watcher.creatureHasBlockedAttacker(game.getPermanent(source.getFirstTarget()), permanent, game)
|| !permanent.getId().equals(source.getTargets().get(1).getFirstTarget())) {
return permanent.canBlock(source.getFirstTarget(), game);
}
return false;
return permanent != null
&& watcher != null
&& !watcher.creatureHasBlockedAttacker(game.getPermanent(source.getFirstTarget()), permanent, game)
&& permanent.getId().equals(source.getTargets().get(1).getFirstTarget())
&& permanent.canBlock(source.getFirstTarget(), game);
}
@Override