* Refactor timed event changes
* Use getWeather function
* Add mystery encounter tier change/disabling to timed events
* Event luck boost, event encounter helper function
* Events without shiny boost shouldn't give shiny charm
* globalScene -> this in battle scene class
* Change event pools
* 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>
* Fixed defog not removing the target's Safeguard and Mist
* Made requested changes and added unit test
* Remove stray newline
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* beginning immplementation of lunar dance
* adding tests
* changing in game message and making full hp message not display
* Reuse Healing Wish's move attr, update test
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* [Move][Beta] Powder edge cases
* Fix Heavy Rain check to account for weather suppression
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* "{Pokemon} used {Fire-type move}!" now displays before Powder activation
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
* Make `showMoveText()` and `showFailedText()` public for now
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
* Powder basic implementation
* Add Powder integration tests
* Fix thaw test
* Use new test utils and type check function
* More edge case tests
* Make Powder (P)
* Add locale keys
* Add placeholder common anim
* Use CommonAnimPhase instead of async animation
* Add comments with new English text
* Make Powder `edgeCase` instead
* ESLint
* Fix imports
* Add `moveName` key arg for other languages
* ESLint
* Update locales
* Fix pages issues
* Update Powder explosion animation
* Update common-powder.json
* Update src/test/moves/powder.test.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Remove lingering TIMEOUTs
* More test cleanup
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Added checks for Sheer Force interactions currently in the code.
* Test for Relic Song interaction
* Test for Shell Bell interaction
* Created new Modifier class MoveEffectModifier
* Applied new modifier class.
* Revert "Applied new modifier class."
This reverts commit 222bc8d42875485742ba8bd38fa5e9b978bbd53a.
* Revert "Created new Modifier class MoveEffectModifier"
This reverts commit 0e57ed03ff7c0e6fb59c7b3c2ea74b6fe6327f59.
* Added checks for Shell Bell, Scope Lens, Wide Lens, Leek, and Golden Punch
* Fixing function calls.
* Fixed getSecondaryChanceMultiplier to just look at sheer force.
* Rewrote old Sheer Force tests in accordance to current testing standards.
* Resetting modifiers.ts
* Update src/data/pokemon-forms.ts
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
* Moved getSecondaryChanceMultiplier to FlinchChanceModifier and revised Serene Grace tests
* Adding an additional override to prevent test failures.
* Removed Serene Grace factor from modifier.
* Added forgotten conditional.
* Added comment
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: innerthunder <168692175+innerthunder@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>
Changes:
- Increase default value for friendship gain from winning a battle (from 2 to 3)
- Increase Classic candy friendship multiplier (from 2 to 3)
- Increase Rare Candy friendship gain (from 5 to 6)
- Decrease value for friendship decrease from losing a battle (from 10 to 5)
- Update Candy friendship thresholds for getting candy for some starter costs.
- Change Soothe Bell from Rogue to Great (Weight: 2 in Great)
- Adjust Map weight to account for change (Weight: 1 to 2)
- Clowning around ME: When shuffling items, soothe bells will get replaced by a random Ultra Tier item
- Clowning around ME: When shuffling items, no item will get replaced by a Soothe Bell
Commit history:
* Candy friendship changes
Update default value for friendship gain from battle and adjust Soothe Bell tier to Great
* Update modifier-type.ts
* Update friendship constants
* Clowning around encounter no longer consider soothe bell rogue tier
* Expert Breeder ME test will no longer fail if candy gain per battle is changed
---------
Co-authored-by: Starkrieg <starkieg.art@gmail.com>
Co-authored-by: damocleas <damocleas25@gmail.com>
Co-authored-by: Moka <millennium.stitcher@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Honey Gather and Pickup will only activate if the battle was won
* Add tests for Honey Gather
* Moves `highestEndlessWave` and `battles` stats outside of victory condition
* Analytic only increases damage if the user moves last
* Return `isNullOrUndefined()` instead of `if` chain
---------
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
* [Dev] Add overrides for alternating between single and double battles
* PR feedback
* Add type `DoubleType`
* Fixed Gastro Acid test using `game.override.battleType(null)`
* Changed new type name to `SingleOrDoubleType`
* `SingleOrDoubleType` is now `BattleStyle`
* Update src/test/utils/helpers/overridesHelper.ts
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
* Full implementation of freeze-dry including edge cases such as Normalize and Electrify plus tests
* Update comments
* renamed WaterSuperEffectTypeMultiplierAttr to FreezeDryAttr
* Added test case for freeze dry during inverse battles
* cleaned up code making it more general
* Added some more documentation
* implementing reviewed changes
* used getMoveType() instead of move.type
* added additional test cases to freeze dry
* Revert "used getMoveType() instead of move.type"
This reverts commit 03445dfab4db52b0dddbe7abf7d4b4dfa8b9c583.
* added reviewed changes without changing public/locales
---------
Co-authored-by: ga27lok <geeil.han@tum.de>
* [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>
* Added new telemetry-related parameters
* Update test with new parameters.
* Removing extra parameters.
* Cat in front of keyboar d sorry
* Changed variable name to isVictory.
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Thank you Torranx
* Condensed if-else pair to else if statement
* Update src/phases/game-over-phase.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* inhale... exhale... corrected variable name to pass linter
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>