I'm working on a reaction which allows a creature to raise its AC in response to being hit by an attack. This reaction will be effective against any single attack that is resolved against the creature's AC.
The creature has the option of using a legendary action to recharge this reaction each turn, at the cost of making a legendary attack, so I'm trying to decide whether the damage prevented (from the reaction) or the damaged caused (from the attack) is more significant in order to decide which to include when calculating the creature's CR.
The legendary attack is a melee weapon attack that does 20 damage to a single character on a successful hit vs AC (+14 to hit). Would you use this when calculating the monster's CR, or would you choose to add to the creature's defensive effective CR in some way to simulate the damage prevented instead? This monster will face 20th level characters.