Fix health state to be 1, 19, 20, 20, 20, 20 thresholds (#7921)

Previous thresholds were 1, 33, 16, 17, 17, 16
This commit is contained in:
ShadowCommander
2022-05-03 16:11:18 -07:00
committed by GitHub
parent 86494e7b3d
commit d9633afe1a

View File

@@ -26,10 +26,9 @@ namespace Content.Server.MobState.States
short modifier = 0;
if (stateComponent.TryGetEarliestIncapacitatedState(threshold, out _, out var earliestThreshold) && damageable.TotalDamage > 0)
if (stateComponent.TryGetEarliestIncapacitatedState(threshold, out _, out var earliestThreshold) && damageable.TotalDamage != 0)
{
modifier = (short) MathF.Max((float) (damageable.TotalDamage / (earliestThreshold / 6f)),1);
//if hurt at all we skip to the first hurt state with Max(), anything else will end up falling to 5 at maximum before crit
modifier = (short)(damageable.TotalDamage / (earliestThreshold / 5) + 1);
}
EntitySystem.Get<AlertsSystem>().ShowAlert(entity, AlertType.HumanHealth, modifier);
}