include "PersonalInfoDetail.fbs";
include "PersonalInfoDex.fbs";
include "PersonalInfoEvolution.fbs";
include "PersonalInfoGender.fbs";
include "PersonalInfoHatch.fbs";
include "PersonalInfoMove.fbs";
include "PersonalInfoStats.fbs";

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

table PersonalInfo {
    Info:PersonalInfoDetail (required);
    IsPresentInGame:bool;
    Dex:PersonalInfoDex; // not required
    KitakamiDex:ubyte;
    BlueberryDex:ubyte;
    Type1:ubyte;
    Type2:ubyte;
    Ability1:ushort;
    Ability2:ushort;
    AbilityH:ushort;
    EXPGrowth:ubyte;
    CatchRate:ubyte;
    Gender:PersonalInfoGender (required);
    EggGroup1:ubyte;
    EggGroup2:ubyte;
    Hatch:PersonalInfoHatch (required);
    HatchCycles:ubyte;
    BaseFriendship:ubyte;
    BaseEXPAddend:short;
    EvoStage:ubyte;
    IsTypeChangeDisallowed:bool; // Silvally, Arceus (and Sylveon in 1.0.0, fixed)
    EVYield:PersonalInfoStats (required);
    Base:PersonalInfoStats (required);
    Evolutions:[PersonalInfoEvolution] (required);
    TechnicalMachine:[ushort] (required);
    EggMoves:[ushort] (required);
    ReminderMoves:[ushort] (required);
    Learnset:[PersonalInfoMove] (required);
}

table PersonalTable (fs_serializer) {
    Table:[PersonalInfo] (required);
}

root_type PersonalTable;
