Spielerando

Make enemies pick who to attack without switching every turn

An enemy that always hits whoever did the most damage this very moment jumps between heroes and feels random. An enemy that never changes ignores a brave newcomer. This entry builds a memory of who annoyed it most, which fades and only flips for a clear reason.

Why this works

Players read an enemy's choice as intent only when it stays steady. Remembering who has bothered it most, letting that memory fade, and demanding a clear lead before switching, makes the enemy look like it has a reason instead of a coin toss.

When not to use it

Skip it for a lone hero or a fight with a single target, and for enemies that should be unpredictable by design, such as a swarm or a trickster. Let those pick the nearest or a random target.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 20 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 "Make enemies pick who to attack without switching every turn" (read_entry threat-table-without-target-ping-pong) 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