I read many topics in relation to bonus actions and their timing, but there is still on aspect I need to see clearly: how can the DM determine whose action or bonus action comes first? How do the timing of bonus actions and initiative order interact?
According to the PHB: "You choose when to take a bonus action during your turn, unless the bonus action’s timing is specified, and anything that deprives you of your ability to take actions also prevents you from taking a bonus action."
It seems to be clear. But I just wonder how other DMs would decide in the following 2 examples:
One of the PCs, a wizard (being very close to 0 HP) wants to flee from melee combat. The hostile NPC was faster so it is likely that the wizard will be hit and he falls unconscious. Can the wizard cast a Misty step as a bonus action and can he do it before the NPC starts it attack (i.e. against the initiative order)? This would mean that despite any initiative order the bonus actions override the sequence of actions and the wizard could flee without any problem.
The PC wants to cast some sort of spell with a casting time of a bonus action. The hostile caster starts casting a Silence. What is the decisive factor if the bonus action spell can be cast? Is it up to the PC, if he/she wants to cast the spell before the hostile caster or is it up to the DM?