zenno/doc/race: skill activation chance is not integer percent

This commit is contained in:
2026-06-14 20:00:27 -04:00
parent 2e618b613f
commit f8e7bfbec6
2 changed files with 6 additions and 10 deletions
+5 -5
View File
@@ -472,7 +472,7 @@ export function moveLaneModifier(powerStat: number): number {
* @returns Probability of exactly n skills out of N passing wit checks
*/
export function skillWitCheck(baseWit: number, N?: number, n?: number): number {
const p = Math.ceil(Math.max(20, 100 - 9000 / baseWit)) / 100;
const p = Math.max(0.2, 1 - 90 / baseWit);
return binomPMF(p, N ?? 1, n ?? 1);
}
@@ -519,7 +519,7 @@ export function speedGain(speedBonus: number, dur: number, accel: number | null,
* @returns Probability per candidate to accept
*/
export function reducedSpurtChance(witStat: number): number {
return Math.ceil(15 + 0.05 * witStat) / 100;
return 0.15 + 0.0005 * witStat;
}
/**
@@ -528,7 +528,7 @@ export function reducedSpurtChance(witStat: number): number {
* @returns Probability each eligible tick to enter downhill accel mode
*/
export function downhillAccelEnterChance(witStat: number): number {
return Math.ceil(witStat * 0.04) / 100;
return witStat * 0.0004;
}
/**
@@ -537,7 +537,7 @@ export function downhillAccelEnterChance(witStat: number): number {
* @returns Probability each eligible tick to enter speed-up or overtake mode
*/
export function frontModeEnterChance(witStat: number): number {
return Math.ceil(20 * math.log10(witStat * 0.1)) / 100;
return 0.2 * math.log10(witStat * 0.1);
}
/**
@@ -546,7 +546,7 @@ export function frontModeEnterChance(witStat: number): number {
* @returns Probability each eligible tick to enter pace-up mode
*/
export function paceUpEnterChance(witStat: number): number {
return Math.ceil(15 * math.log10(witStat * 0.1)) / 100;
return 0.15 * math.log10(witStat * 0.1);
}
/**