using UnityEngine;

public class Status_Enemy : Status
{
    // 인스펙터에 표시될 단 하나의 데이터 필드입니다.
    // 여기에 아래에서 정의할 StatusData_Enemy 타입의 데이터를 넣게 됩니다.
    [SerializeField]
    private Data_Status_Enemy _data;

    public Data_Status_Enemy Data
    {
        get { return _data; }
        set
        {
            if (value != null)
            {
                _data = value;
            }
        }
    }

    // --- 부모의 abstract 프로퍼티들 ---
    public override int Level => _data.level;
    public override float Hp => _data.hp;
    public override float MaxHp => _data.maxHp;
    public override float Mp => _data.mp;
    public override float MaxMp => _data.maxMp;
    public override float Attack => _data.attack;
    public override float Defense => _data.defense;
    public override float MoveSpeed => _data.moveSpeed;
    public override float AtkSpeed => _data.atkSpeed;

    // --- Enemy 전용 프로퍼티들 ---
    public float ExpAmount => _data.expAmount;
    public float ScanRange => _data.scanRange;
    public float AttackRange => _data.atkRange;
    public float PatrolSpeed => _data.patrolSpeed;
    public float ChaseSpeed => _data.chaseSpeed;
    
    public override float ApplyDamage(float damage)
    {
        Data.hp -= damage;
        return Hp;
    }
}
