From 7b64fc6ed40211f88ec0172fc161af8277c711d6 Mon Sep 17 00:00:00 2001 From: Grath <1895280+Grath@users.noreply.github.com> Date: Mon, 22 Aug 2022 21:28:09 -0400 Subject: [PATCH] [C17] Fix Mirri restriction effect for blockers. Closes #5215 (#9384) --- Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java b/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java index 6ce7d38f3e2..9eb2985b4ec 100644 --- a/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java +++ b/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java @@ -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; } }