Update src/test/utils/overridesHelper.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
This commit is contained in:
ImperialSympathizer 2024-07-19 17:25:03 -04:00 committed by GitHub
parent 6a697b193e
commit f80901f7b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,7 @@ export class OverridesHelper {
* @param percentage the encounter chance in %
* @returns spy instance
*/
mysteryEncounterChance(percentage: number): MockInstance {
mysteryEncounterChance(percentage: number) {
const maxRate: number = 256; // 100%
const rate = maxRate * (percentage / 100);
const spy = vi.spyOn(Overrides, "MYSTERY_ENCOUNTER_RATE_OVERRIDE", "get").mockReturnValue(rate);