mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-30 10:46:05 +00:00
apply namespace
for training session encounter
This commit is contained in:
parent
55805d1804
commit
4da5e0fb10
@ -6,7 +6,7 @@ import {
|
|||||||
selectPokemonForOption,
|
selectPokemonForOption,
|
||||||
setEncounterRewards,
|
setEncounterRewards,
|
||||||
} from "#app/data/mystery-encounters/mystery-encounter-utils";
|
} from "#app/data/mystery-encounters/mystery-encounter-utils";
|
||||||
import { getNatureName, Nature } from "#app/data/nature";
|
import { Nature, getNatureName } from "#app/data/nature";
|
||||||
import { speciesStarters } from "#app/data/pokemon-species";
|
import { speciesStarters } from "#app/data/pokemon-species";
|
||||||
import { Stat } from "#app/data/pokemon-stat";
|
import { Stat } from "#app/data/pokemon-stat";
|
||||||
import { PlayerPokemon } from "#app/field/pokemon";
|
import { PlayerPokemon } from "#app/field/pokemon";
|
||||||
@ -26,6 +26,9 @@ import IMysteryEncounter, {
|
|||||||
} from "../mystery-encounter";
|
} from "../mystery-encounter";
|
||||||
import { MysteryEncounterOptionBuilder } from "../mystery-encounter-option";
|
import { MysteryEncounterOptionBuilder } from "../mystery-encounter-option";
|
||||||
|
|
||||||
|
/** The i18n namespace for the encounter */
|
||||||
|
const namespace = "mysteryEncounter:training_session";
|
||||||
|
|
||||||
export const TrainingSessionEncounter: IMysteryEncounter =
|
export const TrainingSessionEncounter: IMysteryEncounter =
|
||||||
MysteryEncounterBuilder.withEncounterType(
|
MysteryEncounterBuilder.withEncounterType(
|
||||||
MysteryEncounterType.TRAINING_SESSION
|
MysteryEncounterType.TRAINING_SESSION
|
||||||
@ -43,20 +46,20 @@ export const TrainingSessionEncounter: IMysteryEncounter =
|
|||||||
])
|
])
|
||||||
.withIntroDialogue([
|
.withIntroDialogue([
|
||||||
{
|
{
|
||||||
text: "mysteryEncounter:training_session_intro_message",
|
text: `${namespace}_intro_message`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withTitle("mysteryEncounter:training_session_title")
|
.withTitle(`${namespace}_title`)
|
||||||
.withDescription("mysteryEncounter:training_session_description")
|
.withDescription(`${namespace}_description`)
|
||||||
.withQuery("mysteryEncounter:training_session_query")
|
.withQuery(`${namespace}_query`)
|
||||||
.withOption(
|
.withOption(
|
||||||
new MysteryEncounterOptionBuilder()
|
new MysteryEncounterOptionBuilder()
|
||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: "mysteryEncounter:training_session_option_1_label",
|
buttonLabel: `${namespace}_option_1_label`,
|
||||||
buttonTooltip: "mysteryEncounter:training_session_option_1_tooltip",
|
buttonTooltip: `${namespace}_option_1_tooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: "mysteryEncounter:training_session_option_selected_message",
|
text: `${namespace}_option_selected_message`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@ -168,10 +171,7 @@ export const TrainingSessionEncounter: IMysteryEncounter =
|
|||||||
}
|
}
|
||||||
scene.updateModifiers(true);
|
scene.updateModifiers(true);
|
||||||
scene.queueMessage(
|
scene.queueMessage(
|
||||||
getEncounterText(
|
getEncounterText(scene, `${namespace}_battle_finished_1`),
|
||||||
scene,
|
|
||||||
"mysteryEncounter:training_session_battle_finished_1"
|
|
||||||
),
|
|
||||||
null,
|
null,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@ -191,13 +191,12 @@ export const TrainingSessionEncounter: IMysteryEncounter =
|
|||||||
.withOption(
|
.withOption(
|
||||||
new MysteryEncounterOptionBuilder()
|
new MysteryEncounterOptionBuilder()
|
||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: "mysteryEncounter:training_session_option_2_label",
|
buttonLabel: `${namespace}_option_2_label`,
|
||||||
buttonTooltip: "mysteryEncounter:training_session_option_2_tooltip",
|
buttonTooltip: `${namespace}_option_2_tooltip`,
|
||||||
secondOptionPrompt:
|
secondOptionPrompt: `${namespace}_option_2_select_prompt`,
|
||||||
"mysteryEncounter:training_session_option_2_select_prompt",
|
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: "mysteryEncounter:training_session_option_selected_message",
|
text: `${namespace}_option_selected_message`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@ -247,10 +246,7 @@ export const TrainingSessionEncounter: IMysteryEncounter =
|
|||||||
|
|
||||||
const onBeforeRewardsPhase = () => {
|
const onBeforeRewardsPhase = () => {
|
||||||
scene.queueMessage(
|
scene.queueMessage(
|
||||||
getEncounterText(
|
getEncounterText(scene, `${namespace}_battle_finished_2`),
|
||||||
scene,
|
|
||||||
"mysteryEncounter:training_session_battle_finished_2"
|
|
||||||
),
|
|
||||||
null,
|
null,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@ -280,13 +276,12 @@ export const TrainingSessionEncounter: IMysteryEncounter =
|
|||||||
.withOption(
|
.withOption(
|
||||||
new MysteryEncounterOptionBuilder()
|
new MysteryEncounterOptionBuilder()
|
||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: "mysteryEncounter:training_session_option_3_label",
|
buttonLabel: `${namespace}_option_3_label`,
|
||||||
buttonTooltip: "mysteryEncounter:training_session_option_3_tooltip",
|
buttonTooltip: `${namespace}_option_3_tooltip`,
|
||||||
secondOptionPrompt:
|
secondOptionPrompt: `${namespace}_option_3_select_prompt`,
|
||||||
"mysteryEncounter:training_session_option_3_select_prompt",
|
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: "mysteryEncounter:training_session_option_selected_message",
|
text: `${namespace}_option_selected_message`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@ -349,10 +344,7 @@ export const TrainingSessionEncounter: IMysteryEncounter =
|
|||||||
|
|
||||||
const onBeforeRewardsPhase = () => {
|
const onBeforeRewardsPhase = () => {
|
||||||
scene.queueMessage(
|
scene.queueMessage(
|
||||||
getEncounterText(
|
getEncounterText(scene, `${namespace}_battle_finished_3`),
|
||||||
scene,
|
|
||||||
"mysteryEncounter:training_session_battle_finished_3"
|
|
||||||
),
|
|
||||||
null,
|
null,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user