diff --git a/zenno/src/lib/race.ts b/zenno/src/lib/race.ts index 8d72bdf..48dac19 100644 --- a/zenno/src/lib/race.ts +++ b/zenno/src/lib/race.ts @@ -95,21 +95,20 @@ const distanceProficiencyMod = [0.1, 0.2, 0.4, 0.6, 0.8, 0.9, 1.0, 1.05] as cons /** * Calculate an Uma's last spurt target speed. - * @param rawSpeed Uma's speed stat. No accounting for mood lol. - * @param gutsStat Uma's guts stat. + * @param speedStat Adjusted speed stat + * @param gutsStat Adjusted guts stat * @param style Running style * @param distance Distance aptitude * @param raceLen Length of the race * @returns Target speed in the last spurt in m/s */ export function spurtSpeed( - rawSpeed: number, + speedStat: number, gutsStat: number, style: RunningStyle, distance: AptitudeLevel, raceLen: number, ): number { - const speedStat = rawSpeed <= 1200 ? rawSpeed : 1200 + (rawSpeed - 1200) * 0.5; const spc = speedStrategyPhaseCoeff[style][Phase.LateRace]; const dpm = distanceProficiencyMod[distance]; const base = baseSpeed(raceLen); @@ -149,9 +148,6 @@ export function inverseSpurtSpeed( const base = baseSpeed(raceLen); const nr = spurtSpeed - base * (1.05 * spc + 0.0105) - Math.pow(450 * gutsStat, 0.597) * 0.0001; const r = (nr * nr) / (0.008405 * dpm * dpm); - if (r > 1200) { - return Math.round(2 * r - 1200); - } return Math.round(r); }