name: star
ai_type: star              # Validat contra el directori; mapeja a EnemyType::STAR.

shape:
  path: enemy/star.shp
  scale: 0.7               # Lleugerament més petit que els altres enemics per diferenciar visualment.
  collision_factor: 1.0

physics:
  mass: 5.0
  speed: 35.0               # Mateixos paràmetres que pentagon (esquivador lent).
  rotation_delta_min: 0.75
  rotation_delta_max: 3.75
  restitution: 1.0
  linear_damping: 0.0
  angular_damping: 0.0

ai:
  # Movement: zigzag esquivador (com Pentagon).
  movement:
    type: zigzag
    angle_change_max: 1.0
    zigzag_prob_per_second: 0.8
  # Accions periòdiques: cada ~2.5s dispara una bala apuntada al ship més proper.
  tick:
    - action: shoot
      interval: 2.5
      aim_mode: aimed         # apunta al ship més proper (atan2)
      jitter_rad: 0.0         # sense soroll: tret perfecte
      bullet: bullet_long     # variant més visible per al jugador
      bullet_speed: 150.0     # px/s — prou lenta per reaccionar

animation:
  pulse:
    trigger_prob_per_second: 0.01
    duration_min: 1.0
    duration_max: 3.0
    amplitude_min: 0.08
    amplitude_max: 0.20
    frequency_min: 1.5
    frequency_max: 3.0
  rotation_accel:
    trigger_prob_per_second: 0.02
    duration_min: 3.0
    duration_max: 8.0
    multiplier_min: 0.3
    multiplier_max: 4.0

wounded:
  duration: 1.0
  blink_hz: 10.0

spawn:
  invulnerability_duration: 3.0
  invulnerability_brightness_start: 0.3
  invulnerability_brightness_end: 0.7
  invulnerability_scale_start: 0.0
  invulnerability_scale_end: 1.0
  safety_distance: 36.0

colors:
  normal:  [255, 255, 0]    # Groc estrella
  wounded: [255, 220, 60]

score: 100

events:
  # STAR: mor al primer impacte, sense passar per wounded.
  # HP=1 (default): decrement → on_no_health → destroy directe (sense wounded).
  on_hit:
    - action: decrease_health
  on_no_health:
    - action: destroy
  on_destroy:
    - action: add_score
    - action: create_debris
    - action: create_fireworks
