mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 13:59:27 +02:00
Merge branch 'beta' into egg-move-scripts
This commit is contained in:
commit
b55c2433bd
61
.devcontainer/devcontainer.json
Normal file
61
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,61 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
|
||||
{
|
||||
"name": "Node.js & TypeScript",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/github-cli:1": {
|
||||
"installDirectlyFromGitHubRelease": true,
|
||||
"version": "latest"
|
||||
},
|
||||
"ghcr.io/devcontainers-extra/features/pnpm:2": {
|
||||
"version": "latest"
|
||||
}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
// # Formatter configs
|
||||
"editor.defaultFormatter": "biomejs.biome",
|
||||
"editor.tabSize": 2,
|
||||
"editor.insertSpaces": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.addMissingImports.ts": "always",
|
||||
"source.removeUnusedImports": "always",
|
||||
"source.fixAll.biome": "always",
|
||||
"source.organizeImports.biome": "always"
|
||||
},
|
||||
"biome.suggestInstallingGlobally": false,
|
||||
|
||||
// # JS/TS setting overrides
|
||||
"javascript.preferences.importModuleSpecifier": "non-relative",
|
||||
"javascript.preferences.importModuleSpecifierEnding": "index",
|
||||
"javascript.preferGoToSourceDefinition": true,
|
||||
"javascript.updateImportsOnFileMove.enabled": "always",
|
||||
|
||||
"typescript.preferences.importModuleSpecifier": "non-relative",
|
||||
"typescript.preferences.importModuleSpecifierEnding": "index",
|
||||
"typescript.preferGoToSourceDefinition": true,
|
||||
"typescript.updateImportsOnFileMove.enabled": "always",
|
||||
|
||||
"typescript.tsserver.experimental.enableProjectDiagnostics": true,
|
||||
|
||||
// # Miscellaneous
|
||||
"npm.packageManager": "pnpm",
|
||||
"npm.scriptRunner": "pnpm",
|
||||
"vitest.cliArguments": "--no-isolate"
|
||||
},
|
||||
"extensions": [
|
||||
"biomejs.biome",
|
||||
"YoavBls.pretty-ts-errors",
|
||||
"vitest.explorer",
|
||||
"adpyke.codesnap", // Bind to a hotkey (ctrl+\, etc) for best results
|
||||
"aaron-bond.better-comments",
|
||||
"MuTsunTsai.jsdoc-link"
|
||||
]
|
||||
}
|
||||
},
|
||||
"postCreateCommand": "pnpm install",
|
||||
"forwardPorts": [8000]
|
||||
}
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -12,9 +12,10 @@ dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode
|
||||
# Editor directories and files (excluding `extensions.json` for devcontainer)
|
||||
*.code-workspace
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
|
@ -26,3 +26,4 @@ ignore:
|
||||
- .git
|
||||
- public
|
||||
- dist
|
||||
- .devcontainer
|
||||
|
13
.vscode/extensions.json
vendored
Normal file
13
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"biomejs.biome",
|
||||
"YoavBls.pretty-ts-errors",
|
||||
"vitest.explorer",
|
||||
|
||||
// This stuff isn't mandatory - it's just nice to have :)
|
||||
|
||||
"adpyke.codesnap", // Bind to a hotkey (ctrl+\, etc) for best results
|
||||
"aaron-bond.better-comments",
|
||||
"MuTsunTsai.jsdoc-link"
|
||||
]
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
|
||||
Thank you for taking the time to contribute, every little bit helps. This project is entirely open-source and unmonetized - community contributions are what keep it alive!
|
||||
|
||||
Please make sure you understand everything relevant to your changes from the [Table of Contents](#-table-of-contents), and absolutely *feel free to reach out in the **#dev-corner** channel on [Discord](https://discord.gg/pokerogue)*.
|
||||
Please make sure you understand everything relevant to your changes from the [Table of Contents](#-table-of-contents), and absolutely *feel free to reach out in the **#dev-corner** channel on [Discord](https://discord.gg/pokerogue)*.
|
||||
We are here to help and the better you understand what you're working on, the easier it will be for it to find its way into the game.
|
||||
|
||||
## 📄 Table of Contents
|
||||
@ -16,19 +16,36 @@ We are here to help and the better you understand what you're working on, the ea
|
||||
|
||||
## 🛠️ Development Basics
|
||||
|
||||
PokéRogue is built with [Typescript](https://www.typescriptlang.org/docs/handbook/intro.html), using the [Phaser](https://github.com/phaserjs/phaser) game framework.
|
||||
PokéRogue is built with [Typescript](https://www.typescriptlang.org/docs/handbook/intro.html), using the [Phaser](https://github.com/phaserjs/phaser) game framework.
|
||||
|
||||
If you have the motivation and experience with Typescript/Javascript (or are willing to learn) you can contribute by forking the repository and making pull requests with contributions.
|
||||
If you have the motivation and experience with Typescript/Javascript (or are willing to learn), you can contribute by forking the repository and making pull requests with contributions.
|
||||
|
||||
## 💻 Environment Setup
|
||||
|
||||
### Prerequisites
|
||||
### Codespaces/Devcontainer Environment
|
||||
|
||||
- node: >=22.14.0 - [manage with pnpm](https://pnpm.io/cli/env) | [manage with fnm](https://github.com/Schniz/fnm) | [manage with nvm](https://github.com/nvm-sh/nvm)
|
||||
Arguably the easiest way to get started is by using the prepared development environment.
|
||||
|
||||
We have a `.devcontainer/devcontainer.json` file, meaning we are compatible with:
|
||||
|
||||
- [![Open in GitHub Codespaces][codespaces-badge]][codespaces-link], or
|
||||
- the [Visual Studio Code Remote - Containers][devcontainer-ext] extension.
|
||||
|
||||
This Linux environment comes with all required dependencies needed to start working on the project.
|
||||
|
||||
[codespaces-badge]: <https://github.com/codespaces/badge.svg>
|
||||
[codespaces-link]: <https://github.com/codespaces/new?hide_repo_select=true&repo=620476224&ref=beta>
|
||||
[devcontainer-ext]: <https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers>
|
||||
|
||||
### Local Development
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
- node: >=22.14.0 - [manage with pnpm](https://pnpm.io/cli/env) | [manage with fnm](https://github.com/Schniz/fnm) | [manage with nvm](https://github.com/nvm-sh/nvm) | [manage with volta.sh](https://volta.sh/)
|
||||
- pnpm: 10.x - [how to install](https://pnpm.io/installation) (not recommended to install via `npm` on Windows native) | [alternate method - volta.sh](https://volta.sh/)
|
||||
- The repository [forked](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) and [cloned](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) locally on your device
|
||||
|
||||
### Running Locally
|
||||
#### Running Locally
|
||||
|
||||
1. Run `pnpm install` from the repository root
|
||||
- *if you run into any errors, reach out in the **#dev-corner** channel on Discord*
|
||||
@ -36,7 +53,7 @@ If you have the motivation and experience with Typescript/Javascript (or are wil
|
||||
|
||||
## 🚀 Getting Started
|
||||
|
||||
A great way to develop an understanding of how the project works is to look at test cases (located in [the `test` folder](./test/)).
|
||||
A great way to develop an understanding of how the project works is to look at test cases (located in [the `test` folder](./test/)).
|
||||
Tests show you both how things are supposed to work and the expected "flow" to get from point A to point B in battles.
|
||||
|
||||
*This is a big project and you will be confused at times - never be afraid to reach out and ask questions in **#dev-corner***!
|
||||
@ -50,7 +67,7 @@ Most issues are bugs and are labeled with their area, such as `Move`, `Ability`,
|
||||
- `P2`: Minor - Incorrect (but non-crashing) move/ability/interaction
|
||||
- `P3`: No gameplay impact - typo, minor graphical error, etc.
|
||||
|
||||
Also under issues, you can take a look at the [List of Partial / Unimplemented Moves and Abilities](https://github.com/pagefaultgames/pokerogue/issues/3503) and the [Bug Board](https://github.com/orgs/pagefaultgames/projects/3) (the latter is essentially the same as the issues page but easier to work with).
|
||||
Also under issues, you can take a look at the [List of Partial / Unimplemented Moves and Abilities](https://github.com/pagefaultgames/pokerogue/issues/3503) and the [Bug Board](https://github.com/orgs/pagefaultgames/projects/3). The latter is essentially the same as the issues page, so take your pick.
|
||||
|
||||
You are free to comment on any issue so that you may be assigned to it and we can avoid multiple people working on the same thing.
|
||||
|
||||
@ -58,7 +75,7 @@ You are free to comment on any issue so that you may be assigned to it and we ca
|
||||
|
||||
You can find the auto-generated documentation [here](https://pagefaultgames.github.io/pokerogue/main/index.html).
|
||||
|
||||
Additionally, the [docs folder](./docs) contains a variety of in-depth documents and guides useful for aspiring contributors.
|
||||
Additionally, the [docs folder](./docs) contains a variety of in-depth documents and guides useful for aspiring contributors. \
|
||||
Notable topics include:
|
||||
- [Commenting your code](./docs/comments.md)
|
||||
- [Linting & Formatting](./docs/linting.md)
|
||||
@ -86,17 +103,17 @@ const overrides = {
|
||||
```
|
||||
|
||||
Read through `src/overrides.ts` file to find the override that fits your needs - there are a lot of them!
|
||||
If the situation you're trying to test can't be created using existing overrides (or with the [Dev Save](#-development-save-file)), reach out in **#dev-corner**.
|
||||
If the situation you're trying to test can't be created using existing overrides (or with the [Dev Save](#-development-save-file)), reach out in **#dev-corner**.
|
||||
You can get help testing your specific changes, and you might have found a new override that needs to be created!
|
||||
|
||||
### 2 - Automatic Testing
|
||||
|
||||
> PokéRogue uses [Vitest](https://vitest.dev/) for automatic testing. Checking out the existing tests in the [test](./test/) folder is a great way to understand how this works, and to get familiar with the project as a whole.
|
||||
|
||||
To make sure your changes didn't break any existing test cases, run `pnpm test:silent` in your terminal. You can also provide an argument to the command: to run only the Dancer (ability) tests, you could write `pnpm test:silent dancer`.
|
||||
To make sure your changes didn't break any existing test cases, run `pnpm test:silent` in your terminal. You can also provide an argument to the command: to run only the Dancer (ability) tests, you could write `pnpm test:silent dancer`.
|
||||
- __Note that passing all test cases does *not* guarantee that everything is working properly__. The project does not have complete regression testing.
|
||||
|
||||
Most non-trivial changes (*especially bug fixes*) should come along with new test cases.
|
||||
Most non-trivial changes (*especially bug fixes*) should come along with new test cases.
|
||||
- To make a new test file, run `pnpm test:create` and follow the prompts. If the move/ability/etc. you're modifying already has tests, simply add new cases to the end of the file. As mentioned before, the easiest way to get familiar with the system and understand how to write your own tests is simply to read the existing tests, particularly ones similar to the tests you intend to write.
|
||||
- Ensure that new tests:
|
||||
- Are deterministic. In other words, the test should never pass or fail when it shouldn't due to randomness. This involves primarily ensuring that abilities and moves are never randomly selected.
|
||||
@ -107,4 +124,4 @@ Most non-trivial changes (*especially bug fixes*) should come along with new tes
|
||||
> Some issues may require you to have unlocks on your save file which go beyond normal overrides. For this reason, the repository contains a [save file](../test/test-utils/saves/everything.psrv) with _everything_ unlocked (even ones not legitimately obtainable, like unimplemented variant shinies).
|
||||
|
||||
1. Start the game up locally and navigate to `Menu -> Manage Data -> Import Data`
|
||||
2. Select [everything.prsv](test/test-utils/saves/everything.prsv) (`test/test-utils/saves/everything.prsv`) and confirm.
|
||||
2. Select [everything.prsv](test/test-utils/saves/everything.prsv) (`test/test-utils/saves/everything.prsv`) and confirm.
|
@ -37,7 +37,6 @@
|
||||
"!**/src/data/balance/tms.ts"
|
||||
]
|
||||
},
|
||||
|
||||
"assist": {
|
||||
"actions": {
|
||||
"source": {
|
||||
|
@ -17,8 +17,6 @@
|
||||
"eggMoves:parse": "node scripts/parse-egg-moves/main.js",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"typecheck:scripts": "tsc -p scripts/jsconfig.json",
|
||||
"eslint": "eslint --fix .",
|
||||
"eslint-ci": "eslint .",
|
||||
"biome": "biome check --write --changed --no-errors-on-unmatched --diagnostic-level=error",
|
||||
"biome-ci": "biome ci --diagnostic-level=error --reporter=github --no-errors-on-unmatched",
|
||||
"docs": "typedoc",
|
||||
|
146
public/images/ui/legacy/party_slot_main_short.json
Normal file
146
public/images/ui/legacy/party_slot_main_short.json
Normal file
@ -0,0 +1,146 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "party_slot_main_short.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 110,
|
||||
"h": 294
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "party_slot_main_short",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "party_slot_main_short_sel",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 41,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "party_slot_main_short_fnt",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 82,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "party_slot_main_short_fnt_sel",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 123,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "party_slot_main_short_swap",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 164,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "party_slot_main_short_swap_sel",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 205,
|
||||
"w": 110,
|
||||
"h": 41
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:29685f2f538901cf5bf7f0ed2ea867c3:a080ea6c8cccd1e03244214053e79796:565f7afc5ca419b6ba8dbce51ea30818$"
|
||||
}
|
||||
}
|
BIN
public/images/ui/legacy/party_slot_main_short.png
Normal file
BIN
public/images/ui/legacy/party_slot_main_short.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 753 B |
@ -1 +1 @@
|
||||
Subproject commit 1ea8f865e30d1940caa0fceeabf37ae2e4689471
|
||||
Subproject commit 17b353bd5752b7ce5c9e7051a17ec310e0b99c1e
|
@ -1184,7 +1184,7 @@ export class PostDefendTypeChangeAbAttr extends PostDefendAbAttr {
|
||||
return i18next.t("abilityTriggers:postDefendTypeChange", {
|
||||
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
|
||||
abilityName,
|
||||
typeName: i18next.t(`pokemonInfo:Type.${PokemonType[this.type]}`),
|
||||
typeName: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.type])}`),
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1749,7 +1749,7 @@ export class PokemonTypeChangeAbAttr extends PreAttackAbAttr {
|
||||
getTriggerMessage({ pokemon }: AugmentMoveInteractionAbAttrParams, _abilityName: string): string {
|
||||
return i18next.t("abilityTriggers:pokemonTypeChange", {
|
||||
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
|
||||
moveType: i18next.t(`pokemonInfo:Type.${PokemonType[this.moveType]}`),
|
||||
moveType: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.moveType])}`),
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -6222,7 +6222,9 @@ export class TerrainEventTypeChangeAbAttr extends PostSummonAbAttr {
|
||||
if (currentTerrain === TerrainType.NONE) {
|
||||
return i18next.t("abilityTriggers:pokemonTypeChangeRevert", { pokemonNameWithAffix });
|
||||
}
|
||||
const moveType = i18next.t(`pokemonInfo:Type.${PokemonType[this.determineTypeChange(pokemon, currentTerrain)[0]]}`);
|
||||
const moveType = i18next.t(
|
||||
`pokemonInfo:type.${toCamelCase(PokemonType[this.determineTypeChange(pokemon, currentTerrain)[0]])}`,
|
||||
);
|
||||
return i18next.t("abilityTriggers:pokemonTypeChange", { pokemonNameWithAffix, moveType });
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import { TimeOfDay } from "#enums/time-of-day";
|
||||
import { TrainerType } from "#enums/trainer-type";
|
||||
import { randSeedInt } from "#utils/common";
|
||||
import { getEnumValues } from "#utils/enums";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
|
||||
export function getBiomeName(biome: BiomeId | -1) {
|
||||
@ -15,13 +16,13 @@ export function getBiomeName(biome: BiomeId | -1) {
|
||||
}
|
||||
switch (biome) {
|
||||
case BiomeId.GRASS:
|
||||
return i18next.t("biome:GRASS");
|
||||
return i18next.t("biome:grass");
|
||||
case BiomeId.RUINS:
|
||||
return i18next.t("biome:RUINS");
|
||||
return i18next.t("biome:ruins");
|
||||
case BiomeId.END:
|
||||
return i18next.t("biome:END");
|
||||
return i18next.t("biome:end");
|
||||
default:
|
||||
return i18next.t(`biome:${BiomeId[biome].toUpperCase()}`);
|
||||
return i18next.t(`biome:${toCamelCase(BiomeId[biome])}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ import type { Pokemon } from "#field/pokemon";
|
||||
import type { SpeciesStatBoosterItem, SpeciesStatBoosterModifierType } from "#modifiers/modifier-type";
|
||||
import { coerceArray, isNullOrUndefined, randSeedInt } from "#utils/common";
|
||||
import { getPokemonSpecies } from "#utils/pokemon-utils";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
|
||||
export enum SpeciesWildEvolutionDelay {
|
||||
@ -133,11 +134,11 @@ export class SpeciesEvolutionCondition {
|
||||
case EvoCondKey.FRIENDSHIP:
|
||||
return i18next.t("pokemonEvolutions:friendship");
|
||||
case EvoCondKey.TIME:
|
||||
return i18next.t(`pokemonEvolutions:timeOfDay.${TimeOfDay[cond.time[cond.time.length - 1]]}`); // For Day and Night evos, the key we want goes last
|
||||
return i18next.t(`pokemonEvolutions:timeOfDay.${toCamelCase(TimeOfDay[cond.time[cond.time.length - 1]])}`); // For Day and Night evos, the key we want goes last
|
||||
case EvoCondKey.MOVE_TYPE:
|
||||
return i18next.t("pokemonEvolutions:moveType", {type: i18next.t(`pokemonInfo:Type.${PokemonType[cond.pkmnType]}`)});
|
||||
return i18next.t("pokemonEvolutions:moveType", {type: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[cond.pkmnType])}`)});
|
||||
case EvoCondKey.PARTY_TYPE:
|
||||
return i18next.t("pokemonEvolutions:partyType", {type: i18next.t(`pokemonInfo:Type.${PokemonType[cond.pkmnType]}`)});
|
||||
return i18next.t("pokemonEvolutions:partyType", {type: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[cond.pkmnType])}`)});
|
||||
case EvoCondKey.GENDER:
|
||||
return i18next.t("pokemonEvolutions:gender", {gender: getGenderSymbol(cond.gender)});
|
||||
case EvoCondKey.MOVE:
|
||||
@ -156,7 +157,7 @@ export class SpeciesEvolutionCondition {
|
||||
case EvoCondKey.SPECIES_CAUGHT:
|
||||
return i18next.t("pokemonEvolutions:caught", {species: getPokemonSpecies(cond.speciesCaught).name});
|
||||
case EvoCondKey.HELD_ITEM:
|
||||
return i18next.t(`pokemonEvolutions:heldItem.${cond.itemKey}`);
|
||||
return i18next.t(`pokemonEvolutions:heldItem.${toCamelCase(cond.itemKey)}`);
|
||||
}
|
||||
}).filter(s => !isNullOrUndefined(s)); // Filter out stringless conditions
|
||||
return this.desc;
|
||||
@ -245,7 +246,7 @@ export class SpeciesFormEvolution {
|
||||
}
|
||||
if (this.item) {
|
||||
const itemDescription = i18next.t(`modifierType:EvolutionItem.${EvolutionItem[this.item].toUpperCase()}`);
|
||||
const rarity = this.item > 50 ? i18next.t("pokemonEvolutions:ULTRA") : i18next.t("pokemonEvolutions:GREAT");
|
||||
const rarity = this.item > 50 ? i18next.t("pokemonEvolutions:ultra") : i18next.t("pokemonEvolutions:great");
|
||||
strings.push(i18next.t("pokemonEvolutions:using", {item: itemDescription, tier: rarity}));
|
||||
}
|
||||
if (this.condition) {
|
||||
|
@ -1505,9 +1505,9 @@ export function initSpecies() {
|
||||
new PokemonForm("Hero of Many Battles", "hero-of-many-battles", PokemonType.FIGHTING, null, 2.9, 210, AbilityId.DAUNTLESS_SHIELD, AbilityId.NONE, AbilityId.NONE, 660, 92, 120, 115, 80, 115, 138, 10, 0, 335, false, "", true),
|
||||
new PokemonForm("Crowned", "crowned", PokemonType.FIGHTING, PokemonType.STEEL, 2.9, 785, AbilityId.DAUNTLESS_SHIELD, AbilityId.NONE, AbilityId.NONE, 700, 92, 120, 140, 80, 140, 128, 10, 0, 360)
|
||||
),
|
||||
new PokemonSpecies(SpeciesId.ETERNATUS, 8, false, true, false, "Gigantic Pokémon", PokemonType.POISON, PokemonType.DRAGON, 20, 950, AbilityId.PRESSURE, AbilityId.NONE, AbilityId.NONE, 690, 140, 85, 95, 145, 95, 130, 255, 0, 345, GrowthRate.SLOW, null, false, true,
|
||||
new PokemonForm("Normal", "", PokemonType.POISON, PokemonType.DRAGON, 20, 950, AbilityId.PRESSURE, AbilityId.NONE, AbilityId.NONE, 690, 140, 85, 95, 145, 95, 130, 255, 0, 345, false, null, true),
|
||||
new PokemonForm("E-Max", "eternamax", PokemonType.POISON, PokemonType.DRAGON, 100, 999.9, AbilityId.PRESSURE, AbilityId.NONE, AbilityId.NONE, 1125, 255, 115, 250, 125, 250, 130, 255, 0, 345)
|
||||
new PokemonSpecies(SpeciesId.ETERNATUS, 8, false, true, false, "Gigantic Pokémon", PokemonType.POISON, PokemonType.DRAGON, 20, 950, AbilityId.PRESSURE, AbilityId.NONE, AbilityId.NONE, 690, 140, 85, 95, 145, 95, 130, 45, 0, 345, GrowthRate.SLOW, null, false, true,
|
||||
new PokemonForm("Normal", "", PokemonType.POISON, PokemonType.DRAGON, 20, 950, AbilityId.PRESSURE, AbilityId.NONE, AbilityId.NONE, 690, 140, 85, 95, 145, 95, 130, 45, 0, 345, false, null, true),
|
||||
new PokemonForm("E-Max", "eternamax", PokemonType.POISON, PokemonType.DRAGON, 100, 999.9, AbilityId.PRESSURE, AbilityId.NONE, AbilityId.NONE, 1125, 255, 115, 250, 125, 250, 130, 45, 0, 345)
|
||||
),
|
||||
new PokemonSpecies(SpeciesId.KUBFU, 8, true, false, false, "Wushu Pokémon", PokemonType.FIGHTING, null, 0.6, 12, AbilityId.INNER_FOCUS, AbilityId.NONE, AbilityId.NONE, 385, 60, 90, 60, 53, 50, 72, 3, 50, 77, GrowthRate.SLOW, 87.5, false),
|
||||
new PokemonSpecies(SpeciesId.URSHIFU, 8, true, false, false, "Wushu Pokémon", PokemonType.FIGHTING, PokemonType.DARK, 1.9, 105, AbilityId.UNSEEN_FIST, AbilityId.NONE, AbilityId.NONE, 550, 100, 130, 100, 63, 60, 97, 3, 50, 275, GrowthRate.SLOW, 87.5, false, true,
|
||||
|
@ -50,6 +50,7 @@ import type {
|
||||
} from "#types/battler-tags";
|
||||
import type { Mutable } from "#types/type-helpers";
|
||||
import { BooleanHolder, coerceArray, getFrameMs, isNullOrUndefined, NumberHolder, toDmgValue } from "#utils/common";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
|
||||
/**
|
||||
* @module
|
||||
@ -2305,7 +2306,7 @@ export class TypeBoostTag extends SerializableBattlerTag {
|
||||
globalScene.phaseManager.queueMessage(
|
||||
i18next.t("abilityTriggers:typeImmunityPowerBoost", {
|
||||
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
|
||||
typeName: i18next.t(`pokemonInfo:Type.${PokemonType[this.boostedType]}`),
|
||||
typeName: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.boostedType])}`),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
@ -11,11 +11,11 @@ import { NumberHolder, randSeedInt, toDmgValue } from "#utils/common";
|
||||
import i18next from "i18next";
|
||||
|
||||
export function getBerryName(berryType: BerryType): string {
|
||||
return i18next.t(`berry:${BerryType[berryType]}.name`);
|
||||
return i18next.t(`berry:${BerryType[berryType].toLowerCase()}.name`);
|
||||
}
|
||||
|
||||
export function getBerryEffectDescription(berryType: BerryType): string {
|
||||
return i18next.t(`berry:${BerryType[berryType]}.effect`);
|
||||
return i18next.t(`berry:${BerryType[berryType].toLowerCase()}.effect`);
|
||||
}
|
||||
|
||||
export type BerryPredicate = (pokemon: Pokemon) => boolean;
|
||||
|
@ -756,7 +756,7 @@ export class SingleTypeChallenge extends Challenge {
|
||||
}
|
||||
|
||||
getDescription(overrideValue: number = this.value): string {
|
||||
const type = i18next.t(`pokemonInfo:Type.${PokemonType[overrideValue - 1]}`);
|
||||
const type = i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[overrideValue - 1])}`);
|
||||
const typeColor = `[color=${TypeColor[PokemonType[overrideValue - 1]]}][shadow=${TypeShadow[PokemonType[this.value - 1]]}]${type}[/shadow][/color]`;
|
||||
const defaultDesc = i18next.t("challenges:singleType.desc_default");
|
||||
const typeDesc = i18next.t("challenges:singleType.desc", {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,43 +2,43 @@
|
||||
// that caused this to be moved out in the first place
|
||||
export const doubleBattleDialogue = {
|
||||
blue_red_double: {
|
||||
encounter: ["doubleBattleDialogue:blue_red_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:blue_red_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:blueRedDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:blueRedDouble.victory.1"],
|
||||
},
|
||||
red_blue_double: {
|
||||
encounter: ["doubleBattleDialogue:red_blue_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:red_blue_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:redBlueDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:redBlueDouble.victory.1"],
|
||||
},
|
||||
tate_liza_double: {
|
||||
encounter: ["doubleBattleDialogue:tate_liza_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:tate_liza_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:tateLizaDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:tateLizaDouble.victory.1"],
|
||||
},
|
||||
liza_tate_double: {
|
||||
encounter: ["doubleBattleDialogue:liza_tate_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:liza_tate_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:lizaTateDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:lizaTateDouble.victory.1"],
|
||||
},
|
||||
wallace_steven_double: {
|
||||
encounter: ["doubleBattleDialogue:wallace_steven_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:wallace_steven_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:wallaceStevenDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:wallaceStevenDouble.victory.1"],
|
||||
},
|
||||
steven_wallace_double: {
|
||||
encounter: ["doubleBattleDialogue:steven_wallace_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:steven_wallace_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:stevenWallaceDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:stevenWallaceDouble.victory.1"],
|
||||
},
|
||||
alder_iris_double: {
|
||||
encounter: ["doubleBattleDialogue:alder_iris_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:alder_iris_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:alderIrisDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:alderIrisDouble.victory.1"],
|
||||
},
|
||||
iris_alder_double: {
|
||||
encounter: ["doubleBattleDialogue:iris_alder_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:iris_alder_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:irisAlderDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:irisAlderDouble.victory.1"],
|
||||
},
|
||||
marnie_piers_double: {
|
||||
encounter: ["doubleBattleDialogue:marnie_piers_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:marnie_piers_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:marniePiersDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:marniePiersDouble.victory.1"],
|
||||
},
|
||||
piers_marnie_double: {
|
||||
encounter: ["doubleBattleDialogue:piers_marnie_double.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:piers_marnie_double.victory.1"],
|
||||
encounter: ["doubleBattleDialogue:piersMarnieDouble.encounter.1"],
|
||||
victory: ["doubleBattleDialogue:piersMarnieDouble.victory.1"],
|
||||
},
|
||||
};
|
||||
|
@ -6675,7 +6675,7 @@ export class CopyBiomeTypeAttr extends MoveEffectAttr {
|
||||
user.summonData.types = [ typeChange ];
|
||||
user.updateInfo();
|
||||
|
||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:transformedIntoType", { pokemonName: getPokemonNameWithAffix(user), typeName: i18next.t(`pokemonInfo:Type.${PokemonType[typeChange]}`) }));
|
||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:transformedIntoType", { pokemonName: getPokemonNameWithAffix(user), typeName: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[typeChange])}`) }));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -6803,7 +6803,7 @@ export class AddTypeAttr extends MoveEffectAttr {
|
||||
target.summonData.addedType = this.type;
|
||||
target.updateInfo();
|
||||
|
||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:addType", { typeName: i18next.t(`pokemonInfo:Type.${PokemonType[this.type]}`), pokemonName: getPokemonNameWithAffix(target) }));
|
||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:addType", { typeName: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.type])}`), pokemonName: getPokemonNameWithAffix(target) }));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -6825,7 +6825,7 @@ export class FirstMoveTypeAttr extends MoveEffectAttr {
|
||||
|
||||
const firstMoveType = target.getMoveset()[0].getMove().type;
|
||||
user.summonData.types = [ firstMoveType ];
|
||||
globalScene.phaseManager.queueMessage(i18next.t("battle:transformedIntoType", { pokemonName: getPokemonNameWithAffix(user), type: i18next.t(`pokemonInfo:Type.${PokemonType[firstMoveType]}`) }));
|
||||
globalScene.phaseManager.queueMessage(i18next.t("battle:transformedIntoType", { pokemonName: getPokemonNameWithAffix(user), type: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[firstMoveType])}`) }));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -8512,7 +8512,7 @@ export function initMoves() {
|
||||
.punchingMove(),
|
||||
new AttackMove(MoveId.SCRATCH, PokemonType.NORMAL, MoveCategory.PHYSICAL, 40, 100, 35, -1, 0, 1),
|
||||
new AttackMove(MoveId.VISE_GRIP, PokemonType.NORMAL, MoveCategory.PHYSICAL, 55, 100, 30, -1, 0, 1),
|
||||
new AttackMove(MoveId.GUILLOTINE, PokemonType.NORMAL, MoveCategory.PHYSICAL, 200, 30, 5, -1, 0, 1)
|
||||
new AttackMove(MoveId.GUILLOTINE, PokemonType.NORMAL, MoveCategory.PHYSICAL, 250, 30, 5, -1, 0, 1)
|
||||
.attr(OneHitKOAttr)
|
||||
.attr(OneHitKOAccuracyAttr),
|
||||
new ChargingAttackMove(MoveId.RAZOR_WIND, PokemonType.NORMAL, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 1)
|
||||
@ -8565,7 +8565,7 @@ export function initMoves() {
|
||||
new AttackMove(MoveId.HORN_ATTACK, PokemonType.NORMAL, MoveCategory.PHYSICAL, 65, 100, 25, -1, 0, 1),
|
||||
new AttackMove(MoveId.FURY_ATTACK, PokemonType.NORMAL, MoveCategory.PHYSICAL, 15, 85, 20, -1, 0, 1)
|
||||
.attr(MultiHitAttr),
|
||||
new AttackMove(MoveId.HORN_DRILL, PokemonType.NORMAL, MoveCategory.PHYSICAL, 200, 30, 5, -1, 0, 1)
|
||||
new AttackMove(MoveId.HORN_DRILL, PokemonType.NORMAL, MoveCategory.PHYSICAL, 250, 30, 5, -1, 0, 1)
|
||||
.attr(OneHitKOAttr)
|
||||
.attr(OneHitKOAccuracyAttr),
|
||||
new AttackMove(MoveId.TACKLE, PokemonType.NORMAL, MoveCategory.PHYSICAL, 40, 100, 35, -1, 0, 1),
|
||||
@ -8746,7 +8746,7 @@ export function initMoves() {
|
||||
.attr(MovePowerMultiplierAttr, (user, target, move) => globalScene.arena.getTerrainType() === TerrainType.GRASSY && target.isGrounded() ? 0.5 : 1)
|
||||
.makesContact(false)
|
||||
.target(MoveTarget.ALL_NEAR_OTHERS),
|
||||
new AttackMove(MoveId.FISSURE, PokemonType.GROUND, MoveCategory.PHYSICAL, 200, 30, 5, -1, 0, 1)
|
||||
new AttackMove(MoveId.FISSURE, PokemonType.GROUND, MoveCategory.PHYSICAL, 250, 30, 5, -1, 0, 1)
|
||||
.attr(OneHitKOAttr)
|
||||
.attr(OneHitKOAccuracyAttr)
|
||||
.attr(HitsTagAttr, BattlerTagType.UNDERGROUND)
|
||||
@ -9528,7 +9528,7 @@ export function initMoves() {
|
||||
new AttackMove(MoveId.SAND_TOMB, PokemonType.GROUND, MoveCategory.PHYSICAL, 35, 85, 15, -1, 0, 3)
|
||||
.attr(TrapAttr, BattlerTagType.SAND_TOMB)
|
||||
.makesContact(false),
|
||||
new AttackMove(MoveId.SHEER_COLD, PokemonType.ICE, MoveCategory.SPECIAL, 200, 30, 5, -1, 0, 3)
|
||||
new AttackMove(MoveId.SHEER_COLD, PokemonType.ICE, MoveCategory.SPECIAL, 250, 30, 5, -1, 0, 3)
|
||||
.attr(IceNoEffectTypeAttr)
|
||||
.attr(OneHitKOAttr)
|
||||
.attr(SheerColdAccuracyAttr),
|
||||
|
@ -82,7 +82,7 @@ export const ATrainersTestEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
||||
encounter.dialogue.intro = [
|
||||
{
|
||||
speaker: `trainerNames:${trainerNameKey}`,
|
||||
text: `${namespace}:${trainerNameKey}.intro_dialogue`,
|
||||
text: `${namespace}:${trainerNameKey}.introDialogue`,
|
||||
},
|
||||
];
|
||||
encounter.options[0].dialogue!.selected = [
|
||||
|
@ -237,7 +237,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
modifierConfigs: bossModifierConfigs,
|
||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||
queueEncounterMessage(`${namespace}:option.1.boss_enraged`);
|
||||
queueEncounterMessage(`${namespace}:option.1.bossEnraged`);
|
||||
globalScene.phaseManager.unshiftNew(
|
||||
"StatStageChangePhase",
|
||||
pokemon.getBattlerIndex(),
|
||||
@ -300,7 +300,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
globalScene.addModifier(seedModifier, false, false, false, true);
|
||||
}
|
||||
});
|
||||
queueEncounterMessage(`${namespace}:option.1.food_stash`);
|
||||
queueEncounterMessage(`${namespace}:option.1.foodStash`);
|
||||
};
|
||||
|
||||
setEncounterRewards({ fillRemaining: true }, undefined, givePartyPokemonReviverSeeds);
|
||||
|
@ -71,7 +71,7 @@ export const AnOfferYouCantRefuseEncounter: MysteryEncounter = MysteryEncounterB
|
||||
text: `${namespace}:intro`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
])
|
||||
@ -152,7 +152,7 @@ export const AnOfferYouCantRefuseEncounter: MysteryEncounter = MysteryEncounterB
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||
selected: [
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
|
@ -254,7 +254,7 @@ export const BerriesAboundEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
||||
undefined,
|
||||
doBerryRewards,
|
||||
);
|
||||
await showEncounterText(`${namespace}:option.2.selected_bad`);
|
||||
await showEncounterText(`${namespace}:option.2.selectedBad`);
|
||||
await initBattleWithEnemyConfig(config);
|
||||
return;
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
])
|
||||
.withOnInit(() => {
|
||||
@ -312,7 +312,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||
})
|
||||
.withPreOptionPhase(async () => {
|
||||
// Player shows off their bug types
|
||||
@ -333,7 +333,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
encounter.selectedOption!.dialogue!.selected = [
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:option.2.selected_0_to_1`,
|
||||
text: `${namespace}:option.2.selected0To1`,
|
||||
},
|
||||
];
|
||||
} else if (numBugTypes < 4) {
|
||||
@ -344,7 +344,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
encounter.selectedOption!.dialogue!.selected = [
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:option.2.selected_2_to_3`,
|
||||
text: `${namespace}:option.2.selected2To3`,
|
||||
},
|
||||
];
|
||||
} else if (numBugTypes < 6) {
|
||||
@ -355,7 +355,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
encounter.selectedOption!.dialogue!.selected = [
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:option.2.selected_4_to_5`,
|
||||
text: `${namespace}:option.2.selected4To5`,
|
||||
},
|
||||
];
|
||||
} else {
|
||||
@ -398,7 +398,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
encounter.selectedOption!.dialogue!.selected = [
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:option.2.selected_6`,
|
||||
text: `${namespace}:option.2.selected6`,
|
||||
},
|
||||
];
|
||||
}
|
||||
@ -421,17 +421,17 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:option.3.selected_dialogue`,
|
||||
text: `${namespace}:option.3.selectedDialogue`,
|
||||
},
|
||||
],
|
||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||
})
|
||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
@ -476,7 +476,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
);
|
||||
});
|
||||
if (!hasValidItem) {
|
||||
return getEncounterText(`${namespace}:option.3.invalid_selection`) ?? null;
|
||||
return getEncounterText(`${namespace}:option.3.invalidSelection`) ?? null;
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -713,7 +713,7 @@ function doBugTypeMoveTutor(): Promise<void> {
|
||||
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO explain
|
||||
return new Promise<void>(async resolve => {
|
||||
const moveOptions = globalScene.currentBattle.mysteryEncounter!.misc.moveTutorOptions;
|
||||
await showEncounterDialogue(`${namespace}:battle_won`, `${namespace}:speaker`);
|
||||
await showEncounterDialogue(`${namespace}:battleWon`, `${namespace}:speaker`);
|
||||
|
||||
const moveInfoOverlay = new MoveInfoOverlay({
|
||||
delayVisibility: false,
|
||||
@ -748,7 +748,7 @@ function doBugTypeMoveTutor(): Promise<void> {
|
||||
|
||||
const result = await selectOptionThenPokemon(
|
||||
optionSelectItems,
|
||||
`${namespace}:teach_move_prompt`,
|
||||
`${namespace}:teachMovePrompt`,
|
||||
undefined,
|
||||
onHoverOverCancel,
|
||||
);
|
||||
|
@ -119,7 +119,7 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
text: `${namespace}:intro`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
])
|
||||
@ -233,7 +233,7 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
// After the battle, offer the player the opportunity to permanently swap ability
|
||||
const abilityWasSwapped = await handleSwapAbility();
|
||||
if (abilityWasSwapped) {
|
||||
await showEncounterText(`${namespace}:option.1.ability_gained`);
|
||||
await showEncounterText(`${namespace}:option.1.abilityGained`);
|
||||
}
|
||||
|
||||
// Play animations once ability swap is complete
|
||||
@ -267,10 +267,10 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:option.2.selected_2`,
|
||||
text: `${namespace}:option.2.selected2`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:option.2.selected_3`,
|
||||
text: `${namespace}:option.2.selected3`,
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
],
|
||||
@ -359,10 +359,10 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:option.3.selected_2`,
|
||||
text: `${namespace}:option.3.selected2`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:option.3.selected_3`,
|
||||
text: `${namespace}:option.3.selected3`,
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
],
|
||||
@ -432,8 +432,8 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
async function handleSwapAbility() {
|
||||
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO: Consider refactoring to avoid async promise executor
|
||||
return new Promise<boolean>(async resolve => {
|
||||
await showEncounterDialogue(`${namespace}:option.1.apply_ability_dialogue`, `${namespace}:speaker`);
|
||||
await showEncounterText(`${namespace}:option.1.apply_ability_message`);
|
||||
await showEncounterDialogue(`${namespace}:option.1.applyAbilityDialogue`, `${namespace}:speaker`);
|
||||
await showEncounterText(`${namespace}:option.1.applyAbilityMessage`);
|
||||
|
||||
globalScene.ui.setMode(UiMode.MESSAGE).then(() => {
|
||||
displayYesNoOptions(resolve);
|
||||
@ -442,7 +442,7 @@ async function handleSwapAbility() {
|
||||
}
|
||||
|
||||
function displayYesNoOptions(resolve) {
|
||||
showEncounterText(`${namespace}:option.1.ability_prompt`, null, 500, false);
|
||||
showEncounterText(`${namespace}:option.1.abilityPrompt`, null, 500, false);
|
||||
const fullOptions = [
|
||||
{
|
||||
label: i18next.t("menu:yes"),
|
||||
|
@ -174,7 +174,7 @@ export const DancingLessonsEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
// Gets +1 to all stats except SPD on battle start
|
||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||
queueEncounterMessage(`${namespace}:option.1.boss_enraged`);
|
||||
queueEncounterMessage(`${namespace}:option.1.bossEnraged`);
|
||||
globalScene.phaseManager.unshiftNew(
|
||||
"StatStageChangePhase",
|
||||
pokemon.getBattlerIndex(),
|
||||
@ -273,8 +273,8 @@ export const DancingLessonsEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
@ -316,7 +316,7 @@ export const DancingLessonsEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
}
|
||||
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
||||
if (!meetsReqs) {
|
||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
||||
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -119,7 +119,7 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
])
|
||||
.withSceneWaveRangeRequirement(30, CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES[1])
|
||||
@ -137,10 +137,10 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
|
||||
selected: [
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:option.1.selected_dialogue`,
|
||||
text: `${namespace}:option.1.selectedDialogue`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:option.1.selected_message`,
|
||||
text: `${namespace}:option.1.selectedMessage`,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
@ -193,7 +193,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.2.select_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.2.selectPrompt`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
@ -229,7 +229,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
// If pokemon has valid item, it can be selected
|
||||
const meetsReqs = encounter.options[1].pokemonMeetsPrimaryRequirements(pokemon);
|
||||
if (!meetsReqs) {
|
||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
||||
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -303,7 +303,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
@ -341,7 +341,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
// If pokemon has valid item, it can be selected
|
||||
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
||||
if (!meetsReqs) {
|
||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
||||
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -43,7 +43,7 @@ export const DepartmentStoreSaleEncounter: MysteryEncounter = MysteryEncounterBu
|
||||
text: `${namespace}:intro`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
])
|
||||
|
@ -56,7 +56,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
text: `${namespace}:intro`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
])
|
||||
@ -70,7 +70,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.1.label`,
|
||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
||||
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||
})
|
||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
@ -118,7 +118,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
||||
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||
})
|
||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
@ -166,7 +166,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
||||
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||
})
|
||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
@ -226,7 +226,7 @@ function pokemonAndMoveChosen(pokemon: PlayerPokemon, move: PokemonMove, correct
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:incorrect_exp`,
|
||||
text: `${namespace}:incorrectExp`,
|
||||
},
|
||||
];
|
||||
setEncounterExp(
|
||||
@ -243,7 +243,7 @@ function pokemonAndMoveChosen(pokemon: PlayerPokemon, move: PokemonMove, correct
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:correct_exp`,
|
||||
text: `${namespace}:correctExp`,
|
||||
},
|
||||
];
|
||||
setEncounterExp([pokemon.id], 100);
|
||||
|
@ -247,7 +247,7 @@ export const FieryFalloutEncounter: MysteryEncounter = MysteryEncounterBuilder.w
|
||||
// Burn applied
|
||||
encounter.setDialogueToken("burnedPokemon", chosenPokemon.getNameToRender());
|
||||
encounter.setDialogueToken("abilityName", allAbilities[AbilityId.HEATPROOF].name);
|
||||
queueEncounterMessage(`${namespace}:option.2.target_burned`);
|
||||
queueEncounterMessage(`${namespace}:option.2.targetBurned`);
|
||||
|
||||
// Also permanently change the burned Pokemon's ability to Heatproof
|
||||
applyAbilityOverrideToPokemon(chosenPokemon, AbilityId.HEATPROOF);
|
||||
@ -269,7 +269,7 @@ export const FieryFalloutEncounter: MysteryEncounter = MysteryEncounterBuilder.w
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
@ -313,6 +313,6 @@ function giveLeadPokemonAttackTypeBoostItem() {
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
encounter.setDialogueToken("itemName", boosterModifierType.name);
|
||||
encounter.setDialogueToken("leadPokemon", leadPokemon.getNameToRender());
|
||||
queueEncounterMessage(`${namespace}:found_item`);
|
||||
queueEncounterMessage(`${namespace}:foundItem`);
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
||||
isBoss: true,
|
||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||
queueEncounterMessage(`${namespace}:option.1.stat_boost`);
|
||||
queueEncounterMessage(`${namespace}:option.1.statBoost`);
|
||||
// Randomly boost 1 stat 2 stages
|
||||
// Cannot boost Spd, Acc, or Evasion
|
||||
globalScene.phaseManager.unshiftNew(
|
||||
@ -165,7 +165,7 @@ export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
|
@ -78,7 +78,7 @@ export const FunAndGamesEncounter: MysteryEncounter = MysteryEncounterBuilder.wi
|
||||
.withIntroDialogue([
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
])
|
||||
.setLocalizationKey(`${namespace}`)
|
||||
@ -118,7 +118,7 @@ export const FunAndGamesEncounter: MysteryEncounter = MysteryEncounterBuilder.wi
|
||||
|
||||
// Only Pokemon that are not KOed/legal can be selected
|
||||
const selectableFilter = (pokemon: Pokemon) => {
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||
};
|
||||
|
||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||
@ -132,7 +132,7 @@ export const FunAndGamesEncounter: MysteryEncounter = MysteryEncounterBuilder.wi
|
||||
const moneyCost = (encounter.options[0].requirements[0] as MoneyRequirement).requiredMoney;
|
||||
updatePlayerMoney(-moneyCost, true, false);
|
||||
await showEncounterText(
|
||||
i18next.t("mysteryEncounterMessages:paid_money", {
|
||||
i18next.t("mysteryEncounterMessages:paidMoney", {
|
||||
amount: moneyCost,
|
||||
}),
|
||||
);
|
||||
@ -284,25 +284,25 @@ function handleNextTurn() {
|
||||
guaranteedModifierTypeFuncs: [modifierTypes.MULTI_LENS],
|
||||
fillRemaining: false,
|
||||
});
|
||||
resultMessageKey = `${namespace}:best_result`;
|
||||
resultMessageKey = `${namespace}:bestResult`;
|
||||
} else if (healthRatio < 0.15) {
|
||||
// 2nd prize
|
||||
setEncounterRewards({
|
||||
guaranteedModifierTypeFuncs: [modifierTypes.SCOPE_LENS],
|
||||
fillRemaining: false,
|
||||
});
|
||||
resultMessageKey = `${namespace}:great_result`;
|
||||
resultMessageKey = `${namespace}:greatResult`;
|
||||
} else if (healthRatio < 0.33) {
|
||||
// 3rd prize
|
||||
setEncounterRewards({
|
||||
guaranteedModifierTypeFuncs: [modifierTypes.WIDE_LENS],
|
||||
fillRemaining: false,
|
||||
});
|
||||
resultMessageKey = `${namespace}:good_result`;
|
||||
resultMessageKey = `${namespace}:goodResult`;
|
||||
} else {
|
||||
// No prize
|
||||
isHealPhase = true;
|
||||
resultMessageKey = `${namespace}:bad_result`;
|
||||
resultMessageKey = `${namespace}:badResult`;
|
||||
}
|
||||
|
||||
// End the battle
|
||||
@ -312,7 +312,7 @@ function handleNextTurn() {
|
||||
globalScene.currentBattle.mysteryEncounter!.doContinueEncounter = undefined;
|
||||
leaveEncounterWithoutBattle(isHealPhase);
|
||||
// Must end the TurnInit phase prematurely so battle phases aren't added to queue
|
||||
queueEncounterMessage(`${namespace}:end_game`);
|
||||
queueEncounterMessage(`${namespace}:endGame`);
|
||||
queueEncounterMessage(resultMessageKey);
|
||||
|
||||
// Skip remainder of TurnInitPhase
|
||||
@ -320,9 +320,9 @@ function handleNextTurn() {
|
||||
}
|
||||
if (encounter.misc.turnsRemaining < 3) {
|
||||
// Display charging messages on turns that aren't the initial turn
|
||||
queueEncounterMessage(`${namespace}:charging_continue`);
|
||||
queueEncounterMessage(`${namespace}:chargingContinue`);
|
||||
}
|
||||
queueEncounterMessage(`${namespace}:turn_remaining_${encounter.misc.turnsRemaining}`);
|
||||
queueEncounterMessage(`${namespace}:turnRemaining${encounter.misc.turnsRemaining}`);
|
||||
encounter.misc.turnsRemaining--;
|
||||
|
||||
// Don't skip remainder of TurnInitPhase
|
||||
|
@ -158,7 +158,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.1.label`,
|
||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.1.trade_options_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.1.tradeOptionsPrompt`,
|
||||
})
|
||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
@ -248,7 +248,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
// Show the trade animation
|
||||
await showTradeBackground();
|
||||
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
||||
await showEncounterText(`${namespace}:trade_received`, null, 0, true, 4000);
|
||||
await showEncounterText(`${namespace}:tradeReceived`, null, 0, true, 4000);
|
||||
globalScene.playBgm(encounter.misc.bgmKey);
|
||||
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
||||
await hideTradeBackground();
|
||||
@ -369,7 +369,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
// Show the trade animation
|
||||
await showTradeBackground();
|
||||
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
||||
await showEncounterText(`${namespace}:trade_received`, null, 0, true, 4000);
|
||||
await showEncounterText(`${namespace}:tradeReceived`, null, 0, true, 4000);
|
||||
globalScene.playBgm(encounter.misc.bgmKey);
|
||||
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
||||
await hideTradeBackground();
|
||||
@ -384,7 +384,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.3.trade_options_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.3.tradeOptionsPrompt`,
|
||||
})
|
||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
@ -416,7 +416,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
return it.isTransferable;
|
||||
}).length > 0;
|
||||
if (!meetsReqs) {
|
||||
return getEncounterText(`${namespace}:option.3.invalid_selection`) ?? null;
|
||||
return getEncounterText(`${namespace}:option.3.invalidSelection`) ?? null;
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -468,7 +468,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
// Generate a trainer name
|
||||
const traderName = generateRandomTraderName();
|
||||
encounter.setDialogueToken("tradeTrainerName", traderName.trim());
|
||||
await showEncounterText(`${namespace}:item_trade_selected`);
|
||||
await showEncounterText(`${namespace}:itemTradeSelected`);
|
||||
leaveEncounterWithoutBattle();
|
||||
})
|
||||
.build(),
|
||||
@ -740,10 +740,10 @@ function doPokemonTradeSequence(tradedPokemon: PlayerPokemon, receivedPokemon: P
|
||||
duration: 500,
|
||||
onComplete: async () => {
|
||||
globalScene.fadeOutBgm(1000, false);
|
||||
await showEncounterText(`${namespace}:pokemon_trade_selected`);
|
||||
await showEncounterText(`${namespace}:pokemonTradeSelected`);
|
||||
tradedPokemon.cry();
|
||||
globalScene.playBgm("evolution");
|
||||
await showEncounterText(`${namespace}:pokemon_trade_goodbye`);
|
||||
await showEncounterText(`${namespace}:pokemonTradeGoodbye`);
|
||||
|
||||
tradedPokeball.setAlpha(0);
|
||||
tradedPokeball.setVisible(true);
|
||||
|
@ -63,9 +63,9 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
.withPokemonCanLearnMoveRequirement(OPTION_1_REQUIRED_MOVE)
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.1.label`,
|
||||
disabledButtonLabel: `${namespace}:option.1.label_disabled`,
|
||||
disabledButtonLabel: `${namespace}:option.1.labelDisabled`,
|
||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.1.tooltip_disabled`,
|
||||
disabledButtonTooltip: `${namespace}:option.1.tooltipDisabled`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.1.selected`,
|
||||
@ -81,9 +81,9 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
.withPokemonCanLearnMoveRequirement(OPTION_2_REQUIRED_MOVE)
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
disabledButtonLabel: `${namespace}:option.2.label_disabled`,
|
||||
disabledButtonLabel: `${namespace}:option.2.labelDisabled`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
|
@ -58,7 +58,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
])
|
||||
.withOnInit(() => {
|
||||
@ -128,7 +128,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
|
||||
// Only Pokemon non-KOd pokemon can be selected
|
||||
const selectableFilter = (pokemon: Pokemon) => {
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||
};
|
||||
|
||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||
@ -142,18 +142,18 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
|
||||
// Give money and do dialogue
|
||||
if (moneyMultiplier > 2.5) {
|
||||
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
|
||||
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
|
||||
} else {
|
||||
await showEncounterDialogue(`${namespace}:job_complete_bad`, `${namespace}:speaker`);
|
||||
await showEncounterDialogue(`${namespace}:jobCompleteBad`, `${namespace}:speaker`);
|
||||
}
|
||||
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
||||
updatePlayerMoney(moneyChange, true, false);
|
||||
await showEncounterText(
|
||||
i18next.t("mysteryEncounterMessages:receive_money", {
|
||||
i18next.t("mysteryEncounterMessages:receiveMoney", {
|
||||
amount: moneyChange,
|
||||
}),
|
||||
);
|
||||
await showEncounterText(`${namespace}:pokemon_tired`);
|
||||
await showEncounterText(`${namespace}:pokemonTired`);
|
||||
|
||||
setEncounterRewards({ fillRemaining: true });
|
||||
leaveEncounterWithoutBattle();
|
||||
@ -210,7 +210,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
|
||||
// Only Pokemon non-KOd pokemon can be selected
|
||||
const selectableFilter = (pokemon: Pokemon) => {
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||
};
|
||||
|
||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||
@ -224,18 +224,18 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
|
||||
// Give money and do dialogue
|
||||
if (moneyMultiplier > 2.5) {
|
||||
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
|
||||
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
|
||||
} else {
|
||||
await showEncounterDialogue(`${namespace}:job_complete_bad`, `${namespace}:speaker`);
|
||||
await showEncounterDialogue(`${namespace}:jobCompleteBad`, `${namespace}:speaker`);
|
||||
}
|
||||
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
||||
updatePlayerMoney(moneyChange, true, false);
|
||||
await showEncounterText(
|
||||
i18next.t("mysteryEncounterMessages:receive_money", {
|
||||
i18next.t("mysteryEncounterMessages:receiveMoney", {
|
||||
amount: moneyChange,
|
||||
}),
|
||||
);
|
||||
await showEncounterText(`${namespace}:pokemon_tired`);
|
||||
await showEncounterText(`${namespace}:pokemonTired`);
|
||||
|
||||
setEncounterRewards({ fillRemaining: true });
|
||||
leaveEncounterWithoutBattle();
|
||||
@ -248,7 +248,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
@ -282,15 +282,15 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
await transitionMysteryEncounterIntroVisuals(false, false);
|
||||
|
||||
// Give money and do dialogue
|
||||
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
|
||||
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
|
||||
const moneyChange = globalScene.getWaveMoneyAmount(2.5);
|
||||
updatePlayerMoney(moneyChange, true, false);
|
||||
await showEncounterText(
|
||||
i18next.t("mysteryEncounterMessages:receive_money", {
|
||||
i18next.t("mysteryEncounterMessages:receiveMoney", {
|
||||
amount: moneyChange,
|
||||
}),
|
||||
);
|
||||
await showEncounterText(`${namespace}:pokemon_tired`);
|
||||
await showEncounterText(`${namespace}:pokemonTired`);
|
||||
|
||||
setEncounterRewards({ fillRemaining: true });
|
||||
leaveEncounterWithoutBattle();
|
||||
|
@ -205,7 +205,7 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
|
||||
// 80% chance to increase flee stage +1
|
||||
const fleeChangeResult = tryChangeFleeStage(1, 8);
|
||||
if (!fleeChangeResult) {
|
||||
await showEncounterText(getEncounterText(`${namespace}:safari.busy_eating`) ?? "", null, 1000, false);
|
||||
await showEncounterText(getEncounterText(`${namespace}:safari.busyEating`) ?? "", null, 1000, false);
|
||||
} else {
|
||||
await showEncounterText(getEncounterText(`${namespace}:safari.eating`) ?? "", null, 1000, false);
|
||||
}
|
||||
@ -233,7 +233,7 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
|
||||
// 80% chance to decrease catch stage -1
|
||||
const catchChangeResult = tryChangeCatchStage(-1, 8);
|
||||
if (!catchChangeResult) {
|
||||
await showEncounterText(getEncounterText(`${namespace}:safari.beside_itself_angry`) ?? "", null, 1000, false);
|
||||
await showEncounterText(getEncounterText(`${namespace}:safari.besideItselfAngry`) ?? "", null, 1000, false);
|
||||
} else {
|
||||
await showEncounterText(getEncounterText(`${namespace}:safari.angry`) ?? "", null, 1000, false);
|
||||
}
|
||||
@ -274,7 +274,7 @@ async function summonSafariPokemon() {
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
// Message pokemon remaining
|
||||
encounter.setDialogueToken("remainingCount", encounter.misc.safariPokemonRemaining);
|
||||
globalScene.phaseManager.queueMessage(getEncounterText(`${namespace}:safari.remaining_count`) ?? "", null, true);
|
||||
globalScene.phaseManager.queueMessage(getEncounterText(`${namespace}:safari.remainingCount`) ?? "", null, true);
|
||||
|
||||
// Generate pokemon using safariPokemonRemaining so they are always the same pokemon no matter how many turns are taken
|
||||
// Safari pokemon roll twice on shiny and HA chances, but are otherwise normal
|
||||
|
@ -70,7 +70,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
text: `${namespace}:intro`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
])
|
||||
@ -119,7 +119,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
);
|
||||
}
|
||||
if (!encounter.pokemonMeetsPrimaryRequirements(pokemon)) {
|
||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
||||
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -155,7 +155,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
|
||||
chosenPokemon.setCustomNature(newNature);
|
||||
encounter.setDialogueToken("newNature", getNatureName(newNature));
|
||||
queueEncounterMessage(`${namespace}:cheap_side_effects`);
|
||||
queueEncounterMessage(`${namespace}:cheapSideEffects`);
|
||||
setEncounterExp([chosenPokemon.id], 100);
|
||||
await chosenPokemon.updateInfo();
|
||||
})
|
||||
@ -193,7 +193,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
|
||||
// Only Pokemon that can gain benefits are unfainted
|
||||
const selectableFilter = (pokemon: Pokemon) => {
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||
};
|
||||
|
||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||
@ -215,7 +215,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
const chosenPokemon = encounter.misc.chosenPokemon;
|
||||
|
||||
queueEncounterMessage(`${namespace}:no_bad_effects`);
|
||||
queueEncounterMessage(`${namespace}:noBadEffects`);
|
||||
setEncounterExp([chosenPokemon.id], 100);
|
||||
|
||||
await chosenPokemon.updateInfo();
|
||||
|
@ -157,7 +157,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
// Fall asleep waiting for Snorlax
|
||||
// Full heal party
|
||||
globalScene.phaseManager.unshiftNew("PartyHealPhase", true);
|
||||
queueEncounterMessage(`${namespace}:option.2.rest_result`);
|
||||
queueEncounterMessage(`${namespace}:option.2.restResult`);
|
||||
leaveEncounterWithoutBattle();
|
||||
},
|
||||
)
|
||||
@ -167,7 +167,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
|
@ -122,7 +122,7 @@ export const TeleportingHijinksEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
@ -227,7 +227,7 @@ async function doBiomeTransitionDialogueAndBattleInit() {
|
||||
isBoss: true,
|
||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||
queueEncounterMessage(`${namespace}:boss_enraged`);
|
||||
queueEncounterMessage(`${namespace}:bossEnraged`);
|
||||
globalScene.phaseManager.unshiftNew(
|
||||
"StatStageChangePhase",
|
||||
pokemon.getBattlerIndex(),
|
||||
|
@ -139,7 +139,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
},
|
||||
{
|
||||
speaker: trainerNameKey,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
])
|
||||
.withOnInit(() => {
|
||||
@ -189,13 +189,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
|
||||
// Dialogue and egg calcs for Pokemon 1
|
||||
const [pokemon1CommonEggs, pokemon1RareEggs] = calculateEggRewardsForPokemon(pokemon1);
|
||||
let pokemon1Tooltip = getEncounterText(`${namespace}:option.1.tooltip_base`)!;
|
||||
let pokemon1Tooltip = getEncounterText(`${namespace}:option.1.tooltipBase`)!;
|
||||
if (pokemon1RareEggs > 0) {
|
||||
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
||||
count: pokemon1RareEggs,
|
||||
rarity: i18next.t("egg:greatTier"),
|
||||
});
|
||||
pokemon1Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
||||
pokemon1Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||
eggs: eggsText,
|
||||
});
|
||||
encounter.setDialogueToken("pokemon1RareEggs", eggsText);
|
||||
@ -205,7 +205,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
count: pokemon1CommonEggs,
|
||||
rarity: i18next.t("egg:defaultTier"),
|
||||
});
|
||||
pokemon1Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
||||
pokemon1Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||
eggs: eggsText,
|
||||
});
|
||||
encounter.setDialogueToken("pokemon1CommonEggs", eggsText);
|
||||
@ -214,13 +214,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
|
||||
// Dialogue and egg calcs for Pokemon 2
|
||||
const [pokemon2CommonEggs, pokemon2RareEggs] = calculateEggRewardsForPokemon(pokemon2);
|
||||
let pokemon2Tooltip = getEncounterText(`${namespace}:option.2.tooltip_base`)!;
|
||||
let pokemon2Tooltip = getEncounterText(`${namespace}:option.2.tooltipBase`)!;
|
||||
if (pokemon2RareEggs > 0) {
|
||||
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
||||
count: pokemon2RareEggs,
|
||||
rarity: i18next.t("egg:greatTier"),
|
||||
});
|
||||
pokemon2Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
||||
pokemon2Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||
eggs: eggsText,
|
||||
});
|
||||
encounter.setDialogueToken("pokemon2RareEggs", eggsText);
|
||||
@ -230,7 +230,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
count: pokemon2CommonEggs,
|
||||
rarity: i18next.t("egg:defaultTier"),
|
||||
});
|
||||
pokemon2Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
||||
pokemon2Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||
eggs: eggsText,
|
||||
});
|
||||
encounter.setDialogueToken("pokemon2CommonEggs", eggsText);
|
||||
@ -239,13 +239,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
|
||||
// Dialogue and egg calcs for Pokemon 3
|
||||
const [pokemon3CommonEggs, pokemon3RareEggs] = calculateEggRewardsForPokemon(pokemon3);
|
||||
let pokemon3Tooltip = getEncounterText(`${namespace}:option.3.tooltip_base`)!;
|
||||
let pokemon3Tooltip = getEncounterText(`${namespace}:option.3.tooltipBase`)!;
|
||||
if (pokemon3RareEggs > 0) {
|
||||
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
||||
count: pokemon3RareEggs,
|
||||
rarity: i18next.t("egg:greatTier"),
|
||||
});
|
||||
pokemon3Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
||||
pokemon3Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||
eggs: eggsText,
|
||||
});
|
||||
encounter.setDialogueToken("pokemon3RareEggs", eggsText);
|
||||
@ -255,7 +255,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
count: pokemon3CommonEggs,
|
||||
rarity: i18next.t("egg:defaultTier"),
|
||||
});
|
||||
pokemon3Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
||||
pokemon3Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||
eggs: eggsText,
|
||||
});
|
||||
encounter.setDialogueToken("pokemon3CommonEggs", eggsText);
|
||||
@ -321,14 +321,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
];
|
||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon1CommonEggs")) {
|
||||
encounter.dialogue.outro.push({
|
||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
||||
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||
numEggs: encounter.dialogueTokens["pokemon1CommonEggs"],
|
||||
}),
|
||||
});
|
||||
}
|
||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon1RareEggs")) {
|
||||
encounter.dialogue.outro.push({
|
||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
||||
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||
numEggs: encounter.dialogueTokens["pokemon1RareEggs"],
|
||||
}),
|
||||
});
|
||||
@ -380,14 +380,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
];
|
||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon2CommonEggs")) {
|
||||
encounter.dialogue.outro.push({
|
||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
||||
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||
numEggs: encounter.dialogueTokens["pokemon2CommonEggs"],
|
||||
}),
|
||||
});
|
||||
}
|
||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon2RareEggs")) {
|
||||
encounter.dialogue.outro.push({
|
||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
||||
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||
numEggs: encounter.dialogueTokens["pokemon2RareEggs"],
|
||||
}),
|
||||
});
|
||||
@ -439,14 +439,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
||||
];
|
||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon3CommonEggs")) {
|
||||
encounter.dialogue.outro.push({
|
||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
||||
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||
numEggs: encounter.dialogueTokens["pokemon3CommonEggs"],
|
||||
}),
|
||||
});
|
||||
}
|
||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon3RareEggs")) {
|
||||
encounter.dialogue.outro.push({
|
||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
||||
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||
numEggs: encounter.dialogueTokens["pokemon3RareEggs"],
|
||||
}),
|
||||
});
|
||||
@ -482,7 +482,7 @@ function getPartyConfig(): EnemyPartyConfig {
|
||||
trainerType: TrainerType.EXPERT_POKEMON_BREEDER,
|
||||
pokemonConfigs: [
|
||||
{
|
||||
nickname: i18next.t(`${namespace}:cleffa_1_nickname`, {
|
||||
nickname: i18next.t(`${namespace}:cleffa1Nickname`, {
|
||||
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
||||
}),
|
||||
species: getPokemonSpecies(cleffaSpecies),
|
||||
@ -501,7 +501,7 @@ function getPartyConfig(): EnemyPartyConfig {
|
||||
// All 3 members always Cleffa line, but different configs
|
||||
baseConfig.pokemonConfigs!.push(
|
||||
{
|
||||
nickname: i18next.t(`${namespace}:cleffa_2_nickname`, {
|
||||
nickname: i18next.t(`${namespace}:cleffa2Nickname`, {
|
||||
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
||||
}),
|
||||
species: getPokemonSpecies(cleffaSpecies),
|
||||
@ -514,7 +514,7 @@ function getPartyConfig(): EnemyPartyConfig {
|
||||
ivs: [31, 31, 31, 31, 31, 31],
|
||||
},
|
||||
{
|
||||
nickname: i18next.t(`${namespace}:cleffa_3_nickname`, {
|
||||
nickname: i18next.t(`${namespace}:cleffa3Nickname`, {
|
||||
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
||||
}),
|
||||
species: getPokemonSpecies(cleffaSpecies),
|
||||
@ -647,7 +647,7 @@ function onGameOver() {
|
||||
encounter.dialogue.outro = [
|
||||
{
|
||||
speaker: trainerNameKey,
|
||||
text: `${namespace}:outro_failed`,
|
||||
text: `${namespace}:outroFailed`,
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -66,7 +66,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
text: `${namespace}:intro`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
speaker: `${namespace}:speaker`,
|
||||
},
|
||||
])
|
||||
@ -178,8 +178,8 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
// Always max price for shiny (flip HA back to normal), and add special messaging
|
||||
priceMultiplier = MAX_POKEMON_PRICE_MULTIPLIER;
|
||||
pokemon.abilityIndex = 0;
|
||||
encounter.dialogue.encounterOptionsDialogue!.description = `${namespace}:description_shiny`;
|
||||
encounter.options[0].dialogue!.buttonTooltip = `${namespace}:option.1.tooltip_shiny`;
|
||||
encounter.dialogue.encounterOptionsDialogue!.description = `${namespace}:descriptionShiny`;
|
||||
encounter.options[0].dialogue!.buttonTooltip = `${namespace}:option.1.tooltipShiny`;
|
||||
}
|
||||
const price = globalScene.getWaveMoneyAmount(priceMultiplier);
|
||||
encounter.setDialogueToken("purchasePokemon", pokemon.getNameToRender());
|
||||
@ -202,7 +202,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.1.selected_message`,
|
||||
text: `${namespace}:option.1.selectedMessage`,
|
||||
},
|
||||
],
|
||||
})
|
||||
@ -215,7 +215,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
||||
updatePlayerMoney(-price, true, false);
|
||||
|
||||
// Show dialogue
|
||||
await showEncounterDialogue(`${namespace}:option.1.selected_dialogue`, `${namespace}:speaker`);
|
||||
await showEncounterDialogue(`${namespace}:option.1.selectedDialogue`, `${namespace}:speaker`);
|
||||
await transitionMysteryEncounterIntroVisuals();
|
||||
|
||||
// "Catch" purchased pokemon
|
||||
|
@ -115,7 +115,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
],
|
||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||
queueEncounterMessage(`${namespace}:option.2.stat_boost`);
|
||||
queueEncounterMessage(`${namespace}:option.2.statBoost`);
|
||||
globalScene.phaseManager.unshiftNew(
|
||||
"StatStageChangePhase",
|
||||
pokemon.getBattlerIndex(),
|
||||
@ -181,7 +181,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
|
||||
|
||||
encounter.setDialogueToken("reductionValue", HIGH_BST_REDUCTION_VALUE.toString());
|
||||
encounter.setDialogueToken("increaseValue", BST_INCREASE_VALUE.toString());
|
||||
await showEncounterText(`${namespace}:option.1.selected_2`, null, undefined, true);
|
||||
await showEncounterText(`${namespace}:option.1.selected2`, null, undefined, true);
|
||||
|
||||
encounter.dialogue.outro = [
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ export const TheWinstrateChallengeEncounter: MysteryEncounter = MysteryEncounter
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
])
|
||||
.withAutoHideIntroVisuals(false)
|
||||
@ -163,7 +163,7 @@ async function spawnNextTrainerOrEndEncounter() {
|
||||
globalScene.playSound("item_fanfare");
|
||||
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }));
|
||||
|
||||
await showEncounterDialogue(`${namespace}:victory_2`, `${namespace}:speaker`);
|
||||
await showEncounterDialogue(`${namespace}:victory2`, `${namespace}:speaker`);
|
||||
globalScene.ui.clearText(); // Clears "Winstrate" title from screen as rewards get animated in
|
||||
const machoBrace = generateModifierTypeOption(modifierTypes.MYSTERY_ENCOUNTER_MACHO_BRACE)!;
|
||||
machoBrace.type.tier = ModifierTier.MASTER;
|
||||
|
@ -90,7 +90,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
|
||||
// Only Pokemon that are not KOed/legal can be trained
|
||||
const selectableFilter = (pokemon: Pokemon) => {
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||
};
|
||||
|
||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||
@ -174,7 +174,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.2.select_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.2.selectPrompt`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.selected`,
|
||||
@ -205,7 +205,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
|
||||
// Only Pokemon that are not KOed/legal can be trained
|
||||
const selectableFilter = (pokemon: Pokemon) => {
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||
};
|
||||
|
||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||
@ -248,7 +248,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.selected`,
|
||||
@ -295,7 +295,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
|
||||
// Only Pokemon that are not KOed/legal can be trained
|
||||
const selectableFilter = (pokemon: Pokemon) => {
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||
};
|
||||
|
||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||
|
@ -194,7 +194,7 @@ export const TrashToTreasureEncounter: MysteryEncounter = MysteryEncounterBuilde
|
||||
.withOptionPhase(async () => {
|
||||
// Investigate garbage, battle Gmax Garbodor
|
||||
globalScene.setFieldScale(0.75);
|
||||
await showEncounterText(`${namespace}:option.2.selected_2`);
|
||||
await showEncounterText(`${namespace}:option.2.selected2`);
|
||||
await transitionMysteryEncounterIntroVisuals();
|
||||
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||
|
@ -97,7 +97,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
||||
isBoss: false,
|
||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||
queueEncounterMessage(`${namespace}:option.1.stat_boost`);
|
||||
queueEncounterMessage(`${namespace}:option.1.statBoost`);
|
||||
globalScene.phaseManager.unshiftNew(
|
||||
"StatStageChangePhase",
|
||||
pokemon.getBattlerIndex(),
|
||||
@ -191,7 +191,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
@ -236,7 +236,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
|
@ -143,7 +143,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
])
|
||||
.setLocalizationKey(`${namespace}`)
|
||||
@ -216,7 +216,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
|
||||
await cutsceneDialoguePromise;
|
||||
|
||||
doHideDreamBackground();
|
||||
await showEncounterText(`${namespace}:option.1.dream_complete`);
|
||||
await showEncounterText(`${namespace}:option.1.dreamComplete`);
|
||||
|
||||
await doNewTeamPostProcess(transformations);
|
||||
setEncounterRewards({
|
||||
@ -329,7 +329,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
|
||||
onBeforeRewards,
|
||||
);
|
||||
|
||||
await showEncounterText(`${namespace}:option.2.selected_2`, null, undefined, true);
|
||||
await showEncounterText(`${namespace}:option.2.selected2`, null, undefined, true);
|
||||
await initBattleWithEnemyConfig(enemyPartyConfig);
|
||||
},
|
||||
)
|
||||
|
@ -467,7 +467,7 @@ export function updatePlayerMoney(changeValue: number, playSound = true, showMes
|
||||
if (showMessage) {
|
||||
if (changeValue < 0) {
|
||||
globalScene.phaseManager.queueMessage(
|
||||
i18next.t("mysteryEncounterMessages:paid_money", {
|
||||
i18next.t("mysteryEncounterMessages:paidMoney", {
|
||||
amount: -changeValue,
|
||||
}),
|
||||
null,
|
||||
@ -475,7 +475,7 @@ export function updatePlayerMoney(changeValue: number, playSound = true, showMes
|
||||
);
|
||||
} else {
|
||||
globalScene.phaseManager.queueMessage(
|
||||
i18next.t("mysteryEncounterMessages:receive_money", {
|
||||
i18next.t("mysteryEncounterMessages:receiveMoney", {
|
||||
amount: changeValue,
|
||||
}),
|
||||
null,
|
||||
@ -587,7 +587,7 @@ export function selectPokemonForOption(
|
||||
return true;
|
||||
},
|
||||
onHover: () => {
|
||||
showEncounterText(i18next.t("mysteryEncounterMessages:cancel_option"), 0, 0, false);
|
||||
showEncounterText(i18next.t("mysteryEncounterMessages:cancelOption"), 0, 0, false);
|
||||
},
|
||||
});
|
||||
|
||||
@ -720,7 +720,7 @@ export function selectOptionThenPokemon(
|
||||
if (onHoverOverCancelOption) {
|
||||
onHoverOverCancelOption();
|
||||
}
|
||||
showEncounterText(i18next.t("mysteryEncounterMessages:cancel_option"), 0, 0, false);
|
||||
showEncounterText(i18next.t("mysteryEncounterMessages:cancelOption"), 0, 0, false);
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { EFFECTIVE_STATS, getShortenedStatKey, Stat } from "#enums/stat";
|
||||
import { TextStyle } from "#enums/text-style";
|
||||
import { UiTheme } from "#enums/ui-theme";
|
||||
import { getBBCodeFrag } from "#ui/text";
|
||||
import { toTitleCase } from "#utils/strings";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
|
||||
export function getNatureName(
|
||||
@ -13,7 +13,7 @@ export function getNatureName(
|
||||
ignoreBBCode = false,
|
||||
uiTheme: UiTheme = UiTheme.DEFAULT,
|
||||
): string {
|
||||
let ret = toTitleCase(Nature[nature]);
|
||||
let ret = toCamelCase(Nature[nature]);
|
||||
//Translating nature
|
||||
if (i18next.exists(`nature:${ret}`)) {
|
||||
ret = i18next.t(`nature:${ret}` as any);
|
||||
|
@ -30,7 +30,7 @@ export abstract class SpeciesFormChangeTrigger {
|
||||
export class SpeciesFormChangeManualTrigger extends SpeciesFormChangeTrigger {}
|
||||
|
||||
export class SpeciesFormChangeAbilityTrigger extends SpeciesFormChangeTrigger {
|
||||
public description: string = i18next.t("pokemonEvolutions:Forms.ability");
|
||||
public description: string = i18next.t("pokemonEvolutions:forms.ability");
|
||||
}
|
||||
|
||||
export class SpeciesFormChangeCompoundTrigger {
|
||||
@ -69,10 +69,10 @@ export class SpeciesFormChangeItemTrigger extends SpeciesFormChangeTrigger {
|
||||
this.item = item;
|
||||
this.active = active;
|
||||
this.description = this.active
|
||||
? i18next.t("pokemonEvolutions:Forms.item", {
|
||||
? i18next.t("pokemonEvolutions:forms.item", {
|
||||
item: i18next.t(`modifierType:FormChangeItem.${FormChangeItem[this.item]}`),
|
||||
})
|
||||
: i18next.t("pokemonEvolutions:Forms.deactivateItem", {
|
||||
: i18next.t("pokemonEvolutions:forms.deactivateItem", {
|
||||
item: i18next.t(`modifierType:FormChangeItem.${FormChangeItem[this.item]}`),
|
||||
});
|
||||
}
|
||||
@ -97,7 +97,7 @@ export class SpeciesFormChangeTimeOfDayTrigger extends SpeciesFormChangeTrigger
|
||||
constructor(...timesOfDay: TimeOfDay[]) {
|
||||
super();
|
||||
this.timesOfDay = timesOfDay;
|
||||
this.description = i18next.t("pokemonEvolutions:Forms.timeOfDay");
|
||||
this.description = i18next.t("pokemonEvolutions:orms.timeOfDay");
|
||||
}
|
||||
|
||||
canChange(_pokemon: Pokemon): boolean {
|
||||
@ -111,8 +111,8 @@ export class SpeciesFormChangeActiveTrigger extends SpeciesFormChangeTrigger {
|
||||
super();
|
||||
this.active = active;
|
||||
this.description = this.active
|
||||
? i18next.t("pokemonEvolutions:Forms.enter")
|
||||
: i18next.t("pokemonEvolutions:Forms.leave");
|
||||
? i18next.t("pokemonEvolutions:forms.enter")
|
||||
: i18next.t("pokemonEvolutions:forms.leave");
|
||||
}
|
||||
|
||||
canChange(pokemon: Pokemon): boolean {
|
||||
@ -128,7 +128,7 @@ export class SpeciesFormChangeStatusEffectTrigger extends SpeciesFormChangeTrigg
|
||||
super();
|
||||
this.statusEffects = coerceArray(statusEffects);
|
||||
this.invert = invert;
|
||||
// this.description = i18next.t("pokemonEvolutions:Forms.statusEffect");
|
||||
// this.description = i18next.t("pokemonEvolutions:forms.statusEffect");
|
||||
}
|
||||
|
||||
canChange(pokemon: Pokemon): boolean {
|
||||
@ -146,10 +146,10 @@ export class SpeciesFormChangeMoveLearnedTrigger extends SpeciesFormChangeTrigge
|
||||
this.known = known;
|
||||
const moveKey = toCamelCase(MoveId[this.move]);
|
||||
this.description = known
|
||||
? i18next.t("pokemonEvolutions:Forms.moveLearned", {
|
||||
? i18next.t("pokemonEvolutions:forms.moveLearned", {
|
||||
move: i18next.t(`move:${moveKey}.name`),
|
||||
})
|
||||
: i18next.t("pokemonEvolutions:Forms.moveForgotten", {
|
||||
: i18next.t("pokemonEvolutions:forms.moveForgotten", {
|
||||
move: i18next.t(`move:${moveKey}.name`),
|
||||
});
|
||||
}
|
||||
@ -171,7 +171,7 @@ export abstract class SpeciesFormChangeMoveTrigger extends SpeciesFormChangeTrig
|
||||
}
|
||||
|
||||
export class SpeciesFormChangePreMoveTrigger extends SpeciesFormChangeMoveTrigger {
|
||||
description = i18next.t("pokemonEvolutions:Forms.preMove");
|
||||
description = i18next.t("pokemonEvolutions:forms.preMove");
|
||||
canChange(pokemon: Pokemon): boolean {
|
||||
const command = globalScene.currentBattle.turnCommands[pokemon.getBattlerIndex()];
|
||||
return !!command?.move && this.movePredicate(command.move.move) === this.used;
|
||||
@ -179,7 +179,7 @@ export class SpeciesFormChangePreMoveTrigger extends SpeciesFormChangeMoveTrigge
|
||||
}
|
||||
|
||||
export class SpeciesFormChangePostMoveTrigger extends SpeciesFormChangeMoveTrigger {
|
||||
description = i18next.t("pokemonEvolutions:Forms.postMove");
|
||||
description = i18next.t("pokemonEvolutions:forms.postMove");
|
||||
canChange(pokemon: Pokemon): boolean {
|
||||
return (
|
||||
pokemon.summonData && !!pokemon.getLastXMoves(1).filter(m => this.movePredicate(m.move)).length === this.used
|
||||
@ -244,7 +244,7 @@ export class SpeciesFormChangeWeatherTrigger extends SpeciesFormChangeTrigger {
|
||||
super();
|
||||
this.ability = ability;
|
||||
this.weathers = weathers;
|
||||
this.description = i18next.t("pokemonEvolutions:Forms.weather");
|
||||
this.description = i18next.t("pokemonEvolutions:forms.weather");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -282,7 +282,7 @@ export class SpeciesFormChangeRevertWeatherFormTrigger extends SpeciesFormChange
|
||||
super();
|
||||
this.ability = ability;
|
||||
this.weathers = weathers;
|
||||
this.description = i18next.t("pokemonEvolutions:Forms.weatherRevert");
|
||||
this.description = i18next.t("pokemonEvolutions:forms.weatherRevert");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -778,7 +778,7 @@ export class PokemonSpecies extends PokemonSpeciesForm implements Localizable {
|
||||
}
|
||||
|
||||
if (key) {
|
||||
return i18next.t(`battlePokemonForm:${key}`, {
|
||||
return i18next.t(`battlePokemonForm:${toCamelCase(key)}`, {
|
||||
pokemonName: this.name,
|
||||
});
|
||||
}
|
||||
@ -810,7 +810,9 @@ export class PokemonSpecies extends PokemonSpeciesForm implements Localizable {
|
||||
return this.name; // Other special cases could be put here too
|
||||
}
|
||||
// Everything beyond this point essentially follows the pattern of FORMNAME_SPECIES
|
||||
return i18next.t(`pokemonForm:appendForm.${SpeciesId[this.speciesId].split("_")[0]}`, { pokemonName: this.name });
|
||||
return i18next.t(`pokemonForm:appendForm.${toCamelCase(SpeciesId[this.speciesId].split("_")[0])}`, {
|
||||
pokemonName: this.name,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -827,7 +829,7 @@ export class PokemonSpecies extends PokemonSpeciesForm implements Localizable {
|
||||
|
||||
const region = this.getRegion();
|
||||
if (this.speciesId === SpeciesId.ARCEUS) {
|
||||
ret = i18next.t(`pokemonInfo:Type.${formText.toUpperCase()}`);
|
||||
ret = i18next.t(`pokemonInfo:type.${toCamelCase(formText)}`);
|
||||
} else if (
|
||||
[
|
||||
SpeciesFormKey.MEGA,
|
||||
@ -841,8 +843,8 @@ export class PokemonSpecies extends PokemonSpeciesForm implements Localizable {
|
||||
].includes(formKey as SpeciesFormKey)
|
||||
) {
|
||||
return append
|
||||
? i18next.t(`battlePokemonForm:${formKey}`, { pokemonName: this.name })
|
||||
: i18next.t(`pokemonForm:battleForm.${formKey}`);
|
||||
? i18next.t(`battlePokemonForm:${toCamelCase(formKey)}`, { pokemonName: this.name })
|
||||
: i18next.t(`pokemonForm:battleForm.${toCamelCase(formKey)}`);
|
||||
} else if (
|
||||
region === Region.NORMAL ||
|
||||
(this.speciesId === SpeciesId.GALAR_DARMANITAN && formIndex > 0) ||
|
||||
@ -868,10 +870,10 @@ export class PokemonSpecies extends PokemonSpeciesForm implements Localizable {
|
||||
return i18next.t("pokemonForm:ursalunaBloodmoon");
|
||||
} else {
|
||||
// Only regional forms should be left at this point
|
||||
return i18next.t(`pokemonForm:regionalForm.${Region[region]}`);
|
||||
return i18next.t(`pokemonForm:regionalForm.${toCamelCase(Region[region])}`);
|
||||
}
|
||||
return append
|
||||
? i18next.t("pokemonForm:appendForm.GENERIC", {
|
||||
? i18next.t("pokemonForm:appendForm.generic", {
|
||||
pokemonName: this.name,
|
||||
formName: ret,
|
||||
})
|
||||
@ -879,8 +881,8 @@ export class PokemonSpecies extends PokemonSpeciesForm implements Localizable {
|
||||
}
|
||||
|
||||
localize(): void {
|
||||
this.name = i18next.t(`pokemon:${SpeciesId[this.speciesId].toLowerCase()}`);
|
||||
this.category = i18next.t(`pokemonCategory:${SpeciesId[this.speciesId].toLowerCase()}_category`);
|
||||
this.name = i18next.t(`pokemon:${toCamelCase(SpeciesId[this.speciesId])}`);
|
||||
this.category = i18next.t(`pokemonCategory:${toCamelCase(SpeciesId[this.speciesId])}Category`);
|
||||
}
|
||||
|
||||
getWildSpeciesForLevel(level: number, allowEvolving: boolean, isBoss: boolean, gameMode: GameMode): SpeciesId {
|
||||
|
@ -64,7 +64,7 @@ export function getStatStageChangeDescriptionKey(stages: number, isIncrease: boo
|
||||
* @returns the translation key corresponding to the given {@linkcode Stat}
|
||||
*/
|
||||
export function getStatKey(stat: Stat) {
|
||||
return `pokemonInfo:Stat.${Stat[stat]}`;
|
||||
return `pokemonInfo:stat.${Stat[stat].toLowerCase()}`;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -73,5 +73,5 @@ export function getStatKey(stat: Stat) {
|
||||
* @returns the translation key corresponding to the given {@linkcode Stat}
|
||||
*/
|
||||
export function getShortenedStatKey(stat: PermanentStat) {
|
||||
return `pokemonInfo:Stat.${Stat[stat]}shortened`;
|
||||
return `pokemonInfo:stat.${Stat[stat].toLowerCase()}Shortened`;
|
||||
}
|
||||
|
@ -130,6 +130,7 @@ import {
|
||||
} from "#utils/common";
|
||||
import { getEnumKeys, getEnumValues } from "#utils/enums";
|
||||
import { getModifierPoolForType, getModifierType } from "#utils/modifier-utils";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
|
||||
const outputModifierData = false;
|
||||
@ -451,13 +452,13 @@ export class TerastallizeModifierType extends PokemonModifierType {
|
||||
|
||||
get name(): string {
|
||||
return i18next.t("modifierType:ModifierType.TerastallizeModifierType.name", {
|
||||
teraType: i18next.t(`pokemonInfo:Type.${PokemonType[this.teraType]}`),
|
||||
teraType: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.teraType])}`),
|
||||
});
|
||||
}
|
||||
|
||||
getDescription(): string {
|
||||
return i18next.t("modifierType:ModifierType.TerastallizeModifierType.description", {
|
||||
teraType: i18next.t(`pokemonInfo:Type.${PokemonType[this.teraType]}`),
|
||||
teraType: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.teraType])}`),
|
||||
});
|
||||
}
|
||||
|
||||
@ -861,7 +862,7 @@ export class AttackTypeBoosterModifierType
|
||||
getDescription(): string {
|
||||
// TODO: Need getTypeName?
|
||||
return i18next.t("modifierType:ModifierType.AttackTypeBoosterModifierType.description", {
|
||||
moveType: i18next.t(`pokemonInfo:Type.${PokemonType[this.moveType]}`),
|
||||
moveType: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.moveType])}`),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -65,8 +65,8 @@ export class GameOverPhase extends BattlePhase {
|
||||
const genderIndex = globalScene.gameData.gender ?? PlayerGender.UNSET;
|
||||
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
||||
globalScene.ui.showDialogue(
|
||||
i18next.t("miscDialogue:ending_endless", { context: genderStr }),
|
||||
i18next.t("miscDialogue:ending_name"),
|
||||
i18next.t("miscDialogue:endingEndless", { context: genderStr }),
|
||||
i18next.t("miscDialogue:endingName"),
|
||||
0,
|
||||
() => this.handleGameOver(),
|
||||
);
|
||||
|
@ -7,6 +7,7 @@ import { PokemonType } from "#enums/pokemon-type";
|
||||
import type { Pokemon } from "#field/pokemon";
|
||||
import { BattlePhase } from "#phases/battle-phase";
|
||||
import { achvs } from "#system/achv";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
|
||||
export class TeraPhase extends BattlePhase {
|
||||
@ -25,7 +26,7 @@ export class TeraPhase extends BattlePhase {
|
||||
globalScene.phaseManager.queueMessage(
|
||||
i18next.t("battle:pokemonTerastallized", {
|
||||
pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon),
|
||||
type: i18next.t(`pokemonInfo:Type.${PokemonType[this.pokemon.getTeraType()]}`),
|
||||
type: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.pokemon.getTeraType()])}`),
|
||||
}),
|
||||
);
|
||||
new CommonBattleAnim(CommonAnim.TERASTALLIZE, this.pokemon).play(false, () => {
|
||||
|
@ -15,6 +15,7 @@ import { TurnHeldItemTransferModifier } from "#modifiers/modifier";
|
||||
import type { ConditionFn } from "#types/common";
|
||||
import { isNuzlockeChallenge } from "#utils/challenge-utils";
|
||||
import { NumberHolder } from "#utils/common";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
import type { Modifier } from "typescript";
|
||||
|
||||
@ -214,244 +215,244 @@ export function getAchievementDescription(localizationKey: string): string {
|
||||
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
||||
|
||||
switch (localizationKey) {
|
||||
case "10K_MONEY":
|
||||
return i18next.t("achv:MoneyAchv.description", {
|
||||
case "10KMoney":
|
||||
return i18next.t("achv:moneyAchv.description", {
|
||||
context: genderStr,
|
||||
moneyAmount: achvs._10K_MONEY.moneyAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "100K_MONEY":
|
||||
return i18next.t("achv:MoneyAchv.description", {
|
||||
case "100KMoney":
|
||||
return i18next.t("achv:moneyAchv.description", {
|
||||
context: genderStr,
|
||||
moneyAmount: achvs._100K_MONEY.moneyAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "1M_MONEY":
|
||||
return i18next.t("achv:MoneyAchv.description", {
|
||||
case "1MMoney":
|
||||
return i18next.t("achv:moneyAchv.description", {
|
||||
context: genderStr,
|
||||
moneyAmount: achvs._1M_MONEY.moneyAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "10M_MONEY":
|
||||
return i18next.t("achv:MoneyAchv.description", {
|
||||
case "10MMoney":
|
||||
return i18next.t("achv:moneyAchv.description", {
|
||||
context: genderStr,
|
||||
moneyAmount: achvs._10M_MONEY.moneyAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "250_DMG":
|
||||
return i18next.t("achv:DamageAchv.description", {
|
||||
case "250Dmg":
|
||||
return i18next.t("achv:damageAchv.description", {
|
||||
context: genderStr,
|
||||
damageAmount: achvs._250_DMG.damageAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "1000_DMG":
|
||||
return i18next.t("achv:DamageAchv.description", {
|
||||
case "1000Dmg":
|
||||
return i18next.t("achv:damageAchv.description", {
|
||||
context: genderStr,
|
||||
damageAmount: achvs._1000_DMG.damageAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "2500_DMG":
|
||||
return i18next.t("achv:DamageAchv.description", {
|
||||
case "2500Dmg":
|
||||
return i18next.t("achv:damageAchv.description", {
|
||||
context: genderStr,
|
||||
damageAmount: achvs._2500_DMG.damageAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "10000_DMG":
|
||||
return i18next.t("achv:DamageAchv.description", {
|
||||
case "10000Dmg":
|
||||
return i18next.t("achv:damageAchv.description", {
|
||||
context: genderStr,
|
||||
damageAmount: achvs._10000_DMG.damageAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "250_HEAL":
|
||||
return i18next.t("achv:HealAchv.description", {
|
||||
case "250Heal":
|
||||
return i18next.t("achv:healAchv.description", {
|
||||
context: genderStr,
|
||||
healAmount: achvs._250_HEAL.healAmount.toLocaleString("en-US"),
|
||||
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
||||
});
|
||||
case "1000_HEAL":
|
||||
return i18next.t("achv:HealAchv.description", {
|
||||
case "1000Heal":
|
||||
return i18next.t("achv:healAchv.description", {
|
||||
context: genderStr,
|
||||
healAmount: achvs._1000_HEAL.healAmount.toLocaleString("en-US"),
|
||||
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
||||
});
|
||||
case "2500_HEAL":
|
||||
return i18next.t("achv:HealAchv.description", {
|
||||
case "2500Heal":
|
||||
return i18next.t("achv:healAchv.description", {
|
||||
context: genderStr,
|
||||
healAmount: achvs._2500_HEAL.healAmount.toLocaleString("en-US"),
|
||||
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
||||
});
|
||||
case "10000_HEAL":
|
||||
return i18next.t("achv:HealAchv.description", {
|
||||
case "10000Heal":
|
||||
return i18next.t("achv:healAchv.description", {
|
||||
context: genderStr,
|
||||
healAmount: achvs._10000_HEAL.healAmount.toLocaleString("en-US"),
|
||||
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
||||
});
|
||||
case "LV_100":
|
||||
return i18next.t("achv:LevelAchv.description", {
|
||||
case "lv100":
|
||||
return i18next.t("achv:levelAchv.description", {
|
||||
context: genderStr,
|
||||
level: achvs.LV_100.level,
|
||||
});
|
||||
case "LV_250":
|
||||
return i18next.t("achv:LevelAchv.description", {
|
||||
case "lv250":
|
||||
return i18next.t("achv:levelAchv.description", {
|
||||
context: genderStr,
|
||||
level: achvs.LV_250.level,
|
||||
});
|
||||
case "LV_1000":
|
||||
return i18next.t("achv:LevelAchv.description", {
|
||||
case "lv1000":
|
||||
return i18next.t("achv:levelAchv.description", {
|
||||
context: genderStr,
|
||||
level: achvs.LV_1000.level,
|
||||
});
|
||||
case "10_RIBBONS":
|
||||
return i18next.t("achv:RibbonAchv.description", {
|
||||
case "10Ribbons":
|
||||
return i18next.t("achv:ribbonAchv.description", {
|
||||
context: genderStr,
|
||||
ribbonAmount: achvs._10_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "25_RIBBONS":
|
||||
return i18next.t("achv:RibbonAchv.description", {
|
||||
case "25Ribbons":
|
||||
return i18next.t("achv:ribbonAchv.description", {
|
||||
context: genderStr,
|
||||
ribbonAmount: achvs._25_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "50_RIBBONS":
|
||||
return i18next.t("achv:RibbonAchv.description", {
|
||||
case "50Ribbons":
|
||||
return i18next.t("achv:ribbonAchv.description", {
|
||||
context: genderStr,
|
||||
ribbonAmount: achvs._50_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "75_RIBBONS":
|
||||
return i18next.t("achv:RibbonAchv.description", {
|
||||
case "75Ribbons":
|
||||
return i18next.t("achv:ribbonAchv.description", {
|
||||
context: genderStr,
|
||||
ribbonAmount: achvs._75_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "100_RIBBONS":
|
||||
return i18next.t("achv:RibbonAchv.description", {
|
||||
case "100Ribbons":
|
||||
return i18next.t("achv:ribbonAchv.description", {
|
||||
context: genderStr,
|
||||
ribbonAmount: achvs._100_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||
});
|
||||
case "TRANSFER_MAX_STAT_STAGE":
|
||||
return i18next.t("achv:TRANSFER_MAX_STAT_STAGE.description", {
|
||||
case "transferMaxStatStage":
|
||||
return i18next.t("achv:transferMaxStatStage.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "MAX_FRIENDSHIP":
|
||||
return i18next.t("achv:MAX_FRIENDSHIP.description", {
|
||||
case "maxFriendship":
|
||||
return i18next.t("achv:maxFriendship.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "MEGA_EVOLVE":
|
||||
return i18next.t("achv:MEGA_EVOLVE.description", { context: genderStr });
|
||||
case "GIGANTAMAX":
|
||||
return i18next.t("achv:GIGANTAMAX.description", { context: genderStr });
|
||||
case "TERASTALLIZE":
|
||||
return i18next.t("achv:TERASTALLIZE.description", { context: genderStr });
|
||||
case "STELLAR_TERASTALLIZE":
|
||||
return i18next.t("achv:STELLAR_TERASTALLIZE.description", {
|
||||
case "megaEvolve":
|
||||
return i18next.t("achv:megaEvolve.description", { context: genderStr });
|
||||
case "gigantamax":
|
||||
return i18next.t("achv:gigantamax.description", { context: genderStr });
|
||||
case "terastallize":
|
||||
return i18next.t("achv:terastallize.description", { context: genderStr });
|
||||
case "stellarTerastallize":
|
||||
return i18next.t("achv:stellarTerastallize.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "SPLICE":
|
||||
return i18next.t("achv:SPLICE.description", { context: genderStr });
|
||||
case "MINI_BLACK_HOLE":
|
||||
return i18next.t("achv:MINI_BLACK_HOLE.description", {
|
||||
case "splice":
|
||||
return i18next.t("achv:splice.description", { context: genderStr });
|
||||
case "miniBlackHole":
|
||||
return i18next.t("achv:miniBlackHole.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "CATCH_MYTHICAL":
|
||||
return i18next.t("achv:CATCH_MYTHICAL.description", {
|
||||
case "catchMythical":
|
||||
return i18next.t("achv:catchMythical.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "CATCH_SUB_LEGENDARY":
|
||||
return i18next.t("achv:CATCH_SUB_LEGENDARY.description", {
|
||||
case "catchSubLegendary":
|
||||
return i18next.t("achv:catchSubLegendary.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "CATCH_LEGENDARY":
|
||||
return i18next.t("achv:CATCH_LEGENDARY.description", {
|
||||
case "catchLegendary":
|
||||
return i18next.t("achv:catchLegendary.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "SEE_SHINY":
|
||||
return i18next.t("achv:SEE_SHINY.description", { context: genderStr });
|
||||
case "SHINY_PARTY":
|
||||
return i18next.t("achv:SHINY_PARTY.description", { context: genderStr });
|
||||
case "HATCH_MYTHICAL":
|
||||
return i18next.t("achv:HATCH_MYTHICAL.description", {
|
||||
case "seeShiny":
|
||||
return i18next.t("achv:seeShiny.description", { context: genderStr });
|
||||
case "shinyParty":
|
||||
return i18next.t("achv:shinyParty.description", { context: genderStr });
|
||||
case "hatchMythical":
|
||||
return i18next.t("achv:hatchMythical.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "HATCH_SUB_LEGENDARY":
|
||||
return i18next.t("achv:HATCH_SUB_LEGENDARY.description", {
|
||||
case "hatchSubLegendary":
|
||||
return i18next.t("achv:hatchSubLegendary.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "HATCH_LEGENDARY":
|
||||
return i18next.t("achv:HATCH_LEGENDARY.description", {
|
||||
case "hatchLegendary":
|
||||
return i18next.t("achv:hatchLegendary.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "HATCH_SHINY":
|
||||
return i18next.t("achv:HATCH_SHINY.description", { context: genderStr });
|
||||
case "HIDDEN_ABILITY":
|
||||
return i18next.t("achv:HIDDEN_ABILITY.description", {
|
||||
case "hatchShiny":
|
||||
return i18next.t("achv:hatchShiny.description", { context: genderStr });
|
||||
case "hiddenAbility":
|
||||
return i18next.t("achv:hiddenAbility.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "PERFECT_IVS":
|
||||
return i18next.t("achv:PERFECT_IVS.description", { context: genderStr });
|
||||
case "CLASSIC_VICTORY":
|
||||
return i18next.t("achv:CLASSIC_VICTORY.description", {
|
||||
case "perfectIvs":
|
||||
return i18next.t("achv:perfectIvs.description", { context: genderStr });
|
||||
case "classicVictory":
|
||||
return i18next.t("achv:classicVictory.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "UNEVOLVED_CLASSIC_VICTORY":
|
||||
return i18next.t("achv:UNEVOLVED_CLASSIC_VICTORY.description", {
|
||||
case "unevolvedClassicVictory":
|
||||
return i18next.t("achv:unevolvedClassicVictory.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "MONO_GEN_ONE":
|
||||
return i18next.t("achv:MONO_GEN_ONE.description", { context: genderStr });
|
||||
case "MONO_GEN_TWO":
|
||||
return i18next.t("achv:MONO_GEN_TWO.description", { context: genderStr });
|
||||
case "MONO_GEN_THREE":
|
||||
return i18next.t("achv:MONO_GEN_THREE.description", {
|
||||
case "monoGenOne":
|
||||
return i18next.t("achv:monoGenOne.description", { context: genderStr });
|
||||
case "monoGenTwo":
|
||||
return i18next.t("achv:monoGenTwo.description", { context: genderStr });
|
||||
case "monoGenThree":
|
||||
return i18next.t("achv:monoGenThree.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "MONO_GEN_FOUR":
|
||||
return i18next.t("achv:MONO_GEN_FOUR.description", {
|
||||
case "monoGenFour":
|
||||
return i18next.t("achv:monoGenFour.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "MONO_GEN_FIVE":
|
||||
return i18next.t("achv:MONO_GEN_FIVE.description", {
|
||||
case "monoGenFive":
|
||||
return i18next.t("achv:monoGenFive.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "MONO_GEN_SIX":
|
||||
return i18next.t("achv:MONO_GEN_SIX.description", { context: genderStr });
|
||||
case "MONO_GEN_SEVEN":
|
||||
return i18next.t("achv:MONO_GEN_SEVEN.description", {
|
||||
case "monoGenSix":
|
||||
return i18next.t("achv:monoGenSix.description", { context: genderStr });
|
||||
case "monoGenSeven":
|
||||
return i18next.t("achv:monoGenSeven.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "MONO_GEN_EIGHT":
|
||||
return i18next.t("achv:MONO_GEN_EIGHT.description", {
|
||||
case "monoGenEight":
|
||||
return i18next.t("achv:monoGenEight.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "MONO_GEN_NINE":
|
||||
return i18next.t("achv:MONO_GEN_NINE.description", {
|
||||
case "monoGenNine":
|
||||
return i18next.t("achv:monoGenNine.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "MONO_NORMAL":
|
||||
case "MONO_FIGHTING":
|
||||
case "MONO_FLYING":
|
||||
case "MONO_POISON":
|
||||
case "MONO_GROUND":
|
||||
case "MONO_ROCK":
|
||||
case "MONO_BUG":
|
||||
case "MONO_GHOST":
|
||||
case "MONO_STEEL":
|
||||
case "MONO_FIRE":
|
||||
case "MONO_WATER":
|
||||
case "MONO_GRASS":
|
||||
case "MONO_ELECTRIC":
|
||||
case "MONO_PSYCHIC":
|
||||
case "MONO_ICE":
|
||||
case "MONO_DRAGON":
|
||||
case "MONO_DARK":
|
||||
case "MONO_FAIRY":
|
||||
return i18next.t("achv:MonoType.description", {
|
||||
case "monoNormal":
|
||||
case "monoFighting":
|
||||
case "monoFlying":
|
||||
case "monoPoison":
|
||||
case "monoGround":
|
||||
case "monoRock":
|
||||
case "monoBug":
|
||||
case "monoGhost":
|
||||
case "monoSteel":
|
||||
case "monoFire":
|
||||
case "monoWater":
|
||||
case "monoGrass":
|
||||
case "monoElectric":
|
||||
case "monoPsychic":
|
||||
case "monoIce":
|
||||
case "monoDragon":
|
||||
case "monoDark":
|
||||
case "monoFairy":
|
||||
return i18next.t("achv:monoType.description", {
|
||||
context: genderStr,
|
||||
type: i18next.t(`pokemonInfo:Type.${localizationKey.slice(5)}`),
|
||||
type: i18next.t(`pokemonInfo:type.${toCamelCase(localizationKey.slice(4))}`),
|
||||
});
|
||||
case "FRESH_START":
|
||||
return i18next.t("achv:FRESH_START.description", { context: genderStr });
|
||||
case "INVERSE_BATTLE":
|
||||
return i18next.t("achv:INVERSE_BATTLE.description", {
|
||||
case "freshStart":
|
||||
return i18next.t("achv:freshStart.description", { context: genderStr });
|
||||
case "inverseBattle":
|
||||
return i18next.t("achv:inverseBattle.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
case "FLIP_STATS":
|
||||
return i18next.t("achv:FLIP_STATS.description", { context: genderStr });
|
||||
case "FLIP_INVERSE":
|
||||
return i18next.t("achv:FLIP_INVERSE.description", { context: genderStr });
|
||||
case "NUZLOCKE":
|
||||
return i18next.t("achv:NUZLOCKE.description", { context: genderStr });
|
||||
case "BREEDERS_IN_SPACE":
|
||||
return i18next.t("achv:BREEDERS_IN_SPACE.description", {
|
||||
case "flipStats":
|
||||
return i18next.t("achv:flipStats.description", { context: genderStr });
|
||||
case "flipInverse":
|
||||
return i18next.t("achv:flipInverse.description", { context: genderStr });
|
||||
case "nuzlocke":
|
||||
return i18next.t("achv:nuzlocke.description", { context: genderStr });
|
||||
case "breedersInSpace":
|
||||
return i18next.t("achv:breedersInSpace.description", {
|
||||
context: genderStr,
|
||||
});
|
||||
default:
|
||||
@ -460,84 +461,84 @@ export function getAchievementDescription(localizationKey: string): string {
|
||||
}
|
||||
|
||||
export const achvs = {
|
||||
_10K_MONEY: new MoneyAchv("10K_MONEY", "", 10000, "nugget", 10),
|
||||
_100K_MONEY: new MoneyAchv("100K_MONEY", "", 100000, "big_nugget", 25).setSecret(true),
|
||||
_1M_MONEY: new MoneyAchv("1M_MONEY", "", 1000000, "relic_gold", 50).setSecret(true),
|
||||
_10M_MONEY: new MoneyAchv("10M_MONEY", "", 10000000, "coin_case", 100).setSecret(true),
|
||||
_250_DMG: new DamageAchv("250_DMG", "", 250, "lucky_punch", 10),
|
||||
_1000_DMG: new DamageAchv("1000_DMG", "", 1000, "lucky_punch_great", 25).setSecret(true),
|
||||
_2500_DMG: new DamageAchv("2500_DMG", "", 2500, "lucky_punch_ultra", 50).setSecret(true),
|
||||
_10000_DMG: new DamageAchv("10000_DMG", "", 10000, "lucky_punch_master", 100).setSecret(true),
|
||||
_250_HEAL: new HealAchv("250_HEAL", "", 250, "potion", 10),
|
||||
_1000_HEAL: new HealAchv("1000_HEAL", "", 1000, "super_potion", 25).setSecret(true),
|
||||
_2500_HEAL: new HealAchv("2500_HEAL", "", 2500, "hyper_potion", 50).setSecret(true),
|
||||
_10000_HEAL: new HealAchv("10000_HEAL", "", 10000, "max_potion", 100).setSecret(true),
|
||||
LV_100: new LevelAchv("LV_100", "", 100, "rare_candy", 25).setSecret(),
|
||||
LV_250: new LevelAchv("LV_250", "", 250, "rarer_candy", 50).setSecret(true),
|
||||
LV_1000: new LevelAchv("LV_1000", "", 1000, "candy_jar", 100).setSecret(true),
|
||||
_10_RIBBONS: new RibbonAchv("10_RIBBONS", "", 10, "bronze_ribbon", 10),
|
||||
_25_RIBBONS: new RibbonAchv("25_RIBBONS", "", 25, "great_ribbon", 25).setSecret(true),
|
||||
_50_RIBBONS: new RibbonAchv("50_RIBBONS", "", 50, "ultra_ribbon", 50).setSecret(true),
|
||||
_75_RIBBONS: new RibbonAchv("75_RIBBONS", "", 75, "rogue_ribbon", 75).setSecret(true),
|
||||
_100_RIBBONS: new RibbonAchv("100_RIBBONS", "", 100, "master_ribbon", 100).setSecret(true),
|
||||
TRANSFER_MAX_STAT_STAGE: new Achv("TRANSFER_MAX_STAT_STAGE", "", "TRANSFER_MAX_STAT_STAGE.description", "baton", 20),
|
||||
MAX_FRIENDSHIP: new Achv("MAX_FRIENDSHIP", "", "MAX_FRIENDSHIP.description", "soothe_bell", 25),
|
||||
MEGA_EVOLVE: new Achv("MEGA_EVOLVE", "", "MEGA_EVOLVE.description", "mega_bracelet", 50),
|
||||
GIGANTAMAX: new Achv("GIGANTAMAX", "", "GIGANTAMAX.description", "dynamax_band", 50),
|
||||
TERASTALLIZE: new Achv("TERASTALLIZE", "", "TERASTALLIZE.description", "tera_orb", 25),
|
||||
_10K_MONEY: new MoneyAchv("10KMoney", "", 10000, "nugget", 10),
|
||||
_100K_MONEY: new MoneyAchv("100KMoney", "", 100000, "big_nugget", 25).setSecret(true),
|
||||
_1M_MONEY: new MoneyAchv("1MMoney", "", 1000000, "relic_gold", 50).setSecret(true),
|
||||
_10M_MONEY: new MoneyAchv("10MMoney", "", 10000000, "coin_case", 100).setSecret(true),
|
||||
_250_DMG: new DamageAchv("250Dmg", "", 250, "lucky_punch", 10),
|
||||
_1000_DMG: new DamageAchv("1000Dmg", "", 1000, "lucky_punch_great", 25).setSecret(true),
|
||||
_2500_DMG: new DamageAchv("2500Dmg", "", 2500, "lucky_punch_ultra", 50).setSecret(true),
|
||||
_10000_DMG: new DamageAchv("10000Dmg", "", 10000, "lucky_punch_master", 100).setSecret(true),
|
||||
_250_HEAL: new HealAchv("250Heal", "", 250, "potion", 10),
|
||||
_1000_HEAL: new HealAchv("1000Heal", "", 1000, "super_potion", 25).setSecret(true),
|
||||
_2500_HEAL: new HealAchv("2500Heal", "", 2500, "hyper_potion", 50).setSecret(true),
|
||||
_10000_HEAL: new HealAchv("10000Heal", "", 10000, "max_potion", 100).setSecret(true),
|
||||
LV_100: new LevelAchv("lv100", "", 100, "rare_candy", 25).setSecret(),
|
||||
LV_250: new LevelAchv("lv250", "", 250, "rarer_candy", 50).setSecret(true),
|
||||
LV_1000: new LevelAchv("lv1000", "", 1000, "candy_jar", 100).setSecret(true),
|
||||
_10_RIBBONS: new RibbonAchv("10Ribbons", "", 10, "bronze_ribbon", 10),
|
||||
_25_RIBBONS: new RibbonAchv("25Ribbons", "", 25, "great_ribbon", 25).setSecret(true),
|
||||
_50_RIBBONS: new RibbonAchv("50Ribbons", "", 50, "ultra_ribbon", 50).setSecret(true),
|
||||
_75_RIBBONS: new RibbonAchv("75Ribbons", "", 75, "rogue_ribbon", 75).setSecret(true),
|
||||
_100_RIBBONS: new RibbonAchv("100Ribbons", "", 100, "master_ribbon", 100).setSecret(true),
|
||||
TRANSFER_MAX_STAT_STAGE: new Achv("transferMaxStatStage", "", "transferMaxStatStage.description", "baton", 20),
|
||||
MAX_FRIENDSHIP: new Achv("maxFriendship", "", "maxFriendship.description", "soothe_bell", 25),
|
||||
MEGA_EVOLVE: new Achv("megaEvolve", "", "megaEvolve.description", "mega_bracelet", 50),
|
||||
GIGANTAMAX: new Achv("gigantamax", "", "gigantamax.description", "dynamax_band", 50),
|
||||
TERASTALLIZE: new Achv("terastallize", "", "terastallize.description", "tera_orb", 25),
|
||||
STELLAR_TERASTALLIZE: new Achv(
|
||||
"STELLAR_TERASTALLIZE",
|
||||
"stellarTerastallize",
|
||||
"",
|
||||
"STELLAR_TERASTALLIZE.description",
|
||||
"stellarTerastallize.description",
|
||||
"stellar_tera_shard",
|
||||
25,
|
||||
).setSecret(true),
|
||||
SPLICE: new Achv("SPLICE", "", "SPLICE.description", "dna_splicers", 10),
|
||||
SPLICE: new Achv("splice", "", "splice.description", "dna_splicers", 10),
|
||||
MINI_BLACK_HOLE: new ModifierAchv(
|
||||
"MINI_BLACK_HOLE",
|
||||
"miniBlackHole",
|
||||
"",
|
||||
"MINI_BLACK_HOLE.description",
|
||||
"miniBlackHole.description",
|
||||
"mini_black_hole",
|
||||
25,
|
||||
modifier => modifier instanceof TurnHeldItemTransferModifier,
|
||||
).setSecret(),
|
||||
CATCH_MYTHICAL: new Achv("CATCH_MYTHICAL", "", "CATCH_MYTHICAL.description", "strange_ball", 50).setSecret(),
|
||||
CATCH_SUB_LEGENDARY: new Achv("CATCH_SUB_LEGENDARY", "", "CATCH_SUB_LEGENDARY.description", "rb", 75).setSecret(),
|
||||
CATCH_LEGENDARY: new Achv("CATCH_LEGENDARY", "", "CATCH_LEGENDARY.description", "mb", 100).setSecret(),
|
||||
SEE_SHINY: new Achv("SEE_SHINY", "", "SEE_SHINY.description", "pb_gold", 75),
|
||||
SHINY_PARTY: new Achv("SHINY_PARTY", "", "SHINY_PARTY.description", "shiny_charm", 100).setSecret(true),
|
||||
HATCH_MYTHICAL: new Achv("HATCH_MYTHICAL", "", "HATCH_MYTHICAL.description", "mystery_egg", 75).setSecret(),
|
||||
CATCH_MYTHICAL: new Achv("catchMythical", "", "catchMythical.description", "strange_ball", 50).setSecret(),
|
||||
CATCH_SUB_LEGENDARY: new Achv("catchSubLegendary", "", "catchSubLegendary.description", "rb", 75).setSecret(),
|
||||
CATCH_LEGENDARY: new Achv("catchLegendary", "", "catchLegendary.description", "mb", 100).setSecret(),
|
||||
SEE_SHINY: new Achv("seeShiny", "", "seeShiny.description", "pb_gold", 75),
|
||||
SHINY_PARTY: new Achv("shinyParty", "", "shinyParty.description", "shiny_charm", 100).setSecret(true),
|
||||
HATCH_MYTHICAL: new Achv("hatchMythical", "", "hatchMythical.description", "mystery_egg", 75).setSecret(),
|
||||
HATCH_SUB_LEGENDARY: new Achv(
|
||||
"HATCH_SUB_LEGENDARY",
|
||||
"hatchSubLegendary",
|
||||
"",
|
||||
"HATCH_SUB_LEGENDARY.description",
|
||||
"hatchSubLegendary.description",
|
||||
"oval_stone",
|
||||
100,
|
||||
).setSecret(),
|
||||
HATCH_LEGENDARY: new Achv("HATCH_LEGENDARY", "", "HATCH_LEGENDARY.description", "lucky_egg", 125).setSecret(),
|
||||
HATCH_SHINY: new Achv("HATCH_SHINY", "", "HATCH_SHINY.description", "golden_egg", 100).setSecret(),
|
||||
HIDDEN_ABILITY: new Achv("HIDDEN_ABILITY", "", "HIDDEN_ABILITY.description", "ability_charm", 75),
|
||||
PERFECT_IVS: new Achv("PERFECT_IVS", "", "PERFECT_IVS.description", "blunder_policy", 100),
|
||||
HATCH_LEGENDARY: new Achv("hatchLegendary", "", "hatchLegendary.description", "lucky_egg", 125).setSecret(),
|
||||
HATCH_SHINY: new Achv("hatchShiny", "", "hatchShiny.description", "golden_egg", 100).setSecret(),
|
||||
HIDDEN_ABILITY: new Achv("hiddenAbility", "", "hiddenAbility.description", "ability_charm", 75),
|
||||
PERFECT_IVS: new Achv("perfectIvs", "", "perfectIvs.description", "blunder_policy", 100),
|
||||
CLASSIC_VICTORY: new Achv(
|
||||
"CLASSIC_VICTORY",
|
||||
"classicVictory",
|
||||
"",
|
||||
"CLASSIC_VICTORY.description",
|
||||
"classicVictory.description",
|
||||
"relic_crown",
|
||||
150,
|
||||
_ => globalScene.gameData.gameStats.sessionsWon === 0,
|
||||
),
|
||||
UNEVOLVED_CLASSIC_VICTORY: new Achv(
|
||||
"UNEVOLVED_CLASSIC_VICTORY",
|
||||
"unevolvedClassicVictory",
|
||||
"",
|
||||
"UNEVOLVED_CLASSIC_VICTORY.description",
|
||||
"unevolvedClassicVictory.description",
|
||||
"eviolite",
|
||||
175,
|
||||
_ => globalScene.getPlayerParty().some(p => p.getSpeciesForm(true).speciesId in pokemonEvolutions),
|
||||
),
|
||||
MONO_GEN_ONE_VICTORY: new ChallengeAchv(
|
||||
"MONO_GEN_ONE",
|
||||
"monoGenOne",
|
||||
"",
|
||||
"MONO_GEN_ONE.description",
|
||||
"monoGenOne.description",
|
||||
"ribbon_gen1",
|
||||
100,
|
||||
c =>
|
||||
@ -548,9 +549,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GEN_TWO_VICTORY: new ChallengeAchv(
|
||||
"MONO_GEN_TWO",
|
||||
"monoGenTwo",
|
||||
"",
|
||||
"MONO_GEN_TWO.description",
|
||||
"monoGenTwo.description",
|
||||
"ribbon_gen2",
|
||||
100,
|
||||
c =>
|
||||
@ -561,9 +562,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GEN_THREE_VICTORY: new ChallengeAchv(
|
||||
"MONO_GEN_THREE",
|
||||
"monoGenThree",
|
||||
"",
|
||||
"MONO_GEN_THREE.description",
|
||||
"monoGenThree.description",
|
||||
"ribbon_gen3",
|
||||
100,
|
||||
c =>
|
||||
@ -574,9 +575,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GEN_FOUR_VICTORY: new ChallengeAchv(
|
||||
"MONO_GEN_FOUR",
|
||||
"monoGenFour",
|
||||
"",
|
||||
"MONO_GEN_FOUR.description",
|
||||
"monoGenFour.description",
|
||||
"ribbon_gen4",
|
||||
100,
|
||||
c =>
|
||||
@ -587,9 +588,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GEN_FIVE_VICTORY: new ChallengeAchv(
|
||||
"MONO_GEN_FIVE",
|
||||
"monoGenFive",
|
||||
"",
|
||||
"MONO_GEN_FIVE.description",
|
||||
"monoGenFive.description",
|
||||
"ribbon_gen5",
|
||||
100,
|
||||
c =>
|
||||
@ -600,9 +601,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GEN_SIX_VICTORY: new ChallengeAchv(
|
||||
"MONO_GEN_SIX",
|
||||
"monoGenSix",
|
||||
"",
|
||||
"MONO_GEN_SIX.description",
|
||||
"monoGenSix.description",
|
||||
"ribbon_gen6",
|
||||
100,
|
||||
c =>
|
||||
@ -613,9 +614,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GEN_SEVEN_VICTORY: new ChallengeAchv(
|
||||
"MONO_GEN_SEVEN",
|
||||
"monoGenSeven",
|
||||
"",
|
||||
"MONO_GEN_SEVEN.description",
|
||||
"monoGenSeven.description",
|
||||
"ribbon_gen7",
|
||||
100,
|
||||
c =>
|
||||
@ -626,9 +627,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GEN_EIGHT_VICTORY: new ChallengeAchv(
|
||||
"MONO_GEN_EIGHT",
|
||||
"monoGenEight",
|
||||
"",
|
||||
"MONO_GEN_EIGHT.description",
|
||||
"monoGenEight.description",
|
||||
"ribbon_gen8",
|
||||
100,
|
||||
c =>
|
||||
@ -639,9 +640,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GEN_NINE_VICTORY: new ChallengeAchv(
|
||||
"MONO_GEN_NINE",
|
||||
"monoGenNine",
|
||||
"",
|
||||
"MONO_GEN_NINE.description",
|
||||
"monoGenNine.description",
|
||||
"ribbon_gen9",
|
||||
100,
|
||||
c =>
|
||||
@ -652,9 +653,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_NORMAL: new ChallengeAchv(
|
||||
"MONO_NORMAL",
|
||||
"monoNormal",
|
||||
"",
|
||||
"MONO_NORMAL.description",
|
||||
"monoNormal.description",
|
||||
"silk_scarf",
|
||||
100,
|
||||
c =>
|
||||
@ -665,9 +666,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_FIGHTING: new ChallengeAchv(
|
||||
"MONO_FIGHTING",
|
||||
"monoFighting",
|
||||
"",
|
||||
"MONO_FIGHTING.description",
|
||||
"monoFighting.description",
|
||||
"black_belt",
|
||||
100,
|
||||
c =>
|
||||
@ -678,9 +679,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_FLYING: new ChallengeAchv(
|
||||
"MONO_FLYING",
|
||||
"monoFlying",
|
||||
"",
|
||||
"MONO_FLYING.description",
|
||||
"monoFlying.description",
|
||||
"sharp_beak",
|
||||
100,
|
||||
c =>
|
||||
@ -691,9 +692,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_POISON: new ChallengeAchv(
|
||||
"MONO_POISON",
|
||||
"monoPoison",
|
||||
"",
|
||||
"MONO_POISON.description",
|
||||
"monoPoison.description",
|
||||
"poison_barb",
|
||||
100,
|
||||
c =>
|
||||
@ -704,9 +705,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GROUND: new ChallengeAchv(
|
||||
"MONO_GROUND",
|
||||
"monoGround",
|
||||
"",
|
||||
"MONO_GROUND.description",
|
||||
"monoGround.description",
|
||||
"soft_sand",
|
||||
100,
|
||||
c =>
|
||||
@ -717,9 +718,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_ROCK: new ChallengeAchv(
|
||||
"MONO_ROCK",
|
||||
"monoRock",
|
||||
"",
|
||||
"MONO_ROCK.description",
|
||||
"monoRock.description",
|
||||
"hard_stone",
|
||||
100,
|
||||
c =>
|
||||
@ -730,9 +731,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_BUG: new ChallengeAchv(
|
||||
"MONO_BUG",
|
||||
"monoBug",
|
||||
"",
|
||||
"MONO_BUG.description",
|
||||
"monoBug.description",
|
||||
"silver_powder",
|
||||
100,
|
||||
c =>
|
||||
@ -743,9 +744,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GHOST: new ChallengeAchv(
|
||||
"MONO_GHOST",
|
||||
"monoGhost",
|
||||
"",
|
||||
"MONO_GHOST.description",
|
||||
"monoGhost.description",
|
||||
"spell_tag",
|
||||
100,
|
||||
c =>
|
||||
@ -756,9 +757,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_STEEL: new ChallengeAchv(
|
||||
"MONO_STEEL",
|
||||
"monoSteel",
|
||||
"",
|
||||
"MONO_STEEL.description",
|
||||
"monoSteel.description",
|
||||
"metal_coat",
|
||||
100,
|
||||
c =>
|
||||
@ -769,9 +770,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_FIRE: new ChallengeAchv(
|
||||
"MONO_FIRE",
|
||||
"monoFire",
|
||||
"",
|
||||
"MONO_FIRE.description",
|
||||
"monoFire.description",
|
||||
"charcoal",
|
||||
100,
|
||||
c =>
|
||||
@ -782,9 +783,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_WATER: new ChallengeAchv(
|
||||
"MONO_WATER",
|
||||
"monoWater",
|
||||
"",
|
||||
"MONO_WATER.description",
|
||||
"monoWater.description",
|
||||
"mystic_water",
|
||||
100,
|
||||
c =>
|
||||
@ -795,9 +796,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_GRASS: new ChallengeAchv(
|
||||
"MONO_GRASS",
|
||||
"monoGrass",
|
||||
"",
|
||||
"MONO_GRASS.description",
|
||||
"monoGrass.description",
|
||||
"miracle_seed",
|
||||
100,
|
||||
c =>
|
||||
@ -808,9 +809,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_ELECTRIC: new ChallengeAchv(
|
||||
"MONO_ELECTRIC",
|
||||
"monoElectric",
|
||||
"",
|
||||
"MONO_ELECTRIC.description",
|
||||
"monoElectric.description",
|
||||
"magnet",
|
||||
100,
|
||||
c =>
|
||||
@ -821,9 +822,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_PSYCHIC: new ChallengeAchv(
|
||||
"MONO_PSYCHIC",
|
||||
"monoPsychic",
|
||||
"",
|
||||
"MONO_PSYCHIC.description",
|
||||
"monoPsychic.description",
|
||||
"twisted_spoon",
|
||||
100,
|
||||
c =>
|
||||
@ -834,9 +835,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_ICE: new ChallengeAchv(
|
||||
"MONO_ICE",
|
||||
"monoIce",
|
||||
"",
|
||||
"MONO_ICE.description",
|
||||
"monoIce.description",
|
||||
"never_melt_ice",
|
||||
100,
|
||||
c =>
|
||||
@ -847,9 +848,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_DRAGON: new ChallengeAchv(
|
||||
"MONO_DRAGON",
|
||||
"monoDragon",
|
||||
"",
|
||||
"MONO_DRAGON.description",
|
||||
"monoDragon.description",
|
||||
"dragon_fang",
|
||||
100,
|
||||
c =>
|
||||
@ -860,9 +861,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_DARK: new ChallengeAchv(
|
||||
"MONO_DARK",
|
||||
"monoDark",
|
||||
"",
|
||||
"MONO_DARK.description",
|
||||
"monoDark.description",
|
||||
"black_glasses",
|
||||
100,
|
||||
c =>
|
||||
@ -873,9 +874,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
MONO_FAIRY: new ChallengeAchv(
|
||||
"MONO_FAIRY",
|
||||
"monoFairy",
|
||||
"",
|
||||
"MONO_FAIRY.description",
|
||||
"monoFairy.description",
|
||||
"fairy_feather",
|
||||
100,
|
||||
c =>
|
||||
@ -886,9 +887,9 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
FRESH_START: new ChallengeAchv(
|
||||
"FRESH_START",
|
||||
"freshStart",
|
||||
"",
|
||||
"FRESH_START.description",
|
||||
"freshStart.description",
|
||||
"reviver_seed",
|
||||
100,
|
||||
c =>
|
||||
@ -899,25 +900,25 @@ export const achvs = {
|
||||
),
|
||||
),
|
||||
INVERSE_BATTLE: new ChallengeAchv(
|
||||
"INVERSE_BATTLE",
|
||||
"inverseBattle",
|
||||
"",
|
||||
"INVERSE_BATTLE.description",
|
||||
"inverseBattle.description",
|
||||
"inverse",
|
||||
100,
|
||||
c => c instanceof InverseBattleChallenge && c.value > 0,
|
||||
),
|
||||
FLIP_STATS: new ChallengeAchv(
|
||||
"FLIP_STATS",
|
||||
"flipStats",
|
||||
"",
|
||||
"FLIP_STATS.description",
|
||||
"flipStats.description",
|
||||
"dubious_disc",
|
||||
100,
|
||||
c => c instanceof FlipStatChallenge && c.value > 0,
|
||||
),
|
||||
FLIP_INVERSE: new ChallengeAchv(
|
||||
"FLIP_INVERSE",
|
||||
"flipInverse",
|
||||
"",
|
||||
"FLIP_INVERSE.description",
|
||||
"flipInverse.description",
|
||||
"cracked_pot",
|
||||
100,
|
||||
c =>
|
||||
@ -926,8 +927,8 @@ export const achvs = {
|
||||
globalScene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0),
|
||||
).setSecret(),
|
||||
// TODO: Decide on icon
|
||||
NUZLOCKE: new ChallengeAchv("NUZLOCKE", "", "NUZLOCKE.description", "leaf_stone", 100, isNuzlockeChallenge),
|
||||
BREEDERS_IN_SPACE: new Achv("BREEDERS_IN_SPACE", "", "BREEDERS_IN_SPACE.description", "moon_stone", 50).setSecret(),
|
||||
NUZLOCKE: new ChallengeAchv("nuzlocke", "", "nuzlocke.description", "leaf_stone", 100, isNuzlockeChallenge),
|
||||
BREEDERS_IN_SPACE: new Achv("breedersInSpace", "", "breedersInSpace.description", "moon_stone", 50).setSecret(),
|
||||
};
|
||||
|
||||
export function initAchievements() {
|
||||
|
@ -15,6 +15,6 @@ export function awardRibbonsToSpeciesLine(id: SpeciesId, ribbons: RibbonFlag): v
|
||||
dexData[id].ribbons.award(ribbons);
|
||||
// Mark all pre-evolutions of the Pokémon with the same ribbon flags.
|
||||
for (let prevoId = pokemonPrevolutions[id]; !isNullOrUndefined(prevoId); prevoId = pokemonPrevolutions[prevoId]) {
|
||||
dexData[id].ribbons.award(ribbons);
|
||||
dexData[prevoId].ribbons.award(ribbons);
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ export class AchvsUiHandler extends MessageUiHandler {
|
||||
const genderIndex = globalScene.gameData.gender ?? PlayerGender.MALE;
|
||||
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
||||
|
||||
this.achvsName = i18next.t("achv:Achievements.name", { context: genderStr });
|
||||
this.achvsName = i18next.t("achv:achievements.name", { context: genderStr });
|
||||
this.vouchersName = i18next.t("voucher:vouchers");
|
||||
|
||||
this.iconsBg = addWindow(0, this.headerBg.height, WIDTH - 2, HEIGHT - this.headerBg.height - 68).setOrigin(0);
|
||||
@ -214,7 +214,7 @@ export class AchvsUiHandler extends MessageUiHandler {
|
||||
this.showText(!hidden ? achv.description : "");
|
||||
this.scoreText.setText(`${achv.score}pt`);
|
||||
this.unlockText.setText(
|
||||
unlocked ? new Date(achvUnlocks[achv.id]).toLocaleDateString() : i18next.t("achv:Locked.name"),
|
||||
unlocked ? new Date(achvUnlocks[achv.id]).toLocaleDateString() : i18next.t("achv:locked.name"),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { TextStyle } from "#enums/text-style";
|
||||
import { addTextObject } from "#ui/text";
|
||||
import { addWindow } from "#ui/ui-theme";
|
||||
import { fixedInt } from "#utils/common";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
|
||||
interface BaseStatsOverlaySettings {
|
||||
@ -68,7 +69,9 @@ export class BaseStatsOverlay extends Phaser.GameObjects.Container implements In
|
||||
// show this component with infos for the specific move
|
||||
show(values: number[], total: number): boolean {
|
||||
for (let i = 0; i < 6; i++) {
|
||||
this.statsLabels[i].setText(i18next.t(`pokemonInfo:Stat.${shortStats[i]}shortened`) + ": " + `${values[i]}`);
|
||||
this.statsLabels[i].setText(
|
||||
i18next.t(`pokemonInfo:stat.${toCamelCase(shortStats[i])}Shortened`) + ": " + `${values[i]}`,
|
||||
);
|
||||
// This accounts for base stats up to 200, might not be enough.
|
||||
// TODO: change color based on value.
|
||||
this.statsShadows[i].setSize(values[i] / 2, 5);
|
||||
|
@ -9,6 +9,7 @@ import type { Pokemon } from "#field/pokemon";
|
||||
import { getVariantTint } from "#sprites/variant";
|
||||
import { addTextObject } from "#ui/text";
|
||||
import { fixedInt, getLocalizedSpriteKey, getShinyDescriptor } from "#utils/common";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
|
||||
/**
|
||||
@ -361,7 +362,7 @@ export abstract class BattleInfo extends Phaser.GameObjects.Container {
|
||||
globalScene.ui.showTooltip(
|
||||
"",
|
||||
i18next.t("fightUiHandler:teraHover", {
|
||||
type: i18next.t(`pokemonInfo:Type.${PokemonType[this.lastTeraType]}`),
|
||||
type: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.lastTeraType])}`),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import { TextStyle } from "#enums/text-style";
|
||||
import { addTextObject } from "#ui/text";
|
||||
import { toTitleCase } from "#utils/strings";
|
||||
import { toCamelCase, toTitleCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
|
||||
const hiddenX = -150;
|
||||
@ -100,7 +100,7 @@ export class BgmBar extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
getRealBgmName(bgmName: string): string {
|
||||
return i18next.t([`bgmName:${bgmName}`, "bgmName:missing_entries"], {
|
||||
return i18next.t([`bgmName:${toCamelCase(bgmName)}`, "bgmName:missingEntries"], {
|
||||
name: toTitleCase(bgmName),
|
||||
});
|
||||
}
|
||||
|
@ -31,14 +31,14 @@ export class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
|
||||
const config: OptionSelectConfig = {
|
||||
options: [
|
||||
{
|
||||
label: i18next.t("partyUiHandler:SUMMARY"),
|
||||
label: i18next.t("partyUiHandler:summary"),
|
||||
handler: () => {
|
||||
args[0]();
|
||||
return true;
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18next.t("partyUiHandler:POKEDEX"),
|
||||
label: i18next.t("partyUiHandler:pokedex"),
|
||||
handler: () => {
|
||||
args[1]();
|
||||
return true;
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { loggedInUser } from "#app/account";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import { speciesStarterCosts } from "#balance/starters";
|
||||
import { Button } from "#enums/buttons";
|
||||
import { DexAttr } from "#enums/dex-attr";
|
||||
import { PlayerGender } from "#enums/player-gender";
|
||||
import { TextStyle } from "#enums/text-style";
|
||||
import { UiTheme } from "#enums/ui-theme";
|
||||
import type { GameData } from "#system/game-data";
|
||||
@ -227,6 +229,9 @@ export class GameStatsUiHandler extends UiHandler {
|
||||
private arrowUp: Phaser.GameObjects.Sprite;
|
||||
private arrowDown: Phaser.GameObjects.Sprite;
|
||||
|
||||
/** Logged in username */
|
||||
private headerText: Phaser.GameObjects.Text;
|
||||
|
||||
/** Whether the UI is single column mode */
|
||||
private get singleCol(): boolean {
|
||||
const resolvedLang = i18next.resolvedLanguage ?? "en";
|
||||
@ -296,6 +301,23 @@ export class GameStatsUiHandler extends UiHandler {
|
||||
return GameStatsUiHandler.ROWS_PER_PAGE * this.columnCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the username of logged in user. If the username is hidden, the trainer name based on gender will be displayed.
|
||||
* @returns The username of logged in user
|
||||
*/
|
||||
private getUsername(): string {
|
||||
const usernameReplacement =
|
||||
globalScene.gameData.gender === PlayerGender.FEMALE
|
||||
? i18next.t("trainerNames:player_f")
|
||||
: i18next.t("trainerNames:player_m");
|
||||
|
||||
const displayName = !globalScene.hideUsername
|
||||
? (loggedInUser?.username ?? i18next.t("common:guest"))
|
||||
: usernameReplacement;
|
||||
|
||||
return i18next.t("gameStatsUiHandler:stats", { username: displayName });
|
||||
}
|
||||
|
||||
// #endregion Columnar-specific properties
|
||||
|
||||
setup() {
|
||||
@ -316,11 +338,11 @@ export class GameStatsUiHandler extends UiHandler {
|
||||
|
||||
const headerBg = addWindow(0, 0, sWidth - 2, 24).setOrigin(0);
|
||||
|
||||
const headerText = addTextObject(0, 0, i18next.t("gameStatsUiHandler:stats"), TextStyle.HEADER_LABEL)
|
||||
this.headerText = addTextObject(0, 0, this.getUsername(), TextStyle.HEADER_LABEL)
|
||||
.setOrigin(0)
|
||||
.setPositionRelative(headerBg, 8, 4);
|
||||
|
||||
this.gameStatsContainer.add([headerBg, headerText]);
|
||||
this.gameStatsContainer.add([headerBg, this.headerText]);
|
||||
|
||||
const colWidth = this.colWidth;
|
||||
|
||||
@ -368,6 +390,10 @@ export class GameStatsUiHandler extends UiHandler {
|
||||
|
||||
show(args: any[]): boolean {
|
||||
super.show(args);
|
||||
|
||||
// show updated username on every render
|
||||
this.headerText.setText(this.getUsername());
|
||||
|
||||
this.gameStatsContainer.setActive(true).setVisible(true);
|
||||
|
||||
this.arrowUp.setActive(true).play("prompt").setVisible(false);
|
||||
|
@ -17,6 +17,7 @@ import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||
import { fixedInt, isLocal, sessionIdKey } from "#utils/common";
|
||||
import { getCookie } from "#utils/cookies";
|
||||
import { getEnumValues } from "#utils/enums";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import { isBeta } from "#utils/utility-vars";
|
||||
import i18next from "i18next";
|
||||
|
||||
@ -138,7 +139,7 @@ export class MenuUiHandler extends MessageUiHandler {
|
||||
this.optionSelectText = addTextObject(
|
||||
0,
|
||||
0,
|
||||
this.menuOptions.map(o => `${i18next.t(`menuUiHandler:${MenuOptions[o]}`)}`).join("\n"),
|
||||
this.menuOptions.map(o => `${i18next.t(`menuUiHandler:${toCamelCase(MenuOptions[o])}`)}`).join("\n"),
|
||||
TextStyle.WINDOW,
|
||||
{ maxLines: this.menuOptions.length },
|
||||
);
|
||||
|
@ -473,7 +473,7 @@ export class MysteryEncounterUiHandler extends UiHandler {
|
||||
const viewPartyText = addBBCodeTextObject(
|
||||
globalScene.scaledCanvas.width,
|
||||
-24,
|
||||
getBBCodeFrag(i18next.t("mysteryEncounterMessages:view_party_button"), TextStyle.PARTY),
|
||||
getBBCodeFrag(i18next.t("mysteryEncounterMessages:viewPartyButton"), TextStyle.PARTY),
|
||||
TextStyle.PARTY,
|
||||
);
|
||||
this.optionsContainer.add(viewPartyText);
|
||||
@ -694,7 +694,7 @@ export class MysteryEncounterUiHandler extends UiHandler {
|
||||
duration: 750,
|
||||
onComplete: () => {
|
||||
this.dexProgressContainer.on("pointerover", () => {
|
||||
globalScene.ui.showTooltip("", i18next.t("mysteryEncounterMessages:affects_pokedex"), true);
|
||||
globalScene.ui.showTooltip("", i18next.t("mysteryEncounterMessages:affectsPokedex"), true);
|
||||
});
|
||||
this.dexProgressContainer.on("pointerout", () => {
|
||||
globalScene.ui.hideTooltip();
|
||||
|
@ -27,7 +27,7 @@ import { addBBCodeTextObject, addTextObject, getTextColor } from "#ui/text";
|
||||
import { addWindow } from "#ui/ui-theme";
|
||||
import { applyChallenges } from "#utils/challenge-utils";
|
||||
import { BooleanHolder, getLocalizedSpriteKey, randInt } from "#utils/common";
|
||||
import { toTitleCase } from "#utils/strings";
|
||||
import { toCamelCase, toTitleCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||
|
||||
@ -1573,12 +1573,12 @@ export class PartyUiHandler extends MessageUiHandler {
|
||||
const formChangeItemModifiers = this.getFormChangeItemsModifiers(pokemon);
|
||||
if (formChangeItemModifiers && option >= PartyOption.FORM_CHANGE_ITEM) {
|
||||
const modifier = formChangeItemModifiers[option - PartyOption.FORM_CHANGE_ITEM];
|
||||
optionName = `${modifier.active ? i18next.t("partyUiHandler:DEACTIVATE") : i18next.t("partyUiHandler:ACTIVATE")} ${modifier.type.name}`;
|
||||
optionName = `${modifier.active ? i18next.t("partyUiHandler:deactivate") : i18next.t("partyUiHandler:activate")} ${modifier.type.name}`;
|
||||
} else if (option === PartyOption.UNPAUSE_EVOLUTION) {
|
||||
optionName = `${pokemon.pauseEvolutions ? i18next.t("partyUiHandler:UNPAUSE_EVOLUTION") : i18next.t("partyUiHandler:PAUSE_EVOLUTION")}`;
|
||||
optionName = `${pokemon.pauseEvolutions ? i18next.t("partyUiHandler:unpausedEvolution") : i18next.t("partyUiHandler:pauseEvolution")}`;
|
||||
} else {
|
||||
if (this.localizedOptions.includes(option)) {
|
||||
optionName = i18next.t(`partyUiHandler:${PartyOption[option]}`);
|
||||
optionName = i18next.t(`partyUiHandler:${toCamelCase(PartyOption[option])}`);
|
||||
} else {
|
||||
optionName = toTitleCase(PartyOption[option]);
|
||||
}
|
||||
@ -1595,7 +1595,7 @@ export class PartyUiHandler extends MessageUiHandler {
|
||||
.getLevelMoves()
|
||||
.find(plm => plm[1] === move);
|
||||
} else if (option === PartyOption.ALL) {
|
||||
optionName = i18next.t("partyUiHandler:ALL");
|
||||
optionName = i18next.t("partyUiHandler:all");
|
||||
} else {
|
||||
const itemModifiers = this.getItemModifiers(pokemon);
|
||||
const itemModifier = itemModifiers[option];
|
||||
@ -2190,7 +2190,7 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container {
|
||||
setup(party: PartyUiHandler) {
|
||||
this.transferIcon = globalScene.add.sprite(0, 0, "party_transfer");
|
||||
this.discardIcon = globalScene.add.sprite(0, 0, "party_discard");
|
||||
this.textBox = addTextObject(-8, -7, i18next.t("partyUiHandler:TRANSFER"), TextStyle.PARTY);
|
||||
this.textBox = addTextObject(-8, -7, i18next.t("partyUiHandler:transfer"), TextStyle.PARTY);
|
||||
this.party = party;
|
||||
|
||||
this.add(this.transferIcon);
|
||||
@ -2238,14 +2238,14 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container {
|
||||
this.transferIcon.setVisible(true);
|
||||
this.discardIcon.setVisible(false);
|
||||
this.textBox.setVisible(true);
|
||||
this.textBox.setText(i18next.t("partyUiHandler:TRANSFER"));
|
||||
this.textBox.setText(i18next.t("partyUiHandler:transfer"));
|
||||
this.transferIcon.displayWidth = this.textBox.text.length * 9 + 3;
|
||||
break;
|
||||
case PartyUiMode.DISCARD:
|
||||
this.transferIcon.setVisible(false);
|
||||
this.discardIcon.setVisible(true);
|
||||
this.textBox.setVisible(true);
|
||||
this.textBox.setText(i18next.t("partyUiHandler:DISCARD"));
|
||||
this.textBox.setText(i18next.t("partyUiHandler:discard"));
|
||||
this.discardIcon.displayWidth = this.textBox.text.length * 9 + 3;
|
||||
break;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ import { addWindow } from "#ui/ui-theme";
|
||||
import { BooleanHolder, getLocalizedSpriteKey, isNullOrUndefined, padInt, rgbHexToRgba } from "#utils/common";
|
||||
import { getEnumValues } from "#utils/enums";
|
||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "#utils/pokemon-utils";
|
||||
import { toTitleCase } from "#utils/strings";
|
||||
import { toCamelCase, toTitleCase } from "#utils/strings";
|
||||
import { argbFromRgba } from "@material/material-color-utilities";
|
||||
import i18next from "i18next";
|
||||
import type BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText";
|
||||
@ -1517,13 +1517,13 @@ export class PokedexPageUiHandler extends MessageUiHandler {
|
||||
this.biomes.map(b => {
|
||||
options.push({
|
||||
label:
|
||||
i18next.t(`biome:${BiomeId[b.biome].toUpperCase()}`) +
|
||||
i18next.t(`biome:${toCamelCase(BiomeId[b.biome])}`) +
|
||||
" - " +
|
||||
i18next.t(`biome:${BiomePoolTier[b.tier].toUpperCase()}`) +
|
||||
i18next.t(`biome:${toCamelCase(BiomePoolTier[b.tier])}`) +
|
||||
(b.tod.length === 1 && b.tod[0] === -1
|
||||
? ""
|
||||
: " (" +
|
||||
b.tod.map(tod => i18next.t(`biome:${TimeOfDay[tod].toUpperCase()}`)).join(", ") +
|
||||
b.tod.map(tod => i18next.t(`biome:${toCamelCase(TimeOfDay[tod])}`)).join(", ") +
|
||||
")"),
|
||||
handler: () => false,
|
||||
});
|
||||
@ -1538,13 +1538,13 @@ export class PokedexPageUiHandler extends MessageUiHandler {
|
||||
this.preBiomes.map(b => {
|
||||
options.push({
|
||||
label:
|
||||
i18next.t(`biome:${BiomeId[b.biome].toUpperCase()}`) +
|
||||
i18next.t(`biome:${toCamelCase(BiomeId[b.biome])}`) +
|
||||
" - " +
|
||||
i18next.t(`biome:${BiomePoolTier[b.tier].toUpperCase()}`) +
|
||||
i18next.t(`biome:${toCamelCase(BiomePoolTier[b.tier])}`) +
|
||||
(b.tod.length === 1 && b.tod[0] === -1
|
||||
? ""
|
||||
: " (" +
|
||||
b.tod.map(tod => i18next.t(`biome:${TimeOfDay[tod].toUpperCase()}`)).join(", ") +
|
||||
b.tod.map(tod => i18next.t(`biome:${toCamelCase(TimeOfDay[tod])}`)).join(", ") +
|
||||
")"),
|
||||
handler: () => false,
|
||||
});
|
||||
@ -2612,7 +2612,7 @@ export class PokedexPageUiHandler extends MessageUiHandler {
|
||||
// Setting growth rate text
|
||||
if (isFormCaught) {
|
||||
let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
|
||||
const growthAux = growthReadable.replace(" ", "_");
|
||||
const growthAux = toCamelCase(growthReadable);
|
||||
if (i18next.exists("growth:" + growthAux)) {
|
||||
growthReadable = i18next.t(("growth:" + growthAux) as any);
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ import { BooleanHolder, fixedInt, getLocalizedSpriteKey, padInt, randIntRange, r
|
||||
import type { StarterPreferences } from "#utils/data";
|
||||
import { loadStarterPreferences } from "#utils/data";
|
||||
import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils";
|
||||
import { toCamelCase } from "#utils/strings";
|
||||
import { argbFromRgba } from "@material/material-color-utilities";
|
||||
import i18next from "i18next";
|
||||
|
||||
@ -324,7 +325,7 @@ export class PokedexUiHandler extends MessageUiHandler {
|
||||
.filter(value => typeof value === "number") // Filter numeric values from the enum
|
||||
.map(
|
||||
(biomeValue, index) =>
|
||||
new DropDownOption(index, new DropDownLabel(i18next.t(`biome:${BiomeId[biomeValue].toUpperCase()}`))),
|
||||
new DropDownOption(index, new DropDownLabel(i18next.t(`biome:${toCamelCase(BiomeId[biomeValue])}`))),
|
||||
);
|
||||
biomeOptions.push(new DropDownOption(biomeOptions.length, new DropDownLabel(i18next.t("filterBar:uncatchable"))));
|
||||
const biomeDropDown: DropDown = new DropDown(0, 0, biomeOptions, this.updateStarters, DropDownType.HYBRID);
|
||||
|
@ -700,7 +700,11 @@ export class RunInfoUiHandler extends UiHandler {
|
||||
const typeTextColor = `[color=${TypeColor[typeRule]}]`;
|
||||
const typeShadowColor = `[shadow=${TypeShadow[typeRule]}]`;
|
||||
const typeText =
|
||||
typeTextColor + typeShadowColor + i18next.t(`pokemonInfo:Type.${typeRule}`)! + "[/color]" + "[/shadow]";
|
||||
typeTextColor +
|
||||
typeShadowColor +
|
||||
i18next.t(`pokemonInfo:type.${toCamelCase(typeRule)}`)! +
|
||||
"[/color]" +
|
||||
"[/shadow]";
|
||||
rules.push(typeText);
|
||||
break;
|
||||
}
|
||||
@ -794,15 +798,15 @@ export class RunInfoUiHandler extends UiHandler {
|
||||
pStats[i] = isMult < 1 ? pStats[i] + "[color=#40c8f8]↓[/color]" : pStats[i];
|
||||
pStats[i] = isMult > 1 ? pStats[i] + "[color=#f89890]↑[/color]" : pStats[i];
|
||||
}
|
||||
const hp = i18next.t("pokemonInfo:Stat.HPshortened") + ": " + pStats[0];
|
||||
const atk = i18next.t("pokemonInfo:Stat.ATKshortened") + ": " + pStats[1];
|
||||
const def = i18next.t("pokemonInfo:Stat.DEFshortened") + ": " + pStats[2];
|
||||
const spatk = i18next.t("pokemonInfo:Stat.SPATKshortened") + ": " + pStats[3];
|
||||
const spdef = i18next.t("pokemonInfo:Stat.SPDEFshortened") + ": " + pStats[4];
|
||||
const hp = i18next.t("pokemonInfo:stat.hpShortened") + ": " + pStats[0];
|
||||
const atk = i18next.t("pokemonInfo:stat.atkShortened") + ": " + pStats[1];
|
||||
const def = i18next.t("pokemonInfo:stat.defShortened") + ": " + pStats[2];
|
||||
const spatk = i18next.t("pokemonInfo:stat.spatkShortened") + ": " + pStats[3];
|
||||
const spdef = i18next.t("pokemonInfo:stat.spdefShortened") + ": " + pStats[4];
|
||||
const speedLabel =
|
||||
currentLanguage === "es-ES" || currentLanguage === "pt_BR"
|
||||
? i18next.t("runHistory:SPDshortened")
|
||||
: i18next.t("pokemonInfo:Stat.SPDshortened");
|
||||
: i18next.t("pokemonInfo:stat.spdShortened");
|
||||
const speed = speedLabel + ": " + pStats[5];
|
||||
// Column 1: HP Atk Def
|
||||
const pokeStatText1 = addBBCodeTextObject(-5, 0, hp, TextStyle.SUMMARY, {
|
||||
|
@ -73,7 +73,7 @@ import {
|
||||
import type { StarterPreferences } from "#utils/data";
|
||||
import { loadStarterPreferences, saveStarterPreferences } from "#utils/data";
|
||||
import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils";
|
||||
import { toTitleCase } from "#utils/strings";
|
||||
import { toCamelCase, toTitleCase } from "#utils/strings";
|
||||
import { argbFromRgba } from "@material/material-color-utilities";
|
||||
import i18next from "i18next";
|
||||
import type { GameObjects } from "phaser";
|
||||
@ -2264,7 +2264,7 @@ export class StarterSelectUiHandler extends MessageUiHandler {
|
||||
});
|
||||
};
|
||||
options.push({
|
||||
label: i18next.t("menuUiHandler:POKEDEX"),
|
||||
label: i18next.t("menuUiHandler:pokedex"),
|
||||
handler: () => {
|
||||
ui.setMode(UiMode.STARTER_SELECT).then(() => {
|
||||
const attributes = {
|
||||
@ -3470,7 +3470,7 @@ export class StarterSelectUiHandler extends MessageUiHandler {
|
||||
|
||||
//Growth translate
|
||||
let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
|
||||
const growthAux = growthReadable.replace(" ", "_");
|
||||
const growthAux = toCamelCase(growthReadable);
|
||||
if (i18next.exists("growth:" + growthAux)) {
|
||||
growthReadable = i18next.t(("growth:" + growthAux) as any);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ import {
|
||||
rgbHexToRgba,
|
||||
} from "#utils/common";
|
||||
import { getEnumValues } from "#utils/enums";
|
||||
import { toTitleCase } from "#utils/strings";
|
||||
import { toCamelCase, toTitleCase } from "#utils/strings";
|
||||
import { argbFromRgba } from "@material/material-color-utilities";
|
||||
import i18next from "i18next";
|
||||
|
||||
@ -962,7 +962,7 @@ export class SummaryUiHandler extends UiHandler {
|
||||
this.passiveContainer?.descriptionText?.setVisible(false);
|
||||
|
||||
const closeFragment = getBBCodeFrag("", TextStyle.WINDOW_ALT);
|
||||
const rawNature = toTitleCase(Nature[this.pokemon?.getNature()!]); // TODO: is this bang correct?
|
||||
const rawNature = toCamelCase(Nature[this.pokemon?.getNature()!]); // TODO: is this bang correct?
|
||||
const nature = `${getBBCodeFrag(toTitleCase(getNatureName(this.pokemon?.getNature()!)), TextStyle.SUMMARY_RED)}${closeFragment}`; // TODO: is this bang correct?
|
||||
|
||||
const memoString = i18next.t("pokemonSummary:memoString", {
|
||||
|
@ -66,7 +66,7 @@ describe("An Offer You Can't Refuse - Mystery Encounter", () => {
|
||||
expect(AnOfferYouCantRefuseEncounter.dialogue).toBeDefined();
|
||||
expect(AnOfferYouCantRefuseEncounter.dialogue.intro).toStrictEqual([
|
||||
{ text: `${namespace}:intro` },
|
||||
{ speaker: `${namespace}:speaker`, text: `${namespace}:intro_dialogue` },
|
||||
{ speaker: `${namespace}:speaker`, text: `${namespace}:introDialogue` },
|
||||
]);
|
||||
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.description).toBe(
|
||||
@ -180,7 +180,7 @@ describe("An Offer You Can't Refuse - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||
selected: [
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
|
@ -194,7 +194,7 @@ describe("Berries Abound - Mystery Encounter", () => {
|
||||
|
||||
// Should be enraged
|
||||
expect(enemyField[0].summonData.statStages).toEqual([0, 1, 0, 1, 1, 0, 0]);
|
||||
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selected_bad`);
|
||||
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selectedBad`);
|
||||
});
|
||||
|
||||
it("should start battle if fastest pokemon is slower than boss above wave 50", async () => {
|
||||
@ -218,7 +218,7 @@ describe("Berries Abound - Mystery Encounter", () => {
|
||||
|
||||
// Should be enraged
|
||||
expect(enemyField[0].summonData.statStages).toEqual([1, 1, 1, 1, 1, 0, 0]);
|
||||
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selected_bad`);
|
||||
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selectedBad`);
|
||||
});
|
||||
|
||||
it("Should skip battle when fastest pokemon is faster than boss", async () => {
|
||||
|
@ -181,7 +181,7 @@ describe("Bug-Type Superfan - Mystery Encounter", () => {
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
]);
|
||||
expect(BugTypeSuperfanEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
@ -389,7 +389,7 @@ describe("Bug-Type Superfan - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||
});
|
||||
});
|
||||
|
||||
@ -513,17 +513,17 @@ describe("Bug-Type Superfan - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:option.3.selected_dialogue`,
|
||||
text: `${namespace}:option.3.selectedDialogue`,
|
||||
},
|
||||
],
|
||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -80,7 +80,7 @@ describe("Clowning Around - Mystery Encounter", () => {
|
||||
{ text: `${namespace}:intro` },
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
]);
|
||||
expect(ClowningAroundEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
@ -249,11 +249,11 @@ describe("Clowning Around - Mystery Encounter", () => {
|
||||
text: `${namespace}:option.2.selected`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:option.2.selected_2`,
|
||||
text: `${namespace}:option.2.selected2`,
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:option.2.selected_3`,
|
||||
text: `${namespace}:option.2.selected3`,
|
||||
},
|
||||
],
|
||||
});
|
||||
@ -334,11 +334,11 @@ describe("Clowning Around - Mystery Encounter", () => {
|
||||
text: `${namespace}:option.3.selected`,
|
||||
},
|
||||
{
|
||||
text: `${namespace}:option.3.selected_2`,
|
||||
text: `${namespace}:option.3.selected2`,
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:option.3.selected_3`,
|
||||
text: `${namespace}:option.3.selected3`,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -186,8 +186,8 @@ describe("Dancing Lessons - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
|
@ -186,7 +186,7 @@ describe("Delibird-y - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.2.select_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.2.selectPrompt`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
@ -348,7 +348,7 @@ describe("Delibird-y - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
|
@ -61,7 +61,7 @@ describe("Department Store Sale - Mystery Encounter", () => {
|
||||
{ text: `${namespace}:intro` },
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
]);
|
||||
expect(DepartmentStoreSaleEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
|
@ -61,7 +61,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
]);
|
||||
expect(FieldTripEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
@ -78,7 +78,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.1.label`,
|
||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
||||
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||
});
|
||||
});
|
||||
|
||||
@ -139,7 +139,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
||||
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||
});
|
||||
});
|
||||
|
||||
@ -200,7 +200,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
||||
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -253,7 +253,7 @@ describe("Fiery Fallout - Mystery Encounter", () => {
|
||||
expect(option1.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
|
@ -143,7 +143,7 @@ describe("Fight or Flight - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
|
@ -71,7 +71,7 @@ describe("Fun And Games! - Mystery Encounter", () => {
|
||||
expect(FunAndGamesEncounter.dialogue.intro).toStrictEqual([
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
]);
|
||||
expect(FunAndGamesEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
|
@ -98,7 +98,7 @@ describe("Global Trade System - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.1.label`,
|
||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.1.trade_options_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.1.tradeOptionsPrompt`,
|
||||
});
|
||||
});
|
||||
|
||||
@ -210,7 +210,7 @@ describe("Global Trade System - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
secondOptionPrompt: `${namespace}:option.3.trade_options_prompt`,
|
||||
secondOptionPrompt: `${namespace}:option.3.tradeOptionsPrompt`,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -99,9 +99,9 @@ describe("Lost at Sea - Mystery Encounter", () => {
|
||||
expect(option1.dialogue).toBeDefined();
|
||||
expect(option1.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.1.label`,
|
||||
disabledButtonLabel: `${namespace}:option.1.label_disabled`,
|
||||
disabledButtonLabel: `${namespace}:option.1.labelDisabled`,
|
||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.1.tooltip_disabled`,
|
||||
disabledButtonTooltip: `${namespace}:option.1.tooltipDisabled`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.1.selected`,
|
||||
@ -162,9 +162,9 @@ describe("Lost at Sea - Mystery Encounter", () => {
|
||||
expect(option2.dialogue).toBeDefined();
|
||||
expect(option2.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
disabledButtonLabel: `${namespace}:option.2.label_disabled`,
|
||||
disabledButtonLabel: `${namespace}:option.2.labelDisabled`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
|
@ -65,7 +65,7 @@ describe("Part-Timer - Mystery Encounter", () => {
|
||||
{ text: `${namespace}:intro` },
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
]);
|
||||
expect(PartTimerEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
@ -219,7 +219,7 @@ describe("Part-Timer - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
|
@ -207,7 +207,7 @@ describe("Teleporting Hijinks - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
|
@ -71,7 +71,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => {
|
||||
},
|
||||
{
|
||||
speaker: "trainerNames:expert_pokemon_breeder",
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
]);
|
||||
expect(TheExpertPokemonBreederEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
|
@ -67,7 +67,7 @@ describe("The Pokemon Salesman - Mystery Encounter", () => {
|
||||
expect(dialogue).toBeDefined();
|
||||
expect(dialogue.intro).toStrictEqual([
|
||||
{ text: `${namespace}:intro` },
|
||||
{ speaker: `${namespace}:speaker`, text: `${namespace}:intro_dialogue` },
|
||||
{ speaker: `${namespace}:speaker`, text: `${namespace}:introDialogue` },
|
||||
]);
|
||||
const { title, description, query } = dialogue.encounterOptionsDialogue!;
|
||||
expect(title).toBe(`${namespace}:title`);
|
||||
@ -120,7 +120,7 @@ describe("The Pokemon Salesman - Mystery Encounter", () => {
|
||||
buttonTooltip: expect.stringMatching(new RegExp(`^${namespace}\\:option\\.1\\.tooltip(_shiny)?$`)),
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.1.selected_message`,
|
||||
text: `${namespace}:option.1.selectedMessage`,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -73,7 +73,7 @@ describe("The Winstrate Challenge - Mystery Encounter", () => {
|
||||
{ text: `${namespace}:intro` },
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
]);
|
||||
expect(TheWinstrateChallengeEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
|
@ -172,7 +172,7 @@ describe("Uncommon Breed - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.2.selected`,
|
||||
@ -237,7 +237,7 @@ describe("Uncommon Breed - Mystery Encounter", () => {
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
||||
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||
selected: [
|
||||
{
|
||||
text: `${namespace}:option.3.selected`,
|
||||
|
@ -68,7 +68,7 @@ describe("Weird Dream - Mystery Encounter", () => {
|
||||
},
|
||||
{
|
||||
speaker: `${namespace}:speaker`,
|
||||
text: `${namespace}:intro_dialogue`,
|
||||
text: `${namespace}:introDialogue`,
|
||||
},
|
||||
]);
|
||||
expect(WeirdDreamEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||
|
Loading…
Reference in New Issue
Block a user