- hopefully line spacing is rectified on my client

This commit is contained in:
jeff@delmarus.com 2021-09-23 19:26:01 -05:00
parent 3a3e3fda48
commit b963168f35

View file

@ -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);