More anomalies (#13766)

This commit is contained in:
Nemanja
2023-02-06 00:03:53 -05:00
committed by GitHub
parent 3656d3cc21
commit f450398df7
41 changed files with 855 additions and 47 deletions

View File

@@ -23,7 +23,6 @@ public sealed partial class AnomalySystem : SharedAnomalySystem
[Dependency] private readonly DoAfterSystem _doAfter = default!;
[Dependency] private readonly ExplosionSystem _explosion = default!;
[Dependency] private readonly MaterialStorageSystem _material = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly UserInterfaceSystem _ui = default!;
public const float MinParticleVariation = 0.8f;
@@ -100,13 +99,13 @@ public sealed partial class AnomalySystem : SharedAnomalySystem
var multiplier = 1f;
if (component.Stability > component.GrowthThreshold)
multiplier = component.GrowingPointMultiplier; //more points for unstable
else if (component.Stability < component.DecayThreshold)
multiplier = component.DecayingPointMultiplier; //less points if it's dying
//penalty of up to 50% based on health
multiplier *= MathF.Pow(1.5f, component.Health) - 0.5f;
return (int) ((component.MaxPointsPerSecond - component.MinPointsPerSecond) * component.Severity * multiplier);
var severityValue = 1 / (1 + MathF.Pow(MathF.E, -7 * (component.Severity - 0.5f)));
return (int) ((component.MaxPointsPerSecond - component.MinPointsPerSecond) * severityValue * multiplier) + component.MinPointsPerSecond;
}
/// <summary>