use serde::{Serialize, Deserialize};


#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd)]
pub enum Attribute {
    Native,
    ABeast,
    Machine,
    Dark,
    Hit
}

#[derive(Debug, Copy, Clone, PartialEq)]
pub struct WeaponAttribute {
    pub attr: Attribute,
    pub value: i8,
}


#[derive(Debug, Copy, Clone, PartialEq)]
pub enum WeaponSpecial {
    Draw,
    Drain,
    Fill,
    Gush,
    Heart,
    Mind,
    Soul,
    Geist,
    Masters,
    Lords,
    Kings,
    Charge,
    Spirit,
    Berserk,
    Ice,
    Frost,
    Freeze,
    Blizzard,
    Bind,
    Hold,
    Seize,
    Arrest,
    Heat,
    Fire,
    Flame,
    Burning,
    Shock,
    Thunder,
    Storm,
    Tempest,
    Dim,
    Shadow,
    Dark,
    Hell,
    Panic,
    Riot,
    Havoc,
    Chaos,
    Devils,
    Demons,
}

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
pub enum WeaponType {
    Saber,
    Brand,
    Buster,
    Pallasch,
    Gladius,
    DbsSaber,
    Kaladbolg,
    Durandal,
    Galatine,
    Sword,
    Gigush,
    Breaker,
    Claymore,
    Calibur,
    FlowensSword,
    LastSurvivor,
    DragonSlayer,
    Dagger,
    Knife,
    Blade,
    Edge,
    Ripper,
    BladeDance,
    BloodyArt,
    CrossScar,
    ZeroDivide,
    TwoKamui,
    Partisan,
    Halbert,
    Glaive,
    Berdys,
    Gungnir,
    Brionac,
    Vjaya,
    GaeBolg,
    AsteronBelt,
    Slicer,
    Spinner,
    Cutter,
    Sawcer,
    Diska,
    SlicerOfAssassin,
    DiskaOfLiberator,
    DiskaOfBraveman,
    Izmaela,
    Handgun,
    Autogun,
    Lockgun,
    Railgun,
    Raygun,
    Varista,
    CustomRayVerOo,
    Bravace,
    TensionBlaster,
    Rifle,
    Sniper,
    Blaster,
    Beam,
    Laser,
    Visk235w,
    WalsMk2,
    Justy23St,
    Rianov303snr,
    Rianov303snr1,
    Rianov303snr2,
    Rianov303snr3,
    Rianov303snr4,
    Rianov303snr5,
    Mechgun,
    Assault,
    Repeater,
    Gatling,
    Vulcan,
    MA60Vise,
    HS25Justice,
    LK14Combat,
    Shot,
    Spread,
    Cannon,
    Launcher,
    Arms,
    CrushBullet,
    MeteorSmash,
    FinalImpact,
    Cane,
    Stick,
    Mace,
    Club,
    ClubOfLaconium,
    MaceOfAdaman,
    ClubOfZumiuran,
    Lollipop,
    Rod,
    Pole,
    Pillar,
    Striker,
    BattleVerge,
    BraveHammer,
    AliveAqhu,
    Valkyrie,
    Wand,
    Staff,
    Baton,
    Scepter,
    FireScepteragni,
    IceStaffdagon,
    StormWandindra,
    EarthWandBrownie,
    PhotonClaw,
    SilenceClaw,
    NeisClaw,
    PhoenixClaw,
    DoubleSaber,
    StagCutlery,
    TwinBrand,
    BraveKnuckle,
    AngryFist,
    GodHand,
    SonicKnuckle,
    Login,
    Orotiagito,
    Agito1975,
    Agito1983,
    Agito2001,
    Agito1991,
    Agito1977,
    Agito1980,
    Raikiri,
    SoulEater,
    SoulBanish,
    SpreadNeedle,
    HolyRay,
    InfernoBazooka,
    RamblingMay,
    LK38Combat,
    FlameVisit,
    BurningVisit,
    AkikosFryingPan,
    SorcerersCane,
    SBeatsBlade,
    PArmssBlade,
    DelsabersBuster,
    BringersRifle,
    EggBlaster,
    PsychoWand,
    HeavenPunisher,
    LavisCannon,
    VictorAxe,
    LaconiumAxe,
    ChainSawd,
    Caduceus,
    MercuriusRod,
    StingTip,
    MagicalPiece,
    TechnicalCrozier,
    SuppressedGun,
    AncientSaber,
    HarisenBattleFan,
    Yamigarasu,
    AkikosWok,
    ToyHammer,
    Elysion,
    RedSaber,
    MeteorCudgel,
    MonkeyKingBar,
    BlackKingBar,
    DoubleCannon,
    Girasole,
    HugeBattleFan,
    TsumikiriJSword,
    SealedJSword,
    RedSword,
    CrazyTune,
    TwinChakram,
    WokOfAkikosShop,
    LavisBlade,
    RedDagger,
    MadamsParasol,
    MadamsUmbrella,
    ImperialPick,
    Berdysh,
    RedPartisan,
    FlightCutter,
    FlightFan,
    RedSlicer,
    Handgunguld,
    MasterRaven,
    Handgunmilla,
    LastSwan,
    RedHandgun,
    FrozenShooter,
    SnowQueen,
    AntiAndroidRifle,
    RocketPunch,
    SambaMaracas,
    TwinPsychogun,
    DrillLauncher,
    GuldMilla,
    DualBird,
    RedMechgun,
    BelraCannon,
    PanzerFaust,
    IronFaust,
    SummitMoon,
    Windmill,
    EvilCurst,
    FlowerCane,
    HildebearsCane,
    HildebluesCane,
    RabbitWand,
    PlantainLeaf,
    Fatsia,
    DemonicFork,
    StrikerOfChao,
    Broom,
    ProphetsOfMotav,
    TheSighOfAGod,
    TwinkleStar,
    PlantainFan,
    TwinBlaze,
    MarinasBag,
    DragonsClaw,
    PanthersClaw,
    SRedsBlade,
    PlantainHugeFan,
    ChameleonScythe,
    Yasminkov3000r,
    AnoRifle,
    BaranzLauncher,
    BranchOfPakupaku,
    HeartOfPoumn,
    Yasminkov2000h,
    Yasminkov7000v,
    Yasminkov9000m,
    MaserBeam,
    PowerMaser,
    GameMagazne,
    Login2,
    FlowerBouquet,
    Musashi,
    Yamato,
    Asuka,
    SangeYasha,
    Sange,
    Yasha,
    Kamui,
    PhotonLauncher,
    GuiltyLight,
    RedScorpio,
    PhononMaser,
    Talis,
    Mahu,
    Hitogata,
    DancingHitogata,
    Kunai,
    Nug2000bazooka,
    SBerillsHands0,
    SBerillsHands1,
    FlowensSword3060,
    FlowensSword3064,
    FlowensSword3067,
    FlowensSword3073,
    FlowensSword3077,
    FlowensSword3082,
    FlowensSword3083,
    FlowensSword3084,
    FlowensSword3079,
    DbsSaber3062,
    DbsSaber3067,
    DbsSaber3069Chris,
    DbsSaber3064,
    DbsSaber3069Torato,
    DbsSaber3073,
    DbsSaber3070,
    DbsSaber3075,
    DbsSaber3077,
    GiGueBazooka,
    Guardianna,
    ViridiaCard,
    GreenillCard,
    SkylyCard,
    BluefullCard,
    PurplenumCard,
    PinkalCard,
    RedriaCard,
    OranCard,
    YellowbozeCard,
    WhitillCard,
    MorningGlory,
    PartisanofLightning,
    GalWind,
    Zanba,
    RikasClaw,
    AngelHarp,
    DemolitionComet,
    NeisClaw2,
    RainbowBaton,
    DarkFlow,
    DarkMeteor,
    DarkBridge,
    GAssassinsSabers,
    RappysFan,
    BoomasClaw,
    GoboomasClaw,
    GigoboomasClaw,
    RubyBullet,
    AmoreRose,
    SlicerOfFanatic,
    LameDArgent,
    Excalibur,
    RageDeFeu,
    RageDeFeu2,
    RageDeFeu3,
    RageDeFeu4,
    DaisyChain,
    OphelieSeize,
    MilleMarteaux,
    LeCogneur,
    CommanderBlade,
    Vivienne,
    Kusanagi,
    SacredDuster,
    Guren,
    Shouren,
    Jizai,
    Flamberge,
    Yunchang,
    SnakeSpire,
    FlapjackFlapper,
    Getsugasan,
    Maguwa,
    HeavenStriker,
    CannonRouge,
    MeteorRouge,
    Solferino,
    Clio,
    SirenGlassHammer,
    GlideDivine,
    Shichishito,
    Murasame,
    DaylightScar,
    Decalog,
    FifthAnnivBlade,
    TyrellsParasol,
    AkikosCleaver,
    Tanegashima,
    TreeClippers,
    NiceShot,
    Unknown3,
    Unknown4,
    AnoBazooka,
    Synthesizer,
    BambooSpear,
    KaneiTsuho,
    Jitte,
    ButterflyNet,
    Syringe,
    Battledore,
    Racket,
    Hammer,
    GreatBouquet,
    TypesaSaber,
    TypeslSaber,
    TypeslSlicer,
    TypeslClaw,
    TypeslKatana,
    TypejsSaber,
    TypejsSlicer,
    TypejsJSword,
    TypeswSword,
    TypeswSlicer,
    TypeswJSword,
    TyperoSword,
    TyperoHalbert,
    TyperoRod,
    TypeblBlade,
    TypeknBlade,
    TypeknClaw,
    TypehaHalbert,
    TypehaRod,
    TypedsDSaber,
    TypedsRod,
    Typeds,
    TypeclClaw,
    TypessSw,
    TypeguHand,
    TypeguMechgun,
    TyperiRifle,
    TypemeMechgun,
    TypeshShot,
    TypewaWand,
}

impl WeaponType {
    pub fn value(&self) -> [u8; 3] {
        match self {
            WeaponType::Saber => [0x00, 0x01, 0x00],
            WeaponType::Brand => [0x00, 0x01, 0x01],
            WeaponType::Buster => [0x00, 0x01, 0x02],
            WeaponType::Pallasch => [0x00, 0x01, 0x03],
            WeaponType::Gladius => [0x00, 0x01, 0x04],
            WeaponType::DbsSaber => [0x00, 0x01, 0x05],
            WeaponType::Kaladbolg => [0x00, 0x01, 0x06],
            WeaponType::Durandal => [0x00, 0x01, 0x07],
            WeaponType::Galatine => [0x00, 0x01, 0x08],
            WeaponType::Sword => [0x00, 0x02, 0x00],
            WeaponType::Gigush => [0x00, 0x02, 0x01],
            WeaponType::Breaker => [0x00, 0x02, 0x02],
            WeaponType::Claymore => [0x00, 0x02, 0x03],
            WeaponType::Calibur => [0x00, 0x02, 0x04],
            WeaponType::FlowensSword => [0x00, 0x02, 0x05],
            WeaponType::LastSurvivor => [0x00, 0x02, 0x06],
            WeaponType::DragonSlayer => [0x00, 0x02, 0x07],
            WeaponType::Dagger => [0x00, 0x03, 0x00],
            WeaponType::Knife => [0x00, 0x03, 0x01],
            WeaponType::Blade => [0x00, 0x03, 0x02],
            WeaponType::Edge => [0x00, 0x03, 0x03],
            WeaponType::Ripper => [0x00, 0x03, 0x04],
            WeaponType::BladeDance => [0x00, 0x03, 0x05],
            WeaponType::BloodyArt => [0x00, 0x03, 0x06],
            WeaponType::CrossScar => [0x00, 0x03, 0x07],
            WeaponType::ZeroDivide => [0x00, 0x03, 0x08],
            WeaponType::TwoKamui => [0x00, 0x03, 0x09],
            WeaponType::Partisan => [0x00, 0x04, 0x00],
            WeaponType::Halbert => [0x00, 0x04, 0x01],
            WeaponType::Glaive => [0x00, 0x04, 0x02],
            WeaponType::Berdys => [0x00, 0x04, 0x03],
            WeaponType::Gungnir => [0x00, 0x04, 0x04],
            WeaponType::Brionac => [0x00, 0x04, 0x05],
            WeaponType::Vjaya => [0x00, 0x04, 0x06],
            WeaponType::GaeBolg => [0x00, 0x04, 0x07],
            WeaponType::AsteronBelt => [0x00, 0x04, 0x08],
            WeaponType::Slicer => [0x00, 0x05, 0x00],
            WeaponType::Spinner => [0x00, 0x05, 0x01],
            WeaponType::Cutter => [0x00, 0x05, 0x02],
            WeaponType::Sawcer => [0x00, 0x05, 0x03],
            WeaponType::Diska => [0x00, 0x05, 0x04],
            WeaponType::SlicerOfAssassin => [0x00, 0x05, 0x05],
            WeaponType::DiskaOfLiberator => [0x00, 0x05, 0x06],
            WeaponType::DiskaOfBraveman => [0x00, 0x05, 0x07],
            WeaponType::Izmaela => [0x00, 0x05, 0x08],
            WeaponType::Handgun => [0x00, 0x06, 0x00],
            WeaponType::Autogun => [0x00, 0x06, 0x01],
            WeaponType::Lockgun => [0x00, 0x06, 0x02],
            WeaponType::Railgun => [0x00, 0x06, 0x03],
            WeaponType::Raygun => [0x00, 0x06, 0x04],
            WeaponType::Varista => [0x00, 0x06, 0x05],
            WeaponType::CustomRayVerOo => [0x00, 0x06, 0x06],
            WeaponType::Bravace => [0x00, 0x06, 0x07],
            WeaponType::TensionBlaster => [0x00, 0x06, 0x08],
            WeaponType::Rifle => [0x00, 0x07, 0x00],
            WeaponType::Sniper => [0x00, 0x07, 0x01],
            WeaponType::Blaster => [0x00, 0x07, 0x02],
            WeaponType::Beam => [0x00, 0x07, 0x03],
            WeaponType::Laser => [0x00, 0x07, 0x04],
            WeaponType::Visk235w => [0x00, 0x07, 0x05],
            WeaponType::WalsMk2 => [0x00, 0x07, 0x06],
            WeaponType::Justy23St => [0x00, 0x07, 0x07],
            WeaponType::Rianov303snr => [0x00, 0x07, 0x08],
            WeaponType::Rianov303snr1 => [0x00, 0x07, 0x09],
            WeaponType::Rianov303snr2 => [0x00, 0x07, 0x0A],
            WeaponType::Rianov303snr3 => [0x00, 0x07, 0x0B],
            WeaponType::Rianov303snr4 => [0x00, 0x07, 0x0C],
            WeaponType::Rianov303snr5 => [0x00, 0x07, 0x0D],
            WeaponType::Mechgun => [0x00, 0x08, 0x00],
            WeaponType::Assault => [0x00, 0x08, 0x01],
            WeaponType::Repeater => [0x00, 0x08, 0x02],
            WeaponType::Gatling => [0x00, 0x08, 0x03],
            WeaponType::Vulcan => [0x00, 0x08, 0x04],
            WeaponType::MA60Vise => [0x00, 0x08, 0x05],
            WeaponType::HS25Justice => [0x00, 0x08, 0x06],
            WeaponType::LK14Combat => [0x00, 0x08, 0x07],
            WeaponType::Shot => [0x00, 0x09, 0x00],
            WeaponType::Spread => [0x00, 0x09, 0x01],
            WeaponType::Cannon => [0x00, 0x09, 0x02],
            WeaponType::Launcher => [0x00, 0x09, 0x03],
            WeaponType::Arms => [0x00, 0x09, 0x04],
            WeaponType::CrushBullet => [0x00, 0x09, 0x05],
            WeaponType::MeteorSmash => [0x00, 0x09, 0x06],
            WeaponType::FinalImpact => [0x00, 0x09, 0x07],
            WeaponType::Cane => [0x00, 0x0A, 0x00],
            WeaponType::Stick => [0x00, 0x0A, 0x01],
            WeaponType::Mace => [0x00, 0x0A, 0x02],
            WeaponType::Club => [0x00, 0x0A, 0x03],
            WeaponType::ClubOfLaconium => [0x00, 0x0A, 0x04],
            WeaponType::MaceOfAdaman => [0x00, 0x0A, 0x05],
            WeaponType::ClubOfZumiuran => [0x00, 0x0A, 0x06],
            WeaponType::Lollipop => [0x00, 0x0A, 0x07],
            WeaponType::Rod => [0x00, 0x0B, 0x00],
            WeaponType::Pole => [0x00, 0x0B, 0x01],
            WeaponType::Pillar => [0x00, 0x0B, 0x02],
            WeaponType::Striker => [0x00, 0x0B, 0x03],
            WeaponType::BattleVerge => [0x00, 0x0B, 0x04],
            WeaponType::BraveHammer => [0x00, 0x0B, 0x05],
            WeaponType::AliveAqhu => [0x00, 0x0B, 0x06],
            WeaponType::Valkyrie => [0x00, 0x0B, 0x07],
            WeaponType::Wand => [0x00, 0x0C, 0x00],
            WeaponType::Staff => [0x00, 0x0C, 0x01],
            WeaponType::Baton => [0x00, 0x0C, 0x02],
            WeaponType::Scepter => [0x00, 0x0C, 0x03],
            WeaponType::FireScepteragni => [0x00, 0x0C, 0x04],
            WeaponType::IceStaffdagon => [0x00, 0x0C, 0x05],
            WeaponType::StormWandindra => [0x00, 0x0C, 0x06],
            WeaponType::EarthWandBrownie => [0x00, 0x0C, 0x07],
            WeaponType::PhotonClaw => [0x00, 0x0D, 0x00],
            WeaponType::SilenceClaw => [0x00, 0x0D, 0x01],
            WeaponType::NeisClaw => [0x00, 0x0D, 0x02],
            WeaponType::PhoenixClaw => [0x00, 0x0D, 0x03],
            WeaponType::DoubleSaber => [0x00, 0x0E, 0x00],
            WeaponType::StagCutlery => [0x00, 0x0E, 0x01],
            WeaponType::TwinBrand => [0x00, 0x0E, 0x02],
            WeaponType::BraveKnuckle => [0x00, 0x0F, 0x00],
            WeaponType::AngryFist => [0x00, 0x0F, 0x01],
            WeaponType::GodHand => [0x00, 0x0F, 0x02],
            WeaponType::SonicKnuckle => [0x00, 0x0F, 0x03],
            WeaponType::Login => [0x00, 0x0F, 0x04],
            WeaponType::Orotiagito => [0x00, 0x10, 0x00],
            WeaponType::Agito1975 => [0x00, 0x10, 0x01],
            WeaponType::Agito1983 => [0x00, 0x10, 0x02],
            WeaponType::Agito2001 => [0x00, 0x10, 0x03],
            WeaponType::Agito1991 => [0x00, 0x10, 0x04],
            WeaponType::Agito1977 => [0x00, 0x10, 0x05],
            WeaponType::Agito1980 => [0x00, 0x10, 0x06],
            WeaponType::Raikiri => [0x00, 0x10, 0x07],
            WeaponType::SoulEater => [0x00, 0x11, 0x00],
            WeaponType::SoulBanish => [0x00, 0x11, 0x01],
            WeaponType::SpreadNeedle => [0x00, 0x12, 0x00],
            WeaponType::HolyRay => [0x00, 0x13, 0x00],
            WeaponType::InfernoBazooka => [0x00, 0x14, 0x00],
            WeaponType::RamblingMay => [0x00, 0x14, 0x01],
            WeaponType::LK38Combat => [0x00, 0x14, 0x02],
            WeaponType::FlameVisit => [0x00, 0x15, 0x00],
            WeaponType::BurningVisit => [0x00, 0x15, 0x01],
            WeaponType::AkikosFryingPan => [0x00, 0x16, 0x00],
            WeaponType::SorcerersCane => [0x00, 0x17, 0x00],
            WeaponType::SBeatsBlade => [0x00, 0x18, 0x00],
            WeaponType::PArmssBlade => [0x00, 0x19, 0x00],
            WeaponType::DelsabersBuster => [0x00, 0x1A, 0x00],
            WeaponType::BringersRifle => [0x00, 0x1B, 0x00],
            WeaponType::EggBlaster => [0x00, 0x1C, 0x00],
            WeaponType::PsychoWand => [0x00, 0x1D, 0x00],
            WeaponType::HeavenPunisher => [0x00, 0x1E, 0x00],
            WeaponType::LavisCannon => [0x00, 0x1F, 0x00],
            WeaponType::VictorAxe => [0x00, 0x20, 0x00],
            WeaponType::LaconiumAxe => [0x00, 0x20, 0x01],
            WeaponType::ChainSawd => [0x00, 0x21, 0x00],
            WeaponType::Caduceus => [0x00, 0x22, 0x00],
            WeaponType::MercuriusRod => [0x00, 0x22, 0x01],
            WeaponType::StingTip => [0x00, 0x23, 0x00],
            WeaponType::MagicalPiece => [0x00, 0x24, 0x00],
            WeaponType::TechnicalCrozier => [0x00, 0x25, 0x00],
            WeaponType::SuppressedGun => [0x00, 0x26, 0x00],
            WeaponType::AncientSaber => [0x00, 0x27, 0x00],
            WeaponType::HarisenBattleFan => [0x00, 0x28, 0x00],
            WeaponType::Yamigarasu => [0x00, 0x29, 0x00],
            WeaponType::AkikosWok => [0x00, 0x2A, 0x00],
            WeaponType::ToyHammer => [0x00, 0x2B, 0x00],
            WeaponType::Elysion => [0x00, 0x2C, 0x00],
            WeaponType::RedSaber => [0x00, 0x2D, 0x00],
            WeaponType::MeteorCudgel => [0x00, 0x2E, 0x00],
            WeaponType::MonkeyKingBar => [0x00, 0x2F, 0x00],
            WeaponType::BlackKingBar => [0x00, 0x2F, 0x01],
            WeaponType::DoubleCannon => [0x00, 0x30, 0x00],
            WeaponType::Girasole => [0x00, 0x30, 0x01],
            WeaponType::HugeBattleFan => [0x00, 0x31, 0x00],
            WeaponType::TsumikiriJSword => [0x00, 0x32, 0x00],
            WeaponType::SealedJSword => [0x00, 0x33, 0x00],
            WeaponType::RedSword => [0x00, 0x34, 0x00],
            WeaponType::CrazyTune => [0x00, 0x35, 0x00],
            WeaponType::TwinChakram => [0x00, 0x36, 0x00],
            WeaponType::WokOfAkikosShop => [0x00, 0x37, 0x00],
            WeaponType::LavisBlade => [0x00, 0x38, 0x00],
            WeaponType::RedDagger => [0x00, 0x39, 0x00],
            WeaponType::MadamsParasol => [0x00, 0x3A, 0x00],
            WeaponType::MadamsUmbrella => [0x00, 0x3B, 0x00],
            WeaponType::ImperialPick => [0x00, 0x3C, 0x00],
            WeaponType::Berdysh => [0x00, 0x3D, 0x00],
            WeaponType::RedPartisan => [0x00, 0x3E, 0x00],
            WeaponType::FlightCutter => [0x00, 0x3F, 0x00],
            WeaponType::FlightFan => [0x00, 0x40, 0x00],
            WeaponType::RedSlicer => [0x00, 0x41, 0x00],
            WeaponType::Handgunguld => [0x00, 0x42, 0x00],
            WeaponType::MasterRaven => [0x00, 0x42, 0x01],
            WeaponType::Handgunmilla => [0x00, 0x43, 0x00],
            WeaponType::LastSwan => [0x00, 0x43, 0x01],
            WeaponType::RedHandgun => [0x00, 0x44, 0x00],
            WeaponType::FrozenShooter => [0x00, 0x45, 0x00],
            WeaponType::SnowQueen => [0x00, 0x45, 0x01],
            WeaponType::AntiAndroidRifle => [0x00, 0x46, 0x00],
            WeaponType::RocketPunch => [0x00, 0x47, 0x00],
            WeaponType::SambaMaracas => [0x00, 0x48, 0x00],
            WeaponType::TwinPsychogun => [0x00, 0x49, 0x00],
            WeaponType::DrillLauncher => [0x00, 0x4A, 0x00],
            WeaponType::GuldMilla => [0x00, 0x4B, 0x00],
            WeaponType::DualBird => [0x00, 0x4B, 0x01],
            WeaponType::RedMechgun => [0x00, 0x4C, 0x00],
            WeaponType::BelraCannon => [0x00, 0x4D, 0x00],
            WeaponType::PanzerFaust => [0x00, 0x4E, 0x00],
            WeaponType::IronFaust => [0x00, 0x4E, 0x01],
            WeaponType::SummitMoon => [0x00, 0x4F, 0x00],
            WeaponType::Windmill => [0x00, 0x50, 0x00],
            WeaponType::EvilCurst => [0x00, 0x51, 0x00],
            WeaponType::FlowerCane => [0x00, 0x52, 0x00],
            WeaponType::HildebearsCane => [0x00, 0x53, 0x00],
            WeaponType::HildebluesCane => [0x00, 0x54, 0x00],
            WeaponType::RabbitWand => [0x00, 0x55, 0x00],
            WeaponType::PlantainLeaf => [0x00, 0x56, 0x00],
            WeaponType::Fatsia => [0x00, 0x56, 0x01],
            WeaponType::DemonicFork => [0x00, 0x57, 0x00],
            WeaponType::StrikerOfChao => [0x00, 0x58, 0x00],
            WeaponType::Broom => [0x00, 0x59, 0x00],
            WeaponType::ProphetsOfMotav => [0x00, 0x5A, 0x00],
            WeaponType::TheSighOfAGod => [0x00, 0x5B, 0x00],
            WeaponType::TwinkleStar => [0x00, 0x5C, 0x00],
            WeaponType::PlantainFan => [0x00, 0x5D, 0x00],
            WeaponType::TwinBlaze => [0x00, 0x5E, 0x00],
            WeaponType::MarinasBag => [0x00, 0x5F, 0x00],
            WeaponType::DragonsClaw => [0x00, 0x60, 0x00],
            WeaponType::PanthersClaw => [0x00, 0x61, 0x00],
            WeaponType::SRedsBlade => [0x00, 0x62, 0x00],
            WeaponType::PlantainHugeFan => [0x00, 0x63, 0x00],
            WeaponType::ChameleonScythe => [0x00, 0x64, 0x00],
            WeaponType::Yasminkov3000r => [0x00, 0x65, 0x00],
            WeaponType::AnoRifle => [0x00, 0x66, 0x00],
            WeaponType::BaranzLauncher => [0x00, 0x67, 0x00],
            WeaponType::BranchOfPakupaku => [0x00, 0x68, 0x00],
            WeaponType::HeartOfPoumn => [0x00, 0x69, 0x00],
            WeaponType::Yasminkov2000h => [0x00, 0x6A, 0x00],
            WeaponType::Yasminkov7000v => [0x00, 0x6B, 0x00],
            WeaponType::Yasminkov9000m => [0x00, 0x6C, 0x00],
            WeaponType::MaserBeam => [0x00, 0x6D, 0x00],
            WeaponType::PowerMaser => [0x00, 0x6D, 0x01],
            WeaponType::GameMagazne => [0x00, 0x6E, 0x00],
            WeaponType::Login2 => [0x00, 0x6E, 0x01],
            WeaponType::FlowerBouquet => [0x00, 0x6F, 0x00],
            WeaponType::Musashi => [0x00, 0x89, 0x00],
            WeaponType::Yamato => [0x00, 0x89, 0x01],
            WeaponType::Asuka => [0x00, 0x89, 0x02],
            WeaponType::SangeYasha => [0x00, 0x89, 0x03],
            WeaponType::Sange => [0x00, 0x8A, 0x00],
            WeaponType::Yasha => [0x00, 0x8A, 0x01],
            WeaponType::Kamui => [0x00, 0x8A, 0x02],
            WeaponType::PhotonLauncher => [0x00, 0x8B, 0x00],
            WeaponType::GuiltyLight => [0x00, 0x8B, 0x01],
            WeaponType::RedScorpio => [0x00, 0x8B, 0x02],
            WeaponType::PhononMaser => [0x00, 0x8B, 0x03],
            WeaponType::Talis => [0x00, 0x8C, 0x00],
            WeaponType::Mahu => [0x00, 0x8C, 0x01],
            WeaponType::Hitogata => [0x00, 0x8C, 0x02],
            WeaponType::DancingHitogata => [0x00, 0x8C, 0x03],
            WeaponType::Kunai => [0x00, 0x8C, 0x04],
            WeaponType::Nug2000bazooka => [0x00, 0x8D, 0x00],
            WeaponType::SBerillsHands0 => [0x00, 0x8E, 0x00],
            WeaponType::SBerillsHands1 => [0x00, 0x8E, 0x01],
            WeaponType::FlowensSword3060 => [0x00, 0x8F, 0x00],
            WeaponType::FlowensSword3064 => [0x00, 0x8F, 0x01],
            WeaponType::FlowensSword3067 => [0x00, 0x8F, 0x02],
            WeaponType::FlowensSword3073 => [0x00, 0x8F, 0x03],
            WeaponType::FlowensSword3077 => [0x00, 0x8F, 0x04],
            WeaponType::FlowensSword3082 => [0x00, 0x8F, 0x05],
            WeaponType::FlowensSword3083 => [0x00, 0x8F, 0x06],
            WeaponType::FlowensSword3084 => [0x00, 0x8F, 0x07],
            WeaponType::FlowensSword3079 => [0x00, 0x8F, 0x08],
            WeaponType::DbsSaber3062 => [0x00, 0x90, 0x00],
            WeaponType::DbsSaber3067 => [0x00, 0x90, 0x01],
            WeaponType::DbsSaber3069Chris => [0x00, 0x90, 0x02],
            WeaponType::DbsSaber3064 => [0x00, 0x90, 0x03],
            WeaponType::DbsSaber3069Torato => [0x00, 0x90, 0x04],
            WeaponType::DbsSaber3073 => [0x00, 0x90, 0x05],
            WeaponType::DbsSaber3070 => [0x00, 0x90, 0x06],
            WeaponType::DbsSaber3075 => [0x00, 0x90, 0x07],
            WeaponType::DbsSaber3077 => [0x00, 0x90, 0x08],
            WeaponType::GiGueBazooka => [0x00, 0x91, 0x00],
            WeaponType::Guardianna => [0x00, 0x92, 0x00],
            WeaponType::ViridiaCard => [0x00, 0x93, 0x00],
            WeaponType::GreenillCard => [0x00, 0x93, 0x01],
            WeaponType::SkylyCard => [0x00, 0x93, 0x02],
            WeaponType::BluefullCard => [0x00, 0x93, 0x03],
            WeaponType::PurplenumCard => [0x00, 0x93, 0x04],
            WeaponType::PinkalCard => [0x00, 0x93, 0x05],
            WeaponType::RedriaCard => [0x00, 0x93, 0x06],
            WeaponType::OranCard => [0x00, 0x93, 0x07],
            WeaponType::YellowbozeCard => [0x00, 0x93, 0x08],
            WeaponType::WhitillCard => [0x00, 0x93, 0x09],
            WeaponType::MorningGlory => [0x00, 0x94, 0x00],
            WeaponType::PartisanofLightning => [0x00, 0x95, 0x00],
            WeaponType::GalWind => [0x00, 0x96, 0x00],
            WeaponType::Zanba => [0x00, 0x97, 0x00],
            WeaponType::RikasClaw => [0x00, 0x98, 0x00],
            WeaponType::AngelHarp => [0x00, 0x99, 0x00],
            WeaponType::DemolitionComet => [0x00, 0x9A, 0x00],
            WeaponType::NeisClaw2 => [0x00, 0x9B, 0x00],
            WeaponType::RainbowBaton => [0x00, 0x9C, 0x00],
            WeaponType::DarkFlow => [0x00, 0x9D, 0x00],
            WeaponType::DarkMeteor => [0x00, 0x9E, 0x00],
            WeaponType::DarkBridge => [0x00, 0x9F, 0x00],
            WeaponType::GAssassinsSabers => [0x00, 0xA0, 0x00],
            WeaponType::RappysFan => [0x00, 0xA1, 0x00],
            WeaponType::BoomasClaw => [0x00, 0xA2, 0x00],
            WeaponType::GoboomasClaw => [0x00, 0xA2, 0x01],
            WeaponType::GigoboomasClaw => [0x00, 0xA2, 0x02],
            WeaponType::RubyBullet => [0x00, 0xA3, 0x00],
            WeaponType::AmoreRose => [0x00, 0xA4, 0x00],
            WeaponType::SlicerOfFanatic => [0x00, 0xAA, 0x00],
            WeaponType::LameDArgent => [0x00, 0xAB, 0x00],
            WeaponType::Excalibur => [0x00, 0xAC, 0x00],
            WeaponType::RageDeFeu => [0x00, 0xAD, 0x00],
            WeaponType::RageDeFeu2 => [0x00, 0xAD, 0x01],
            WeaponType::RageDeFeu3 => [0x00, 0xAD, 0x02],
            WeaponType::RageDeFeu4 => [0x00, 0xAD, 0x03],
            WeaponType::DaisyChain => [0x00, 0xAE, 0x00],
            WeaponType::OphelieSeize => [0x00, 0xAF, 0x00],
            WeaponType::MilleMarteaux => [0x00, 0xB0, 0x00],
            WeaponType::LeCogneur => [0x00, 0xB1, 0x00],
            WeaponType::CommanderBlade => [0x00, 0xB2, 0x00],
            WeaponType::Vivienne => [0x00, 0xB3, 0x00],
            WeaponType::Kusanagi => [0x00, 0xB4, 0x00],
            WeaponType::SacredDuster => [0x00, 0xB5, 0x00],
            WeaponType::Guren => [0x00, 0xB6, 0x00],
            WeaponType::Shouren => [0x00, 0xB7, 0x00],
            WeaponType::Jizai => [0x00, 0xB8, 0x00],
            WeaponType::Flamberge => [0x00, 0xB9, 0x00],
            WeaponType::Yunchang => [0x00, 0xBA, 0x00],
            WeaponType::SnakeSpire => [0x00, 0xBB, 0x00],
            WeaponType::FlapjackFlapper => [0x00, 0xBC, 0x00],
            WeaponType::Getsugasan => [0x00, 0xBD, 0x00],
            WeaponType::Maguwa => [0x00, 0xBE, 0x00],
            WeaponType::HeavenStriker => [0x00, 0xBF, 0x00],
            WeaponType::CannonRouge => [0x00, 0xC0, 0x00],
            WeaponType::MeteorRouge => [0x00, 0xC1, 0x00],
            WeaponType::Solferino => [0x00, 0xC2, 0x00],
            WeaponType::Clio => [0x00, 0xC3, 0x00],
            WeaponType::SirenGlassHammer => [0x00, 0xC4, 0x00],
            WeaponType::GlideDivine => [0x00, 0xC5, 0x00],
            WeaponType::Shichishito => [0x00, 0xC6, 0x00],
            WeaponType::Murasame => [0x00, 0xC7, 0x00],
            WeaponType::DaylightScar => [0x00, 0xC8, 0x00],
            WeaponType::Decalog => [0x00, 0xC9, 0x00],
            WeaponType::FifthAnnivBlade => [0x00, 0xCA, 0x00],
            WeaponType::TyrellsParasol => [0x00, 0xCB, 0x00],
            WeaponType::AkikosCleaver => [0x00, 0xCC, 0x00],
            WeaponType::Tanegashima => [0x00, 0xCD, 0x00],
            WeaponType::TreeClippers => [0x00, 0xCE, 0x00],
            WeaponType::NiceShot => [0x00, 0xCF, 0x00],
            WeaponType::Unknown3 => [0x00, 0xD0, 0x00],
            WeaponType::Unknown4 => [0x00, 0xD1, 0x00],
            WeaponType::AnoBazooka => [0x00, 0xD2, 0x00],
            WeaponType::Synthesizer => [0x00, 0xD3, 0x00],
            WeaponType::BambooSpear => [0x00, 0xD4, 0x00],
            WeaponType::KaneiTsuho => [0x00, 0xD5, 0x00],
            WeaponType::Jitte => [0x00, 0xD6, 0x00],
            WeaponType::ButterflyNet => [0x00, 0xD7, 0x00],
            WeaponType::Syringe => [0x00, 0xD8, 0x00],
            WeaponType::Battledore => [0x00, 0xD9, 0x00],
            WeaponType::Racket => [0x00, 0xDA, 0x00],
            WeaponType::Hammer => [0x00, 0xDB, 0x00],
            WeaponType::GreatBouquet => [0x00, 0xDC, 0x00],
            WeaponType::TypesaSaber => [0x00, 0xDD, 0x00],
            WeaponType::TypeslSaber => [0x00, 0xDE, 0x00],
            WeaponType::TypeslSlicer => [0x00, 0xDE, 0x01],
            WeaponType::TypeslClaw => [0x00, 0xDE, 0x02],
            WeaponType::TypeslKatana => [0x00, 0xDE, 0x03],
            WeaponType::TypejsSaber => [0x00, 0xDF, 0x00],
            WeaponType::TypejsSlicer => [0x00, 0xDF, 0x01],
            WeaponType::TypejsJSword => [0x00, 0xDF, 0x02],
            WeaponType::TypeswSword => [0x00, 0xE0, 0x00],
            WeaponType::TypeswSlicer => [0x00, 0xE0, 0x01],
            WeaponType::TypeswJSword => [0x00, 0xE0, 0x02],
            WeaponType::TyperoSword => [0x00, 0xE1, 0x00],
            WeaponType::TyperoHalbert => [0x00, 0xE1, 0x01],
            WeaponType::TyperoRod => [0x00, 0xE1, 0x02],
            WeaponType::TypeblBlade => [0x00, 0xE2, 0x00],
            WeaponType::TypeknBlade => [0x00, 0xE3, 0x00],
            WeaponType::TypeknClaw => [0x00, 0xE3, 0x01],
            WeaponType::TypehaHalbert => [0x00, 0xE4, 0x00],
            WeaponType::TypehaRod => [0x00, 0xE4, 0x01],
            WeaponType::TypedsDSaber => [0x00, 0xE5, 0x00],
            WeaponType::TypedsRod => [0x00, 0xE5, 0x01],
            WeaponType::Typeds => [0x00, 0xE5, 0x02],
            WeaponType::TypeclClaw => [0x00, 0xE6, 0x00],
            WeaponType::TypessSw => [0x00, 0xE7, 0x00],
            WeaponType::TypeguHand => [0x00, 0xE8, 0x00],
            WeaponType::TypeguMechgun => [0x00, 0xE8, 0x01],
            WeaponType::TyperiRifle => [0x00, 0xE9, 0x00],
            WeaponType::TypemeMechgun => [0x00, 0xEA, 0x00],
            WeaponType::TypeshShot => [0x00, 0xEB, 0x00],
            WeaponType::TypewaWand => [0x00, 0xEC, 0x00],
        }
    }
}

#[derive(Debug, Copy, Clone, PartialEq)]
pub struct Weapon {
    pub weapon: WeaponType,
    pub special: Option<WeaponSpecial>,
    pub grind: u8,
    pub attrs: [Option<WeaponAttribute>; 3],
    pub tekked: bool,
}


impl Weapon {
    pub fn new(wep: WeaponType) -> Weapon {
        Weapon {
            weapon: wep,
            special: None,
            grind: 0,
            attrs: [None; 3],
            tekked: true,
        }
    }

    pub fn as_bytes(&self) -> [u8; 16] {
        let mut result = [0u8; 16];
        result[0..3].copy_from_slice(&self.weapon.value());
        result[3] = self.grind;
        // TODO: percents
        result
    }
}