name: square
ai_type: square            # Validat contra el directori; mapeja a EnemyType::SQUARE.

shape:
  path: enemy/square.shp
  scale: 1.0               # multiplicador visual + hitbox sobre la mida nativa del .shp
  collision_factor: 1.0    # ajust opcional del hitbox (default 1.0)

physics:
  mass: 8.0                 # Més pesat — "tanc"
  speed: 40.0               # px/s (velocitat mitjana)
  rotation_delta_min: 0.3   # rad/s — rotació lenta
  rotation_delta_max: 1.5
  restitution: 1.0
  linear_damping: 0.0
  angular_damping: 0.0

ai:
  # Square: persecució contínua del ship més proper (steering suau, "tanc lent").
  movement:
    type: chase
    chase_strength: 0.5     # Força/segon de la LERP cap a la direcció ideal (1.0 = ~1s per realinear)

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, 0, 0]      # Roig pur "tanc"
  wounded: [255, 220, 60]

score: 150

events:
  # HP=1 (default): decrement → on_no_health → set_hurt → wounded → mort.
  on_hit:
    - action: decrease_health
    - action: apply_impulse
  on_no_health:
    - action: set_hurt
  on_hurt_end:
    - action: destroy
  on_destroy:
    - action: add_score
    - action: create_debris
    - action: create_fireworks
