Commit Graph

4145 Commits

Author SHA1 Message Date
Mumble 3a767ed38a
[Refactor] Another Audio clean up (#4077)
* Cleaned up how cry keys were retrieved

* Legendary Pokemon Changes + Cry Cleanup

* Spelling mistake

* Fixed settings.

* correcting typedocs

* eslint

* eslint cleanup

* music pref

* gdfafa

* Music

* Apply suggestions from code review

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

* Update src/battle.ts

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

* Update src/battle.ts

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

* fixed default

* Apply suggestions from code review

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

* Added changes

* Update src/battle-scene.ts

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

* Fix variable usage

* Fix `getFormSpriteKey()` and `.concat()` usage

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

* asdsafafaf

* i need to do the dishes ughhh

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
2024-11-03 22:31:07 -05:00
NightKev 770f388c45
[Refactor] Miscellaneous code cleanup (#4596)
* 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>
2024-11-03 22:23:51 -05:00
Moka 62f9f6dd32
[UI] Starter Select UI no longer reloads sprite when changing nature, ability, etc (#4782)
Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
2024-11-03 22:04:53 -05:00
innerthunder c3d832aaca
[Move] Fully Implement Round (#4783) 2024-11-03 21:59:55 -05:00
muscode 3f97c9e39f
[Ability] Implement Unburden (#4534)
* 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>
2024-11-03 21:58:12 -05:00
muscode 1619d512cf
[Move] Implement Fairy Lock (#4736)
* inital wip

* wip set isTrapped to true and removed timedtrap

* implement fairy lock

* whitespace fix

* added documentation for tag

* added more suggested tests

* give tests breathing room

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

* give tests breathing room

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

* give tests breathing room

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

* updated nested ternary, changed test name

---------

Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-11-03 21:56:54 -05:00
NightKev 836b37f383
[Refactor] Clean up some code related to starter select UI (#4752)
* Clean up some code related to SSUI

Replace a few nested ternaries with if blocks

Remove some `undefined`s with destructuring

* Add comment, use `v === 0` instead of `!v`

Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>

---------

Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
2024-11-03 21:55:12 -05:00
NightKev af473ba4ff
[Refactor] Clean up various methods in `battle-scene.ts` and `pokemon.ts` (#4412)
* 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>
2024-11-03 21:53:52 -05:00
Tempoanon 87b7122b60
[P2] Illuminate ignores evasion (#4781) 2024-11-03 21:47:07 -05:00
NightKev 5e2dfa975a
Rename `PokemonTurnData`'s `damageDealt` and `currDamageDealt` (#4784) 2024-11-03 14:09:28 -08:00
muscode f0ae36de6c
[Ability] Implement Wimp Out and Emergency Exit (#4701)
* implement Wimp Out/Emergency Exit

* fixed test

* fixed weather bug

* Added nightmare interaction to Wimp Out following bug fix

* refactored and added postdamageattr

* bug fixes

* added confusion test back (skipped)

* updated applyPostDamageAbAttrs to applyPostDamage

* fix external func name

* fixed syntax inconsistency

* updated PostDamageForceSwitchAttr -> PostDamageForceSwitchAbAttr

* Modify `wimp_out.test.ts`

* remove extra comment

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

* remove extra comment

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

* Update tsdocs

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

* remove comment

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

* remove comment

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

* fix tsdocs

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

* fix tsdocs

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

* fix tsdocs

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

* fix tsdocs

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

* fix whitespace

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

* make getFailedText public

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

* make switchOutLogic public

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

* make getSwitchOutCondition public

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

* make getFailedText public

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

* make applyPostDamage public

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

* simplify if statement

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

* add public override to applyPostDamage

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

* fixed nested if issue, remove trapped tag removal

* add fix for multi hit move

* added multi-lens logic

* moved applyPostDamageAbAttrs to pokemon.damage, added check for multi lens in pokemon.apply

* added source to damageAndUpdate and applyPostDamageAbAttrs, added Parental Bond logic + test, put applyPostDamageAbAttrs back in damageAndUpdate

* simplify multi hit check

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

* Minor formatting changes

* Update src/data/ability.ts

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

* moved and renamed shouldPreventSwitchOut, rewrote tests to account for U-turn changes, fix syntax error

* Move comment slightly

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-11-03 01:04:20 -05:00
podar b17b1d6e7e
[P1] Fixing crash that can occur when failing to loading variant sprites. (#4315) 2024-11-03 01:33:48 -04:00
Mumble f16309fd06
[P2] Plus, Minus, Beads/Sword of Ruin not ignorable. Shield Dust and Armoa Veil ignorable (#4778)
Co-authored-by: frutescens <info@laptop>
2024-11-03 01:22:40 -04:00
Mumble 70ddc29e86
[Refactor] Refactor data/pokemon-species.ts (#4054)
* Setting species-variables to read only

* set generations to protected

* formIndex set to protected

* quick fix

* typedocs fixes

* get / set generation

* wait

* Use get/set for formIndex too

* Fix misplaced line

* Replace a couple `!!` with default params

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
2024-11-02 23:11:24 -04:00
Mason S c31657d952
[Refactor] Reduced nesting in MoveEffectPhase (#3541)
* Re-structured MoveEffectPhase.run() to reduce nesting and improve readability.

* Re-structured MoveEffectPhase.run() to reduce nesting and improve readability.

* Added Substitute Implementation

* Fix indentation, tsdocs, add `public`/etc

* Prevent ENEMY_SIDE targeted moves from occurring twice in double battles

* Add `override` to `start()` and `end()`

* Minor indentation fix

---------

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-11-02 22:55:15 -04:00
innerthunder 1474f8cf14
[Refactor] Add `options` param interface for `MoveEffectAttr` (#4710)
* Optional parameter interfaces for `MoveEffectAttr` and `StatStageChangeAttr`

* Update docs + Diamond Storm typo

* Apply suggestions from code review

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

* Make move effect trigger specification optional

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-11-02 13:05:33 -04:00
Mumble 1659f57262
[P2] Camouflage now considers Terrains first (#4761)
* the fix... will maybe write a test later

* ughh

* made a test

* moved aorund function

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

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

* lalal

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
2024-11-02 12:48:10 -04:00
innerthunder 80a8c659ee
[P2] Add "no switch-in" fail condition for Shed Tail and Baton Pass (#4777) 2024-11-02 12:47:08 -04:00
Moka c2d24d6e93
[Bug] Take weight into account when getting the tier of a modifier (#4775)
* disable timed events in tests

* Take weight into account when getting the tier of modifiers

* Apply suggestions from code review

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

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
2024-11-02 11:55:22 -04:00
AJ Fontaine 8169760e1e
[Bug] Prevent wild mons fleeing with U-turn, Flip Turn, Volt Switch (#4643)
* Wild mons can't flee with U-turn

* Update src/data/move.ts

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

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-11-01 21:21:45 -07:00
Mumble 684fb93e39
the fix (#4733)
Co-authored-by: frutescens <info@laptop>
2024-10-31 22:22:26 +01:00
Lugiad abc9264b3d
[Localization] Spanish modification form es to es-ES (#4753)
* Update and rename statuses_es.json to statuses_es-ES.json

* Rename statuses_es.png to statuses_es-ES.png

* Update and rename types_es.json to types_es-ES.json

* Rename types_es.png to types_es-ES.png

* Update i18n.ts

* Update settings.ts

* Update settings-display-ui-handler.ts

* Update starter-select-ui-handler.ts

* Update utils.ts

* Update settings-display-ui-handler.ts

* Update loading-scene.ts

* Update timed-event-manager.ts

* change remaining 'es' to 'es-ES' in various UIs

* change halloween event banner from es to es-ES

* update to latest locale commit

---------

Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
2024-10-31 21:54:05 +01:00
Madmadness65 5755180279
[Audio] Replace Graveyard BGM with Firel's custom BGM (#4765) 2024-10-30 21:48:09 -04:00
PigeonBar 5b9dfe17ad
[P2] Fix Own Tempo Rockruff not being able to evolve (#4762) 2024-10-30 13:15:11 -04:00
Mumble b3a0ca9475
[Misc] Update Donation Link (#4763)
Co-authored-by: frutescens <info@laptop>
2024-10-29 19:31:24 -07:00
PrabbyDD 15dedf06ed
[P2] No Exp Gained after Switching in a Pokemon as the Opponent Faints (#4687)
* fixing the exp bug

* fixing the exp bug

* dont think need to reset turn data there

* changing a little bit

* Update src/phases/faint-phase.ts

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

---------

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-10-29 17:38:57 -04:00
PrabbyDD afe6d2900d
[P2] Fix for Speed Boost is Activated on the Turn a Pokemon is Switched In, and When a Pokemon Fails to Escape #4353 (#4676)
* fixing speed boost for pokemon being switched in and for if failed escape

* adding unit tests

* adding failed run away test case

* adding failed run away test case modification

* refactoring solution to be more consistent with coding style

* more fixes for consistency

* more fixes for consistency

* adding new AbAttr in abiliity.ts for posterity

* removing uneccesary variables

* fixing a merge conflict
2024-10-29 17:38:33 -04:00
innerthunder fd1aa41d09
[P2] Fix AI targeting allies with status effect moves (#4717) 2024-10-29 17:32:07 -04:00
NightKev 921d4fa18c
[P2] Chloroblast & Struggle should not recoil if the move failed (#4719)
* Chloroblast & Struggle should not recoil if no damage was dealt

* Protect against missing move entry

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

---------

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
2024-10-29 17:31:37 -04:00
AJ Fontaine f9fe59239e
[TMs] Remove Sacred Sword, add Secret Power TM, fix Reflect compatibility (#4713) 2024-10-29 17:31:02 -04:00
Opaque02 1cbe8b1505
[P3] Fixing form name being incorrect for some evolved pokemon (#4742)
* Fixing form name being incorrect for some evolved pokemon

* Updated to include showing the root speciesId if the speciesId locale key doesn't exist
2024-10-29 17:30:20 -04:00
Blitzy 65269f935f
[Balance] Change Bouncy Bubble's Attributes (#4757)
* Change Bouncy Bubble's Healing

* Move comment to what is custom about Bouncy Bubble

---------

Co-authored-by: damocleas <damocleas25@gmail.com>
2024-10-29 16:19:42 -04:00
NightKev 13ff80fb95
Mark Last Respects as partial (#4749) 2024-10-29 18:59:28 +01:00
Mumble fb2d3e45d6
[Move][Ability] Fully Implement Forest's Curse / Trick Or Treat / Mimicry (#4682)
* addedType variable

* basic mimicry implementation

* eslint

* rage

* quick change

* made files

* added mimicry activation message

* test for moves done

* hahahhaha

* done? for now?

* laklhaflhasd

* Apply suggestions from code review

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

* time to start... ughhh

* reflect type

* Added new message

* Update src/field/pokemon.ts

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

* Update src/data/ability.ts

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

* added overrides

* some checks

* removed comments

* Apply suggestions from code review

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

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-10-29 10:10:37 -07:00
geeilhan 38a6bf07e3
[Bug] Fix enemy faint causing Frenzy moves to mishandle paralysis (#4680)
* [BUG] Added frenzy reset function during move phase should move be cancelled (#4227)

* Revert [P2 BUG] Fix since it does not work and is faulty

* [P2 BUG] Implemented correct frenzy Tag and Movequeue reset should frenzy move fail (#4277)

* Cleaned up Bug Fix using frenzyMissFunc

* Added automated test case for frenzy move edge case

* Improvement to frenzy move reset test case speed

* Fix test

* Add missing import

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-29 08:36:24 -07:00
AJ Fontaine 13377806ff
[Refactor] Change attack type booster names to enum (#4725) 2024-10-28 15:58:46 -07:00
PrabbyDD 3241332a3c
[Ability] Implementing Friend Guard (#4718)
* implementing friend guard ability

* Update src/data/ability.ts

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

* Update src/data/ability.ts

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

* Update src/data/ability.ts

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

* Update src/test/abilities/friend_guard.test.ts

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

* Update src/field/pokemon.ts

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

* more tests and fixing other issues

* more tests and fixing other issues

* Update Friend Guard test with damage mocks

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-10-28 13:49:04 -07:00
innerthunder b4cc9d7892
[Hotfix] Fix crash when Mist would block a stat drop (#4746)
* Fix crash when Mist would block a stat drop

* Bump version

* Bump version (again)
2024-10-28 14:02:10 +01:00
Moka 41380b39b9
[Hotfix] Fix manifest getting loaded before the game is initialized (#4739)
* Fix manifest being used before the game is initialized

* bump game version

* make manifest fix more future proof

* Revert "make manifest fix more future proof"

This reverts commit 32591b35d0.

* fix locales path for offline builds
2024-10-27 21:32:30 +01:00
PigeonBar dfb42e44a6
[Hotfix] Fix Eternatus egg tier (#4734) 2024-10-27 04:04:57 +00:00
innerthunder 9a56f080db
[Hotfix] Fix status damage triggering before berry usage (#4732)
* Fix status damage triggering before berry usage

* Bump version number

* Revert "Bump version number"

This reverts commit 64b194f5a7.

* Bump version number for real this time
2024-10-27 02:34:48 +00:00
Frederico Santos 908784b011 Merge branch 'main' of github.com:pagefaultgames/pokerogue into pokerogue-main 2024-10-26 22:43:47 +01:00
Frederico Santos a9a73863e8 Comment out startGame call on manifest fetch failure 2024-10-26 22:43:15 +01:00
Moka 22865c010a
fix oversight with save migration (#4731) 2024-10-26 22:16:37 +01:00
Frederico Santos 61193562f1 Updated date 2024-10-26 21:30:05 +01:00
Frederico Santos 51b2a4d7fe
Something (#4728)
* [Feature] Add event-based friendship multiplier and update TrainerConfig for event modifiers

* [UI][Dev] Improve event banner placement (#4726)

* [ui] automatically place event banner and timer in the title screen

* add new event banner

* ugh

* [Refactor] Clean up TrainerConfig and remove unused timed event

---------

Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
2024-10-26 17:14:17 +01:00
Smewkie 61cf937cab
[Balance] Ferroseed HA
Ferroseed HA
2024-10-26 00:38:12 +01:00
PigeonBar f87ac116fa
[Beta] Stop Transform giving copied moves negative fractional `ppUp` (#4722)
* [Beta] Stop Transform giving copied moves negative fractional `ppUp`

* Remove some bangs/etc

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-25 19:34:40 -04:00
innerthunder 414e0a5447
[Balance] Change Tyrogue to move-based evolutions (#4694) 2024-10-23 23:17:55 -07:00
Opaque02 a2419c4fc3
[Misc] Add admin for (un)linking 3rd party accounts (#4198)
* Updated admin panel to allow the concept of unlinking accounts

* Don't look too hard at this commit, nothing to see here

* Admin stuff

* Fixed linking and unlinking and updated menu options

* Undid some changes and cleaned up some code

* Updated some logic and added some comments

* Updates to admin panel logic

* Stupid promises everyone hates them and they deserver to die

* Promise stuff still

* Promises working thanks to Ydarissep on discord - pushing with debug code before it decides to stop working again

* Removed debugging code

* All discord functionality seems to be working here?? Not sure what happened but yay

* Fixed up some bugs and code

* Added registered date to the panel

* Fixed and updated some minor error message related stuff

* Minor changes

* Fixed some minor bugs, made the save related errors have error codes, and added updated icons

* Updated search field error

* Missed a couple of things to push

* Fixed linting and doc errors

* Revert dev related code and clean up dev comments

* Reverting utils

* Updating front end to match back end from Pancakes' comments

* make getFields and getInputFieldConfigs a single function of FormUiHandler

* remove outdated doc

* Apply suggestions from code review

Moka review changes

Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com>

* Added docs

* eslint fixes

* Fixed error not showing up in certain conditions

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: MokaStitcher <millennium.stitcher@gmail.com>
Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com>
Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2024-10-23 22:00:07 +02:00
Moka a13550ec44
[Balance][ME] Various ME Balance changes (#4700)
* balance changes and updates to various MEs

* fix import to new item

* fix import to new item

* Update src/data/mystery-encounters/utils/encounter-pokemon-utils.ts

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

* Update src/phases/select-modifier-phase.ts

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

* Update src/modifier/modifier.ts

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

* Update src/modifier/modifier.ts

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

* revert item atlas changes

* eslint

* revert 'revert item atlas'

* update locale repo to latest commit

* Fix fiery fallout missing argument

* [balance] Training session ME does not update Seen/Defeated GameStats

* [balance] update Weird Dream ME maximum spawn wave

* [ME] update CombinationRequirements to allow AND or OR combinations

* refactor: CombinationPokemonRequirement `.Some()` and `Every()`

* chore: rename `orRequirements` to `requirements`

* fix: returns of `Some()` and `Any()`

* apply `Some()` / `Any()` pattern to `CombinationSceneRequirement` too

* revert 'offer you can't refuse' giving Silver Pokeball'

* Apply code review suggestions

* [me] Weird Dream: apply same old gateau logic to team in options 1 and 2

---------

Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
Co-authored-by: ImperialSympathizer <110984302+ben-lear@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: innerthunder <brandonerickson98@gmail.com>
2024-10-23 21:46:57 +02:00
innerthunder c7e9eaf435
[P2] Fix binding, etc. not being removed when switching with Baton Pass (#4709)
* Fix binding, etc. not being removed when switching with Baton Pass

* New baton pass test
2024-10-23 11:24:50 -04:00
schmidtc1 958d79140c
[P2] Fixes Transform/Imposter not updating type/battle stat changes immediately; set move PP to 5 when transforming (#3462)
* Adds updateInfo to transform move/ability, mirrors Transform functionality in Imposter

* Implements functionality for reducing pp to 5 or less for each move when transforming

* Refactors to async/await pattern, adds back removed anims/sounds from last commit

* Eslint fix attempt

* Update src/data/ability.ts

per DayKev's suggestion

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

* Merge and fix conflicts

* Adds unit tests for pp-change with transform/imposter

* Updates to consistency in syntax/deprecated code

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-23 11:12:53 -04:00
NightKev fd38ab4cb4
[P2] Missing Minior form (violet) now spawns in the wild (#4711) 2024-10-23 11:10:43 -04:00
innerthunder 03025b2674
[P2] Fix various charge move bugs (#4595)
* Add charge move classes and phase

* Integrate `MoveChargePhase` in battle phase sequence

* Fix Protean + charge move interaction

* Fix effect chance applying to semi-invulnerability

* Remove `ChargeAttr` and fix ChargeAnim loading

* Restore move history entry for charge phases

* Gravity now cancels Fly, etc. after charge turn

* Dig integration tests

* Fly integration tests

* Dive integration test + fix Dive in Harsh Sun bug

* Solar Beam integration tests + `CHARGING` tag fixes

* Fix dive test

* Electro Shot integration tests

* fix import in MoveChargePhase

* Electro Shot Multi Lens test

* Geomancy integration tests

* Fix duplicate move queue

* Update import

* Docs + Fix Meteor Beam being boosted by Sheer Force

* Fix volt absorb test

* Apply PigeonBar's suggested move-phase changes

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

* Make Electro Shot Sheer Force boosted again

* Apply PigeonBar's feedback pt. 2

* Apply suggestions from code review

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

* Fix mistimed/dupe showMoveText and leftover TODO

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
2024-10-23 11:08:40 -04:00
Moka 16b7194366
[P3] Fix Egg Summary not showing new abilities in blue (#4712) 2024-10-23 11:05:13 -04:00
bjparker1226 a0baf89297
[P2] Fix dark deal reducing transformed Pokemon's held item stack to 1 (#4707) 2024-10-23 11:04:37 -04:00
NightKev 1ad4f3b376
[Test] Add `STATUS_ACTIVATION_OVERRIDE` to `overrides.ts` (#4689)
This applies to Paralysis and Freeze

Added Paralysis test to demonstrate usage

- Consolidate `this.cancel()` calls
2024-10-22 23:11:02 -04:00
Blitzy 0fe57b44b5
[Balance] Add Exclusive Moves from Prior Evolutions via Memory Mushroom (#4681) 2024-10-22 18:13:10 -07:00
damocleas 96e5f2d763
Starmobile Stat Adjustments (#4704)
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
2024-10-22 18:07:28 -07:00
Mumble 5e7f2042fc
[UI][QoL] Cursor defaults to Fight at the start of each new wave (#4666)
* cursors are dumb

* update

* fixed?

* maybe solution

* fix in!

* Possible cursor fixes

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: Opaque02 <66582645+Opaque02@users.noreply.github.com>
2024-10-22 13:05:37 -07:00
NightKev 181f59882a
[P2] Fix Early Bird (#4632)
* Fix Early Bird, add tests

* Update tsdocs for Early Bird's `AbAttr`

Rename `turnCount` to `toxicTurnCount` and
`turnsRemaining` to `sleepTurnsRemaining` in `status-effect.ts`

* Fix Toxic Orb test

* Redundant code :despair:

* Fix status override to set the number of sleep turns
2024-10-22 12:37:13 -04:00
Mason S 7066a15ceb
[Refactor] Added `BattlerTagLapseType.AFTER_HIT` (#3655)
* [Refactor] Added ON_GET_HIT BattlerTagLapseType

Adjusted BeakBlastChargingTag and ShellTrapTag to use new lapse type

Adjusted MoveEffectPhase to now lapse all tags with the ON_GET_HIT lapse type

* [Refactor] Added ON_GET_HIT BattlerTagLapseType

Adjusted BeakBlastChargingTag and ShellTrapTag to use new lapse type

Adjusted MoveEffectPhase to now lapse all tags with the ON_GET_HIT lapse type

* Fix nits

* Rename `ON_GET_HIT` to `AFTER_HIT`

Change `isOpponentTo` to `isOpponent`

* Fix a couple minor nits

* Remove single-use function

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-21 23:53:00 -07:00
innerthunder c2eb9de9df
[Ability] Partially Implement Infiltrator (does not work with mist) (#4636)
* Implement Infiltrator

* Integration tests + Infiltrator is (P) again

* Fix screen tests

* Fix `hitsSubstitute`

* docs for Infiltrator attr
2024-10-21 21:41:25 -04:00
PrabbyDD 467841d167
[P2] Nightmare triggers at turn end instead of after move (#4702) 2024-10-21 21:33:41 -04:00
NightKev f7797603a1
[P2] Fix oversight where hazards cannnot affect Pokemon that set it (#4693)
Fixes #935
2024-10-21 11:03:12 -04:00
NightKev 966b07f62b
[Misc] Shiny overrides can now force Pokemon to not be shiny (#4699)
Also fixes random shinies breaking tests
2024-10-21 11:00:58 -04:00
innerthunder f51814467a
[P3] Fix mistimed sound effect in `LearnMovePhase` (#4698) 2024-10-21 10:59:23 -04:00
NightKev b76e54fe7f
Replace duplicate code with `getDoubleBattleChance()` (#4690) 2024-10-21 02:29:21 -07:00
MokaStitcher e6c06d57be
[P All][Bug] Various ME bugfixes (copy) (#4695)
* 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>
2024-10-20 22:55:07 +01:00
NightKev 39abac65be
Add eslint rule to enforce indenting of `case` statements (#4692) 2024-10-20 02:44:36 +01:00
PigeonBar de64fd7720
[Misc] [Beta] Fix crash when loading save preview with Mystery Encounter Override active (#4683) 2024-10-17 23:52:46 -04:00
MokaStitcher c5b3220b86
[Beta P3][UI] Fix item/cursor placement in reward screen (#4678) 2024-10-17 13:46:51 -04:00
Mumble 2f212f52eb
fixed effectChanceOVerrride location + removed ability tags (#4677)
Co-authored-by: frutescens <info@laptop>
2024-10-16 23:31:30 -07:00
Amani H. 85b8ca6467
[Dev] Bump Game Version, Overhaul Version Migration (#4388)
* Bump Version, Remove "Outdated" Message

* Fix `src/ui/ui.ts`

* Fix `src/system/game-data.ts`

* Clean Up & Organize Version Migration

* Rename Methods & Session Migration Adjustment

* Collapse Version Migrators to Single File as Arrays

* Address NITs

* Restructure Migration Initialization

* Fix Spacing, Increment to v1.6.0

* Revert Back to v1.1.0

* Add `gameVersion` to Mocked Game

* Add More Documentation

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-17 00:48:28 +01:00
Madmadness65 afebecd43c
[P2 Bug] Fix pool entry for Jynx not using baby species (#4675) 2024-10-16 17:16:10 -05:00
NightKev d92d63e81f
[Misc] Restore info comment that was accidentally removed (#4674) 2024-10-16 16:10:19 -04:00
AJ Fontaine d5fee37868
[Refactor] Add friendship related constants (#4657)
* Add constants for friendship

* Absolute path in battle-scene.ts

* Address nits

* Apply negative to constant
2024-10-16 14:55:23 -04:00
PigeonBar 1907824670
[P1] Fix party UI crash from unsanitized `lastCursor` pointing to empty Pokemon slot (#4672) 2024-10-16 11:10:35 -04:00
PigeonBar 72c08e5cfd
[Refactor] Clean up commented safari zone code from #4661 (#4671) 2024-10-16 11:09:48 -04:00
Mumble 2caa09f246
[Move] Fully Implement Secret Power (#4647)
* initial work

* move go

* biomes for damo

* more cleanup

* added effect for space

* test

* balance change 1

* i'm silly

* fixed effect cahnce

* secret power atr

* Apply suggestions from code review

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

* got tests to work + added final balance biomes

* added documentation

* Apply suggestions from code review

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

* Update src/data/move.ts

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

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-16 10:38:12 -04:00
PigeonBar c6ec01958c
[Bug] Fix for Expert Breeder's Pokemon being invisible and IV scanner in safari zone (#4661)
* [Bug] Potential fix for Expert Breeder's Pokemon being invisible

* PR Feedback

* Consistency with await
2024-10-16 10:31:32 -04:00
PigeonBar 50ff6e703a
[P1 Bug] Fix several Destiny Bond crashes (#4665)
* [P1 Bug] Fix several Destiny Bond crashes

* PR Feedback
2024-10-16 10:30:38 -04:00
innerthunder 093f3d90f5
[Balance] Add Memory Mushroom to Shop (#4555)
* Add Memory Mushroom to Shop + escape TM selection

* consolidate learn move type params into an enum

* Rewrite lock capsule test

* Disable luck upgrades for copied SMPhases

* Mem Mushroom Cost 4x Update modifier-type.ts

* Add undefined cost check to `addModifier`

* Increase shop options row limit

* Prevent SMPhase copies from updating the seed

---------

Co-authored-by: damocleas <damocleas25@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-15 18:06:56 -07:00
Madmadness65 c04d81bd65
[Ability] Allow Power Construct to transform 10% PC Zygardes (#4626)
* Allow Power Construct to transform 10% PC Zygarde

* Add additional test for 10% PC Zygarde
2024-10-15 15:02:30 -04:00
innerthunder 1966335627
[Refactor] Add type inference and support for simulated calls to `ArenaTag.apply` (#4659)
* Add simulated support for Arena Tag application

* Add type inference to ArenaTag.apply

* Fix screen tests

* back to `any` again lol

* fix missing spread syntax (maybe)

* updated docs

* named imports for `Utils`
2024-10-15 13:13:54 -04:00
Mumble d01d856898
[Refactor] Default case to display challenge name (#4656)
Co-authored-by: frutescens <info@laptop>
2024-10-15 10:05:21 -04:00
PrabbyDD 21b71595e0
[P2] Attacks that miss against pokemon in semi invul state that have abilities such as volt absorb will not trigger (#4663)
* fixing issue where abilities trigger in semi invul state

* fixing targets
2024-10-15 10:04:26 -04:00
innerthunder d5f87bbea7
[P3][Beta] Fix missing move text when a move fails (#4664)
* Fix missing move text when a move fails

* Use `cancel` function instead of setting `this.cancelled`
2024-10-15 10:02:02 -04:00
Blitzy bb98bc2f8e
[Balance] Evil Team Update / Penny Adjustments (#4577)
* Update trainer-config.ts

* Update trainer-config.ts

* Update trainer-config.ts

* Fixed Flare Grunt's having Noivern > Noibat

* Revert Inkay change, Change Penny

* Give Admin aces canonical genders

* Update trainer-config.ts

* Update trainer-config.ts

---------

Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
Co-authored-by: damocleas <damocleas25@gmail.com>
2024-10-15 02:17:20 -07:00
NightKev e962ac1f18
[Beta Bug] Prevent duplicate move failure message (#4662) 2024-10-14 17:47:23 -04:00
cadi e7a4d4055f
[Move] Implement Power Trick (#2658)
* add `PowerTrickTag`

* modify getStat() with PowerTrickTag

* implement `PowerTrickAttr`

* add unit test

* enhance docs and tag apply logic

---------

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
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: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-14 12:39:34 -07:00
MokaStitcher 676322e800
[QOL] Add input delay for skipping egg summary (#4644) 2024-10-14 10:42:59 -04:00
Mumble 8981f0e7a8
Trainer party de-duplication checks static pokemon too (#4585)
Co-authored-by: frutescens <info@laptop>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-10-13 19:20:55 -07:00
PigeonBar e340abe75d
[P1 Bug] Fix softlock when a phazing attack activates a reviver seed (#4654)
* [P1 Bug] Fix softlock when a phazing attack activates a reviver seed

* Polishing tests

* Change approach to respect Parting Shot's targeting

* Tests: Added checks for correct number of Pokemon on field
2024-10-13 20:08:47 -04:00
Mumble 8a355d500a
[Bug] Move Restriction Battler Tag bugs (#4536)
* Added fixes

* Revert "Added fixes"

This reverts commit 3feccd792d.

* Added loadTag functions

* Fixes

* typeodcs

* Torment

* yawn

* hsldklahdlhalhdlahldhlah

* Imprison Fixes

* Fixed imprison not interrupting PRE_MOVE

* just kidding

* Apply suggestions from code review

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

* Fixing what broke

* added scp[es

* missed a scope

* Update src/data/battler-tags.ts

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

* good tp go

* merge

* battler tags

* Apply suggestions from code review

* Changed function names

* publics

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-13 03:30:04 -04:00
innerthunder 470f9e4e19
[P3] Fix Substitute visual error on wave transition (#4648) 2024-10-13 00:46:41 -04:00
Tempoanon 391f38c3c8
[Documentation] Document all (P) abilities (#4649)
* Document partial abilities

* Fix typo

* Address comments

* Fix typo Terapagos -> Ogerpon

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-13 00:45:38 -04:00
damocleas 8e7aea0f89
Fixed Charizard and Kingler BST, fixed ability indexing for gmax forms (#4652) 2024-10-13 04:51:14 +01:00
Tempoanon caf29e2ce3
[Documentation] Document all (P) moves (#4650)
* Document all (P) moves

* Fix some typos

* Fix more typos

* Address innerthunder comments

* Add circle throw and dragon tail (P)
2024-10-12 23:42:20 -04:00
PrabbyDD ebb7612999
[Bug] Stat Stages are now changed individually instead of all at once (#4457)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
2024-10-12 15:29:36 -07:00
PigeonBar 2ac688de4b
[Misc] More complete phase logging (#4651) 2024-10-12 13:06:26 -07:00
PigeonBar b7eb95b761
[Test] Fix several flaky tests (#4639) 2024-10-12 11:22:26 -04:00
Mumble cfb92b4e08
[Move] Telekinesis + [Bug] Ingrain (#4506)
* some early set up

* localization

* Added Wiglett family to restrictions

* Added Smack Down + 1000 Arrows Interactions

* Added checks for certain tags

* Gravity removes telekinesis from all pokemon on the field

* need to check something else real quick

* mmmmmm

* think this is fine?

* ingrain fixes

* more ingrain

* Telekinesis Test + Move Fix

* Test Name change

* another day another try...

* Test Cleanup

* fsfdsfds

* Revert "fsfdsfds"

This reverts commit cb7abcfd9f.

* whoops

* Apply suggestions from code review

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

* Missed one

* Update src/data/move.ts

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>

* Apply suggestions from code review

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

* Add separate battler tags in move attr

* Update src/data/battler-tags.ts

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

* removed onRemove

* Documentation

* Update src/data/battler-tags.ts

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-10-11 17:44:16 -04:00
innerthunder 7645d5042d
[P3] Fix "falsex" type hint for Sheer Cold against ice types (#4638)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-11 16:09:15 -04:00
MokaStitcher 89d7e7ea65
[P3][UI] Fix tooltip bugs in Starter Select screen (#4641)
* [UI] Fix candy friendship tooltip bug in Starter Select

* [UI] remove tooltip when exiting starter select screen
2024-10-11 15:46:00 -04:00
Mason S 70b9a43c8b
[P2] Fix first-turn status damage and arena hazards (#3528)
* [Bug] Toxic Spikes implementation issues fixed

Adjusted MoveEffectPhase.start() so that ENEMY_SIDE targeted moves no longer occur twice per use in double battles.

Updated Toxic Orb test to no longer expect a tick of damage turn 1.

Fixed Toxic/Poison dealing damage immediately when applied.

Fixed Hazards not persisting through save

Added unit tests

Fixed flyout not displaying correct number of Spikes/Toxic Spikes after a refresh

* Update Toxic Orb test

* Updates Toxic Spikes tests

* Apply suggestions from code review

* Fix merge issues

Replace `integer` with `number` in `arena-tag.ts`

* Remove partial Magic Bounce implementation

* Remove stray newline

* Remove extra change in safeguard test

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-11 10:41:54 -04:00
MokaStitcher 4f456339f4
[UI] Remove score display in voucher menu (#4616) 2024-10-11 10:26:47 -04:00
MokaStitcher 80a784ac8d
[P3 Beta][UI] Fix loading behavior introduced with save preview (#4633)
* [ui] partially revert loading behavior introduced with save preview

* [beta][ui] fix scrolling issue in Load Game menu
2024-10-11 10:24:53 -04:00
NightKev 407cd65dcb
[Misc] Enemy item override will now apply to all enemies (#4620)
* Enemy item override will now apply to all enemies

* Update tsdocs
2024-10-11 00:20:28 -07:00
Amani H. 3f63c147a3
[P3] Fix "Stat Won't Go Any Lower/Higher" Not Appearing (#4635) 2024-10-10 12:44:51 -07:00
NightKev 5d0b361320
[P2] Syrup Bomb effect is removed when user leaves the field (#4606)
* Syrup Bomb's effect expires when the move user leaves the field

* Add test

* Remove check for the affected pokemon being switched out
2024-10-10 13:19:05 -04:00
ImperialSympathizer 6ad5ba972c
[Enhancement] Refactor Starter Species to use separate EggTier map (#4591)
* creates table for tracking species egg tiers

* creates table for tracking species egg tiers

* rename EggTier enum values

* replace clamp util function with Phaser function

---------

Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
2024-10-10 09:29:26 -07:00
Adrian T. 0996789ee6
[Refactor] Improve typing in `phaseInterceptor.ts` (#4560)
* improve typing in phaseInterceptor

* add more param typings

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-10 11:54:43 -04:00
NightKev ba7e26152e
[Bug] Fix substitute interactions with `PostDefendAbAttr`s (#4570)
* Fixes some Substitute interactions

Specifically with Disguise/Ice Face and Gulp Missile

* Add tests

* Fix linting

* Add `hitsSubstitute()` checks to all `PostDefendAbAttr`s

Also fix comment indentation in `MoveEffectPhase`

* Revert `move-effect-phase.ts` changes
2024-10-10 11:45:02 -04:00
Mumble a778537cca
[P2] Sketch Failure Bug involving multiple Sketch-s in a moveset (#4618)
* Sketch bug fix

* Added test

---------

Co-authored-by: frutescens <info@laptop>
2024-10-10 11:43:50 -04:00
PigeonBar 64147e4414
[P2] Fix Battle Bond continuing to affect Water Shuriken after Greninja returns to base form (#4602)
* [Bug] Fix Battle Bond continuing to buff Water Shuriken after Greninja returns to base form

* Test cleanup

* PR feedback

* Update test to use getMultiHitType()

* PR Feedback
2024-10-10 11:40:14 -04:00
Mumble 51894d46c2
[P2] Pollen Puff ally behavior fixed (#4615)
* pollen puff fix

* bcvbvcbfd

* integerholder to numberholder

* moved it back

---------

Co-authored-by: frutescens <info@laptop>
2024-10-10 11:38:17 -04:00
Mumble e9906ea229
[P2] Obstruct/Kings Shield/etc no longer reduce stats through Clear Body/etc (#4627)
* bug fix

* Add test

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-10 11:31:10 -04:00
NightKev 52257def2f
[P3] Fix enemy used PP flyout, fixes #4622 (#4629)
Also add missing function return types
2024-10-10 11:30:19 -04:00
PigeonBar ca3cc3c9c6
[P1 Bug] Fix infinite recursion from abilities disabled by Sheer Force (#4631) 2024-10-10 11:28:26 -04:00
flx-sta f180b6070e
[Qol] Load i18n en locales during tests (#4553)
* add: i18n backend support

the backend is being supported by using msw which will import the correct file from the local locales folder

* fix: tests to no longer rely on static i18n keys

* Update src/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts

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

* Update src/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts

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

* Update src/test/ui/type-hints.test.ts

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

* Update src/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts

Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com>

* Fix typos

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

* Fix linting

* update locales submodule

update reference to `56eeb809eb5a2de40cfc5bc6128a78bef14deea9` (from `3ccef8472dd7cc7c362538489954cb8fdad27e5f`)

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
2024-10-09 13:01:49 -07:00
Mumble ffe941d235
[Feature][UI] Save Preview (#4410)
* Making 3 Option UI real

* idk anymore

* Revert "Making 3 Option UI real"

This reverts commit beaad44c1e.

* Let's see

* Current issues - scrolling upwards and correct cursor landing

* argh

* Fixed reactive scrolling

* Adding ME handling

* set up descriptions

* Cleaned up UI i think

* stupid alder

* Added double trainer handling + changed enum name

* Apply suggestions from code review

Thank you Moka!

Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com>

* Arrow Visibility now depends on Session Slot hasData

* documentation

* Simplified calls to revertSessionSlot + changed function name per feedback

* Fixed scrollCursor issue.

* added comment

* Update src/ui/save-slot-select-ui-handler.ts

Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com>

* Fixed sound played + added better conditional

* Balance Team....

* ME related changes

* Apply suggestions from code review

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

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

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

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

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

* Sending Doubles-fix

* eslint..

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-09 15:04:13 -04:00
MokaStitcher d2c579cf2a
[P2] Prevent generating Pokemon with duplicate IDs in daily runs (#4623) 2024-10-09 14:32:20 -04:00
MokaStitcher deb2035610
[Beta][P2] Fix Grip Claw (#4614)
* [Beta][P2] Fix Grip Claw

* Add test for Grip Claw

* [test] improve grip claw's test readability

* PR feedback

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-09 14:30:28 -04:00
flx-sta d8c914c768
[Beta P3] Fix i18n namespaces map for `mysteryEncounterMessages` from `mystery-encounter-messages` -> `mystery-encounter-texts` (#4617)
Something I missed in #4611
2024-10-08 13:44:23 -04:00
flx-sta 39cebb76d0
[Bug] i18n messages files fix (#4611)
* fix matching for i18n messages files

* update public/locales head
2024-10-08 13:30:48 -04:00
MokaStitcher 57a967890a
[Offline P1] Fix wrong local save being deleted when creating a new run (#4598) 2024-10-08 11:11:21 -04:00
MokaStitcher 0ede7b057d
[P3][UI] Fix egg gacha overlay not getting cleared properly (#4600) 2024-10-08 11:10:54 -04:00
MokaStitcher 6e10f6600f
[P2] Fix damage achievements not awarding (#4613) 2024-10-08 11:08:25 -04:00
NightKev a1ca7e632b
[Move] Triple Arrows effect chance for stat change is now 50% (#4543)
* Triple Arrows effect chance for stat change is now properly 50%

* Add tsdocs to `StatStageChangeAttr`

* Add test for Serene Grace interaction

* Fix linting

---------

Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
2024-10-08 05:32:51 -07:00
Acelynn Zhang f5fa478eb8
[P1] Fix crash when starting a challenge run after revisiting challenge select screen (#4603)
Ensure EncounterPhase initializes correctly at the start of the game
after revisting the challenge selection screen.

Fixes #4520
2024-10-07 12:01:15 -04:00
AJ Fontaine a259ccfc34
[Beta][Test] Fix Scale Shot flaky test (#4564)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
2024-10-06 20:29:57 -07:00
NightKev c01fff49c4
[Beta P1] Fix regression in Metal Burst caused by #3974 (#4589)
Also adds a regression test for the scenario
2024-10-06 17:31:11 -04:00
ImperialSympathizer a7157bbe9a
fix shop option cursor indexing (#4601)
Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
2024-10-06 13:51:34 -07:00
innerthunder f629a3e453
[P2] Stop G-Max Pokemon from evolving (#4581) 2024-10-05 19:52:53 -04:00
flx-sta 42b75e8440
[Qol] Make i18n money formatter controlled by translators (#4550)
* fix: i18n money formatter

* fix wrongful console.warn on i18n money formatter

* update locales submodule

update reference to `56eeb809eb5a2de40cfc5bc6128a78bef14deea9` (from `3ccef8472dd7cc7c362538489954cb8fdad27e5f`)
2024-10-05 23:01:41 +02:00
Xavion3 f562a76332
Make repeat abilities not stack (#4588)
If due to fusions you have the same ability as both passive and normal, it'll no longer stack with itself.
2024-10-05 15:10:32 +08:00
innerthunder c99df9712a
[Move] Implement Ion Deluge (#4579) 2024-10-04 17:23:20 -04:00
MokaStitcher 1947472f1c
[P3] Fix start button cursor not being cleared properly in starter select (#4558) 2024-10-04 16:47:12 -04:00
NightKev d362456501
[P2] Diamond Storm should only trigger once when hitting multiple pokemon (#4544)
* Diamond Storm should only trigger once when hitting multiple pokemon

* Also fix Clangorous Soulblaze just in case

* Fix linting

* Fix linting

Oops missed this one
2024-10-04 16:29:20 -04:00
innerthunder 27537286b9
[Move] Implement Electrify (#4569)
* Implement Electrify

* ESLint

* Fix docs
2024-10-04 16:24:52 -04:00
innerthunder 0bd4d6c86b
[Move] Fully Implement the Pledge Moves (#4511)
* Implement Fire/Grass Pledge combo

* Add other Pledge combo effects (untested)

* Fix missing enums

* Pledge moves integration tests

* Add turn order manipulation + more tests

* Safeguarding against weird Instruct interactions

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

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

* Fix style issues

* Delete arena-tag.json

* Update package-lock.json

* Use `instanceof` for all arg type inference

* Add Pledge Move sleep test

* Fix linting

* Fix linting

Apparently GitHub has a limit on how many errors it will show

* Pledges now only bypass redirection from abilities

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-04 16:20:37 -04:00
AJ Fontaine 75bd730c04
[Balance] Fix TM compatibility on forms, Tera Blast on Indigo Disk mons (#4568)
* Fix TM compatibility on forms, Tera Blast on Indigo Disk mons

* Additional single strike moves

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-04 10:55:37 -04:00
NightKev 22442d3aa0
[Refactor] Refactor move phase and add documentation (#3974)
* Refactor `MovePhase` to improve readability/maintainability

Add tsdocs/comments all over

Mark all functions/fields with public/etc

Fix multi-hit moves called from Metronome/etc, fixes #3914

Remove unused function `BattleScene.pushMovePhase`

Don't use failure text as a condition for move success
A move defining potential failure text doesn't mean it failed

Replace relative imports with absolute imports in `battle-scene.ts`

Change some fields from optional to default `false`

* Fix Whirlwind test

* Fix linting
2024-10-04 10:50:03 -04:00
PigeonBar 2bc5f50154
[Test] Fix some test flakiness involving `doKillOpponents()` (#4571)
* [Test] Fix some test flakiness involving game.doKillOpponents()

* PR Feedback

* Fix linting

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-04 10:42:20 -04:00
EmberCM 38c682cca7
[QoL] Add fusion options to overrides (#4298)
* Add fusion options to overrides

* Add fusions overrides to overridesHelper

---------

Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-10-03 23:04:50 -07:00
torranx 644c078a6c add new lint rules....again 2024-10-04 13:08:31 +08:00
Lneacx 74ea358f18
[Beta] Fix hit check so Poison-types do not brick semi-invuln. (#4567) 2024-10-03 23:45:53 -04:00
Acelynn Zhang 9c56c15a6c
[P3] Fix persisting sleep animation when sprite is already loaded (#4562)
Ensure that a Pokémon's animation speed is reset properly after saving
and quitting. Previously, if a Pokémon was put to sleep, which slows
its framerate, saving and quitting would result in the slower framerate
persisting even though the Pokémon was no longer asleep. This fix adds
an else condition to reset the frameRate to 12 if the sprite is already
loaded upon resuming the game.

Fixes #4465
2024-10-03 17:23:04 -04:00