extends Node

func _ready() -> void:
  call_deferred("_scale_dungeon")

func _scale_dungeon() -> void:
  var variant_multiplier: float = 10.0 if GameState.last_dungeon_variant == 1 else 1.0
  var total_scale: float = PlayerData.level_scale * variant_multiplier
  var parent: Node = get_parent()
  for child in parent.get_children():
    if not child.is_in_group("enemies"):
      continue
    if child.is_in_group("boss"):
      BossData.apply_scale(child, total_scale)
    else:
      EnemyData.apply_scale(child, total_scale)
