mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 15:00:55 +00:00
Fix wild shiny luck generation
This commit is contained in:
parent
6b9542511f
commit
f281605146
@ -194,7 +194,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
}
|
||||
|
||||
this.luck = (this.shiny ? (this.variant + 1) : 0) + (this.fusionShiny ? this.fusionVariant + 1 : 0);
|
||||
this.luck = (this.shiny ? this.variant + 1 : 0) + (this.fusionShiny ? this.fusionVariant + 1 : 0);
|
||||
}
|
||||
|
||||
this.generateName();
|
||||
@ -693,7 +693,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
getLuck(): integer {
|
||||
return this.luck + this.fusionLuck;
|
||||
return this.luck + (this.isFusion() ? this.fusionLuck : 0);
|
||||
}
|
||||
|
||||
isFusion(): boolean {
|
||||
@ -2111,7 +2111,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
if (variantColors) {
|
||||
const color = Utils.rgbaToInt([r, g, b, a]);
|
||||
if (variantColorSet.has(color)) {
|
||||
console.log(color);
|
||||
const mappedPixel = variantColorSet.get(color);
|
||||
[ r, g, b, a ] = mappedPixel;
|
||||
}
|
||||
@ -2550,6 +2549,8 @@ export class EnemyPokemon extends Pokemon {
|
||||
if (this.shiny)
|
||||
this.variant = this.generateVariant();
|
||||
|
||||
this.luck = (this.shiny ? this.variant + 1 : 0) + (this.fusionShiny ? this.fusionVariant + 1 : 0);
|
||||
|
||||
let prevolution: Species;
|
||||
let speciesId = species.speciesId;
|
||||
while ((prevolution = pokemonPrevolutions[speciesId])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user