* 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>
* Adding a new key determining whether the command cursor resets at the beginning of each new battle.
* Allowing user to toggle commandCursorReset on and off.
* Changing option name to commandCursorMemory
* Fixed caps in settings.ts
* Moved Command_Cursor_Memory from Display settings to General settings
* 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>
* new function
* weak attempt of documentation
* mysterious chest handled...? maybe.
* override comments
* one more instruction
* fixing up the logging lol
* lah
* fixing it up
* coommrent
* lalal
* run info fixes
* Addressed PigeonBar's comments
* Centered run info text + fixed trainer sprites.
* Fixed function name.
* Update tsdoc in `overrides.ts`
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
* Fix tsdoc comment
* sligthly rewrite centering of biome and wave text in run info
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
Co-authored-by: Moka <millennium.stitcher@gmail.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>
* 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
* Moved code preventing MBH's transfer to after enemy modifiers were generated.
* Removed unnecessary !
* Removed unnecessary ?
* Created a new enum and functions for retrieving final bosses.
* Moved isBattleClassicFinalBoss to game-mode.ts and reverted battle.ts
* Preventing item transfer with tryTransferModifier instead
* Added filtering to modifier-retrieve methods.
* Revised logic in tryTransferHeldItemModifier
* Adding what works to the game even though it's not the best.
* Added comments
* Removing past changes to files.
* Added check for Classic Final Boss.
---------
Co-authored-by: frutescens <info@laptop>
* Replaced conditional with `true` so that sync-to-server occurs at the start of every wave.
* Update src/phases/encounter-phase.ts
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
* Fixed errors from previous commit.
* Revised condition to include the first wave of a run.
* Apply suggestions from code review
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: Moka <54149968+MokaStitcher@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>
* 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>
* Converted EncoreTag into a MoveRestrictionBattlerTag
* Wrote test and added documentation
* Added documentation describing EncoreTag as a whole
* Added PRE_MOVE lapse code to handle early tag expiration from PP-less encored move
* Replaced PRE_MOVE with CUSTOM for lapsing Encore in situations where the encored move has 0 PP
* Add encore tests
* fix overrides
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update command-phase.ts
* Addressed failing eslint test
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: innerthunder <brandonerickson98@gmail.com>
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>