forked from External/mage
Fixed NPE errors in canBlock restrict checks;
This commit is contained in:
parent
454d76e30b
commit
60a0ec03c0
18 changed files with 86 additions and 69 deletions
|
|
@ -1,6 +1,5 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.EvasionAbility;
|
||||
import mage.abilities.MageSingleton;
|
||||
|
|
@ -10,6 +9,8 @@ import mage.constants.Duration;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
|
||||
/**
|
||||
* "Shadow" keyword
|
||||
*
|
||||
|
|
@ -60,6 +61,9 @@ class ShadowEffect extends RestrictionEffect implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
|
||||
if (attacker == null) {
|
||||
return true;
|
||||
}
|
||||
return attacker.getAbilities().containsKey(ShadowAbility.getInstance().getId());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue