From 3e6b804b5ea9c64e0266505de76b76f0b74c8e9d Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:32:43 +0100 Subject: [PATCH] Playing correct cry --- src/ui/pokedex-page-ui-handler.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ui/pokedex-page-ui-handler.ts b/src/ui/pokedex-page-ui-handler.ts index 2a4203a8738..5d65493747a 100644 --- a/src/ui/pokedex-page-ui-handler.ts +++ b/src/ui/pokedex-page-ui-handler.ts @@ -4,7 +4,6 @@ import type { Variant } from "#app/data/variant"; import { getVariantTint, getVariantIcon } from "#app/data/variant"; import { argbFromRgba } from "@material/material-color-utilities"; import i18next from "i18next"; -import type { AnySound } from "#app/battle-scene"; import { starterColors } from "#app/battle-scene"; import { allAbilities } from "#app/data/ability"; import { speciesEggMoves } from "#app/data/balance/egg-moves"; @@ -578,9 +577,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.setSpecies(this.lastSpecies); this.updateInstructions(); - const key = this.lastSpecies.getCryKey(this.lastFormIndex); - const rate = 0.85; - globalScene.playSound(key, { rate: rate }) as AnySound; + const crier = (this.lastSpecies.forms && this.lastSpecies.forms.length > 0) ? this.lastSpecies.forms[this.lastFormIndex] : this.lastSpecies; + crier.cry(); return true;