diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 14f93809414..c58be8a23d6 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1913,10 +1913,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (!this.shiny || (!variantData.hasOwnProperty(variantDataIndex) && !variantData.hasOwnProperty(this.species.speciesId))) { return 0; } - const rand = Utils.randSeedInt(10); - if (rand >= 4) { + const rand = new Utils.IntegerHolder(0); + this.scene.executeWithSeedOffset(() => { + rand.value = Utils.randSeedInt(10); + }, this.id, this.scene.waveSeed); + if (rand.value >= 4) { return 0; // 6/10 - } else if (rand >= 1) { + } else if (rand.value >= 1) { return 1; // 3/10 } else { return 2; // 1/10 diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index bf12b2fda27..20e1cadeb22 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -2448,9 +2448,9 @@ export class ModifierTypeOption { */ export function getPartyLuckValue(party: Pokemon[]): integer { if (party[0].scene.gameMode.isDaily) { - let DailyLuck: integer = 0; + const DailyLuck = new Utils.IntegerHolder(0); party[0].scene.executeWithSeedOffset(() => { - DailyLuck = Utils.randSeedInt(15); // Random number between 0 and 14 + DailyLuck.value = Utils.randSeedInt(15); // Random number between 0 and 14 }, 0, party[0].scene.seed); return DailyLuck; }