* [Refactor] Create utility function `makeArray`
This replaces the `if(!Array.isArray(var)) { var = [var] }` pattern
* Replace `if` with ternary, rename to `coerceArray`
* Add TSDocs
* Improve type inferencing
* Replace missed `Array.isArray` checks
* Apply Biome
* Re-apply changes to phase manager
* Re-apply to `SpeciesFormChangeStatusEffectTrigger` constructor
Apply to new instances in test mocks
* Add abilityAttr.is methods
* [WIP] move modifier stuff around
* Untangle circular deps from modifiers
* Move unlockables to own file
* Untangle all circular deps outside of MEs
* Move constants in MEs to their own files
* Re-add missing import to battle.ts
* Add necessary overload for getTag
* Add missing type import in weather.ts
* Init modifier types and pools in loading-scene
* Remove stray commented code
* Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Rename `Abilities` to `AbilityId`
* Rename `abilities.ts` to `ability-id.ts`
* Rename `Moves` to `MoveId`
* Rename `moves.ts` to `move-id.ts`
* Rename `Species` to `SpeciesId`
* Rename `species.ts` to `species-id.ts`
* Rename `Biome` to `BiomeId`
* Rename `biome.ts` to `biome-id.ts`
* Replace `Abilities` with `AbilityId` in comments
* Replace `Biome` with `BiomeId` in comments
* Replace `Moves` with `MoveId` in comments
* Replace `Species` with `SpeciesId` in comments
* Extract Mode enum out of UI and into its own file
Reduces circular imports from 909 to 773
* Move around utility files
Reduces cyclical dependencies from 773 to 765
* Remove starterColors and bypassLogin from battle-scene
Reduces cyclical dependencies from 765 to 623
* Fix test runner error
* Update import for bypassLogin in test
* Update mocks for utils in tests
* Fix broken tests
* Update selectWithTera override
* Update path for utils in ab-attr.ts
* Update path for utils in ability-class.ts
* Fix utils import path in healer.test.ts
* Add isPartner method to trainer class
* Ensure force switches cannot pull pokemon from the wrong trainer
* Add override for battle type
* Fixup tests and broken assumptions
* Make move fail override semi-invuln check
Bandaid fix because move effect phase does not allow for the move to fail if all of its conditions fail
* Restore overrides
* Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Fix illusion test battle type invocation
* Update struggle and healer tests to use battleStyle
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Move exp to its own masterlist, simplify initVariantData
* Update test/sprites/pokemonSprite.test.ts
* Extract loadPokemonVariantAssets out of BattleScene
* move variant.ts and update pokemon.loadAssets
* Add fuzzy matching for applying variant recolors
* Move glsl shaders to their own files
* Remove extra variants from shader masterlist
Their exp sprites have since been removed.
Co-authored-by: Unicorn_Power <189861924+Unicornpowerstar@users.noreply.github.com>
* Make exp sprite keys a set instead of an array
* Remove outdated exp sprite jsons
Co-authored-by: Unicorn_Power <189861924+Unicornpowerstar@users.noreply.github.com>
---------
Co-authored-by: Unicorn_Power <189861924+Unicornpowerstar@users.noreply.github.com>
* Reuse global scene between tests
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
* Add missing each method to mockContainer
* Fix select-modifier-phase test
* Sanitize overrides before tests
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
* Sanitize overrides before tests
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
* [WIP] fix things
* Fix tests not working with --no-isolate
* Update npm tests to use no isolate
* Update test-shard-template
* Update package.json
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>