diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 7d8f8d8dc91..86909f056aa 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1277,7 +1277,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @returns the shiny variant */ generateVariant(): Variant { - if (!this.shiny || !variantData.hasOwnProperty(this.species.speciesId)) { + const formIndex: number = this.formIndex; + let variantDataIndex: string | number = this.species.speciesId; + if (this.species.forms.length > 0) { + const formKey = this.species.forms[formIndex]?.formKey; + if (formKey) { + variantDataIndex = `${variantDataIndex}-${formKey}`; + } + } + // Checks if there is no variant data for both the index or index with form + if (!this.shiny || (!variantData.hasOwnProperty(variantDataIndex) && !variantData.hasOwnProperty(this.species.speciesId))) { return 0; } const rand = Utils.randSeedInt(10);