Enemy Flee System

9.1 Flee Types
- Flee on Enemy Sight
- Flee on Enemy Attack
9.2 Flee Parameters
- Distance (px): Player-enemy distance to trigger fleeing.
- Cooldown (sec): Waiting time after fleeing.
9.3 Flee Flow (3-Stage Defense Mechanism)
Phase 1 – Flee
- Instantly stops the attack.
- Switches to Flee config.
- Heads to the nearest safe portal.
- Uses anti-ban route.
- Jumps from a random distance.
- If pursuit continues, continues fleeing after jumping.
Phase 2 – Return
- Moves to the safe map.
- Heads to the portal of the map it came from without waiting.
- Jumps back.
Phase 3 – Safe Zone Wait
Waits in the portal safe zone. All conditions must be met to exit:
- Minimum cooldown time must have passed.
- Enemy must have left the area.
- HP must be 100%.
- Shields must be 100% charged in both configs.
- The bot completes shields by changing configs if necessary.