mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 13:59:27 +02:00
Compare commits
23 Commits
919a009e22
...
f6b84071f5
Author | SHA1 | Date | |
---|---|---|---|
|
f6b84071f5 | ||
|
46c78a0540 | ||
|
98809c28bd | ||
|
e0559e03ff | ||
|
f6b99780fb | ||
|
e97c1028fe | ||
|
19af9bdb8b | ||
|
8e61b642a3 | ||
|
d685386e17 | ||
|
963efe2f2d | ||
|
b1434c1457 | ||
|
77f9a80cf8 | ||
|
890cd6bcc5 | ||
|
0e4d924433 | ||
|
53c88192f5 | ||
|
c88af5d058 | ||
|
c9ea813b01 | ||
|
e59dc87bf1 | ||
|
1b8c2cfd0b | ||
|
b1468c17ef | ||
|
11ca012270 | ||
|
cfef679967 | ||
|
31efc1939b |
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.
|
@ -36,7 +36,6 @@
|
||||
"!**/src/data/balance/tms.ts"
|
||||
]
|
||||
},
|
||||
|
||||
"assist": {
|
||||
"actions": {
|
||||
"source": {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit ab2716d5440c25f73986664aa3f3131821c3c392
|
||||
Subproject commit 1ea8f865e30d1940caa0fceeabf37ae2e4689471
|
@ -45736,6 +45736,285 @@ export const tmSpecies: TmSpecies = {
|
||||
SpeciesId.HISUI_ARCANINE,
|
||||
SpeciesId.HISUI_AVALUGG,
|
||||
],
|
||||
[MoveId.SHOCK_WAVE]: [
|
||||
SpeciesId.RATTATA,
|
||||
SpeciesId.RATICATE,
|
||||
SpeciesId.PIKACHU,
|
||||
SpeciesId.RAICHU,
|
||||
SpeciesId.NIDORAN_F,
|
||||
SpeciesId.NIDORINA,
|
||||
SpeciesId.NIDOQUEEN,
|
||||
SpeciesId.NIDORAN_M,
|
||||
SpeciesId.NIDORINO,
|
||||
SpeciesId.NIDOKING,
|
||||
SpeciesId.CLEFAIRY,
|
||||
SpeciesId.CLEFABLE,
|
||||
SpeciesId.JIGGLYPUFF,
|
||||
SpeciesId.WIGGLYTUFF,
|
||||
SpeciesId.MEOWTH,
|
||||
SpeciesId.PERSIAN,
|
||||
SpeciesId.ABRA,
|
||||
SpeciesId.KADABRA,
|
||||
SpeciesId.ALAKAZAM,
|
||||
SpeciesId.MAGNEMITE,
|
||||
SpeciesId.MAGNETON,
|
||||
SpeciesId.GRIMER,
|
||||
SpeciesId.MUK,
|
||||
SpeciesId.VOLTORB,
|
||||
SpeciesId.ELECTRODE,
|
||||
SpeciesId.LICKITUNG,
|
||||
SpeciesId.KOFFING,
|
||||
SpeciesId.WEEZING,
|
||||
SpeciesId.RHYHORN,
|
||||
SpeciesId.RHYDON,
|
||||
SpeciesId.CHANSEY,
|
||||
SpeciesId.TANGELA,
|
||||
SpeciesId.KANGASKHAN,
|
||||
SpeciesId.MR_MIME,
|
||||
SpeciesId.ELECTABUZZ,
|
||||
SpeciesId.TAUROS,
|
||||
SpeciesId.LAPRAS,
|
||||
SpeciesId.JOLTEON,
|
||||
SpeciesId.PORYGON,
|
||||
SpeciesId.SNORLAX,
|
||||
SpeciesId.ZAPDOS,
|
||||
SpeciesId.DRATINI,
|
||||
SpeciesId.DRAGONAIR,
|
||||
SpeciesId.DRAGONITE,
|
||||
SpeciesId.MEWTWO,
|
||||
SpeciesId.MEW,
|
||||
SpeciesId.SENTRET,
|
||||
SpeciesId.FURRET,
|
||||
SpeciesId.CHINCHOU,
|
||||
SpeciesId.LANTURN,
|
||||
SpeciesId.PICHU,
|
||||
SpeciesId.CLEFFA,
|
||||
SpeciesId.IGGLYBUFF,
|
||||
SpeciesId.TOGEPI,
|
||||
SpeciesId.TOGETIC,
|
||||
SpeciesId.MAREEP,
|
||||
SpeciesId.FLAAFFY,
|
||||
SpeciesId.AMPHAROS,
|
||||
SpeciesId.AIPOM,
|
||||
SpeciesId.MISDREAVUS,
|
||||
SpeciesId.GIRAFARIG,
|
||||
SpeciesId.DUNSPARCE,
|
||||
SpeciesId.SNUBBULL,
|
||||
SpeciesId.GRANBULL,
|
||||
SpeciesId.QWILFISH,
|
||||
SpeciesId.PORYGON2,
|
||||
SpeciesId.STANTLER,
|
||||
SpeciesId.ELEKID,
|
||||
SpeciesId.MILTANK,
|
||||
SpeciesId.BLISSEY,
|
||||
SpeciesId.RAIKOU,
|
||||
SpeciesId.TYRANITAR,
|
||||
SpeciesId.LUGIA,
|
||||
SpeciesId.HO_OH,
|
||||
SpeciesId.CELEBI,
|
||||
SpeciesId.ZIGZAGOON,
|
||||
SpeciesId.LINOONE,
|
||||
SpeciesId.WINGULL,
|
||||
SpeciesId.PELIPPER,
|
||||
SpeciesId.RALTS,
|
||||
SpeciesId.KIRLIA,
|
||||
SpeciesId.GARDEVOIR,
|
||||
SpeciesId.SLAKOTH,
|
||||
SpeciesId.VIGOROTH,
|
||||
SpeciesId.SLAKING,
|
||||
SpeciesId.WHISMUR,
|
||||
SpeciesId.LOUDRED,
|
||||
SpeciesId.EXPLOUD,
|
||||
SpeciesId.NOSEPASS,
|
||||
SpeciesId.SKITTY,
|
||||
SpeciesId.DELCATTY,
|
||||
SpeciesId.SABLEYE,
|
||||
SpeciesId.ARON,
|
||||
SpeciesId.LAIRON,
|
||||
SpeciesId.AGGRON,
|
||||
SpeciesId.ELECTRIKE,
|
||||
SpeciesId.MANECTRIC,
|
||||
SpeciesId.PLUSLE,
|
||||
SpeciesId.MINUN,
|
||||
SpeciesId.VOLBEAT,
|
||||
SpeciesId.ILLUMISE,
|
||||
SpeciesId.GULPIN,
|
||||
SpeciesId.SWALOT,
|
||||
SpeciesId.SPOINK,
|
||||
SpeciesId.GRUMPIG,
|
||||
SpeciesId.SPINDA,
|
||||
SpeciesId.ZANGOOSE,
|
||||
SpeciesId.CASTFORM,
|
||||
SpeciesId.KECLEON,
|
||||
SpeciesId.SHUPPET,
|
||||
SpeciesId.BANETTE,
|
||||
SpeciesId.CHIMECHO,
|
||||
SpeciesId.ABSOL,
|
||||
SpeciesId.REGIROCK,
|
||||
SpeciesId.REGICE,
|
||||
SpeciesId.REGISTEEL,
|
||||
SpeciesId.LATIAS,
|
||||
SpeciesId.LATIOS,
|
||||
SpeciesId.KYOGRE,
|
||||
SpeciesId.GROUDON,
|
||||
SpeciesId.RAYQUAZA,
|
||||
SpeciesId.JIRACHI,
|
||||
SpeciesId.DEOXYS,
|
||||
SpeciesId.BIDOOF,
|
||||
SpeciesId.BIBAREL,
|
||||
SpeciesId.SHINX,
|
||||
SpeciesId.LUXIO,
|
||||
SpeciesId.LUXRAY,
|
||||
SpeciesId.CRANIDOS,
|
||||
SpeciesId.RAMPARDOS,
|
||||
SpeciesId.SHIELDON,
|
||||
SpeciesId.BASTIODON,
|
||||
SpeciesId.PACHIRISU,
|
||||
SpeciesId.AMBIPOM,
|
||||
SpeciesId.DRIFLOON,
|
||||
SpeciesId.DRIFBLIM,
|
||||
SpeciesId.BUNEARY,
|
||||
SpeciesId.LOPUNNY,
|
||||
SpeciesId.MISMAGIUS,
|
||||
SpeciesId.GLAMEOW,
|
||||
SpeciesId.PURUGLY,
|
||||
SpeciesId.CHINGLING,
|
||||
SpeciesId.MIME_JR,
|
||||
SpeciesId.HAPPINY,
|
||||
SpeciesId.SPIRITOMB,
|
||||
SpeciesId.MUNCHLAX,
|
||||
SpeciesId.MAGNEZONE,
|
||||
SpeciesId.LICKILICKY,
|
||||
SpeciesId.RHYPERIOR,
|
||||
SpeciesId.TANGROWTH,
|
||||
SpeciesId.ELECTIVIRE,
|
||||
SpeciesId.TOGEKISS,
|
||||
SpeciesId.PORYGON_Z,
|
||||
SpeciesId.GALLADE,
|
||||
SpeciesId.PROBOPASS,
|
||||
SpeciesId.FROSLASS,
|
||||
SpeciesId.ROTOM,
|
||||
SpeciesId.UXIE,
|
||||
SpeciesId.MESPRIT,
|
||||
SpeciesId.AZELF,
|
||||
SpeciesId.DIALGA,
|
||||
SpeciesId.PALKIA,
|
||||
SpeciesId.REGIGIGAS,
|
||||
SpeciesId.GIRATINA,
|
||||
SpeciesId.DARKRAI,
|
||||
SpeciesId.ARCEUS,
|
||||
SpeciesId.VICTINI,
|
||||
SpeciesId.PATRAT,
|
||||
SpeciesId.WATCHOG,
|
||||
SpeciesId.LILLIPUP,
|
||||
SpeciesId.HERDIER,
|
||||
SpeciesId.STOUTLAND,
|
||||
SpeciesId.MUNNA,
|
||||
SpeciesId.MUSHARNA,
|
||||
SpeciesId.BLITZLE,
|
||||
SpeciesId.ZEBSTRIKA,
|
||||
SpeciesId.WOOBAT,
|
||||
SpeciesId.SWOOBAT,
|
||||
SpeciesId.SIGILYPH,
|
||||
SpeciesId.YAMASK,
|
||||
SpeciesId.COFAGRIGUS,
|
||||
SpeciesId.MINCCINO,
|
||||
SpeciesId.CINCCINO,
|
||||
SpeciesId.GOTHITA,
|
||||
SpeciesId.GOTHORITA,
|
||||
SpeciesId.GOTHITELLE,
|
||||
SpeciesId.SOLOSIS,
|
||||
SpeciesId.DUOSION,
|
||||
SpeciesId.REUNICLUS,
|
||||
SpeciesId.EMOLGA,
|
||||
SpeciesId.FRILLISH,
|
||||
SpeciesId.JELLICENT,
|
||||
SpeciesId.JOLTIK,
|
||||
SpeciesId.GALVANTULA,
|
||||
SpeciesId.KLINK,
|
||||
SpeciesId.KLANG,
|
||||
SpeciesId.KLINKLANG,
|
||||
SpeciesId.EELEKTRIK,
|
||||
SpeciesId.EELEKTROSS,
|
||||
SpeciesId.ELGYEM,
|
||||
SpeciesId.BEHEEYEM,
|
||||
SpeciesId.LITWICK,
|
||||
SpeciesId.LAMPENT,
|
||||
SpeciesId.CHANDELURE,
|
||||
SpeciesId.AXEW,
|
||||
SpeciesId.FRAXURE,
|
||||
SpeciesId.HAXORUS,
|
||||
SpeciesId.STUNFISK,
|
||||
SpeciesId.DRUDDIGON,
|
||||
SpeciesId.GOLETT,
|
||||
SpeciesId.GOLURK,
|
||||
SpeciesId.DEINO,
|
||||
SpeciesId.ZWEILOUS,
|
||||
SpeciesId.HYDREIGON,
|
||||
SpeciesId.THUNDURUS,
|
||||
SpeciesId.ZEKROM,
|
||||
SpeciesId.MELOETTA,
|
||||
SpeciesId.GENESECT,
|
||||
SpeciesId.BRAIXEN,
|
||||
SpeciesId.DELPHOX,
|
||||
SpeciesId.ESPURR,
|
||||
SpeciesId.MEOWSTIC,
|
||||
SpeciesId.HONEDGE,
|
||||
SpeciesId.DOUBLADE,
|
||||
SpeciesId.AEGISLASH,
|
||||
SpeciesId.SKRELP,
|
||||
SpeciesId.DRAGALGE,
|
||||
SpeciesId.HELIOPTILE,
|
||||
SpeciesId.HELIOLISK,
|
||||
SpeciesId.DEDENNE,
|
||||
SpeciesId.GOOMY,
|
||||
SpeciesId.SLIGGOO,
|
||||
SpeciesId.GOODRA,
|
||||
SpeciesId.ZYGARDE,
|
||||
SpeciesId.HOOPA,
|
||||
SpeciesId.YUNGOOS,
|
||||
SpeciesId.GUMSHOOS,
|
||||
SpeciesId.GRUBBIN,
|
||||
SpeciesId.CHARJABUG,
|
||||
SpeciesId.VIKAVOLT,
|
||||
SpeciesId.PASSIMIAN,
|
||||
SpeciesId.TURTONATOR,
|
||||
SpeciesId.TOGEDEMARU,
|
||||
SpeciesId.DRAMPA,
|
||||
SpeciesId.KOMMO_O,
|
||||
SpeciesId.TAPU_KOKO,
|
||||
SpeciesId.SOLGALEO,
|
||||
SpeciesId.LUNALA,
|
||||
SpeciesId.PHEROMOSA,
|
||||
SpeciesId.XURKITREE,
|
||||
SpeciesId.CELESTEELA,
|
||||
SpeciesId.GUZZLORD,
|
||||
SpeciesId.NECROZMA,
|
||||
SpeciesId.MAGEARNA,
|
||||
SpeciesId.NAGANADEL,
|
||||
SpeciesId.ZERAORA,
|
||||
SpeciesId.TOXTRICITY,
|
||||
SpeciesId.MR_RIME,
|
||||
SpeciesId.REGIELEKI,
|
||||
SpeciesId.WYRDEER,
|
||||
SpeciesId.FARIGIRAF,
|
||||
SpeciesId.DUDUNSPARCE,
|
||||
SpeciesId.MIRAIDON,
|
||||
SpeciesId.RAGING_BOLT,
|
||||
SpeciesId.ALOLA_RATTATA,
|
||||
SpeciesId.ALOLA_RATICATE,
|
||||
SpeciesId.ALOLA_RAICHU,
|
||||
SpeciesId.ALOLA_MEOWTH,
|
||||
SpeciesId.ALOLA_PERSIAN,
|
||||
SpeciesId.ALOLA_GRAVELER,
|
||||
SpeciesId.ALOLA_GOLEM,
|
||||
SpeciesId.ALOLA_GRIMER,
|
||||
SpeciesId.ALOLA_MUK,
|
||||
SpeciesId.GALAR_WEEZING,
|
||||
SpeciesId.GALAR_MR_MIME,
|
||||
SpeciesId.HISUI_SLIGGOO,
|
||||
SpeciesId.HISUI_GOODRA,
|
||||
],
|
||||
[MoveId.WATER_PULSE]: [
|
||||
SpeciesId.SQUIRTLE,
|
||||
SpeciesId.WARTORTLE,
|
||||
@ -68747,6 +69026,7 @@ export const tmPoolTiers: TmPoolTiers = {
|
||||
[MoveId.LEAF_BLADE]: ModifierTier.ULTRA,
|
||||
[MoveId.DRAGON_DANCE]: ModifierTier.GREAT,
|
||||
[MoveId.ROCK_BLAST]: ModifierTier.GREAT,
|
||||
[MoveId.SHOCK_WAVE]: ModifierTier.GREAT,
|
||||
[MoveId.WATER_PULSE]: ModifierTier.GREAT,
|
||||
[MoveId.ROOST]: ModifierTier.GREAT,
|
||||
[MoveId.GRAVITY]: ModifierTier.COMMON,
|
||||
|
@ -99,6 +99,7 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
|
||||
MysteryEncounterType.DARK_DEAL,
|
||||
)
|
||||
.withEncounterTier(MysteryEncounterTier.ROGUE)
|
||||
.withDisallowedChallenges(Challenges.HARDCORE)
|
||||
.withIntroSpriteConfigs([
|
||||
{
|
||||
spriteKey: "dark_deal_scientist",
|
||||
|
@ -673,6 +673,8 @@ export async function catchPokemon(
|
||||
globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs);
|
||||
|
||||
return new Promise(resolve => {
|
||||
const addStatus = new BooleanHolder(true);
|
||||
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
|
||||
const doPokemonCatchMenu = () => {
|
||||
const end = () => {
|
||||
// Ensure the pokemon is in the enemy party in all situations
|
||||
@ -708,9 +710,7 @@ export async function catchPokemon(
|
||||
});
|
||||
};
|
||||
Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => {
|
||||
const addStatus = new BooleanHolder(true);
|
||||
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
|
||||
if (!addStatus.value) {
|
||||
if (!(isObtain || addStatus.value)) {
|
||||
removePokemon();
|
||||
end();
|
||||
return;
|
||||
@ -807,10 +807,16 @@ export async function catchPokemon(
|
||||
};
|
||||
|
||||
if (showCatchObtainMessage) {
|
||||
let catchMessage: string;
|
||||
if (isObtain) {
|
||||
catchMessage = "battle:pokemonObtained";
|
||||
} else if (addStatus.value) {
|
||||
catchMessage = "battle:pokemonCaught";
|
||||
} else {
|
||||
catchMessage = "battle:pokemonCaughtButChallenge";
|
||||
}
|
||||
globalScene.ui.showText(
|
||||
i18next.t(isObtain ? "battle:pokemonObtained" : "battle:pokemonCaught", {
|
||||
pokemonName: pokemon.getNameToRender(),
|
||||
}),
|
||||
i18next.t(catchMessage, { pokemonName: pokemon.getNameToRender() }),
|
||||
null,
|
||||
doPokemonCatchMenu,
|
||||
0,
|
||||
|
@ -253,8 +253,11 @@ export class AttemptCapturePhase extends PokemonPhase {
|
||||
|
||||
globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs);
|
||||
|
||||
const addStatus = new BooleanHolder(true);
|
||||
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
|
||||
|
||||
globalScene.ui.showText(
|
||||
i18next.t("battle:pokemonCaught", {
|
||||
i18next.t(addStatus.value ? "battle:pokemonCaught" : "battle:pokemonCaughtButChallenge", {
|
||||
pokemonName: getPokemonNameWithAffix(pokemon),
|
||||
}),
|
||||
null,
|
||||
@ -290,8 +293,6 @@ export class AttemptCapturePhase extends PokemonPhase {
|
||||
});
|
||||
};
|
||||
Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => {
|
||||
const addStatus = new BooleanHolder(true);
|
||||
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
|
||||
if (!addStatus.value) {
|
||||
removePokemon();
|
||||
end();
|
||||
|
@ -16,8 +16,10 @@ export class SelectBiomePhase extends BattlePhase {
|
||||
|
||||
globalScene.resetSeed();
|
||||
|
||||
const gameMode = globalScene.gameMode;
|
||||
const currentBiome = globalScene.arena.biomeType;
|
||||
const nextWaveIndex = globalScene.currentBattle.waveIndex + 1;
|
||||
const currentWaveIndex = globalScene.currentBattle.waveIndex;
|
||||
const nextWaveIndex = currentWaveIndex + 1;
|
||||
|
||||
const setNextBiome = (nextBiome: BiomeId) => {
|
||||
if (nextWaveIndex % 10 === 1) {
|
||||
@ -26,6 +28,15 @@ export class SelectBiomePhase extends BattlePhase {
|
||||
applyChallenges(ChallengeType.PARTY_HEAL, healStatus);
|
||||
if (healStatus.value) {
|
||||
globalScene.phaseManager.unshiftNew("PartyHealPhase", false);
|
||||
} else {
|
||||
globalScene.phaseManager.unshiftNew(
|
||||
"SelectModifierPhase",
|
||||
undefined,
|
||||
undefined,
|
||||
gameMode.isFixedBattle(currentWaveIndex)
|
||||
? gameMode.getFixedBattle(currentWaveIndex).customModifierRewardSettings
|
||||
: undefined,
|
||||
);
|
||||
}
|
||||
}
|
||||
globalScene.phaseManager.unshiftNew("SwitchBiomePhase", nextBiome);
|
||||
@ -33,12 +44,12 @@ export class SelectBiomePhase extends BattlePhase {
|
||||
};
|
||||
|
||||
if (
|
||||
(globalScene.gameMode.isClassic && globalScene.gameMode.isWaveFinal(nextWaveIndex + 9)) ||
|
||||
(globalScene.gameMode.isDaily && globalScene.gameMode.isWaveFinal(nextWaveIndex)) ||
|
||||
(globalScene.gameMode.hasShortBiomes && !(nextWaveIndex % 50))
|
||||
(gameMode.isClassic && gameMode.isWaveFinal(nextWaveIndex + 9)) ||
|
||||
(gameMode.isDaily && gameMode.isWaveFinal(nextWaveIndex)) ||
|
||||
(gameMode.hasShortBiomes && !(nextWaveIndex % 50))
|
||||
) {
|
||||
setNextBiome(BiomeId.END);
|
||||
} else if (globalScene.gameMode.hasRandomBiomes) {
|
||||
} else if (gameMode.hasRandomBiomes) {
|
||||
setNextBiome(this.generateNextBiome(nextWaveIndex));
|
||||
} else if (Array.isArray(biomeLinks[currentBiome])) {
|
||||
const biomes: BiomeId[] = (biomeLinks[currentBiome] as (BiomeId | [BiomeId, number])[])
|
||||
@ -73,9 +84,6 @@ export class SelectBiomePhase extends BattlePhase {
|
||||
}
|
||||
|
||||
generateNextBiome(waveIndex: number): BiomeId {
|
||||
if (!(waveIndex % 50)) {
|
||||
return BiomeId.END;
|
||||
}
|
||||
return globalScene.generateRandomBiome(waveIndex);
|
||||
return waveIndex % 50 === 0 ? BiomeId.END : globalScene.generateRandomBiome(waveIndex);
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,9 @@ import { globalScene } from "#app/global-scene";
|
||||
import { modifierTypes } from "#data/data-lists";
|
||||
import { BattleType } from "#enums/battle-type";
|
||||
import type { BattlerIndex } from "#enums/battler-index";
|
||||
import { ChallengeType } from "#enums/challenge-type";
|
||||
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||
import type { CustomModifierSettings } from "#modifiers/modifier-type";
|
||||
import { handleMysteryEncounterVictory } from "#mystery-encounters/encounter-phase-utils";
|
||||
import { PokemonPhase } from "#phases/pokemon-phase";
|
||||
import { applyChallenges } from "#utils/challenge-utils";
|
||||
import { BooleanHolder } from "#utils/common";
|
||||
|
||||
export class VictoryPhase extends PokemonPhase {
|
||||
public readonly phaseName = "VictoryPhase";
|
||||
@ -49,15 +45,19 @@ export class VictoryPhase extends PokemonPhase {
|
||||
if (globalScene.currentBattle.battleType === BattleType.TRAINER) {
|
||||
globalScene.phaseManager.pushNew("TrainerVictoryPhase");
|
||||
}
|
||||
if (globalScene.gameMode.isEndless || !globalScene.gameMode.isWaveFinal(globalScene.currentBattle.waveIndex)) {
|
||||
|
||||
const gameMode = globalScene.gameMode;
|
||||
const currentWaveIndex = globalScene.currentBattle.waveIndex;
|
||||
|
||||
if (gameMode.isEndless || !gameMode.isWaveFinal(currentWaveIndex)) {
|
||||
globalScene.phaseManager.pushNew("EggLapsePhase");
|
||||
if (globalScene.gameMode.isClassic) {
|
||||
switch (globalScene.currentBattle.waveIndex) {
|
||||
if (gameMode.isClassic) {
|
||||
switch (currentWaveIndex) {
|
||||
case ClassicFixedBossWaves.RIVAL_1:
|
||||
case ClassicFixedBossWaves.RIVAL_2:
|
||||
// Get event modifiers for this wave
|
||||
timedEventManager
|
||||
.getFixedBattleEventRewards(globalScene.currentBattle.waveIndex)
|
||||
.getFixedBattleEventRewards(currentWaveIndex)
|
||||
.map(r => globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes[r]));
|
||||
break;
|
||||
case ClassicFixedBossWaves.EVIL_BOSS_2:
|
||||
@ -66,59 +66,53 @@ export class VictoryPhase extends PokemonPhase {
|
||||
break;
|
||||
}
|
||||
}
|
||||
const healStatus = new BooleanHolder(globalScene.currentBattle.waveIndex % 10 === 0);
|
||||
applyChallenges(ChallengeType.PARTY_HEAL, healStatus);
|
||||
if (!healStatus.value) {
|
||||
if (currentWaveIndex % 10) {
|
||||
globalScene.phaseManager.pushNew(
|
||||
"SelectModifierPhase",
|
||||
undefined,
|
||||
undefined,
|
||||
this.getFixedBattleCustomModifiers(),
|
||||
gameMode.isFixedBattle(currentWaveIndex)
|
||||
? gameMode.getFixedBattle(currentWaveIndex).customModifierRewardSettings
|
||||
: undefined,
|
||||
);
|
||||
} else if (globalScene.gameMode.isDaily) {
|
||||
} else if (gameMode.isDaily) {
|
||||
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_CHARM);
|
||||
if (
|
||||
globalScene.currentBattle.waveIndex > 10 &&
|
||||
!globalScene.gameMode.isWaveFinal(globalScene.currentBattle.waveIndex)
|
||||
) {
|
||||
if (currentWaveIndex > 10 && !gameMode.isWaveFinal(currentWaveIndex)) {
|
||||
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL);
|
||||
}
|
||||
} else {
|
||||
const superExpWave = !globalScene.gameMode.isEndless ? (globalScene.offsetGym ? 0 : 20) : 10;
|
||||
if (globalScene.gameMode.isEndless && globalScene.currentBattle.waveIndex === 10) {
|
||||
const superExpWave = !gameMode.isEndless ? (globalScene.offsetGym ? 0 : 20) : 10;
|
||||
if (gameMode.isEndless && currentWaveIndex === 10) {
|
||||
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_SHARE);
|
||||
}
|
||||
if (
|
||||
globalScene.currentBattle.waveIndex <= 750 &&
|
||||
(globalScene.currentBattle.waveIndex <= 500 || globalScene.currentBattle.waveIndex % 30 === superExpWave)
|
||||
) {
|
||||
if (currentWaveIndex <= 750 && (currentWaveIndex <= 500 || currentWaveIndex % 30 === superExpWave)) {
|
||||
globalScene.phaseManager.pushNew(
|
||||
"ModifierRewardPhase",
|
||||
globalScene.currentBattle.waveIndex % 30 !== superExpWave || globalScene.currentBattle.waveIndex > 250
|
||||
currentWaveIndex % 30 !== superExpWave || currentWaveIndex > 250
|
||||
? modifierTypes.EXP_CHARM
|
||||
: modifierTypes.SUPER_EXP_CHARM,
|
||||
);
|
||||
}
|
||||
if (globalScene.currentBattle.waveIndex <= 150 && !(globalScene.currentBattle.waveIndex % 50)) {
|
||||
if (currentWaveIndex <= 150 && !(currentWaveIndex % 50)) {
|
||||
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL);
|
||||
}
|
||||
if (globalScene.gameMode.isEndless && !(globalScene.currentBattle.waveIndex % 50)) {
|
||||
if (gameMode.isEndless && !(currentWaveIndex % 50)) {
|
||||
globalScene.phaseManager.pushNew(
|
||||
"ModifierRewardPhase",
|
||||
!(globalScene.currentBattle.waveIndex % 250) ? modifierTypes.VOUCHER_PREMIUM : modifierTypes.VOUCHER_PLUS,
|
||||
!(currentWaveIndex % 250) ? modifierTypes.VOUCHER_PREMIUM : modifierTypes.VOUCHER_PLUS,
|
||||
);
|
||||
globalScene.phaseManager.pushNew("AddEnemyBuffModifierPhase");
|
||||
}
|
||||
}
|
||||
|
||||
if (globalScene.gameMode.hasRandomBiomes || globalScene.isNewBiome()) {
|
||||
if (gameMode.hasRandomBiomes || globalScene.isNewBiome()) {
|
||||
globalScene.phaseManager.pushNew("SelectBiomePhase");
|
||||
}
|
||||
|
||||
globalScene.phaseManager.pushNew("NewBattlePhase");
|
||||
} else {
|
||||
globalScene.currentBattle.battleType = BattleType.CLEAR;
|
||||
globalScene.score += globalScene.gameMode.getClearScoreBonus();
|
||||
globalScene.score += gameMode.getClearScoreBonus();
|
||||
globalScene.updateScoreText();
|
||||
globalScene.phaseManager.pushNew("GameOverPhase", true);
|
||||
}
|
||||
@ -126,18 +120,4 @@ export class VictoryPhase extends PokemonPhase {
|
||||
|
||||
this.end();
|
||||
}
|
||||
|
||||
/**
|
||||
* If this wave is a fixed battle with special custom modifier rewards,
|
||||
* will pass those settings to the upcoming {@linkcode SelectModifierPhase}`.
|
||||
*/
|
||||
getFixedBattleCustomModifiers(): CustomModifierSettings | undefined {
|
||||
const gameMode = globalScene.gameMode;
|
||||
const waveIndex = globalScene.currentBattle.waveIndex;
|
||||
if (gameMode.isFixedBattle(waveIndex)) {
|
||||
return gameMode.getFixedBattle(waveIndex).customModifierRewardSettings;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
@ -448,6 +448,8 @@ export function getAchievementDescription(localizationKey: string): string {
|
||||
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", {
|
||||
context: genderStr,
|
||||
|
@ -208,6 +208,26 @@ export class PokedexMonContainer extends Phaser.GameObjects.Container {
|
||||
);
|
||||
this.checkIconId(defaultProps.female, defaultProps.formIndex, defaultProps.shiny, defaultProps.variant);
|
||||
this.add(this.icon);
|
||||
|
||||
[
|
||||
this.hiddenAbilityIcon,
|
||||
this.favoriteIcon,
|
||||
this.classicWinIcon,
|
||||
this.candyUpgradeIcon,
|
||||
this.candyUpgradeOverlayIcon,
|
||||
this.eggMove1Icon,
|
||||
this.tmMove1Icon,
|
||||
this.eggMove2Icon,
|
||||
this.tmMove2Icon,
|
||||
this.passive1Icon,
|
||||
this.passive2Icon,
|
||||
this.passive1OverlayIcon,
|
||||
this.passive2OverlayIcon,
|
||||
].forEach(icon => {
|
||||
if (icon) {
|
||||
this.bringToTop(icon);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
checkIconId(female, formIndex, shiny, variant) {
|
||||
|
@ -410,6 +410,11 @@ export class PokedexUiHandler extends MessageUiHandler {
|
||||
new DropDownLabel(i18next.t("filterBar:hasHiddenAbility"), undefined, DropDownState.ON),
|
||||
new DropDownLabel(i18next.t("filterBar:noHiddenAbility"), undefined, DropDownState.EXCLUDE),
|
||||
];
|
||||
const seenSpeciesLabels = [
|
||||
new DropDownLabel(i18next.t("filterBar:seenSpecies"), undefined, DropDownState.OFF),
|
||||
new DropDownLabel(i18next.t("filterBar:isSeen"), undefined, DropDownState.ON),
|
||||
new DropDownLabel(i18next.t("filterBar:isUnseen"), undefined, DropDownState.EXCLUDE),
|
||||
];
|
||||
const eggLabels = [
|
||||
new DropDownLabel(i18next.t("filterBar:egg"), undefined, DropDownState.OFF),
|
||||
new DropDownLabel(i18next.t("filterBar:eggPurchasable"), undefined, DropDownState.ON),
|
||||
@ -423,6 +428,7 @@ export class PokedexUiHandler extends MessageUiHandler {
|
||||
new DropDownOption("FAVORITE", favoriteLabels),
|
||||
new DropDownOption("WIN", winLabels),
|
||||
new DropDownOption("HIDDEN_ABILITY", hiddenAbilityLabels),
|
||||
new DropDownOption("SEEN_SPECIES", seenSpeciesLabels),
|
||||
new DropDownOption("EGG", eggLabels),
|
||||
new DropDownOption("POKERUS", pokerusLabels),
|
||||
];
|
||||
@ -792,13 +798,15 @@ export class PokedexUiHandler extends MessageUiHandler {
|
||||
this.starterSelectMessageBoxContainer.setVisible(!!text?.length);
|
||||
}
|
||||
|
||||
isSeen(species: PokemonSpecies, dexEntry: DexEntry): boolean {
|
||||
isSeen(species: PokemonSpecies, dexEntry: DexEntry, seenFilter?: boolean): boolean {
|
||||
if (dexEntry?.seenAttr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const starterDexEntry = globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)];
|
||||
return !!starterDexEntry?.caughtAttr;
|
||||
if (!seenFilter) {
|
||||
const starterDexEntry = globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)];
|
||||
return !!starterDexEntry?.caughtAttr;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1617,6 +1625,21 @@ export class PokedexUiHandler extends MessageUiHandler {
|
||||
}
|
||||
});
|
||||
|
||||
// Seen Filter
|
||||
const dexEntry = globalScene.gameData.dexData[species.speciesId];
|
||||
const isItSeen = this.isSeen(species, dexEntry, true);
|
||||
const fitsSeen = this.filterBar.getVals(DropDownColumn.MISC).some(misc => {
|
||||
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.ON) {
|
||||
return isItSeen;
|
||||
}
|
||||
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.EXCLUDE) {
|
||||
return !isItSeen;
|
||||
}
|
||||
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.OFF) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// Egg Purchasable Filter
|
||||
const isEggPurchasable = this.isSameSpeciesEggAvailable(species.speciesId);
|
||||
const fitsEgg = this.filterBar.getVals(DropDownColumn.MISC).some(misc => {
|
||||
@ -1658,6 +1681,7 @@ export class PokedexUiHandler extends MessageUiHandler {
|
||||
fitsFavorite &&
|
||||
fitsWin &&
|
||||
fitsHA &&
|
||||
fitsSeen &&
|
||||
fitsEgg &&
|
||||
fitsPokerus
|
||||
) {
|
||||
|
@ -210,7 +210,8 @@ export class RunInfoUiHandler extends UiHandler {
|
||||
this.runContainer.add(headerText);
|
||||
const runName = addTextObject(0, 0, this.runInfo.name, TextStyle.WINDOW);
|
||||
runName.setOrigin(0, 0);
|
||||
runName.setPositionRelative(headerBg, 60, 4);
|
||||
const runNameX = headerText.width / 6 + headerText.x + 4;
|
||||
runName.setPositionRelative(headerBg, runNameX, 4);
|
||||
this.runContainer.add(runName);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
import { AbilityId } from "#enums/ability-id";
|
||||
import { Challenges } from "#enums/challenges";
|
||||
import { MoveId } from "#enums/move-id";
|
||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||
import { PokeballType } from "#enums/pokeball";
|
||||
import { SpeciesId } from "#enums/species-id";
|
||||
import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils";
|
||||
import { GameManager } from "#test/test-utils/game-manager";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
@ -52,4 +54,18 @@ describe("Challenges - Limited Catch", () => {
|
||||
|
||||
expect(game.scene.getPlayerParty()).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("should allow gift Pokémon from Mystery Encounters to be added to party", async () => {
|
||||
game.override
|
||||
.mysteryEncounterChance(100)
|
||||
.mysteryEncounter(MysteryEncounterType.THE_POKEMON_SALESMAN)
|
||||
.startingWave(12);
|
||||
game.scene.money = 20000;
|
||||
|
||||
await game.challengeMode.runToSummon([SpeciesId.NUZLEAF]);
|
||||
|
||||
await runMysteryEncounterToEnd(game, 1);
|
||||
|
||||
expect(game.scene.getPlayerParty()).toHaveLength(2);
|
||||
});
|
||||
});
|
||||
|
@ -3,6 +3,7 @@ import { Challenges } from "#enums/challenges";
|
||||
import { MoveId } from "#enums/move-id";
|
||||
import { SpeciesId } from "#enums/species-id";
|
||||
import { UiMode } from "#enums/ui-mode";
|
||||
import { ExpBoosterModifier } from "#modifiers/modifier";
|
||||
import { GameManager } from "#test/test-utils/game-manager";
|
||||
import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler";
|
||||
import Phaser from "phaser";
|
||||
@ -75,6 +76,7 @@ describe("Challenges - Limited Support", () => {
|
||||
await game.doKillOpponents();
|
||||
await game.toNextWave();
|
||||
|
||||
expect(game.scene.getModifiers(ExpBoosterModifier)).toHaveLength(1);
|
||||
expect(playerPokemon).not.toHaveFullHp();
|
||||
|
||||
game.move.use(MoveId.SPLASH);
|
||||
|
Loading…
Reference in New Issue
Block a user