Compare commits

..

1 Commits

Author SHA1 Message Date
fabske0
04892b83b2
Merge 111f661170 into 907e3c8208 2025-08-12 21:09:37 +00:00
8 changed files with 402 additions and 392 deletions

View File

@ -1,24 +1,13 @@
import type { Pokemon } from "#field/pokemon";
import type { import type {
AttackMove, AttackMove,
ChargingAttackMove, ChargingAttackMove,
ChargingSelfStatusMove, ChargingSelfStatusMove,
Move,
MoveAttr, MoveAttr,
MoveAttrConstructorMap, MoveAttrConstructorMap,
SelfStatusMove, SelfStatusMove,
StatusMove, StatusMove,
} from "#moves/move"; } from "#moves/move";
/**
* A generic function producing a message during a Move's execution.
* @param user - The {@linkcode Pokemon} using the move
* @param target - The {@linkcode Pokemon} targeted by the move
* @param move - The {@linkcode Move} being used
* @returns a string
*/
export type MoveMessageFunc = (user: Pokemon, target: Pokemon, move: Move) => string;
export type MoveAttrFilter = (attr: MoveAttr) => boolean; export type MoveAttrFilter = (attr: MoveAttr) => boolean;
export type * from "#moves/move"; export type * from "#moves/move";

View File

@ -1670,7 +1670,6 @@ export class MoveTypeChangeAbAttr extends PreAttackAbAttr {
constructor( constructor(
private newType: PokemonType, private newType: PokemonType,
private powerMultiplier: number, private powerMultiplier: number,
// TODO: all moves with this attr solely check the move being used...
private condition?: PokemonAttackCondition, private condition?: PokemonAttackCondition,
) { ) {
super(false); super(false);

View File

@ -85,16 +85,20 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
}, },
{ {
encounter: [ encounter: [
"dialogue:breederFemale.encounter.1", "dialogue:breeder_female.encounter.1",
"dialogue:breederFemale.encounter.2", "dialogue:breeder_female.encounter.2",
"dialogue:breederFemale.encounter.3", "dialogue:breeder_female.encounter.3",
], ],
victory: [ victory: [
"dialogue:breederFemale.victory.1", "dialogue:breeder_female.victory.1",
"dialogue:breederFemale.victory.2", "dialogue:breeder_female.victory.2",
"dialogue:breederFemale.victory.3", "dialogue:breeder_female.victory.3",
],
defeat: [
"dialogue:breeder_female.defeat.1",
"dialogue:breeder_female.defeat.2",
"dialogue:breeder_female.defeat.3",
], ],
defeat: ["dialogue:breederFemale.defeat.1", "dialogue:breederFemale.defeat.2", "dialogue:breederFemale.defeat.3"],
}, },
], ],
[TrainerType.FISHERMAN]: [ [TrainerType.FISHERMAN]: [
@ -104,14 +108,14 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
}, },
{ {
encounter: [ encounter: [
"dialogue:fishermanFemale.encounter.1", "dialogue:fisherman_female.encounter.1",
"dialogue:fishermanFemale.encounter.2", "dialogue:fisherman_female.encounter.2",
"dialogue:fishermanFemale.encounter.3", "dialogue:fisherman_female.encounter.3",
], ],
victory: [ victory: [
"dialogue:fishermanFemale.victory.1", "dialogue:fisherman_female.victory.1",
"dialogue:fishermanFemale.victory.2", "dialogue:fisherman_female.victory.2",
"dialogue:fishermanFemale.victory.3", "dialogue:fisherman_female.victory.3",
], ],
}, },
], ],
@ -140,29 +144,29 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.ACE_TRAINER]: [ [TrainerType.ACE_TRAINER]: [
{ {
encounter: [ encounter: [
"dialogue:aceTrainer.encounter.1", "dialogue:ace_trainer.encounter.1",
"dialogue:aceTrainer.encounter.2", "dialogue:ace_trainer.encounter.2",
"dialogue:aceTrainer.encounter.3", "dialogue:ace_trainer.encounter.3",
"dialogue:aceTrainer.encounter.4", "dialogue:ace_trainer.encounter.4",
], ],
victory: [ victory: [
"dialogue:aceTrainer.victory.1", "dialogue:ace_trainer.victory.1",
"dialogue:aceTrainer.victory.2", "dialogue:ace_trainer.victory.2",
"dialogue:aceTrainer.victory.3", "dialogue:ace_trainer.victory.3",
"dialogue:aceTrainer.victory.4", "dialogue:ace_trainer.victory.4",
], ],
defeat: [ defeat: [
"dialogue:aceTrainer.defeat.1", "dialogue:ace_trainer.defeat.1",
"dialogue:aceTrainer.defeat.2", "dialogue:ace_trainer.defeat.2",
"dialogue:aceTrainer.defeat.3", "dialogue:ace_trainer.defeat.3",
"dialogue:aceTrainer.defeat.4", "dialogue:ace_trainer.defeat.4",
], ],
}, },
], ],
[TrainerType.PARASOL_LADY]: [ [TrainerType.PARASOL_LADY]: [
{ {
encounter: ["dialogue:parasolLady.encounter.1"], encounter: ["dialogue:parasol_lady.encounter.1"],
victory: ["dialogue:parasolLady.victory.1"], victory: ["dialogue:parasol_lady.victory.1"],
}, },
], ],
[TrainerType.TWINS]: [ [TrainerType.TWINS]: [
@ -180,13 +184,13 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
], ],
[TrainerType.BLACK_BELT]: [ [TrainerType.BLACK_BELT]: [
{ {
encounter: ["dialogue:blackBelt.encounter.1", "dialogue:blackBelt.encounter.2"], encounter: ["dialogue:black_belt.encounter.1", "dialogue:black_belt.encounter.2"],
victory: ["dialogue:blackBelt.victory.1", "dialogue:blackBelt.victory.2"], victory: ["dialogue:black_belt.victory.1", "dialogue:black_belt.victory.2"],
}, },
//BATTLE GIRL //BATTLE GIRL
{ {
encounter: ["dialogue:battleGirl.encounter.1"], encounter: ["dialogue:battle_girl.encounter.1"],
victory: ["dialogue:battleGirl.victory.1"], victory: ["dialogue:battle_girl.victory.1"],
}, },
], ],
[TrainerType.HIKER]: [ [TrainerType.HIKER]: [
@ -210,8 +214,8 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
], ],
[TrainerType.SCHOOL_KID]: [ [TrainerType.SCHOOL_KID]: [
{ {
encounter: ["dialogue:schoolKid.encounter.1", "dialogue:schoolKid.encounter.2"], encounter: ["dialogue:school_kid.encounter.1", "dialogue:school_kid.encounter.2"],
victory: ["dialogue:schoolKid.victory.1", "dialogue:schoolKid.victory.2"], victory: ["dialogue:school_kid.victory.1", "dialogue:school_kid.victory.2"],
}, },
], ],
[TrainerType.ARTIST]: [ [TrainerType.ARTIST]: [
@ -232,31 +236,31 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
victory: ["dialogue:worker.victory.1"], victory: ["dialogue:worker.victory.1"],
}, },
{ {
encounter: ["dialogue:workerFemale.encounter.1"], encounter: ["dialogue:worker_female.encounter.1"],
victory: ["dialogue:workerFemale.victory.1"], victory: ["dialogue:worker_female.victory.1"],
defeat: ["dialogue:workerFemale.defeat.1"], defeat: ["dialogue:worker_female.defeat.1"],
}, },
{ {
encounter: ["dialogue:workerDouble.encounter.1"], encounter: ["dialogue:worker_double.encounter.1"],
victory: ["dialogue:workerDouble.victory.1"], victory: ["dialogue:worker_double.victory.1"],
}, },
], ],
// Defeat dialogue in the language .JSONS exist as translated or placeholders; (en, fr, it, es, de, ja, ko, zh_cn, zh_tw, pt_br) // Defeat dialogue in the language .JSONS exist as translated or placeholders; (en, fr, it, es, de, ja, ko, zh_cn, zh_tw, pt_br)
[TrainerType.SNOW_WORKER]: [ [TrainerType.SNOW_WORKER]: [
{ {
encounter: ["dialogue:snowWorker.encounter.1"], encounter: ["dialogue:snow_worker.encounter.1"],
victory: ["dialogue:snowWorker.victory.1"], victory: ["dialogue:snow_worker.victory.1"],
}, },
{ {
encounter: ["dialogue:snowWorkerDouble.encounter.1"], encounter: ["dialogue:snow_worker_double.encounter.1"],
victory: ["dialogue:snowWorkerDouble.victory.1"], victory: ["dialogue:snow_worker_double.victory.1"],
}, },
], ],
[TrainerType.HEX_MANIAC]: [ [TrainerType.HEX_MANIAC]: [
{ {
encounter: ["dialogue:hexManiac.encounter.1", "dialogue:hexManiac.encounter.2"], encounter: ["dialogue:hex_maniac.encounter.1", "dialogue:hex_maniac.encounter.2"],
victory: ["dialogue:hexManiac.victory.1", "dialogue:hexManiac.victory.2"], victory: ["dialogue:hex_maniac.victory.1", "dialogue:hex_maniac.victory.2"],
defeat: ["dialogue:hexManiac.defeat.1", "dialogue:hexManiac.defeat.2"], defeat: ["dialogue:hex_maniac.defeat.1", "dialogue:hex_maniac.defeat.2"],
}, },
], ],
[TrainerType.PSYCHIC]: [ [TrainerType.PSYCHIC]: [
@ -316,11 +320,15 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
}, },
{ {
encounter: [ encounter: [
"dialogue:clerkFemale.encounter.1", "dialogue:clerk_female.encounter.1",
"dialogue:clerkFemale.encounter.2", "dialogue:clerk_female.encounter.2",
"dialogue:clerkFemale.encounter.3", "dialogue:clerk_female.encounter.3",
],
victory: [
"dialogue:clerk_female.victory.1",
"dialogue:clerk_female.victory.2",
"dialogue:clerk_female.victory.3",
], ],
victory: ["dialogue:clerkFemale.victory.1", "dialogue:clerkFemale.victory.2", "dialogue:clerkFemale.victory.3"],
}, },
], ],
[TrainerType.HOOLIGANS]: [ [TrainerType.HOOLIGANS]: [
@ -363,14 +371,14 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
}, },
{ {
encounter: [ encounter: [
"dialogue:pokefanFemale.encounter.1", "dialogue:pokefan_female.encounter.1",
"dialogue:pokefanFemale.encounter.2", "dialogue:pokefan_female.encounter.2",
"dialogue:pokefanFemale.encounter.3", "dialogue:pokefan_female.encounter.3",
], ],
victory: [ victory: [
"dialogue:pokefanFemale.victory.1", "dialogue:pokefan_female.victory.1",
"dialogue:pokefanFemale.victory.2", "dialogue:pokefan_female.victory.2",
"dialogue:pokefanFemale.victory.3", "dialogue:pokefan_female.victory.3",
], ],
}, },
], ],
@ -381,52 +389,52 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
}, },
{ {
encounter: [ encounter: [
"dialogue:richFemale.encounter.1", "dialogue:rich_female.encounter.1",
"dialogue:richFemale.encounter.2", "dialogue:rich_female.encounter.2",
"dialogue:richFemale.encounter.3", "dialogue:rich_female.encounter.3",
], ],
victory: ["dialogue:richFemale.victory.1", "dialogue:richFemale.victory.2", "dialogue:richFemale.victory.3"], victory: ["dialogue:rich_female.victory.1", "dialogue:rich_female.victory.2", "dialogue:rich_female.victory.3"],
}, },
], ],
[TrainerType.RICH_KID]: [ [TrainerType.RICH_KID]: [
{ {
encounter: ["dialogue:richKid.encounter.1", "dialogue:richKid.encounter.2", "dialogue:richKid.encounter.3"], encounter: ["dialogue:rich_kid.encounter.1", "dialogue:rich_kid.encounter.2", "dialogue:rich_kid.encounter.3"],
victory: [ victory: [
"dialogue:richKid.victory.1", "dialogue:rich_kid.victory.1",
"dialogue:richKid.victory.2", "dialogue:rich_kid.victory.2",
"dialogue:richKid.victory.3", "dialogue:rich_kid.victory.3",
"dialogue:richKid.victory.4", "dialogue:rich_kid.victory.4",
], ],
}, },
{ {
encounter: [ encounter: [
"dialogue:richKidFemale.encounter.1", "dialogue:rich_kid_female.encounter.1",
"dialogue:richKidFemale.encounter.2", "dialogue:rich_kid_female.encounter.2",
"dialogue:richKidFemale.encounter.3", "dialogue:rich_kid_female.encounter.3",
], ],
victory: [ victory: [
"dialogue:richKidFemale.victory.1", "dialogue:rich_kid_female.victory.1",
"dialogue:richKidFemale.victory.2", "dialogue:rich_kid_female.victory.2",
"dialogue:richKidFemale.victory.3", "dialogue:rich_kid_female.victory.3",
"dialogue:richKidFemale.victory.4", "dialogue:rich_kid_female.victory.4",
], ],
}, },
], ],
[TrainerType.ROCKET_GRUNT]: [ [TrainerType.ROCKET_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:rocketGrunt.encounter.1", "dialogue:rocket_grunt.encounter.1",
"dialogue:rocketGrunt.encounter.2", "dialogue:rocket_grunt.encounter.2",
"dialogue:rocketGrunt.encounter.3", "dialogue:rocket_grunt.encounter.3",
"dialogue:rocketGrunt.encounter.4", "dialogue:rocket_grunt.encounter.4",
"dialogue:rocketGrunt.encounter.5", "dialogue:rocket_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:rocketGrunt.victory.1", "dialogue:rocket_grunt.victory.1",
"dialogue:rocketGrunt.victory.2", "dialogue:rocket_grunt.victory.2",
"dialogue:rocketGrunt.victory.3", "dialogue:rocket_grunt.victory.3",
"dialogue:rocketGrunt.victory.4", "dialogue:rocket_grunt.victory.4",
"dialogue:rocketGrunt.victory.5", "dialogue:rocket_grunt.victory.5",
], ],
}, },
], ],
@ -457,18 +465,18 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.MAGMA_GRUNT]: [ [TrainerType.MAGMA_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:magmaGrunt.encounter.1", "dialogue:magma_grunt.encounter.1",
"dialogue:magmaGrunt.encounter.2", "dialogue:magma_grunt.encounter.2",
"dialogue:magmaGrunt.encounter.3", "dialogue:magma_grunt.encounter.3",
"dialogue:magmaGrunt.encounter.4", "dialogue:magma_grunt.encounter.4",
"dialogue:magmaGrunt.encounter.5", "dialogue:magma_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:magmaGrunt.victory.1", "dialogue:magma_grunt.victory.1",
"dialogue:magmaGrunt.victory.2", "dialogue:magma_grunt.victory.2",
"dialogue:magmaGrunt.victory.3", "dialogue:magma_grunt.victory.3",
"dialogue:magmaGrunt.victory.4", "dialogue:magma_grunt.victory.4",
"dialogue:magmaGrunt.victory.5", "dialogue:magma_grunt.victory.5",
], ],
}, },
], ],
@ -487,18 +495,18 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.AQUA_GRUNT]: [ [TrainerType.AQUA_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:aquaGrunt.encounter.1", "dialogue:aqua_grunt.encounter.1",
"dialogue:aquaGrunt.encounter.2", "dialogue:aqua_grunt.encounter.2",
"dialogue:aquaGrunt.encounter.3", "dialogue:aqua_grunt.encounter.3",
"dialogue:aquaGrunt.encounter.4", "dialogue:aqua_grunt.encounter.4",
"dialogue:aquaGrunt.encounter.5", "dialogue:aqua_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:aquaGrunt.victory.1", "dialogue:aqua_grunt.victory.1",
"dialogue:aquaGrunt.victory.2", "dialogue:aqua_grunt.victory.2",
"dialogue:aquaGrunt.victory.3", "dialogue:aqua_grunt.victory.3",
"dialogue:aquaGrunt.victory.4", "dialogue:aqua_grunt.victory.4",
"dialogue:aquaGrunt.victory.5", "dialogue:aqua_grunt.victory.5",
], ],
}, },
], ],
@ -517,18 +525,18 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.GALACTIC_GRUNT]: [ [TrainerType.GALACTIC_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:galacticGrunt.encounter.1", "dialogue:galactic_grunt.encounter.1",
"dialogue:galacticGrunt.encounter.2", "dialogue:galactic_grunt.encounter.2",
"dialogue:galacticGrunt.encounter.3", "dialogue:galactic_grunt.encounter.3",
"dialogue:galacticGrunt.encounter.4", "dialogue:galactic_grunt.encounter.4",
"dialogue:galacticGrunt.encounter.5", "dialogue:galactic_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:galacticGrunt.victory.1", "dialogue:galactic_grunt.victory.1",
"dialogue:galacticGrunt.victory.2", "dialogue:galactic_grunt.victory.2",
"dialogue:galacticGrunt.victory.3", "dialogue:galactic_grunt.victory.3",
"dialogue:galacticGrunt.victory.4", "dialogue:galactic_grunt.victory.4",
"dialogue:galacticGrunt.victory.5", "dialogue:galactic_grunt.victory.5",
], ],
}, },
], ],
@ -553,18 +561,18 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.PLASMA_GRUNT]: [ [TrainerType.PLASMA_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:plasmaGrunt.encounter.1", "dialogue:plasma_grunt.encounter.1",
"dialogue:plasmaGrunt.encounter.2", "dialogue:plasma_grunt.encounter.2",
"dialogue:plasmaGrunt.encounter.3", "dialogue:plasma_grunt.encounter.3",
"dialogue:plasmaGrunt.encounter.4", "dialogue:plasma_grunt.encounter.4",
"dialogue:plasmaGrunt.encounter.5", "dialogue:plasma_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:plasmaGrunt.victory.1", "dialogue:plasma_grunt.victory.1",
"dialogue:plasmaGrunt.victory.2", "dialogue:plasma_grunt.victory.2",
"dialogue:plasmaGrunt.victory.3", "dialogue:plasma_grunt.victory.3",
"dialogue:plasmaGrunt.victory.4", "dialogue:plasma_grunt.victory.4",
"dialogue:plasmaGrunt.victory.5", "dialogue:plasma_grunt.victory.5",
], ],
}, },
], ],
@ -583,18 +591,18 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.FLARE_GRUNT]: [ [TrainerType.FLARE_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:flareGrunt.encounter.1", "dialogue:flare_grunt.encounter.1",
"dialogue:flareGrunt.encounter.2", "dialogue:flare_grunt.encounter.2",
"dialogue:flareGrunt.encounter.3", "dialogue:flare_grunt.encounter.3",
"dialogue:flareGrunt.encounter.4", "dialogue:flare_grunt.encounter.4",
"dialogue:flareGrunt.encounter.5", "dialogue:flare_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:flareGrunt.victory.1", "dialogue:flare_grunt.victory.1",
"dialogue:flareGrunt.victory.2", "dialogue:flare_grunt.victory.2",
"dialogue:flareGrunt.victory.3", "dialogue:flare_grunt.victory.3",
"dialogue:flareGrunt.victory.4", "dialogue:flare_grunt.victory.4",
"dialogue:flareGrunt.victory.5", "dialogue:flare_grunt.victory.5",
], ],
}, },
], ],
@ -613,18 +621,18 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.AETHER_GRUNT]: [ [TrainerType.AETHER_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:aetherGrunt.encounter.1", "dialogue:aether_grunt.encounter.1",
"dialogue:aetherGrunt.encounter.2", "dialogue:aether_grunt.encounter.2",
"dialogue:aetherGrunt.encounter.3", "dialogue:aether_grunt.encounter.3",
"dialogue:aetherGrunt.encounter.4", "dialogue:aether_grunt.encounter.4",
"dialogue:aetherGrunt.encounter.5", "dialogue:aether_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:aetherGrunt.victory.1", "dialogue:aether_grunt.victory.1",
"dialogue:aetherGrunt.victory.2", "dialogue:aether_grunt.victory.2",
"dialogue:aetherGrunt.victory.3", "dialogue:aether_grunt.victory.3",
"dialogue:aetherGrunt.victory.4", "dialogue:aether_grunt.victory.4",
"dialogue:aetherGrunt.victory.5", "dialogue:aether_grunt.victory.5",
], ],
}, },
], ],
@ -637,18 +645,18 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.SKULL_GRUNT]: [ [TrainerType.SKULL_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:skullGrunt.encounter.1", "dialogue:skull_grunt.encounter.1",
"dialogue:skullGrunt.encounter.2", "dialogue:skull_grunt.encounter.2",
"dialogue:skullGrunt.encounter.3", "dialogue:skull_grunt.encounter.3",
"dialogue:skullGrunt.encounter.4", "dialogue:skull_grunt.encounter.4",
"dialogue:skullGrunt.encounter.5", "dialogue:skull_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:skullGrunt.victory.1", "dialogue:skull_grunt.victory.1",
"dialogue:skullGrunt.victory.2", "dialogue:skull_grunt.victory.2",
"dialogue:skullGrunt.victory.3", "dialogue:skull_grunt.victory.3",
"dialogue:skullGrunt.victory.4", "dialogue:skull_grunt.victory.4",
"dialogue:skullGrunt.victory.5", "dialogue:skull_grunt.victory.5",
], ],
}, },
], ],
@ -661,18 +669,18 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.MACRO_GRUNT]: [ [TrainerType.MACRO_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:macroGrunt.encounter.1", "dialogue:macro_grunt.encounter.1",
"dialogue:macroGrunt.encounter.2", "dialogue:macro_grunt.encounter.2",
"dialogue:macroGrunt.encounter.3", "dialogue:macro_grunt.encounter.3",
"dialogue:macroGrunt.encounter.4", "dialogue:macro_grunt.encounter.4",
"dialogue:macroGrunt.encounter.5", "dialogue:macro_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:macroGrunt.victory.1", "dialogue:macro_grunt.victory.1",
"dialogue:macroGrunt.victory.2", "dialogue:macro_grunt.victory.2",
"dialogue:macroGrunt.victory.3", "dialogue:macro_grunt.victory.3",
"dialogue:macroGrunt.victory.4", "dialogue:macro_grunt.victory.4",
"dialogue:macroGrunt.victory.5", "dialogue:macro_grunt.victory.5",
], ],
}, },
], ],
@ -685,18 +693,18 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
[TrainerType.STAR_GRUNT]: [ [TrainerType.STAR_GRUNT]: [
{ {
encounter: [ encounter: [
"dialogue:starGrunt.encounter.1", "dialogue:star_grunt.encounter.1",
"dialogue:starGrunt.encounter.2", "dialogue:star_grunt.encounter.2",
"dialogue:starGrunt.encounter.3", "dialogue:star_grunt.encounter.3",
"dialogue:starGrunt.encounter.4", "dialogue:star_grunt.encounter.4",
"dialogue:starGrunt.encounter.5", "dialogue:star_grunt.encounter.5",
], ],
victory: [ victory: [
"dialogue:starGrunt.victory.1", "dialogue:star_grunt.victory.1",
"dialogue:starGrunt.victory.2", "dialogue:star_grunt.victory.2",
"dialogue:starGrunt.victory.3", "dialogue:star_grunt.victory.3",
"dialogue:starGrunt.victory.4", "dialogue:star_grunt.victory.4",
"dialogue:starGrunt.victory.5", "dialogue:star_grunt.victory.5",
], ],
}, },
], ],
@ -732,207 +740,207 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
], ],
[TrainerType.ROCKET_BOSS_GIOVANNI_1]: [ [TrainerType.ROCKET_BOSS_GIOVANNI_1]: [
{ {
encounter: ["dialogue:rocketBossGiovanni1.encounter.1"], encounter: ["dialogue:rocket_boss_giovanni_1.encounter.1"],
victory: ["dialogue:rocketBossGiovanni1.victory.1"], victory: ["dialogue:rocket_boss_giovanni_1.victory.1"],
defeat: ["dialogue:rocketBossGiovanni1.defeat.1"], defeat: ["dialogue:rocket_boss_giovanni_1.defeat.1"],
}, },
], ],
[TrainerType.ROCKET_BOSS_GIOVANNI_2]: [ [TrainerType.ROCKET_BOSS_GIOVANNI_2]: [
{ {
encounter: ["dialogue:rocketBossGiovanni2.encounter.1"], encounter: ["dialogue:rocket_boss_giovanni_2.encounter.1"],
victory: ["dialogue:rocketBossGiovanni2.victory.1"], victory: ["dialogue:rocket_boss_giovanni_2.victory.1"],
defeat: ["dialogue:rocketBossGiovanni2.defeat.1"], defeat: ["dialogue:rocket_boss_giovanni_2.defeat.1"],
}, },
], ],
[TrainerType.MAXIE]: [ [TrainerType.MAXIE]: [
{ {
encounter: ["dialogue:magmaBossMaxie1.encounter.1"], encounter: ["dialogue:magma_boss_maxie_1.encounter.1"],
victory: ["dialogue:magmaBossMaxie1.victory.1"], victory: ["dialogue:magma_boss_maxie_1.victory.1"],
defeat: ["dialogue:magmaBossMaxie1.defeat.1"], defeat: ["dialogue:magma_boss_maxie_1.defeat.1"],
}, },
], ],
[TrainerType.MAXIE_2]: [ [TrainerType.MAXIE_2]: [
{ {
encounter: ["dialogue:magmaBossMaxie2.encounter.1"], encounter: ["dialogue:magma_boss_maxie_2.encounter.1"],
victory: ["dialogue:magmaBossMaxie2.victory.1"], victory: ["dialogue:magma_boss_maxie_2.victory.1"],
defeat: ["dialogue:magmaBossMaxie2.defeat.1"], defeat: ["dialogue:magma_boss_maxie_2.defeat.1"],
}, },
], ],
[TrainerType.ARCHIE]: [ [TrainerType.ARCHIE]: [
{ {
encounter: ["dialogue:aquaBossArchie1.encounter.1"], encounter: ["dialogue:aqua_boss_archie_1.encounter.1"],
victory: ["dialogue:aquaBossArchie1.victory.1"], victory: ["dialogue:aqua_boss_archie_1.victory.1"],
defeat: ["dialogue:aquaBossArchie1.defeat.1"], defeat: ["dialogue:aqua_boss_archie_1.defeat.1"],
}, },
], ],
[TrainerType.ARCHIE_2]: [ [TrainerType.ARCHIE_2]: [
{ {
encounter: ["dialogue:aquaBossArchie2.encounter.1"], encounter: ["dialogue:aqua_boss_archie_2.encounter.1"],
victory: ["dialogue:aquaBossArchie2.victory.1"], victory: ["dialogue:aqua_boss_archie_2.victory.1"],
defeat: ["dialogue:aquaBossArchie2.defeat.1"], defeat: ["dialogue:aqua_boss_archie_2.defeat.1"],
}, },
], ],
[TrainerType.CYRUS]: [ [TrainerType.CYRUS]: [
{ {
encounter: ["dialogue:galacticBossCyrus1.encounter.1"], encounter: ["dialogue:galactic_boss_cyrus_1.encounter.1"],
victory: ["dialogue:galacticBossCyrus1.victory.1"], victory: ["dialogue:galactic_boss_cyrus_1.victory.1"],
defeat: ["dialogue:galacticBossCyrus1.defeat.1"], defeat: ["dialogue:galactic_boss_cyrus_1.defeat.1"],
}, },
], ],
[TrainerType.CYRUS_2]: [ [TrainerType.CYRUS_2]: [
{ {
encounter: ["dialogue:galacticBossCyrus2.encounter.1"], encounter: ["dialogue:galactic_boss_cyrus_2.encounter.1"],
victory: ["dialogue:galacticBossCyrus2.victory.1"], victory: ["dialogue:galactic_boss_cyrus_2.victory.1"],
defeat: ["dialogue:galacticBossCyrus2.defeat.1"], defeat: ["dialogue:galactic_boss_cyrus_2.defeat.1"],
}, },
], ],
[TrainerType.GHETSIS]: [ [TrainerType.GHETSIS]: [
{ {
encounter: ["dialogue:plasmaBossGhetsis1.encounter.1"], encounter: ["dialogue:plasma_boss_ghetsis_1.encounter.1"],
victory: ["dialogue:plasmaBossGhetsis1.victory.1"], victory: ["dialogue:plasma_boss_ghetsis_1.victory.1"],
defeat: ["dialogue:plasmaBossGhetsis1.defeat.1"], defeat: ["dialogue:plasma_boss_ghetsis_1.defeat.1"],
}, },
], ],
[TrainerType.GHETSIS_2]: [ [TrainerType.GHETSIS_2]: [
{ {
encounter: ["dialogue:plasmaBossGhetsis2.encounter.1"], encounter: ["dialogue:plasma_boss_ghetsis_2.encounter.1"],
victory: ["dialogue:plasmaBossGhetsis2.victory.1"], victory: ["dialogue:plasma_boss_ghetsis_2.victory.1"],
defeat: ["dialogue:plasmaBossGhetsis2.defeat.1"], defeat: ["dialogue:plasma_boss_ghetsis_2.defeat.1"],
}, },
], ],
[TrainerType.LYSANDRE]: [ [TrainerType.LYSANDRE]: [
{ {
encounter: ["dialogue:flareBossLysandre1.encounter.1"], encounter: ["dialogue:flare_boss_lysandre_1.encounter.1"],
victory: ["dialogue:flareBossLysandre1.victory.1"], victory: ["dialogue:flare_boss_lysandre_1.victory.1"],
defeat: ["dialogue:flareBossLysandre1.defeat.1"], defeat: ["dialogue:flare_boss_lysandre_1.defeat.1"],
}, },
], ],
[TrainerType.LYSANDRE_2]: [ [TrainerType.LYSANDRE_2]: [
{ {
encounter: ["dialogue:flareBossLysandre2.encounter.1"], encounter: ["dialogue:flare_boss_lysandre_2.encounter.1"],
victory: ["dialogue:flareBossLysandre2.victory.1"], victory: ["dialogue:flare_boss_lysandre_2.victory.1"],
defeat: ["dialogue:flareBossLysandre2.defeat.1"], defeat: ["dialogue:flare_boss_lysandre_2.defeat.1"],
}, },
], ],
[TrainerType.LUSAMINE]: [ [TrainerType.LUSAMINE]: [
{ {
encounter: ["dialogue:aetherBossLusamine1.encounter.1"], encounter: ["dialogue:aether_boss_lusamine_1.encounter.1"],
victory: ["dialogue:aetherBossLusamine1.victory.1"], victory: ["dialogue:aether_boss_lusamine_1.victory.1"],
defeat: ["dialogue:aetherBossLusamine1.defeat.1"], defeat: ["dialogue:aether_boss_lusamine_1.defeat.1"],
}, },
], ],
[TrainerType.LUSAMINE_2]: [ [TrainerType.LUSAMINE_2]: [
{ {
encounter: ["dialogue:aetherBossLusamine2.encounter.1"], encounter: ["dialogue:aether_boss_lusamine_2.encounter.1"],
victory: ["dialogue:aetherBossLusamine2.victory.1"], victory: ["dialogue:aether_boss_lusamine_2.victory.1"],
defeat: ["dialogue:aetherBossLusamine2.defeat.1"], defeat: ["dialogue:aether_boss_lusamine_2.defeat.1"],
}, },
], ],
[TrainerType.GUZMA]: [ [TrainerType.GUZMA]: [
{ {
encounter: ["dialogue:skullBossGuzma1.encounter.1"], encounter: ["dialogue:skull_boss_guzma_1.encounter.1"],
victory: ["dialogue:skullBossGuzma1.victory.1"], victory: ["dialogue:skull_boss_guzma_1.victory.1"],
defeat: ["dialogue:skullBossGuzma1.defeat.1"], defeat: ["dialogue:skull_boss_guzma_1.defeat.1"],
}, },
], ],
[TrainerType.GUZMA_2]: [ [TrainerType.GUZMA_2]: [
{ {
encounter: ["dialogue:skullBossGuzma2.encounter.1"], encounter: ["dialogue:skull_boss_guzma_2.encounter.1"],
victory: ["dialogue:skullBossGuzma2.victory.1"], victory: ["dialogue:skull_boss_guzma_2.victory.1"],
defeat: ["dialogue:skullBossGuzma2.defeat.1"], defeat: ["dialogue:skull_boss_guzma_2.defeat.1"],
}, },
], ],
[TrainerType.ROSE]: [ [TrainerType.ROSE]: [
{ {
encounter: ["dialogue:macroBossRose1.encounter.1"], encounter: ["dialogue:macro_boss_rose_1.encounter.1"],
victory: ["dialogue:macroBossRose1.victory.1"], victory: ["dialogue:macro_boss_rose_1.victory.1"],
defeat: ["dialogue:macroBossRose1.defeat.1"], defeat: ["dialogue:macro_boss_rose_1.defeat.1"],
}, },
], ],
[TrainerType.ROSE_2]: [ [TrainerType.ROSE_2]: [
{ {
encounter: ["dialogue:macroBossRose2.encounter.1"], encounter: ["dialogue:macro_boss_rose_2.encounter.1"],
victory: ["dialogue:macroBossRose2.victory.1"], victory: ["dialogue:macro_boss_rose_2.victory.1"],
defeat: ["dialogue:macroBossRose2.defeat.1"], defeat: ["dialogue:macro_boss_rose_2.defeat.1"],
}, },
], ],
[TrainerType.PENNY]: [ [TrainerType.PENNY]: [
{ {
encounter: ["dialogue:starBossPenny1.encounter.1"], encounter: ["dialogue:star_boss_penny_1.encounter.1"],
victory: ["dialogue:starBossPenny1.victory.1"], victory: ["dialogue:star_boss_penny_1.victory.1"],
defeat: ["dialogue:starBossPenny1.defeat.1"], defeat: ["dialogue:star_boss_penny_1.defeat.1"],
}, },
], ],
[TrainerType.PENNY_2]: [ [TrainerType.PENNY_2]: [
{ {
encounter: ["dialogue:starBossPenny2.encounter.1"], encounter: ["dialogue:star_boss_penny_2.encounter.1"],
victory: ["dialogue:starBossPenny2.victory.1"], victory: ["dialogue:star_boss_penny_2.victory.1"],
defeat: ["dialogue:starBossPenny2.defeat.1"], defeat: ["dialogue:star_boss_penny_2.defeat.1"],
}, },
], ],
[TrainerType.BUCK]: [ [TrainerType.BUCK]: [
{ {
encounter: ["dialogue:statTrainerBuck.encounter.1", "dialogue:statTrainerBuck.encounter.2"], encounter: ["dialogue:stat_trainer_buck.encounter.1", "dialogue:stat_trainer_buck.encounter.2"],
victory: ["dialogue:statTrainerBuck.victory.1", "dialogue:statTrainerBuck.victory.2"], victory: ["dialogue:stat_trainer_buck.victory.1", "dialogue:stat_trainer_buck.victory.2"],
defeat: ["dialogue:statTrainerBuck.defeat.1", "dialogue:statTrainerBuck.defeat.2"], defeat: ["dialogue:stat_trainer_buck.defeat.1", "dialogue:stat_trainer_buck.defeat.2"],
}, },
], ],
[TrainerType.CHERYL]: [ [TrainerType.CHERYL]: [
{ {
encounter: ["dialogue:statTrainerCheryl.encounter.1", "dialogue:statTrainerCheryl.encounter.2"], encounter: ["dialogue:stat_trainer_cheryl.encounter.1", "dialogue:stat_trainer_cheryl.encounter.2"],
victory: ["dialogue:statTrainerCheryl.victory.1", "dialogue:statTrainerCheryl.victory.2"], victory: ["dialogue:stat_trainer_cheryl.victory.1", "dialogue:stat_trainer_cheryl.victory.2"],
defeat: ["dialogue:statTrainerCheryl.defeat.1", "dialogue:statTrainerCheryl.defeat.2"], defeat: ["dialogue:stat_trainer_cheryl.defeat.1", "dialogue:stat_trainer_cheryl.defeat.2"],
}, },
], ],
[TrainerType.MARLEY]: [ [TrainerType.MARLEY]: [
{ {
encounter: ["dialogue:statTrainerMarley.encounter.1", "dialogue:statTrainerMarley.encounter.2"], encounter: ["dialogue:stat_trainer_marley.encounter.1", "dialogue:stat_trainer_marley.encounter.2"],
victory: ["dialogue:statTrainerMarley.victory.1", "dialogue:statTrainerMarley.victory.2"], victory: ["dialogue:stat_trainer_marley.victory.1", "dialogue:stat_trainer_marley.victory.2"],
defeat: ["dialogue:statTrainerMarley.defeat.1", "dialogue:statTrainerMarley.defeat.2"], defeat: ["dialogue:stat_trainer_marley.defeat.1", "dialogue:stat_trainer_marley.defeat.2"],
}, },
], ],
[TrainerType.MIRA]: [ [TrainerType.MIRA]: [
{ {
encounter: ["dialogue:statTrainerMira.encounter.1", "dialogue:statTrainerMira.encounter.2"], encounter: ["dialogue:stat_trainer_mira.encounter.1", "dialogue:stat_trainer_mira.encounter.2"],
victory: ["dialogue:statTrainerMira.victory.1", "dialogue:statTrainerMira.victory.2"], victory: ["dialogue:stat_trainer_mira.victory.1", "dialogue:stat_trainer_mira.victory.2"],
defeat: ["dialogue:statTrainerMira.defeat.1", "dialogue:statTrainerMira.defeat.2"], defeat: ["dialogue:stat_trainer_mira.defeat.1", "dialogue:stat_trainer_mira.defeat.2"],
}, },
], ],
[TrainerType.RILEY]: [ [TrainerType.RILEY]: [
{ {
encounter: ["dialogue:statTrainerRiley.encounter.1", "dialogue:statTrainerRiley.encounter.2"], encounter: ["dialogue:stat_trainer_riley.encounter.1", "dialogue:stat_trainer_riley.encounter.2"],
victory: ["dialogue:statTrainerRiley.victory.1", "dialogue:statTrainerRiley.victory.2"], victory: ["dialogue:stat_trainer_riley.victory.1", "dialogue:stat_trainer_riley.victory.2"],
defeat: ["dialogue:statTrainerRiley.defeat.1", "dialogue:statTrainerRiley.defeat.2"], defeat: ["dialogue:stat_trainer_riley.defeat.1", "dialogue:stat_trainer_riley.defeat.2"],
}, },
], ],
[TrainerType.VICTOR]: [ [TrainerType.VICTOR]: [
{ {
encounter: ["dialogue:winstratesVictor.encounter.1"], encounter: ["dialogue:winstrates_victor.encounter.1"],
victory: ["dialogue:winstratesVictor.victory.1"], victory: ["dialogue:winstrates_victor.victory.1"],
}, },
], ],
[TrainerType.VICTORIA]: [ [TrainerType.VICTORIA]: [
{ {
encounter: ["dialogue:winstratesVictoria.encounter.1"], encounter: ["dialogue:winstrates_victoria.encounter.1"],
victory: ["dialogue:winstratesVictoria.victory.1"], victory: ["dialogue:winstrates_victoria.victory.1"],
}, },
], ],
[TrainerType.VIVI]: [ [TrainerType.VIVI]: [
{ {
encounter: ["dialogue:winstratesVivi.encounter.1"], encounter: ["dialogue:winstrates_vivi.encounter.1"],
victory: ["dialogue:winstratesVivi.victory.1"], victory: ["dialogue:winstrates_vivi.victory.1"],
}, },
], ],
[TrainerType.VICKY]: [ [TrainerType.VICKY]: [
{ {
encounter: ["dialogue:winstratesVicky.encounter.1"], encounter: ["dialogue:winstrates_vicky.encounter.1"],
victory: ["dialogue:winstratesVicky.victory.1"], victory: ["dialogue:winstrates_vicky.victory.1"],
}, },
], ],
[TrainerType.VITO]: [ [TrainerType.VITO]: [
{ {
encounter: ["dialogue:winstratesVito.encounter.1"], encounter: ["dialogue:winstrates_vito.encounter.1"],
victory: ["dialogue:winstratesVito.victory.1"], victory: ["dialogue:winstrates_vito.victory.1"],
}, },
], ],
[TrainerType.BROCK]: { [TrainerType.BROCK]: {
@ -946,9 +954,9 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
defeat: ["dialogue:misty.defeat.1", "dialogue:misty.defeat.2", "dialogue:misty.defeat.3"], defeat: ["dialogue:misty.defeat.1", "dialogue:misty.defeat.2", "dialogue:misty.defeat.3"],
}, },
[TrainerType.LT_SURGE]: { [TrainerType.LT_SURGE]: {
encounter: ["dialogue:ltSurge.encounter.1", "dialogue:ltSurge.encounter.2", "dialogue:ltSurge.encounter.3"], encounter: ["dialogue:lt_surge.encounter.1", "dialogue:lt_surge.encounter.2", "dialogue:lt_surge.encounter.3"],
victory: ["dialogue:ltSurge.victory.1", "dialogue:ltSurge.victory.2", "dialogue:ltSurge.victory.3"], victory: ["dialogue:lt_surge.victory.1", "dialogue:lt_surge.victory.2", "dialogue:lt_surge.victory.3"],
defeat: ["dialogue:ltSurge.defeat.1", "dialogue:ltSurge.defeat.2", "dialogue:ltSurge.defeat.3"], defeat: ["dialogue:lt_surge.defeat.1", "dialogue:lt_surge.defeat.2", "dialogue:lt_surge.defeat.3"],
}, },
[TrainerType.ERIKA]: { [TrainerType.ERIKA]: {
encounter: [ encounter: [
@ -1047,12 +1055,12 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
}, },
[TrainerType.CRASHER_WAKE]: { [TrainerType.CRASHER_WAKE]: {
encounter: [ encounter: [
"dialogue:crasherWake.encounter.1", "dialogue:crasher_wake.encounter.1",
"dialogue:crasherWake.encounter.2", "dialogue:crasher_wake.encounter.2",
"dialogue:crasherWake.encounter.3", "dialogue:crasher_wake.encounter.3",
], ],
victory: ["dialogue:crasherWake.victory.1", "dialogue:crasherWake.victory.2", "dialogue:crasherWake.victory.3"], victory: ["dialogue:crasher_wake.victory.1", "dialogue:crasher_wake.victory.2", "dialogue:crasher_wake.victory.3"],
defeat: ["dialogue:crasherWake.defeat.1", "dialogue:crasherWake.defeat.2", "dialogue:crasherWake.defeat.3"], defeat: ["dialogue:crasher_wake.defeat.1", "dialogue:crasher_wake.defeat.2", "dialogue:crasher_wake.defeat.3"],
}, },
[TrainerType.FALKNER]: { [TrainerType.FALKNER]: {
encounter: ["dialogue:falkner.encounter.1", "dialogue:falkner.encounter.2", "dialogue:falkner.encounter.3"], encounter: ["dialogue:falkner.encounter.1", "dialogue:falkner.encounter.2", "dialogue:falkner.encounter.3"],
@ -1346,9 +1354,9 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
defeat: ["dialogue:acerola.defeat.1"], defeat: ["dialogue:acerola.defeat.1"],
}, },
[TrainerType.LARRY_ELITE]: { [TrainerType.LARRY_ELITE]: {
encounter: ["dialogue:larryElite.encounter.1"], encounter: ["dialogue:larry_elite.encounter.1"],
victory: ["dialogue:larryElite.victory.1"], victory: ["dialogue:larry_elite.victory.1"],
defeat: ["dialogue:larryElite.defeat.1"], defeat: ["dialogue:larry_elite.defeat.1"],
}, },
[TrainerType.LANCE]: { [TrainerType.LANCE]: {
encounter: ["dialogue:lance.encounter.1", "dialogue:lance.encounter.2"], encounter: ["dialogue:lance.encounter.1", "dialogue:lance.encounter.2"],
@ -1406,9 +1414,9 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
defeat: ["dialogue:jasmine.defeat.1"], defeat: ["dialogue:jasmine.defeat.1"],
}, },
[TrainerType.LANCE_CHAMPION]: { [TrainerType.LANCE_CHAMPION]: {
encounter: ["dialogue:lanceChampion.encounter.1"], encounter: ["dialogue:lance_champion.encounter.1"],
victory: ["dialogue:lanceChampion.victory.1"], victory: ["dialogue:lance_champion.victory.1"],
defeat: ["dialogue:lanceChampion.defeat.1"], defeat: ["dialogue:lance_champion.defeat.1"],
}, },
[TrainerType.STEVEN]: { [TrainerType.STEVEN]: {
encounter: ["dialogue:steven.encounter.1"], encounter: ["dialogue:steven.encounter.1"],
@ -1616,29 +1624,29 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
defeat: ["dialogue:grusha.defeat.1"], defeat: ["dialogue:grusha.defeat.1"],
}, },
[TrainerType.MARNIE_ELITE]: { [TrainerType.MARNIE_ELITE]: {
encounter: ["dialogue:marnieElite.encounter.1", "dialogue:marnieElite.encounter.2"], encounter: ["dialogue:marnie_elite.encounter.1", "dialogue:marnie_elite.encounter.2"],
victory: ["dialogue:marnieElite.victory.1", "dialogue:marnieElite.victory.2"], victory: ["dialogue:marnie_elite.victory.1", "dialogue:marnie_elite.victory.2"],
defeat: ["dialogue:marnieElite.defeat.1", "dialogue:marnieElite.defeat.2"], defeat: ["dialogue:marnie_elite.defeat.1", "dialogue:marnie_elite.defeat.2"],
}, },
[TrainerType.NESSA_ELITE]: { [TrainerType.NESSA_ELITE]: {
encounter: ["dialogue:nessaElite.encounter.1", "dialogue:nessaElite.encounter.2"], encounter: ["dialogue:nessa_elite.encounter.1", "dialogue:nessa_elite.encounter.2"],
victory: ["dialogue:nessaElite.victory.1", "dialogue:nessaElite.victory.2"], victory: ["dialogue:nessa_elite.victory.1", "dialogue:nessa_elite.victory.2"],
defeat: ["dialogue:nessaElite.defeat.1", "dialogue:nessaElite.defeat.2"], defeat: ["dialogue:nessa_elite.defeat.1", "dialogue:nessa_elite.defeat.2"],
}, },
[TrainerType.BEA_ELITE]: { [TrainerType.BEA_ELITE]: {
encounter: ["dialogue:beaElite.encounter.1", "dialogue:beaElite.encounter.2"], encounter: ["dialogue:bea_elite.encounter.1", "dialogue:bea_elite.encounter.2"],
victory: ["dialogue:beaElite.victory.1", "dialogue:beaElite.victory.2"], victory: ["dialogue:bea_elite.victory.1", "dialogue:bea_elite.victory.2"],
defeat: ["dialogue:beaElite.defeat.1", "dialogue:beaElite.defeat.2"], defeat: ["dialogue:bea_elite.defeat.1", "dialogue:bea_elite.defeat.2"],
}, },
[TrainerType.ALLISTER_ELITE]: { [TrainerType.ALLISTER_ELITE]: {
encounter: ["dialogue:allisterElite.encounter.1", "dialogue:allisterElite.encounter.2"], encounter: ["dialogue:allister_elite.encounter.1", "dialogue:allister_elite.encounter.2"],
victory: ["dialogue:allisterElite.victory.1", "dialogue:allisterElite.victory.2"], victory: ["dialogue:allister_elite.victory.1", "dialogue:allister_elite.victory.2"],
defeat: ["dialogue:allisterElite.defeat.1", "dialogue:allisterElite.defeat.2"], defeat: ["dialogue:allister_elite.defeat.1", "dialogue:allister_elite.defeat.2"],
}, },
[TrainerType.RAIHAN_ELITE]: { [TrainerType.RAIHAN_ELITE]: {
encounter: ["dialogue:raihanElite.encounter.1", "dialogue:raihanElite.encounter.2"], encounter: ["dialogue:raihan_elite.encounter.1", "dialogue:raihan_elite.encounter.2"],
victory: ["dialogue:raihanElite.victory.1", "dialogue:raihanElite.victory.2"], victory: ["dialogue:raihan_elite.victory.1", "dialogue:raihan_elite.victory.2"],
defeat: ["dialogue:raihanElite.defeat.1", "dialogue:raihanElite.defeat.2"], defeat: ["dialogue:raihan_elite.defeat.1", "dialogue:raihan_elite.defeat.2"],
}, },
[TrainerType.ALDER]: { [TrainerType.ALDER]: {
encounter: ["dialogue:alder.encounter.1"], encounter: ["dialogue:alder.encounter.1"],
@ -1662,56 +1670,56 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
], ],
[TrainerType.RIVAL_2]: [ [TrainerType.RIVAL_2]: [
{ {
encounter: ["dialogue:rival2.encounter.1"], encounter: ["dialogue:rival_2.encounter.1"],
victory: ["dialogue:rival2.victory.1"], victory: ["dialogue:rival_2.victory.1"],
}, },
{ {
encounter: ["dialogue:rival2Female.encounter.1"], encounter: ["dialogue:rival_2_female.encounter.1"],
victory: ["dialogue:rival2Female.victory.1"], victory: ["dialogue:rival_2_female.victory.1"],
defeat: ["dialogue:rival2Female.defeat.1"], defeat: ["dialogue:rival_2_female.defeat.1"],
}, },
], ],
[TrainerType.RIVAL_3]: [ [TrainerType.RIVAL_3]: [
{ {
encounter: ["dialogue:rival3.encounter.1"], encounter: ["dialogue:rival_3.encounter.1"],
victory: ["dialogue:rival3.victory.1"], victory: ["dialogue:rival_3.victory.1"],
}, },
{ {
encounter: ["dialogue:rival3Female.encounter.1"], encounter: ["dialogue:rival_3_female.encounter.1"],
victory: ["dialogue:rival3Female.victory.1"], victory: ["dialogue:rival_3_female.victory.1"],
defeat: ["dialogue:rival3Female.defeat.1"], defeat: ["dialogue:rival_3_female.defeat.1"],
}, },
], ],
[TrainerType.RIVAL_4]: [ [TrainerType.RIVAL_4]: [
{ {
encounter: ["dialogue:rival4.encounter.1"], encounter: ["dialogue:rival_4.encounter.1"],
victory: ["dialogue:rival4.victory.1"], victory: ["dialogue:rival_4.victory.1"],
}, },
{ {
encounter: ["dialogue:rival4Female.encounter.1"], encounter: ["dialogue:rival_4_female.encounter.1"],
victory: ["dialogue:rival4Female.victory.1"], victory: ["dialogue:rival_4_female.victory.1"],
defeat: ["dialogue:rival4Female.defeat.1"], defeat: ["dialogue:rival_4_female.defeat.1"],
}, },
], ],
[TrainerType.RIVAL_5]: [ [TrainerType.RIVAL_5]: [
{ {
encounter: ["dialogue:rival5.encounter.1"], encounter: ["dialogue:rival_5.encounter.1"],
victory: ["dialogue:rival5.victory.1"], victory: ["dialogue:rival_5.victory.1"],
}, },
{ {
encounter: ["dialogue:rival5Female.encounter.1"], encounter: ["dialogue:rival_5_female.encounter.1"],
victory: ["dialogue:rival5Female.victory.1"], victory: ["dialogue:rival_5_female.victory.1"],
defeat: ["dialogue:rival5Female.defeat.1"], defeat: ["dialogue:rival_5_female.defeat.1"],
}, },
], ],
[TrainerType.RIVAL_6]: [ [TrainerType.RIVAL_6]: [
{ {
encounter: ["dialogue:rival6.encounter.1"], encounter: ["dialogue:rival_6.encounter.1"],
victory: ["dialogue:rival6.victory.1"], victory: ["dialogue:rival_6.victory.1"],
}, },
{ {
encounter: ["dialogue:rival6Female.encounter.1"], encounter: ["dialogue:rival_6_female.encounter.1"],
victory: ["dialogue:rival6Female.victory.1"], victory: ["dialogue:rival_6_female.victory.1"],
}, },
], ],
}; };

View File

@ -86,7 +86,7 @@ import { PokemonHealPhase } from "#phases/pokemon-heal-phase";
import { SwitchSummonPhase } from "#phases/switch-summon-phase"; import { SwitchSummonPhase } from "#phases/switch-summon-phase";
import type { AttackMoveResult } from "#types/attack-move-result"; import type { AttackMoveResult } from "#types/attack-move-result";
import type { Localizable } from "#types/locales"; import type { Localizable } from "#types/locales";
import type { ChargingMove, MoveAttrMap, MoveAttrString, MoveClassMap, MoveKindString, MoveMessageFunc } from "#types/move-types"; import type { ChargingMove, MoveAttrMap, MoveAttrString, MoveClassMap, MoveKindString } from "#types/move-types";
import type { TurnMove } from "#types/turn-move"; import type { TurnMove } from "#types/turn-move";
import { BooleanHolder, type Constructor, isNullOrUndefined, NumberHolder, randSeedFloat, randSeedInt, randSeedItem, toDmgValue } from "#utils/common"; import { BooleanHolder, type Constructor, isNullOrUndefined, NumberHolder, randSeedFloat, randSeedInt, randSeedItem, toDmgValue } from "#utils/common";
import { getEnumValues } from "#utils/enums"; import { getEnumValues } from "#utils/enums";
@ -1357,20 +1357,20 @@ export class MoveHeaderAttr extends MoveAttr {
/** /**
* Header attribute to queue a message at the beginning of a turn. * Header attribute to queue a message at the beginning of a turn.
* @see {@link MoveHeaderAttr}
*/ */
export class MessageHeaderAttr extends MoveHeaderAttr { export class MessageHeaderAttr extends MoveHeaderAttr {
/** The message to display, or a function producing one. */ private message: string | ((user: Pokemon, move: Move) => string);
private message: string | MoveMessageFunc;
constructor(message: string | MoveMessageFunc) { constructor(message: string | ((user: Pokemon, move: Move) => string)) {
super(); super();
this.message = message; this.message = message;
} }
apply(user: Pokemon, target: Pokemon, move: Move): boolean { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const message = typeof this.message === "string" const message = typeof this.message === "string"
? this.message ? this.message
: this.message(user, target, move); : this.message(user, move);
if (message) { if (message) {
globalScene.phaseManager.queueMessage(message); globalScene.phaseManager.queueMessage(message);
@ -1418,21 +1418,21 @@ export class BeakBlastHeaderAttr extends AddBattlerTagHeaderAttr {
*/ */
export class PreMoveMessageAttr extends MoveAttr { export class PreMoveMessageAttr extends MoveAttr {
/** The message to display or a function returning one */ /** The message to display or a function returning one */
private message: string | MoveMessageFunc; private message: string | ((user: Pokemon, target: Pokemon, move: Move) => string | undefined);
/** /**
* Create a new {@linkcode PreMoveMessageAttr} to display a message before move execution. * Create a new {@linkcode PreMoveMessageAttr} to display a message before move execution.
* @param message - The message to display before move use, either` a literal string or a function producing one. * @param message - The message to display before move use, either as a string or a function producing one.
* @remarks * @remarks
* If {@linkcode message} evaluates to an empty string (`""`), no message will be displayed * If {@linkcode message} evaluates to an empty string (`''`), no message will be displayed
* (though the move will still succeed). * (though the move will still succeed).
*/ */
constructor(message: string | MoveMessageFunc) { constructor(message: string | ((user: Pokemon, target: Pokemon, move: Move) => string)) {
super(); super();
this.message = message; this.message = message;
} }
apply(user: Pokemon, target: Pokemon, move: Move): boolean { apply(user: Pokemon, target: Pokemon, move: Move, _args: any[]): boolean {
const message = typeof this.message === "function" const message = typeof this.message === "function"
? this.message(user, target, move) ? this.message(user, target, move)
: this.message; : this.message;
@ -1453,17 +1453,18 @@ export class PreMoveMessageAttr extends MoveAttr {
* @extends MoveAttr * @extends MoveAttr
*/ */
export class PreUseInterruptAttr extends MoveAttr { export class PreUseInterruptAttr extends MoveAttr {
protected message: string | MoveMessageFunc; protected message?: string | ((user: Pokemon, target: Pokemon, move: Move) => string);
protected overridesFailedMessage: boolean;
protected conditionFunc: MoveConditionFunc; protected conditionFunc: MoveConditionFunc;
/** /**
* Create a new MoveInterruptedMessageAttr. * Create a new MoveInterruptedMessageAttr.
* @param message The message to display when the move is interrupted, or a function that formats the message based on the user, target, and move. * @param message The message to display when the move is interrupted, or a function that formats the message based on the user, target, and move.
*/ */
constructor(message: string | MoveMessageFunc, conditionFunc: MoveConditionFunc) { constructor(message?: string | ((user: Pokemon, target: Pokemon, move: Move) => string), conditionFunc?: MoveConditionFunc) {
super(); super();
this.message = message; this.message = message;
this.conditionFunc = conditionFunc; this.conditionFunc = conditionFunc ?? (() => true);
} }
/** /**
@ -1484,9 +1485,11 @@ export class PreUseInterruptAttr extends MoveAttr {
*/ */
override getFailedText(user: Pokemon, target: Pokemon, move: Move): string | undefined { override getFailedText(user: Pokemon, target: Pokemon, move: Move): string | undefined {
if (this.message && this.conditionFunc(user, target, move)) { if (this.message && this.conditionFunc(user, target, move)) {
return typeof this.message === "string" const message =
? this.message typeof this.message === "string"
? (this.message as string)
: this.message(user, target, move); : this.message(user, target, move);
return message;
} }
} }
} }
@ -1691,30 +1694,17 @@ export class SurviveDamageAttr extends ModifiedDamageAttr {
} }
} }
/** export class SplashAttr extends MoveEffectAttr {
* Move attribute to display arbitrary text during a move's execution. apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
*/ globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:splash"));
export class MessageAttr extends MoveEffectAttr {
/** The message to display, either as a string or a function returning one. */
private message: string | MoveMessageFunc;
constructor(message: string | MoveMessageFunc, options?: MoveEffectAttrOptions) {
// TODO: Do we need to respect `selfTarget` if we're just displaying text?
super(false, options)
this.message = message;
}
override apply(user: Pokemon, target: Pokemon, move: Move): boolean {
const message = typeof this.message === "function"
? this.message(user, target, move)
: this.message;
// TODO: Consider changing if/when MoveAttr `apply` return values become significant
if (message) {
globalScene.phaseManager.queueMessage(message, 500);
return true; return true;
} }
return false; }
export class CelebrateAttr extends MoveEffectAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:celebrate", { playerName: loggedInUser?.username }));
return true;
} }
} }
@ -5941,6 +5931,38 @@ export class ProtectAttr extends AddBattlerTagAttr {
} }
} }
export class IgnoreAccuracyAttr extends AddBattlerTagAttr {
constructor() {
super(BattlerTagType.IGNORE_ACCURACY, true, false, 2);
}
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!super.apply(user, target, move, args)) {
return false;
}
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:tookAimAtTarget", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) }));
return true;
}
}
export class FaintCountdownAttr extends AddBattlerTagAttr {
constructor() {
super(BattlerTagType.PERISH_SONG, false, true, 4);
}
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!super.apply(user, target, move, args)) {
return false;
}
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:faintCountdown", { pokemonName: getPokemonNameWithAffix(target), turnCount: this.turnCountMin - 1 }));
return true;
}
}
/** /**
* Attribute to remove all Substitutes from the field. * Attribute to remove all Substitutes from the field.
* @extends MoveEffectAttr * @extends MoveEffectAttr
@ -6581,10 +6603,8 @@ export class ChillyReceptionAttr extends ForceSwitchOutAttr {
return (user, target, move) => globalScene.arena.weather?.weatherType !== WeatherType.SNOW || super.getSwitchOutCondition()(user, target, move); return (user, target, move) => globalScene.arena.weather?.weatherType !== WeatherType.SNOW || super.getSwitchOutCondition()(user, target, move);
} }
} }
export class RemoveTypeAttr extends MoveEffectAttr { export class RemoveTypeAttr extends MoveEffectAttr {
// TODO: Remove the message callback
private removedType: PokemonType; private removedType: PokemonType;
private messageCallback: ((user: Pokemon) => void) | undefined; private messageCallback: ((user: Pokemon) => void) | undefined;
@ -8279,6 +8299,8 @@ const MoveAttrs = Object.freeze({
RandomLevelDamageAttr, RandomLevelDamageAttr,
ModifiedDamageAttr, ModifiedDamageAttr,
SurviveDamageAttr, SurviveDamageAttr,
SplashAttr,
CelebrateAttr,
RecoilAttr, RecoilAttr,
SacrificialAttr, SacrificialAttr,
SacrificialAttrOnHit, SacrificialAttrOnHit,
@ -8421,7 +8443,8 @@ const MoveAttrs = Object.freeze({
RechargeAttr, RechargeAttr,
TrapAttr, TrapAttr,
ProtectAttr, ProtectAttr,
MessageAttr, IgnoreAccuracyAttr,
FaintCountdownAttr,
RemoveAllSubstitutesAttr, RemoveAllSubstitutesAttr,
HitsTagAttr, HitsTagAttr,
HitsTagForDoubleDamageAttr, HitsTagForDoubleDamageAttr,
@ -8915,7 +8938,7 @@ export function initMoves() {
new AttackMove(MoveId.PSYWAVE, PokemonType.PSYCHIC, MoveCategory.SPECIAL, -1, 100, 15, -1, 0, 1) new AttackMove(MoveId.PSYWAVE, PokemonType.PSYCHIC, MoveCategory.SPECIAL, -1, 100, 15, -1, 0, 1)
.attr(RandomLevelDamageAttr), .attr(RandomLevelDamageAttr),
new SelfStatusMove(MoveId.SPLASH, PokemonType.NORMAL, -1, 40, -1, 0, 1) new SelfStatusMove(MoveId.SPLASH, PokemonType.NORMAL, -1, 40, -1, 0, 1)
.attr(MessageAttr, i18next.t("moveTriggers:splash")) .attr(SplashAttr)
.condition(failOnGravityCondition), .condition(failOnGravityCondition),
new SelfStatusMove(MoveId.ACID_ARMOR, PokemonType.POISON, -1, 20, -1, 0, 1) new SelfStatusMove(MoveId.ACID_ARMOR, PokemonType.POISON, -1, 20, -1, 0, 1)
.attr(StatStageChangeAttr, [ Stat.DEF ], 2, true), .attr(StatStageChangeAttr, [ Stat.DEF ], 2, true),
@ -8977,10 +9000,7 @@ export function initMoves() {
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1) .attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1)
.reflectable(), .reflectable(),
new StatusMove(MoveId.MIND_READER, PokemonType.NORMAL, -1, 5, -1, 0, 2) new StatusMove(MoveId.MIND_READER, PokemonType.NORMAL, -1, 5, -1, 0, 2)
.attr(AddBattlerTagAttr, BattlerTagType.IGNORE_ACCURACY, true, false, 2) .attr(IgnoreAccuracyAttr),
.attr(MessageAttr, (user, target) =>
i18next.t("moveTriggers:tookAimAtTarget", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) })
),
new StatusMove(MoveId.NIGHTMARE, PokemonType.GHOST, 100, 15, -1, 0, 2) new StatusMove(MoveId.NIGHTMARE, PokemonType.GHOST, 100, 15, -1, 0, 2)
.attr(AddBattlerTagAttr, BattlerTagType.NIGHTMARE) .attr(AddBattlerTagAttr, BattlerTagType.NIGHTMARE)
.condition(targetSleptOrComatoseCondition), .condition(targetSleptOrComatoseCondition),
@ -9068,9 +9088,7 @@ export function initMoves() {
return lastTurnMove.length === 0 || lastTurnMove[0].move !== move.id || lastTurnMove[0].result !== MoveResult.SUCCESS; return lastTurnMove.length === 0 || lastTurnMove[0].move !== move.id || lastTurnMove[0].result !== MoveResult.SUCCESS;
}), }),
new StatusMove(MoveId.PERISH_SONG, PokemonType.NORMAL, -1, 5, -1, 0, 2) new StatusMove(MoveId.PERISH_SONG, PokemonType.NORMAL, -1, 5, -1, 0, 2)
.attr(AddBattlerTagAttr, BattlerTagType.PERISH_SONG, false, true, 4) .attr(FaintCountdownAttr)
.attr(MessageAttr, (_user, target) =>
i18next.t("moveTriggers:faintCountdown", { pokemonName: getPokemonNameWithAffix(target), turnCount: 3 }))
.ignoresProtect() .ignoresProtect()
.soundBased() .soundBased()
.condition(failOnBossCondition) .condition(failOnBossCondition)
@ -9086,10 +9104,7 @@ export function initMoves() {
.attr(MultiHitAttr) .attr(MultiHitAttr)
.makesContact(false), .makesContact(false),
new StatusMove(MoveId.LOCK_ON, PokemonType.NORMAL, -1, 5, -1, 0, 2) new StatusMove(MoveId.LOCK_ON, PokemonType.NORMAL, -1, 5, -1, 0, 2)
.attr(AddBattlerTagAttr, BattlerTagType.IGNORE_ACCURACY, true, false, 2) .attr(IgnoreAccuracyAttr),
.attr(MessageAttr, (user, target) =>
i18next.t("moveTriggers:tookAimAtTarget", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) })
),
new AttackMove(MoveId.OUTRAGE, PokemonType.DRAGON, MoveCategory.PHYSICAL, 120, 100, 10, -1, 0, 2) new AttackMove(MoveId.OUTRAGE, PokemonType.DRAGON, MoveCategory.PHYSICAL, 120, 100, 10, -1, 0, 2)
.attr(FrenzyAttr) .attr(FrenzyAttr)
.attr(MissEffectAttr, frenzyMissFunc) .attr(MissEffectAttr, frenzyMissFunc)
@ -9316,8 +9331,8 @@ export function initMoves() {
&& (user.status.effect === StatusEffect.BURN || user.status.effect === StatusEffect.POISON || user.status.effect === StatusEffect.TOXIC || user.status.effect === StatusEffect.PARALYSIS) ? 2 : 1) && (user.status.effect === StatusEffect.BURN || user.status.effect === StatusEffect.POISON || user.status.effect === StatusEffect.TOXIC || user.status.effect === StatusEffect.PARALYSIS) ? 2 : 1)
.attr(BypassBurnDamageReductionAttr), .attr(BypassBurnDamageReductionAttr),
new AttackMove(MoveId.FOCUS_PUNCH, PokemonType.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3) new AttackMove(MoveId.FOCUS_PUNCH, PokemonType.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
.attr(MessageHeaderAttr, (user) => i18next.t("moveTriggers:isTighteningFocus", { pokemonName: getPokemonNameWithAffix(user) })) .attr(MessageHeaderAttr, (user, move) => i18next.t("moveTriggers:isTighteningFocus", { pokemonName: getPokemonNameWithAffix(user) }))
.attr(PreUseInterruptAttr, (user) => i18next.t("moveTriggers:lostFocus", { pokemonName: getPokemonNameWithAffix(user) }), user => user.turnData.attacksReceived.some(r => r.damage > 0)) .attr(PreUseInterruptAttr, (user, target, move) => i18next.t("moveTriggers:lostFocus", { pokemonName: getPokemonNameWithAffix(user) }), user => !!user.turnData.attacksReceived.find(r => r.damage))
.punchingMove(), .punchingMove(),
new AttackMove(MoveId.SMELLING_SALTS, PokemonType.NORMAL, MoveCategory.PHYSICAL, 70, 100, 10, -1, 0, 3) new AttackMove(MoveId.SMELLING_SALTS, PokemonType.NORMAL, MoveCategory.PHYSICAL, 70, 100, 10, -1, 0, 3)
.attr(MovePowerMultiplierAttr, (user, target, move) => target.status?.effect === StatusEffect.PARALYSIS ? 2 : 1) .attr(MovePowerMultiplierAttr, (user, target, move) => target.status?.effect === StatusEffect.PARALYSIS ? 2 : 1)
@ -10418,8 +10433,7 @@ export function initMoves() {
new AttackMove(MoveId.DAZZLING_GLEAM, PokemonType.FAIRY, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 6) new AttackMove(MoveId.DAZZLING_GLEAM, PokemonType.FAIRY, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 6)
.target(MoveTarget.ALL_NEAR_ENEMIES), .target(MoveTarget.ALL_NEAR_ENEMIES),
new SelfStatusMove(MoveId.CELEBRATE, PokemonType.NORMAL, -1, 40, -1, 0, 6) new SelfStatusMove(MoveId.CELEBRATE, PokemonType.NORMAL, -1, 40, -1, 0, 6)
// NB: This needs a lambda function as the user will not be logged in by the time the moves are initialized .attr(CelebrateAttr),
.attr(MessageAttr, () => i18next.t("moveTriggers:celebrate", { playerName: loggedInUser?.username })),
new StatusMove(MoveId.HOLD_HANDS, PokemonType.NORMAL, -1, 40, -1, 0, 6) new StatusMove(MoveId.HOLD_HANDS, PokemonType.NORMAL, -1, 40, -1, 0, 6)
.ignoresSubstitute() .ignoresSubstitute()
.target(MoveTarget.NEAR_ALLY), .target(MoveTarget.NEAR_ALLY),
@ -10594,12 +10608,7 @@ export function initMoves() {
.attr(StatStageChangeAttr, [ Stat.SPD ], -1) .attr(StatStageChangeAttr, [ Stat.SPD ], -1)
.reflectable(), .reflectable(),
new SelfStatusMove(MoveId.LASER_FOCUS, PokemonType.NORMAL, -1, 30, -1, 0, 7) new SelfStatusMove(MoveId.LASER_FOCUS, PokemonType.NORMAL, -1, 30, -1, 0, 7)
.attr(AddBattlerTagAttr, BattlerTagType.ALWAYS_CRIT, true, false) .attr(AddBattlerTagAttr, BattlerTagType.ALWAYS_CRIT, true, false),
.attr(MessageAttr, (user) =>
i18next.t("battlerTags:laserFocusOnAdd", {
pokemonNameWithAffix: getPokemonNameWithAffix(user),
}),
),
new StatusMove(MoveId.GEAR_UP, PokemonType.STEEL, -1, 20, -1, 0, 7) new StatusMove(MoveId.GEAR_UP, PokemonType.STEEL, -1, 20, -1, 0, 7)
.attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], 1, false, { condition: (user, target, move) => !![ AbilityId.PLUS, AbilityId.MINUS ].find(a => target.hasAbility(a, false)) }) .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], 1, false, { condition: (user, target, move) => !![ AbilityId.PLUS, AbilityId.MINUS ].find(a => target.hasAbility(a, false)) })
.ignoresSubstitute() .ignoresSubstitute()

View File

@ -17,7 +17,6 @@ import { addWindow, WindowVariant } from "#ui/ui-theme";
import { fixedInt, isLocal, sessionIdKey } from "#utils/common"; import { fixedInt, isLocal, sessionIdKey } from "#utils/common";
import { getCookie } from "#utils/cookies"; import { getCookie } from "#utils/cookies";
import { getEnumValues } from "#utils/enums"; import { getEnumValues } from "#utils/enums";
import { toCamelCase } from "#utils/strings";
import { isBeta } from "#utils/utility-vars"; import { isBeta } from "#utils/utility-vars";
import i18next from "i18next"; import i18next from "i18next";
@ -139,7 +138,7 @@ export class MenuUiHandler extends MessageUiHandler {
this.optionSelectText = addTextObject( this.optionSelectText = addTextObject(
0, 0,
0, 0,
this.menuOptions.map(o => `${i18next.t(`menuUiHandler:${toCamelCase(MenuOptions[o])}`)}`).join("\n"), this.menuOptions.map(o => `${i18next.t(`menuUiHandler:${MenuOptions[o]}`)}`).join("\n"),
TextStyle.WINDOW, TextStyle.WINDOW,
{ maxLines: this.menuOptions.length }, { maxLines: this.menuOptions.length },
); );

View File

@ -2612,7 +2612,7 @@ export class PokedexPageUiHandler extends MessageUiHandler {
// Setting growth rate text // Setting growth rate text
if (isFormCaught) { if (isFormCaught) {
let growthReadable = toTitleCase(GrowthRate[species.growthRate]); let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
const growthAux = toCamelCase(growthReadable); const growthAux = growthReadable.replace(" ", "_");
if (i18next.exists("growth:" + growthAux)) { if (i18next.exists("growth:" + growthAux)) {
growthReadable = i18next.t(("growth:" + growthAux) as any); growthReadable = i18next.t(("growth:" + growthAux) as any);
} }

View File

@ -72,7 +72,7 @@ import {
import type { StarterPreferences } from "#utils/data"; import type { StarterPreferences } from "#utils/data";
import { loadStarterPreferences, saveStarterPreferences } from "#utils/data"; import { loadStarterPreferences, saveStarterPreferences } from "#utils/data";
import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils"; import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils";
import { toCamelCase, toTitleCase } from "#utils/strings"; import { toTitleCase } from "#utils/strings";
import { argbFromRgba } from "@material/material-color-utilities"; import { argbFromRgba } from "@material/material-color-utilities";
import i18next from "i18next"; import i18next from "i18next";
import type { GameObjects } from "phaser"; import type { GameObjects } from "phaser";
@ -2263,7 +2263,7 @@ export class StarterSelectUiHandler extends MessageUiHandler {
}); });
}; };
options.push({ options.push({
label: i18next.t("menuUiHandler:pokedex"), label: i18next.t("menuUiHandler:POKEDEX"),
handler: () => { handler: () => {
ui.setMode(UiMode.STARTER_SELECT).then(() => { ui.setMode(UiMode.STARTER_SELECT).then(() => {
const attributes = { const attributes = {
@ -3464,7 +3464,7 @@ export class StarterSelectUiHandler extends MessageUiHandler {
//Growth translate //Growth translate
let growthReadable = toTitleCase(GrowthRate[species.growthRate]); let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
const growthAux = toCamelCase(growthReadable); const growthAux = growthReadable.replace(" ", "_");
if (i18next.exists("growth:" + growthAux)) { if (i18next.exists("growth:" + growthAux)) {
growthReadable = i18next.t(("growth:" + growthAux) as any); growthReadable = i18next.t(("growth:" + growthAux) as any);
} }

View File

@ -1,3 +1,4 @@
import { globalScene } from "#app/global-scene";
import { Status } from "#data/status-effect"; import { Status } from "#data/status-effect";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { BattleType } from "#enums/battle-type"; import { BattleType } from "#enums/battle-type";
@ -178,13 +179,18 @@ describe("Moves - Whirlwind", () => {
const eligibleEnemy = enemyParty.filter(p => p.hp > 0 && p.isAllowedInBattle()); const eligibleEnemy = enemyParty.filter(p => p.hp > 0 && p.isAllowedInBattle());
expect(eligibleEnemy.length).toBe(1); expect(eligibleEnemy.length).toBe(1);
// Spy on the queueMessage function
const queueSpy = vi.spyOn(globalScene.phaseManager, "queueMessage");
// Player uses Whirlwind; opponent uses Splash // Player uses Whirlwind; opponent uses Splash
game.move.select(MoveId.WHIRLWIND); game.move.select(MoveId.WHIRLWIND);
await game.move.selectEnemyMove(MoveId.SPLASH); await game.move.selectEnemyMove(MoveId.SPLASH);
await game.toNextTurn(); await game.toNextTurn();
const player = game.field.getPlayerPokemon(); // Verify that the failure message is displayed for Whirlwind
expect(player).toHaveUsedMove({ move: MoveId.WHIRLWIND, result: MoveResult.FAIL }); expect(queueSpy).toHaveBeenCalledWith(expect.stringContaining("But it failed"));
// Verify the opponent's Splash message
expect(queueSpy).toHaveBeenCalledWith(expect.stringContaining("But nothing happened!"));
}); });
it("should not pull in the other trainer's pokemon in a partner trainer battle", async () => { it("should not pull in the other trainer's pokemon in a partner trainer battle", async () => {