From 7da65b38b2ae3546877816941e5d65ed25ac2824 Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Wed, 3 Feb 2021 15:51:48 -0600 Subject: [PATCH] Fixed GoadAttachedAbility in a 2 player game (fixes #7466) --- .../java/mage/abilities/common/GoadAttachedAbility.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/abilities/common/GoadAttachedAbility.java b/Mage/src/main/java/mage/abilities/common/GoadAttachedAbility.java index 2111294b5e..bcf564d900 100644 --- a/Mage/src/main/java/mage/abilities/common/GoadAttachedAbility.java +++ b/Mage/src/main/java/mage/abilities/common/GoadAttachedAbility.java @@ -64,9 +64,15 @@ class GoadAttackEffect extends RestrictionEffect { @Override public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game, boolean canUseChooseDialogs) { - if (defenderId == null) { + if (defenderId == null + || game.getState().getPlayersInRange(attacker.getControllerId(), game).size() == 2) { // just 2 players left, so it may attack you return true; } + // A planeswalker controlled by the controller is the defender + if (game.getPermanent(defenderId) != null) { + return !game.getPermanent(defenderId).getControllerId().equals(source.getControllerId()); + } + // The controller is the defender return !defenderId.equals(source.getControllerId()); } }