Fix issue with undefined variant
This commit is contained in:
1 parent
b546203118
commit
6220165315
2 files changed
+14
-14
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user