mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
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:
parent
092082118c
commit
5f169381a1
2 changed files with 6 additions and 1 deletions
|
@ -92,7 +92,7 @@ class SignalPestAbility extends EvasionAbility<SignalPestAbility> {
|
|||
|
||||
@Override
|
||||
public SignalPestAbility copy() {
|
||||
return instance;
|
||||
return getInstance();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue