In Dungeons and Dragons 5th edition, can I cast Expeditious Retreat (cast time 1 Bonus Action), the cantrip spell Fire Bolt (cast time 1 Action), and Shield (cast time 1 Reaction) when I am hit by an attack on the same turn?
Does the order of the spells cast matter? I.E. Shield, Fire Bolt, and Expeditious Retreat?
So for example, can I cast Expeditious Retreat as a bonus action, move provoking an opportunity attack from an enemy, cast Shield as a reaction to deflect the attack and then from range attack the enemy with the cantrip Fire Bolt?
Or can I move causing the opportunity attack, cast Shield as a reaction, cast Expeditious Retreat as a bonus action and then from range attack it with the cantrip Fire Bolt?
Does it matter the order of movement and spells cast?