* Implement Flip Stat Challange
* Add Achivement
* Update challenge code to block other challenges.
* Add Achievment Image
* Add FLIP_STAT to enum ChallengeType
* Fix comment for FlipStatChallenge
* Add applyFlipStat override to Challenge Class, and add override inside of FlipStatsChallenge
* Add ChallengeType.FLIP_STAT case to export function applyChallenges (Master Switch Function)
* Properly block other challange achviements
* Change the way achivements are blocked by challenge modes to a more flexible method
* Adjust the image for Flip Stat, and add an additional achivement for completing both Flip and Inverse
* Fix FLIP_INVERSE achivement to check ALL challanges are met, not SOME
* Remove outdated image
* Fix FlipStat applyChallenges inside calculateBaseStats
* Update locales
---------
Co-authored-by: Scooom <na@na.na>
Co-authored-by: Scooom <jerry@hosterslice.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Combine moveset from allies and uses it to get a move
* Clearer implementation of combining user and teammates' moves
* Refactor assist and sleep talk to use metronome's attribute for calling a move
* Refactor move filtering in RandomMovesetMoveAttr, creates arrays with invalid moves for assist/sleep talk
* Refactor RandomMoveAttr to set moveId in condition, places reused code in callMove in RandomMoveAttr
* Correct invalid move lists, adds Max/Z moves to metronome's list
* Remove ignoresVirtual from beta merge
* Remove Max/Z moves per frutescens' comment
* Fix bug with metronome/copycat/assist/sleep talk targeting ally
* Experimental async/await to be tested
* Refactor other attributes to extend CallMoveAttr
* Replace QueuedMove with TurnMove, refactor to attempt two-turn move fix for metronome
* Fix Swallow test due to TurnMove refactor
* Further fixes for TurnMove refactor
* Fix metronome two turn moves for enemy pokemon
* Replace nested ternary with if-else block per DayKev's comment
* Minor fixes
* Adjust command phase args handling
* Create metronome test, refactor RandomMoveAttr for easier testing
* Add unit test for recharge moves
* Refactor Copycat and Mirror Move, adjust move targeting
* Add unit test for ally targeting with Aromatic Mist
* Add tests for secondary effects and recharge moves for metronome
* Add test for Roar, remove test for Acupressure
* Create test for Assist
* Add test for assist failing
* Add sleep talk unit test coverage
* Adjust move-phase to better track last move for copycat, write and update unit tests for assist/copycat
* Create moveHistory in Battle to track all moves used, adjust mirror move to use this, writes unit tests
* Correct mirror move implementation, rewrite unit test to adjust
* Add docs to attrs, update assist to only grab allies sets
* Update assist unit test to match expected functionality
* Update metronome unit test to use getMoveOverride
* Update copycat unit test to use metronome getMoveOverride mock
* Fix phase interception
* Add docs from missed conversations
* Update assist tests to use manual moveset overrides
Minor fixes to other tests
* Remove `export` from `CallMoveAttr`
* Add missing `.unimplemented()` to some Max- and Z-Moves
---------
Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Replace various `scene` pass-arounds with global scene variable
* Modify tests
* Add scene back to `fade[in|out]()` calls
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
* Fix Bug Superfan ME test
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
* Re-enable fixed test
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
* Rename `gScene` to `globalScene`
* Move `globalScene` to its own file to fix import/async issues
* Fix `SelectModifierPhase` tests
* Fix ME tests by removing `scene` from `expect()`s
* Resolve merge issues
* Remove tsdocs referencing `scene` params
Remove missed instances of `.scene`
* Remove unnecessary `globalScene` usage in `loading-scene.ts`
* Fix merge conflicts
* Attempt to fix circular import issue
* Found the source of the import issue
* Fix merge issues
---------
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
* [ME] Fix GTS Wonder Trade shiny not giving luck
* [ME] Shiny Magikarp from Pokemon Salesman can have any variant
* [ME] Shiny lock MEs with custom or special sprites
* [ME] GTS shows shiny sparkle for received Pokemon
* [ME] Shiny lock 'Slumbering Snorlax' and 'The Strong Stuff'
* [ME] Dancing Lessson: show shiny sparkle for Oricorio in intro
* [ME] Show shiny sparkles for Pokemon in ME intro
* fix tests
* Ensure shiny sparkle animation is initialized before playing it (Fixes#3924)
* make loading variant assets cleaner
* cleanup EnemyPokemon shiny initialization
* test fixes and final cleanup
* Make 'getSpeciesFilterRandomPartyMemberFunc' more readable
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* [P2][Beta] Several Unburden bug fixes
* Unburden test adjustments
* Some further test cleanup
* Add suggested `.bypassFaint()` to Unburden
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* 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`
* 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>
* 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>