Merge pull request #4089 from ben-lear/mystery-encounters-feedback

add BGM music names for ME music
This commit is contained in:
ImperialSympathizer 2024-09-07 11:56:18 -04:00 committed by GitHub
commit 4a3921b5c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 10 deletions

View File

@ -93,10 +93,10 @@ export const GlobalTradeSystemEncounter: MysteryEncounter =
// Load bgm
if (scene.musicPreference === 0) {
scene.loadBgm("mystery_encounter_gts", "mystery_encounter_gen_5_gts.mp3");
scene.loadBgm("mystery_encounter_gen_5_gts", "mystery_encounter_gen_5_gts.mp3");
} else {
// Mixed option
scene.loadBgm("mystery_encounter_gts", "mystery_encounter_gen_6_gts.mp3");
scene.loadBgm("mystery_encounter_gen_6_gts", "mystery_encounter_gen_6_gts.mp3");
}
// Load possible trade options
@ -113,7 +113,11 @@ export const GlobalTradeSystemEncounter: MysteryEncounter =
// Change the bgm
scene.fadeOutBgm(1500, false);
scene.time.delayedCall(1500, () => {
scene.playBgm("mystery_encounter_gts");
if (scene.musicPreference === 0) {
scene.playBgm("mystery_encounter_gen_5_gts");
} else {
scene.playBgm("mystery_encounter_gen_6_gts");
}
});
return true;

View File

@ -146,5 +146,10 @@
"encounter_youngster": "BW Trainers' Eyes Meet (Youngster)",
"heal": "BW Pokémon Heal",
"menu": "PMD EoS Welcome to the World of Pokémon!",
"title": "PMD EoS Top Menu Theme"
"title": "PMD EoS Top Menu Theme",
"mystery_encounter_weird_dream": "PMD EoS Temporal Spire",
"mystery_encounter_fun_and_games": "PMD EoS Guildmaster Wigglytuff",
"mystery_encounter_gen_5_gts": "BW GTS",
"mystery_encounter_gen_6_gts": "XY GTS"
}

View File

@ -125,12 +125,10 @@ export class ModifierType {
* @param poolType - Default 'ModifierPoolType.PLAYER'. Which pool to lookup item tier from
*/
withTierFromPool(poolType: ModifierPoolType = ModifierPoolType.PLAYER): ModifierType {
const modifierPool = getModifierPoolForType(poolType);
for (const weightedModifiers of Object.values(modifierPool)) {
for (const mod of weightedModifiers) {
if (mod.modifierType.id === this.id) {
this.tier = mod.modifierType.tier;
for (const tier of Object.values(getModifierPoolForType(poolType))) {
for (const modifier of tier) {
if (this.id === modifier.modifierType.id) {
this.tier = modifier.modifierType.tier;
return this;
}
}