Implemented Sphinx of the Guildpact

This commit is contained in:
Evan Kranzler 2019-01-10 18:29:43 -05:00
parent d5003a6f8f
commit 7a89d22880
4 changed files with 104 additions and 0 deletions

View file

@ -956,6 +956,14 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
}
}
if (abilities.containsKey(HexproofFromMonocoloredAbility.getInstance().getId())) {
if (game.getPlayer(this.getControllerId()).hasOpponent(sourceControllerId, game)
&& null == game.getContinuousEffects().asThough(this.getId(), AsThoughEffectType.HEXPROOF, null, sourceControllerId, game)
&& !source.getColor(game).isColorless() && !source.getColor(game).isMulticolored()) {
return false;
}
}
if (hasProtectionFrom(source, game)) {
return false;
}