use num_enum::{IntoPrimitive, TryFromPrimitive};

#[repr(u32)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, IntoPrimitive, TryFromPrimitive)]
pub enum EPropertyType {
    None = 0,
    Hp = 1,
    HpMax = 111,
    Atk = 121,
    BreakStun = 122,
    Def = 131,
    Crit = 201,
    CritDmg = 211,
    Pen = 231,
    PenValue = 232,
    SpRecover = 305,
    ElementMystery = 312,
    ElementAbnormalPower = 314,
    AddedDamageRatioPhysics = 315,
    AddedDamageRatioFire = 316,
    AddedDamageRatioIce = 317,
    AddedDamageRatioElec = 318,
    AddedDamageRatioEther = 319,
    // battle
    HpMaxBattle = 1111,
    AtkBattle = 1121,
    BreakStunBattle = 1122,
    DefBattle = 1131,
    CritBattle = 1201,
    CritDmgBattle = 1211,
    PenRatioBattle = 1231,
    PenDeltaBattle = 1232,
    SpRecoverBattle = 1305,
    ElementMysteryBattle = 1312,
    ElementAbnormalPowerBattle = 1314,
    AddedDamageRatioPhysicsBattle = 1315,
    AddedDamageRatioFireBattle = 1316,
    AddedDamageRatioIceBattle = 1317,
    AddedDamageRatioElecBattle = 1318,
    AddedDamageRatioEtherBattle = 1319,
    // base
    HpMaxBase = 11101,
    AtkBase = 12101,
    BreakStunBase = 12201,
    DefBase = 13101,
    CritBase = 20101,
    CritDmgBase = 21101,
    PenBase = 23101,
    PenValueBase = 23201,
    SpRecoverBase = 30501,
    ElementMysteryBase = 31201,
    ElementAbnormalPowerBase = 31401,
    // ratio
    HpMaxRatio = 11102,
    AtkRatio = 12102,
    BreakStunRatio = 12202,
    DefRatio = 13102,
    SpRecoverRatio = 30502,
    ElementAbnormalPowerRatio = 31402,
    // delta
    HpMaxDelta = 11103,
    AtkDelta = 12103,
    BreakStunDelta = 12203,
    DefDelta = 13103,
    CritDelta = 20103,
    CritDmgDelta = 21103,
    PenDelta = 23103,
    PenValueDelta = 23203,
    SpRecoverDelta = 30503,
    ElementMysteryDelta = 31203,
    ElementAbnormalPowerDelta = 31403,
    // damage ratios 1/3
    AddedDamageRatioPhysics1 = 31501,
    AddedDamageRatioPhysics3 = 31503,
    AddedDamageRatioFire1 = 31601,
    AddedDamageRatioFire3 = 31603,
    AddedDamageRatioIce1 = 31701,
    AddedDamageRatioIce3 = 31703,
    AddedDamageRatioElec1 = 31801,
    AddedDamageRatioElec3 = 31803,
    AddedDamageRatioEther1 = 31901,
    AddedDamageRatioEther3 = 31903,
    // --- custom
    // growth
    HpMaxGrowth = 99991110,
    AtkGrowth = 99991210,
    DefGrowth = 99991310,
    // advance
    HpMaxAdvance = 99991111,
    AtkAdvance = 99991211,
    DefAdvance = 99991311,
}
