indexgetFactorProbabilityModifier
function getFactorProbabilityModifier
import { getFactorProbabilityModifier } from ".";

Returns a function that generates a ProbabilityModifier based on a specific factor's comparison to a range. The type of factors that can be used is constrained by the _stats parameter, ensuring only valid stats are considered.

Type Parameters

E extends Record<string, string>

Parameters

_stats: E

An enum-like structure that limits which factors can be used as the function's argument, ensuring type safety.

Return Type