lootalot
Version:
Library for simulating loot table drops of arbitrary trial counts
26 lines (25 loc) • 1.25 kB
TypeScript
/** The loot table preference object type used to detemine how a specific loot table behaves. */
export type LootTablePrefs = {
/** The algorithm used to determine if two item entries are equal, used to merge loot results. */
duplicateSearchMode: DuplicateSearchMode;
};
/** The algorithm used to determine if two item entries are equal, used to merge loot results. */
declare enum DuplicateSearchMode {
/** Items are compared using the loose equal operator (`==`). */
"equal" = "equal",
/** Items are compared using the strict equal operator (`===`). */
"strict_equal" = "strict_equal",
/** Items are converted to JSON strings and then compared using the strict equal operator (`===`). */
"json" = "json"
}
/** Preferences object. */
export declare let prefs: {
/** The maximum allowed precision error of thresholds such as the sum of probabilty values error. */
ARITHMETIC_ERROR: number;
/** The maximum amount of times can we roll the RNG manually (for accuracy)
* before it's better to approxmiate the rolling using math (for performance) instead. */
MAX_REPEAT: number;
/** The default value of new loot tables' preferences object */
DEFAULT_TABLE_PREFS: LootTablePrefs;
};
export {};