Fixed Signal Pest (NPE + effect wasn't applied so any could block). Enhanced canBlock restriction effect - wasn't called for attacker.

This commit is contained in:
magenoxx 2011-06-13 14:47:09 +04:00
parent 092082118c
commit 5f169381a1
2 changed files with 6 additions and 1 deletions

View file

@ -92,7 +92,7 @@ class SignalPestAbility extends EvasionAbility<SignalPestAbility> {
@Override
public SignalPestAbility copy() {
return instance;
return getInstance();
}
}

View file

@ -598,6 +598,11 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
if (!effect.canBlock(attacker, this, game))
return false;
}
// check also attacker's restriction effects
for (RestrictionEffect effect : game.getContinuousEffects().getApplicableRestrictionEffects(attacker, game)) {
if (!effect.canBlock(attacker, this, game))
return false;
}
if (attacker.hasProtectionFrom(this))
return false;
return true;