Hotfix: Rare Egg move rate from bought eggs where always common tier rates (#2512)

* Hotfix: Rare Egg move rate from bought eggs where always common tier rates

* Update src/data/egg.ts. Removed new line

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
This commit is contained in:
sirzento 2024-06-22 14:28:10 +02:00 committed by GitHub
parent 3e9fbeb4d6
commit f0422fa7d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -162,7 +162,6 @@ export class Egg {
this._species = eggOptions.species ?? this.rollSpecies(eggOptions.scene);
this._overrideHiddenAbility = eggOptions.overrideHiddenAbility ?? false;
this._eggMoveIndex = eggOptions.eggMoveIndex ?? this.rollEggMoveIndex();
// Override egg tier and hatchwaves if species was given
if (eggOptions.species) {
@ -175,6 +174,8 @@ export class Egg {
this._variantTier = VariantTier.COMMON;
}
}
// Needs this._tier so it needs to be generated afer the tier override if bought from same species
this._eggMoveIndex = eggOptions.eggMoveIndex ?? this.rollEggMoveIndex();
if (eggOptions.pulled) {
this.addEggToGameData(eggOptions.scene);
}