using UnityEngine;

public class DamageEffect : MonoBehaviour, ISkillEffect
{
    public void Execute(SkillInstance skill, Transform caster, float chargeRatio)
    {
        SkillLevelData levelData = skill.CurrentLevelData;
        float finalDamage = levelData.Damage * chargeRatio;
        float range = levelData.Range;

        Collider[] hits = Physics.OverlapSphere(caster.position + caster.forward * range * 0.5f, range);
        foreach (Collider hit in hits)
        {
            if (hit.transform == caster) continue;

            // IDamageable 등 인터페이스가 있으면 여기서 적용
            Debug.Log($"{hit.name}에게 {finalDamage} 데미지");
        }
    }
}
