Spielerando

Count survivors for an ending without miscounting who is in the group

An ending that depends on "most of the group made it" goes wrong at the edges: nine people, an odd number, someone who walked away on their own, or the player not among the living. Here is how to count the right people and compare without rounding mistakes.

Why this works

An ending is judged on the group the player was really responsible for. Those who left on their own do not count against them, and whole-number counting keeps the edge between enough and not enough exact for every group size.

When not to use it

Skip it when the ending depends on who survived, not how many, such as a story where one named friend matters most. A head count then hides what the player cares about; test for that person instead of a share.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • A diagram of every state
  • 12 lines of example code with 3 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Count survivors for an ending without miscounting who is in the group" (read_entry ending-needs-half-the-group-alive) 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