diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 1bba84ada..08ab75e63 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -551,18 +551,18 @@ export default class BattleScene extends SceneBase { hasExpSprite(key: string): boolean { const keyMatch = /^pkmn__?(back__)?(shiny__)?(female__)?(\d+)(\-.*?)?(?:_[1-3])?$/g.exec(key); - let k = keyMatch[4]; - if (keyMatch[2]) - k += 's'; - if (keyMatch[1]) - k += 'b'; - if (keyMatch[3]) - k += 'f'; - if (keyMatch[5]) - k += keyMatch[5]; - if (!expSpriteKeys.includes(k)) - return false; - return true; + let k = keyMatch[4]; + if (keyMatch[2]) + k += 's'; + if (keyMatch[1]) + k += 'b'; + if (keyMatch[3]) + k += 'f'; + if (keyMatch[5]) + k += keyMatch[5]; + if (!expSpriteKeys.includes(k)) + return false; + return true; } setupControls() { diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 6fd584d53..59622c524 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -162,8 +162,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (this.shiny === undefined) this.trySetShiny(); - if (this.shiny && this.variant === undefined) - this.variant = this.generateVariant(); + if (this.variant === undefined) + this.variant = this.shiny ? this.generateVariant() : 0; if (nature !== undefined) this.setNature(nature);