forked from External/mage
Fix Silent Arbiter's blocking conditions to allow one block per player. (#9906)
As reported in #9905 per rule 802.4b, if you somehow have multiple creatures attacking (such as with Myriad in a multiplayer game) each player is allowed to make one block while Silent Arbiter is in play.
This commit is contained in:
parent
894f2910da
commit
37f958b160
1 changed files with 11 additions and 2 deletions
|
|
@ -92,7 +92,16 @@ class SilentArbiterBlockRestrictionEffect extends RestrictionEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game, boolean canUseChooseDialogs) {
|
||||
return game.getCombat().getBlockers().isEmpty();
|
||||
public boolean canBlock(Permanent attacker, Permanent newBlocker, Ability source, Game game, boolean canUseChooseDialogs) {
|
||||
if (attacker == null) {
|
||||
return true;
|
||||
}
|
||||
for (UUID creatureId : game.getCombat().getBlockers()) {
|
||||
Permanent existingBlocker = game.getPermanent(creatureId);
|
||||
if (game.getPlayer(existingBlocker.getControllerId()).hasOpponent(attacker.getControllerId(), game) && existingBlocker.isControlledBy(newBlocker.getControllerId())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue