* Partially ported over pkty matchers (WIP)
* Cleaned up some more matchers
* Fiexd up matchers
* Fixed up remaining matchers
* Removed the word "matcher" from the pkty matcher functions
If we want them back we can always undo this commit and convert the other custom ones
* Added wip spite test
* Added `toHaveUsedPP` matcher
* Fixed up docs and tests
* Fixed spite test
* Ran biome
* Apply Biome
* Reverted biome breaking i18next
* Update src/typings/i18next.d.ts comment
* Fixed log message to not be overly verbose
* Added option to check for all PP used in pp matcher + cleaned up grudge tests
* Fixed up tests
* Fixed tests and such
* Fix various TSDocs + missing TSDoc imports
* [feature]Implemented needed parts for discard function from issue #4780:
-TryDiscardFunction in battlescene;
-Created a party discard mode button;
-Updated Transfer button in modifier-select-ui-handler to Manage items;
-Created tests for the discard function in test/ui;
-Added images for the new discard and transfer buttons to loading-scene;
-Created placeholder messages for discard feature in party-ui-handler;
Co-authored-by: Tiago Rodrigues <tiago.n.rodrigues@tecnico.ulisboa.pt>
* [Fix] Updated icon for dynamic messaging
* [Fix] Corrected legacy mode icons and adjusted double-battle button location
* [Fix]Adjusted button positioning and mapping after review. Mapping requires debugging.
* [Fix] Fixed visible pokeball in legacy mode and key mapping
* [Fix] Background fixes,manage menu is the only one affected by changes now
* Implement i18n keys
* [Fix] implemented most code optimizations and callbacks to the modified locales folder
* [Fix] Implemented 3 suggestions
* [Fix]improved/corrected test structure
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* [Fix] added functionality test for the discard button
* [Fix] added necessary comment
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
* [Fix] Implemented suggested changes in test/discard text prompt
* [Fix] Implemented UI suggestions and removed discard text confirmation
* [Fix] added missing imports
* Fix imports in test file
* [Fix] Implemented suggested cursor behavior and reworked test code
* [Fix] Corrected failed test
* [Fix] atempting to fix the test timeout issue
* [Fix] Undoing latest attempt
* [Fix] Implemented suggestions to fix broken tests
* Reviews
* [Fix] replaced icon images
* [Fix] Updated jsons to match new icons and removed pokeball icon from legacy mode
* Optimized new images
* [Fix] Fixed referenced bug and added similar confirmation box to release
* [Fix] Updated tests to handle the corfirmation box
* [Fix] Added back the accidentally removed changes
* [Fix]updated incorrect import path
* [fix] add description for the manageItemMode function
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
* Update src/ui/party-ui-handler.ts
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
* [Fix] corrected formating issue
---------
Co-authored-by: Mikhail Shueb <mikhail.shueb@tecnico.ulisboa.pt>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
Co-authored-by: damocleas <damocleas25@gmail.com>
Co-authored-by: Bertie690 <taylormw163@gmail.com>
Co-authored-by: Adri1 <adrien.grivel@hotmail.fr>
* Fixed move flags
* Disabled order up interactionn with sheer force
* Update src/data/moves/move.ts
* Removed order up test that no longer applies
shouldn't have been there in the first place
* [Balance] End of turn triggers won't occur when you end a biome
* Add tests
* Move phase manipulation logic into `PhaseManager`
* Rename "biome end" to "interlude"
* Rename `TurnEndPhase#endOfBiome` to `upcomingInterlude`
---------
Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
* Added string utility package to replace util functions
* Changed string manipulation functions fully over to `change-case`
* Fixed missing comma in package.json
trailing commas when :(
* fixed lockfile
* Hopefully re-added all the string utils
* fixed package json
* Fixed remaining cases of regex + code dupliation
* Fixed more bugs and errors
* Moved around functions and hopefully fixed the regex issues
* Minor renaming
* Fixed incorrect casing on setting strings
pascal snake case 💀
* ran biome
* Added rudimentary test matchers for `toEqualArrayUnsorted` and `toHaveTypes`
Might port the rest at a later date
* Actually run the effing setup matchers file + fixed ls lint to not be angy
* added dev dep
* Update .ls-lint.yml
* Update .ls-lint.yml
---------
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
https://github.com/pagefaultgames/pokerogue/pull/6134
* Removed `sanitizeOverrides`
* Moved initialization code to its own file
* Hopefully fixed test contamination
* Actually listened to people now
* fixed the thingy
* Run stub setup on init because
* Update testFileInitialization.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Standardize filenames to kebab-case
Co-authored-by: pymilkmaiden <cassiopeiamahler56@gmail.com>
* Move script outside of public folder
* Move update_exp_sprites to scripts
* Add ls-lint to lint file and directory names
* Update lefthook.yml to skip merge / rebase on all pre-commit commands
---------
Co-authored-by: pymilkmaiden <cassiopeiamahler56@gmail.com>
* [Test] Removed unnecessary calls to `PhaseInterceptor.to("CommandPhase")`
* minor cleanup to final_boss.test.ts
* Made run to final boss encounter actually go to command phase
* fix final_boss.test.ts select bug
* actually fixed test fr this time
* Fix magnet_rise.test.ts
* Fixed test
* Update test/moves/stockpile.test.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update stockpile.test.ts
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Fixed tests for Magic Guard, Battle phase; fixed innards out stuff
* Fixde magic guard aftermath
* fixed tests
* Fixed innards out
* fixed using sizzly slide instead of will o wisp to inflict burn
* ran boime
* Readd simulated oopsie
* Fix HJK test to use protect + docs and such
* Apply Biome
---------
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* [Balance] Add faint trigger to Battle Bond Greninja's form change
The form change functionality will now be slightly closer to Generation 7/8, as the Greninja will now revert from Ash form to Battle Bond form upon fainting.
* Change how the form change on faint is triggered
It is no longer directly handled by the faint phase, and is instead part of the abilities now, as more than Battle Bond Greninja revert via this method (Disguise Mimikyu, Power Construct Zygarde).
* Adjust Disguise test
* Updated enum utils to refuse non-enum values;
added strong typing on return values
* Moved Enum functions to own file; added type helpers for enums
* Cleaned up some code
* Fixed up tests
* Fix training-session-encounter.ts
* Fixed Transform and Imposter Bug
* Updated Comments
* Revised Comments
* Revised Changes on how tranformed pokemon are referenced to align with reviewer's suggestions
* Removed unused BattlerTag type for transform
* Removed addition of the transform tag to a pokemon in the PokemonTransformPhase
* Moved the check for whether Transform can be used within the TransformAttr class as suggested and removed uneccesary moveId check
* Consolidated if statement regarding isTransformed
* Removed overrides
* Added move condition to Transform + fixed up imposter target selection
* Condensed tests into 1 file + added more automated tests
This includes a couple regression tests for the fusion shenanigans
* Fixed comment
* Updated override typo for unimplemented methods
* Remove redundant parentheses
* Apply suggestions from code review
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
---------
Co-authored-by: Bertie690 <taylormw163@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
https://github.com/pagefaultgames/pokerogue/pull/6067
* Fix anger point always procing on multi-hit
when first strike was a crit
* Fix comment spacing
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Rename PostDefendCritStatStageChangeAbAttr
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Made `game.phaseInterceptor` fail if move not in moveset
also added a few assorted doc fixes
* Fixed fail comment
* added `map` statement
* Fixed tests
* Fixed test
* Fixed test and comment
* Fixed tests
* Fixed test v2
* Fixed various tests
* Update error msg to not use fullcaps
* Fixed remaining tests
* Fixed test 0.5
* Fixed up tetss
* Fixed test
* Fixed imposter tests
* Fixed imposter tests
* Fiexd remainig tests
* Marked test as TODO
wasn't as if it was doing anything beforehand but w/e
* Update moveHelper.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update moveHelper.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Apply Biome
* Update comment in `spikes.test.ts`
* Add faint checks to Spikes test
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Minor Attempt run phase rework to abstract logic to whole team
* Decoupled individual pokemon from run phase logic
* Formatting
* Completed run phase refactor implementation and updated tests
* Updated run phase to extend field phase instead of pokemon phase
* Removed unused phase decleration in tests
* Removed unecessary arg in turn start phase as refactor no longer needs it
* Cleaned up getPlayerField
* Made adjustments based on reviewer suggestions
* Reintrocuded calculateEscapeChance into AttemptRunPhase and removed run utils
* Resolve merge issues
* Minor TSDoc improvement to `BattleScene#getPlayerField`
* Moved early override check to top of calculateEscapeChance
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Split up Pokemon data types to own files
* Moved `AttackMoveResult` and `TurnMove` to own files
* Moved `customPokemonData` into types folder + fixed comments
* Moved files around + fixed stuff
* Moved `DamageResult` into new file
* Fixed imports
* ran biome
* Fix merge issue
* [WIP] Refactor ability attribute apply args
* [WIP] update ability signatures
* Update callsites in pokemon.ts
* Update callsites in moves.ts
* Update abattr callsites in move-phase
* Update abattr callsites in battler-tags
Also removed stat drop ability application from cancelling ME stat boost effects
* format with biome and remove cancelled from weather lapse
* Update abattr callsites in MEP
* Update callsites in turn-start-phase
* Update abAttr callsites in misc phases
* Remove latent test functionality
* update ability attribute callsite in shield dust test
* update abattr callsite in winstrate challenge encounter
* Fix some tests to mock proper methods
* Remove improper condition in mimicry's ability application
* Fix improper simulated check in moody's apply method
* Pass source to postApplyDamage in pokemon.ts
* [wip] fix cud chew tests
* Make cud chew consumption not subclass postTurnAbAttr
* Fix regression in flower veil
* Update trySetStatus test in pokemon to respect new return value for undefined
* Remove empty, unused file
* Fix blockCrit method broken in merge
* Fix unnecessary attr type cast in move phase
* Address typing issue in safeguard test
* Improve documentation and get rid of ts-expect-error directive
* Minor comment/TSDoc updates and fixes
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Apply suggestions from code review
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>