Give enemies one free hit when you walk away, but not when you circle
Running past a monster should cost something, otherwise nobody ever stays in a fight. But the same penalty for every step makes movement a minefield. This entry decides exactly which steps provoke a hit, how often, and why moving around an enemy is free.
Why this works
Turning your back on an opponent is the moment you are open, so only leaving the reach should cost something. Moving around while staying close is a fight, not an escape, and charging for it would punish the player for playing tactically.
When not to use it
Skip it in a fast action game or a game with no real positioning, where it only adds a rule nobody notices. Use a simple speed difference or a short cooldown on retreating instead.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 27 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 "Give enemies one free hit when you walk away, but not when you circle" (read_entry free-hit-when-you-walk-away) 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