namespace ReactorMaintenance.Simulation.Difficulties;

public class NormalBalancing : Balancing
{
    public override int DefaultLevelWidth => 16;
    public override int DefaultLevelHeight => 12;
    public override int MinimumLevelSize => 4;
    public override int ActionsPerTurn => 3;
    public override int ForecastHorizon => 6;
    public override float MinValue => 0;
    public override float MaxValue => 10;
    public override float FuelSafe => 1.5f;
    public override float FuelCaution => 3.5f;
    public override float FuelCritical => 6.5f;
    public override float CoolantSafe => 1.5f;
    public override float CoolantCaution => 3.5f;
    public override float CoolantCritical => 6.5f;
    public override float ElectricitySafe => 1.5f;
    public override float ElectricityCaution => 3.5f;
    public override float ElectricityCritical => 6.5f;
    public override float HeatSafe => 2;
    public override float HeatCaution => 5;
    public override float HeatCritical => 8;
    public override float TerminalHeat => 10;
    public override float RobotFuelSafetyThreshold => 6.5f;
    public override float RobotCoolantSafetyThreshold => 8;
    public override float RobotElectricitySafetyThreshold => 6.5f;
    public override float RobotHeatSafetyThreshold => 8;
    public override float SourceAmount => 8;
    public override float SourceIntensity => 8;
    public override float DistanceAmountFalloff => 0.5f;
    public override float DistanceIntensityFalloff => 0.4f;

    public override IReadOnlyList<JunctionRatioPreset> TwoOutflowJunctionRatios { get; } = [
        new("0/4", [0, 1]),
        new("1/3", [0.25f, 0.75f]),
        new("2/2", [0.5f, 0.5f]),
        new("3/1", [0.75f, 0.25f]),
        new("4/0", [1, 0])
    ];

    public override IReadOnlyList<JunctionRatioPreset> ThreeOutflowJunctionRatios { get; } = [
        new("0/3/3", [0, 0.5f, 0.5f]),
        new("3/0/3", [0.5f, 0, 0.5f]),
        new("3/3/0", [0.5f, 0.5f, 0]),
        new("2/2/2", [1f / 3f, 1f / 3f, 1f / 3f])
    ];

    public override float ConsumerRequiredAmount => 2.5f;
    public override float ConsumerRequiredIntensity => 2.5f;
    public override float LeakBaseAmount => 0.5f;
    public override float LeakAmountScale => 0.15f;
    public override float LeakIntensityScale => 0.1f;
    public override float FlowTransferRatio => 0.05f;
    public override float WarmCautionAmount => 0.5f;
    public override float WarmCriticalAmount => 1.0f;
    public override float QuenchCautionAmount => 0.6f;
    public override float QuenchCriticalAmount => 1.2f;
    public override float ShortCautionHeat => 0.8f;
    public override float ShortCautionDischarge => 0.8f;
    public override float ShortCriticalHeat => 1.6f;
    public override float ShortCriticalDischarge => 1.5f;
    public override float IgniteCautionHeat => 1.2f;
    public override float IgniteCautionFuelConsumption => 0.4f;
    public override float IgniteCriticalHeat => 2.4f;
    public override float IgniteCriticalFuelConsumption => 0.8f;
    public override int RemedyBlockTurns => 2;
    public override int HeatShieldSteps => 3;
    public override int InventoryCapacityPerRemedy => 3;
}