include "Shared/WazaID.fbs";
include "Enums/BattleFunctionType.fbs";
include "Enums/EquipEffect.fbs";
include "Enums/FieldFunctionType.fbs";
include "Enums/FieldPocket.fbs";
include "Enums/ItemGroup.fbs";
include "Enums/ItemType.fbs";
include "Enums/PluckEffect.fbs";
include "Enums/WorkPpSelTgt.fbs";
include "Enums/WorkType.fbs";

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

table ItemData {
    Id:int (key);
    ItemType:ItemType;
    IconName:string (required);
    Price:int;
    BP:int;
    EquipEffect:EquipEffect;
    EquipPower:int;
    ThrowPower:int;
    ThrowEffect:bool;
    NaturalGiftPower:int;
    NaturalGiftType:int;
    PluckEffect:PluckEffect;
    MachineWaza:WazaID;
    SortNum:int;
    ItemGroup:ItemGroup;
    GroupID:int;
    FieldPocket:FieldPocket;
    FieldFunctionType:FieldFunctionType;
    BattleFunctionType:BattleFunctionType;
    BattleUseLost:bool;
    BattleBagSelect:bool;
    BattleBagSelectTarget:bool;
    NoSpend:bool;
    SetToPoke:bool;
    SlotMaxNum:int;
    WorkType:WorkType;
    WorkCommon:int;
    WorkEffectGuard:int;
    WorkCritical:int;
    WorkAttack:int;
    WorkDefense:int;
    WorkSpeed:int;
    WorkAccuracy:int;
    WorkSpAttack:int;
    WorkSpDefense:int;
    WorkLevel:int;
    WorkPpSelTgt:WorkPpSelTgt;
    WorkPpRcv:int;
    WorkPpUp:int;
    WorkStatusLimitCtrl:int;
    WorkStatusHp:int;
    WorkStatusAtk:int;
    WorkStatusDef:int;
    WorkStatusSpd:int;
    WorkStatusSAtk:int;
    WorkStatusSDef:int;
    WorkFriendly1:int;
    WorkFriendly2:int;
    WorkFriendly3:int;
    WorkRecvSleep:int;
    WorkRecvPoison:int;
    WorkRecvBurn:int;
    WorkRecvFreeze:int;
    WorkRecvParalyze:int;
    WorkRecvConfuse:int;
    WorkRecvMero:int;
    WorkRecvPower:int;
    WorkRevival:int;
    WorkEvolutional:int;
    WorkRecvNemuke:int;
    WorkRecvTousyou:int;
    WorkWazaDrunk:int;
    WorkAvoidUp:int;
    WorkOffenseUp:int;
    WorkOffDefInv:int;
}

table ItemDataArray (fs_serializer) {
    Table:[ItemData] (required);
}

root_type ItemDataArray;
