styling and text coloring fixes

This commit is contained in:
ImperialSympathizer 2024-07-09 23:19:44 -04:00
parent fc25c3b55e
commit efb00553c9
36 changed files with 302 additions and 338 deletions

View File

@ -1,4 +1,4 @@
import MysteryEncounterDialogue from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
export const DarkDealDialogue: MysteryEncounterDialogue = { export const DarkDealDialogue: MysteryEncounterDialogue = {
intro: [ intro: [

View File

@ -1,4 +1,4 @@
import MysteryEncounterDialogue from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
export const DepartmentStoreSaleDialogue: MysteryEncounterDialogue = { export const DepartmentStoreSaleDialogue: MysteryEncounterDialogue = {
intro: [ intro: [

View File

@ -1,4 +1,4 @@
import MysteryEncounterDialogue from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
export const FightOrFlightDialogue: MysteryEncounterDialogue = { export const FightOrFlightDialogue: MysteryEncounterDialogue = {
intro: [ intro: [

View File

@ -1,4 +1,4 @@
import MysteryEncounterDialogue from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
export const MysteriousChallengersDialogue: MysteryEncounterDialogue = { export const MysteriousChallengersDialogue: MysteryEncounterDialogue = {
intro: [ intro: [

View File

@ -1,4 +1,4 @@
import MysteryEncounterDialogue from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
export const MysteriousChestDialogue: MysteryEncounterDialogue = { export const MysteriousChestDialogue: MysteryEncounterDialogue = {
intro: [ intro: [

View File

@ -1,4 +1,4 @@
import MysteryEncounterDialogue from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
export const ShadyVitaminDealerDialogue: MysteryEncounterDialogue = { export const ShadyVitaminDealerDialogue: MysteryEncounterDialogue = {
intro: [ intro: [

View File

@ -1,4 +1,4 @@
import MysteryEncounterDialogue from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
export const SleepingSnorlaxDialogue: MysteryEncounterDialogue = { export const SleepingSnorlaxDialogue: MysteryEncounterDialogue = {
intro: [ intro: [

View File

@ -1,4 +1,4 @@
import MysteryEncounterDialogue from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
export const TrainingSessionDialogue: MysteryEncounterDialogue = { export const TrainingSessionDialogue: MysteryEncounterDialogue = {
intro: [ intro: [

View File

@ -1,17 +1,17 @@
import BattleScene from "../../battle-scene"; import BattleScene from "../../../battle-scene";
import {AddPokeballModifierType} from "../../modifier/modifier-type"; import { AddPokeballModifierType } from "../../../modifier/modifier-type";
import { import {
EnemyPartyConfig, EnemyPokemonConfig, EnemyPartyConfig, EnemyPokemonConfig,
getRandomPlayerPokemon, getRandomPlayerPokemon,
getRandomSpeciesByStarterTier, getRandomSpeciesByStarterTier,
initBattleWithEnemyConfig, initBattleWithEnemyConfig,
leaveEncounterWithoutBattle leaveEncounterWithoutBattle
} from "./mystery-encounter-utils"; } from "../mystery-encounter-utils";
import MysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier } from "../mystery-encounter"; import MysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier } from "../mystery-encounter";
import { ModifierRewardPhase } from "#app/phases"; import { ModifierRewardPhase } from "#app/phases";
import {getPokemonSpecies} from "../pokemon-species"; import { getPokemonSpecies } from "../../pokemon-species";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import {PokeballType} from "../pokeball"; import { PokeballType } from "../../pokeball";
import { PartySizeRequirement, WaveCountRequirement } from "../mystery-encounter-requirements"; import { PartySizeRequirement, WaveCountRequirement } from "../mystery-encounter-requirements";
import { MysteryEncounterOptionBuilder } from "../mystery-encounter-option"; import { MysteryEncounterOptionBuilder } from "../mystery-encounter-option";
import { Type } from "#app/data/type"; import { Type } from "#app/data/type";

View File

@ -1,4 +1,4 @@
import BattleScene from "../../battle-scene"; import BattleScene from "../../../battle-scene";
import { import {
leaveEncounterWithoutBattle, setEncounterExp, leaveEncounterWithoutBattle, setEncounterExp,
setEncounterRewards, setEncounterRewards,

View File

@ -1,4 +1,4 @@
import BattleScene from "../../battle-scene"; import BattleScene from "../../../battle-scene";
import { ModifierTier } from "#app/modifier/modifier-tier"; import { ModifierTier } from "#app/modifier/modifier-tier";
import { import {
EnemyPartyConfig, EnemyPartyConfig,

View File

@ -1,4 +1,4 @@
import BattleScene from "../../battle-scene"; import BattleScene from "../../../battle-scene";
import { ModifierTier } from "#app/modifier/modifier-tier"; import { ModifierTier } from "#app/modifier/modifier-tier";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import { EnemyPartyConfig, initBattleWithEnemyConfig, setEncounterRewards } from "#app/data/mystery-encounters/mystery-encounter-utils"; import { EnemyPartyConfig, initBattleWithEnemyConfig, setEncounterRewards } from "#app/data/mystery-encounters/mystery-encounter-utils";
@ -12,7 +12,7 @@ import {
TrainerPartyTemplate, TrainerPartyTemplate,
trainerPartyTemplates trainerPartyTemplates
} from "#app/data/trainer-config"; } from "#app/data/trainer-config";
import * as Utils from "../../utils"; import * as Utils from "../../../utils";
import { PartyMemberStrength } from "#enums/party-member-strength"; import { PartyMemberStrength } from "#enums/party-member-strength";
export const MysteriousChallengersEncounter: MysteryEncounter = new MysteryEncounterBuilder() export const MysteriousChallengersEncounter: MysteryEncounter = new MysteryEncounterBuilder()

View File

@ -1,4 +1,4 @@
import BattleScene from "../../battle-scene"; import BattleScene from "../../../battle-scene";
import { ModifierTier } from "#app/modifier/modifier-tier"; import { ModifierTier } from "#app/modifier/modifier-tier";
import { import {
getHighestLevelPlayerPokemon, getHighestLevelPlayerPokemon,

View File

@ -2,13 +2,13 @@ import MysteryEncounter from "../mystery-encounter";
import { DarkDealEncounter } from "./dark-deal"; import { DarkDealEncounter } from "./dark-deal";
import { MysteriousChallengersEncounter } from "./mysterious-challengers"; import { MysteriousChallengersEncounter } from "./mysterious-challengers";
import { MysteriousChestEncounter } from "./mysterious-chest"; import { MysteriousChestEncounter } from "./mysterious-chest";
import {FightOrFlightEncounter} from "#app/data/mystery-encounters/fight-or-flight"; import { FightOrFlightEncounter } from "#app/data/mystery-encounters/encounters/fight-or-flight";
import {TrainingSessionEncounter} from "#app/data/mystery-encounters/training-session"; import { TrainingSessionEncounter } from "#app/data/mystery-encounters/encounters/training-session";
import { Biome } from "#app/enums/biome"; import { Biome } from "#enums/biome";
import { SleepingSnorlaxEncounter } from "./sleeping-snorlax"; import { SleepingSnorlaxEncounter } from "./sleeping-snorlax";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import {DepartmentStoreSaleEncounter} from "#app/data/mystery-encounters/department-store-sale"; import { DepartmentStoreSaleEncounter } from "#app/data/mystery-encounters/encounters/department-store-sale";
import {ShadyVitaminDealerEncounter} from "#app/data/mystery-encounters/shady-vitamin-dealer"; import { ShadyVitaminDealerEncounter } from "#app/data/mystery-encounters/encounters/shady-vitamin-dealer";
// Spawn chance: (BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT + WIGHT_INCREMENT_ON_SPAWN_MISS * <number of missed spawns>) / 256 // Spawn chance: (BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT + WIGHT_INCREMENT_ON_SPAWN_MISS * <number of missed spawns>) / 256
export const BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT = 1; export const BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT = 1;
@ -40,90 +40,50 @@ export const mysteryEncountersByBiome = new Map<Biome, MysteryEncounterType[]>([
MysteryEncounterType.SLEEPING_SNORLAX MysteryEncounterType.SLEEPING_SNORLAX
]], ]],
[Biome.SEA, [ [Biome.SEA, []],
[Biome.SWAMP, []],
]],
[Biome.SWAMP, [
]],
[Biome.BEACH, [ [Biome.BEACH, [
MysteryEncounterType.DEPARTMENT_STORE_SALE MysteryEncounterType.DEPARTMENT_STORE_SALE
]], ]],
[Biome.LAKE, [ [Biome.LAKE, []],
[Biome.SEABED, []],
]],
[Biome.SEABED, [
]],
[Biome.MOUNTAIN, [ [Biome.MOUNTAIN, [
MysteryEncounterType.SLEEPING_SNORLAX MysteryEncounterType.SLEEPING_SNORLAX
]], ]],
[Biome.BADLANDS, [ [Biome.BADLANDS, []],
]],
[Biome.CAVE, [ [Biome.CAVE, [
MysteryEncounterType.SLEEPING_SNORLAX MysteryEncounterType.SLEEPING_SNORLAX
]], ]],
[Biome.DESERT, [ [Biome.DESERT, []],
[Biome.ICE_CAVE, []],
]],
[Biome.ICE_CAVE, [
]],
[Biome.MEADOW, [ [Biome.MEADOW, [
MysteryEncounterType.DEPARTMENT_STORE_SALE MysteryEncounterType.DEPARTMENT_STORE_SALE
]], ]],
[Biome.POWER_PLANT, [ [Biome.POWER_PLANT, [
MysteryEncounterType.DEPARTMENT_STORE_SALE MysteryEncounterType.DEPARTMENT_STORE_SALE
]], ]],
[Biome.VOLCANO, [ [Biome.VOLCANO, []],
[Biome.GRAVEYARD, []],
]], [Biome.DOJO, []],
[Biome.GRAVEYARD, [
]],
[Biome.DOJO, [
]],
[Biome.FACTORY, [ [Biome.FACTORY, [
MysteryEncounterType.DEPARTMENT_STORE_SALE MysteryEncounterType.DEPARTMENT_STORE_SALE
]], ]],
[Biome.RUINS, [ [Biome.RUINS, []],
[Biome.WASTELAND, []],
]], [Biome.ABYSS, []],
[Biome.WASTELAND, [ [Biome.SPACE, []],
]],
[Biome.ABYSS, [
]],
[Biome.SPACE, [
]],
[Biome.CONSTRUCTION_SITE, [ [Biome.CONSTRUCTION_SITE, [
MysteryEncounterType.DEPARTMENT_STORE_SALE MysteryEncounterType.DEPARTMENT_STORE_SALE
]], ]],
[Biome.JUNGLE, [ [Biome.JUNGLE, []],
[Biome.FAIRY_CAVE, []],
]], [Biome.TEMPLE, []],
[Biome.FAIRY_CAVE, [
]],
[Biome.TEMPLE, [
]],
[Biome.SLUM, [ [Biome.SLUM, [
MysteryEncounterType.DEPARTMENT_STORE_SALE MysteryEncounterType.DEPARTMENT_STORE_SALE
]], ]],
[Biome.SNOWY_FOREST, [ [Biome.SNOWY_FOREST, []],
[Biome.ISLAND, []],
]], [Biome.LABORATORY, []]
[Biome.ISLAND, [
]],
[Biome.LABORATORY, [
]]
]); ]);
// Only add your MysterEncounter here if you want it to be in every biome. // Only add your MysterEncounter here if you want it to be in every biome.

View File

@ -1,4 +1,4 @@
import BattleScene from "../../battle-scene"; import BattleScene from "../../../battle-scene";
import { import {
generateModifierType, generateModifierType,
leaveEncounterWithoutBattle, leaveEncounterWithoutBattle,

View File

@ -1,13 +1,13 @@
import BattleScene from "../../battle-scene"; import BattleScene from "../../../battle-scene";
import { import {
EnemyPartyConfig, EnemyPartyConfig,
EnemyPokemonConfig, generateModifierType, EnemyPokemonConfig, generateModifierType,
initBattleWithEnemyConfig, initBattleWithEnemyConfig,
leaveEncounterWithoutBattle, queueEncounterMessage, leaveEncounterWithoutBattle, queueEncounterMessage,
setEncounterRewards setEncounterRewards
} from "./mystery-encounter-utils"; } from "../mystery-encounter-utils";
import MysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier } from "../mystery-encounter"; import MysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier } from "../mystery-encounter";
import * as Utils from "../../utils"; import * as Utils from "../../../utils";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { MoveRequirement, WaveCountRequirement } from "../mystery-encounter-requirements"; import { MoveRequirement, WaveCountRequirement } from "../mystery-encounter-requirements";
import { MysteryEncounterOptionBuilder } from "../mystery-encounter-option"; import { MysteryEncounterOptionBuilder } from "../mystery-encounter-option";
@ -15,9 +15,9 @@ import {
ModifierTypeOption, ModifierTypeOption,
modifierTypes modifierTypes
} from "#app/modifier/modifier-type"; } from "#app/modifier/modifier-type";
import { getPokemonSpecies } from "../pokemon-species"; import { getPokemonSpecies } from "../../pokemon-species";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { Status, StatusEffect } from "../status-effect"; import { Status, StatusEffect } from "../../status-effect";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { BerryType } from "#enums/berry-type"; import { BerryType } from "#enums/berry-type";

View File

@ -1,4 +1,4 @@
import BattleScene from "../../battle-scene"; import BattleScene from "../../../battle-scene";
import { import {
EnemyPartyConfig, EnemyPartyConfig,
getEncounterText, getEncounterText,
@ -302,5 +302,6 @@ function getEnemyConfig(scene: BattleScene, playerPokemon: PlayerPokemon, segmen
class ModifiersHolder { class ModifiersHolder {
public value: PokemonHeldItemModifier[] = []; public value: PokemonHeldItemModifier[] = [];
constructor() {} constructor() {
}
} }

View File

@ -1,7 +1,7 @@
import {MysteryEncounterTier} from "#app/data/mystery-encounter"; import { MysteryEncounterTier } from "#app/data/mystery-encounters/mystery-encounter";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import {BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT} from "#app/data/mystery-encounters/mystery-encounters"; import { BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT } from "#app/data/mystery-encounters/encounters/mystery-encounters";
import {isNullOrUndefined} from "../utils"; import { isNullOrUndefined } from "#app/utils";
export class MysteryEncounterData { export class MysteryEncounterData {
encounteredEvents: [MysteryEncounterType, MysteryEncounterTier][] = []; encounteredEvents: [MysteryEncounterType, MysteryEncounterTier][] = [];

View File

@ -4,7 +4,7 @@ import {MysteriousChestDialogue} from "#app/data/mystery-encounters/dialogue/mys
import { DarkDealDialogue } from "#app/data/mystery-encounters/dialogue/dark-deal-dialogue"; import { DarkDealDialogue } from "#app/data/mystery-encounters/dialogue/dark-deal-dialogue";
import { FightOrFlightDialogue } from "#app/data/mystery-encounters/dialogue/fight-or-flight-dialogue"; import { FightOrFlightDialogue } from "#app/data/mystery-encounters/dialogue/fight-or-flight-dialogue";
import { TrainingSessionDialogue } from "#app/data/mystery-encounters/dialogue/training-session-dialogue"; import { TrainingSessionDialogue } from "#app/data/mystery-encounters/dialogue/training-session-dialogue";
import { SleepingSnorlaxDialogue } from "./sleeping-snorlax-dialogue"; import { SleepingSnorlaxDialogue } from "./dialogue/sleeping-snorlax-dialogue";
import { DepartmentStoreSaleDialogue } from "#app/data/mystery-encounters/dialogue/department-store-sale-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 { ShadyVitaminDealerDialogue } from "#app/data/mystery-encounters/dialogue/shady-vitamin-dealer";
import { TextStyle } from "#app/ui/text"; import { TextStyle } from "#app/ui/text";

View File

@ -1,8 +1,8 @@
import { PlayerPokemon } from "#app/field/pokemon"; import { PlayerPokemon } from "#app/field/pokemon";
import * as Utils from "../utils"; import * as Utils from "../../utils";
import BattleScene from "../battle-scene"; import BattleScene from "../../battle-scene";
import { EncounterPokemonRequirement, EncounterSceneRequirement } from "./mystery-encounter-requirements"; import { EncounterPokemonRequirement, EncounterSceneRequirement } from "./mystery-encounter-requirements";
import {OptionTextDisplay} from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import { OptionTextDisplay } from "#app/data/mystery-encounters/mystery-encounter-dialogue";
export default interface MysteryEncounterOption { export default interface MysteryEncounterOption {
requirements?: EncounterSceneRequirement[]; requirements?: EncounterSceneRequirement[];
@ -37,6 +37,7 @@ export default class MysteryEncounterOption implements MysteryEncounterOption {
this.meetsPrimaryRequirementAndPrimaryPokemonSelected(scene) && this.meetsPrimaryRequirementAndPrimaryPokemonSelected(scene) &&
this.meetsSupportingRequirementAndSupportingPokemonSelected(scene); this.meetsSupportingRequirementAndSupportingPokemonSelected(scene);
} }
meetsPrimaryRequirementAndPrimaryPokemonSelected?(scene: BattleScene) { meetsPrimaryRequirementAndPrimaryPokemonSelected?(scene: BattleScene) {
if (!this.primaryPokemonRequirements) { if (!this.primaryPokemonRequirements) {
return true; return true;

View File

@ -1,18 +1,18 @@
import { PlayerPokemon } from "#app/field/pokemon"; import { PlayerPokemon } from "#app/field/pokemon";
import { ModifierType, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; import { ModifierType, PokemonHeldItemModifierType } from "#app/modifier/modifier-type";
import BattleScene from "../battle-scene"; import BattleScene from "../../battle-scene";
import {isNullOrUndefined} from "../utils"; import { isNullOrUndefined } from "#app/utils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day"; import { TimeOfDay } from "#enums/time-of-day";
import {Nature} from "./nature"; import { Nature } from "../nature";
import {EvolutionItem, pokemonEvolutions} from "./pokemon-evolutions"; import { EvolutionItem, pokemonEvolutions } from "../pokemon-evolutions";
import {FormChangeItem, pokemonFormChanges, SpeciesFormChangeItemTrigger} from "./pokemon-forms"; import { FormChangeItem, pokemonFormChanges, SpeciesFormChangeItemTrigger } from "../pokemon-forms";
import {SpeciesFormKey} from "./pokemon-species"; import { SpeciesFormKey } from "../pokemon-species";
import {StatusEffect} from "./status-effect"; import { StatusEffect } from "../status-effect";
import {Type} from "./type"; import { Type } from "../type";
import {WeatherType} from "./weather"; import { WeatherType } from "../weather";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
export interface EncounterRequirement { export interface EncounterRequirement {
@ -147,6 +147,7 @@ export class WeatherRequirement extends EncounterSceneRequirement {
return true; return true;
} }
getDialogueToken(scene: BattleScene, pokemon?: PlayerPokemon): [string, string] { getDialogueToken(scene: BattleScene, pokemon?: PlayerPokemon): [string, string] {
return ["weather", WeatherType[scene.arena?.weather?.weatherType].replace("_", " ").toLocaleLowerCase()]; return ["weather", WeatherType[scene.arena?.weather?.weatherType].replace("_", " ").toLocaleLowerCase()];
} }
@ -654,6 +655,7 @@ export class CanFormChangeWithItemRequirement extends EncounterPokemonRequiremen
} }
return this.queryParty(partyPokemon).length >= this.minNumberOfPokemon; return this.queryParty(partyPokemon).length >= this.minNumberOfPokemon;
} }
filterByForm(pokemon, formChangeItem) { filterByForm(pokemon, formChangeItem) {
if (pokemonFormChanges.hasOwnProperty(pokemon.species.speciesId) if (pokemonFormChanges.hasOwnProperty(pokemon.species.speciesId)
// Get all form changes for this species with an item trigger, including any compound triggers // Get all form changes for this species with an item trigger, including any compound triggers

View File

@ -2,7 +2,7 @@ import i18next from "i18next";
import { BattleType } from "#app/battle"; import { BattleType } from "#app/battle";
import BattleScene from "../../battle-scene"; import BattleScene from "../../battle-scene";
import PokemonSpecies, { getPokemonSpecies, speciesStarters } from "../pokemon-species"; import PokemonSpecies, { getPokemonSpecies, speciesStarters } from "../pokemon-species";
import {MysteryEncounterVariant} from "../mystery-encounter"; import { MysteryEncounterVariant } from "./mystery-encounter";
import { Status, StatusEffect } from "../status-effect"; import { Status, StatusEffect } from "../status-effect";
import { TrainerConfig, trainerConfigs, TrainerSlot } from "../trainer-config"; import { TrainerConfig, trainerConfigs, TrainerSlot } from "../trainer-config";
import Pokemon, { FieldPosition, PlayerPokemon } from "#app/field/pokemon"; import Pokemon, { FieldPosition, PlayerPokemon } from "#app/field/pokemon";
@ -46,7 +46,7 @@ import {biomeLinks} from "#app/data/biomes";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import { PartyOption, PartyUiMode } from "#app/ui/party-ui-handler"; import { PartyOption, PartyUiMode } from "#app/ui/party-ui-handler";
import { OptionSelectConfig, OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; import { OptionSelectConfig, OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler";
import {WIGHT_INCREMENT_ON_SPAWN_MISS} from "#app/data/mystery-encounters/mystery-encounters"; import { WIGHT_INCREMENT_ON_SPAWN_MISS } from "#app/data/mystery-encounters/encounters/mystery-encounters";
import { getTextWithColors, TextStyle } from "#app/ui/text"; import { getTextWithColors, TextStyle } from "#app/ui/text";
import * as Overrides from "#app/overrides"; import * as Overrides from "#app/overrides";
import { UiTheme } from "#enums/ui-theme"; import { UiTheme } from "#enums/ui-theme";

View File

@ -1,18 +1,18 @@
import BattleScene from "../battle-scene"; import BattleScene from "../../battle-scene";
import MysteryEncounterIntroVisuals, { MysteryEncounterSpriteConfig } from "../field/mystery-encounter-intro"; import MysteryEncounterIntroVisuals, { MysteryEncounterSpriteConfig } from "../../field/mystery-encounter-intro";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import MysteryEncounterDialogue, { import MysteryEncounterDialogue, {
allMysteryEncounterDialogue allMysteryEncounterDialogue
} from "./mystery-encounters/dialogue/mystery-encounter-dialogue"; } from "./mystery-encounter-dialogue";
import MysteryEncounterOption from "./mystery-encounter-option"; import MysteryEncounterOption from "./mystery-encounter-option";
import { import {
EncounterPokemonRequirement, EncounterPokemonRequirement,
EncounterSceneRequirement EncounterSceneRequirement
} from "./mystery-encounter-requirements"; } from "./mystery-encounter-requirements";
import * as Utils from "../utils"; import * as Utils from "../../utils";
import { EnemyPartyConfig } from "#app/data/mystery-encounters/mystery-encounter-utils"; import { EnemyPartyConfig } from "#app/data/mystery-encounters/mystery-encounter-utils";
import Pokemon, { PlayerPokemon } from "#app/field/pokemon"; import Pokemon, { PlayerPokemon } from "#app/field/pokemon";
import {isNullOrUndefined} from "../utils"; import { isNullOrUndefined } from "#app/utils";
export enum MysteryEncounterVariant { export enum MysteryEncounterVariant {
DEFAULT, DEFAULT,

View File

@ -1,6 +1,6 @@
import { GameObjects } from "phaser"; import { GameObjects } from "phaser";
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import MysteryEncounter from "../data/mystery-encounter"; import MysteryEncounter from "../data/mystery-encounters/mystery-encounter";
export class MysteryEncounterSpriteConfig { export class MysteryEncounterSpriteConfig {
spriteKey: string; // e.g. "ace_trainer_f" spriteKey: string; // e.g. "ace_trainer_f"

View File

@ -22,8 +22,8 @@ import { initStatsKeys } from "./ui/game-stats-ui-handler";
import { initVouchers } from "./system/voucher"; import { initVouchers } from "./system/voucher";
import { Biome } from "#enums/biome"; import { Biome } from "#enums/biome";
import { TrainerType } from "#enums/trainer-type"; import { TrainerType } from "#enums/trainer-type";
import {initMysteryEncounterDialogue} from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue"; import {initMysteryEncounterDialogue} from "#app/data/mystery-encounters/mystery-encounter-dialogue";
import {initMysteryEncounters} from "#app/data/mystery-encounters/mystery-encounters"; import {initMysteryEncounters} from "#app/data/mystery-encounters/encounters/mystery-encounters";
export class LoadingScene extends SceneBase { export class LoadingScene extends SceneBase {
readonly LOAD_EVENTS = Phaser.Loader.Events; readonly LOAD_EVENTS = Phaser.Loader.Events;

View File

@ -19,7 +19,7 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day"; import { TimeOfDay } from "#enums/time-of-day";
import {MysteryEncounterType} from "#enums/mystery-encounter-type"; // eslint-disable-line @typescript-eslint/no-unused-vars import {MysteryEncounterType} from "#enums/mystery-encounter-type"; // eslint-disable-line @typescript-eslint/no-unused-vars
import {MysteryEncounterTier} from "#app/data/mystery-encounter"; // eslint-disable-line @typescript-eslint/no-unused-vars import {MysteryEncounterTier} from "#app/data/mystery-encounters/mystery-encounter"; // eslint-disable-line @typescript-eslint/no-unused-vars
/** /**
* Overrides for testing different in game situations * Overrides for testing different in game situations

View File

@ -65,7 +65,7 @@ import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type"; import { TrainerType } from "#enums/trainer-type";
import { BattlePhase } from "#app/phases/battle-phase"; import { BattlePhase } from "#app/phases/battle-phase";
import { MysteryEncounterVariant } from "#app/data/mystery-encounter"; import { MysteryEncounterVariant } from "#app/data/mystery-encounters/mystery-encounter";
import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phase"; import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phase";
import { getEncounterText, handleMysteryEncounterVictory } from "#app/data/mystery-encounters/mystery-encounter-utils"; import { getEncounterText, handleMysteryEncounterVictory } from "#app/data/mystery-encounters/mystery-encounter-utils";
import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; import { SelectModifierPhase } from "#app/phases/select-modifier-phase";

View File

@ -6,8 +6,8 @@ import {
getEncounterText getEncounterText
} from "../data/mystery-encounters/mystery-encounter-utils"; } from "../data/mystery-encounters/mystery-encounter-utils";
import { CheckSwitchPhase, NewBattlePhase, PostSummonPhase, ReturnPhase, ScanIvsPhase, SummonPhase, ToggleDoublePositionPhase } from "../phases"; import { CheckSwitchPhase, NewBattlePhase, PostSummonPhase, ReturnPhase, ScanIvsPhase, SummonPhase, ToggleDoublePositionPhase } from "../phases";
import MysteryEncounterOption from "../data/mystery-encounter-option"; import MysteryEncounterOption from "../data/mystery-encounters/mystery-encounter-option";
import { MysteryEncounterVariant } from "../data/mystery-encounter"; import { MysteryEncounterVariant } from "../data/mystery-encounters/mystery-encounter";
import { getCharVariantFromDialogue } from "../data/dialogue"; import { getCharVariantFromDialogue } from "../data/dialogue";
import { TrainerSlot } from "../data/trainer-config"; import { TrainerSlot } from "../data/trainer-config";
import { BattleSpec } from "../enums/battle-spec"; import { BattleSpec } from "../enums/battle-spec";

View File

@ -40,8 +40,8 @@ import { GameDataType } from "#enums/game-data-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { PlayerGender } from "#enums/player-gender"; import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { MysteryEncounterData } from "../data/mystery-encounter-data"; import { MysteryEncounterData } from "../data/mystery-encounters/mystery-encounter-data";
import MysteryEncounter from "../data/mystery-encounter"; import MysteryEncounter from "../data/mystery-encounters/mystery-encounter";
export const defaultStarterSpecies: Species[] = [ export const defaultStarterSpecies: Species[] = [
Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE,

View File

@ -10,7 +10,7 @@ import {initSceneWithoutEncounterPhase} from "#test/utils/gameManagerUtils";
import {Species} from "#enums/species"; import {Species} from "#enums/species";
import BattleScene from "#app/battle-scene"; import BattleScene from "#app/battle-scene";
import {StatusEffect} from "#app/data/status-effect"; import {StatusEffect} from "#app/data/status-effect";
import MysteryEncounter from "#app/data/mystery-encounter"; import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter";
import {MessagePhase} from "#app/phases"; import {MessagePhase} from "#app/phases";
import {getPokemonSpecies, speciesStarters} from "#app/data/pokemon-species"; import {getPokemonSpecies, speciesStarters} from "#app/data/pokemon-species";
import {Type} from "#app/data/type"; import {Type} from "#app/data/type";
@ -277,7 +277,7 @@ describe("Mystery Encounter Utils", () => {
scene.currentBattle.mysteryEncounter.setDialogueToken("test", "value"); scene.currentBattle.mysteryEncounter.setDialogueToken("test", "value");
const result = getEncounterText(scene, "mysteryEncounter:unit_test_dialogue"); const result = getEncounterText(scene, "mysteryEncounter:unit_test_dialogue");
expect(result).toEqual("[color=#f8f8f8][shadow=#6b5a73]valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}[/color][/shadow]"); expect(result).toEqual("valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}");
}); });
it("can perform nested dialogue token injection", () => { it("can perform nested dialogue token injection", () => {
@ -286,7 +286,7 @@ describe("Mystery Encounter Utils", () => {
scene.currentBattle.mysteryEncounter.setDialogueToken("testvalue", "new"); scene.currentBattle.mysteryEncounter.setDialogueToken("testvalue", "new");
const result = getEncounterText(scene, "mysteryEncounter:unit_test_dialogue"); const result = getEncounterText(scene, "mysteryEncounter:unit_test_dialogue");
expect(result).toEqual("[color=#f8f8f8][shadow=#6b5a73]valuevalue new @ec{test1} value @ec{test\\} @ec{test\\} {test}[/color][/shadow]"); expect(result).toEqual("valuevalue new @ec{test1} value @ec{test\\} @ec{test\\} {test}");
}); });
}); });
@ -298,7 +298,7 @@ describe("Mystery Encounter Utils", () => {
const phaseSpy = vi.spyOn(game.scene, "unshiftPhase"); const phaseSpy = vi.spyOn(game.scene, "unshiftPhase");
queueEncounterMessage(scene, "mysteryEncounter:unit_test_dialogue"); queueEncounterMessage(scene, "mysteryEncounter:unit_test_dialogue");
expect(spy).toHaveBeenCalledWith("[color=#f8f8f8][shadow=#6b5a73]valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}[/color][/shadow]", null, true); expect(spy).toHaveBeenCalledWith("valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}", null, true);
expect(phaseSpy).toHaveBeenCalledWith(expect.any(MessagePhase)); expect(phaseSpy).toHaveBeenCalledWith(expect.any(MessagePhase));
}); });
}); });
@ -310,7 +310,7 @@ describe("Mystery Encounter Utils", () => {
const spy = vi.spyOn(game.scene.ui, "showText"); const spy = vi.spyOn(game.scene.ui, "showText");
showEncounterText(scene, "mysteryEncounter:unit_test_dialogue"); showEncounterText(scene, "mysteryEncounter:unit_test_dialogue");
expect(spy).toHaveBeenCalledWith("[color=#f8f8f8][shadow=#6b5a73]valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}[/color][/shadow]", null, expect.any(Function), 0, true); expect(spy).toHaveBeenCalledWith("valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}", null, expect.any(Function), 0, true);
}); });
}); });
@ -321,7 +321,7 @@ describe("Mystery Encounter Utils", () => {
const spy = vi.spyOn(game.scene.ui, "showDialogue"); const spy = vi.spyOn(game.scene.ui, "showDialogue");
showEncounterDialogue(scene, "mysteryEncounter:unit_test_dialogue", "mysteryEncounter:unit_test_dialogue"); showEncounterDialogue(scene, "mysteryEncounter:unit_test_dialogue", "mysteryEncounter:unit_test_dialogue");
expect(spy).toHaveBeenCalledWith("[color=#f8f8f8][shadow=#6b5a73]valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}[/color][/shadow]", "[color=#f8f8f8][shadow=#6b5a73]valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}[/color][/shadow]", null, undefined, 0, 0); expect(spy).toHaveBeenCalledWith("valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}", "valuevalue @ec{testvalue} @ec{test1} value @ec{test\\} @ec{test\\} {test}", null, undefined, 0, 0);
}); });
}); });

View File

@ -8,7 +8,7 @@ import {Mode} from "#app/ui/ui";
import {Button} from "#enums/buttons"; import {Button} from "#enums/buttons";
import MysteryEncounterUiHandler from "#app/ui/mystery-encounter-ui-handler"; import MysteryEncounterUiHandler from "#app/ui/mystery-encounter-ui-handler";
import {MysteryEncounterType} from "#enums/mystery-encounter-type"; import {MysteryEncounterType} from "#enums/mystery-encounter-type";
import {MysteryEncounterTier} from "#app/data/mystery-encounter"; import {MysteryEncounterTier} from "#app/data/mystery-encounters/mystery-encounter";
describe("Mystery Encounter Phases", () => { describe("Mystery Encounter Phases", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -89,8 +89,8 @@ describe("Mystery Encounter Phases", () => {
expect(dialogueSpy).toHaveBeenCalledTimes(1); expect(dialogueSpy).toHaveBeenCalledTimes(1);
expect(messageSpy).toHaveBeenCalledTimes(2); expect(messageSpy).toHaveBeenCalledTimes(2);
expect(dialogueSpy).toHaveBeenCalledWith("What's this?", "???", null, expect.any(Function)); expect(dialogueSpy).toHaveBeenCalledWith("What's this?", "???", null, expect.any(Function));
expect(messageSpy).toHaveBeenCalledWith("[color=#f8f8f8][shadow=#6b5a73]Mysterious challengers have appeared![/color][/shadow]", null, expect.any(Function), 750, true); expect(messageSpy).toHaveBeenCalledWith("Mysterious challengers have appeared!", null, expect.any(Function), 750, true);
expect(messageSpy).toHaveBeenCalledWith("[color=#f8f8f8][shadow=#6b5a73]The trainer steps forward...[/color][/shadow]", null, expect.any(Function), 750, true); expect(messageSpy).toHaveBeenCalledWith("The trainer steps forward...", null, expect.any(Function), 750, true);
}); });
}); });

View File

@ -6,7 +6,7 @@ import {Button} from "#enums/buttons";
import {addWindow, WindowVariant} from "./ui-theme"; import {addWindow, WindowVariant} from "./ui-theme";
import {MysteryEncounterPhase} from "../phases/mystery-encounter-phase"; import {MysteryEncounterPhase} from "../phases/mystery-encounter-phase";
import {PartyUiMode} from "./party-ui-handler"; import {PartyUiMode} from "./party-ui-handler";
import MysteryEncounterOption from "../data/mystery-encounter-option"; import MysteryEncounterOption from "../data/mystery-encounters/mystery-encounter-option";
import * as Utils from "../utils"; import * as Utils from "../utils";
import {isNullOrUndefined} from "../utils"; import {isNullOrUndefined} from "../utils";
import {getPokeballAtlasKey} from "../data/pokeball"; import {getPokeballAtlasKey} from "../data/pokeball";