using System.Collections.Generic;
using CounterDrone.Core.Models;

namespace CounterDrone.Core.Algorithms
{
    /// <summary>默认弹药规格 — 基于发烟罐/烟幕弹工程数据</summary>
    /// <remarks>
    /// 参考：10kg烟幕剂，抛射药/烟幕剂质量比 5%-20%，TNT当量 1.5-2kg（典型值）
    /// 初始半径 R₀ = 3.3 × W^0.32 ≈ 3.8~4.1m
    /// </remarks>
    public static class DefaultAmmunition
    {
        public static List<AmmunitionSpec> GetAll()
        {
            return new List<AmmunitionSpec>
            {
                new AmmunitionSpec
                {
                    Id = "default-inert", AerosolType = (int)AerosolType.InertGas,
                    Name = "惰性气体弹（发烟罐型）",
                    InitialRadius = 3.8,
                    CoreDensity = 1.5, EdgeDensity = 0.1,
                    InitialTemperature = 1800, BuoyancyFactor = 0.3,
                    EffectiveConcentration = 0.0001,
                    MaxRadius = 100.0, MaxDuration = 120.0,
                    SourceStrength = 10.0,
                    BurstChargeKg = 1.5, TurbulentExpansionK = 3.0,
                },
                new AmmunitionSpec
                {
                    Id = "default-active", AerosolType = (int)AerosolType.ActiveMaterial,
                    Name = "活性材料弹（爆炸分散型）",
                    InitialRadius = 5.0,
                    CoreDensity = 2.0, EdgeDensity = 0.2,
                    InitialTemperature = 2400, BuoyancyFactor = 0.6,
                    EffectiveConcentration = 0.0002,
                    MaxRadius = 80.0, MaxDuration = 90.0,
                    SourceStrength = 12.0,
                    BurstChargeKg = 4.0, TurbulentExpansionK = 4.0,
                },
                new AmmunitionSpec
                {
                    Id = "default-fuel", AerosolType = (int)AerosolType.ActiveFuel,
                    Name = "活性燃料弹（抛射分散型）",
                    InitialRadius = 3.8,
                    CoreDensity = 1.8, EdgeDensity = 0.15,
                    InitialTemperature = 1900, BuoyancyFactor = 0.4,
                    EffectiveConcentration = 0.0001,
                    MaxRadius = 90.0, MaxDuration = 100.0,
                    SourceStrength = 10.0,
                    BurstChargeKg = 1.5, TurbulentExpansionK = 3.0,
                },
            };
        }

        public static AmmunitionSpec GetByType(AerosolType type)
            => GetAll().Find(a => a.AerosolType == (int)type) ?? GetAll()[0];
    }
}
