private static void CalculateScale(Stat stat, string scaleType, float modifierValue, Characters.Character target) { var healthFraction = Metrics.GetCurrentFraction(true, target); stat.modifiers[scaleType] = stat.modifiers.ContainsKey(scaleType) ? stat.modifiers[scaleType] > 0 ? modifierValue * (stat.GetValue() - stat.modifiers[scaleType]) : modifierValue *stat.GetValue() : modifierValue *stat.GetValue(); target.SetCurrentStat(0, healthFraction); StatsPanel.Instance.UpdateStatsText(); }