[Audio] Paradox Pokémon play theme when outside of End (#6621)

* Override music in End biome for Classic, add music in battle.ts for Paradox Pokémon

* Add additional property to if statement

Paradox Pokemon will play their intended music in Endless now.

* Don't change music for Paradox Pokemon in Endless

* Change `if` instead of adding `break`

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
This commit is contained in:
damocleas 2025-12-20 18:37:11 -05:00 committed by GitHub
parent 7f2f163a9a
commit 95470b02c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,7 @@ import { ArenaTagType } from "#enums/arena-tag-type";
import { BattleSpec } from "#enums/battle-spec";
import { BattleType } from "#enums/battle-type";
import { BattlerIndex } from "#enums/battler-index";
import { BiomeId } from "#enums/biome-id";
import type { Command } from "#enums/command";
import type { MoveId } from "#enums/move-id";
import { MysteryEncounterMode } from "#enums/mystery-encounter-mode";
@ -22,6 +23,7 @@ import { MusicPreference } from "#system/settings";
import { trainerConfigs } from "#trainers/trainer-config";
import type { TurnMove } from "#types/turn-move";
import {
isBetween,
NumberHolder,
randInt,
randomString,
@ -249,8 +251,13 @@ export class Battle {
}
return this.trainer?.getMixedBattleBgm() ?? null;
}
if (this.gameMode.isClassic && this.waveIndex > 195 && this.battleSpec !== BattleSpec.FINAL_BOSS) {
return "end_summit";
if (this.gameMode.isClassic) {
if (isBetween(this.waveIndex, 191, 194)) {
return "end";
}
if (isBetween(this.waveIndex, 196, 199)) {
return "end_summit";
}
}
const wildOpponents = globalScene.getEnemyParty();
for (const pokemon of wildOpponents) {
@ -260,7 +267,12 @@ export class Battle {
}
return "battle_final_encounter";
}
if (pokemon.species.legendary || pokemon.species.subLegendary || pokemon.species.mythical) {
if (
pokemon.species.legendary
|| pokemon.species.subLegendary
|| pokemon.species.mythical
|| (pokemon.species.category.startsWith("Paradox") && globalScene.arena.biomeType !== BiomeId.END)
) {
if (globalScene.musicPreference === MusicPreference.GENFIVE) {
switch (pokemon.species.speciesId) {
case SpeciesId.REGIROCK:
@ -401,6 +413,26 @@ export class Battle {
case SpeciesId.TING_LU:
case SpeciesId.CHI_YU:
return "battle_legendary_ruinous";
case SpeciesId.GREAT_TUSK:
case SpeciesId.SCREAM_TAIL:
case SpeciesId.BRUTE_BONNET:
case SpeciesId.FLUTTER_MANE:
case SpeciesId.SLITHER_WING:
case SpeciesId.SANDY_SHOCKS:
case SpeciesId.IRON_TREADS:
case SpeciesId.IRON_BUNDLE:
case SpeciesId.IRON_HANDS:
case SpeciesId.IRON_JUGULIS:
case SpeciesId.IRON_MOTH:
case SpeciesId.IRON_THORNS:
case SpeciesId.ROARING_MOON:
case SpeciesId.IRON_VALIANT:
case SpeciesId.WALKING_WAKE:
case SpeciesId.IRON_LEAVES:
case SpeciesId.GOUGING_FIRE:
case SpeciesId.RAGING_BOLT:
case SpeciesId.IRON_BOULDER:
case SpeciesId.IRON_CROWN:
case SpeciesId.KORAIDON:
case SpeciesId.MIRAIDON:
return "battle_legendary_kor_mir";