From 5ad16731dbf708864f46d7dd9cd98d6ea0206ecb Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 15 Dec 2023 23:21:42 -0500 Subject: [PATCH] Fix crash with Deoxys normal forme sprite --- public/images/pokemon/{386-normal.json => 386.json} | 2 +- public/images/pokemon/{386-normal.png => 386.png} | Bin src/data/pokemon-species.ts | 2 +- src/egg-hatch-phase.ts | 12 ++++++------ 4 files changed, 8 insertions(+), 8 deletions(-) rename public/images/pokemon/{386-normal.json => 386.json} (99%) rename public/images/pokemon/{386-normal.png => 386.png} (100%) diff --git a/public/images/pokemon/386-normal.json b/public/images/pokemon/386.json similarity index 99% rename from public/images/pokemon/386-normal.json rename to public/images/pokemon/386.json index 143f2fdcb..4f98cec02 100644 --- a/public/images/pokemon/386-normal.json +++ b/public/images/pokemon/386.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "386-normal.png", + "image": "386.png", "format": "RGBA8888", "size": { "w": 306, diff --git a/public/images/pokemon/386-normal.png b/public/images/pokemon/386.png similarity index 100% rename from public/images/pokemon/386-normal.png rename to public/images/pokemon/386.png diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 658b91c10..8dab45fb1 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -1017,7 +1017,7 @@ export function initSpecies() { ), new PokemonSpecies(Species.JIRACHI, "Jirachi", 3, false, false, true, "Wish Pokémon", Type.STEEL, Type.PSYCHIC, 0.3, 1.1, Abilities.SERENE_GRACE, Abilities.NONE, Abilities.NONE, 600, 100, 100, 100, 100, 100, 100, 3, 100, 300, GrowthRate.SLOW, null, false), new PokemonSpecies(Species.DEOXYS, "Deoxys", 3, false, false, true, "DNA Pokémon", Type.PSYCHIC, null, 1.7, 60.8, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 600, 50, 150, 50, 150, 50, 150, 3, 0, 270, GrowthRate.SLOW, null, false, true, - new PokemonForm("Normal Forme", "", Type.PSYCHIC, null, 1.7, 60.8, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 600, 50, 150, 50, 150, 50, 150, 3, 0, 270), + new PokemonForm("Normal Forme", "normal", Type.PSYCHIC, null, 1.7, 60.8, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 600, 50, 150, 50, 150, 50, 150, 3, 0, 270, ""), new PokemonForm("Attack Forme", "attack", Type.PSYCHIC, null, 1.7, 60.8, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 600, 50, 180, 20, 180, 20, 150, 3, 0, 270), new PokemonForm("Defense Forme", "defense", Type.PSYCHIC, null, 1.7, 60.8, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 600, 50, 70, 160, 70, 160, 90, 3, 0, 270), new PokemonForm("Speed Forme", "speed", Type.PSYCHIC, null, 1.7, 60.8, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 600, 50, 95, 90, 95, 90, 180, 3, 0, 270), diff --git a/src/egg-hatch-phase.ts b/src/egg-hatch-phase.ts index 486f79338..cead91f9b 100644 --- a/src/egg-hatch-phase.ts +++ b/src/egg-hatch-phase.ts @@ -97,24 +97,24 @@ export class EggHatchPhase extends BattlePhase { this.eggCrackSprite.setFrame('3'); this.scene.time.delayedCall(125, () => this.eggCrackSprite.setFrame('4')); this.doEggShake(8, 2).then(() => { - SoundFade.fadeOut(this.scene, evolutionBgm, 100); + SoundFade.fadeOut(this.scene, evolutionBgm, Utils.fixedInt(100)); for (let e = 0; e < 5; e++) - this.scene.time.delayedCall(375 * e, () => this.scene.playSound('egg_hatch', { volume: 1 - (e * 0.2) })); + this.scene.time.delayedCall(Utils.fixedInt(375 * e), () => this.scene.playSound('egg_hatch', { volume: 1 - (e * 0.2) })); this.eggLightraysOverlay.setVisible(true); this.eggLightraysOverlay.play('egg_lightrays'); this.scene.tweens.add({ - duration: 125, + duration: Utils.fixedInt(125), targets: this.eggHatchOverlay, alpha: 1, ease: 'Cubic.easeIn' }); - this.scene.time.delayedCall(1500, () => { + this.scene.time.delayedCall(Utils.fixedInt(1500), () => { this.eggContainer.setVisible(false); this.pokemonSprite.play(pokemon.getSpriteKey(true)); this.pokemonSprite.setVisible(true); - this.scene.time.delayedCall(1000, () => pokemon.cry()); + this.scene.time.delayedCall(Utils.fixedInt(1000), () => pokemon.cry()); this.scene.tweens.add({ - duration: 3000, + duration: Utils.fixedInt(3000), targets: this.eggHatchOverlay, alpha: 0, ease: 'Cubic.easeOut',