zenno: section speed does not use base wit
Per analysis by Aya, only final wit is used for section speed. Fixes #40.
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
const damCarry = $derived(allowDAM && slope < 0 ? race.downhillAccelMod(slope) : 0);
|
||||
const carry = $derived(skillCarry + damCarry);
|
||||
const midSpeed = $derived.by(() => {
|
||||
const s = race.sectionSpeed(raceLen, baseWit, wit, style, race.Phase.MidRace) satisfies [number, number];
|
||||
const s = race.sectionSpeed(raceLen, wit, style, race.Phase.MidRace) satisfies [number, number];
|
||||
const u = slope > 0 ? race.uphillMod(power, slope) : 0;
|
||||
return [s[0] + u, s[1] + u] as const;
|
||||
});
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
}
|
||||
return [0, 0];
|
||||
});
|
||||
const earlyTarget = $derived(race.sectionSpeed(raceLen, baseWit, wit, style, race.Phase.EarlyRace));
|
||||
const earlyTarget = $derived(race.sectionSpeed(raceLen, wit, style, race.Phase.EarlyRace));
|
||||
const speeds: [number, number] = $derived([earlyTarget[0] + hillMod[0], earlyTarget[1] + hillMod[1]]);
|
||||
|
||||
const startInstant: accel.Instant = { t: 0, x: 0, v: 3 };
|
||||
|
||||
@@ -96,14 +96,8 @@
|
||||
|
||||
const distType = $derived(race.distance(raceLen));
|
||||
const phaseSpeed = $derived({
|
||||
[race.Phase.EarlyRace]: race.sectionSpeed(
|
||||
raceLen,
|
||||
baseStats[race.Stat.Wit],
|
||||
stats[race.Stat.Wit],
|
||||
style,
|
||||
race.Phase.EarlyRace,
|
||||
),
|
||||
[race.Phase.MidRace]: race.sectionSpeed(raceLen, baseStats[race.Stat.Wit], stats[race.Stat.Wit], style, race.Phase.MidRace),
|
||||
[race.Phase.EarlyRace]: race.sectionSpeed(raceLen, stats[race.Stat.Wit], style, race.Phase.EarlyRace),
|
||||
[race.Phase.MidRace]: race.sectionSpeed(raceLen, stats[race.Stat.Wit], style, race.Phase.MidRace),
|
||||
[race.Phase.LateRace]: [
|
||||
race.spurtSpeed(stats[race.Stat.Speed], stats[race.Stat.Guts], style, distanceApt, raceLen),
|
||||
race.spurtSpeed(stats[race.Stat.Speed], stats[race.Stat.Guts], style, distanceApt, raceLen),
|
||||
|
||||
Reference in New Issue
Block a user