The AI routinely targets chars with the invulnerable-to-damage card Impenetrable Nimbus attached, even when other targets are in range. The AI seems to pick the closest target, regardless.
I want to add that characters with Resistant Hide tend to be a magnet for Lightning and Fire attacks too; Equipping it made the first three rooms of Citrine Demon Portal trivial (albeit drawn out) for me.