include "Enums/RaidRomType.fbs";
include "Enums/RaidBossExtraTimingType.fbs";
include "Enums/RaidBossExtraActType.fbs";
include "Shared/WazaID.fbs";
include "PokeData/PokeDataBattle.fbs";

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

table RaidTimeData {
    IsActive:bool;
    GameLimit:int;
    ClientLimit:int;
    CommandLimit:int;
    PokeReviveTime:int;
    AiIntervalTime:int;
    AiIntervalRand:int;
}

table RaidBossExtraData {
    Timing:RaidBossExtraTimingType = NONE;
    Action:RaidBossExtraActType = NONE;
    Value:short;
    Wazano:WazaID = WAZA_NULL;
}

table RaidBossSizeData {
    HeightType:SizeType;
    HeightValue:short;
    WeightType:SizeType;
    WeightValue:short;
    ScaleType:SizeType;
    ScaleValue:short;
}

table RaidBossData {
    HpCoef:short;
    PowerChargeTrigerHp:byte;
    PowerChargeTrigerTime:byte;
    PowerChargeLimitTime:short;
    PowerChargeCancelDamage:byte;
    PowerChargePenaltyTime:short;
    PowerChargePenaltyAction:WazaID = WAZA_NULL;
    PowerChargeDamageRate:byte;
    PowerChargeGemDamageRate:byte;
    PowerChargeChangeGemDamageRate:byte;
    ExtraAction1:RaidBossExtraData (required);
    ExtraAction2:RaidBossExtraData (required);
    ExtraAction3:RaidBossExtraData (required);
    ExtraAction4:RaidBossExtraData (required);
    ExtraAction5:RaidBossExtraData (required);
    ExtraAction6:RaidBossExtraData (required);
    DoubleActionTriggerHp:byte;
    DoubleActionTriggerTime:byte;
    DoubleActionRate:byte;
}

table RaidEnemyInfo {
    RomVer:RaidRomType = BOTH;
    No:int;
    DeliveryGroupID:byte;
    Difficulty:int;
    Rate:byte;
    DropTableFix:ulong;
    DropTableRandom:ulong;
    CaptureRate:byte;
    CaptureLv:byte;
    BossPokePara:PokeDataBattle (required);
    BossPokeSize:RaidBossSizeData (required);
    BossDesc:RaidBossData (required);
    TimeDesc:RaidTimeData (required);
}
