Irony
Irony is when the cost and the stakes are in the same currency: to keep what they're protecting, the character has to pay with that same thing. Peace for peace, family for family, a life for a life that matters.

It is authorial, not the character's, and it is set at the crisis. The climax and resolution decide how it lands, so the irony line is written last โ one per character. Movements below arc magnitude often have none.
When the reader knows this when the character does not, that's called dramatic irony.