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 = {
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 = {
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 = {
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 = {
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 = {
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 = {
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 = {
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 = {
intro: [

View File

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

View File

@ -1,4 +1,4 @@
import BattleScene from "../../battle-scene";
import BattleScene from "../../../battle-scene";
import {
leaveEncounterWithoutBattle, setEncounterExp,
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 {
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 { modifierTypes } from "#app/modifier/modifier-type";
import { EnemyPartyConfig, initBattleWithEnemyConfig, setEncounterRewards } from "#app/data/mystery-encounters/mystery-encounter-utils";
@ -12,7 +12,7 @@ import {
TrainerPartyTemplate,
trainerPartyTemplates
} from "#app/data/trainer-config";
import * as Utils from "../../utils";
import * as Utils from "../../../utils";
import { PartyMemberStrength } from "#enums/party-member-strength";
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 {
getHighestLevelPlayerPokemon,

View File

@ -2,13 +2,13 @@ import MysteryEncounter from "../mystery-encounter";
import { DarkDealEncounter } from "./dark-deal";
import { MysteriousChallengersEncounter } from "./mysterious-challengers";
import { MysteriousChestEncounter } from "./mysterious-chest";
import {FightOrFlightEncounter} from "#app/data/mystery-encounters/fight-or-flight";
import {TrainingSessionEncounter} from "#app/data/mystery-encounters/training-session";
import { Biome } from "#app/enums/biome";
import { FightOrFlightEncounter } from "#app/data/mystery-encounters/encounters/fight-or-flight";
import { TrainingSessionEncounter } from "#app/data/mystery-encounters/encounters/training-session";
import { Biome } from "#enums/biome";
import { SleepingSnorlaxEncounter } from "./sleeping-snorlax";
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import {DepartmentStoreSaleEncounter} from "#app/data/mystery-encounters/department-store-sale";
import {ShadyVitaminDealerEncounter} from "#app/data/mystery-encounters/shady-vitamin-dealer";
import { DepartmentStoreSaleEncounter } from "#app/data/mystery-encounters/encounters/department-store-sale";
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
export const BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT = 1;
@ -40,90 +40,50 @@ export const mysteryEncountersByBiome = new Map<Biome, MysteryEncounterType[]>([
MysteryEncounterType.SLEEPING_SNORLAX
]],
[Biome.SEA, [
]],
[Biome.SWAMP, [
]],
[Biome.SEA, []],
[Biome.SWAMP, []],
[Biome.BEACH, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.LAKE, [
]],
[Biome.SEABED, [
]],
[Biome.LAKE, []],
[Biome.SEABED, []],
[Biome.MOUNTAIN, [
MysteryEncounterType.SLEEPING_SNORLAX
]],
[Biome.BADLANDS, [
]],
[Biome.BADLANDS, []],
[Biome.CAVE, [
MysteryEncounterType.SLEEPING_SNORLAX
]],
[Biome.DESERT, [
]],
[Biome.ICE_CAVE, [
]],
[Biome.DESERT, []],
[Biome.ICE_CAVE, []],
[Biome.MEADOW, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.POWER_PLANT, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.VOLCANO, [
]],
[Biome.GRAVEYARD, [
]],
[Biome.DOJO, [
]],
[Biome.VOLCANO, []],
[Biome.GRAVEYARD, []],
[Biome.DOJO, []],
[Biome.FACTORY, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.RUINS, [
]],
[Biome.WASTELAND, [
]],
[Biome.ABYSS, [
]],
[Biome.SPACE, [
]],
[Biome.RUINS, []],
[Biome.WASTELAND, []],
[Biome.ABYSS, []],
[Biome.SPACE, []],
[Biome.CONSTRUCTION_SITE, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.JUNGLE, [
]],
[Biome.FAIRY_CAVE, [
]],
[Biome.TEMPLE, [
]],
[Biome.JUNGLE, []],
[Biome.FAIRY_CAVE, []],
[Biome.TEMPLE, []],
[Biome.SLUM, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.SNOWY_FOREST, [
]],
[Biome.ISLAND, [
]],
[Biome.LABORATORY, [
]]
[Biome.SNOWY_FOREST, []],
[Biome.ISLAND, []],
[Biome.LABORATORY, []]
]);
// 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 {
generateModifierType,
leaveEncounterWithoutBattle,

View File

@ -1,13 +1,13 @@
import BattleScene from "../../battle-scene";
import BattleScene from "../../../battle-scene";
import {
EnemyPartyConfig,
EnemyPokemonConfig, generateModifierType,
initBattleWithEnemyConfig,
leaveEncounterWithoutBattle, queueEncounterMessage,
setEncounterRewards
} from "./mystery-encounter-utils";
} from "../mystery-encounter-utils";
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 { MoveRequirement, WaveCountRequirement } from "../mystery-encounter-requirements";
import { MysteryEncounterOptionBuilder } from "../mystery-encounter-option";
@ -15,9 +15,9 @@ import {
ModifierTypeOption,
modifierTypes
} from "#app/modifier/modifier-type";
import { getPokemonSpecies } from "../pokemon-species";
import { getPokemonSpecies } from "../../pokemon-species";
import { Species } from "#enums/species";
import { Status, StatusEffect } from "../status-effect";
import { Status, StatusEffect } from "../../status-effect";
import { Moves } from "#enums/moves";
import { BerryType } from "#enums/berry-type";

View File

@ -1,4 +1,4 @@
import BattleScene from "../../battle-scene";
import BattleScene from "../../../battle-scene";
import {
EnemyPartyConfig,
getEncounterText,
@ -302,5 +302,6 @@ function getEnemyConfig(scene: BattleScene, playerPokemon: PlayerPokemon, segmen
class ModifiersHolder {
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 {BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT} from "#app/data/mystery-encounters/mystery-encounters";
import {isNullOrUndefined} from "../utils";
import { BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT } from "#app/data/mystery-encounters/encounters/mystery-encounters";
import { isNullOrUndefined } from "#app/utils";
export class MysteryEncounterData {
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 { FightOrFlightDialogue } from "#app/data/mystery-encounters/dialogue/fight-or-flight-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 { ShadyVitaminDealerDialogue } from "#app/data/mystery-encounters/dialogue/shady-vitamin-dealer";
import { TextStyle } from "#app/ui/text";

View File

@ -1,8 +1,8 @@
import { PlayerPokemon } from "#app/field/pokemon";
import * as Utils from "../utils";
import BattleScene from "../battle-scene";
import * as Utils from "../../utils";
import BattleScene from "../../battle-scene";
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 {
requirements?: EncounterSceneRequirement[];
@ -37,6 +37,7 @@ export default class MysteryEncounterOption implements MysteryEncounterOption {
this.meetsPrimaryRequirementAndPrimaryPokemonSelected(scene) &&
this.meetsSupportingRequirementAndSupportingPokemonSelected(scene);
}
meetsPrimaryRequirementAndPrimaryPokemonSelected?(scene: BattleScene) {
if (!this.primaryPokemonRequirements) {
return true;

View File

@ -1,18 +1,18 @@
import { PlayerPokemon } from "#app/field/pokemon";
import { ModifierType, PokemonHeldItemModifierType } from "#app/modifier/modifier-type";
import BattleScene from "../battle-scene";
import {isNullOrUndefined} from "../utils";
import BattleScene from "../../battle-scene";
import { isNullOrUndefined } from "#app/utils";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day";
import {Nature} from "./nature";
import {EvolutionItem, pokemonEvolutions} from "./pokemon-evolutions";
import {FormChangeItem, pokemonFormChanges, SpeciesFormChangeItemTrigger} from "./pokemon-forms";
import {SpeciesFormKey} from "./pokemon-species";
import {StatusEffect} from "./status-effect";
import {Type} from "./type";
import {WeatherType} from "./weather";
import { Nature } from "../nature";
import { EvolutionItem, pokemonEvolutions } from "../pokemon-evolutions";
import { FormChangeItem, pokemonFormChanges, SpeciesFormChangeItemTrigger } from "../pokemon-forms";
import { SpeciesFormKey } from "../pokemon-species";
import { StatusEffect } from "../status-effect";
import { Type } from "../type";
import { WeatherType } from "../weather";
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
export interface EncounterRequirement {
@ -147,6 +147,7 @@ export class WeatherRequirement extends EncounterSceneRequirement {
return true;
}
getDialogueToken(scene: BattleScene, pokemon?: PlayerPokemon): [string, string] {
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;
}
filterByForm(pokemon, formChangeItem) {
if (pokemonFormChanges.hasOwnProperty(pokemon.species.speciesId)
// 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 BattleScene from "../../battle-scene";
import PokemonSpecies, { getPokemonSpecies, speciesStarters } from "../pokemon-species";
import {MysteryEncounterVariant} from "../mystery-encounter";
import { MysteryEncounterVariant } from "./mystery-encounter";
import { Status, StatusEffect } from "../status-effect";
import { TrainerConfig, trainerConfigs, TrainerSlot } from "../trainer-config";
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 { PartyOption, PartyUiMode } from "#app/ui/party-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 * as Overrides from "#app/overrides";
import { UiTheme } from "#enums/ui-theme";

View File

@ -1,18 +1,18 @@
import BattleScene from "../battle-scene";
import MysteryEncounterIntroVisuals, { MysteryEncounterSpriteConfig } from "../field/mystery-encounter-intro";
import BattleScene from "../../battle-scene";
import MysteryEncounterIntroVisuals, { MysteryEncounterSpriteConfig } from "../../field/mystery-encounter-intro";
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import MysteryEncounterDialogue, {
allMysteryEncounterDialogue
} from "./mystery-encounters/dialogue/mystery-encounter-dialogue";
} from "./mystery-encounter-dialogue";
import MysteryEncounterOption from "./mystery-encounter-option";
import {
EncounterPokemonRequirement,
EncounterSceneRequirement
} 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 Pokemon, { PlayerPokemon } from "#app/field/pokemon";
import {isNullOrUndefined} from "../utils";
import { isNullOrUndefined } from "#app/utils";
export enum MysteryEncounterVariant {
DEFAULT,

View File

@ -1,6 +1,6 @@
import { GameObjects } from "phaser";
import BattleScene from "../battle-scene";
import MysteryEncounter from "../data/mystery-encounter";
import MysteryEncounter from "../data/mystery-encounters/mystery-encounter";
export class MysteryEncounterSpriteConfig {
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 { Biome } from "#enums/biome";
import { TrainerType } from "#enums/trainer-type";
import {initMysteryEncounterDialogue} from "#app/data/mystery-encounters/dialogue/mystery-encounter-dialogue";
import {initMysteryEncounters} from "#app/data/mystery-encounters/mystery-encounters";
import {initMysteryEncounterDialogue} from "#app/data/mystery-encounters/mystery-encounter-dialogue";
import {initMysteryEncounters} from "#app/data/mystery-encounters/encounters/mystery-encounters";
export class LoadingScene extends SceneBase {
readonly LOAD_EVENTS = Phaser.Loader.Events;

View File

@ -19,7 +19,7 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day";
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

View File

@ -65,7 +65,7 @@ import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type";
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 { getEncounterText, handleMysteryEncounterVictory } from "#app/data/mystery-encounters/mystery-encounter-utils";
import { SelectModifierPhase } from "#app/phases/select-modifier-phase";

View File

@ -6,8 +6,8 @@ import {
getEncounterText
} from "../data/mystery-encounters/mystery-encounter-utils";
import { CheckSwitchPhase, NewBattlePhase, PostSummonPhase, ReturnPhase, ScanIvsPhase, SummonPhase, ToggleDoublePositionPhase } from "../phases";
import MysteryEncounterOption from "../data/mystery-encounter-option";
import { MysteryEncounterVariant } from "../data/mystery-encounter";
import MysteryEncounterOption from "../data/mystery-encounters/mystery-encounter-option";
import { MysteryEncounterVariant } from "../data/mystery-encounters/mystery-encounter";
import { getCharVariantFromDialogue } from "../data/dialogue";
import { TrainerSlot } from "../data/trainer-config";
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 { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import { MysteryEncounterData } from "../data/mystery-encounter-data";
import MysteryEncounter from "../data/mystery-encounter";
import { MysteryEncounterData } from "../data/mystery-encounters/mystery-encounter-data";
import MysteryEncounter from "../data/mystery-encounters/mystery-encounter";
export const defaultStarterSpecies: Species[] = [
Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE,

View File

@ -10,7 +10,7 @@ import {initSceneWithoutEncounterPhase} from "#test/utils/gameManagerUtils";
import {Species} from "#enums/species";
import BattleScene from "#app/battle-scene";
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 {getPokemonSpecies, speciesStarters} from "#app/data/pokemon-species";
import {Type} from "#app/data/type";
@ -277,7 +277,7 @@ describe("Mystery Encounter Utils", () => {
scene.currentBattle.mysteryEncounter.setDialogueToken("test", "value");
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", () => {
@ -286,7 +286,7 @@ describe("Mystery Encounter Utils", () => {
scene.currentBattle.mysteryEncounter.setDialogueToken("testvalue", "new");
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");
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));
});
});
@ -310,7 +310,7 @@ describe("Mystery Encounter Utils", () => {
const spy = vi.spyOn(game.scene.ui, "showText");
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");
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 MysteryEncounterUiHandler from "#app/ui/mystery-encounter-ui-handler";
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", () => {
let phaserGame: Phaser.Game;
@ -89,8 +89,8 @@ describe("Mystery Encounter Phases", () => {
expect(dialogueSpy).toHaveBeenCalledTimes(1);
expect(messageSpy).toHaveBeenCalledTimes(2);
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("[color=#f8f8f8][shadow=#6b5a73]The trainer steps forward...[/color][/shadow]", null, expect.any(Function), 750, true);
expect(messageSpy).toHaveBeenCalledWith("Mysterious challengers have appeared!", 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 {MysteryEncounterPhase} from "../phases/mystery-encounter-phase";
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 {isNullOrUndefined} from "../utils";
import {getPokeballAtlasKey} from "../data/pokeball";