Compare commits

..

1 Commits

Author SHA1 Message Date
fabske0
6619993404
Merge 554b154e8b into 79576ad117 2025-08-09 11:25:46 +02:00
15 changed files with 51 additions and 51 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 283 B

View File

@ -158,7 +158,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
.withDialogue({
buttonLabel: `${namespace}:option.1.label`,
buttonTooltip: `${namespace}:option.1.tooltip`,
secondOptionPrompt: `${namespace}:option.1.tradeOptionsPrompt`,
secondOptionPrompt: `${namespace}:option.1.trade_options_prompt`,
})
.withPreOptionPhase(async (): Promise<boolean> => {
const encounter = globalScene.currentBattle.mysteryEncounter!;
@ -248,7 +248,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
// Show the trade animation
await showTradeBackground();
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
await showEncounterText(`${namespace}:tradeReceived`, null, 0, true, 4000);
await showEncounterText(`${namespace}:trade_received`, null, 0, true, 4000);
globalScene.playBgm(encounter.misc.bgmKey);
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
await hideTradeBackground();
@ -369,7 +369,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
// Show the trade animation
await showTradeBackground();
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
await showEncounterText(`${namespace}:tradeReceived`, null, 0, true, 4000);
await showEncounterText(`${namespace}:trade_received`, null, 0, true, 4000);
globalScene.playBgm(encounter.misc.bgmKey);
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
await hideTradeBackground();
@ -384,7 +384,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
.withDialogue({
buttonLabel: `${namespace}:option.3.label`,
buttonTooltip: `${namespace}:option.3.tooltip`,
secondOptionPrompt: `${namespace}:option.3.tradeOptionsPrompt`,
secondOptionPrompt: `${namespace}:option.3.trade_options_prompt`,
})
.withPreOptionPhase(async (): Promise<boolean> => {
const encounter = globalScene.currentBattle.mysteryEncounter!;
@ -468,7 +468,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
// Generate a trainer name
const traderName = generateRandomTraderName();
encounter.setDialogueToken("tradeTrainerName", traderName.trim());
await showEncounterText(`${namespace}:itemTradeSelected`);
await showEncounterText(`${namespace}:item_trade_selected`);
leaveEncounterWithoutBattle();
})
.build(),
@ -740,10 +740,10 @@ function doPokemonTradeSequence(tradedPokemon: PlayerPokemon, receivedPokemon: P
duration: 500,
onComplete: async () => {
globalScene.fadeOutBgm(1000, false);
await showEncounterText(`${namespace}:pokemonTradeSelected`);
await showEncounterText(`${namespace}:pokemon_trade_selected`);
tradedPokemon.cry();
globalScene.playBgm("evolution");
await showEncounterText(`${namespace}:pokemonTradeGoodbye`);
await showEncounterText(`${namespace}:pokemon_trade_goodbye`);
tradedPokeball.setAlpha(0);
tradedPokeball.setVisible(true);

View File

@ -63,7 +63,7 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
.withPokemonCanLearnMoveRequirement(OPTION_1_REQUIRED_MOVE)
.withDialogue({
buttonLabel: `${namespace}:option.1.label`,
disabledButtonLabel: `${namespace}:option.1.labelDisabled`,
disabledButtonLabel: `${namespace}:option.1.label_disabled`,
buttonTooltip: `${namespace}:option.1.tooltip`,
disabledButtonTooltip: `${namespace}:option.1.tooltipDisabled`,
selected: [
@ -81,7 +81,7 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
.withPokemonCanLearnMoveRequirement(OPTION_2_REQUIRED_MOVE)
.withDialogue({
buttonLabel: `${namespace}:option.2.label`,
disabledButtonLabel: `${namespace}:option.2.labelDisabled`,
disabledButtonLabel: `${namespace}:option.2.label_disabled`,
buttonTooltip: `${namespace}:option.2.tooltip`,
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
selected: [

View File

@ -142,9 +142,9 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
// Give money and do dialogue
if (moneyMultiplier > 2.5) {
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
} else {
await showEncounterDialogue(`${namespace}:jobCompleteBad`, `${namespace}:speaker`);
await showEncounterDialogue(`${namespace}:job_complete_bad`, `${namespace}:speaker`);
}
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
updatePlayerMoney(moneyChange, true, false);
@ -153,7 +153,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
amount: moneyChange,
}),
);
await showEncounterText(`${namespace}:pokemonTired`);
await showEncounterText(`${namespace}:pokemon_tired`);
setEncounterRewards({ fillRemaining: true });
leaveEncounterWithoutBattle();
@ -224,9 +224,9 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
// Give money and do dialogue
if (moneyMultiplier > 2.5) {
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
} else {
await showEncounterDialogue(`${namespace}:jobCompleteBad`, `${namespace}:speaker`);
await showEncounterDialogue(`${namespace}:job_complete_bad`, `${namespace}:speaker`);
}
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
updatePlayerMoney(moneyChange, true, false);
@ -235,7 +235,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
amount: moneyChange,
}),
);
await showEncounterText(`${namespace}:pokemonTired`);
await showEncounterText(`${namespace}:pokemon_tired`);
setEncounterRewards({ fillRemaining: true });
leaveEncounterWithoutBattle();
@ -282,7 +282,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
await transitionMysteryEncounterIntroVisuals(false, false);
// Give money and do dialogue
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
const moneyChange = globalScene.getWaveMoneyAmount(2.5);
updatePlayerMoney(moneyChange, true, false);
await showEncounterText(
@ -290,7 +290,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
amount: moneyChange,
}),
);
await showEncounterText(`${namespace}:pokemonTired`);
await showEncounterText(`${namespace}:pokemon_tired`);
setEncounterRewards({ fillRemaining: true });
leaveEncounterWithoutBattle();

View File

@ -205,7 +205,7 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
// 80% chance to increase flee stage +1
const fleeChangeResult = tryChangeFleeStage(1, 8);
if (!fleeChangeResult) {
await showEncounterText(getEncounterText(`${namespace}:safari.busyEating`) ?? "", null, 1000, false);
await showEncounterText(getEncounterText(`${namespace}:safari.busy_eating`) ?? "", null, 1000, false);
} else {
await showEncounterText(getEncounterText(`${namespace}:safari.eating`) ?? "", null, 1000, false);
}
@ -233,7 +233,7 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
// 80% chance to decrease catch stage -1
const catchChangeResult = tryChangeCatchStage(-1, 8);
if (!catchChangeResult) {
await showEncounterText(getEncounterText(`${namespace}:safari.besideItselfAngry`) ?? "", null, 1000, false);
await showEncounterText(getEncounterText(`${namespace}:safari.beside_itself_angry`) ?? "", null, 1000, false);
} else {
await showEncounterText(getEncounterText(`${namespace}:safari.angry`) ?? "", null, 1000, false);
}
@ -274,7 +274,7 @@ async function summonSafariPokemon() {
const encounter = globalScene.currentBattle.mysteryEncounter!;
// Message pokemon remaining
encounter.setDialogueToken("remainingCount", encounter.misc.safariPokemonRemaining);
globalScene.phaseManager.queueMessage(getEncounterText(`${namespace}:safari.remainingCount`) ?? "", null, true);
globalScene.phaseManager.queueMessage(getEncounterText(`${namespace}:safari.remaining_count`) ?? "", null, true);
// Generate pokemon using safariPokemonRemaining so they are always the same pokemon no matter how many turns are taken
// Safari pokemon roll twice on shiny and HA chances, but are otherwise normal

View File

@ -155,7 +155,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
chosenPokemon.setCustomNature(newNature);
encounter.setDialogueToken("newNature", getNatureName(newNature));
queueEncounterMessage(`${namespace}:cheapSideEffects`);
queueEncounterMessage(`${namespace}:cheap_side_effects`);
setEncounterExp([chosenPokemon.id], 100);
await chosenPokemon.updateInfo();
})
@ -215,7 +215,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
const encounter = globalScene.currentBattle.mysteryEncounter!;
const chosenPokemon = encounter.misc.chosenPokemon;
queueEncounterMessage(`${namespace}:noBadEffects`);
queueEncounterMessage(`${namespace}:no_bad_effects`);
setEncounterExp([chosenPokemon.id], 100);
await chosenPokemon.updateInfo();

View File

@ -157,7 +157,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter = MysteryEncounterBuil
// Fall asleep waiting for Snorlax
// Full heal party
globalScene.phaseManager.unshiftNew("PartyHealPhase", true);
queueEncounterMessage(`${namespace}:option.2.restResult`);
queueEncounterMessage(`${namespace}:option.2.rest_result`);
leaveEncounterWithoutBattle();
},
)

View File

@ -189,13 +189,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
// Dialogue and egg calcs for Pokemon 1
const [pokemon1CommonEggs, pokemon1RareEggs] = calculateEggRewardsForPokemon(pokemon1);
let pokemon1Tooltip = getEncounterText(`${namespace}:option.1.tooltipBase`)!;
let pokemon1Tooltip = getEncounterText(`${namespace}:option.1.tooltip_base`)!;
if (pokemon1RareEggs > 0) {
const eggsText = i18next.t(`${namespace}:numEggs`, {
count: pokemon1RareEggs,
rarity: i18next.t("egg:greatTier"),
});
pokemon1Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
pokemon1Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
eggs: eggsText,
});
encounter.setDialogueToken("pokemon1RareEggs", eggsText);
@ -205,7 +205,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
count: pokemon1CommonEggs,
rarity: i18next.t("egg:defaultTier"),
});
pokemon1Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
pokemon1Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
eggs: eggsText,
});
encounter.setDialogueToken("pokemon1CommonEggs", eggsText);
@ -214,13 +214,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
// Dialogue and egg calcs for Pokemon 2
const [pokemon2CommonEggs, pokemon2RareEggs] = calculateEggRewardsForPokemon(pokemon2);
let pokemon2Tooltip = getEncounterText(`${namespace}:option.2.tooltipBase`)!;
let pokemon2Tooltip = getEncounterText(`${namespace}:option.2.tooltip_base`)!;
if (pokemon2RareEggs > 0) {
const eggsText = i18next.t(`${namespace}:numEggs`, {
count: pokemon2RareEggs,
rarity: i18next.t("egg:greatTier"),
});
pokemon2Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
pokemon2Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
eggs: eggsText,
});
encounter.setDialogueToken("pokemon2RareEggs", eggsText);
@ -230,7 +230,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
count: pokemon2CommonEggs,
rarity: i18next.t("egg:defaultTier"),
});
pokemon2Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
pokemon2Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
eggs: eggsText,
});
encounter.setDialogueToken("pokemon2CommonEggs", eggsText);
@ -239,13 +239,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
// Dialogue and egg calcs for Pokemon 3
const [pokemon3CommonEggs, pokemon3RareEggs] = calculateEggRewardsForPokemon(pokemon3);
let pokemon3Tooltip = getEncounterText(`${namespace}:option.3.tooltipBase`)!;
let pokemon3Tooltip = getEncounterText(`${namespace}:option.3.tooltip_base`)!;
if (pokemon3RareEggs > 0) {
const eggsText = i18next.t(`${namespace}:numEggs`, {
count: pokemon3RareEggs,
rarity: i18next.t("egg:greatTier"),
});
pokemon3Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
pokemon3Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
eggs: eggsText,
});
encounter.setDialogueToken("pokemon3RareEggs", eggsText);
@ -255,7 +255,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
count: pokemon3CommonEggs,
rarity: i18next.t("egg:defaultTier"),
});
pokemon3Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
pokemon3Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
eggs: eggsText,
});
encounter.setDialogueToken("pokemon3CommonEggs", eggsText);
@ -321,14 +321,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
];
if (encounter.dialogueTokens.hasOwnProperty("pokemon1CommonEggs")) {
encounter.dialogue.outro.push({
text: i18next.t(`${namespace}:gainedEggs`, {
text: i18next.t(`${namespace}:gained_eggs`, {
numEggs: encounter.dialogueTokens["pokemon1CommonEggs"],
}),
});
}
if (encounter.dialogueTokens.hasOwnProperty("pokemon1RareEggs")) {
encounter.dialogue.outro.push({
text: i18next.t(`${namespace}:gainedEggs`, {
text: i18next.t(`${namespace}:gained_eggs`, {
numEggs: encounter.dialogueTokens["pokemon1RareEggs"],
}),
});
@ -380,14 +380,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
];
if (encounter.dialogueTokens.hasOwnProperty("pokemon2CommonEggs")) {
encounter.dialogue.outro.push({
text: i18next.t(`${namespace}:gainedEggs`, {
text: i18next.t(`${namespace}:gained_eggs`, {
numEggs: encounter.dialogueTokens["pokemon2CommonEggs"],
}),
});
}
if (encounter.dialogueTokens.hasOwnProperty("pokemon2RareEggs")) {
encounter.dialogue.outro.push({
text: i18next.t(`${namespace}:gainedEggs`, {
text: i18next.t(`${namespace}:gained_eggs`, {
numEggs: encounter.dialogueTokens["pokemon2RareEggs"],
}),
});
@ -439,14 +439,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
];
if (encounter.dialogueTokens.hasOwnProperty("pokemon3CommonEggs")) {
encounter.dialogue.outro.push({
text: i18next.t(`${namespace}:gainedEggs`, {
text: i18next.t(`${namespace}:gained_eggs`, {
numEggs: encounter.dialogueTokens["pokemon3CommonEggs"],
}),
});
}
if (encounter.dialogueTokens.hasOwnProperty("pokemon3RareEggs")) {
encounter.dialogue.outro.push({
text: i18next.t(`${namespace}:gainedEggs`, {
text: i18next.t(`${namespace}:gained_eggs`, {
numEggs: encounter.dialogueTokens["pokemon3RareEggs"],
}),
});
@ -482,7 +482,7 @@ function getPartyConfig(): EnemyPartyConfig {
trainerType: TrainerType.EXPERT_POKEMON_BREEDER,
pokemonConfigs: [
{
nickname: i18next.t(`${namespace}:cleffa1Nickname`, {
nickname: i18next.t(`${namespace}:cleffa_1_nickname`, {
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
}),
species: getPokemonSpecies(cleffaSpecies),
@ -501,7 +501,7 @@ function getPartyConfig(): EnemyPartyConfig {
// All 3 members always Cleffa line, but different configs
baseConfig.pokemonConfigs!.push(
{
nickname: i18next.t(`${namespace}:cleffa2Nickname`, {
nickname: i18next.t(`${namespace}:cleffa_2_nickname`, {
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
}),
species: getPokemonSpecies(cleffaSpecies),
@ -514,7 +514,7 @@ function getPartyConfig(): EnemyPartyConfig {
ivs: [31, 31, 31, 31, 31, 31],
},
{
nickname: i18next.t(`${namespace}:cleffa3Nickname`, {
nickname: i18next.t(`${namespace}:cleffa_3_nickname`, {
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
}),
species: getPokemonSpecies(cleffaSpecies),
@ -647,7 +647,7 @@ function onGameOver() {
encounter.dialogue.outro = [
{
speaker: trainerNameKey,
text: `${namespace}:outroFailed`,
text: `${namespace}:outro_failed`,
},
];

View File

@ -178,8 +178,8 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
// Always max price for shiny (flip HA back to normal), and add special messaging
priceMultiplier = MAX_POKEMON_PRICE_MULTIPLIER;
pokemon.abilityIndex = 0;
encounter.dialogue.encounterOptionsDialogue!.description = `${namespace}:descriptionShiny`;
encounter.options[0].dialogue!.buttonTooltip = `${namespace}:option.1.tooltipShiny`;
encounter.dialogue.encounterOptionsDialogue!.description = `${namespace}:description_shiny`;
encounter.options[0].dialogue!.buttonTooltip = `${namespace}:option.1.tooltip_shiny`;
}
const price = globalScene.getWaveMoneyAmount(priceMultiplier);
encounter.setDialogueToken("purchasePokemon", pokemon.getNameToRender());

View File

@ -163,7 +163,7 @@ async function spawnNextTrainerOrEndEncounter() {
globalScene.playSound("item_fanfare");
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }));
await showEncounterDialogue(`${namespace}:victory2`, `${namespace}:speaker`);
await showEncounterDialogue(`${namespace}:victory_2`, `${namespace}:speaker`);
globalScene.ui.clearText(); // Clears "Winstrate" title from screen as rewards get animated in
const machoBrace = generateModifierTypeOption(modifierTypes.MYSTERY_ENCOUNTER_MACHO_BRACE)!;
machoBrace.type.tier = ModifierTier.MASTER;

View File

@ -216,7 +216,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
await cutsceneDialoguePromise;
doHideDreamBackground();
await showEncounterText(`${namespace}:option.1.dreamComplete`);
await showEncounterText(`${namespace}:option.1.dream_complete`);
await doNewTeamPostProcess(transformations);
setEncounterRewards({

View File

@ -1053,7 +1053,7 @@ export class StarterSelectUiHandler extends MessageUiHandler {
this.moveInfoOverlay = new MoveInfoOverlay({
top: true,
x: 1,
y: globalScene.scaledCanvas.height - MoveInfoOverlay.getHeight() - 29,
y: globalScene.scaledCanvas.height / 6 - MoveInfoOverlay.getHeight() - 29,
});
this.starterSelectContainer.add([

View File

@ -98,7 +98,7 @@ describe("Global Trade System - Mystery Encounter", () => {
expect(option.dialogue).toStrictEqual({
buttonLabel: `${namespace}:option.1.label`,
buttonTooltip: `${namespace}:option.1.tooltip`,
secondOptionPrompt: `${namespace}:option.1.tradeOptionsPrompt`,
secondOptionPrompt: `${namespace}:option.1.trade_options_prompt`,
});
});
@ -210,7 +210,7 @@ describe("Global Trade System - Mystery Encounter", () => {
expect(option.dialogue).toStrictEqual({
buttonLabel: `${namespace}:option.3.label`,
buttonTooltip: `${namespace}:option.3.tooltip`,
secondOptionPrompt: `${namespace}:option.3.tradeOptionsPrompt`,
secondOptionPrompt: `${namespace}:option.3.trade_options_prompt`,
});
});

View File

@ -99,7 +99,7 @@ describe("Lost at Sea - Mystery Encounter", () => {
expect(option1.dialogue).toBeDefined();
expect(option1.dialogue).toStrictEqual({
buttonLabel: `${namespace}:option.1.label`,
disabledButtonLabel: `${namespace}:option.1.labelDisabled`,
disabledButtonLabel: `${namespace}:option.1.label_disabled`,
buttonTooltip: `${namespace}:option.1.tooltip`,
disabledButtonTooltip: `${namespace}:option.1.tooltipDisabled`,
selected: [
@ -162,7 +162,7 @@ describe("Lost at Sea - Mystery Encounter", () => {
expect(option2.dialogue).toBeDefined();
expect(option2.dialogue).toStrictEqual({
buttonLabel: `${namespace}:option.2.label`,
disabledButtonLabel: `${namespace}:option.2.labelDisabled`,
disabledButtonLabel: `${namespace}:option.2.label_disabled`,
buttonTooltip: `${namespace}:option.2.tooltip`,
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
selected: [