diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index 62d02be..094a72a 100644 Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ARA_QueuedIncubator.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ARA_QueuedIncubator.xml index ad7e7fe..3adb0db 100644 --- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ARA_QueuedIncubator.xml +++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ARA_QueuedIncubator.xml @@ -44,6 +44,7 @@ 孵化速度: {0}x 效率 速度 + 品质 模式: {0} ⚠ 休眠中,品质下降! 剩余时间: {0} 天 diff --git a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/Gizmo_NeutronFlux.cs b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/Gizmo_NeutronFlux.cs index 04bd1fe..44ef0c6 100644 --- a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/Gizmo_NeutronFlux.cs +++ b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/Gizmo_NeutronFlux.cs @@ -160,23 +160,24 @@ namespace ArachnaeSwarm Text.Font = GameFont.Tiny; - // 效率 - GUI.color = new Color(0.7f, 0.7f, 0.7f); - Rect effRect = new Rect(infoX, barRect.y + 22f, infoWidth, 14f); - Widgets.Label(effRect, "ARA_Status_Efficiency".Translate()); - Rect effValRect = new Rect(infoX, barRect.y + 36f, infoWidth, 14f); - GUI.color = Color.white; - Widgets.Label(effValRect, (controller.FluxEfficiency * 100f).ToString("0") + "%"); - // 速度倍率 GUI.color = new Color(0.7f, 0.7f, 0.7f); - float speedMultiplier = controller.FluxEfficiency * 5f; - Rect speedRect = new Rect(infoX, barRect.y + 54f, infoWidth, 14f); - Widgets.Label(speedRect, "ARA_Status_Speed".Translate()); - Rect speedValRect = new Rect(infoX, barRect.y + 68f, infoWidth, 14f); + Rect speedLabelRect = new Rect(infoX, barRect.y + 22f, infoWidth, 14f); + Widgets.Label(speedLabelRect, "ARA_Status_Speed".Translate()); + float speedMultiplier = controller.FluxEfficiency; + Rect speedValRect = new Rect(infoX, barRect.y + 36f, infoWidth, 14f); GUI.color = speedMultiplier >= 1f ? new Color(0.5f, 1f, 0.5f) : new Color(1f, 0.7f, 0.5f); Widgets.Label(speedValRect, speedMultiplier.ToString("0.0") + "x"); + // 品质倍率 + GUI.color = new Color(0.7f, 0.7f, 0.7f); + float qualityCoeff = IncubatorUtils.GetQualityCoefficient(controller.NeutronFlux); + Rect qualLabelRect = new Rect(infoX, barRect.y + 54f, infoWidth, 14f); + Widgets.Label(qualLabelRect, "ARA_Status_Quality".Translate()); + Rect qualValRect = new Rect(infoX, barRect.y + 68f, infoWidth, 14f); + GUI.color = qualityCoeff >= 1f ? new Color(0.5f, 0.7f, 1f) : new Color(1f, 0.7f, 0.5f); + Widgets.Label(qualValRect, qualityCoeff.ToString("0.0") + "x"); + GUI.color = Color.white; Text.Anchor = TextAnchor.UpperLeft; Text.Font = GameFont.Small; diff --git a/Source/ArachnaeSwarm/Buildings/IFluxController.cs b/Source/ArachnaeSwarm/Buildings/IFluxController.cs index 9823c3f..8780efd 100644 --- a/Source/ArachnaeSwarm/Buildings/IFluxController.cs +++ b/Source/ArachnaeSwarm/Buildings/IFluxController.cs @@ -32,12 +32,17 @@ namespace ArachnaeSwarm public static class IFluxControllerExtensions { /// - /// 计算通量效率(非线性曲线) + /// 计算通量速度效率(非线性二次曲线) + /// 0% = 0.1× (几乎停滞) + /// 50% = 1.0× (基准) + /// 100% = 3.3× (极速) /// public static float GetEfficiency(float flux) { - // 使用平方根曲线:0% -> 0, 50% -> 0.707, 100% -> 1.0 - return Mathf.Sqrt(Mathf.Clamp01(flux)); + // 与 IncubatorUtils.GetFluxEfficiency 保持一致 + float x = Mathf.Clamp01(flux) - 0.5f; + float efficiency = 2.8f * x * x + 3.2f * x + 1.0f; + return Mathf.Max(0.1f, efficiency); } } diff --git a/Source/ArachnaeSwarm/Buildings/IncubatorUtils.cs b/Source/ArachnaeSwarm/Buildings/IncubatorUtils.cs index 42fe6a7..b207e4b 100644 --- a/Source/ArachnaeSwarm/Buildings/IncubatorUtils.cs +++ b/Source/ArachnaeSwarm/Buildings/IncubatorUtils.cs @@ -72,12 +72,31 @@ namespace ArachnaeSwarm // ============================================ /// - /// 计算通量效率(0-1之间,通量越高效率越高) + /// 计算通量速度效率(非线性曲线) + /// 0% = 0.1× (几乎停滞) + /// 50% = 1.0× (基准) + /// 100% = 3.3× (极速) + /// 公式: 2.8*(flux-0.5)^2 + 3.2*(flux-0.5) + 1.0 /// public static float GetFluxEfficiency(float neutronFlux) { - // 与 IFluxControllerExtensions.GetEfficiency 保持一致 - return Mathf.Pow(neutronFlux, 0.7f); + // 非线性二次曲线:低通量惩罚激进,高通量加成显著 + float x = neutronFlux - 0.5f; + float efficiency = 2.8f * x * x + 3.2f * x + 1.0f; + return Mathf.Max(0.1f, efficiency); + } + + /// + /// 计算通量品质系数(线性曲线) + /// 0% = 2.0× (精雕细琢) + /// 50% = 1.0× (基准) + /// 100% = 0.1× (粗制滥造) + /// + public static float GetQualityCoefficient(float neutronFlux) + { + // 线性下降:高通量严重牺牲品质 + float coeff = 2.0f * (1f - neutronFlux); + return Mathf.Max(0.1f, coeff); } /// @@ -132,18 +151,17 @@ namespace ArachnaeSwarm } // ============================================ - // 品质系统(新公式:50%通量时与进度同步) + // 品质系统(平衡点设计:50%通量时综合效用最大) // ============================================ /// - /// 计算单tick的品质增量(新公式) - /// 核心:50%通量时品质增长 = 进度增长(1:1同步) - /// 公式:qualityGain = progressGain × 2 × (1 - neutronFlux) + /// 计算单tick的品质增量 + /// 使用品质系数:0%=2.0, 50%=1.0, 100%=0.1 + /// 公式:qualityGain = progressGain × qualityCoeff /// public static float CalculateQualityGainNew(float progressGain, float neutronFlux) { - // qualityCoeff: 0%通量=2.0, 25%通量=1.5, 50%通量=1.0, 75%通量=0.5, 100%通量=0 - float qualityCoeff = 2f * (1f - neutronFlux); + float qualityCoeff = GetQualityCoefficient(neutronFlux); return progressGain * qualityCoeff; }