using System.Collections.Generic;
using SoMRandomizer.processing.common;

namespace SoMRandomizer.processing.openworld.randomization
{
    public static class IdMap
    {
        /// <summary>
        /// Convert weapon number (0..7) to weapon orb item id.
        /// </summary>
        public static readonly ItemId[] WeaponOrbs =
        {
            ItemId.GloveOrb,
            ItemId.SwordOrb,
            ItemId.AxeOrb,
            ItemId.SpearOrb,
            ItemId.WhipOrb,
            ItemId.BowOrb,
            ItemId.BoomerangOrb,
            ItemId.JavelinOrb,
        };

        /// <summary>
        /// Convert weapon number (0..7) to weapon item id.
        /// </summary>
        public static readonly ItemId[] Weapons =
        {
            ItemId.Glove,
            ItemId.Sword,
            ItemId.Axe,
            ItemId.Spear,
            ItemId.Whip,
            ItemId.Bow,
            ItemId.Boomerang,
            ItemId.Javelin,
        };

        /// <summary>
        /// Convert character id (0..2) to character item id.
        /// </summary>
        public static readonly ItemId[] Characters =
        {
            ItemId.Boy,
            ItemId.Girl,
            ItemId.Sprite,
        };

        public static readonly ItemId[] Seeds =
        {
            ItemId.WaterSeed,
            ItemId.EarthSeed,
            ItemId.WindSeed,
            ItemId.FireSeed,
            ItemId.LightSeed,
            ItemId.DarkSeed,
            ItemId.MoonSeed,
            ItemId.DryadSeed,
        };

        public static readonly Dictionary<ItemId, string> ItemNames = new Dictionary<ItemId, string>
        {
            { ItemId.Nothing, OpenWorldPrizeNames.NOTHING },
            { ItemId.StarterWeaponMain, "starter weapon (main)" },
            { ItemId.StarterWeaponAlt, "starter weapon (alt)" },
            { WeaponOrbs[0], SomVanillaValues.weaponByteToName(0) + " orb" },
            { WeaponOrbs[1], SomVanillaValues.weaponByteToName(1) + " orb" },
            { WeaponOrbs[2], SomVanillaValues.weaponByteToName(2) + " orb" },
            { WeaponOrbs[3], SomVanillaValues.weaponByteToName(3) + " orb" },
            { WeaponOrbs[4], SomVanillaValues.weaponByteToName(4) + " orb" },
            { WeaponOrbs[5], SomVanillaValues.weaponByteToName(5) + " orb" },
            { WeaponOrbs[6], SomVanillaValues.weaponByteToName(6) + " orb" },
            { WeaponOrbs[7], SomVanillaValues.weaponByteToName(7) + " orb" },
            { ItemId.Boy, OpenWorldPrizeNames.BOY },
            { ItemId.Girl, OpenWorldPrizeNames.GIRL },
            { ItemId.Sprite, OpenWorldPrizeNames.SPRITE },
            { ItemId.SeaHareTail, OpenWorldPrizeNames.SEA_HARE_TAIL },
            { ItemId.GoldTowerKey, OpenWorldPrizeNames.GOLD_TOWER_KEY },
            { ItemId.MidgeMallet, OpenWorldPrizeNames.MIDGE_MALLET },
            { ItemId.MoogleBelt, OpenWorldPrizeNames.MOOGLE_BELT },
            { ItemId.FlammieDrum, OpenWorldPrizeNames.FLAMMIE_DRUM },
            { ItemId.WaterSeed, OpenWorldPrizeNames.WATER_SEED },
            { ItemId.EarthSeed, OpenWorldPrizeNames.EARTH_SEED },
            { ItemId.WindSeed, OpenWorldPrizeNames.WIND_SEED },
            { ItemId.FireSeed, OpenWorldPrizeNames.FIRE_SEED },
            { ItemId.LightSeed, OpenWorldPrizeNames.LIGHT_SEED },
            { ItemId.DarkSeed, OpenWorldPrizeNames.DARK_SEED },
            { ItemId.MoonSeed, OpenWorldPrizeNames.MOON_SEED },
            { ItemId.DryadSeed, OpenWorldPrizeNames.DRYAD_SEED },
            { ItemId.UndineSpells, OpenWorldPrizeNames.UNDINE_SPELLS },
            { ItemId.GnomeSpells, OpenWorldPrizeNames.GNOME_SPELLS },
            { ItemId.SylphidSpells, OpenWorldPrizeNames.SYLPHID_SPELLS },
            { ItemId.SalamandoSpells, OpenWorldPrizeNames.SALAMANDO_SPELLS },
            { ItemId.LuminaSpells, OpenWorldPrizeNames.LUMINA_SPELLS },
            { ItemId.ShadeSpells, OpenWorldPrizeNames.SHADE_SPELLS },
            { ItemId.LunaSpells, OpenWorldPrizeNames.LUNA_SPELLS },
            { ItemId.DryadSpells, OpenWorldPrizeNames.DRYAD_SPELLS },
            { ItemId.Glove, OpenWorldPrizeNames.GLOVE },
            { ItemId.Sword, OpenWorldPrizeNames.SWORD },
            { ItemId.Axe, OpenWorldPrizeNames.AXE },
            { ItemId.Spear, OpenWorldPrizeNames.SPEAR },
            { ItemId.Whip, OpenWorldPrizeNames.WHIP },
            { ItemId.Bow, OpenWorldPrizeNames.BOW },
            { ItemId.Boomerang, OpenWorldPrizeNames.BOOMERANG },
            { ItemId.Javelin, OpenWorldPrizeNames.JAVELIN },
            { ItemId.Gp0, "GP 0" },
            { ItemId.Gp1, "GP 1" },
            { ItemId.Gp2, "GP 2" },
            { ItemId.Gp3, "GP 3" },
            { ItemId.Gp4, "GP 4" },
            { ItemId.Gp5, "GP 5" },
            { ItemId.Gp6, "GP 6" },
            { ItemId.Gp7, "GP 7" },
            { ItemId.Gp8, "GP 8" },
            { ItemId.Gp9, "GP 9" },
            { ItemId.Gp10, "GP 10" },
            { ItemId.Gp11, "GP 11" },
            { ItemId.Gp12, "GP 12" },
            { ItemId.Gp13, "GP 13" },
            { ItemId.Gp14, "GP 14" },
            { ItemId.Gp15, "GP 15" },
            { ItemId.Gp16, "GP 16" },
        };

        public static readonly Dictionary<LocationId, string> LocationNames = new Dictionary<LocationId, string>
        {
            { LocationId.StarterWeaponMain, "starter weapon (main)" },
            { LocationId.StarterWeaponAlt, "starter weapon (alt)" },
            { LocationId.MechRider3, "mech rider 3 (new item)" },
            { LocationId.Buffy, "buffy (new item)" },
            { LocationId.DreadSlime, "dread slime (new item)" },
            { LocationId.GnomeItem1, "gnome item 1 (spells)" },
            { LocationId.GnomeItem2, "gnome item 2 (seed)" },
            { LocationId.FireSeed, "fire seed" },
            { LocationId.LunaItem1, "luna item 1 (spells)" },
            { LocationId.LunaItem2, "luna item 2 (seed)" },
            { LocationId.Kakkara, "kakkara (moogle belt)" },
            { LocationId.LuminaSpells, "lumina spells" },
            { LocationId.LuminaSeed, "lumina seed" },
            { LocationId.ChestNextToWhipChest, "chest next to whip chest" },
            { LocationId.ShadePalaceGloveOrbChest, "shade palace glove orb chest" },
            { LocationId.SunkenContinentSwordOrbChest, "sunken continent sword orb chest" },
            { LocationId.LuminaTowerAxeOrbChest, "lumina tower axe orb chest" },
            { LocationId.FirePalaceAxeOrbChest, "fire palace axe orb chest" },
            { LocationId.LuminaTowerSpearOrbChest, "lumina tower spear orb chest" },
            { LocationId.SunkenContinentBoomerangOrbChest, "sunken continent boomerang orb chest" },
            { LocationId.FirePalaceChest1, "fire palace chest 1" },
            { LocationId.FirePalaceChest2, "fire palace chest 2" },
            { LocationId.Santa, "santa (new item)" },
            { LocationId.ShadeSpells, "shade spells" },
            { LocationId.ShadeSeed, "shade seed" },
            { LocationId.ThunderGigas, "thunder gigas (new item)" },
            { LocationId.RedDragon, "red dragon (new item)" },
            { LocationId.BlueDragon, "blue dragon (new item)" },
            { LocationId.ManaTree, "mana tree (new item)" },
            { LocationId.MatangoFlammie, "matango flammie" },
            { LocationId.Jehk, "jehk" },
            { LocationId.Hydra, "hydra (new item)" },
            { LocationId.Kettlekin, "kettlekin (new item)" },
            { LocationId.ShadePalaceChest, "shade palace chest" },
            { LocationId.LukaItem1, "luka item 1 (spear)" },
            { LocationId.LukaItem2, "luka item 2 (undine seed)" },
            { LocationId.SylphidItem1, "sylphid item 1 (spells)" },
            { LocationId.SylphidItem2, "sylphid item 2 (seed)" },
            { LocationId.WhipChest, "whip chest" },
            { LocationId.MoogleVillageGloveOrbChest, "moogle village glove orb chest" },
            { LocationId.IceCastleGloveOrbChest, "ice castle glove orb chest" },
            { LocationId.PandoraSwordOrbChest, "pandora sword orb chest" },
            { LocationId.NtRuinsSwordOrbChest, "northtown ruins sword orb chest" },
            { LocationId.MoogleVillageAxeOrbChest, "moogle village axe orb chest" },
            { LocationId.NtCastleAxeOrbChest, "northtown castle axe orb chest" },
            { LocationId.NtRuinsSpearOrbChest, "northtown ruins spear orb chest" },
            { LocationId.PandoraSpearOrbChest, "pandora spear orb chest" },
            { LocationId.SantaSpearOrbChest, "santa spear orb chest" },
            { LocationId.KilroyWhipOrbChest, "kilroy whip orb chest" },
            { LocationId.NtCastleWhipOrbChest, "northtown castle whip orb chest" },
            { LocationId.NtRuinsBowOrbChest, "northtown ruins bow orb chest" },
            { LocationId.PotosChest, "potos chest" },
            { LocationId.PandoraChest1, "pandora chest 1" },
            { LocationId.PandoraChest2, "pandora chest 2" },
            { LocationId.PandoraChest3, "pandora chest 3" },
            { LocationId.PandoraChest4, "pandora chest 4" },
            { LocationId.MagicRopeChest, "magic rope chest" },
            { LocationId.NtCastleChest, "northtown castle chest" },
            { LocationId.MatangoInnJavelinOrbChest, "matango inn javelin orb chest" },
            { LocationId.Watts, "watts (axe)" },
            { LocationId.UndineItem1, "undine item 1 (spells)" },
            { LocationId.UndineItem2, "undine item 2 (javelin)" },
            { LocationId.Salamando, "salamando" },
            { LocationId.DryadSpells, "dryad spells" },
            { LocationId.DryadSeed, "dryad seed" },
            { LocationId.Mara, "mara (tower key)" },
            { LocationId.TurtleIsland, "turtle island (sea hare tail)" },
            { LocationId.DwarfElder, "dwarf elder (midge mallet)" },
            { LocationId.TropicalloSprite, "tropicallo (sprite)" },
            { LocationId.TropicalloBow, "tropicallo (bow)" },
            { LocationId.Girl, "girl" },
            { LocationId.Lighthouse, "lighthouse (new item)" },
            { LocationId.Kilroy, "kilroy (new item)" },
            { LocationId.MantisAnt, "mantis ant (new item)" },
            { LocationId.AxeBeak, "axe beak (new item)" },
            { LocationId.SnowDragon, "snow dragon (new item)" },
            { LocationId.DragonWorm, "dragon worm (new item)" },
            { LocationId.DoomWall, "doom wall" },
            { LocationId.Vampire, "vampire" },
            { LocationId.MechRider2, "mech rider 2" },
            { LocationId.Watermelon, "watermelon (new item)" },
            { LocationId.Hexas, "hexas (new item)" },
            { LocationId.WallFace, "wall face (new item)" },
            { LocationId.MetalMantis, "metal mantis (new item)" },
            { LocationId.JemaAtTasnica, "jema at tasnica" },
            { LocationId.TripleTonpole, "triple tonpole" },
            { LocationId.SwordPedestal, "sword pedestal" },
            { LocationId.SantaGift0, "santa gift 0" },
            { LocationId.SantaGift1, "santa gift 1" },
            { LocationId.SantaGift2, "santa gift 2" },
            { LocationId.SantaGift3, "santa gift 3" },
            { LocationId.SantaGift4, "santa gift 4" },
            { LocationId.SantaGift5, "santa gift 5" },
            { LocationId.SantaGift6, "santa gift 6" },
            { LocationId.SantaGift7, "santa gift 7" },
        };
    }
}
