Added override for shiny chance

This commit is contained in:
Wlowscha 2025-03-28 02:29:48 +01:00
parent 5d7cd97db0
commit 24d94c1dfb
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04
2 changed files with 5 additions and 0 deletions

View File

@ -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) {

View File

@ -166,6 +166,7 @@ class DefaultOverrides {
readonly OPP_GENDER_OVERRIDE: Gender | null = null;
readonly OPP_MOVESET_OVERRIDE: Moves | Array<Moves> = [];
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<Record<Species, number>> = {};