using System.Collections.Generic;
using Model.Entity.Parts;
using Model.Entity.Types;
using Model.Types;

namespace Model.Entity.Data;

public partial class EntityData
{
    public static Dictionary<string, EntityModel> GetMiscData()
    {
        return new Dictionary<string, EntityModel>
        {
            // Neutrals

            // Pyre Events
            {
                DataType.PYREEVENT_CampTaken, new EntityModel(DataType.PYREEVENT_CampTaken, EntityType.Pyre_Event)
                    .AddPart(new EntityInfoModel { Name = "Pyre Camp", Description = "Provides 25 when taken." })
                    .AddPart(new EntityPyreRewardModel { BaseReward = 25 })
                    .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "2" })
            },
            {
                DataType.PYREEVENT_MinerTaken, new EntityModel(DataType.PYREEVENT_MinerTaken, EntityType.Pyre_Event)
                    .AddPart(new EntityInfoModel { Name = "Pyre Camp", Description = "Provides 90 when taken." })
                    .AddPart(new EntityPyreRewardModel
                        { BaseReward = 0, OverTimeRewardDuration = 90, OverTimeReward = 1 })
                    .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "2" })
            },
            {
                DataType.PYREEVENT_TowerKilled, new EntityModel(DataType.PYREEVENT_TowerKilled, EntityType.Pyre_Event)
                    .AddPart(new EntityInfoModel { Name = "Tower Taken", Description = "Provides 10 when destroyed." })
                    .AddPart(new EntityPyreRewardModel { BaseReward = 10 })
                    .AddPart(new EntityHotkeyModel { Hotkey = "R", HotkeyGroup = "2" })
            },

            // TEAPOTS
            {
                DataType.TEAPOT_Teapot, new EntityModel(DataType.TEAPOT_Teapot, EntityType.Teapot)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Teapot", Description = "Basic scout. Every faction has this",
                        Notes = @"Very powerful! So Fast"
                    })
                    .AddPart(new EntityVitalityModel { Health = 120, Armor = ArmorType.Light })
                    .AddPart(new EntityMovementModel { Speed = 400 })
            },
            {
                DataType.TEAPOT_FlyingTeapot, new EntityModel(DataType.TEAPOT_FlyingTeapot, EntityType.Teapot)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Detector",
                        Description = "Has 1100 vision, and can see hidden units within 1000 range.",
                        Notes = @"Doesn't take up a scout slot."
                    })
                    .AddPart(new EntityRequirementModel { Id = DataType.TEAPOT_Teapot })
                    .AddPart(new EntitySupplyModel { Takes = 1 })
                    .AddPart(new EntityProductionModel { Alloy = 100, Ether = 50 })
                    .AddPart(new EntityVitalityModel { Health = 120, DefenseLayer = 80, Armor = ArmorType.Light })
                    .AddPart(new EntityMovementModel { Speed = 280, Movement = MovementType.Air })
                    .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_Detection })
            },

            // Families
            {
                DataType.FAMILY_Rae,
                new EntityModel(DataType.FAMILY_Rae, EntityType.Family, true)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Rae"
                    })
            },
            {
                DataType.FAMILY_Sylv,
                new EntityModel(DataType.FAMILY_Sylv, EntityType.Family, true)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Sylv"
                    })
            },
            {
                DataType.FAMILY_Angelic,
                new EntityModel(DataType.FAMILY_Angelic, EntityType.Family, true)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Angelic"
                    })
            },
            {
                DataType.FAMILY_Human,
                new EntityModel(DataType.FAMILY_Human, EntityType.Family, true)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Human"
                    })
            },
            {
                DataType.FAMILY_Coalition,
                new EntityModel(DataType.FAMILY_Coalition, EntityType.Family, true)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Coalition?"
                    })
            },
            {
                DataType.FAMILY_Demonic,
                new EntityModel(DataType.FAMILY_Demonic, EntityType.Family, true)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Demonic?"
                    })
            },
            {
                DataType.FAMILY_NazRa,
                new EntityModel(DataType.FAMILY_NazRa, EntityType.Family, true)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Naz'Ra"
                    })
            },
            // Factions
            // Sylv
            {
                DataType.FACTION_Aru,
                new EntityModel(DataType.FACTION_Aru, EntityType.Faction)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Aru"
                    })
                    .AddPart(new EntityPassiveModel
                    {
                        Name = "Overgrowth",
                        Description =
                            "Your units have an extra layer of health a regens rapidly when a unit hasn't been damaged recently. This regen is doubled on rootway."
                    })
                    .AddPart(new EntityPassiveModel
                    {
                        Name = "Blood",
                        Description =
                            "Your casters passively get blood for spells. This blood regen rate is increased on rootway. Your casters can also spend their own life as blood. (Spending health as blood is currenly not in game.)"
                    })
                    .AddPart(new EntityPassiveModel
                    {
                        Name = "Blood Wells",
                        Description =
                            "You can summon blood wells for pyre, that allow you to heal your units health and mana."
                    })
            },
            {
                DataType.FACTION_Iratek,
                new EntityModel(DataType.FACTION_Iratek, EntityType.Faction, true)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Iratek"
                    })
            },
            {
                DataType.FACTION_Yul,
                new EntityModel(DataType.FACTION_Yul, EntityType.Faction, true)
                    .AddPart(new EntityInfoModel { Name = "Yul" })
            },
            // Factions
            // Angelic
            {
                DataType.FACTION_QRath,
                new EntityModel(DataType.FACTION_QRath, EntityType.Faction)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Q'Rath",
                        Notes =
                            "Angelic faction that has adopted many humans into their ranks. They seek to bring more into their collective."
                    })
                    .AddPart(new EntityPassiveModel
                    {
                        Name = "Wards",
                        Description =
                            "Your units have an extra layer of health that is always (but slowly) regenerates. The regeneration is double on Hallowed Ground."
                    })
            },
            {
                DataType.FACTION_YRiah,
                new EntityModel(DataType.FACTION_QRath, EntityType.Faction, true)
                    .AddPart(new EntityInfoModel { Name = "R'Raih" })
            },
            {
                DataType.FACTION_ArkShai,
                new EntityModel(DataType.FACTION_QRath, EntityType.Faction, true)
                    .AddPart(new EntityInfoModel
                        { Name = "Ark'Shai" })
            },
            // Factions
            // Human
            {
                DataType.FACTION_Jora,
                new EntityModel(DataType.FACTION_Jora, EntityType.Faction, true)
                    .AddPart(new EntityInfoModel { Name = "Jora" })
            },
            {
                DataType.FACTION_Telmetra,
                new EntityModel(DataType.FACTION_Telmetra, EntityType.Faction, true)
                    .AddPart(new EntityInfoModel { Name = "Talmetra" })
            },
            {
                DataType.FACTION_Kjor,
                new EntityModel(DataType.FACTION_Kjor, EntityType.Faction, true)
                    .AddPart(new EntityInfoModel
                        { Name = "Kjor" }
                    )
            },
            // Factions
            // Rae
            {
                DataType.FACTION_Herlesh,
                new EntityModel(DataType.FACTION_Herlesh, EntityType.Faction, true)
                    .AddPart(new EntityInfoModel { Name = "Herlesh" })
            },
            // Factions
            // Coalition
            {
                DataType.FACTION_Khardu,
                new EntityModel(DataType.FACTION_Khardu, EntityType.Faction, true)
                    .AddPart(new EntityInfoModel { Name = "Khardu" })
            },
            // Factions
            // Neutral
            {
                DataType.FACTION_Neutral,
                new EntityModel(DataType.FACTION_Neutral, EntityType.Faction)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Neutral"
                    })
            },

            // Keys
            {
                DataType.COMMAND_Attack,
                new EntityModel(DataType.COMMAND_Attack, EntityType.Command)
                    .AddPart(new EntityInfoModel
                        { Name = "Attack", Description = "Makes selected units attack targeted area." })
                    .AddPart(new EntityHotkeyModel { Hotkey = "A", HotkeyGroup = "D" })
            },
            {
                DataType.COMMAND_StandGround,
                new EntityModel(DataType.COMMAND_StandGround, EntityType.Command)
                    .AddPart(new EntityInfoModel
                        { Name = "Stand Ground", Description = "Makes selected units stop moving." })
                    .AddPart(new EntityHotkeyModel { Hotkey = "S", HotkeyGroup = "D" })
            },
            // Starting Structures
            {
                DataType.STARTING_Bastion,
                new EntityModel(DataType.STARTING_Bastion, EntityType.Building)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Bastion",
                        Description = "Provides a fully upgraded base worth of alloy.",
                        Notes = "Revives in 40 seconds when destroyed."
                    })
                    .AddPart(new EntityFactionModel { Faction = DataType.FACTION_Neutral })
                    .AddPart(new EntityHarvestModel
                    {
                        HarvestedPerInterval = 6, RequiresWorker = false, Resource = ResourceType.Alloy, Slots = 1,
                        TotalAmount = 6000
                    })
                    .AddPart(new EntityVitalityModel { Health = 500, Armor = ArmorType.Heavy })
                    .AddPart(new EntityWeaponModel
                        { Damage = 30, AttacksPerSecond = 1.401f, Targets = TargetType.All, Range = 700 })
                    .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_BastionPassives })
            },
            {
                DataType.STARTING_Tower,
                new EntityModel(DataType.STARTING_Tower, EntityType.Building)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Starting Tower",
                        Notes = "Currently not in game. Can be upgraded to the factions pyre tower."
                    })
                    .AddPart(new EntityFactionModel { Faction = DataType.FACTION_Neutral })
                    .AddPart(new EntityFactionModel { Faction = DataType.FACTION_Neutral })
                    .AddPart(new EntityVitalityModel
                        { Health = 1000, DefenseLayer = 500, Armor = ArmorType.Heavy, IsStructure = true })
                    .AddPart(new EntityWeaponModel
                    {
                        Damage = 20, Range = 800, AttacksPerSecond = 1.124f, Targets = TargetType.All,
                        MediumDamage = 25, HeavyDamage = 30
                    })
                    .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_Respite })
                    .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_HallowedGround })
            },
            // Starting Structures
            // Aru
            {
                DataType.STARTING_TownHall_Aru,
                new EntityModel(DataType.STARTING_TownHall_Aru, EntityType.Building, true)
                    .AddPart(new EntityInfoModel
                        { Name = "Grove Heart (Starting)", Descriptive = DescriptiveType.TownHall_Starting })
                    .AddPart(new EntityFactionModel { Faction = DataType.FACTION_Aru })
                    .AddPart(new EntityVitalityModel
                        { Health = 2000, DefenseLayer = 400, Armor = ArmorType.Heavy, IsStructure = true })
                    .AddPart(new EntityHarvestModel
                    {
                        HarvestedPerInterval = 1, RequiresWorker = true, Resource = ResourceType.Alloy, Slots = 6,
                        TotalAmount = 6000
                    })
                    .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_Rootway })
            },
            // Starting Structures
            // Q'Rath
            {
                DataType.STARTING_TownHall_QRath,
                new EntityModel(DataType.STARTING_TownHall_QRath, EntityType.Building, true)
                    .AddPart(new EntityInfoModel
                        { Name = "Acropolis (Starting)", Descriptive = DescriptiveType.TownHall_Starting })
                    .AddPart(new EntityFactionModel { Faction = DataType.FACTION_QRath })
                    .AddPart(new EntityVitalityModel
                        { Health = 1600, DefenseLayer = 800, Armor = ArmorType.Heavy, IsStructure = true })
                    .AddPart(new EntityHarvestModel
                    {
                        HarvestedPerInterval = 6, RequiresWorker = false, Resource = ResourceType.Alloy, Slots = 1,
                        TotalAmount = 6000
                    })
                    .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_HallowedGround })
            },

            // Passives
            // Neutral

            {
                DataType.PASSIVE_Detection,
                new EntityModel(DataType.PASSIVE_Detection, EntityType.Passive)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Detection", Descriptive = DescriptiveType.Passive,
                        Description =
                            @"Unit can see all hidden units in its detection radius."
                    })
                    .AddPart(new EntityFactionModel { Faction = DataType.Any })
            },

            {
                DataType.PASSIVE_BastionPassives,
                new EntityModel(DataType.PASSIVE_BastionPassives, EntityType.Passive)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "(Scouts and Pyre)", Descriptive = DescriptiveType.Passive,
                        Description =
                            @"Bastion generates one scout in 2 minutes, up to a max of 2 scouts. And generates pyre over time."
                    })
                    .AddPart(new EntityFactionModel { Faction = DataType.Any })
            },
            {
                DataType.PASSIVE_Respite,
                new EntityModel(DataType.PASSIVE_Respite, EntityType.Passive)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Respite", Descriptive = DescriptiveType.Passive,
                        Description =
                            @"Nearby units will slowly heal after not attacking or being attacked for 10 seconds."
                    })
                    .AddPart(new EntityFactionModel { Faction = DataType.Any })
            },

            {
                DataType.PASSIVE_HarvestAlloy,
                new EntityModel(DataType.PASSIVE_HarvestAlloy, EntityType.Passive)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Harvest Alloy", Descriptive = DescriptiveType.Passive,
                        Description = "This unit can harvest alloy."
                    })
                    .AddPart(new EntityFactionModel { Faction = DataType.Any })
            },

            {
                DataType.NEUTRAL_PyreMiner,
                new EntityModel(DataType.NEUTRAL_PyreMiner, EntityType.Building)
                    .AddPart(new EntityInfoModel
                    {
                        Name = "Pyre Miner",
                        Description = "Passively harvest pyre.",
                        Notes = ""
                    })
            }
        };
    }
}