namespace pkNX.Structures;

enum MoveInflictDuration : ubyte {
    None,
    Permanent,
    TurnCountSwitch,
    PermanentSwitch,
    TurnCountNoSwitch,
}

enum Heal : ubyte {
    None = 0,
    Quarter = 253,
    Half = 254,
    Full = 255,
}

enum MoveTarget : ubyte {
    // Specific target
    AnyExceptSelf,
    AllyOrSelf,
    Ally,
    Opponent,
    AllAdjacent,
    AllAdjacentOpponents,
    AllAllies,
    Self,
    All,
    RandomOpponent,

    // No pkm target
    SideAll,
    SideOpponent,
    SideSelf,
    Counter,
}

table Waza8 {
    Version:uint;
    MoveID:uint;
    CanUseMove:bool;

    Type:ubyte;
    Quality:ubyte;
    Category:ubyte;
    Power:ubyte;
    Accuracy:ubyte;
    PP:ubyte;
    Priority:ubyte;
    HitMin:ubyte;
    HitMax:ubyte;
    Inflict:ushort;
    InflictPercent:ubyte;
    RawInflictCount:ubyte;//MoveInflictDuration;
    TurnMin:ubyte;
    TurnMax:ubyte;
    CritStage:ubyte;
    Flinch:ubyte;
    EffectSequence:ushort;
    Recoil:ubyte;
    RawHealing:ubyte;//Heal;
    RawTarget:ubyte;//MoveTarget;
    Stat1:ubyte;
    Stat2:ubyte;
    Stat3:ubyte;
    Stat1Stage:ubyte;
    Stat2Stage:ubyte;
    Stat3Stage:ubyte;
    Stat1Percent:ubyte;
    Stat2Percent:ubyte;
    Stat3Percent:ubyte;

    GigantamaxPower:ubyte;

    // Flags
    Flag_MakesContact:bool;
    Flag_Charge:bool;
    Flag_Recharge:bool;
    Flag_Protect:bool;
    Flag_Reflectable:bool;
    Flag_Snatch:bool;
    Flag_Mirror:bool;
    Flag_Punch:bool;

    Flag_Sound:bool;
    Flag_Gravity:bool;
    Flag_Defrost:bool;
    Flag_DistanceTriple:bool;
    Flag_Heal:bool;
    Flag_IgnoreSubstitute:bool;
    Flag_FailSkyBattle:bool;
    Flag_AnimateAlly:bool;

    Flag_Dance:bool;
    Flag_Metronome:bool;
}

root_type Waza8;

file_extension "wazabin";