From 24d94c1dfb7ae92b5b9187d1f97adebedd7a0f57 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Fri, 28 Mar 2025 02:29:48 +0100 Subject: [PATCH] Added override for shiny chance --- src/field/pokemon.ts | 4 ++++ src/overrides.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 43bab0f049d..c3b3ce86473 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2991,6 +2991,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { shinyThreshold.value = thresholdOverride; } + if (!isNullOrUndefined(Overrides.OPP_SHINY_CHANCE_OVERRIDE)) { + shinyThreshold.value = Overrides.OPP_SHINY_CHANCE_OVERRIDE; + } + this.shiny = (E ^ F) < shinyThreshold.value; if (this.shiny) { diff --git a/src/overrides.ts b/src/overrides.ts index 882a634ff90..e91cfd72351 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -166,6 +166,7 @@ class DefaultOverrides { readonly OPP_GENDER_OVERRIDE: Gender | null = null; readonly OPP_MOVESET_OVERRIDE: Moves | Array = []; readonly OPP_SHINY_OVERRIDE: boolean | null = null; + readonly OPP_SHINY_CHANCE_OVERRIDE: number | null = null; // Max value 65536 readonly OPP_VARIANT_OVERRIDE: Variant | null = null; readonly OPP_IVS_OVERRIDE: number | number[] = []; readonly OPP_FORM_OVERRIDES: Partial> = {};