namespace pkNX.Structures.FlatBuffers.SWSH;
attribute "fs_serializer";

table NestHoleDistributionEncounterTable {
    TableID:ulong;
    GameVersion:uint;
    Field_02:ubyte;
    EncounterRate:ubyte;
    Entries:[NestHoleDistributionEncounter] (required);
}

table NestHoleDistributionEncounter {
    EntryIndex:int;
    Species:int;
    Form:int;
    Level:int;
    DynamaxLevel:ushort;
    Field_05:uint; // probably EVs
    Field_06:uint;
    Field_07:uint;
    Field_08:uint;
    Field_09:uint;
    Field_0A:uint;
    Ability:ubyte;
    IsGigantamax:bool;
    DropTableID:ulong;
    BonusTableID:ulong;
    Probabilities:[int] (required);
    Gender:byte;
    FlawlessIVs:byte;
    ShinyLock:ubyte;
    Field_13:ubyte; // 3/4
    Field_14:ubyte; // 3/4/5 -- +1 for second entries
    Nature:byte;
    Field_16:int;
    Move0:uint;
    Move1:uint;
    Move2:uint;
    Move3:uint;
    DynamaxBoost:float;
    Field_1C:uint;
    Field_1D:uint;
    Field_1E:uint; // Shield
    Field_1F:uint; // % only if move
    Field_20:uint; // Move ID
    Field_21:uint; // Shield only if move
    Field_22:uint; // % only if move
    Field_23:uint; // Move ID
    Field_24:uint; // shield? only if move
}

table NestHoleDistributionEncounterArchive (fs_serializer) {
    Table:[NestHoleDistributionEncounterTable] (required);
}

root_type NestHoleDistributionEncounterArchive;
