#ifndef JNR_DRONE_H
#define JNR_DRONE_H

#include "engine/entity.h"

/* ═══════════════════════════════════════════════════
 *  Combat Drone
 *
 *  A small companion that orbits the player and
 *  periodically fires at nearby enemies. Spawned
 *  by the drone powerup. One drone at a time.
 *  Duration: 15 seconds, then self-destructs.
 * ═══════════════════════════════════════════════════ */

#define DRONE_DURATION     15.0f  /* seconds before expiry       */
#define DRONE_ORBIT_RADIUS 28.0f  /* orbit distance from player  */
#define DRONE_ORBIT_SPEED  3.0f   /* radians per second          */
#define DRONE_SHOOT_RANGE  120.0f /* detection range for enemies */
#define DRONE_SHOOT_CD     1.2f   /* seconds between shots       */

typedef struct DroneData {
    float  orbit_angle;      /* current angle around player      */
    float  shoot_cooldown;   /* time until next shot              */
    float  lifetime;         /* remaining lifetime                */
} DroneData;

/* Register the drone entity type */
void drone_register(EntityManager *em);

/* Spawn a drone attached to the player */
Entity *drone_spawn(EntityManager *em, Vec2 player_pos);

#endif /* JNR_DRONE_H */
