mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
parent
65fc421f50
commit
7b64fc6ed4
1 changed files with 4 additions and 3 deletions
|
@ -78,12 +78,13 @@ class MirriWeatherlightDuelistBlockRestrictionEffect extends RestrictionEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game, boolean canUseChooseDialogs) {
|
||||
public boolean canBlock(Permanent attacker, Permanent newBlocker, Ability source, Game game, boolean canUseChooseDialogs) {
|
||||
if (attacker == null) {
|
||||
return true;
|
||||
}
|
||||
for (UUID creature : game.getCombat().getBlockers()) {
|
||||
if (game.getPlayer(game.getPermanent(creature).getOwnerId()).hasOpponent(attacker.getControllerId(), game)) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue