* Remove Promises from moves and abilities
* Fix `PostSummonPhase`
* Apply suggestions from Kev's review
* More suggestions
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Cleaning up some updated functions
* Remove Promise from `addEnemyModifier`
+ fixes to some extraneous `await`s
* Test fixes
* Fix missing import in revival blessing test
Co-authored-by: innerthunder <brandonerickson98@gmail.com>
* Add back applyPreLeaveFieldAttrs
Attribute was removed due to absence in a cherry-pick
* Make applyPostApplyEffects work
* Fix move-effect-phase.ts applications
Some applyX methods were missed in the cherry pick commit and were still returning functions instead of running the function themselves
* Mock `BattleScene.addPokemonIcon` in tests
* Revival Blessing condition and tests
* Incorporate Despair-Games/poketernity/pull/48
* Break up imports
* Remove enemy modifier chance dead code
* Remove async from applyAbAttrsInternal
Stray async leftover from merge
* Remove docs and comments referencing promises
* Add `user.setTempAbility` to transform phase
---------
Co-authored-by: innerthunder <brandonerickson98@gmail.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
* Commit old stashed changes
* Complete basic implementation of Tera
* Fix effectiveness test
* Make tera retain until forced recall or faint, regain on biome change
* Experimental sparkle fix
* Fix champion teras
* Attempted fix for double battles tera UI bug
* Fix the fix
* Fix linting and test issues
* Fix more tests
* Change int type
* Implement tera for ME trainers
* Cleanup species inclusivity check
* Make tera instant recharge if terapagos in party
* Make useless tera shards not generate
* Implement stellar tera damage boost
* Improve tera selection UI
* Tidy up animation and localisation
* Improve tera button sprite
* Fix Lance tera
* Make tera instant recharge during E4 in classic modes.
* Fix formatting in the tera common animation
The animation was also not playing due to `frameTimedEvents` being missing as well.
* Make tera effect start after animation
* Implement save migration
* Update version number for migration code
---------
Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
Co-authored-by: Madmadness65 <59298170+Madmadness65@users.noreply.github.com>
* Add Valentines event data
* Event ends Feb 21 not March 21
* Event starts Feb 11 12:00 UTC for testing on beta
* Oops I meant February 10
* Add Luvdisc +3 Luck Boost
* Added Applin to round out the total pokemon and because I know people are going to be confused why it isn't here if they've actually read in gen 8 (any readers in chat?)
---------
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: damocleas <damocleas25@gmail.com>
* 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
* 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>
* 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>
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>
* Increase Gimmighoul's evo counter more with Big Nugget/Relic Gold
* Update src/modifier/modifier.ts
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
---------
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
* Added double battle exclusion to Endless bosses.
* Brought Endure token RNG in line with game RNG formatting.
* Corrected incorrect modulo condition in isEndlessBoss
* Moved new doubles conditional to be above overrides.
* Fixed bad RNG calls for Covet and Thief too.
* Updated unburden test.
* Revert "Updated unburden test."
This reverts commit 01788d40c2f5c32d89bd0cb899bfc67fc77f881e.
* Revert "Fixed bad RNG calls for Covet and Thief too."
This reverts commit c7fcfd195de7e98c1e582ec67c829e003663cad0.
---------
Co-authored-by: frutescens <info@laptop>
* 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`
* 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>
* Mystery Encounter bugfixes
* more ME bug fixes
* update allowed pokemon in ME requirements
* some unit test cleanup and general tidying
* fix null exception on isBattleMysteryEncounter
* clean up tsdocs and fix pokemon hasAbility check
* fix double battle crash in challenge mode with a single eligible pokemon
* apply suggestions from PR#4619's code reviews
* revert fix for Keldeo crashes + implement fix suggestion from PR #4619
* fix session migration for PokemonCustomData
* prevent test failure due to keldeo fix
---------
Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>