pokerogue/test/testUtils
AJ Fontaine e3108603e3
[Refactor] Rework evolution conditions and descriptions (#5679)
* Refactor evo conditions and descriptions

* Fix test

* Fix Shedinja

* Simplify Gimmighoul evolution

* Primeape and Stantler evolve by using their move 10 times

* Basculin white stripe evolves by taking 294 recoil damage

* Primeape and Stantler use modifiers for tracking

* Basculin uses modifier too

* Remove evo count from pokemon data

* No more evo counter data, Gallade/Froslass

* Fix allmoves import

* Clamperl

* Struggle shouldn't count for Basc recoil

* Change to nicer type

* Apply Benjie's suggestions

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Address formatting

* Undo new evolution changes

* Remove unused imports

* Fix speciesid

* Fixed up descriptions a little

* Change a key name

* Fix Gimmighoul

* Apply Biome

* Apply Biome unsafe fixes

* Review suggestions

- Convert `EvoCondKey` enum to `const` object

- Use early returns in `SpeciesEvolutionCondition#description`
and `SpeciesFormEvolution#description`

- Replace `!!x.find` with `x.some`
and `y.indexOf() > -1` with `y.includes()`

- Implement `coerceArray`

- Fix Shelmet evolution condition
checking for Shelmet and not Karrablast

- Remove unnecessary type casting in `battle-scene.ts`

* Remove leftover enforce func loop

* Fix circular imports issue

- `getPokemonSpecies` moved to `src/utils/pokemon-utils.ts`
- `allSpecies` moved to `src/data/data-lists.ts`

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-06-16 05:57:51 -07:00
..
helpers [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
mocks [Refactor] Create utility function coerceArray (#5723) 2025-06-12 21:30:01 -07:00
saves [UI/UX] Caught battle forms are displayed correctly in Pokédex (#5697) 2025-05-01 02:17:21 +00:00
errorInterceptor.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
fakeMobile.html [Test] Move test folder out of src (#5398) 2025-02-22 22:52:07 -06:00
gameManager.ts [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
gameManagerUtils.ts [Refactor] Rework evolution conditions and descriptions (#5679) 2025-06-16 05:57:51 -07:00
gameWrapper.ts [Tests][UI/UX] Add automated tests for the pokedex (#5637) 2025-04-23 18:10:01 +00:00
inputsHandler.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
listenersManager.ts [Test] [Refactor] [GitHub] Enable no isolate for vitest (#5566) 2025-03-28 17:30:38 -04:00
phaseInterceptor.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
testFileInitialization.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
testUtils.ts [Test] Move test folder out of src (#5398) 2025-02-22 22:52:07 -06:00
TextInterceptor.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00