migrate encounters dialogue to new format

This commit is contained in:
ImperialSympathizer 2024-07-18 15:52:43 -04:00
parent fd48c3fcae
commit 872542080a
23 changed files with 331 additions and 485 deletions

View File

@ -13,7 +13,7 @@ import IMysteryEncounter, {
} from "../mystery-encounter"; } from "../mystery-encounter";
/** i18n namespace for encounter */ /** i18n namespace for encounter */
const namespace = "mysteryEncounter:department_store_sale"; const namespace = "mysteryEncounter:departmentStoreSale";
/** /**
* Department Store Sale encounter. * Department Store Sale encounter.
@ -41,21 +41,21 @@ export const DepartmentStoreSaleEncounter: IMysteryEncounter =
]) ])
.withIntroDialogue([ .withIntroDialogue([
{ {
text: `${namespace}_intro_message`, text: `${namespace}:intro`,
}, },
{ {
text: `${namespace}_intro_dialogue`, text: `${namespace}:intro_dialogue`,
speaker: `${namespace}_speaker`, speaker: `${namespace}:speaker`,
}, },
]) ])
.withHideIntroVisuals(false) .withHideIntroVisuals(false)
.withTitle(`${namespace}_title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}_description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}_query`) .withQuery(`${namespace}:query`)
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_1_label`, buttonLabel: `${namespace}:option:1:label`,
buttonTooltip: `${namespace}_option_1_tooltip`, buttonTooltip: `${namespace}:option:1:tooltip`,
}, },
async (scene: BattleScene) => { async (scene: BattleScene) => {
// Choose TMs // Choose TMs
@ -80,8 +80,8 @@ export const DepartmentStoreSaleEncounter: IMysteryEncounter =
) )
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_2_label`, buttonLabel: `${namespace}:option:2:label`,
buttonTooltip: `${namespace}_option_2_tooltip`, buttonTooltip: `${namespace}:option:2:tooltip`,
}, },
async (scene: BattleScene) => { async (scene: BattleScene) => {
// Choose Vitamins // Choose Vitamins
@ -104,8 +104,8 @@ export const DepartmentStoreSaleEncounter: IMysteryEncounter =
) )
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_3_label`, buttonLabel: `${namespace}:option:3:label`,
buttonTooltip: `${namespace}_option_3_tooltip`, buttonTooltip: `${namespace}:option:3:tooltip`,
}, },
async (scene: BattleScene) => { async (scene: BattleScene) => {
// Choose X Items // Choose X Items
@ -128,8 +128,8 @@ export const DepartmentStoreSaleEncounter: IMysteryEncounter =
) )
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_4_label`, buttonLabel: `${namespace}:option:4:label`,
buttonTooltip: `${namespace}_option_4_tooltip`, buttonTooltip: `${namespace}:option:4:tooltip`,
}, },
async (scene: BattleScene) => { async (scene: BattleScene) => {
// Choose Pokeballs // Choose Pokeballs
@ -154,4 +154,9 @@ export const DepartmentStoreSaleEncounter: IMysteryEncounter =
leaveEncounterWithoutBattle(scene); leaveEncounterWithoutBattle(scene);
} }
) )
.withOutroDialogue([
{
text: `${namespace}:outro`,
}
])
.build(); .build();

View File

@ -19,7 +19,7 @@ import IMysteryEncounter, {
} from "../mystery-encounter"; } from "../mystery-encounter";
/** i18n namespace for the encounter */ /** i18n namespace for the encounter */
const namespace = "mysteryEncounter:field_trip"; const namespace = "mysteryEncounter:fieldTrip";
/** /**
* Field Trip encounter. * Field Trip encounter.
@ -49,27 +49,27 @@ export const FieldTripEncounter: IMysteryEncounter =
]) ])
.withIntroDialogue([ .withIntroDialogue([
{ {
text: `${namespace}_intro_message`, text: `${namespace}:intro`,
}, },
{ {
text: `${namespace}_intro_dialogue`, text: `${namespace}:intro_dialogue`,
speaker: `${namespace}_speaker`, speaker: `${namespace}:speaker`,
}, },
]) ])
.withHideIntroVisuals(false) .withHideIntroVisuals(false)
.withTitle(`${namespace}_title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}_description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}_query`) .withQuery(`${namespace}:query`)
.withOption( .withOption(
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_1_label`, buttonLabel: `${namespace}:option:1:label`,
buttonTooltip: `${namespace}_option_1_tooltip`, buttonTooltip: `${namespace}:option:1:tooltip`,
secondOptionPrompt: `${namespace}_second_option_prompt`, secondOptionPrompt: `${namespace}:second_option_prompt`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected`, text: `${namespace}:option:selected`,
}, },
], ],
}) })
@ -87,11 +87,11 @@ export const FieldTripEncounter: IMysteryEncounter =
if (!correctMove) { if (!correctMove) {
encounter.options[0].dialogue.selected = [ encounter.options[0].dialogue.selected = [
{ {
text: `${namespace}_option_incorrect`, text: `${namespace}:incorrect`,
speaker: `${namespace}_speaker`, speaker: `${namespace}:speaker`,
}, },
{ {
text: `${namespace}_lesson_learned`, text: `${namespace}:lesson_learned`,
}, },
]; ];
setEncounterExp(scene, scene.getParty().map((p) => p.id), 50); setEncounterExp(scene, scene.getParty().map((p) => p.id), 50);
@ -100,7 +100,7 @@ export const FieldTripEncounter: IMysteryEncounter =
encounter.setDialogueToken("move", move.getName()); encounter.setDialogueToken("move", move.getName());
encounter.options[0].dialogue.selected = [ encounter.options[0].dialogue.selected = [
{ {
text: `${namespace}_option_selected`, text: `${namespace}:option:selected`,
}, },
]; ];
setEncounterExp(scene, [pokemon.id], 100); setEncounterExp(scene, [pokemon.id], 100);
@ -138,12 +138,12 @@ export const FieldTripEncounter: IMysteryEncounter =
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_2_label`, buttonLabel: `${namespace}:option:2:label`,
buttonTooltip: `${namespace}_option_2_tooltip`, buttonTooltip: `${namespace}:option:2:tooltip`,
secondOptionPrompt: `${namespace}_second_option_prompt`, secondOptionPrompt: `${namespace}:second_option_prompt`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected`, text: `${namespace}:option:selected`,
}, },
], ],
}) })
@ -161,11 +161,11 @@ export const FieldTripEncounter: IMysteryEncounter =
if (!correctMove) { if (!correctMove) {
encounter.options[1].dialogue.selected = [ encounter.options[1].dialogue.selected = [
{ {
text: `${namespace}_option_incorrect`, text: `${namespace}:incorrect`,
speaker: `${namespace}_speaker`, speaker: `${namespace}:speaker`,
}, },
{ {
text: `${namespace}_lesson_learned`, text: `${namespace}:lesson_learned`,
}, },
]; ];
setEncounterExp(scene, scene.getParty().map((p) => p.id), 50); setEncounterExp(scene, scene.getParty().map((p) => p.id), 50);
@ -174,7 +174,7 @@ export const FieldTripEncounter: IMysteryEncounter =
encounter.setDialogueToken("move", move.getName()); encounter.setDialogueToken("move", move.getName());
encounter.options[1].dialogue.selected = [ encounter.options[1].dialogue.selected = [
{ {
text: `${namespace}_option_selected`, text: `${namespace}:option:selected`,
}, },
]; ];
setEncounterExp(scene, [pokemon.id], 100); setEncounterExp(scene, [pokemon.id], 100);
@ -212,12 +212,12 @@ export const FieldTripEncounter: IMysteryEncounter =
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_3_label`, buttonLabel: `${namespace}:option:3:label`,
buttonTooltip: `${namespace}_option_3_tooltip`, buttonTooltip: `${namespace}:option:3:tooltip`,
secondOptionPrompt: `${namespace}_second_option_prompt`, secondOptionPrompt: `${namespace}:second_option_prompt`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected`, text: `${namespace}:option:selected`,
}, },
], ],
}) })
@ -235,11 +235,11 @@ export const FieldTripEncounter: IMysteryEncounter =
if (!correctMove) { if (!correctMove) {
encounter.options[2].dialogue.selected = [ encounter.options[2].dialogue.selected = [
{ {
text: `${namespace}_option_incorrect`, text: `${namespace}:incorrect`,
speaker: `${namespace}_speaker`, speaker: `${namespace}:speaker`,
}, },
{ {
text: `${namespace}_lesson_learned`, text: `${namespace}:lesson_learned`,
}, },
]; ];
setEncounterExp( setEncounterExp(
@ -252,7 +252,7 @@ export const FieldTripEncounter: IMysteryEncounter =
encounter.setDialogueToken("move", move.getName()); encounter.setDialogueToken("move", move.getName());
encounter.options[2].dialogue.selected = [ encounter.options[2].dialogue.selected = [
{ {
text: `${namespace}_option_selected`, text: `${namespace}:option:selected`,
}, },
]; ];
setEncounterExp(scene, [pokemon.id], 100); setEncounterExp(scene, [pokemon.id], 100);

View File

@ -17,7 +17,7 @@ import { WeatherType } from "#app/data/weather";
import { randSeedInt } from "#app/utils"; import { randSeedInt } from "#app/utils";
/** the i18n namespace for the encounter */ /** the i18n namespace for the encounter */
const namespace = "mysteryEncounter:fiery_fallout"; const namespace = "mysteryEncounter:fieryFallout";
/** /**
* Fiery Fallout encounter. * Fiery Fallout encounter.
@ -35,7 +35,7 @@ export const FieryFalloutEncounter: IMysteryEncounter =
.withAnimations(EncounterAnim.MAGMA_BG, EncounterAnim.MAGMA_SPOUT) .withAnimations(EncounterAnim.MAGMA_BG, EncounterAnim.MAGMA_SPOUT)
.withIntroDialogue([ .withIntroDialogue([
{ {
text: `${namespace}_intro_message`, text: `${namespace}:intro`,
}, },
]) ])
.withOnInit((scene: BattleScene) => { .withOnInit((scene: BattleScene) => {
@ -85,16 +85,16 @@ export const FieryFalloutEncounter: IMysteryEncounter =
return true; return true;
}) })
.withTitle(`${namespace}_title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}_description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}_query`) .withQuery(`${namespace}:query`)
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_1_label`, buttonLabel: `${namespace}:option:1:label`,
buttonTooltip: `${namespace}_option_1_tooltip`, buttonTooltip: `${namespace}:option:1:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_1_selected`, text: `${namespace}:option:1:selected`,
}, },
], ],
}, },
@ -133,11 +133,11 @@ export const FieryFalloutEncounter: IMysteryEncounter =
) )
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_2_label`, buttonLabel: `${namespace}:option:2:label`,
buttonTooltip: `${namespace}_option_2_tooltip`, buttonTooltip: `${namespace}:option:2:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_2_selected`, text: `${namespace}:option:2:selected`,
}, },
], ],
}, },
@ -152,11 +152,12 @@ export const FieryFalloutEncounter: IMysteryEncounter =
.withOptionMode(EncounterOptionMode.DISABLED_OR_SPECIAL) .withOptionMode(EncounterOptionMode.DISABLED_OR_SPECIAL)
.withPrimaryPokemonRequirement(new TypeRequirement(Type.FIRE, true,2)) // Will set option2PrimaryName and option2PrimaryMove dialogue tokens automatically .withPrimaryPokemonRequirement(new TypeRequirement(Type.FIRE, true,2)) // Will set option2PrimaryName and option2PrimaryMove dialogue tokens automatically
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_3_label`, buttonLabel: `${namespace}:option:3:label`,
buttonTooltip: `${namespace}_option_3_tooltip`, buttonTooltip: `${namespace}:option:3:tooltip`,
disabledButtonTooltip: `${namespace}:option:3:disabled_tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_3_selected`, text: `${namespace}:option:3:selected`,
}, },
], ],
}) })

View File

@ -27,9 +27,10 @@ import IMysteryEncounter, {
} from "../mystery-encounter"; } from "../mystery-encounter";
import { MoveRequirement } from "../mystery-encounter-requirements"; import { MoveRequirement } from "../mystery-encounter-requirements";
import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
import { getPokemonNameWithAffix } from "#app/messages";
/** the i18n namespace for the encounter */ /** the i18n namespace for the encounter */
const namespace = "mysteryEncounter:fight_or_flight"; const namespace = "mysteryEncounter:fightOrFlight";
/** /**
* Fight or Flight encounter. * Fight or Flight encounter.
@ -159,7 +160,7 @@ export const FightOrFlightEncounter: IMysteryEncounter =
const config = scene.currentBattle.mysteryEncounter.enemyPartyConfigs[0]; const config = scene.currentBattle.mysteryEncounter.enemyPartyConfigs[0];
config.pokemonConfigs[0].tags = [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON]; config.pokemonConfigs[0].tags = [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON];
config.pokemonConfigs[0].mysteryEncounterBattleEffects = (pokemon: Pokemon) => { config.pokemonConfigs[0].mysteryEncounterBattleEffects = (pokemon: Pokemon) => {
pokemon.scene.currentBattle.mysteryEncounter.setDialogueToken("enemyPokemon", pokemon.name); pokemon.scene.currentBattle.mysteryEncounter.setDialogueToken("enemyPokemon", getPokemonNameWithAffix(pokemon));
queueEncounterMessage(pokemon.scene, `${namespace}:boss_enraged`); queueEncounterMessage(pokemon.scene, `${namespace}:boss_enraged`);
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD], 1)); pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD], 1));
}; };

View File

@ -21,7 +21,7 @@ import IMysteryEncounter, {
} from "../mystery-encounter"; } from "../mystery-encounter";
/** the i18n namespace for the encounter */ /** the i18n namespace for the encounter */
const namespace = "mysteryEncounter:mysterious_challengers"; const namespace = "mysteryEncounter:mysteriousChallengers";
/** /**
* Mysterious Challengers encounter. * Mysterious Challengers encounter.
@ -37,7 +37,7 @@ export const MysteriousChallengersEncounter: IMysteryEncounter =
.withIntroSpriteConfigs([]) // These are set in onInit() .withIntroSpriteConfigs([]) // These are set in onInit()
.withIntroDialogue([ .withIntroDialogue([
{ {
text: `${namespace}_intro_message`, text: `${namespace}:intro`,
}, },
]) ])
.withOnInit((scene: BattleScene) => { .withOnInit((scene: BattleScene) => {
@ -126,16 +126,16 @@ export const MysteriousChallengersEncounter: IMysteryEncounter =
return true; return true;
}) })
.withTitle(`${namespace}_title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}_description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}_query`) .withQuery(`${namespace}:query`)
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_1_label`, buttonLabel: `${namespace}:option:1:label`,
buttonTooltip: `${namespace}_option_1_tooltip`, buttonTooltip: `${namespace}:option:1:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected_message`, text: `${namespace}:option:selected`,
}, },
], ],
}, },
@ -156,11 +156,11 @@ export const MysteriousChallengersEncounter: IMysteryEncounter =
) )
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_2_label`, buttonLabel: `${namespace}:option:2:label`,
buttonTooltip: `${namespace}_option_2_tooltip`, buttonTooltip: `${namespace}:option:2:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected_message`, text: `${namespace}:option:selected`,
}, },
], ],
}, },
@ -181,11 +181,11 @@ export const MysteriousChallengersEncounter: IMysteryEncounter =
) )
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_3_label`, buttonLabel: `${namespace}:option:3:label`,
buttonTooltip: `${namespace}_option_3_tooltip`, buttonTooltip: `${namespace}:option:3:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected_message`, text: `${namespace}:option:selected`,
}, },
], ],
}, },
@ -209,7 +209,7 @@ export const MysteriousChallengersEncounter: IMysteryEncounter =
) )
.withOutroDialogue([ .withOutroDialogue([
{ {
text: `${namespace}_outro_win`, text: `${namespace}:outro`,
}, },
]) ])
.build(); .build();

View File

@ -5,7 +5,6 @@ import IMysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier, Myste
import MysteryEncounterOption, { EncounterOptionMode, MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import MysteryEncounterOption, { EncounterOptionMode, MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option";
import { TrainerSlot } from "#app/data/trainer-config"; import { TrainerSlot } from "#app/data/trainer-config";
import { ScanIvsPhase, SummonPhase, VictoryPhase } from "#app/phases"; import { ScanIvsPhase, SummonPhase, VictoryPhase } from "#app/phases";
import i18next from "i18next";
import { HiddenAbilityRateBoosterModifier, IvScannerModifier } from "#app/modifier/modifier"; import { HiddenAbilityRateBoosterModifier, IvScannerModifier } from "#app/modifier/modifier";
import { EnemyPokemon } from "#app/field/pokemon"; import { EnemyPokemon } from "#app/field/pokemon";
import { PokeballType } from "#app/data/pokeball"; import { PokeballType } from "#app/data/pokeball";
@ -14,10 +13,11 @@ import { IntegerHolder, randSeedInt } from "#app/utils";
import { getPokemonSpecies } from "#app/data/pokemon-species"; import { getPokemonSpecies } from "#app/data/pokemon-species";
import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements";
import { doPlayerFlee, doPokemonFlee, getRandomSpeciesByStarterTier, trainerThrowPokeball } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; import { doPlayerFlee, doPokemonFlee, getRandomSpeciesByStarterTier, trainerThrowPokeball } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils";
import { showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; import { getEncounterText, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
import { getPokemonNameWithAffix } from "#app/messages";
/** the i18n namespace for the encounter */ /** the i18n namespace for the encounter */
const namespace = "mysteryEncounter:safari_zone"; const namespace = "mysteryEncounter:safariZone";
/** /**
* Safari Zone encounter. * Safari Zone encounter.
@ -41,21 +41,21 @@ export const SafariZoneEncounter: IMysteryEncounter =
]) ])
.withIntroDialogue([ .withIntroDialogue([
{ {
text: `${namespace}_intro_message`, text: `${namespace}:intro`,
}, },
]) ])
.withTitle(`${namespace}_title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}_description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}_query`) .withQuery(`${namespace}:query`)
.withOption(new MysteryEncounterOptionBuilder() .withOption(new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DISABLED_OR_DEFAULT) .withOptionMode(EncounterOptionMode.DISABLED_OR_DEFAULT)
.withSceneRequirement(new MoneyRequirement(0, 2.75)) // Cost equal to 1 Max Revive .withSceneRequirement(new MoneyRequirement(0, 2.75)) // Cost equal to 1 Max Revive
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_1_label`, buttonLabel: `${namespace}:option:1:label`,
buttonTooltip: `${namespace}_option_1_tooltip`, buttonTooltip: `${namespace}:option:1:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_1_selected_message`, text: `${namespace}:option:1:selected`,
}, },
], ],
}) })
@ -67,6 +67,7 @@ export const SafariZoneEncounter: IMysteryEncounter =
safariPokemonRemaining: 3 safariPokemonRemaining: 3
}; };
updatePlayerMoney(scene, -(encounter.options[0].requirements[0] as MoneyRequirement).requiredMoney); updatePlayerMoney(scene, -(encounter.options[0].requirements[0] as MoneyRequirement).requiredMoney);
// Load bait/mud assets
scene.loadSe("PRSFX- Bug Bite", "battle_anims"); scene.loadSe("PRSFX- Bug Bite", "battle_anims");
scene.loadSe("PRSFX- Sludge Bomb2", "battle_anims"); scene.loadSe("PRSFX- Sludge Bomb2", "battle_anims");
scene.loadSe("PRSFX- Taunt2", "battle_anims"); scene.loadSe("PRSFX- Taunt2", "battle_anims");
@ -80,11 +81,11 @@ export const SafariZoneEncounter: IMysteryEncounter =
) )
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_2_label`, buttonLabel: `${namespace}:option:2:label`,
buttonTooltip: `${namespace}_option_2_tooltip`, buttonTooltip: `${namespace}:option:2:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_2_selected_message`, text: `${namespace}:option:2:selected`,
}, },
], ],
}, },
@ -115,11 +116,11 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_pokeball_option_label`, buttonLabel: `${namespace}:safari:1:label`,
buttonTooltip: `${namespace}_pokeball_option_tooltip`, buttonTooltip: `${namespace}:safari:1:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_pokeball_option_selected`, text: `${namespace}:safari:1:selected`,
} }
], ],
}) })
@ -149,11 +150,11 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_bait_option_label`, buttonLabel: `${namespace}:safari:2:label`,
buttonTooltip: `${namespace}_bait_option_tooltip`, buttonTooltip: `${namespace}:safari:2:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_bait_option_selected`, text: `${namespace}:safari:2:selected`,
}, },
], ],
}) })
@ -167,9 +168,9 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
// 80% chance to increase flee stage +1 // 80% chance to increase flee stage +1
const fleeChangeResult = tryChangeFleeStage(scene, 1, 8); const fleeChangeResult = tryChangeFleeStage(scene, 1, 8);
if (!fleeChangeResult) { if (!fleeChangeResult) {
await showEncounterText(scene, i18next.t(`${namespace}_pokemon_busy_eating`, { pokemonName: pokemon.name }), 1500, false ); await showEncounterText(scene, getEncounterText(scene, `${namespace}:safari:busy_eating`), 1000, false );
} else { } else {
await showEncounterText(scene, i18next.t(`${namespace}_pokemon_eating`, { pokemonName: pokemon.name }), 1500, false); await showEncounterText(scene, getEncounterText(scene, `${namespace}:safari:eating`), 1000, false);
} }
await doEndTurn(scene, 1); await doEndTurn(scene, 1);
@ -179,11 +180,11 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_mud_option_label`, buttonLabel: `${namespace}:safari:3:label`,
buttonTooltip: `${namespace}_mud_option_tooltip`, buttonTooltip: `${namespace}:safari:3:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_mud_option_selected`, text: `${namespace}:safari:3:selected`,
}, },
], ],
}) })
@ -196,9 +197,9 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
// 80% chance to decrease catch stage -1 // 80% chance to decrease catch stage -1
const catchChangeResult = tryChangeCatchStage(scene, -1, 8); const catchChangeResult = tryChangeCatchStage(scene, -1, 8);
if (!catchChangeResult) { if (!catchChangeResult) {
await showEncounterText(scene, i18next.t(`${namespace}_pokemon_beside_itself_angry`, { pokemonName: pokemon.name }), 1500, false ); await showEncounterText(scene, getEncounterText(scene, `${namespace}:safari:beside_itself_angry`), 1000, false );
} else { } else {
await showEncounterText(scene, i18next.t(`${namespace}_pokemon_angry`, { pokemonName: pokemon.name }), 1500, false ); await showEncounterText(scene, getEncounterText(scene, `${namespace}:safari:angry`), 1000, false );
} }
await doEndTurn(scene, 2); await doEndTurn(scene, 2);
@ -208,8 +209,8 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_flee_option_label`, buttonLabel: `${namespace}:safari:4:label`,
buttonTooltip: `${namespace}_flee_option_tooltip`, buttonTooltip: `${namespace}:safari:4:tooltip`,
}) })
.withOptionPhase(async (scene: BattleScene) => { .withOptionPhase(async (scene: BattleScene) => {
// Flee option // Flee option
@ -231,7 +232,8 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
async function summonSafariPokemon(scene: BattleScene) { async function summonSafariPokemon(scene: BattleScene) {
const encounter = scene.currentBattle.mysteryEncounter; const encounter = scene.currentBattle.mysteryEncounter;
// Message pokemon remaining // Message pokemon remaining
scene.queueMessage(i18next.t(`${namespace}_remaining_count`, { remainingCount: encounter.misc.safariPokemonRemaining}), null, true); encounter.setDialogueToken("remainingCount", encounter.misc.safariPokemonRemaining);
scene.queueMessage(getEncounterText(scene, `${namespace}:safari:remaining_count`), null, true);
// Generate pokemon using safariPokemonRemaining so they are always the same pokemon no matter how many turns are taken // 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 // Safari pokemon roll twice on shiny and HA chances, but are otherwise normal
@ -279,7 +281,8 @@ async function summonSafariPokemon(scene: BattleScene) {
scene.unshiftPhase(new SummonPhase(scene, 0, false)); scene.unshiftPhase(new SummonPhase(scene, 0, false));
showEncounterText(scene, i18next.t("battle:singleWildAppeared", { pokemonName: pokemon.name }), 1500, false) encounter.setDialogueToken("pokemonName", getPokemonNameWithAffix(pokemon));
showEncounterText(scene, getEncounterText(scene, "battle:singleWildAppeared"), 1500, false)
.then(() => { .then(() => {
const ivScannerModifier = scene.findModifier(m => m instanceof IvScannerModifier); const ivScannerModifier = scene.findModifier(m => m instanceof IvScannerModifier);
if (ivScannerModifier) { if (ivScannerModifier) {
@ -484,7 +487,7 @@ async function doEndTurn(scene: BattleScene, cursorIndex: number) {
leaveEncounterWithoutBattle(scene, true); leaveEncounterWithoutBattle(scene, true);
} }
} else { } else {
scene.queueMessage(i18next.t(`${namespace}_pokemon_watching`, { pokemonName: pokemon.name }), 0, null, 1000); scene.queueMessage(getEncounterText(scene, `${namespace}:safari:watching`), 0, null, 1000);
initSubsequentOptionSelect(scene, { overrideOptions: safariZoneGameOptions, startingCursorIndex: cursorIndex, hideDescription: true }); initSubsequentOptionSelect(scene, { overrideOptions: safariZoneGameOptions, startingCursorIndex: cursorIndex, hideDescription: true });
} }
} }

View File

@ -5,15 +5,14 @@ import { modifierTypes } from "#app/modifier/modifier-type";
import { randSeedInt } from "#app/utils"; import { randSeedInt } from "#app/utils";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import i18next from "i18next";
import BattleScene from "../../../battle-scene"; import BattleScene from "../../../battle-scene";
import IMysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier, } from "../mystery-encounter"; import IMysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier, } from "../mystery-encounter";
import { EncounterOptionMode, MysteryEncounterOptionBuilder } from "../mystery-encounter-option"; import { EncounterOptionMode, MysteryEncounterOptionBuilder } from "../mystery-encounter-option";
import { MoneyRequirement } from "../mystery-encounter-requirements"; import { MoneyRequirement } from "../mystery-encounter-requirements";
import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; import { getEncounterText, queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
/** the i18n namespace for this encounter */ /** the i18n namespace for this encounter */
const namespace = "mysteryEncounter:shady_vitamin_dealer"; const namespace = "mysteryEncounter:shadyVitaminDealer";
/** /**
* Shady Vitamin Dealer encounter. * Shady Vitamin Dealer encounter.
@ -49,26 +48,26 @@ export const ShadyVitaminDealerEncounter: IMysteryEncounter =
]) ])
.withIntroDialogue([ .withIntroDialogue([
{ {
text: `${namespace}_intro_message`, text: `${namespace}:intro`,
}, },
{ {
text: `${namespace}_intro_dialogue`, text: `${namespace}:intro_dialogue`,
speaker: `${namespace}_speaker`, speaker: `${namespace}:speaker`,
}, },
]) ])
.withTitle(`${namespace}_title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}_description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}_query`) .withQuery(`${namespace}:query`)
.withOption( .withOption(
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DISABLED_OR_DEFAULT) .withOptionMode(EncounterOptionMode.DISABLED_OR_DEFAULT)
.withSceneMoneyRequirement(0, 2) // Wave scaling money multiplier of 2 .withSceneMoneyRequirement(0, 2) // Wave scaling money multiplier of 2
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_1_label`, buttonLabel: `${namespace}:option:1:label`,
buttonTooltip: `${namespace}_option_1_tooltip`, buttonTooltip: `${namespace}:option:1:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected`, text: `${namespace}:option:selected`,
}, },
], ],
}) })
@ -95,7 +94,7 @@ export const ShadyVitaminDealerEncounter: IMysteryEncounter =
// If pokemon meets primary pokemon reqs, it can be selected // If pokemon meets primary pokemon reqs, it can be selected
const meetsReqs = encounter.pokemonMeetsPrimaryRequirements(scene, pokemon); const meetsReqs = encounter.pokemonMeetsPrimaryRequirements(scene, pokemon);
if (!meetsReqs) { if (!meetsReqs) {
return i18next.t(`${namespace}_invalid_selection`); return getEncounterText(scene, `${namespace}:invalid_selection`);
} }
return null; return null;
@ -130,13 +129,13 @@ export const ShadyVitaminDealerEncounter: IMysteryEncounter =
if (randSeedInt(10) < 8) { if (randSeedInt(10) < 8) {
if (chosenPokemon.trySetStatus(StatusEffect.TOXIC)) { if (chosenPokemon.trySetStatus(StatusEffect.TOXIC)) {
// Toxic applied // Toxic applied
queueEncounterMessage(scene, `${namespace}_bad_poison`); queueEncounterMessage(scene, `${namespace}:bad_poison`);
} else { } else {
// Pokemon immune or something else prevents status // Pokemon immune or something else prevents status
queueEncounterMessage(scene, `${namespace}_damage_only`); queueEncounterMessage(scene, `${namespace}:damage_only`);
} }
} else { } else {
queueEncounterMessage(scene, `${namespace}_damage_only`); queueEncounterMessage(scene, `${namespace}:damage_only`);
} }
setEncounterExp(scene, [chosenPokemon.id], 100); setEncounterExp(scene, [chosenPokemon.id], 100);
@ -150,11 +149,11 @@ export const ShadyVitaminDealerEncounter: IMysteryEncounter =
.withOptionMode(EncounterOptionMode.DISABLED_OR_DEFAULT) .withOptionMode(EncounterOptionMode.DISABLED_OR_DEFAULT)
.withSceneMoneyRequirement(0, 5) // Wave scaling money multiplier of 5 .withSceneMoneyRequirement(0, 5) // Wave scaling money multiplier of 5
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_2_label`, buttonLabel: `${namespace}:option:2:label`,
buttonTooltip: `${namespace}_option_2_tooltip`, buttonTooltip: `${namespace}:option:2:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected`, text: `${namespace}:option:selected`,
}, },
], ],
}) })
@ -181,7 +180,7 @@ export const ShadyVitaminDealerEncounter: IMysteryEncounter =
// If pokemon meets primary pokemon reqs, it can be selected // If pokemon meets primary pokemon reqs, it can be selected
const meetsReqs = encounter.pokemonMeetsPrimaryRequirements(scene, pokemon); const meetsReqs = encounter.pokemonMeetsPrimaryRequirements(scene, pokemon);
if (!meetsReqs) { if (!meetsReqs) {
return i18next.t(`${namespace}_invalid_selection`); return getEncounterText(scene, `${namespace}:invalid_selection`);
} }
return null; return null;
@ -212,13 +211,13 @@ export const ShadyVitaminDealerEncounter: IMysteryEncounter =
if (randSeedInt(10) < 2) { if (randSeedInt(10) < 2) {
if (chosenPokemon.trySetStatus(StatusEffect.POISON)) { if (chosenPokemon.trySetStatus(StatusEffect.POISON)) {
// Poison applied // Poison applied
queueEncounterMessage(scene, `${namespace}_poison`); queueEncounterMessage(scene, `${namespace}:poison`);
} else { } else {
// Pokemon immune or something else prevents status // Pokemon immune or something else prevents status
queueEncounterMessage(scene, `${namespace}_no_bad_effects`); queueEncounterMessage(scene, `${namespace}:no_bad_effects`);
} }
} else { } else {
queueEncounterMessage(scene, `${namespace}_no_bad_effects`); queueEncounterMessage(scene, `${namespace}:no_bad_effects`);
} }
setEncounterExp(scene, [chosenPokemon.id], 100); setEncounterExp(scene, [chosenPokemon.id], 100);
@ -229,8 +228,8 @@ export const ShadyVitaminDealerEncounter: IMysteryEncounter =
) )
.withSimpleOption( .withSimpleOption(
{ {
buttonLabel: `${namespace}_option_3_label`, buttonLabel: `${namespace}:option:3:label`,
buttonTooltip: `${namespace}_option_3_tooltip`, buttonTooltip: `${namespace}:option:3:tooltip`,
}, },
async (scene: BattleScene) => { async (scene: BattleScene) => {
// Leave encounter with no rewards or exp // Leave encounter with no rewards or exp

View File

@ -19,7 +19,7 @@ import { EncounterOptionMode, MysteryEncounterOptionBuilder } from "../mystery-e
import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
/** The i18n namespace for the encounter */ /** The i18n namespace for the encounter */
const namespace = "mysteryEncounter:training_session"; const namespace = "mysteryEncounter:trainingSession";
/** /**
* Training Session encounter. * Training Session encounter.
@ -45,21 +45,21 @@ export const TrainingSessionEncounter: IMysteryEncounter =
]) ])
.withIntroDialogue([ .withIntroDialogue([
{ {
text: `${namespace}_intro_message`, text: `${namespace}:intro`,
}, },
]) ])
.withTitle(`${namespace}_title`) .withTitle(`${namespace}:title`)
.withDescription(`${namespace}_description`) .withDescription(`${namespace}:description`)
.withQuery(`${namespace}_query`) .withQuery(`${namespace}:query`)
.withOption( .withOption(
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_1_label`, buttonLabel: `${namespace}:option:1:label`,
buttonTooltip: `${namespace}_option_1_tooltip`, buttonTooltip: `${namespace}:option:1:tooltip`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected_message`, text: `${namespace}:option:selected`,
}, },
], ],
}) })
@ -170,7 +170,7 @@ export const TrainingSessionEncounter: IMysteryEncounter =
scene.addModifier(mod, true, false, false, true); scene.addModifier(mod, true, false, false, true);
} }
scene.updateModifiers(true); scene.updateModifiers(true);
queueEncounterMessage(scene, `${namespace}_battle_finished_1`); queueEncounterMessage(scene, `${namespace}:option:1:finished`);
}; };
setEncounterRewards( setEncounterRewards(
@ -188,12 +188,12 @@ export const TrainingSessionEncounter: IMysteryEncounter =
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_2_label`, buttonLabel: `${namespace}:option:2:label`,
buttonTooltip: `${namespace}_option_2_tooltip`, buttonTooltip: `${namespace}:option:2:tooltip`,
secondOptionPrompt: `${namespace}_option_2_select_prompt`, secondOptionPrompt: `${namespace}:option:2:select_prompt`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected_message`, text: `${namespace}:option:selected`,
}, },
], ],
}) })
@ -242,7 +242,7 @@ export const TrainingSessionEncounter: IMysteryEncounter =
scene.removePokemonFromPlayerParty(playerPokemon, false); scene.removePokemonFromPlayerParty(playerPokemon, false);
const onBeforeRewardsPhase = () => { const onBeforeRewardsPhase = () => {
queueEncounterMessage(scene, `${namespace}_battle_finished_2`); queueEncounterMessage(scene, `${namespace}:option:2:finished`);
// Add the pokemon back to party with Nature change // Add the pokemon back to party with Nature change
playerPokemon.setNature(encounter.misc.chosenNature); playerPokemon.setNature(encounter.misc.chosenNature);
scene.gameData.setPokemonCaught(playerPokemon, false); scene.gameData.setPokemonCaught(playerPokemon, false);
@ -270,12 +270,12 @@ export const TrainingSessionEncounter: IMysteryEncounter =
new MysteryEncounterOptionBuilder() new MysteryEncounterOptionBuilder()
.withOptionMode(EncounterOptionMode.DEFAULT) .withOptionMode(EncounterOptionMode.DEFAULT)
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}_option_3_label`, buttonLabel: `${namespace}:option:3:label`,
buttonTooltip: `${namespace}_option_3_tooltip`, buttonTooltip: `${namespace}:option:3:tooltip`,
secondOptionPrompt: `${namespace}_option_3_select_prompt`, secondOptionPrompt: `${namespace}:option:3:select_prompt`,
selected: [ selected: [
{ {
text: `${namespace}_option_selected_message`, text: `${namespace}:option:selected`,
}, },
], ],
}) })
@ -337,7 +337,7 @@ export const TrainingSessionEncounter: IMysteryEncounter =
scene.removePokemonFromPlayerParty(playerPokemon, false); scene.removePokemonFromPlayerParty(playerPokemon, false);
const onBeforeRewardsPhase = () => { const onBeforeRewardsPhase = () => {
queueEncounterMessage(scene, `${namespace}_battle_finished_3`); queueEncounterMessage(scene, `${namespace}:option:3:finished`);
// Add the pokemon back to party with ability change // Add the pokemon back to party with ability change
const abilityIndex = encounter.misc.abilityIndex; const abilityIndex = encounter.misc.abilityIndex;
if (!!playerPokemon.getFusionSpeciesForm()) { if (!!playerPokemon.getFusionSpeciesForm()) {

View File

@ -23,12 +23,6 @@ export class EncounterOptionsDialogue {
options?: [...OptionTextDisplay[]]; // Options array with minimum 2 options options?: [...OptionTextDisplay[]]; // Options array with minimum 2 options
} }
export default class MysteryEncounterDialogue {
intro?: TextDisplay[];
encounterOptionsDialogue?: EncounterOptionsDialogue;
outro?: TextDisplay[];
}
/** /**
* Example MysteryEncounterDialogue object: * Example MysteryEncounterDialogue object:
* *
@ -72,3 +66,9 @@ export default class MysteryEncounterDialogue {
} }
* *
*/ */
export default class MysteryEncounterDialogue {
intro?: TextDisplay[];
encounterOptionsDialogue?: EncounterOptionsDialogue;
outro?: TextDisplay[];
}

View File

@ -8,7 +8,7 @@ import { LostAtSeaEncounter } from "./encounters/lost-at-sea-encounter";
import { MysteriousChallengersEncounter } from "./encounters/mysterious-challengers-encounter"; import { MysteriousChallengersEncounter } from "./encounters/mysterious-challengers-encounter";
import { MysteriousChestEncounter } from "./encounters/mysterious-chest-encounter"; import { MysteriousChestEncounter } from "./encounters/mysterious-chest-encounter";
import { ShadyVitaminDealerEncounter } from "./encounters/shady-vitamin-dealer-encounter"; import { ShadyVitaminDealerEncounter } from "./encounters/shady-vitamin-dealer-encounter";
import { SleepingSnorlaxEncounter } from "./encounters/sleeping-snorlax-encounter"; import { SlumberingSnorlaxEncounter } from "./encounters/slumbering-snorlax-encounter";
import { TrainingSessionEncounter } from "./encounters/training-session-encounter"; import { TrainingSessionEncounter } from "./encounters/training-session-encounter";
import IMysteryEncounter from "./mystery-encounter"; import IMysteryEncounter from "./mystery-encounter";
import { SafariZoneEncounter } from "#app/data/mystery-encounters/encounters/safari-zone-encounter"; import { SafariZoneEncounter } from "#app/data/mystery-encounters/encounters/safari-zone-encounter";
@ -159,10 +159,10 @@ const anyBiomeEncounters: MysteryEncounterType[] = [
export const mysteryEncountersByBiome = new Map<Biome, MysteryEncounterType[]>([ export const mysteryEncountersByBiome = new Map<Biome, MysteryEncounterType[]>([
[Biome.TOWN, []], [Biome.TOWN, []],
[Biome.PLAINS, [ [Biome.PLAINS, [
MysteryEncounterType.SLEEPING_SNORLAX MysteryEncounterType.SLUMBERING_SNORLAX
]], ]],
[Biome.GRASS, [ [Biome.GRASS, [
MysteryEncounterType.SLEEPING_SNORLAX, MysteryEncounterType.SLUMBERING_SNORLAX,
]], ]],
[Biome.TALL_GRASS, []], [Biome.TALL_GRASS, []],
[Biome.METROPOLIS, []], [Biome.METROPOLIS, []],
@ -214,7 +214,7 @@ export function initMysteryEncounters() {
allMysteryEncounters[MysteryEncounterType.DARK_DEAL] = DarkDealEncounter; allMysteryEncounters[MysteryEncounterType.DARK_DEAL] = DarkDealEncounter;
allMysteryEncounters[MysteryEncounterType.FIGHT_OR_FLIGHT] = FightOrFlightEncounter; allMysteryEncounters[MysteryEncounterType.FIGHT_OR_FLIGHT] = FightOrFlightEncounter;
allMysteryEncounters[MysteryEncounterType.TRAINING_SESSION] = TrainingSessionEncounter; allMysteryEncounters[MysteryEncounterType.TRAINING_SESSION] = TrainingSessionEncounter;
allMysteryEncounters[MysteryEncounterType.SLEEPING_SNORLAX] = SleepingSnorlaxEncounter; allMysteryEncounters[MysteryEncounterType.SLUMBERING_SNORLAX] = SlumberingSnorlaxEncounter;
allMysteryEncounters[MysteryEncounterType.DEPARTMENT_STORE_SALE] = DepartmentStoreSaleEncounter; allMysteryEncounters[MysteryEncounterType.DEPARTMENT_STORE_SALE] = DepartmentStoreSaleEncounter;
allMysteryEncounters[MysteryEncounterType.SHADY_VITAMIN_DEALER] = ShadyVitaminDealerEncounter; allMysteryEncounters[MysteryEncounterType.SHADY_VITAMIN_DEALER] = ShadyVitaminDealerEncounter;
allMysteryEncounters[MysteryEncounterType.FIELD_TRIP] = FieldTripEncounter; allMysteryEncounters[MysteryEncounterType.FIELD_TRIP] = FieldTripEncounter;

View File

@ -3,7 +3,7 @@ export enum MysteryEncounterType {
MYSTERIOUS_CHEST, MYSTERIOUS_CHEST,
DARK_DEAL, DARK_DEAL,
FIGHT_OR_FLIGHT, FIGHT_OR_FLIGHT,
SLEEPING_SNORLAX, SLUMBERING_SNORLAX,
TRAINING_SESSION, TRAINING_SESSION,
DEPARTMENT_STORE_SALE, DEPARTMENT_STORE_SALE,
SHADY_VITAMIN_DEALER, SHADY_VITAMIN_DEALER,

View File

@ -8,7 +8,7 @@ import { fieryFalloutDialogue } from "#app/locales/en/mystery-encounters/fiery-f
import { fightOrFlightDialogue } from "#app/locales/en/mystery-encounters/fight-or-flight-dialogue"; import { fightOrFlightDialogue } from "#app/locales/en/mystery-encounters/fight-or-flight-dialogue";
import { safariZoneDialogue } from "#app/locales/en/mystery-encounters/safari-zone-dialogue"; import { safariZoneDialogue } from "#app/locales/en/mystery-encounters/safari-zone-dialogue";
import { shadyVitaminDealerDialogue } from "#app/locales/en/mystery-encounters/shady-vitamin-dealer-dialogue"; import { shadyVitaminDealerDialogue } from "#app/locales/en/mystery-encounters/shady-vitamin-dealer-dialogue";
import { sleepingSnorlaxDialogue } from "#app/locales/en/mystery-encounters/sleeping-snorlax-dialogue"; import { slumberingSnorlaxDialogue } from "#app/locales/en/mystery-encounters/slumbering-snorlax-dialogue";
import { trainingSessionDialogue } from "#app/locales/en/mystery-encounters/training-session-dialogue"; import { trainingSessionDialogue } from "#app/locales/en/mystery-encounters/training-session-dialogue";
/** /**
@ -32,184 +32,11 @@ export const mysteryEncounter = {
"paid_money": "You paid ₽{{amount, number}}.", "paid_money": "You paid ₽{{amount, number}}.",
"receive_money": "You received ₽{{amount, number}}!", "receive_money": "You received ₽{{amount, number}}!",
"department_store_sale_intro_message": "It's a lady with a ton of shopping bags.",
"department_store_sale_speaker": "Shopper",
"department_store_sale_intro_dialogue": `Hello! Are you here for\nthe amazing sales too?
$There's a special coupon that you can\nredeem for a free item during the sale!
$I have an extra one. Here you go!`,
"department_store_sale_title": "Department Store Sale",
"department_store_sale_description": "There is merchandise in every direction! It looks like there are 4 counters where you can redeem the coupon for various items. The possibilities are endless!",
"department_store_sale_query": "Which counter will you go to?",
"department_store_sale_option_1_label": "TM Counter",
"department_store_sale_option_1_tooltip": "(+) TM Shop",
"department_store_sale_option_2_label": "Vitamin Counter",
"department_store_sale_option_2_tooltip": "(+) Vitamin Shop",
"department_store_sale_option_3_label": "Battle Item Counter",
"department_store_sale_option_3_tooltip": "(+) X Item Shop",
"department_store_sale_option_4_label": "Pokéball Counter",
"department_store_sale_option_4_tooltip": "(+) Pokéball Shop",
"department_store_sale_outro": "What a deal! You should shop there more often.",
"shady_vitamin_dealer_intro_message": "A man in a dark coat approaches you.",
"shady_vitamin_dealer_speaker": "Shady Salesman",
"shady_vitamin_dealer_intro_dialogue": `.@d{16}.@d{16}.@d{16}
$I've got the goods if you've got the money.
$Make sure your Pokémon can handle it though.`,
"shady_vitamin_dealer_title": "The Vitamin Dealer",
"shady_vitamin_dealer_description": "The man opens his jacket to reveal some Pokémon vitamins. The numbers he quotes seem like a really good deal. Almost too good...\nHe offers two package deals to choose from.",
"shady_vitamin_dealer_query": "Which deal will choose?",
"shady_vitamin_dealer_invalid_selection": "Pokémon must be healthy enough.",
"shady_vitamin_dealer_option_1_label": "The Cheap Deal",
"shady_vitamin_dealer_option_1_tooltip": "(-) Pay {{option1Money, money}}\n(-) Side Effects?\n(+) Chosen Pokémon Gains 2 Random Vitamins",
"shady_vitamin_dealer_option_2_label": "The Pricey Deal",
"shady_vitamin_dealer_option_2_tooltip": "(-) Pay {{option2Money, money}}\n(-) Side Effects?\n(+) Chosen Pokémon Gains 2 Random Vitamins",
"shady_vitamin_dealer_option_selected": `The man hands you two bottles and quickly disappears.
\${{selectedPokemon}} gained {{boost1}} and {{boost2}} boosts!`,
"shady_vitamin_dealer_damage_only": `But the medicine had some side effects!
$Your {{selectedPokemon}} takes some damage...`,
"shady_vitamin_dealer_bad_poison": `But the medicine had some side effects!
$Your {{selectedPokemon}} takes some damage\nand becomes badly poisoned...`,
"shady_vitamin_dealer_poison": `But the medicine had some side effects!
$Your {{selectedPokemon}} becomes poisoned...`,
"shady_vitamin_dealer_no_bad_effects": "Looks like there were no side-effects this time.",
"shady_vitamin_dealer_option_3_label": "Leave",
"shady_vitamin_dealer_option_3_tooltip": "(-) No Rewards",
"field_trip_intro_message": "It's a teacher and some school children!",
"field_trip_speaker": "Teacher",
"field_trip_intro_dialogue": `Hello, there! Would you be able to\nspare a minute for my students?
$I'm teaching them about Pokémon moves\nand would love to show them a demonstration.
$Would you mind showing us one of\nthe moves your Pokémon can use?`,
"field_trip_title": "Field Trip",
"field_trip_description": "A teacher is requesting a move demonstration from a Pokémon. Depending on the move you choose, she might have something useful for you in exchange.",
"field_trip_query": "Which move category will you show off?",
"field_trip_option_1_label": "A Physical Move",
"field_trip_option_1_tooltip": "(+) Physical Item Rewards",
"field_trip_option_2_label": "A Special Move",
"field_trip_option_2_tooltip": "(+) Special Item Rewards",
"field_trip_option_3_label": "A Status Move",
"field_trip_option_3_tooltip": "(+) Status Item Rewards",
"field_trip_second_option_prompt": "Choose a move for your Pokémon to use.",
"field_trip_option_selected": "{{pokeName}} shows off an awesome display of {{move}}!",
"field_trip_option_incorrect": `...
$That isn't a {{moveCategory}} move!
$I'm sorry, but I can't give you anything.`,
"field_trip_lesson_learned": `Looks like you learned a valuable lesson?
$Your Pokémon also gained some knowledge.`,
"field_trip_outro_good": "Thank you so much for your kindness!\nI hope the items I had were helpful!",
"field_trip_outro_bad": "Come along children, we'll\nfind a better demonstration elsewhere.",
// Mystery Encounters -- Great Tier
"mysterious_challengers_intro_message": "Mysterious challengers have appeared!",
"mysterious_challengers_title": "Mysterious Challengers",
"mysterious_challengers_description": "If you defeat a challenger, you might impress them enough to receive a boon. But some look tough, are you up to the challenge?",
"mysterious_challengers_query": "Who will you battle?",
"mysterious_challengers_option_1_label": "A clever, mindful foe",
"mysterious_challengers_option_1_tooltip": "(-) Standard Battle\n(+) Move Item Rewards",
"mysterious_challengers_option_2_label": "A strong foe",
"mysterious_challengers_option_2_tooltip": "(-) Hard Battle\n(+) Good Rewards",
"mysterious_challengers_option_3_label": "The mightiest foe",
"mysterious_challengers_option_3_tooltip": "(-) Brutal Battle\n(+) Great Rewards",
"mysterious_challengers_option_selected_message": "The trainer steps forward...",
"mysterious_challengers_outro_win": "The mysterious challenger was defeated!",
"safari_zone_intro_message": "It's a safari zone!",
"safari_zone_title": "The Safari Zone",
"safari_zone_description": "There are all kinds of rare and special Pokémon that can be found here!\nIf you choose to enter, you'll have a time limit of 3 wild encounters where you can try to catch these special Pokémon.\n\nBeware, though. These Pokémon may flee before you're able to catch them!",
"safari_zone_query": "Would you like to enter?",
"safari_zone_option_1_label": "Enter",
"safari_zone_option_1_tooltip": "(-) Pay {{option1Money, money}}\n@[SUMMARY_GREEN]{(?) Safari Zone}",
"safari_zone_option_2_label": "Leave",
"safari_zone_option_2_tooltip": "(-) No Rewards",
"safari_zone_option_1_selected_message": "Time to test your luck!",
"safari_zone_option_2_selected_message": "You hurry along your way,\nwith a slight feeling of regret.",
"safari_zone_pokeball_option_label": "Throw a Pokéball",
"safari_zone_pokeball_option_tooltip": "(+) Throw a Pokéball",
"safari_zone_pokeball_option_selected": "You throw a Pokéball!",
"safari_zone_bait_option_label": "Throw bait",
"safari_zone_bait_option_tooltip": "(+) Increases Capture Rate\n(-) Chance to Increase Flee Rate",
"safari_zone_bait_option_selected": "You throw some bait!",
"safari_zone_mud_option_label": "Throw mud",
"safari_zone_mud_option_tooltip": "(+) Decreases Flee Rate\n(-) Chance to Decrease Capture Rate",
"safari_zone_mud_option_selected": "You throw some mud!",
"safari_zone_flee_option_label": "Flee",
"safari_zone_flee_option_tooltip": "(?) Flee from this Pokémon",
"safari_zone_pokemon_watching": "{{pokemonName}} is watching carefully!",
"safari_zone_pokemon_eating": "{{pokemonName}} is eating!",
"safari_zone_pokemon_busy_eating": "{{pokemonName}} is busy eating!",
"safari_zone_pokemon_angry": "{{pokemonName}} is angry!",
"safari_zone_pokemon_beside_itself_angry": "{{pokemonName}} is beside itself with anger!",
"safari_zone_remaining_count": "{{remainingCount}} Pokémon remaining!",
"fiery_fallout_intro_message": "You encounter a blistering storm of smoke and ash!",
"fiery_fallout_title": "Fiery Fallout",
"fiery_fallout_description": "The whirling storm of ash and embers has cut visibility to nearly zero. It seems like there might be some... source that is causing these conditions. But what could be behind a phenomenon of this magnitude?",
"fiery_fallout_query": "What will you do?",
"fiery_fallout_option_1_label": "Find the source",
"fiery_fallout_option_1_tooltip": "(?) Discover the source\n(-) Hard Battle",
"fiery_fallout_option_2_label": "Hunker down",
"fiery_fallout_option_2_tooltip": "(-) Suffer the effects of the weather",
"fiery_fallout_option_3_label": "Your Fire types help",
"fiery_fallout_option_3_tooltip": "(+) End the conditions\n(+) Gain a Charcoal",
"fiery_fallout_option_3_disabled_tooltip": "You need at least 2 Fire Type Pokémon to choose this",
"fiery_fallout_option_1_selected": `You push through the storm, and find two Volcarona in the middle of a mating dance!
$They don't take kindly to the interruption and attack!`,
"fiery_fallout_option_2_selected": `The weather effects cause significant harm as you struggle to find shelter!
$Your party takes 30% Max HP damage!
$Your {burnTarget} also becomes burned!`,
// "fiery_fallout_boss_enraged": "The opposing {{enemyPokemon}} has become enraged!",
"fiery_fallout_option_3_selected": `Your {{primaryPokemonName}} and {{secondaryPokemonName}} guide you to where two Volcarona are in the middle of a mating dance!
$Thankfully, your Pokémon are able to calm them, and they depart without issue.`,
// Mystery Encounters -- Ultra Tier
"training_session_intro_message": "You've come across some\ntraining tools and supplies.",
"training_session_title": "Training Session",
"training_session_description": "These supplies look like they could be used to train a member of your party! There are a few ways you could train your Pokémon, by battling against it with the rest of your team.",
"training_session_query": "How should you train?",
"training_session_option_1_label": "Light Training",
"training_session_option_1_tooltip": "(-) Light Battle\n(+) Improve 2 Random IVs of Pokémon",
"training_session_option_2_label": "Moderate Training",
"training_session_option_2_tooltip": "(-) Moderate Battle\n(+) Change Pokémon's Nature",
"training_session_option_2_select_prompt": "Select a new nature\nto train your Pokémon in.",
"training_session_option_3_label": "Heavy Training",
"training_session_option_3_tooltip": "(-) Harsh Battle\n(+) Change Pokémon's Ability",
"training_session_option_3_select_prompt": "Select a new ability\nto train your Pokémon in.",
"training_session_option_selected_message": "{{selectedPokemon}} moves across\nthe clearing to face you...",
"training_session_battle_finished_1": `{{selectedPokemon}} returns, feeling\nworn out but accomplished!
$Its {{stat1}} and {{stat2}} IVs were improved!`,
"training_session_battle_finished_2": `{{selectedPokemon}} returns, feeling\nworn out but accomplished!
$Its nature was changed to {{nature}}!`,
"training_session_battle_finished_3": `{{selectedPokemon}} returns, feeling\nworn out but accomplished!
$Its ability was changed to {{ability}}!`,
"training_session_outro_win": "That was a successful training session!",
// Mystery Encounters -- Rogue Tier
"sleeping_snorlax_intro_message": `As you walk down a narrow pathway, you see a towering silhouette blocking your path.
$You get closer to see a Snorlax sleeping peacefully.\nIt seems like there's no way around it.`,
"sleeping_snorlax_title": "Sleeping Snorlax",
"sleeping_snorlax_description": "You could attack it to try and get it to move, or simply wait for it to wake up. Who knows how long that could take, though...",
"sleeping_snorlax_query": "What will you do?",
"sleeping_snorlax_option_1_label": "Fight it",
"sleeping_snorlax_option_1_tooltip": "(-) Fight Sleeping Snorlax",
"sleeping_snorlax_option_2_label": "Wait for it to move",
"sleeping_snorlax_option_2_tooltip": "@[SUMMARY_BLUE]{(75%) Wait a short time}\n@[SUMMARY_BLUE]{(25%) Wait a long time}",
"sleeping_snorlax_option_3_label": "Steal its item",
"sleeping_snorlax_option_3_tooltip": "(+) {{option3PrimaryName}} uses {{option3PrimaryMove}}\n(+) Leftovers",
"sleeping_snorlax_option_3_disabled_tooltip": "Your Pokémon need to know certain moves to choose this",
"sleeping_snorlax_option_1_selected_message": "You approach the\nPokémon without fear.",
"sleeping_snorlax_option_2_selected_message": `.@d{32}.@d{32}.@d{32}
$You wait for a time, but the Snorlax's yawns make your party sleepy...`,
"sleeping_snorlax_option_2_good_result": "When you all awaken, the Snorlax is no where to be found -\nbut your Pokémon are all healed!",
"sleeping_snorlax_option_3_good_result": "Your {{option3PrimaryName}} uses {{option3PrimaryMove}}! @s{item_fanfare}It steals Leftovers off the sleeping Snorlax and you make out like bandits!",
mysteriousChallengers: mysteriousChallengersDialogue, mysteriousChallengers: mysteriousChallengersDialogue,
mysteriousChest: mysteriousChestDialogue, mysteriousChest: mysteriousChestDialogue,
darkDeal: darkDealDialogue, darkDeal: darkDealDialogue,
fightOrFlight: fightOrFlightDialogue, fightOrFlight: fightOrFlightDialogue,
sleepingSnorlax: sleepingSnorlaxDialogue, slumberingSnorlax: slumberingSnorlaxDialogue,
trainingSession: trainingSessionDialogue, trainingSession: trainingSessionDialogue,
departmentStoreSale: departmentStoreSaleDialogue, departmentStoreSale: departmentStoreSaleDialogue,
shadyVitaminDealer: shadyVitaminDealerDialogue, shadyVitaminDealer: shadyVitaminDealerDialogue,

View File

@ -1,31 +1,29 @@
export const departmentStoreSaleDialogue = { export const departmentStoreSaleDialogue = {
intro: "Wandering aimlessly through the sea, you've effectively gotten nowhere.", intro: "It's a lady with a ton of shopping bags.",
title: "Lost at Sea", speaker: "Shopper",
description: "The sea is turbulent in this area, and you're running out of energy.\nThis is bad. Is there a way out of the situation?", intro_dialogue: `Hello! Are you here for\nthe amazing sales too?
query: "What will you do?", $There's a special coupon that you can\nredeem for a free item during the sale!
$I have an extra one. Here you go!`,
title: "Department Store Sale",
description: "There is merchandise in every direction! It looks like there are 4 counters where you can redeem the coupon for various items. The possibilities are endless!",
query: "Which counter will you go to?",
option: { option: {
1: { 1: {
label: "{{option1PrimaryName}} can help", label: "TM Counter",
label_disabled: "Can't {{option1RequiredMove}}", tooltip: "(+) TM Shop",
tooltip: "(+) {{option1PrimaryName}} saves you\n(+) {{option1PrimaryName}} gains some EXP",
tooltip_disabled: "You have no Pokémon to {{option1RequiredMove}} on",
selected: `{{option1PrimaryName}} swims ahead, guiding you back on track.
\${{option1PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
2: { 2: {
label: "{{option2PrimaryName}} can help", label: "Vitamin Counter",
label_disabled: "Can't {{option2RequiredMove}}", tooltip: "(+) Vitamin Shop",
tooltip: "(+) {{option2PrimaryName}} saves you\n(+) {{option2PrimaryName}} gains some EXP",
tooltip_disabled: "You have no Pokémon to {{option2RequiredMove}} with",
selected: `{{option2PrimaryName}} flies ahead of your boat, guiding you back on track.
\${{option2PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
3: { 3: {
label: "Wander aimlessly", label: "Battle Item Counter",
tooltip: "(-) Each of your Pokémon lose {{damagePercentage}}% of their total HP", tooltip: "(+) X Item Shop",
selected: `You float about in the boat, steering without direction until you finally spot a landmark you remember. },
$You and your Pokémon are fatigued from the whole ordeal.`, 4: {
label: "Pokéball Counter",
tooltip: "(+) Pokéball Shop",
}, },
}, },
outro: "You are back on track." outro: "What a deal! You should shop there more often."
}; };

View File

@ -1,31 +1,33 @@
export const fieldTripDialogue = { export const fieldTripDialogue = {
intro: "Wandering aimlessly through the sea, you've effectively gotten nowhere.", intro: "It's a teacher and some school children!",
title: "Lost at Sea", speaker: "Teacher",
description: "The sea is turbulent in this area, and you're running out of energy.\nThis is bad. Is there a way out of the situation?", intro_dialogue: `Hello, there! Would you be able to\nspare a minute for my students?
query: "What will you do?", $I'm teaching them about Pokémon moves\nand would love to show them a demonstration.
$Would you mind showing us one of\nthe moves your Pokémon can use?`,
title: "Field Trip",
description: "A teacher is requesting a move demonstration from a Pokémon. Depending on the move you choose, she might have something useful for you in exchange.",
query: "Which move category will you show off?",
option: { option: {
1: { 1: {
label: "{{option1PrimaryName}} can help", label: "A Physical Move",
label_disabled: "Can't {{option1RequiredMove}}", tooltip: "(+) Physical Item Rewards",
tooltip: "(+) {{option1PrimaryName}} saves you\n(+) {{option1PrimaryName}} gains some EXP",
tooltip_disabled: "You have no Pokémon to {{option1RequiredMove}} on",
selected: `{{option1PrimaryName}} swims ahead, guiding you back on track.
\${{option1PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
2: { 2: {
label: "{{option2PrimaryName}} can help", label: "A Special Move",
label_disabled: "Can't {{option2RequiredMove}}", tooltip: "(+) Special Item Rewards",
tooltip: "(+) {{option2PrimaryName}} saves you\n(+) {{option2PrimaryName}} gains some EXP",
tooltip_disabled: "You have no Pokémon to {{option2RequiredMove}} with",
selected: `{{option2PrimaryName}} flies ahead of your boat, guiding you back on track.
\${{option2PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
3: { 3: {
label: "Wander aimlessly", label: "A Status Move",
tooltip: "(-) Each of your Pokémon lose {{damagePercentage}}% of their total HP", tooltip: "(+) Status Item Rewards",
selected: `You float about in the boat, steering without direction until you finally spot a landmark you remember.
$You and your Pokémon are fatigued from the whole ordeal.`,
}, },
selected: "{{pokeName}} shows off an awesome display of {{move}}!",
incorrect: `...
$That isn't a {{moveCategory}} move!
$I'm sorry, but I can't give you anything.`,
lesson_learned: `Looks like you learned a valuable lesson?
$Your Pokémon also gained some knowledge.`
}, },
outro: "You are back on track." second_option_prompt: "Choose a move for your Pokémon to use.",
outro_good: "Thank you so much for your kindness!\nI hope the items I had were helpful!",
outro_bad: "Come along children, we'll\nfind a better demonstration elsewhere."
}; };

View File

@ -1,31 +1,28 @@
export const fieryFalloutDialogue = { export const fieryFalloutDialogue = {
intro: "Wandering aimlessly through the sea, you've effectively gotten nowhere.", intro: "You encounter a blistering storm of smoke and ash!",
title: "Lost at Sea", title: "Fiery Fallout",
description: "The sea is turbulent in this area, and you're running out of energy.\nThis is bad. Is there a way out of the situation?", description: "The whirling ash and embers have cut visibility to nearly zero. It seems like there might be some... source that is causing these conditions. But what could be behind a phenomenon of this magnitude?",
query: "What will you do?", query: "What will you do?",
option: { option: {
1: { 1: {
label: "{{option1PrimaryName}} can help", label: "Find the source",
label_disabled: "Can't {{option1RequiredMove}}", tooltip: "(?) Discover the source\n(-) Hard Battle",
tooltip: "(+) {{option1PrimaryName}} saves you\n(+) {{option1PrimaryName}} gains some EXP", selected: `You push through the storm, and find two Volcarona in the middle of a mating dance!
tooltip_disabled: "You have no Pokémon to {{option1RequiredMove}} on", $They don't take kindly to the interruption and attack!`,
selected: `{{option1PrimaryName}} swims ahead, guiding you back on track.
\${{option1PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
2: { 2: {
label: "{{option2PrimaryName}} can help", label: "Hunker down",
label_disabled: "Can't {{option2RequiredMove}}", tooltip: "(-) Suffer the effects of the weather",
tooltip: "(+) {{option2PrimaryName}} saves you\n(+) {{option2PrimaryName}} gains some EXP", selected: `The weather effects cause significant harm as you struggle to find shelter!
tooltip_disabled: "You have no Pokémon to {{option2RequiredMove}} with", $Your party takes 30% Max HP damage!
selected: `{{option2PrimaryName}} flies ahead of your boat, guiding you back on track. $Your {burnTarget} also becomes burned!`,
\${{option2PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
3: { 3: {
label: "Wander aimlessly", label: "Your Fire types help",
tooltip: "(-) Each of your Pokémon lose {{damagePercentage}}% of their total HP", tooltip: "(+) End the conditions\n(+) Gain a Charcoal",
selected: `You float about in the boat, steering without direction until you finally spot a landmark you remember. disabled_tooltip: "You need at least 2 Fire Type Pokémon to choose this",
$You and your Pokémon are fatigued from the whole ordeal.`, selected: `Your {{primaryPokemonName}} and {{secondaryPokemonName}} guide you to where two Volcarona are in the middle of a mating dance!
$Thankfully, your Pokémon are able to calm them, and they depart without issue.`,
}, },
}, }
outro: "You are back on track."
}; };

View File

@ -1,31 +1,22 @@
export const mysteriousChallengersDialogue = { export const mysteriousChallengersDialogue = {
intro: "Wandering aimlessly through the sea, you've effectively gotten nowhere.", intro: "Mysterious challengers have appeared!",
title: "Lost at Sea", title: "Mysterious Challengers",
description: "The sea is turbulent in this area, and you're running out of energy.\nThis is bad. Is there a way out of the situation?", description: "If you defeat a challenger, you might impress them enough to receive a boon. But some look tough, are you up to the challenge?",
query: "What will you do?", query: "Who will you battle?",
option: { option: {
1: { 1: {
label: "{{option1PrimaryName}} can help", label: "A clever, mindful foe",
label_disabled: "Can't {{option1RequiredMove}}", tooltip: "(-) Standard Battle\n(+) Move Item Rewards",
tooltip: "(+) {{option1PrimaryName}} saves you\n(+) {{option1PrimaryName}} gains some EXP",
tooltip_disabled: "You have no Pokémon to {{option1RequiredMove}} on",
selected: `{{option1PrimaryName}} swims ahead, guiding you back on track.
\${{option1PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
2: { 2: {
label: "{{option2PrimaryName}} can help", label: "A strong foe",
label_disabled: "Can't {{option2RequiredMove}}", tooltip: "(-) Hard Battle\n(+) Good Rewards",
tooltip: "(+) {{option2PrimaryName}} saves you\n(+) {{option2PrimaryName}} gains some EXP",
tooltip_disabled: "You have no Pokémon to {{option2RequiredMove}} with",
selected: `{{option2PrimaryName}} flies ahead of your boat, guiding you back on track.
\${{option2PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
3: { 3: {
label: "Wander aimlessly", label: "The mightiest foe",
tooltip: "(-) Each of your Pokémon lose {{damagePercentage}}% of their total HP", tooltip: "(-) Brutal Battle\n(+) Great Rewards",
selected: `You float about in the boat, steering without direction until you finally spot a landmark you remember.
$You and your Pokémon are fatigued from the whole ordeal.`,
}, },
selected: "The trainer steps forward...",
}, },
outro: "You are back on track." outro: "The mysterious challenger was defeated!"
}; };

View File

@ -1,31 +1,46 @@
export const safariZoneDialogue = { export const safariZoneDialogue = {
intro: "Wandering aimlessly through the sea, you've effectively gotten nowhere.", intro: "It's a safari zone!",
title: "Lost at Sea", title: "The Safari Zone",
description: "The sea is turbulent in this area, and you're running out of energy.\nThis is bad. Is there a way out of the situation?", description: "There are all kinds of rare and special Pokémon that can be found here!\nIf you choose to enter, you'll have a time limit of 3 wild encounters where you can try to catch these special Pokémon.\n\nBeware, though. These Pokémon may flee before you're able to catch them!",
query: "What will you do?", query: "Would you like to enter?",
option: { option: {
1: { 1: {
label: "{{option1PrimaryName}} can help", label: "Enter",
label_disabled: "Can't {{option1RequiredMove}}", tooltip: "(-) Pay {{option1Money, money}}\n@[SUMMARY_GREEN]{(?) Safari Zone}",
tooltip: "(+) {{option1PrimaryName}} saves you\n(+) {{option1PrimaryName}} gains some EXP", selected: "Time to test your luck!",
tooltip_disabled: "You have no Pokémon to {{option1RequiredMove}} on",
selected: `{{option1PrimaryName}} swims ahead, guiding you back on track.
\${{option1PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
2: { 2: {
label: "{{option2PrimaryName}} can help", label: "Leave",
label_disabled: "Can't {{option2RequiredMove}}", tooltip: "(-) No Rewards",
tooltip: "(+) {{option2PrimaryName}} saves you\n(+) {{option2PrimaryName}} gains some EXP", selected: "You hurry along your way,\nwith a slight feeling of regret.",
tooltip_disabled: "You have no Pokémon to {{option2RequiredMove}} with", },
selected: `{{option2PrimaryName}} flies ahead of your boat, guiding you back on track. },
\${{option2PrimaryName}} seems to also have gotten stronger in this time of need!`, safari: {
1: {
label: "Throw a Pokéball",
tooltip: "(+) Throw a Pokéball",
selected: "You throw a Pokéball!",
},
2: {
label: "Throw bait",
tooltip: "(+) Increases Capture Rate\n(-) Chance to Increase Flee Rate",
selected: "You throw some bait!",
}, },
3: { 3: {
label: "Wander aimlessly", label: "Throw mud",
tooltip: "(-) Each of your Pokémon lose {{damagePercentage}}% of their total HP", tooltip: "(+) Decreases Flee Rate\n(-) Chance to Decrease Capture Rate",
selected: `You float about in the boat, steering without direction until you finally spot a landmark you remember. selected: "You throw some mud!",
$You and your Pokémon are fatigued from the whole ordeal.`,
}, },
4: {
label: "Flee",
tooltip: "(?) Flee from this Pokémon",
}, },
outro: "You are back on track." watching: "{{pokemonName}} is watching carefully!",
eating: "{{pokemonName}} is eating!",
busy_eating: "{{pokemonName}} is busy eating!",
angry: "{{pokemonName}} is angry!",
beside_itself_angry: "{{pokemonName}} is beside itself with anger!",
remaining_count: "{{remainingCount}} Pokémon remaining!",
},
outro: "That was a fun little excursion!"
}; };

View File

@ -1,31 +1,40 @@
export const shadyVitaminDealerDialogue = { export const shadyVitaminDealerDialogue = {
intro: "Wandering aimlessly through the sea, you've effectively gotten nowhere.", intro: "A man in a dark coat approaches you.",
title: "Lost at Sea", speaker: "Shady Salesman",
description: "The sea is turbulent in this area, and you're running out of energy.\nThis is bad. Is there a way out of the situation?", intro_dialogue: `.@d{16}.@d{16}.@d{16}
query: "What will you do?", $I've got the goods if you've got the money.
$Make sure your Pokémon can handle it though.`,
title: "The Vitamin Dealer",
description: "The man opens his jacket to reveal some Pokémon vitamins. The numbers he quotes seem like a really good deal. Almost too good...\nHe offers two package deals to choose from.",
query: "Which deal will choose?",
invalid_selection: "Pokémon must be healthy enough.",
option: { option: {
1: { 1: {
label: "{{option1PrimaryName}} can help", label: "The Cheap Deal",
label_disabled: "Can't {{option1RequiredMove}}", tooltip: "(-) Pay {{option1Money, money}}\n(-) Side Effects?\n(+) Chosen Pokémon Gains 2 Random Vitamins",
tooltip: "(+) {{option1PrimaryName}} saves you\n(+) {{option1PrimaryName}} gains some EXP",
tooltip_disabled: "You have no Pokémon to {{option1RequiredMove}} on",
selected: `{{option1PrimaryName}} swims ahead, guiding you back on track. selected: `{{option1PrimaryName}} swims ahead, guiding you back on track.
\${{option1PrimaryName}} seems to also have gotten stronger in this time of need!`, \${{option1PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
2: { 2: {
label: "{{option2PrimaryName}} can help", label: "The Pricey Deal",
label_disabled: "Can't {{option2RequiredMove}}", tooltip: "(-) Pay {{option2Money, money}}\n(-) Side Effects?\n(+) Chosen Pokémon Gains 2 Random Vitamins",
tooltip: "(+) {{option2PrimaryName}} saves you\n(+) {{option2PrimaryName}} gains some EXP",
tooltip_disabled: "You have no Pokémon to {{option2RequiredMove}} with",
selected: `{{option2PrimaryName}} flies ahead of your boat, guiding you back on track. selected: `{{option2PrimaryName}} flies ahead of your boat, guiding you back on track.
\${{option2PrimaryName}} seems to also have gotten stronger in this time of need!`, \${{option2PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
3: { 3: {
label: "Wander aimlessly", label: "Leave",
tooltip: "(-) Each of your Pokémon lose {{damagePercentage}}% of their total HP", tooltip: "(-) No Rewards",
selected: `You float about in the boat, steering without direction until you finally spot a landmark you remember. selected: `You float about in the boat, steering without direction until you finally spot a landmark you remember.
$You and your Pokémon are fatigued from the whole ordeal.`, $You and your Pokémon are fatigued from the whole ordeal.`,
}, },
selected: `The man hands you two bottles and quickly disappears.
\${{selectedPokemon}} gained {{boost1}} and {{boost2}} boosts!`
}, },
outro: "You are back on track." damage_only: `But the medicine had some side effects!
$Your {{selectedPokemon}} takes some damage...`,
bad_poison: `But the medicine had some side effects!
$Your {{selectedPokemon}} takes some damage\nand becomes badly poisoned...`,
poison: `But the medicine had some side effects!
$Your {{selectedPokemon}} becomes poisoned...`,
no_bad_effects: "Looks like there were no side-effects this time.",
}; };

View File

@ -1,31 +1,30 @@
export const trainingSessionDialogue = { export const trainingSessionDialogue = {
intro: "Wandering aimlessly through the sea, you've effectively gotten nowhere.", intro: "You've come across some\ntraining tools and supplies.",
title: "Lost at Sea", title: "Training Session",
description: "The sea is turbulent in this area, and you're running out of energy.\nThis is bad. Is there a way out of the situation?", description: "These supplies look like they could be used to train a member of your party! There are a few ways you could train your Pokémon, by battling against it with the rest of your team.",
query: "What will you do?", query: "How should you train?",
option: { option: {
1: { 1: {
label: "{{option1PrimaryName}} can help", label: "Light Training",
label_disabled: "Can't {{option1RequiredMove}}", tooltip: "(-) Light Battle\n(+) Improve 2 Random IVs of Pokémon",
tooltip: "(+) {{option1PrimaryName}} saves you\n(+) {{option1PrimaryName}} gains some EXP", finished: `{{selectedPokemon}} returns, feeling\nworn out but accomplished!
tooltip_disabled: "You have no Pokémon to {{option1RequiredMove}} on", $Its {{stat1}} and {{stat2}} IVs were improved!`,
selected: `{{option1PrimaryName}} swims ahead, guiding you back on track.
\${{option1PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
2: { 2: {
label: "{{option2PrimaryName}} can help", label: "Moderate Training",
label_disabled: "Can't {{option2RequiredMove}}", tooltip: "(-) Moderate Battle\n(+) Change Pokémon's Nature",
tooltip: "(+) {{option2PrimaryName}} saves you\n(+) {{option2PrimaryName}} gains some EXP", select_prompt: "Select a new nature\nto train your Pokémon in.",
tooltip_disabled: "You have no Pokémon to {{option2RequiredMove}} with", finished: `{{selectedPokemon}} returns, feeling\nworn out but accomplished!
selected: `{{option2PrimaryName}} flies ahead of your boat, guiding you back on track. $Its nature was changed to {{nature}}!`,
\${{option2PrimaryName}} seems to also have gotten stronger in this time of need!`,
}, },
3: { 3: {
label: "Wander aimlessly", label: "Heavy Training",
tooltip: "(-) Each of your Pokémon lose {{damagePercentage}}% of their total HP", tooltip: "(-) Each of your Pokémon lose {{damagePercentage}}% of their total HP",
selected: `You float about in the boat, steering without direction until you finally spot a landmark you remember. select_prompt: "Select a new ability\nto train your Pokémon in.",
$You and your Pokémon are fatigued from the whole ordeal.`, finished: `{{selectedPokemon}} returns, feeling\nworn out but accomplished!
$Its ability was changed to {{ability}}!`,
}, },
selected: "{{selectedPokemon}} moves across\nthe clearing to face you...",
}, },
outro: "You are back on track." outro: "That was a successful training session!",
}; };

View File

@ -117,9 +117,9 @@ export const EGG_GACHA_PULL_COUNT_OVERRIDE: number = 0;
*/ */
// 1 to 256, set to null to ignore // 1 to 256, set to null to ignore
export const MYSTERY_ENCOUNTER_RATE_OVERRIDE: number = 256; export const MYSTERY_ENCOUNTER_RATE_OVERRIDE: number = null;
export const MYSTERY_ENCOUNTER_TIER_OVERRIDE: MysteryEncounterTier = null; export const MYSTERY_ENCOUNTER_TIER_OVERRIDE: MysteryEncounterTier = null;
export const MYSTERY_ENCOUNTER_OVERRIDE: MysteryEncounterType = MysteryEncounterType.SLEEPING_SNORLAX; export const MYSTERY_ENCOUNTER_OVERRIDE: MysteryEncounterType = null;
/** /**
* MODIFIER / ITEM OVERRIDES * MODIFIER / ITEM OVERRIDES

View File

@ -12,7 +12,7 @@ import GameManager from "#app/test/utils/gameManager";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { runSelectMysteryEncounterOption } from "../encounterTestUtils"; import { runSelectMysteryEncounterOption } from "../encounterTestUtils";
const namespace = "mysteryEncounter:lostAtSeaDialogue"; const namespace = "mysteryEncounter:lostAtSea";
/** Blastoise for surf. Pidgeot for fly. Abra for none. */ /** Blastoise for surf. Pidgeot for fly. Abra for none. */
const defaultParty = [Species.BLASTOISE, Species.PIDGEOT, Species.ABRA]; const defaultParty = [Species.BLASTOISE, Species.PIDGEOT, Species.ABRA];
const defaultBiome = Biome.SEA; const defaultBiome = Biome.SEA;
@ -123,7 +123,7 @@ describe("Lost at Sea - Mystery Encounter", () => {
await runSelectMysteryEncounterOption(game, 2); await runSelectMysteryEncounterOption(game, 2);
expect(blastoise.exp).toBe(expBefore + laprasSpecies.baseExp * defaultWave); expect(blastoise.exp).toBe(expBefore + laprasSpecies.baseExp * defaultWave);
}, 10000000); });
it("should leave encounter without battle", async () => { it("should leave encounter without battle", async () => {
game.override.startingWave(33); game.override.startingWave(33);
@ -178,7 +178,6 @@ describe("Lost at Sea - Mystery Encounter", () => {
game.override.startingWave(33); game.override.startingWave(33);
const leaveEncounterWithoutBattleSpy = vi.spyOn(EncounterPhaseUtils, "leaveEncounterWithoutBattle"); const leaveEncounterWithoutBattleSpy = vi.spyOn(EncounterPhaseUtils, "leaveEncounterWithoutBattle");
// await workaround_reInitSceneWithOverrides(game);
await game.runToMysteryEncounter(defaultParty); await game.runToMysteryEncounter(defaultParty);
await runSelectMysteryEncounterOption(game, 2); await runSelectMysteryEncounterOption(game, 2);