Fix bug in stat reducing not functioning properly
Build / Build (push) Successful in 1m54s

This commit is contained in:
Deukhoofd committed 2026-07-01 17:56:13 +02:00
1 parent 14a6c9b4fb
commit 8fbf22a987
2 files changed
+106 -1

No files matched your search

+1 -1
View File
@@ -312,7 +312,7 @@ public abstract record ClampedStatisticSet<T> : StatisticSet<T> where T : struct
var current = GetStatistic(stat);
var newValue = Subtract(current, value);
if (newValue.CompareTo(Min) < 0)
value = Add(Min, current);
value = Subtract(current, Min);
if (value.CompareTo(default) == 0)
return false;
return base.DecreaseStatistic(stat, value);