* [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
* Move game-mode to its own file
Reduces circular imports to 325
* Move battler-index to own file
Reduces circular deps to 314
* Move trainer-variant to own file
Reduces circ deps to 313
* Move enums in pokemon to their own file
* Move arena-tag-type to its own file
* Move pokemon-moves to its own file
* Move command to own file
* Move learnMoveType to own file
* Move form change item to own file
* Move battlerTagLapseType to own file
* Move anim enums to own shared file
* Move enums out of challenges
* Move species form change triggers to own file
Reduces circ imports to 291
* Update test importing pokemon move
* Replace move attribute imports with string names
* Untangle circular deps from game data
* Fix missing string call in switch summon phase
* Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Ensure ChargeMove's is method calls super
* Use InstanceType for proper narrowing
* 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>
* Updated doc comments for test-related functions
* Marked `classicMode.runToSummon` and `classicMode.startBattle` without species as deprecated
Having the species being used depend on daily run RNG is both unintuitive, janky and prone to flaking out (as happened with the Gastro Acid tests)
* Fixed the bug
* Update field-helper.ts
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
* [Test] Add/update test utils
- Add `FieldHelper` which has methods to mock a pokemon's ability
or force a pokemon to be Terastallized
- Add `MoveHelper#use` which can be used to remove the need
for setting pokemon move overrides by modifying the
moveset of the pokemon
- Add `MoveHelper#selectEnemyMove` to make an enemy pokemon
select a specific move
- Add `MoveHelper#forceEnemyMove` which modifies
the pokemon's moveset and then uses `selectEnemyMove`
- Fix `GameManager#toNextTurn` to work correctly in double battles
- Add `GameManager#toEndOfTurn` which advances to the end of the turn
* Update some tests
- Disable broken Good As Gold test
and add `.edgeCase` to Good As Gold
- Fix Powder test
- Update some tests to demonstrate new methods
* 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
* Updating tera starstorm targeting condition so that it is a spread move on the turn that terastallization happens
* added new unit tests to verify behavior of tera starstorm under non-tera conditions as well as on terastallization turns
* Move LearnMoveSituation to its own file
* Remove unused selfStatLowerMoves array
* Move all-moves to its own file
* Move TurnMove interface to its own file
* move AiType to its own file
* Move PokemonMove to its own file
* Move DamageCalculationResult interface to its own file
* Move fieldPosition to its own file
* Move hit-result to its own file
* Move DamageResult to its own file
* Move SpeciesWildEvolutionDelay to its own file
* move EvolutionItem to its own file