"""Entity-related constants and helpers."""

from __future__ import annotations

from .screen_constants import FPS

# --- Player and buddy settings ---
HUMANOID_RADIUS = 6
PLAYER_RADIUS = HUMANOID_RADIUS
PLAYER_SPEED = 1.4
FOV_RADIUS = 124  # approximate legacy FOV (80) * 1.55 cap
BUDDY_RADIUS = HUMANOID_RADIUS
BUDDY_FOLLOW_SPEED = PLAYER_SPEED * 0.7

# --- Survivor settings (Stage 4) ---
SURVIVOR_RADIUS = HUMANOID_RADIUS
SURVIVOR_APPROACH_RADIUS = 48
SURVIVOR_APPROACH_SPEED = PLAYER_SPEED * 0.35
SURVIVOR_MAX_SAFE_PASSENGERS = 5
SURVIVOR_MIN_SPEED_FACTOR = 0.35

# --- Flashlight settings ---
FLASHLIGHT_WIDTH = 10
FLASHLIGHT_HEIGHT = 8

# --- Zombie settings ---
ZOMBIE_RADIUS = HUMANOID_RADIUS
ZOMBIE_SPEED = PLAYER_SPEED * 0.45
ZOMBIE_WANDER_INTERVAL_MS = 5000
ZOMBIE_SIGHT_RANGE = FOV_RADIUS * 1.2
ZOMBIE_TRACKER_SIGHT_RANGE = ZOMBIE_SIGHT_RANGE * 0.2
FAST_ZOMBIE_BASE_SPEED = PLAYER_SPEED * 0.77
ZOMBIE_SEPARATION_DISTANCE = ZOMBIE_RADIUS * 2.2
ZOMBIE_AGING_DURATION_FRAMES = FPS * 60 * 6  # ~6 minutes at target framerate
ZOMBIE_AGING_MIN_SPEED_RATIO = 0.3
ZOMBIE_TRACKER_SCENT_RADIUS = 70
ZOMBIE_TRACKER_WANDER_INTERVAL_MS = 2500
ZOMBIE_WALL_FOLLOW_SENSOR_DISTANCE = 24
ZOMBIE_WALL_FOLLOW_PROBE_ANGLE_DEG = 45
ZOMBIE_WALL_FOLLOW_PROBE_STEP = 2.0
ZOMBIE_WALL_FOLLOW_TARGET_GAP = 4.0
ZOMBIE_WALL_FOLLOW_LOST_WALL_MS = 2500

# --- Car and fuel settings ---
CAR_WIDTH = 15
CAR_HEIGHT = 25
CAR_SPEED = 2
CAR_HEALTH = 20
CAR_WALL_DAMAGE = 1
FUEL_CAN_WIDTH = 11
FUEL_CAN_HEIGHT = 15

# --- Wall and beam settings ---
INTERNAL_WALL_HEALTH = 40 * 100
INTERNAL_WALL_BEVEL_DEPTH = 6
STEEL_BEAM_HEALTH = int(INTERNAL_WALL_HEALTH * 1.5)
PLAYER_WALL_DAMAGE = 100
ZOMBIE_WALL_DAMAGE = 1

__all__ = [
    "HUMANOID_RADIUS",
    "PLAYER_RADIUS",
    "PLAYER_SPEED",
    "FOV_RADIUS",
    "BUDDY_RADIUS",
    "BUDDY_FOLLOW_SPEED",
    "SURVIVOR_RADIUS",
    "SURVIVOR_APPROACH_RADIUS",
    "SURVIVOR_APPROACH_SPEED",
    "SURVIVOR_MAX_SAFE_PASSENGERS",
    "SURVIVOR_MIN_SPEED_FACTOR",
    "FLASHLIGHT_WIDTH",
    "FLASHLIGHT_HEIGHT",
    "ZOMBIE_RADIUS",
    "ZOMBIE_SPEED",
    "ZOMBIE_WANDER_INTERVAL_MS",
    "ZOMBIE_SIGHT_RANGE",
    "ZOMBIE_TRACKER_SIGHT_RANGE",
    "FAST_ZOMBIE_BASE_SPEED",
    "ZOMBIE_SEPARATION_DISTANCE",
    "ZOMBIE_AGING_DURATION_FRAMES",
    "ZOMBIE_AGING_MIN_SPEED_RATIO",
    "ZOMBIE_TRACKER_SCENT_RADIUS",
    "ZOMBIE_TRACKER_WANDER_INTERVAL_MS",
    "ZOMBIE_WALL_FOLLOW_SENSOR_DISTANCE",
    "ZOMBIE_WALL_FOLLOW_PROBE_ANGLE_DEG",
    "ZOMBIE_WALL_FOLLOW_PROBE_STEP",
    "ZOMBIE_WALL_FOLLOW_TARGET_GAP",
    "ZOMBIE_WALL_FOLLOW_LOST_WALL_MS",
    "CAR_WIDTH",
    "CAR_HEIGHT",
    "CAR_SPEED",
    "CAR_HEALTH",
    "CAR_WALL_DAMAGE",
    "FUEL_CAN_WIDTH",
    "FUEL_CAN_HEIGHT",
    "INTERNAL_WALL_HEALTH",
    "INTERNAL_WALL_BEVEL_DEPTH",
    "STEEL_BEAM_HEALTH",
    "PLAYER_WALL_DAMAGE",
    "ZOMBIE_WALL_DAMAGE",
]
