Fixed GoadAttachedAbility in a 2 player game (fixes
@@ -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());
}
}
