pokerogue/src/phases
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
..
activate-priority-queue-phase.ts [Bug] Activate PostSummon Abilities in Speed and Priority Order 2025-06-11 22:28:27 -07:00
add-enemy-buff-modifier-phase.ts [Misc] Run biome on all files; update some rules to be errors now 2025-06-14 00:59:34 -07:00
attempt-capture-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
attempt-run-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
battle-end-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
battle-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
berry-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
check-status-effect-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
check-switch-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
command-phase.ts [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
common-anim-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
damage-anim-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
egg-hatch-phase.ts [Refactor] Decouple phase system from battle-scene (#5953) 2025-06-07 17:59:30 -07:00
egg-lapse-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
egg-summary-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
encounter-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
end-card-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
end-evolution-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
enemy-command-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
enemy-party-member-pokemon-phase.ts [Refactor] Replace all instances of integer with number (#5250) 2025-02-04 17:56:13 -07:00
evolution-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
exp-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
faint-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
field-phase.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
form-change-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
game-over-modifier-reward-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
game-over-phase.ts [Refactor] Rework evolution conditions and descriptions (#5679) 2025-06-16 05:57:51 -07:00
hide-ability-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
hide-party-exp-bar-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
learn-move-phase.ts [Beta] Revert "[UI/UX] Default cursor to no when stop trying to teach move" (#5990) 2025-06-14 17:40:18 -04:00
level-cap-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
level-up-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
load-move-anim-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
login-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
message-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
modifier-reward-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
money-reward-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
move-anim-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
move-charge-phase.ts [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
move-effect-phase.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
move-end-phase.ts [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
move-header-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
move-phase.ts [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
mystery-encounter-phases.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
new-battle-phase.ts [Refactor] Decouple phase system from battle-scene (#5953) 2025-06-07 17:59:30 -07:00
new-biome-encounter-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
next-encounter-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
obtain-status-effect-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
party-exp-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
party-heal-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
party-member-pokemon-phase.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
player-party-member-pokemon-phase.ts [Refactor] Replace all instances of integer with number (#5250) 2025-02-04 17:56:13 -07:00
pokemon-anim-phase.ts [Misc] Run biome on all files; update some rules to be errors now 2025-06-14 00:59:34 -07:00
pokemon-heal-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
pokemon-phase.ts [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
pokemon-transform-phase.ts [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
post-game-over-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
post-summon-activate-ability-phase.ts [Bug] Activate PostSummon Abilities in Speed and Priority Order 2025-06-11 22:28:27 -07:00
post-summon-phase.ts [Bug] Activate PostSummon Abilities in Speed and Priority Order 2025-06-11 22:28:27 -07:00
post-turn-status-effect-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
quiet-form-change-phase.ts [Misc] Run biome on all files; update some rules to be errors now 2025-06-14 00:59:34 -07:00
reload-session-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
reset-status-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
return-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
revival-blessing-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
ribbon-modifier-reward-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
scan-ivs-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
select-biome-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
select-challenge-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
select-gender-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
select-modifier-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
select-starter-phase.ts [Refactor] Rework evolution conditions and descriptions (#5679) 2025-06-16 05:57:51 -07:00
select-target-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
shiny-sparkle-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
show-ability-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
show-party-exp-bar-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
show-trainer-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
stat-stage-change-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
summon-missing-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
summon-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
switch-biome-phase.ts [Misc] Add phase#is method to help reduce circular imports (#5868) 2025-06-06 21:08:23 +00:00
switch-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
switch-summon-phase.ts [Bug] Activate PostSummon Abilities in Speed and Priority Order 2025-06-11 22:28:27 -07:00
tera-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
title-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
toggle-double-position-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
trainer-victory-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
turn-end-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
turn-init-phase.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
turn-start-phase.ts [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
unavailable-phase.ts [Refactor] Ensure that new phases are created through the phase manager 2025-06-07 23:55:30 -07:00
unlock-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
victory-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
weather-effect-phase.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00