* Added check to make sure that Sketch does not copy a failed move.
* Added check for Struggle.
* Added a revised check.
* Added test + change to valid move finding conditional.
* Made revision to .find target
* Reverting previous commit, whoops.
* Add moveset checks to Sketch tests
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Change shake probability to match Gen 6
* Add critical captures, update shake probability to gen 6
* Change IntegerHolder to NumberHolder
* Adjust dex count thresholds for multiplier
* Disable critical captures in fresh start runs
* Skip first shake check for critical captures
* Move shake check for crit captures to after first shake
* Use less insane catch formula
* Integer to number in bounceanim signature
* Use max crit catch dex multiplier in daily runs
* Adjust crit capture animation
---------
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Adding to window.gameInfo
Added
type -> not working
currentHP -> not working
maxHP
status
* Adding to updateGameInfo()
* Update pokemon.ts
* Modifying battle-scene.ts
Added code to get Form and Tera Type
Typo fixed in pokemon.ts
* Output type names/etc instead of numbers
---------
Co-authored-by: ThePsychedelicSeal <trevorlrichfield@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* [Bug] fixed interaction between freeze dry and soaked wonder guard target
* added automated test for freeze dry interaction with soaked wonder guard target
* using parameter instead of function to get typeMultiplier
* Implement Order Up (mostly untested)
* Commander unit tests + bug fixes
* Implement Order Up (misnamed the other commit...)
* Order Up unit tests
* applying Temp's suggestions + other bugfixes
* add TODO comment
* Reviver Seed reapplies Commander
* ESLint woes
* Some animation fixes
* Update locales
* Order Up now uses attr option
* Prevent semi-invulnerability lapsing out while Commanding
* semi-invulnerability test
* Add `edgeCase`
* Add test save with all egg moves unlocked
* Move to everything.prsv
---------
Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
* 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>
* Miscellaneous code cleanup:
- Update `overrides.ts` imports
- Add missing comment and `;` in `eslint.config.js`
- `field/pokemon.ts`:
Rename `generateVariant` to `generateShinyVariant`
Mark some functions as `public`/etc
Update various tsdocs/comments, add tsdocs to `isOfType`
Turn an unreadable 450+ character line into a
readable block of code
- `utils.ts`:
Remove unused function `randSeedEasedWeightedItem`
Mark `IntegerHolder` and `FixedInt` as deprecated
Update some tsdocs/comments
* Convert to inline anonymous function
* Fix indentation in `move-effect-phase.ts`
Rename `getTarget` to `getFirstTarget` for clarity
Convert namespace import to named imports
Add `public`/etc to methods
* Rename `verifyLang` to `hasAllLocalizedSprite` and update tsdoc
* update locale submodule
* Put missing `null` guards around some uses of `getUserPokemon()`
* Fix locales
* Fix Unburden test
---------
Co-authored-by: Moka <millennium.stitcher@gmail.com>
Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
* unburden implemented
* Used tag instead of stat changes for Unburden
* added documentation and neutralizing gas test
* accounted for unburden in getEffectiveStat
* fixed doubling speed in two places
* merge conflict resolve
* changed documentation wording, added test for stuff cheeks
* refactor unburden
* merge
* remove console logs
* Update src/data/ability.ts
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
* add neut gas check
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
* Added test for NeutGas user entering while unburden activated
* add spaces to tests, removed passive and [] from applyPostItemLostAbAttrs
* added line breaks after test cases
---------
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
* Clean up some code related to SSUI
Replace a few nested ternaries with if blocks
Remove some `undefined`s with destructuring
* Add comment, use `v === 0` instead of `!v`
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
---------
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
* Update `battle-scene.ts` and `data/field/pokemon.ts`
`battle-scene.ts` changes:
- `getParty()` renamed to `getPlayerParty()` for clarity
- `getNonSwitchedXPokemon()` consolidated into `getXPokemon()`
- Some tsdocs were added/updated for
`getXParty()`, `getXField()` and `getXPokemon()`;
and those functions were explicitly marked as `public`
- Helper function `getPokemonAllowedInBattle()` added
`pokemon.ts` changes:
- `isAllowed()` renamed to `isAllowedInChallenge()` for clarity
- A redundant check for an active scene is removed in `isActive()`
- Some tsdocs were added/updated for `isFainted()`,
`isAllowedInChallenge()`, `isAllowedInBattle()` and `isActive()`;
and those functions were explicitly marked as `public`
- `isFainted()` now checks for `hp <= 0` instead of `!hp`
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Backport eslint change to reduce merge conflicts
* Fix merge issues
---------
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
* Setting species-variables to read only
* set generations to protected
* formIndex set to protected
* quick fix
* typedocs fixes
* get / set generation
* wait
* Use get/set for formIndex too
* Fix misplaced line
* Replace a couple `!!` with default params
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
* the fix... will maybe write a test later
* ughh
* made a test
* moved aorund function
* Update src/test/moves/camouflage.test.ts
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
* lalal
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
* fixing the exp bug
* fixing the exp bug
* dont think need to reset turn data there
* changing a little bit
* Update src/phases/faint-phase.ts
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
---------
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
* fixing speed boost for pokemon being switched in and for if failed escape
* adding unit tests
* adding failed run away test case
* adding failed run away test case modification
* refactoring solution to be more consistent with coding style
* more fixes for consistency
* more fixes for consistency
* adding new AbAttr in abiliity.ts for posterity
* removing uneccesary variables
* fixing a merge conflict