changed MEs part 2

This commit is contained in:
fabske0 2025-08-09 00:54:47 +02:00
parent 028bc1ed1a
commit 554b154e8b
14 changed files with 38 additions and 38 deletions

View File

@ -233,7 +233,7 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
// After the battle, offer the player the opportunity to permanently swap ability
const abilityWasSwapped = await handleSwapAbility();
if (abilityWasSwapped) {
await showEncounterText(`${namespace}:option.1.ability_gained`);
await showEncounterText(`${namespace}:option.1.abilityGained`);
}
// Play animations once ability swap is complete
@ -267,10 +267,10 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
speaker: `${namespace}:speaker`,
},
{
text: `${namespace}:option.2.selected_2`,
text: `${namespace}:option.2.selected2`,
},
{
text: `${namespace}:option.2.selected_3`,
text: `${namespace}:option.2.selected3`,
speaker: `${namespace}:speaker`,
},
],
@ -359,10 +359,10 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
speaker: `${namespace}:speaker`,
},
{
text: `${namespace}:option.3.selected_2`,
text: `${namespace}:option.3.selected2`,
},
{
text: `${namespace}:option.3.selected_3`,
text: `${namespace}:option.3.selected3`,
speaker: `${namespace}:speaker`,
},
],
@ -432,8 +432,8 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
async function handleSwapAbility() {
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO: Consider refactoring to avoid async promise executor
return new Promise<boolean>(async resolve => {
await showEncounterDialogue(`${namespace}:option.1.apply_ability_dialogue`, `${namespace}:speaker`);
await showEncounterText(`${namespace}:option.1.apply_ability_message`);
await showEncounterDialogue(`${namespace}:option.1.applyAbilityDialogue`, `${namespace}:speaker`);
await showEncounterText(`${namespace}:option.1.applyAbilityMessage`);
globalScene.ui.setMode(UiMode.MESSAGE).then(() => {
displayYesNoOptions(resolve);
@ -442,7 +442,7 @@ async function handleSwapAbility() {
}
function displayYesNoOptions(resolve) {
showEncounterText(`${namespace}:option.1.ability_prompt`, null, 500, false);
showEncounterText(`${namespace}:option.1.abilityPrompt`, null, 500, false);
const fullOptions = [
{
label: i18next.t("menu:yes"),

View File

@ -139,7 +139,7 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
text: `${namespace}:option.1.selectedDialogue`,
},
{
text: `${namespace}:option.1.selected_message`,
text: `${namespace}:option.1.selectedMessage`,
},
],
})

View File

@ -70,7 +70,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
.withDialogue({
buttonLabel: `${namespace}:option.1.label`,
buttonTooltip: `${namespace}:option.1.tooltip`,
secondOptionPrompt: `${namespace}:second_option_prompt`,
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
})
.withPreOptionPhase(async (): Promise<boolean> => {
const encounter = globalScene.currentBattle.mysteryEncounter!;
@ -118,7 +118,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
.withDialogue({
buttonLabel: `${namespace}:option.2.label`,
buttonTooltip: `${namespace}:option.2.tooltip`,
secondOptionPrompt: `${namespace}:second_option_prompt`,
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
})
.withPreOptionPhase(async (): Promise<boolean> => {
const encounter = globalScene.currentBattle.mysteryEncounter!;
@ -166,7 +166,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
.withDialogue({
buttonLabel: `${namespace}:option.3.label`,
buttonTooltip: `${namespace}:option.3.tooltip`,
secondOptionPrompt: `${namespace}:second_option_prompt`,
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
})
.withPreOptionPhase(async (): Promise<boolean> => {
const encounter = globalScene.currentBattle.mysteryEncounter!;
@ -226,7 +226,7 @@ function pokemonAndMoveChosen(pokemon: PlayerPokemon, move: PokemonMove, correct
speaker: `${namespace}:speaker`,
},
{
text: `${namespace}:incorrect_exp`,
text: `${namespace}:incorrectExp`,
},
];
setEncounterExp(
@ -243,7 +243,7 @@ function pokemonAndMoveChosen(pokemon: PlayerPokemon, move: PokemonMove, correct
speaker: `${namespace}:speaker`,
},
{
text: `${namespace}:correct_exp`,
text: `${namespace}:correctExp`,
},
];
setEncounterExp([pokemon.id], 100);

View File

@ -247,7 +247,7 @@ export const FieryFalloutEncounter: MysteryEncounter = MysteryEncounterBuilder.w
// Burn applied
encounter.setDialogueToken("burnedPokemon", chosenPokemon.getNameToRender());
encounter.setDialogueToken("abilityName", allAbilities[AbilityId.HEATPROOF].name);
queueEncounterMessage(`${namespace}:option.2.target_burned`);
queueEncounterMessage(`${namespace}:option.2.targetBurned`);
// Also permanently change the burned Pokemon's ability to Heatproof
applyAbilityOverrideToPokemon(chosenPokemon, AbilityId.HEATPROOF);
@ -313,6 +313,6 @@ function giveLeadPokemonAttackTypeBoostItem() {
const encounter = globalScene.currentBattle.mysteryEncounter!;
encounter.setDialogueToken("itemName", boosterModifierType.name);
encounter.setDialogueToken("leadPokemon", leadPokemon.getNameToRender());
queueEncounterMessage(`${namespace}:found_item`);
queueEncounterMessage(`${namespace}:foundItem`);
}
}

View File

@ -69,7 +69,7 @@ export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder.
isBoss: true,
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
queueEncounterMessage(`${namespace}:option.1.stat_boost`);
queueEncounterMessage(`${namespace}:option.1.statBoost`);
// Randomly boost 1 stat 2 stages
// Cannot boost Spd, Acc, or Evasion
globalScene.phaseManager.unshiftNew(

View File

@ -284,25 +284,25 @@ function handleNextTurn() {
guaranteedModifierTypeFuncs: [modifierTypes.MULTI_LENS],
fillRemaining: false,
});
resultMessageKey = `${namespace}:best_result`;
resultMessageKey = `${namespace}:bestResult`;
} else if (healthRatio < 0.15) {
// 2nd prize
setEncounterRewards({
guaranteedModifierTypeFuncs: [modifierTypes.SCOPE_LENS],
fillRemaining: false,
});
resultMessageKey = `${namespace}:great_result`;
resultMessageKey = `${namespace}:greatResult`;
} else if (healthRatio < 0.33) {
// 3rd prize
setEncounterRewards({
guaranteedModifierTypeFuncs: [modifierTypes.WIDE_LENS],
fillRemaining: false,
});
resultMessageKey = `${namespace}:good_result`;
resultMessageKey = `${namespace}:goodResult`;
} else {
// No prize
isHealPhase = true;
resultMessageKey = `${namespace}:bad_result`;
resultMessageKey = `${namespace}:badResult`;
}
// End the battle
@ -312,7 +312,7 @@ function handleNextTurn() {
globalScene.currentBattle.mysteryEncounter!.doContinueEncounter = undefined;
leaveEncounterWithoutBattle(isHealPhase);
// Must end the TurnInit phase prematurely so battle phases aren't added to queue
queueEncounterMessage(`${namespace}:end_game`);
queueEncounterMessage(`${namespace}:endGame`);
queueEncounterMessage(resultMessageKey);
// Skip remainder of TurnInitPhase
@ -320,9 +320,9 @@ function handleNextTurn() {
}
if (encounter.misc.turnsRemaining < 3) {
// Display charging messages on turns that aren't the initial turn
queueEncounterMessage(`${namespace}:charging_continue`);
queueEncounterMessage(`${namespace}:chargingContinue`);
}
queueEncounterMessage(`${namespace}:turn_remaining_${encounter.misc.turnsRemaining}`);
queueEncounterMessage(`${namespace}:turnRemaining${encounter.misc.turnsRemaining}`);
encounter.misc.turnsRemaining--;
// Don't skip remainder of TurnInitPhase

View File

@ -202,7 +202,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
buttonTooltip: `${namespace}:option.1.tooltip`,
selected: [
{
text: `${namespace}:option.1.selected_message`,
text: `${namespace}:option.1.selectedMessage`,
},
],
})

View File

@ -115,7 +115,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
],
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
queueEncounterMessage(`${namespace}:option.2.stat_boost`);
queueEncounterMessage(`${namespace}:option.2.statBoost`);
globalScene.phaseManager.unshiftNew(
"StatStageChangePhase",
pokemon.getBattlerIndex(),
@ -181,7 +181,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
encounter.setDialogueToken("reductionValue", HIGH_BST_REDUCTION_VALUE.toString());
encounter.setDialogueToken("increaseValue", BST_INCREASE_VALUE.toString());
await showEncounterText(`${namespace}:option.1.selected_2`, null, undefined, true);
await showEncounterText(`${namespace}:option.1.selected2`, null, undefined, true);
encounter.dialogue.outro = [
{

View File

@ -194,7 +194,7 @@ export const TrashToTreasureEncounter: MysteryEncounter = MysteryEncounterBuilde
.withOptionPhase(async () => {
// Investigate garbage, battle Gmax Garbodor
globalScene.setFieldScale(0.75);
await showEncounterText(`${namespace}:option.2.selected_2`);
await showEncounterText(`${namespace}:option.2.selected2`);
await transitionMysteryEncounterIntroVisuals();
const encounter = globalScene.currentBattle.mysteryEncounter!;

View File

@ -97,7 +97,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
isBoss: false,
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
queueEncounterMessage(`${namespace}:option.1.stat_boost`);
queueEncounterMessage(`${namespace}:option.1.statBoost`);
globalScene.phaseManager.unshiftNew(
"StatStageChangePhase",
pokemon.getBattlerIndex(),

View File

@ -329,7 +329,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
onBeforeRewards,
);
await showEncounterText(`${namespace}:option.2.selected_2`, null, undefined, true);
await showEncounterText(`${namespace}:option.2.selected2`, null, undefined, true);
await initBattleWithEnemyConfig(enemyPartyConfig);
},
)

View File

@ -249,11 +249,11 @@ describe("Clowning Around - Mystery Encounter", () => {
text: `${namespace}:option.2.selected`,
},
{
text: `${namespace}:option.2.selected_2`,
text: `${namespace}:option.2.selected2`,
},
{
speaker: `${namespace}:speaker`,
text: `${namespace}:option.2.selected_3`,
text: `${namespace}:option.2.selected3`,
},
],
});
@ -334,11 +334,11 @@ describe("Clowning Around - Mystery Encounter", () => {
text: `${namespace}:option.3.selected`,
},
{
text: `${namespace}:option.3.selected_2`,
text: `${namespace}:option.3.selected2`,
},
{
speaker: `${namespace}:speaker`,
text: `${namespace}:option.3.selected_3`,
text: `${namespace}:option.3.selected3`,
},
],
});

View File

@ -78,7 +78,7 @@ describe("Field Trip - Mystery Encounter", () => {
expect(option.dialogue).toStrictEqual({
buttonLabel: `${namespace}:option.1.label`,
buttonTooltip: `${namespace}:option.1.tooltip`,
secondOptionPrompt: `${namespace}:second_option_prompt`,
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
});
});
@ -139,7 +139,7 @@ describe("Field Trip - Mystery Encounter", () => {
expect(option.dialogue).toStrictEqual({
buttonLabel: `${namespace}:option.2.label`,
buttonTooltip: `${namespace}:option.2.tooltip`,
secondOptionPrompt: `${namespace}:second_option_prompt`,
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
});
});
@ -200,7 +200,7 @@ describe("Field Trip - Mystery Encounter", () => {
expect(option.dialogue).toStrictEqual({
buttonLabel: `${namespace}:option.3.label`,
buttonTooltip: `${namespace}:option.3.tooltip`,
secondOptionPrompt: `${namespace}:second_option_prompt`,
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
});
});

View File

@ -120,7 +120,7 @@ describe("The Pokemon Salesman - Mystery Encounter", () => {
buttonTooltip: expect.stringMatching(new RegExp(`^${namespace}\\:option\\.1\\.tooltip(_shiny)?$`)),
selected: [
{
text: `${namespace}:option.1.selected_message`,
text: `${namespace}:option.1.selectedMessage`,
},
],
});