Turn order breaks when someone is stunned, dies or gets a bonus turn
A turn-based fight that just walks down a list works until the first stun, the first death in the middle of a round or the first extra turn. This entry shows how to keep the order fair and the round counter right in those cases.
Why this works
A fair turn order is a question asked fresh each time: who goes next now? Asking it again, instead of marching down a fixed list, lets the fallen, the stunned and the extra turns all be handled in one place without throwing the round count off.
When not to use it
Skip it in games where speed decides who acts and turns come from a running clock, or where everyone acts at the same time and results are applied together. Use a timeline of ready times or a shared round resolve there.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 44 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Turn order breaks when someone is stunned, dies or gets a bonus turn" (read_entry turn-order-with-stun-death-extra-turn) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP