From b48c7ca76d7519d31a7d615849d467803dc345bc Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 24 Feb 2024 21:38:18 -0500 Subject: [PATCH] Fix issue with mega/gmax and female sprites --- src/data/pokemon-species.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index c5cc9b26b..9f3cb1fbf 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -150,7 +150,8 @@ export abstract class PokemonSpeciesForm { formIndex = this.formIndex; const formSpriteKey = this.getFormSpriteKey(formIndex); - return `${shiny ? 'shiny__' : ''}${this.genderDiffs && female ? 'female__' : ''}${this.speciesId}${formSpriteKey ? `-${formSpriteKey}` : ''}`; + const showGenderDiffs = this.genderDiffs && female && ![ SpeciesFormKey.MEGA, SpeciesFormKey.GIGANTAMAX ].find(k => formSpriteKey === k); + return `${shiny ? 'shiny__' : ''}${showGenderDiffs ? 'female__' : ''}${this.speciesId}${formSpriteKey ? `-${formSpriteKey}` : ''}`; } getSpriteKey(female: boolean, formIndex?: integer, shiny?: boolean): string {