Fix undefined variant for existing shinies in runs

pull/192/head
Flashfyre 2024-04-19 01:44:51 -04:00
parent 6220165315
commit 7ed8dba46a
1 changed files with 3 additions and 1 deletions

View File

@ -134,6 +134,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.stats = dataSource.stats; this.stats = dataSource.stats;
this.ivs = dataSource.ivs; this.ivs = dataSource.ivs;
this.passive = !!dataSource.passive; this.passive = !!dataSource.passive;
if (this.variant === undefined)
this.variant = 0;
this.nature = dataSource.nature || 0 as Nature; this.nature = dataSource.nature || 0 as Nature;
this.natureOverride = dataSource.natureOverride !== undefined ? dataSource.natureOverride : -1; this.natureOverride = dataSource.natureOverride !== undefined ? dataSource.natureOverride : -1;
this.moveset = dataSource.moveset; this.moveset = dataSource.moveset;
@ -147,7 +149,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.fusionFormIndex = dataSource.fusionFormIndex; this.fusionFormIndex = dataSource.fusionFormIndex;
this.fusionAbilityIndex = dataSource.fusionAbilityIndex; this.fusionAbilityIndex = dataSource.fusionAbilityIndex;
this.fusionShiny = dataSource.fusionShiny; this.fusionShiny = dataSource.fusionShiny;
this.fusionVariant = dataSource.fusionVariant; this.fusionVariant = dataSource.fusionVariant || 0;
this.fusionGender = dataSource.fusionGender; this.fusionGender = dataSource.fusionGender;
} else { } else {
this.id = Utils.randSeedInt(4294967296); this.id = Utils.randSeedInt(4294967296);