diff --git a/src/data/mystery-encounters/dialogue/getting-lost-at-the-sea-dialogue.ts b/src/data/mystery-encounters/dialogue/getting-lost-at-the-sea-dialogue.ts new file mode 100644 index 00000000000..9e008c93c57 --- /dev/null +++ b/src/data/mystery-encounters/dialogue/getting-lost-at-the-sea-dialogue.ts @@ -0,0 +1,50 @@ +import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue"; + +const namepsace = "mysteryEncounter:gettingLostAtTheSea"; + +export const GettingLostAtTheSeaDialogue: MysteryEncounterDialogue = { + intro: [ + { + text: `${namepsace}:intro` + } + ], + encounterOptionsDialogue: { + title: `${namepsace}:title`, + description: `${namepsace}:description`, + query: `${namepsace}:query`, + options: [ + { + buttonLabel: `${namepsace}:option:1:label`, + buttonTooltip: `${namepsace}:option:1:tooltip`, + selected: [ + { + text: `${namepsace}:option:1:selected`, + }, + ], + }, + { + buttonLabel: `${namepsace}:option:2:label`, + buttonTooltip: `${namepsace}:option:2:tooltip`, + selected: [ + { + text: `${namepsace}:option:2:selected`, + }, + ], + }, + { + buttonLabel: `${namepsace}:option:3:label`, + buttonTooltip: `${namepsace}:option:3:tooltip`, + selected: [ + { + text: `${namepsace}:option:3:selected`, + }, + ], + }, + ], + }, + outro: [ + { + text: `${namepsace}:outro`, + }, + ], +}; diff --git a/src/data/mystery-encounters/encounters/getting-lost-at-the-sea-encounter.ts b/src/data/mystery-encounters/encounters/getting-lost-at-the-sea-encounter.ts new file mode 100644 index 00000000000..3b9b2366158 --- /dev/null +++ b/src/data/mystery-encounters/encounters/getting-lost-at-the-sea-encounter.ts @@ -0,0 +1,45 @@ +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import BattleScene from "../../../battle-scene"; +import MysteryEncounter, { + MysteryEncounterBuilder, + MysteryEncounterTier, +} from "../mystery-encounter"; + +/** + * Getting lost at the sea encounter. + * @see {@link https://github.com/AsdarDevelops/PokeRogue-Events/issues/9|GitHub Issue #9} + * @see {@linkcode MysteryEncounter|Dialogues} + * @see For biome requirements check [mysteryEncountersByBiome](../mystery-encounters.ts) + */ +export const GettingLostAtTheSeaEncounter: MysteryEncounter = + MysteryEncounterBuilder.withEncounterType( + MysteryEncounterType.GETTING_LOST_AT_THE_SEA + ) + .withEncounterTier(MysteryEncounterTier.COMMON) + .withIntroSpriteConfigs([ + { + fileRoot: "pokemon", + spriteKey: "130", // gyarados for now + hasShadow: false, + scale: 4, + y: 100, + x: 130, + tint: .25 + }, + ]) + .withSceneWaveRangeRequirement(11, 179) + .withOnInit((_scene: BattleScene) => { + console.log("GettingLostAtTheSeaEncounter OnInit"); + return true; + }) + .withOptionPhase(async (scene: BattleScene) => { + // OPTION 1 + }) + .withOptionPhase(async (scene: BattleScene) => { + // OPTION 2 + }) + .withOptionPhase(async (scene: BattleScene) => { + // OPTION 3 + return true; + }) + .build(); diff --git a/src/data/mystery-encounters/mystery-encounter-dialogue.ts b/src/data/mystery-encounters/mystery-encounter-dialogue.ts index 1e2dfe85045..6f8f6a844ed 100644 --- a/src/data/mystery-encounters/mystery-encounter-dialogue.ts +++ b/src/data/mystery-encounters/mystery-encounter-dialogue.ts @@ -8,6 +8,7 @@ import { SleepingSnorlaxDialogue } from "./dialogue/sleeping-snorlax-dialogue"; import { DepartmentStoreSaleDialogue } from "#app/data/mystery-encounters/dialogue/department-store-sale-dialogue"; import { ShadyVitaminDealerDialogue } from "#app/data/mystery-encounters/dialogue/shady-vitamin-dealer"; import { TextStyle } from "#app/ui/text"; +import { GettingLostAtTheSeaDialogue } from "./dialogue/getting-lost-at-the-sea-dialogue"; export class TextDisplay { speaker?: TemplateStringsArray | `mysteryEncounter:${string}`; @@ -92,4 +93,5 @@ export function initMysteryEncounterDialogue() { allMysteryEncounterDialogue[MysteryEncounterType.SLEEPING_SNORLAX] = SleepingSnorlaxDialogue; allMysteryEncounterDialogue[MysteryEncounterType.DEPARTMENT_STORE_SALE] = DepartmentStoreSaleDialogue; allMysteryEncounterDialogue[MysteryEncounterType.SHADY_VITAMIN_DEALER] = ShadyVitaminDealerDialogue; + allMysteryEncounterDialogue[MysteryEncounterType.GETTING_LOST_AT_THE_SEA] = GettingLostAtTheSeaDialogue; } diff --git a/src/data/mystery-encounters/mystery-encounters.ts b/src/data/mystery-encounters/mystery-encounters.ts index e4a748d3a23..bb27426d798 100644 --- a/src/data/mystery-encounters/mystery-encounters.ts +++ b/src/data/mystery-encounters/mystery-encounters.ts @@ -9,6 +9,7 @@ import { SleepingSnorlaxEncounter } from "./encounters/sleeping-snorlax"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { DepartmentStoreSaleEncounter } from "#app/data/mystery-encounters/encounters/department-store-sale"; import { ShadyVitaminDealerEncounter } from "#app/data/mystery-encounters/encounters/shady-vitamin-dealer"; +import { GettingLostAtTheSeaEncounter } from "./encounters/getting-lost-at-the-sea-encounter"; // Spawn chance: (BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT + WIGHT_INCREMENT_ON_SPAWN_MISS * ) / 256 export const BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT = 1; @@ -40,7 +41,9 @@ export const mysteryEncountersByBiome = new Map([ MysteryEncounterType.SLEEPING_SNORLAX ]], - [Biome.SEA, []], + [Biome.SEA, [ + MysteryEncounterType.GETTING_LOST_AT_THE_SEA + ]], [Biome.SWAMP, []], [Biome.BEACH, [ MysteryEncounterType.DEPARTMENT_STORE_SALE @@ -95,6 +98,7 @@ export function initMysteryEncounters() { allMysteryEncounters[MysteryEncounterType.SLEEPING_SNORLAX] = SleepingSnorlaxEncounter; allMysteryEncounters[MysteryEncounterType.DEPARTMENT_STORE_SALE] = DepartmentStoreSaleEncounter; allMysteryEncounters[MysteryEncounterType.SHADY_VITAMIN_DEALER] = ShadyVitaminDealerEncounter; + allMysteryEncounters[MysteryEncounterType.GETTING_LOST_AT_THE_SEA] = GettingLostAtTheSeaEncounter; // Append encounters that can occur in any biome to biome map const anyBiomeEncounters: MysteryEncounterType[] = Object.keys(MysteryEncounterType).filter(e => !isNaN(Number(e))).map(k => Number(k) as MysteryEncounterType); diff --git a/src/enums/mystery-encounter-type.ts b/src/enums/mystery-encounter-type.ts index 6e2815babca..9a78bf1b3ea 100644 --- a/src/enums/mystery-encounter-type.ts +++ b/src/enums/mystery-encounter-type.ts @@ -6,5 +6,6 @@ export enum MysteryEncounterType { SLEEPING_SNORLAX, TRAINING_SESSION, DEPARTMENT_STORE_SALE, - SHADY_VITAMIN_DEALER + SHADY_VITAMIN_DEALER, + GETTING_LOST_AT_THE_SEA //might be generalized later on } diff --git a/src/locales/en/mystery-encounter.ts b/src/locales/en/mystery-encounter.ts index ac04eed2688..3ff720dae0b 100644 --- a/src/locales/en/mystery-encounter.ts +++ b/src/locales/en/mystery-encounter.ts @@ -1,4 +1,4 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { gettingLostAtTheSea } from "./mystery-encounters/getting-lost-at-the-sea"; /** * Patterns that can be used: @@ -12,7 +12,7 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales"; * Any '(+)' or '(-)' type of tooltip will auto-color to green/blue respectively. THIS ONLY OCCURS FOR OPTION TOOLTIPS, NOWHERE ELSE * Other types of '(...)' tooltips will have to specify the text color manually by using '@[SUMMARY_GREEN]{}' pattern */ -export const mysteryEncounter: SimpleTranslationEntries = { +export const mysteryEncounter = { // DO NOT REMOVE "unit_test_dialogue": "@ec{test}@ec{test} @ec{test@ec{test}} @ec{test1} @ec{test\} @ec{test\\} @ec{test\\\} {test}", @@ -181,4 +181,5 @@ export const mysteryEncounter: SimpleTranslationEntries = { "sleeping_snorlax_option_3_good_result": "Your @ec{option3PrimaryName} uses @ec{option3PrimaryMove}! @s{item_fanfare}It steals Leftovers off the sleeping Snorlax and you make out like bandits!", // "sleeping_snorlax_outro_win": "The mysterious challengers were defeated!", + gettingLostAtTheSea, } as const; diff --git a/src/locales/en/mystery-encounters/getting-lost-at-the-sea.ts b/src/locales/en/mystery-encounters/getting-lost-at-the-sea.ts new file mode 100644 index 00000000000..a9640a20490 --- /dev/null +++ b/src/locales/en/mystery-encounters/getting-lost-at-the-sea.ts @@ -0,0 +1,25 @@ + +export const gettingLostAtTheSea = { + intro: "TBA: INTRO MESSAGE", + "title": "Getting lost at the sea", + "description": "You get lost. Certain Pokémons can help you get back on track unharmed.", + "query": "What will you do?", + option: { + 1: { + label: "Let (Water type) guide you back", //TODO: replace (Water type) with pokemon in team + tooltip: "Needs a Water type in the party. That PKMN earns EXP as if having defeated a Lapras.", + selected: "TBA: OPTION 1 SELECTED TEXT " + }, + 2: { + label: " Let (Flying type) guide you back", //TODO: replace (Flying type) with pokemon in team + tooltip: "Needs a Flying type in the party. That PKMN earns EXP as if having defeated a Lapras.", + selected: "TBA: OPTION 2 SELECTED TEXT " + }, + 3: { + label: "Wander aimlessly until you're back", + tooltip: "All your Pokémon lose 30% of their HP. Any below that are KO'd.", + selected: "TBA: OPTION 3 SELECTED TEXT " + } + }, + "outro": "TBA GETTING LOST AT SEA OUTRO MESSAGE", +}; diff --git a/src/overrides.ts b/src/overrides.ts index ce706173691..596ee8f20f1 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -35,8 +35,8 @@ export const SEED_OVERRIDE: string = ""; export const WEATHER_OVERRIDE: WeatherType = WeatherType.NONE; export const DOUBLE_BATTLE_OVERRIDE: boolean = false; export const SINGLE_BATTLE_OVERRIDE: boolean = false; -export const STARTING_WAVE_OVERRIDE: integer = 0; -export const STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN; +export const STARTING_WAVE_OVERRIDE: integer = 15; +export const STARTING_BIOME_OVERRIDE: Biome = Biome.SEA; export const ARENA_TINT_OVERRIDE: TimeOfDay = null; // Multiplies XP gained by this value including 0. Set to null to ignore the override export const XP_MULTIPLIER_OVERRIDE: number = null; @@ -118,9 +118,9 @@ export const EGG_GACHA_PULL_COUNT_OVERRIDE: number = 0; */ // 1 to 256, set to null to ignore -export const MYSTERY_ENCOUNTER_RATE_OVERRIDE: number = null; +export const MYSTERY_ENCOUNTER_RATE_OVERRIDE: number = 100000; export const MYSTERY_ENCOUNTER_TIER_OVERRIDE: MysteryEncounterTier = null; -export const MYSTERY_ENCOUNTER_OVERRIDE: MysteryEncounterType = null; +export const MYSTERY_ENCOUNTER_OVERRIDE: MysteryEncounterType = MysteryEncounterType.GETTING_LOST_AT_THE_SEA; /** * MODIFIER / ITEM OVERRIDES