Yes it does protect you from Shocking Grasp.
Shield from the SRD.
An Invisible barrier of magical force appears and protects you. Until the start of your next turn, you have a +5 bonus to AC, including against the triggering Attack, and you take no damage from Magic Missile.
It doesn't say that it can't block cantrip damage. In addition it increases the AC for the attack that you use the reaction on.
Shocking Grasp from the SRD.
Lightning springs from your hand to deliver a shock to a creature you try to touch. Make a melee spell Attack against the target. You have advantage on the Attack roll if the target is wearing armor made of metal. On a hit, the target takes 1d8 lightning damage, and it can't take reactions until the start of its next turn.
It doesn't say that it can't be blocked by the spell shield. It is a melee spell Attack which according to shield it just needs to be an 'Attack' for the reaction trigger. In addition you take damage and can't take reactions together so if you can prevent the first you have to prevent the other since it is a chain linked by 'and' in this situation.
After you cast shield the resolution happens because shield allows you to increase your AC before the Attack so you can potentially prevent the attack from hitting you.
From these two spells this is how the flow seems to turn out using page 194 of the PHB 'Making an Attack' step three.
You make the attack roll. On a hit, you roll damage, unless the particular attack has rules that specify otherwise. Some attacks cause special effects in addition to or instead of damage.
This wording the shield effect would take place on the comma in this interpretation of "On a hit, you roll damage..." So it breaks the flow into these actions steps:
- Determine hit is successful. Player doesn't know total so they can't metagame in this situation.
- Shield reactions are triggered allowing you to increase your AC, including the triggering attack.
- Re-determine if the hit is successful. There is still a chance that it is if the player can't metagame this knowledge. e.g. the player's AC is 15, but the attacker rolled a 20 total for hitting the player.
Since the reaction prevention only comes with the damage that is dealt and shield could prevent the damage from being dealt in the first place it seems to reason that shield can be used since you would be able to prevent the damage.
Now if the attack roll and damage roll happened at the same time then no you wouldn't be able to prevent this, but there is an ordered set of steps in the 'Make an Attack' step 3 outline where hit must come before damage.
It depends how you consider the game world to work
Dodging ends at the start of your turn, if the NPC immediately takes the dodge action, has any time passed between one dodge and the other? In my opinion the NPC never stopped dodging. Even if they did, I'm not convinced there is any perceivable way to notice if someone is ready to dodge or not.
The second problem I have with this trigger is that triggers when dodging ends. The rules for readying an action state:
First, you decide what perceivable circumstance will trigger your reaction
Turns don't exist to PCs, so it's hard to imagine that dodge ending when the NPCs turn comes around is something that can be observed.
Overall I find that trigger too technical, and doesn't really take into account the way the game world is functioning. I don't see any other way to make the ready action work here, without DM fiat (more on that later).
I would ask for what the player is looking for, what they expect their PC to be reacting to. If they give some mechanical answer about turns or actions, then that's a good sign that their trigger isn't legal.
What other options did the player have?
One simple way to counter dodging is to grapple the target. A grappled target's speed is 0, which means they can't benefit from dodging. Since it uses a grapple check instead of an attack roll, they don't have advantage from dodge.
Similarly you could use shove to push them prone, in which case dodge's advantage is countered by advantage when attacking prone targets from 5ft.
Another option is to get out of sight. Depending on the situation this may he easier or harder. If you can break line of sight (or hide) then dodge doesn't give advantage against attacks.
Dodge back. Clearly the NPC likes dodging, perhaps by dodging back they will be forced to change tactics or that will be enough to earn their respect.
As a DM you may allow some clever reactions. For example perhaps readying an action for when the Bladesinger attacks. Even though the PC may be hit too, the Bladesinger has to commit in order to attack, so as a DM it may be a fair ruling to say that the Bladesinger isn't dodging while attacking. Waiting for other distractions or setting a trap for the Bladesinger may be acceptable to you too, but all of this is just DM fiat.
Best Answer
Shield cannot be used as a reaction to damage
5th edition generally does a good job choosing language that deliberately interacts with other language (especially for the "core" set of rules: Monster Manual, Players Handbook, and Dungeon Masters Guide).
So, let's take another look at the abilities in question:
and
Shield can only be used against attacks (or Magic Missile), and the damage from Fire Form is not an attack (nor is it Magic Missile). There's no roll or targeting, it just happens.
Worth noting: not all reaction spells are the same.
Some reaction spells would qualify against Fire Form.
For example, Absorb Elements grants you resistance against the element that damages you and lets you deal damage of that type, while Hellish Rebuke deals fire damage against creatures that damage you; though, in both cases against a Fire Elemental, they'd deal fire damage, which isn't super helpful.