ME related changes

This commit is contained in:
frutescens 2024-10-03 12:29:23 -07:00
parent c23da7728b
commit d01e28fdcc
35 changed files with 54 additions and 80 deletions

View File

@ -3169,13 +3169,17 @@ export default class BattleScene extends SceneBase {
/** /**
* Loads or generates a mystery encounter * Loads or generates a mystery encounter
* @param encounterType used to load session encounter when restarting game, etc. * @param encounterType used to load session encounter when restarting game, etc.
* @param canBypass optional boolean to indicate that the request is coming from a function that needs to access a Mystery Encounter outside of gameplay requirements
* @returns * @returns
*/ */
getMysteryEncounter(encounterType?: MysteryEncounterType): MysteryEncounter { getMysteryEncounter(encounterType?: MysteryEncounterType, canBypass?: boolean): MysteryEncounter {
// Loading override or session encounter // Loading override or session encounter
let encounter: MysteryEncounter | null; let encounter: MysteryEncounter | null;
if (!isNullOrUndefined(Overrides.MYSTERY_ENCOUNTER_OVERRIDE) && allMysteryEncounters.hasOwnProperty(Overrides.MYSTERY_ENCOUNTER_OVERRIDE)) { if (!isNullOrUndefined(Overrides.MYSTERY_ENCOUNTER_OVERRIDE) && allMysteryEncounters.hasOwnProperty(Overrides.MYSTERY_ENCOUNTER_OVERRIDE)) {
encounter = allMysteryEncounters[Overrides.MYSTERY_ENCOUNTER_OVERRIDE]; encounter = allMysteryEncounters[Overrides.MYSTERY_ENCOUNTER_OVERRIDE];
} else if (canBypass) {
encounter = allMysteryEncounters[encounterType ?? -1];
return encounter;
} else { } else {
encounter = !isNullOrUndefined(encounterType) ? allMysteryEncounters[encounterType] : null; encounter = !isNullOrUndefined(encounterType) ? allMysteryEncounters[encounterType] : null;
} }

View File

@ -128,6 +128,7 @@ export const ATrainersTestEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -166,6 +166,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter =
text: `${namespace}:intro`, text: `${namespace}:intro`,
} }
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -64,6 +64,7 @@ export const AnOfferYouCantRefuseEncounter: MysteryEncounter =
speaker: `${namespace}:speaker`, speaker: `${namespace}:speaker`,
}, },
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -110,6 +110,7 @@ export const BerriesAboundEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -276,6 +276,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -148,6 +148,7 @@ export const ClowningAroundEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -102,6 +102,7 @@ export const DancingLessonsEncounter: MysteryEncounter =
text: `${namespace}:intro`, text: `${namespace}:intro`,
} }
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -117,6 +117,7 @@ export const DarkDealEncounter: MysteryEncounter =
.withSceneWaveRangeRequirement(30, CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES[1]) .withSceneWaveRangeRequirement(30, CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES[1])
.withScenePartySizeRequirement(2, 6, true) // Must have at least 2 pokemon in party .withScenePartySizeRequirement(2, 6, true) // Must have at least 2 pokemon in party
.withCatchAllowed(true) .withCatchAllowed(true)
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -84,6 +84,7 @@ export const DelibirdyEncounter: MysteryEncounter =
text: `${namespace}:intro`, text: `${namespace}:intro`,
} }
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -51,6 +51,7 @@ export const DepartmentStoreSaleEncounter: MysteryEncounter =
}, },
]) ])
.withAutoHideIntroVisuals(false) .withAutoHideIntroVisuals(false)
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -52,6 +52,7 @@ export const FieldTripEncounter: MysteryEncounter =
}, },
]) ])
.withAutoHideIntroVisuals(false) .withAutoHideIntroVisuals(false)
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -122,6 +122,7 @@ export const FieryFalloutEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -120,6 +120,7 @@ export const FightOrFlightEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -76,6 +76,7 @@ export const FunAndGamesEncounter: MysteryEncounter =
text: `${namespace}:intro_dialogue`, text: `${namespace}:intro_dialogue`,
}, },
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -96,6 +96,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter =
text: `${namespace}:intro`, text: `${namespace}:intro`,
} }
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -50,6 +50,7 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -125,6 +125,7 @@ export const MysteriousChallengersEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -61,6 +61,7 @@ export const MysteriousChestEncounter: MysteryEncounter =
text: `${namespace}:intro`, text: `${namespace}:intro`,
} }
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -69,6 +69,7 @@ export const PartTimerEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -54,6 +54,7 @@ export const SafariZoneEncounter: MysteryEncounter =
text: `${namespace}:intro`, text: `${namespace}:intro`,
}, },
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -62,6 +62,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter =
speaker: `${namespace}:speaker`, speaker: `${namespace}:speaker`,
}, },
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -88,6 +88,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -58,6 +58,7 @@ export const TeleportingHijinksEncounter: MysteryEncounter =
text: `${namespace}:intro`, text: `${namespace}:intro`,
} }
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -196,6 +196,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -53,6 +53,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter =
speaker: `${namespace}:speaker`, speaker: `${namespace}:speaker`,
}, },
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -117,6 +117,7 @@ export const TheStrongStuffEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -94,6 +94,7 @@ export const TheWinstrateChallengeEncounter: MysteryEncounter =
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -52,6 +52,7 @@ export const TrainingSessionEncounter: MysteryEncounter =
text: `${namespace}:intro`, text: `${namespace}:intro`,
} }
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -54,6 +54,7 @@ export const TrashToTreasureEncounter: MysteryEncounter =
text: `${namespace}:intro`, text: `${namespace}:intro`,
}, },
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -125,6 +125,7 @@ export const UncommonBreedEncounter: MysteryEncounter =
scene.time.delayedCall(500, () => scene.playSound("battle_anims/PRSFX- Spotlight2")); scene.time.delayedCall(500, () => scene.playSound("battle_anims/PRSFX- Spotlight2"));
return true; return true;
}) })
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -125,6 +125,7 @@ export const WeirdDreamEncounter: MysteryEncounter =
text: `${namespace}:intro_dialogue`, text: `${namespace}:intro_dialogue`,
}, },
]) ])
.setLocalizationKey(`${namespace}`)
.withTitle(`${namespace}:title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}:description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}:query`) .withQuery(`${namespace}:query`)

View File

@ -190,7 +190,10 @@ export default class MysteryEncounter implements IMysteryEncounter {
secondaryPokemon?: PlayerPokemon[]; secondaryPokemon?: PlayerPokemon[];
// #region Post-construct / Auto-populated params // #region Post-construct / Auto-populated params
/**
* Localization Key
*/
localizationKey: string;
/** /**
* Dialogue object containing all the dialogue, messages, tooltips, etc. for an encounter * Dialogue object containing all the dialogue, messages, tooltips, etc. for an encounter
*/ */
@ -264,6 +267,7 @@ export default class MysteryEncounter implements IMysteryEncounter {
Object.assign(this, encounter); Object.assign(this, encounter);
} }
this.encounterTier = this.encounterTier ?? MysteryEncounterTier.COMMON; this.encounterTier = this.encounterTier ?? MysteryEncounterTier.COMMON;
this.localizationKey = this.localizationKey ?? "";
this.dialogue = this.dialogue ?? {}; this.dialogue = this.dialogue ?? {};
this.spriteConfigs = this.spriteConfigs ? [...this.spriteConfigs] : []; this.spriteConfigs = this.spriteConfigs ? [...this.spriteConfigs] : [];
// Default max is 1 for ROGUE encounters, 2 for others // Default max is 1 for ROGUE encounters, 2 for others
@ -528,6 +532,7 @@ export class MysteryEncounterBuilder implements Partial<IMysteryEncounter> {
options: [MysteryEncounterOption, MysteryEncounterOption, ...MysteryEncounterOption[]]; options: [MysteryEncounterOption, MysteryEncounterOption, ...MysteryEncounterOption[]];
enemyPartyConfigs: EnemyPartyConfig[] = []; enemyPartyConfigs: EnemyPartyConfig[] = [];
localizationKey: string = "";
dialogue: MysteryEncounterDialogue = {}; dialogue: MysteryEncounterDialogue = {};
requirements: EncounterSceneRequirement[] = []; requirements: EncounterSceneRequirement[] = [];
primaryPokemonRequirements: EncounterPokemonRequirement[] = []; primaryPokemonRequirements: EncounterPokemonRequirement[] = [];
@ -632,6 +637,16 @@ export class MysteryEncounterBuilder implements Partial<IMysteryEncounter> {
return this.withIntroSpriteConfigs(spriteConfigs).withIntroDialogue(dialogue); return this.withIntroSpriteConfigs(spriteConfigs).withIntroDialogue(dialogue);
} }
/**
* Sets the localization key used by the encounter
* @param localizationKey the localizationKey used for the encounter
* @returns
*/
setLocalizationKey(localizationKey: string): this {
this.localizationKey = localizationKey;
return this;
}
/** /**
* OPTIONAL * OPTIONAL
*/ */

View File

@ -37,7 +37,6 @@ import { GameOverPhase } from "#app/phases/game-over-phase";
import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; import { SelectModifierPhase } from "#app/phases/select-modifier-phase";
import { PartyExpPhase } from "#app/phases/party-exp-phase"; import { PartyExpPhase } from "#app/phases/party-exp-phase";
import { Variant } from "#app/data/variant"; import { Variant } from "#app/data/variant";
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
/** /**
* Animates exclamation sprite over trainer's head at start of encounter * Animates exclamation sprite over trainer's head at start of encounter
@ -110,81 +109,6 @@ export interface EnemyPartyConfig {
countAsSeen?: boolean; countAsSeen?: boolean;
} }
/**
* TEMPORARY FUNCTION - will be removed once locales settles down and be replaced with a class-variable of the mystery encounter instead
* @param encounter
* @returns
*/
export function getMysteryEncounterKey(encounter: MysteryEncounterType | -1): string {
const key = "mysteryEncounter:";
switch (encounter) {
case MysteryEncounterType.MYSTERIOUS_CHALLENGERS:
return key + "mysteriousChallengers";
case MysteryEncounterType.MYSTERIOUS_CHEST:
return key + "mysteriousChest";
case MysteryEncounterType.DARK_DEAL:
return key + "darkDeal";
case MysteryEncounterType.FIGHT_OR_FLIGHT:
return key + "fightOrFlight";
case MysteryEncounterType.SLUMBERING_SNORLAX:
return key + "slumberingSnorlax";
case MysteryEncounterType.TRAINING_SESSION:
return key + "trainingSession";
case MysteryEncounterType.DEPARTMENT_STORE_SALE:
return key + "departmentStoreSale";
case MysteryEncounterType.SHADY_VITAMIN_DEALER:
return key + "shadyVitaminDealer";
case MysteryEncounterType.FIELD_TRIP:
return key + "fieldTrip";
case MysteryEncounterType.FIERY_FALLOUT:
return key + "fieryFallout";
case MysteryEncounterType.LOST_AT_SEA:
return key + "lostAtSea";
case MysteryEncounterType.SAFARI_ZONE:
return key + "safariZone";
case MysteryEncounterType.THE_STRONG_STUFF:
return key + "theStrongStuff";
case MysteryEncounterType.THE_POKEMON_SALESMAN:
return key + "pokemonSalesman";
case MysteryEncounterType.AN_OFFER_YOU_CANT_REFUSE:
return key + "offerYouCantRefuse";
case MysteryEncounterType.DELIBIRDY:
return key + "delibirdy";
case MysteryEncounterType.ABSOLUTE_AVARICE:
return key + "absoluteAvarice";
case MysteryEncounterType.A_TRAINERS_TEST:
return key + "aTrainersTest";
case MysteryEncounterType.TRASH_TO_TREASURE:
return key + "trashToTreasure";
case MysteryEncounterType.BERRIES_ABOUND:
return key + "berriesAbound";
case MysteryEncounterType.CLOWNING_AROUND:
return key + "clowningAround";
case MysteryEncounterType.PART_TIMER:
return key + "partTimer";
case MysteryEncounterType.DANCING_LESSONS:
return key + "dancingLessons";
case MysteryEncounterType.WEIRD_DREAM:
return key + "weirdDream";
case MysteryEncounterType.THE_WINSTRATE_CHALLENGE:
return key + "theWinstrateChallenge";
case MysteryEncounterType.TELEPORTING_HIJINKS:
return key + "teleportingHijinks";
case MysteryEncounterType.BUG_TYPE_SUPERFAN:
return key + "bugTypeSuperfan";
case MysteryEncounterType.FUN_AND_GAMES:
return key + "funAndGames";
case MysteryEncounterType.UNCOMMON_BREED:
return key + "uncommonBreed";
case MysteryEncounterType.GLOBAL_TRADE_SYSTEM:
return key + "globalTradeSystem";
case MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER:
return key + "expertPokemonBreeder";
default:
return key;
}
}
/** /**
* Generates an enemy party for a mystery encounter battle * Generates an enemy party for a mystery encounter battle
* This will override and replace any standard encounter generation logic * This will override and replace any standard encounter generation logic

View File

@ -24,7 +24,7 @@ import { Species } from "#enums/species";
import { PlayerGender } from "#enums/player-gender"; import { PlayerGender } from "#enums/player-gender";
import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; import { SettingKeyboard } from "#app/system/settings/settings-keyboard";
import { getBiomeName } from "#app/data/balance/biomes"; import { getBiomeName } from "#app/data/balance/biomes";
import { getMysteryEncounterKey } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { MysteryEncounterType } from "#app/enums/mystery-encounter-type";
/** /**
* RunInfoUiMode indicates possible overlays of RunInfoUiHandler. * RunInfoUiMode indicates possible overlays of RunInfoUiHandler.
@ -299,7 +299,7 @@ export default class RunInfoUiHandler extends UiHandler {
const subSprite = this.scene.add.sprite(56, -106, "pkmn__sub"); const subSprite = this.scene.add.sprite(56, -106, "pkmn__sub");
subSprite.setScale(0.65); subSprite.setScale(0.65);
subSprite.setPosition(34, 46); subSprite.setPosition(34, 46);
const mysteryEncounterTitle = i18next.t(getMysteryEncounterKey(this.runInfo.mysteryEncounterType)+".title"); const mysteryEncounterTitle = i18next.t(this.scene.getMysteryEncounter(this.runInfo.mysteryEncounterType as MysteryEncounterType, true).localizationKey+":title");
const descContainer = this.scene.add.container(0, 0); const descContainer = this.scene.add.container(0, 0);
const textBox = addTextObject(this.scene, 0, 0, mysteryEncounterTitle, TextStyle.WINDOW, { fontSize : "45px", wordWrap: {width: 160} }); const textBox = addTextObject(this.scene, 0, 0, mysteryEncounterTitle, TextStyle.WINDOW, { fontSize : "45px", wordWrap: {width: 160} });
descContainer.add(textBox); descContainer.add(textBox);