Commit Graph

459 Commits

Author SHA1 Message Date
Madmadness65 00ba2eebc8
Add new biome BGM by Firel (#4301) 2024-09-17 21:57:34 +01:00
AJ Fontaine 3ed2c74f38
[Enhancement] Add Met Wave to Pokemon Data (#4271)
Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>
2024-09-16 15:44:03 -07:00
AJ Fontaine 540a1c3e21
[Balance] Rework some evolutions (#2732)
* Changes some evolutions

* more work

* Give Onix Iron Defense at 30

* Sirfetch'd and Gholdengo, pause any evolutions

* Fix pause evolution text

* adjust wild evolution delay

* Add localization keys, clean up evo pausing

* Clean up evo delays

* Adjust friendship evos, Leader's Crest sprite by chaosgrimmon

* Fix Nugget crash

* Fixed Gimmighoul fr

* Move Charcadet armors to common

* Locale migration, Lilligant shiny stone

* Cleanup

* Fix language migration error

* Change Cosmog line evo method

* Undo Ursaluna being night only

* Evo items roll during evo pause on Eevee

* Make all time based evos use dusk and dawn times

* Fix paused and unpaused evolution texts being reversed

* Fixed evolution delays

* Moved up Mimic in Mime Jr's moveset

* Remove Cosmoem time conditions, add Gimmighoul tracker

* Remove tracker after Gimmighoul evo

* Change Scyther Steel Wing back to 30, mark custom
2024-09-15 02:32:43 +01:00
innerthunder 79fa80cfd8
[Bug][Beta] Fix error in message sequencing on critical hits (#4259) 2024-09-14 19:14:37 -04:00
innerthunder d8dbc471af
[Bug][Beta] Fix Pokemon info flyout being offset on switchout after double battle (#4260) 2024-09-14 19:13:32 -04:00
innerthunder bdc7c95c1c
[Misc][AI] Fix KO filter not accounting for move conditions (#4245)
* Only filter KO moves that won't fail

* Add Last Resort enemy command test
2024-09-14 12:35:36 -04:00
innerthunder a7b3344c6d
Fix missing key in "No Effect" message (#4244) 2024-09-14 05:21:31 -07:00
Opaque02 783b9d85ee
[Bug] Golden punch bug fix (#4246)
* Fixes damage within pokemon.ts for golden punch, since it has changed from a IntegerHolder (main) to a number (beta). This updates it to pass through the damage as an integer holder instead of a number

* Updated integer holder to number holder as per PR comment
2024-09-14 10:56:28 +02:00
innerthunder 77f0fe6e4b
[Enhancement][EnemyAI] Add support for simulated damage calculations and "Search for KO" move filtering (#3975)
* Create getAttackDamage function

* Add ignoreAbility params to getBattleStat

* Rewrite Pokemon.apply

* renamed damage variables

* Add `ignoreSourceAbility` arg to `getAttackDamage`

* Enemy AI now searches for KO moves

* Add probabilistic test for KO search

* Add tests to `damage_calculation`

* "killMoves" --> "koMoves"

* Clean up `randomMultiplier`

* Clean up damage calculation test

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Fix stabMultiplier using base type for Tera bonus

* Restore simulation capabilities for Unaware

* move sourceTeraType closer to where it's used

* Add base damage test

* Exclude counter moves from KO search

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-09-13 22:54:22 -07:00
ImperialSympathizer acb2b66be4
[Feature] Add Mystery Encounters to the game (#3938)
* add .github/workflows/mystery-event.yml

* update mystery-event.yml

* mystery encounters: resolve review comments:

Lost at Sea:
-fix typo in handlePokemonGuidingYouPhase function

Mysterious Chest:
- remove obsolete commented code

mystery-encounter.ts
- remove unused `onDone` field from MysteryEncounterBuilder

* fix typo in CanLearnMoveRequirementOptions

* remove redundance from Pokemon.isAllowedInBattle()

* chore: jsdoc formatting

* fix lost-at-sea tests

* add fallback for biomeMysteryEncounters if empty

* lost-at-sea-encounter: fix and extend tests

* move "battle:fainted" into `koPlayerPokemon`

* add retries to quick-draw tests

* fix lost-at-sea-encounter tests

* clean up battle animation logic

* Update and rename mystery-event.yml to mystery-events.yml

* Update mystery-events.yml

* Fix typo

* Update mystery-events.yml

Fix debug runs

* clean up unit tests and utils

* attach github issues to all encounter jsdocs

* start dialogue refactor

* update sleeping snorlax encounter

* migrate encounters dialogue to new format

* cleanup and add jsdocs

* finish fiery fallout encounter

* fix unit test breaks

* add skeleton tests to fiery fallout

* commit latest test changes

* finish unit tests for fiery fallout

* bug fix for empty modifier shop

* stash working changes

* stash changes

* Update src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Update src/test/utils/overridesHelper.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Update src/test/utils/overridesHelper.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Update src/test/utils/overridesHelper.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Update src/test/utils/overridesHelper.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Update src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Update src/data/battle-anims.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* nit updates and cleanup

* Update src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* add jsdocs and more cleanup

* add more jsdoc

* add the strong stuff encounter

* add the strong stuff encounter and more unit tests

* cleanup container length checks in ME ui

* add retries to tests

* add retries to tests

* fix trainer wave disable override

* add shuckle juice modifier

* add dialogue bug fixes

* add dialogue bug fixes

* add pokemon salesman encounter and affects pokedex UI display

* add unit tests for pokemon salesman

* temp stash

* add offer you can't refuse

* add unit tests for offer you can't refuse encounter

* remove unnecessary prompt handlers

* add tests for disabled encounter options

* add delibird-y encounter

* add delibird-y encounter

* add absolute avarice encounter

* finish absolute avarice encounter

* add unit tests and enhancements for item overrides in tests

* fix unit test

* cleanup absolute avarice PR

* small bug fixes with latest sync from main

* update visuals loading for safari and stat trainer visuals

* update visuals loading for safari and stat trainer visuals

* update a trainer's test encounter and add unit tests

* add Trash to Treasure encounter

* clean up trash to treasure encounter

* clean up trash to treasure encounter

* add berries abound encounter

* start clowning around encounter

* first implementation pass at clowning around

* add unit tests for clowning around

* add unit tests for clowning around

* clean up ME unit tests

* clean up unit tests

* update unit tests

* add part timer and dancing lessons encounters

* add unit tests for Dancing Lessons and Part-Timer

* reordered biome list and adjusted redirection for project and labels

* Add Weird Dream encounter and slight reworks to Berries Abound/Fight or Flight

* adjusting yml to match new labels

* fix yml whoopsie

* Expanded 'Weird Dream' banlist and fixed a bug with the BST bump range

* adds Winstrate Challenge mystery encounter

* small cleanup for winstrates

* add unit tests for Winstrate Challenge

* fix pokemon not returning after winstrate battle

* commit latest beta merge updates

* fix ME null checks and unit tests with beta update

* fix ME null checks and unit tests with beta update

* MEs to pokerogue beta branch

* test dialogue changes

* test patch fix

* test patch fix

* test patch fix

* adds teleporting hijinks encounter

* add unit tests for Teleporting Hijinks

* small change to teleporting hijinks dialogue

* migrate ME translations to json

* add retries to berries-abound.Option1: should reward the player with X berries based on wave

* add missing ME dialogue back in

* revert template changes

* add ME unique trainer dialogue to both dialogue jsons

* fix hanging comma in json

* fix broken imports

* resolve lint issues

* fix flaky test

* balance tweaks to a few MEs, updates to bug superfan

* add unit tests for Bug-Type Superfan and clean up dialogue

* Adds Fun and Games mystery encounter

* add unit tests for Fun and Games encounter

* update jsdoc

* small ME balance changes

* small ME balance changes

* Adds Uncommon Breed ME and misc. ME bug fixes

* Update getFinalSessionData() to collect Mystery Encounter data

* adds GTS encounter

* various ME bug fixes and balance changes

* latest ME bug fixes

* clean up GTS Encounter and add unit tests

* small cleanup to MEs branch

* add BGM music names for ME music

* bug fixes and balance changes for MEs

* ME data schema updates

* balance changes and bug fixes to MEs

* balance changes and bug fixes to MEs

* update tests for MEs

* add jsdoc to party exp function

* dialogue updates and test fixes for MEs

* dialogue updates and test fixes for MEs

* PR suggestions and fixees

* stash PR feedback and bugfixes

* fix all tests for MEs and cleanup

* PR feedback

* update flaky ME test

* update tests, bug fix MEs, and sprite assets

* remove unintentional console log

* re-enable stubbed function for Phaser text styling

* handle undefined introVisuals properly

* PR feedback from NightKev

* disable Uncommon Breed tests

* locales updates and bug fixes for safari zone

* more PR feedback and update field trip with Rarer Candy

* fix unit test

* Change how reroll button gets disabled in Modifier Shop Phase

* update continue button text logic

* Update src/ui/modifier-select-ui-handler.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* fix money formatting and some nits

* more nits

* more nits

* update ME tsdocs with links

* update ME tsdocs with links

---------

Co-authored-by: Felix Staud <felix.staud@headwire.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
2024-09-14 03:05:58 +01:00
seanrmon a085d3d416
[Bug] Fix for unpausing evolutions for secondary Pokémon in a fusion (#4007)
* [Bug] Cannot unpause evolutions for secondary Pokémon in fusion

* [Bug] Fusion Pokémon now inherit "Pause Evolutions" from both Pokémon

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-09-13 13:03:11 -04:00
innerthunder 70295280da
[Move] Implement Substitute (#2559)
* Implement Substitute

Squashed commit from working branch

* Fix integration test imports

* Use Override Helper utils + Fix Baton Pass test

* Update src/test/moves/substitute.test.ts

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>

* Fix test imports + nits

* Document RemoveAllSubstitutesAttr

* Fix some strict-null issues

* more strict-null fixes

* Fix baton pass test

* Reorganized Substitute translation keys

* Added checks for substitute in contact logic

* Clean up Unseen Fist contact logic

* Remove misleading comment in Download attr

* RIP phases.ts

* Fix imports post-phase migration

* Rewrite `move.canIgnoreSubstitute` to `move.hitsSubstitute`

* Also fixed interactions with Shell Trap and Beak Blast

* Removed some leftover `canIgnoreSubstitute`s

* fix issues after beta merge

* Status move effectiveness now accounts for substitute

* More edge case tests (Counter test failing)

* Fix Counter + Trap edge cases + add Fail messagesd

* Fix leftover nit

* Resolve leftover test issues

* Fix Sub offset carrying over to Trainer fights

* Hide substitute sprite during catch attempts

* Make substitutes baton-passable again

* Remove placeholder locale keys and SPLASH_ONLY

* Fix imports and other nits

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* ESLint

* Fix imports

* Fix incorrect `resetSprite` timing

* Fix substitute disappearing on hit (maybe?)

* More animation fixes (mostly for Roar)

---------

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-09-13 12:46:22 -04:00
Jannik Tappert b33d86a1db
[BUG] Make Tate & Liza have seeded randomness #4175 2024-09-11 13:55:13 -07:00
NightKev 9f82d796d3 Merge branch 'main' into beta 2024-09-11 07:29:18 -07:00
NightKev 11d912bad8
[Dev] Make `OPP_MOVESET_OVERRIDE` fully override the enemy's moveset (#4062)
* Make `OPP_MOVESET_OVERRIDE` fully override the enemy's moveset

* Update tests with new override behavior

* Fix tests

* Fix another test

* Move overrides no longer required to be arrays

* Remove `SPLASH_ONLY` test utility variable

* Update moveset override helper functions

* Missed some tests
2024-09-09 12:55:11 -04:00
AJ Fontaine 16fc3a87b7
Fix usedTMs crash (#4132) 2024-09-09 14:07:05 +01:00
Adrian T. f5bf766ff7
[Move] Fully implement Tar Shot (#4043) 2024-09-09 00:42:53 -07:00
innerthunder c710f85fd3
Fix `Pokemon.isTrapped` only checking enemy Pokemon for trapping abilities (#4124) 2024-09-09 14:19:59 +08:00
flx-sta 39b6a72517
[Bug] Fix #762: All Pokemon become invisible when capturing then switching with your only pokemon that was not fainted (#4025)
* fix #762 by using slotIndex to add to party

for now the new pokemon was ALWAYS just pushed to the party array. Now it's put into the slot that was also previously selected as the mon to release

* add docs for `Pokemon.addToParty()`

* add simple tests for addToParty

* update `isBetween` docs. Remove `.js` imports
2024-09-09 01:10:47 -04:00
innerthunder 68b956cbe6
[Bug] Fix incorrect defensive properties on Terastallized Pokemon (#4070)
* Fix incorrect defensive properties on Terastallized Pokemon

* Add tests to `effectiveness.test.ts`

* Suppress errors from Tera achievement validation
2024-09-08 20:48:09 -07:00
Mumble 021f31b589
[Hotfix] Retrieve the right cry when alternate-form Pokemon faint + retrieve the correct sprite key (#4117)
* [DOCS] adding JSDocs to `arena.ts` (#3590)

* adding some docs

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* seems like battleStats changed to statStages

* Apply suggestions from code review

editing doc text

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Update tsdocs, convert comment to tsdoc in `pokemon.ts`

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* [Bug] Fix scrappy (+ some immunity move and ability) in inverse battle (#4067)

* fix scrappy + etc. update inverse battle test code

* update test code following request from swain

* fix and optimize imports (#4061)

- remove any `.js` extension imports
- remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static
- increase vite chunk-size warning limit

Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>

* Fusion hotfix

* returned main

* Faint cry properly retrieved for non fused Pokemon with forms

* Revert "[DOCS] adding JSDocs to `arena.ts` (#3590)"

This reverts commit b73fd97760.

* Revert "[Bug] Fix scrappy (+ some immunity move and ability) in inverse battle (#4067)"

This reverts commit 31fcbf49f4.

* Revert "fix and optimize imports (#4061)"

This reverts commit d1bd6974e4.

* Fixed sprite key generation

---------

Co-authored-by: DustinLin <39450497+DustinLin@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>
Co-authored-by: frutescens <info@laptop>
2024-09-09 00:03:37 +01:00
Mumble 22c60ab532
[Hotfix][Bug] Retrieves the correct cry for Fused Pokemon (#4116)
* [DOCS] adding JSDocs to `arena.ts` (#3590)

* adding some docs

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* seems like battleStats changed to statStages

* Apply suggestions from code review

editing doc text

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Update tsdocs, convert comment to tsdoc in `pokemon.ts`

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* [Bug] Fix scrappy (+ some immunity move and ability) in inverse battle (#4067)

* fix scrappy + etc. update inverse battle test code

* update test code following request from swain

* fix and optimize imports (#4061)

- remove any `.js` extension imports
- remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static
- increase vite chunk-size warning limit

Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>

* Fusion hotfix

* Revert "fix and optimize imports (#4061)"

This reverts commit 287d671cfd.

* Revert "[Bug] Fix scrappy (+ some immunity move and ability) in inverse battle (#4067)"

This reverts commit 9fd34c95d5.

* Revert "[DOCS] adding JSDocs to `arena.ts` (#3590)"

This reverts commit 0742efd196.

* typo

* Fixed fusionFaintCry to return correct cry

---------

Co-authored-by: DustinLin <39450497+DustinLin@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>
Co-authored-by: frutescens <info@laptop>
2024-09-08 21:42:11 +01:00
innerthunder 8082e6dc58
[Hotfix] Fix harsh weather cancelling moves based on base type (#4097) 2024-09-08 02:29:49 -04:00
Leo Kim 2fc3179bd9
[Bug] Fix scrappy (+ some immunity move and ability) in inverse battle (#4067)
* fix scrappy + etc. update inverse battle test code

* update test code following request from swain
2024-09-07 21:37:14 -07:00
DustinLin f73a830f77
[DOCS] adding JSDocs to `arena.ts` (#3590)
* adding some docs

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* seems like battleStats changed to statStages

* Apply suggestions from code review

editing doc text

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Update tsdocs, convert comment to tsdoc in `pokemon.ts`

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-09-07 21:36:47 -07:00
NightKev 57a3efd9e2
[Bug] Fix off-by-one errors in some random number calls (#3665)
* Fix off-by-one error in some random number calls

* Fix mock RNG function used by tests

Also remove unnecessary extra RNG mock from Glaive Rush test

* Just some github UI manipulation don't mind me

* Update Glaive Rush test

* Remove unnecessary `Math.floor()`

* Remove resolved comment

* Add tsdocs to various functions

* Remove `src/rng.md` file

* Update tsdoc
2024-09-05 23:51:05 +00:00
Zach Day 13f38dce8d
[Move] Use BattlerTag for move-disabling effects (#2051)
* Use BattlerTag for move-disabling effects

* Fix RUN command causing freeze

* Improve documentation

* Clean up and document PokemonMove.isUsable

* Fix isMoveDisabled missing return

* Tags define the message shown when disabling interrupts a move

* Fix -1 duration on Disable effect

* Add tests for Disable

* En loc and fix message functions

* Fix Disable test

* Fix broken imports

* Fix test

* All disable tests passing

* Localize remaining strings

* Move cancellation logic out of lapse; use use TURN_END for lapse type

* Prevent disabling STRUGGLE

* Inline struggle check function

* Restore RechargingTag docs

* Move cancellation logic back to tag

Wanted to increase similarity to the existing code base to avoid that stupid hyper beam error but it's still happening here

* Fix hyper beam test

* Remove erroneous shit

* Fill movesets with SPLASH for disable test

* More robust condition for disable checking

* Remove DisabledTag lapse

* Simplify DisablingBattlerTag lapse

* Cancel disable-interrupted moves instead of failing them

* Avoid disabling virtual moves

* Consistent access modifiers across Disable tags

* Add abstract function for message when player tries to select the disabled move

* Fix syntax mistake

* Always disable last-used non-virtual move

* Overhaul tests + add tests

* Implement loadTag for DisabledTag

* Update translations

* Update translations

* Reimplement phase changes

* fix battlertag strings

* Fix disable test not running

* Update name of base class

* Rename "disabling" to "restriction"

* Fix sneaky string fuckup

* Fix test failure

* fix merge problems

* fix merge problems

* Update tests

* rerun RNG test

* Properly mock stats in test

* Document everything in battlertag

* More docs + typo fix

* Update tests

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-09-05 08:44:22 +00:00
NightKev fde32cea6c
[Misc][Bug] Add `isBatonPassable` property to `BattlerTag`s (#3472)
* Add `isTransferrable` property to `BattlerTag`s

* Update Baton Pass to check `isTransferrable` for `BattlerTag`s

* Don't mark Salt Cure as transferrable

* Add Destiny Bond, remove `GroundedTag` and `ExposedTag`

* Fix daily mode test

* Add test

* Rename `isTransferrable` to `isBatonPassable`
2024-09-04 17:58:35 +00:00
Amani H. 89e80f3deb
[Refactor/Bug/Move] Overhaul Stats and Battle Items, Implement Several Stat Moves (#2699)
* Create Getters, Setters, and Types

* Work on `pokemon.ts`

* Adjust Types, Refactor `White Herb` Modifier

* Migrate `TempBattleStat` Usage

* Refactor `PokemonBaseStatModifier` Slightly

* Remove `BattleStat`, Use "Stat Stages" & New Names

* Address Phase `integers`

* Finalize `BattleStat` Removal

* Address Minor Manual NITs

* Apply Own Review Suggestions

* Fix Syntax Error

* Add Docs

* Overhaul X Items

* Implement Guard and Power Split with Unit Tests

* Add Several Unit Tests and Fixes

* Implement Speed Swap with Unit Tests

* Fix Keys in Summary Menu

* Fix Starf Berry Raising EVA and ACC

* Fix Contrary & Simple, Verify with Unit Tests

* Implement Power & Guard Swap with Unit Tests

* Add Move Effect Message to Speed Swap

* Add Move Effect Message to Power & Guard Split

* Add Localization Entries

* Adjust Last X Item Unit Test

* Overhaul X Items Unit Tests

* Finish Missing Docs

* Revamp Crit-Based Unit Tests & Dire Hit

* Address Initial NITs

* Apply NIT Batch

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Fix Moody Test

* Address Multiple Messages for `ProtectStatAbAttr`

* Change `ignoreOverride` to `bypassSummonData`

* Adjust Italian Localization

Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>

* Fix Moody

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
2024-09-02 22:12:34 -04:00
ckincaid17 234d617464
[Bug] Let Shedinja relearn egg moves when evolved from a starter (#3915)
* [Bug] Let Shedinja relearn egg moves when evolved from a starter

* Copy met level as well
2024-09-02 19:10:33 -07:00
AJ Fontaine b0360123e0
[Balance] [QoL] [Feature] Allow mons to track and relearn used TMs (#3656)
* Allow mons to track and relearn used TMs

* Fix issue getting level moves

* Apply suggested safety measures
2024-09-02 16:25:41 -07:00
MokaStitcher 89a1ff7b5b
[Bug] Fix Inconsistency with stat boost when breaking through boss shields + tests (#3785)
* fix boss shield stats up calculation and add tests

* update test to remove usage of deprecated startBattle
2024-09-03 00:29:15 +02:00
NightKev 84ef7f0683
[Balance] Double base shiny odds, adjusted Shiny Charm to match (#3964)
* Double shiny odds

"anyone wanna double the base shiny odds for me" - damo, 2024

* Adjust Shiny Charm to compensate for increased base odds

* Remove magic number

* Update tsdoc and remove unneeded `console.log()`

* Clarify tsdoc
2024-09-02 00:26:47 -04:00
NightKev f54846f735
[Move] Implement Safeguard (#3447)
* Implemented safeguard and tests

* Update tests

* Add i18n placeholders

* Implement Safeguard for non-volatile statuses

* Implement protection from confusion and Yawn

* Replace `target instanceof EnemyPokemon` with `target.isPlayer()`

* Minor capitalization change

* First batch of i18n

Adds fr, pt_BR, zh_CN, zh_TW

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Add more translations

+ de, es, ko

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Asdar <asdargmng@gmail.com>
Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>

* Fix broken character in es translation

* Update test with new function definition

* Add Italian translation

Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>

* Add move category check for message display

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>

* Update phase imports in Safeguard test

* Fix test imports

* Update tests

---------

Co-authored-by: Joshua Keegan <keeganjosh@vuw.ac.nz>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Asdar <asdargmng@gmail.com>
Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-09-02 00:26:20 -04:00
Mumble c4c9cf939e
[Bug] Moved RNG call if the Pokemon's ability hasn't been determined (#3966)
Co-authored-by: frutescens <info@laptop>
2024-09-02 00:09:46 -04:00
innerthunder e29f1fe5fd
[Bug] Fix some trapping moves' interactions with Ghost-type Pokemon (#3936)
* Fix secondary effects to trapping moves not applying to Ghost types

* Docs for `isTrapped`

* more `isTrapped` cleanup

* Remove .js from imports
2024-09-01 23:39:26 -04:00
NightKev 709066bd1a
[Move] Finish Alluring Voice, Burning Jealousy and Lash Out (#3508)
* Implement Alluring Voice and Burning Jealousy

* Fix Alluring Voice and add tests

* Replace `BattlerTag.STATS_BOOSTED` with `PokemonTurnData` field

* Work around bug with turn data

* Remove unused variable

* Replace nearby instances of `integer` with `number`

* Fix imports

* Implement Lash Out

* Rename `battleStats(In|De)crease` -> `battleStats(In|De)creased`

* Fix copy/paste error

Co-authored-by: schmidtc1 <62030095+schmidtc1@users.noreply.github.com>

* Update tests

---------

Co-authored-by: ElliottSimmonds <simmonds.elliott@yahoo.co.uk>
Co-authored-by: schmidtc1 <62030095+schmidtc1@users.noreply.github.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
2024-09-01 22:57:07 -04:00
Adrian T. 64368b62bc
[Ability] Add form change support for Flower Gift (#3941)
* add form change support for flower gift

* fix nits
2024-09-01 22:39:42 -04:00
Adrian T. 3bcee779e2
[Move] Fully implement dragon cheer (#3959) 2024-09-01 22:39:12 -04:00
innerthunder 7755f798fd
[Ability] Implement Tera Shell (#3856)
* Implement Tera Shell

* Apply suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update src/data/ability.ts

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>

* Add comments and fixed damage condition to `applyPreDefend`

* Fix speed tie breaking things in tera shell test

* Change deprecated `startBattle` calls

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
2024-09-02 02:21:11 +01:00
NightKev 642b18e747
[Bug] Fix Pokemon not gaining HP when evolving (#3569)
* Don't recalculate stats that already exist

* add test to cover hp update after evo (#4)

- add evolution phase to phase interceptor
- add mock for video game object
- add returning video mock on add.video()

* add test to make sure pkm are not healed on evolve

* Stop on `EndEvolutionPhase` to prevent game state leak in tests

* Fix imports

* Remove `.js` from import

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Add docs to mock class

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-08-30 20:21:56 -07:00
damocleas db9434ac11
[Balance] Biome Changes / Minor Passive Changes / Minor Egg Move Changes / Beta GMax form adjustments (#3852)
* [Balance] Previous Egg/Passive/Eternatus Update Adjustments

* Update pokemon-species.ts

* Updated Eternatus, src/field/pokemon.ts

* Update egg-moves.ts for Drowzee and Darkrai

* Update biomes.ts

* Update biomes.ts to screw over Dojo!

* Update pokemon-species.ts gmax adjustments
2024-08-29 20:29:06 +01:00
Leo Kim c112abbcd2
[Challenge] Inverse battle challenge (#3525)
* add inverse battle challenge. refactoring type.ts for inverse battle challenge

* update type integer -> number

* add inverse battle condition to thunder wave, conversion 2.

* add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always

* update startBattle with isClassicMode default = true

* add inverse achievement

* fix achv validation condition

* remove unnecessary new line

* update defaultWidth 160 -> 200

* update locales

* fix korean translation

* fix korean translation2

* Update src/locales/de/achv.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/de/challenges.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/de/challenges.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* resize challenge description 96 -> 84

* update challenge select UI size.

* revert font size to 84. update de translation

* Update src/locales/fr/challenges.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/fr/achv.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/es/challenges.ts

Co-authored-by: Asdar <asdargmng@gmail.com>

* Update src/locales/fr/challenges.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/fr/achv.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/es/achv.ts

Co-authored-by: Asdar <asdargmng@gmail.com>

* Update src/locales/fr/achv.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* shrink de font size on achivement

* set middle align to achv title

* Update src/locales/zh_CN/achv.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/zh_TW/achv.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/zh_CN/challenges.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/zh_TW/challenges.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* fix zh_TW ahiv.ts

* fix import code on inverse battle test for updated phase

* Update src/data/type.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* update requested changes

* Update src/locales/pt_BR/achv.ts

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Update src/locales/pt_BR/achv.ts

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Update src/locales/pt_BR/challenges.ts

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* [draft] update inverse battle apply function

* change the way how to use applyChallenge for inverse type

* resolve confilct

* fix test codes

* remove unnecessary multiplier variable and break codes

* update getTypeDamageMultiplier argument type from `number` to `Type`

* Fix inverse types tests (#1)

* Fix Inverse Battle tests

* Add timeout parameter to tests

* update requested changes

* update requested changes

* update requested changes2

* update comments

* Update src/test/utils/helpers/challengeModeHelper.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update src/test/utils/helpers/challengeModeHelper.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* fix mis pasted code

* revert loadChallenge code for  FreshStartChallenge

* code refactoring

* restore challenge.json lost translations

* revert UI changes

* revert unreverted newlines

* Run History inclusion

* requested changes from torranx

* update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup.

* fix test code. adding flying press test code

* update requested change from xavion3

* updated requested change from xavion 2

* update requested changes from xavion 3

* remove exception code which is not valid

* attach partial mark to Freeze dry. requested by xavion

* add missing game over phase code when we delete old phases.ts

* fix test codes

* merge conflict

* fix achv condition

* updated achv block condition. we don't want to change desc now

* resolve conflict

* Eternatus Moveset Tinkering

* Cleaning it up

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Asdar <asdargmng@gmail.com>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: frutescens <info@laptop>
2024-08-29 19:59:33 +01:00
Adrian T. 5f3383ff04
[Dev] Cleanup some opponent overrides + add new opp form override (#3733)
* replace interger types, add opp form override

* move code to EnemyPokemon class

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-08-27 17:34:16 -07:00
NightKev d234466d61
[Balance] Make sure trainers are using fully evolved Pokémon by gym 3 (#3499)
* Make sure trainers are using fully evolved Pokemon by gym 3

* Expand comment info

Co-authored-by: Mumble <kimjoanne@protonmail.com>

* Implement suggestions

* Update `getPokemonSpecies()` to throw an error if passed `undefined`

---------

Co-authored-by: Mumble <kimjoanne@protonmail.com>
2024-08-26 23:05:16 +02:00
Mumble c52f439dc1
Corrections and adjustments (#3831)
Co-authored-by: frutescens <info@laptop>
2024-08-26 21:50:19 +01:00
innerthunder 0221c9faba
[Ability][Move] Rewrite Type Resolution and Effectiveness Calculation Functions (#3704)
* Make type/category read-only

* Fix protean/libero tests

* Refactor Pokemon type effectiveness calculation

* Merge getMoveEffectiveness and getAttackMoveEffectiveness

* Move priority-blocking ability check

* Fix incorrect early stopping implementation in MultiHitAttr

* Fix Aerilate, etc. affecting variable-type moves

* Thunder Wave now respects Attack type immunities

* Use final move types for pre-defend abilities

* Steal some things from flx's PR hehe

* Fix Thousand Arrows + "No effect" messages

* Fix status type effectiveness check

* Another status move effectiveness update + some docs

* changing status logic again...

* Fix unnecessary "No Effect" message for Volt Absorb, etc

* Add type effectiveness unit test

* Add Galvanize integration tests

* Add multi-hit test to galvanize tests

* Add power check to first Galvanize test

* Add missing doc line

Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>

* Resolve torranx's nits

* Apply suggestions from Kev's code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* More suggestions I missed

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Optimize effectiveness test and make others more stylish (#3)

* Resolve Kev's remaining nits and some test issues

---------

Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta
Co-authored-by: frutescens
2024-08-25 19:11:01 -07:00
NightKev 443e4bd24c
Multi-target damage reduction is now properly calculated (#3734) 2024-08-25 17:40:43 -07:00
Mumble 933cfcbad3
[Refactor][QoL] Game Audio + New Settings (#3527)
* Changed how non-BGM are loaded into the game + moved into directories

* some leftovers

* Apply suggestions from code review

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Added setting for Field Volume + rewrote playSound() and updateSoundVolume() functions to reflect the new settings.

* Main -> Beta (#3635)

* Fixed issue with falsy issue within condition to get a stat for IV scanner

* add fix setting code to prevent form/variant bug when default form/variant setting is wrong.
in addition, that fix code include gender fix, so i revert old gender fix.
update wrong log message.

* [Hotfix] Fix Memory Mushroom not showing relearner moves (#3619)

* Fix Memory Mushroom not showing relearner moves

* Fix rollout test

* Rewrite player faint logic in FaintPhase (#3614)

* 867 runerigus sprite (#3629)

cropped static frames, fixed cropped sprite
set runerigus exp to use the shiny exp's animation
verified all hex colors are unchanged

- fixed ultra necrozma exp front variant swapped arrays.
- xatu female eye color fix

* [Bug] Preventing the MBH from being stolen in Endless (#3630)

* Endless MBH Fix

* add import

* Revert "add import"

This reverts commit 814a4059c2.

* Revert "Endless MBH Fix"

This reverts commit 8eb4481301.

* removed newline

---------

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>

* [Bug] Fix type-hints for immunity (#3620)

* enable mock containers to be found by name

* enable mock text to be found by name

* add test coverage for type-hints

Only for "immunity" and "status moves"

* fix wrong message key of curse(ghost type) (#3631)

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>

* [Hotfix] Steal-able Mini Black Hole Pt 2  (#3632)

* Still have no idea where Eternatus is given the MBH....

* typedocs

---------

Co-authored-by: frutescens <info@laptop>

* [Hotfix] Abilities that prevent ATK drops no longer stop other stat drops (#3624)

* Abilities that prevent ATK drops no longer stop other stat drops

* Apply suggestions from code review

Co-authored-by: Mumble <kimjoanne@protonmail.com>

* Add `isNullOrUndefined()` utility function

---------

* Grip Claw now shows the proper pokemon nickname (#3634)

Co-authored-by: frutescens <info@laptop>

---------

Co-authored-by: Opaque02 <66582645+Opaque02@users.noreply.github.com>
Co-authored-by: KimJeongSun <leo@atlaslabs.ai>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: cam <lrlrliwoo@gmail.com>
Co-authored-by: Mumble <kimjoanne@protonmail.com>
Co-authored-by: frutescens <info@laptop>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>

* [Bug] Preventing the MBH from being stolen in Endless (#3630)

* Endless MBH Fix

* add import

* Revert "add import"

This reverts commit 814a4059c2.

* Revert "Endless MBH Fix"

This reverts commit 8eb4481301.

* removed newline

---------

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>

* [Hotfix] Steal-able Mini Black Hole Pt 2  (#3632)

* Still have no idea where Eternatus is given the MBH....

* typedocs

---------

Co-authored-by: frutescens <info@laptop>

* Deleted phases.ts (#3618)

* Updated sound terms

* Added space for localization

* Update src/locales/ko/settings.ts

Co-authored-by: Enoch <enoch.jwsong@gmail.com>

* Update src/locales/zh_TW/settings.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/pt_BR/settings.ts

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Update src/locales/zh_CN/settings.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/de/settings.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/ko/settings.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update src/locales/fr/settings.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/it/settings.ts

Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>

* Include sound effects that were loaded in as BGM.

* Removed stray placeholder localization

---------

Co-authored-by: Frutescens <info@laptop>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Opaque02 <66582645+Opaque02@users.noreply.github.com>
Co-authored-by: KimJeongSun <leo@atlaslabs.ai>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: cam <lrlrliwoo@gmail.com>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
2024-08-25 17:40:14 +01:00
Adrian T. 03de6cfe36
[Ability] Implement Forecast (#3534)
* initial forecast implementation

* updates

* bug fixes and add tests

* bug fixes

* update docs

* fix issues post-merge

* add show ability

* add support for simulated abilities

* add simulated conditions and fix tests

* fix simulated conditions
2024-08-25 17:23:09 +08:00