pokerogue/src/phases
flx-sta 7a0c88e661
[Refactor] Pokerogue API client (#4583)
* start migrating Utils.apiFetch to api class

* move dailyranking to api

* use api in title-ui-handler

* remove: Utils.apiFetch

* migrate `updateSystemSavedata` to api

* migrate clear session savedata to api

* migrate updateAllSavedata to api

* migrate `updateSessionSavedata` to api

* rename `api` to `pokerogue-api`

* migrate unlink discord to pokerogue-api

* migrate unlink google to pokerogue-api

* update pokerogue-api login

* migrate register account to pokerogue-api

* remove Utils.apiPost

* reset overrides.ts

* chore: cleanup

* fix env.development

* fix circular dependencies with api

* fix gamedata verify missing await

* fix daily api calls in daily-run-scorebard

* fix discord-link request body being empty

there was a double `toUrlSearchParams()` call involved

* add pokerogue-api test coverge

* add test-utils `getApiBaseUrl()` method

* add pokerogue-admin-api test coverage

* add pokerogue-account-api test coverage

* add pokerogue-daily-api test coverage

* add pokerogue-savedata-api test coverage

* fix some test describes

* add pokerogue-session-savedata-api test coverage

* add pokerogue-system-savedata-api test coverage

* fix tests

* fix tryExportData

thanks @MokaStitcher

* chore: fix menu-ui-handlers.ts

* fix admin-ui-handler (types)

* extend test-coverage for admin-api

* remove outdated code

* skip some clowning-around-encounter tests if events are active

this is not a permanent solution

* Update src/system/game-data.ts

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

* Revert "skip some clowning-around-encounter tests if events are active"

This reverts commit a97dafe8b2.

* mark `localServerUrl` and `apiUrl` as deprecated

in `utils.ts`

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
2024-11-04 15:57:21 -05:00
..
add-enemy-buff-modifier-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
attempt-capture-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
attempt-run-phase.ts [P2] Fix for Speed Boost is Activated on the Turn a Pokemon is Switched In, and When a Pokemon Fails to Escape #4353 (#4676) 2024-10-29 17:38:33 -04:00
battle-end-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
battle-phase.ts add new lint rules....again 2024-10-04 13:08:31 +08:00
berry-phase.ts [Refactor] Modifiers type inference v2 (#4294) 2024-10-03 11:38:17 -04:00
check-status-effect-phase.ts [P2] Fix first-turn status damage and arena hazards (#3528) 2024-10-11 10:41:54 -04:00
check-switch-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
command-phase.ts [Move] Implement Fairy Lock (#4736) 2024-11-03 21:56:54 -05:00
common-anim-phase.ts [Feature] Add Mystery Encounters to the game (#3938) 2024-09-14 03:05:58 +01:00
damage-phase.ts Add eslint rule to enforce indenting of case statements (#4692) 2024-10-20 02:44:36 +01:00
egg-hatch-phase.ts [Hotfix] Fix cases where hatched Pokemon don't get an egg move (#4102) 2024-09-08 02:45:30 -04:00
egg-lapse-phase.ts [QOL] Add input delay for skipping egg summary (#4644) 2024-10-14 10:42:59 -04:00
egg-summary-phase.ts [QOL] Add input delay for skipping egg summary (#4644) 2024-10-14 10:42:59 -04:00
encounter-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
end-card-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
end-evolution-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
enemy-command-phase.ts add new lint rules....again 2024-10-04 13:08:31 +08:00
enemy-party-member-pokemon-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
evolution-phase.ts [Refactor] Reduce nesting in doEvolution() (#4786) 2024-11-03 22:40:24 -05:00
exp-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
faint-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
field-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
form-change-phase.ts [Qol][Refactor] i18n lazy-loading (#4327) 2024-10-01 21:55:16 +01:00
game-over-modifier-reward-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
game-over-phase.ts [Refactor] Pokerogue API client (#4583) 2024-11-04 15:57:21 -05:00
hide-party-exp-bar-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
learn-move-phase.ts [P3] Fix mistimed sound effect in LearnMovePhase (#4698) 2024-10-21 10:59:23 -04:00
level-cap-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
level-up-phase.ts [P2] Fix damage achievements not awarding (#4613) 2024-10-08 11:08:25 -04:00
login-phase.ts add new lint rules....again 2024-10-04 13:08:31 +08:00
message-phase.ts Mystery Encounter bug fixes and minor adjustments (#4299) 2024-09-19 14:44:10 +01:00
modifier-reward-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
money-reward-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
move-anim-test-phase.ts add new lint rules....again 2024-10-04 13:08:31 +08:00
move-charge-phase.ts [P2] Fix various charge move bugs (#4595) 2024-10-23 11:08:40 -04:00
move-effect-phase.ts [Refactor] Miscellaneous code cleanup (#4596) 2024-11-03 22:23:51 -05:00
move-end-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
move-header-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
move-phase.ts [Bug] Fix enemy faint causing Frenzy moves to mishandle paralysis (#4680) 2024-10-29 08:36:24 -07:00
mystery-encounter-phases.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
new-battle-phase.ts Deleted phases.ts (#3618) 2024-08-19 03:23:52 +01:00
new-biome-encounter-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
next-encounter-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
obtain-status-effect-phase.ts [P2] Fix Early Bird (#4632) 2024-10-22 12:37:13 -04:00
party-exp-phase.ts [Feature] Add Mystery Encounters to the game (#3938) 2024-09-14 03:05:58 +01:00
party-heal-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
party-member-pokemon-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
player-party-member-pokemon-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
pokemon-anim-phase.ts Add eslint rule to enforce indenting of case statements (#4692) 2024-10-20 02:44:36 +01:00
pokemon-heal-phase.ts Remove potential desync from PokemonHealPhase (#4497) 2024-09-28 21:40:42 +01:00
pokemon-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
post-game-over-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
post-summon-phase.ts [P2] Fix Early Bird (#4632) 2024-10-22 12:37:13 -04:00
post-turn-status-effect-phase.ts [Ability] Implement Wimp Out and Emergency Exit (#4701) 2024-11-03 01:04:20 -05:00
quiet-form-change-phase.ts [Move] Implement autotomization weight effects (#4228) 2024-09-23 11:42:17 -04:00
reload-session-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
return-phase.ts [Move] Implement Shed Tail (#4382) 2024-09-25 17:17:46 -07:00
ribbon-modifier-reward-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
scan-ivs-phase.ts [Move] Implement Substitute (#2559) 2024-09-13 12:46:22 -04:00
select-biome-phase.ts add new lint rules....again 2024-10-04 13:08:31 +08:00
select-challenge-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
select-gender-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
select-modifier-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
select-starter-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
select-target-phase.ts [Move] Implement Heal Block (#4120) 2024-09-21 13:15:32 -07:00
shiny-sparkle-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
show-ability-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
show-party-exp-bar-phase.ts [Bug] Fix exp gains speed not applying properly (#4243) 2024-09-14 12:35:46 -04:00
show-trainer-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
stat-stage-change-phase.ts [Hotfix] Fix crash when Mist would block a stat drop (#4746) 2024-10-28 14:02:10 +01:00
summon-missing-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
summon-phase.ts add new lint rules....again 2024-10-04 13:08:31 +08:00
switch-biome-phase.ts add new lint rules....again 2024-10-04 13:08:31 +08:00
switch-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
switch-summon-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
test-message-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
title-phase.ts [Refactor] Pokerogue API client (#4583) 2024-11-04 15:57:21 -05:00
toggle-double-position-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
trainer-message-test-phase.ts add new lint rules....again 2024-10-04 13:08:31 +08:00
trainer-victory-phase.ts Something (#4728) 2024-10-26 17:14:17 +01:00
turn-end-phase.ts Add waveTurnCount to PokemonBattleData (#4168) 2024-09-29 23:45:44 -07:00
turn-init-phase.ts [Refactor] Clean up various methods in battle-scene.ts and pokemon.ts (#4412) 2024-11-03 21:53:52 -05:00
turn-start-phase.ts [Hotfix] Fix status damage triggering before berry usage (#4732) 2024-10-27 02:34:48 +00:00
unavailable-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
unlock-phase.ts fix and optimize imports (#4061) 2024-09-07 21:37:37 -07:00
victory-phase.ts [Balance][ME] Various ME Balance changes (#4700) 2024-10-23 21:46:57 +02:00
weather-effect-phase.ts [P2] Make weather damage round down for consistency (#4559) 2024-10-03 10:33:12 -04:00