Make an enemy pick who to attack from teamwork, without flipping between two players
A tank draws attention, a healer should be left alone, but a simple rule of attacking the one who did the most makes the enemy turn back and forth when two players are close. This entry shows the margin that calms it and how a taunt breaks through.
Why this works
An enemy that changes its mind after every hit looks broken and never finishes a swing. Requiring a clear lead before switching makes it steady, and it gives players a way to take its attention on purpose, which is what makes team roles possible.
When not to use it
Skip it when enemies should be unpredictable or choose by character, hunting the weakest or the nearest, or in games with a single hero where there is nobody to switch to. Use simple rules there.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 23 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 an enemy pick who to attack from teamwork, without flipping between two players" (read_entry enemy-target-choice-by-threat-with-switch-margin) 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