From b47c7383e0414a5328fce6fc144e8090623db795 Mon Sep 17 00:00:00 2001 From: frutescens Date: Thu, 19 Sep 2024 18:27:37 -0700 Subject: [PATCH] correcting typedocs --- src/field/pokemon.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index e32eec9acd4..5a02f033b2e 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -3126,12 +3126,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const tintSprite = this.getTintSprite(); let duration = cry.totalDuration * 1000; - const fusionCryKey = this.fusionSpecies?.getCryKey(this.fusionFormIndex); + const fusionCryKey = this.fusionSpecies!.getCryKey(this.fusionFormIndex); let fusionCry = this.scene.playSound(fusionCryKey, { rate: rate }) as AnySound; fusionCry.stop(); duration = Math.min(duration, fusionCry.totalDuration * 1000); fusionCry.destroy(); - const delay = Math.max(duration * 0.05, 25); let transitionIndex = 0; @@ -3169,7 +3168,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } frameProgress -= frameThreshold; } - if (i === transitionIndex) { + if (i === transitionIndex && fusionCryKey) { SoundFade.fadeOut(this.scene, cry, Utils.fixedInt(Math.ceil((duration / rate) * 0.2))); fusionCry = this.scene.playSound(fusionCryKey, Object.assign({ seek: Math.max(fusionCry.totalDuration * 0.4, 0), rate: rate })); SoundFade.fadeIn(this.scene, fusionCry, Utils.fixedInt(Math.ceil((duration / rate) * 0.2)), this.scene.masterVolume * this.scene.seVolume, 0);