diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 9123a213f4c..fc4dbf91481 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -140,6 +140,8 @@ export default class BattleScene extends SceneBase { public enableMoveInfo: boolean = true; public enableRetries: boolean = false; public hideIvs: boolean = false; + /** Toggle Pokemon cries */ + public enablePokemonCries: boolean = true; /** * Determines the condition for a notification should be shown for Candy Upgrades * - 0 = 'Off' diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index f522d50f357..4a83906b11f 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2767,6 +2767,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } faintCry(callback: Function): void { + if (!this.scene.enablePokemonCries) { + return callback(); + } //skip cry and callback immediately + if (this.fusionSpecies && this.getSpeciesForm() !== this.getFusionSpeciesForm()) { return this.fusionFaintCry(callback); } diff --git a/src/locales/en/settings.json b/src/locales/en/settings.json index 301ebea9b2b..dc72239e0cf 100644 --- a/src/locales/en/settings.json +++ b/src/locales/en/settings.json @@ -103,5 +103,6 @@ "rewards": "Rewards", "reroll": "Reroll", "shop": "Shop", - "checkTeam": "Check Team" + "checkTeam": "Check Team", + "pokemonCries": "Pokemon Cries" } diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 3f37095569a..2ccbbfe967d 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -232,7 +232,9 @@ export class EncounterPhase extends BattlePhase { if (this.scene.currentBattle.battleType === BattleType.WILD) { enemyField.forEach(enemyPokemon => { enemyPokemon.untint(100, "Sine.easeOut"); - enemyPokemon.cry(); + if (this.scene.enablePokemonCries) { + enemyPokemon.cry(); + } enemyPokemon.showInfo(); if (enemyPokemon.isShiny()) { this.scene.validateAchv(achvs.SEE_SHINY); diff --git a/src/phases/summon-phase.ts b/src/phases/summon-phase.ts index f65a2063d4c..ada1a75bc35 100644 --- a/src/phases/summon-phase.ts +++ b/src/phases/summon-phase.ts @@ -155,10 +155,12 @@ export class SummonPhase extends PartyMemberPokemonPhase { ease: "Sine.easeIn", scale: pokemon.getSpriteScale(), onComplete: () => { - pokemon.cry(pokemon.getHpRatio() > 0.25 ? undefined : { rate: 0.85 }); + if (this.scene.enablePokemonCries) { + pokemon.cry(pokemon.getHpRatio() > 0.25 ? undefined : { rate: 0.85 }); + } pokemon.getSprite().clearTint(); pokemon.resetSummonData(); - this.scene.time.delayedCall(1000, () => this.end()); + this.scene.time.delayedCall(this.scene.enablePokemonCries ? 1000 : 100, () => this.end()); } }); } diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 6b46b6fe96c..17dad51de30 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -159,7 +159,8 @@ export const SettingKeys = { Music_Preference: "MUSIC_PREFERENCE", Show_BGM_Bar: "SHOW_BGM_BAR", Move_Touch_Controls: "MOVE_TOUCH_CONTROLS", - Shop_Overlay_Opacity: "SHOP_OVERLAY_OPACITY" + Shop_Overlay_Opacity: "SHOP_OVERLAY_OPACITY", + Pokemon_Cries: "POKEMON_CRIES", }; /** @@ -617,6 +618,22 @@ export const Setting: Array = [ type: SettingType.AUDIO, requireReload: true }, + { + key: SettingKeys.Pokemon_Cries, + label: i18next.t("settings:pokemonCries"), + options: [ + { + value: "On", + label: i18next.t("settings:on") + }, + { + value: "Off", + label: i18next.t("settings:off") + } + ], + default: 0, + type: SettingType.AUDIO, + }, { key: SettingKeys.Move_Touch_Controls, label: i18next.t("settings:moveTouchControls"), @@ -895,6 +912,9 @@ export function setSetting(scene: BattleScene, setting: string, value: integer): case SettingKeys.Shop_Overlay_Opacity: scene.updateShopOverlayOpacity(parseInt(Setting[index].options[value].value) * .01); break; + case SettingKeys.Pokemon_Cries: + scene.enablePokemonCries = Setting[index].options[value].value === "On"; + break; } return true; diff --git a/src/ui/settings/settings-audio-ui-handler.ts b/src/ui/settings/settings-audio-ui-handler.ts index 4a895fc3170..76e6094ed5c 100644 --- a/src/ui/settings/settings-audio-ui-handler.ts +++ b/src/ui/settings/settings-audio-ui-handler.ts @@ -15,6 +15,6 @@ export default class SettingsAudioUiHandler extends AbstractSettingsUiHandler { super(scene, SettingType.AUDIO, mode); this.title = "Audio"; this.localStorageKey = "settings"; - this.rowsToDisplay = 6; + this.rowsToDisplay = 7; } }