pokerogue/src/data/mystery-encounters/utils
NightKev 7c6189e812
[Refactor] Create utility function coerceArray (#5723)
* [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
2025-06-12 21:30:01 -07:00
..
encounter-dialogue-utils.ts [Refactor] Decouple phase system from battle-scene (#5953) 2025-06-07 17:59:30 -07:00
encounter-phase-utils.ts [Refactor] Create utility function coerceArray (#5723) 2025-06-12 21:30:01 -07:00
encounter-pokemon-utils.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
encounter-transformation-sequence.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00