From b963168f351e586fae9fa57205a876cd6c17ca3f Mon Sep 17 00:00:00 2001 From: "jeff@delmarus.com" <> Date: Thu, 23 Sep 2021 19:26:01 -0500 Subject: [PATCH] - hopefully line spacing is rectified on my client --- Mage/src/main/java/mage/players/PlayerImpl.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 6a2eb625d3b..94c55f11f4b 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -641,11 +641,14 @@ public abstract class PlayerImpl implements Player, Serializable { } // check for all variants of hexproof and any asthougheffects that would ignore it // TODO there may be "prevented by rule-modification" effects, so add them if known - for (Ability a : abilities) { - if (a instanceof HexproofBaseAbility - && ((HexproofBaseAbility) a).checkObject(source, game) - && game.getContinuousEffects().asThough(this.getId(), AsThoughEffectType.HEXPROOF, null, sourceControllerId, game) == null) { - return false; + if (sourceControllerId != null + && this.hasOpponent(sourceControllerId, game)) { + for (Ability a : abilities) { + if (a instanceof HexproofBaseAbility + && ((HexproofBaseAbility) a).checkObject(source, game) + && game.getContinuousEffects().asThough(this.getId(), AsThoughEffectType.HEXPROOF, null, sourceControllerId, game) == null) { + return false; + } } } return !hasProtectionFrom(source, game);