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

table EncounterArchive (fs_serializer) {
    Table:[EncounterTable] (required);
}

table EncounterTable {
    ZoneID:ulong;
    TrainerRankMin:int;
    TrainerRankMax:int;

    GroundSpawnAllowed:bool;
    GroundSpawnCountMax:int;
    GroundSpawnDuration:int;
    GroundTableEncounterRate:int;
    GroundTableLevelMin:int;
    GroundTableLevelMax:int;
    GroundTableRandChanceTotal:int;
    GroundTable:[EncounterSlot] (required);

    WaterSpawnAllowed:bool;
    WaterSpawnCountMax:int;
    WaterSpawnDuration:int;
    WaterTableEncounterRate:int;
    WaterTableLevelMin:int;
    WaterTableLevelMax:int;
    WaterTableRandChanceTotal:int;
    WaterTable:[EncounterSlot] (required);

    OldRodTableEncounterRate:int;
    OldRodTableLevelMin:int;
    OldRodTableLevelMax:int;
    OldRodTableRandChanceTotal:int;
    OldRodTable:[EncounterSlot] (required);

    GoodRodTableEncounterRate:int;
    GoodRodTableLevelMin:int;
    GoodRodTableLevelMax:int;
    GoodRodTableRandChanceTotal:int;
    GoodRodTable:[EncounterSlot] (required);

    SuperRodTableEncounterRate:int;
    SuperRodTableLevelMin:int;
    SuperRodTableLevelMax:int;
    SuperRodTableRandChanceTotal:int;
    SuperRodTable:[EncounterSlot] (required);

    SkySpawnAllowed:bool;
    SkySpawnCountMax:int;
    SkySpawnDuration:int;
    SkyTableEncounterRate:int;
    SkyTableLevelMin:int;
    SkyTableLevelMax:int;
    SkyTableRandChanceTotal:int;
    SkyTable:[EncounterSlot] (required);
}

table EncounterSlot {
    Probability:int;
    Species:int;
    Form:short;
}

root_type EncounterArchive;
