diff --git a/zenno/src/lib/race.ts b/zenno/src/lib/race.ts index fe95f57..553c786 100644 --- a/zenno/src/lib/race.ts +++ b/zenno/src/lib/race.ts @@ -306,7 +306,15 @@ export function adjustedStatFromFinal(finalStat: number, skillPassive: number): return finalStat - skillPassive; } -export function baseStatFromAdjusted(stat: Stat, adjStat: number, career: boolean, surface: Surface, conditions: GroundConditions, styleApt: AptitudeLevel, thresholdMod: number): number { +export function baseStatFromAdjusted( + stat: Stat, + adjStat: number, + career: boolean, + surface: Surface, + conditions: GroundConditions, + styleApt: AptitudeLevel, + thresholdMod: number, +): number { const careerMod = career ? 400 : 0; switch (stat) { case Stat.Speed: @@ -324,7 +332,7 @@ export function baseStatFromAdjusted(stat: Stat, adjStat: number, career: boolea export function rawStatFromBase(baseStat: number, mood: Mood): number { // Round to half-integers in case we have a component above 1200. - const s = Math.round(2 * baseStat / MOOD_COEF[mood]) / 2; + const s = Math.round((2 * baseStat) / MOOD_COEF[mood]) / 2; const r = math.min(s, 1200) + math.max(s - 1200, 0) * 2; return r; }