use crate::entity::Entity;
use num_enum::FromPrimitive;

pub trait Creature: Entity {
    fn set_level(&mut self, level: u32);
    fn assign_prop(&mut self) {
        // Dummy
    }
    fn set_cur_hp_full(&mut self);
    fn get_life_state(&self) -> LifeState;
    fn set_life_state(&mut self, state: LifeState);

    fn get_cur_hp(&self) -> f32 {
        0.0
    }
    fn set_cur_hp(&mut self, _hp: f32) {}
}

#[repr(u32)]
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, FromPrimitive)]
pub enum LifeState {
    LifeNone = 0,
    #[default]
    LifeAlive = 1,
    LifeDead = 2,
    LifeRevive = 3,
}
