Commit Graph

3701 Commits

Author SHA1 Message Date
NightKev fec218b747
[Refactor] `setTypeIcons` explicitly handles `null`, mark it as such (#4155) 2024-09-11 20:59:57 -04:00
NightKev d4cd74c8b7
[P2 Bug] Baddy Bad shouldn't activate Reflect if the target uses Protect, make gravity and water/mud sport ignore protect(#4180) 2024-09-11 20:58:21 -04:00
Amani H. a6d5fc66f2
[Balance] Disable Eviolite for G-Max Pokémon (#4184)
* [Balance] Disable Eviolite for G-Max Pokémon

* Add Documentation
2024-09-11 20:56:58 -04:00
Jannik Tappert b33d86a1db
[BUG] Make Tate & Liza have seeded randomness #4175 2024-09-11 13:55:13 -07:00
NightKev ce9a75f074
Replace `vi.fn()` with `() => null` whenenver possible (#4182) 2024-09-11 13:54:42 -07:00
Lugiad 89dac46dfc
[Localization] Localization batch - [Not meant to be merged until last minute] (#4127)
Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
Co-authored-by: José Ricardo <josefleury@discente.ufg.br>
Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>
Co-authored-by: Asdar <asdargmng@gmail.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: DanStevensonx <114961842+DanStevensonx@users.noreply.github.com>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: SangaraSorama <100420976+SangaraSorama@users.noreply.github.com>
2024-09-11 13:46:26 -07:00
NightKev 9f82d796d3 Merge branch 'main' into beta 2024-09-11 07:29:18 -07:00
Leo Kim e657322294
[Enhancement] Update instruction for gamepad in run history UI (#4053)
* update instruction for pad in run history UI

* move getGamepadType function to ui.ts

* Update src/ui/ui.ts

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

---------

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
2024-09-10 23:45:53 -04:00
Amani H. 4808c07cf9
[Hotfix] Fix System Data Conversion Failure 2 (#4159) 2024-09-10 23:05:48 +01:00
flx-sta 14ace40634
[Misc] eslint rule to prevent `.js` imports (#4160)
* add `eslint-plugin-import-x` module

* add import eslint rules

* remove .js extensions

* rename account.spec to account.test

* move fontFace.setup into `setupFiles`

instead of importing it in `vitest.setup.ts`
2024-09-10 22:34:50 +02:00
MokaStitcher d1b058fe3e
[UI] fix candy upgrade icon not updating after purchasing eggs (#4153) 2024-09-10 14:00:50 -04:00
AJ Fontaine 150ab3d1b2
[UI/UX] Make "CH-CHING!" sound when unlocking passive (#4151)
* Make "CH-CHING!" sound when unlocking passive

* Remove unused parameters in line above sound
2024-09-10 11:54:23 -04:00
Amani H. bd4729b4c5
[Hotfix] Fix Lapsing Modifiers Not Rolling (#4152) 2024-09-10 16:53:40 +01:00
PigeonBar 5bf21a4f75
[Bug] Fix rare egg move and species rates for Manaphy eggs (#4125) 2024-09-10 10:15:07 -04:00
Madmadness65 4b8083211a
[P3 Bug] Fix Transform SFX not playing on quiet form changes (#4144) 2024-09-10 10:13:16 -04:00
MokaStitcher 9c4c19b5fb
[UI Bug] Fix HA icon not always showing in egg summary screen (#4150) 2024-09-10 10:12:17 -04:00
James Diefenbach 7dd1832072
[Hotfix] fix UI transition causing unusual freezes after egg summary shown (#4126)
* console logs n stuff

* fix bad ui transition for egg summary freeze bug (logs included)

* cleanup egg lapse phase

* touchup

* add back removed whitespace

* remove console logs

---------

Co-authored-by: James Diefenbach <z5421232@ad.unsw.edu.au>
2024-09-10 14:23:13 +01:00
Amani H. ebb09dda34
[Hotfix] Fix Lures Refreshing on Reload (#4146) 2024-09-10 10:37:23 +01:00
Raidette a919b9c0af
[Move] Implement After You (#1789)
* Complete after you implementation (no localization)

* reset override changes

* Remove hardcoded English text, add tests

* Fix test

* Make sure phases occur in the correct order

* fix after-you issues

- fix i18n interpolation ot state "target name" and not "pokemon name" as the target takes the offer, not the user
- fix some tsdocs
- add override to apply
- update scene.findPhase to be able to use generic types. Add tsdocs

* add move-trigger.afterYou for DE

* fix after_you.test.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-09 14:35:04 -07:00
Adrian T. e959595471
[Test] Fix throat chop and gorilla tactics tests (#4140) 2024-09-09 16:03:29 -04:00
Jannik Tappert d9a8448c6e
[Enhancement] Added the ability to localize the tera type hover text (#4138) 2024-09-09 15:57:07 -04:00
Adrian T. a82d64b5b5
[Ability] Implement Gorilla Tactics (#4051)
* fully implement gorilla tactics

* fix atk increase

* update oversight

* add showAbility param

* fix postmerge

* fix postmerge

* update tests
2024-09-09 15:41:53 -04:00
Brandon Bay 9317093044
[Enhancement] [UI/UX] Add ability and passive tooltips to starter select screen (#4023)
* Add ability and passive tooltips to starter select screen

* Remove explicit casts to BattleScene

* Increase tooltip size, reverse y when necessary, and always show passive tooltip

* Add ability name to tooltip title and persist tooltips between Pokemon

* Use vi function mocks
2024-09-09 15:07:00 -04:00
Adrian T. 9afab182e9
[Test] Remove obsolete splash_only (#4139) 2024-09-09 15:02:11 -04:00
Taylor Le Lievre 8df7422e8f
[Bug] Primal weather no longer persists if last mon dies to indirect damage (#3492)
* Fixed Delta Stream remaining active when last mon dies to indirect damage

* Rebasing changes

* Linting fix

* Combined if statements

* Changed params to optional

* Added unit test

* Apply suggestions from code review

* Fix test and remove `.js` from import

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-09-09 12:59:58 -04: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
Adrian T. c59f6edf36
[Move] Implement Power Shift (#4083)
* fully implement power shift

* cleanup
2024-09-09 12:54:31 -04:00
Leo Kim 80e347840d
[Bug] Fix line spacing in level up stats and move info in Japanese (#4095) 2024-09-09 12:54:17 -04:00
NightKev 89b33466a9
[Test] Fix Safeguard test that relied on a now-fixed bug (#4098) 2024-09-09 12:53:45 -04:00
Adrian T. 3c05237b2e
[Move] Fully implement Throat Chop (#4115)
* fully implement throat chop

* add linkcode in docs

* address comments

* update test
2024-09-09 12:52:20 -04:00
José Ricardo a88b989939
[Localization] [pt_BR] Updated some translations (#4131) 2024-09-09 12:50:47 -04:00
Chapybara-jp e84fe8c24e
[Localisation] [JA] Translated/updated spacing in several files, fixed Ice Face bug (#4129)
* Update ability-trigger.json

* Update ability.json

* Update arena-flyout.json

* Update arena-tag.json

* Update battle.json

* Update fight-ui-handler.json

* Update berry.json

* Update menu.json

* Update party-ui-handler.json

* Update starter-select-ui-handler.json

* Update tutorial.json

* Update move.json

* Update battle.json

* Update arena-flyout.json

* Update arena-flyout.json

* Update arena-tag.json

* Update party-ui-handler.json

* Update settings.json
2024-09-09 12:50:30 -04:00
Mumble 26eb63cf67
[Refactor] Cleaning up Learn move phase (#3672)
* Learn Move Phase rewrite

* Typedocs

* messages with confirm do not need an extra button press no more

* Added Documentation

* This does not work

* so sad

* Some updates

* Eslint issues + clean up

* Additions to handle learning during evolution + test fixes

* some more checks

* Update src/overrides.ts

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

* Update src/test/phases/learn-move-phase.test.ts

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

* Added new function and updated tests

* Fixed bracketing and added parameter types

* Added Sketch to the conditional

* Added some fixes. Weird stuff going on.

* Whoops

* async implementation done

* Update src/phases/learn-move-phase.ts

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

* Apply suggestions from code review

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

* Made showText=> summary a promise

* adapt learn-move-phase to `async-await`

* await add

---------

Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-09-09 09:11:46 -07: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
Adrian T. 06f98f6737
[Bug] Fix console error from undefined stockpilingTag (#4118) 2024-09-08 20:50:47 -07: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 a30201f185
[Hotfix] Retrieving the correct form index for correct cry keys (#4121)
* [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>

* returned main

* Fixed cry key

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

This reverts commit 675e6a0635.

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

This reverts commit 45af0dd170.

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

This reverts commit e12548cdb0.

---------

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 22:12:37 -04:00
Amani H. 38cb10ff97
[Hotfix] Fix System Data Conversion Failure (#4123) 2024-09-09 02:50:00 +01:00
Opaque02 93d6375894
Updated all fields (except passwords) to allow for 20 characters (#4119) 2024-09-09 00:57:44 +01: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
Lugiad df250c8b90
[Localization] New translations batch locales (Move-disabling effects, abilities triggers, error messages and some misc ajustements) (#4068)
* Update battle.json

* Update battler-tags.json

* Update battle.json

* Update battle.json

* Update battler-tags.json

* Update battle.json

* Update battler-tags.json

* Update battler-tags.json

* Update battle.json

* Update battle.json

* Update battler-tags.json

* Update battler-tags.json

* Update battle.json

* Update battle.json

* Update battler-tags.json

* Update battler-tags.json

* Update battle.json

* Update battle.json

* Update battler-tags.json

* Update battle.json

* Update battle.json

* Update battle.json

* Update battler-tags.json

* Update battle.json

* Update battle.json

* Update src/locales/de/battle.json

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

* Update src/locales/de/battler-tags.json

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

* Update battler-tags.json

* Update src/locales/ko/battle.json

Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>

* Update src/locales/ko/battler-tags.json

Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>

* Update src/locales/it/battle.json

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

* Update src/locales/it/battler-tags.json

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

* Update menu.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update menu.json

* Update menu.json

* Update menu.json

* Update menu.json

* Update menu.json

* Update menu.json

* Update menu.json

* Update menu.json

* Update src/locales/de/ability-trigger.json

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

* Update src/locales/de/ability-trigger.json

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

* Update src/locales/de/menu.json

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

* Update src/locales/ko/ability-trigger.json

Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>

* Update src/locales/ko/menu.json

Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>

* Update src/locales/ko/ability-trigger.json

Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>

* Update src/locales/ko/menu.json

Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>

* Update menu.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update ability-trigger.json

* Update menu.json

* Update ability-trigger.json

* Update battle.json

* Update battler-tags.json

* Update src/locales/zh_CN/battle.json

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Update src/locales/zh_TW/battle.json

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update menu.json

* Update battler-tags.json

* Update battle.json

* Update ability-trigger.json

* Update battler-tags.json

* Update battler-tags.json

* Update battler-tags.json

* Update battler-tags.json

* Update modifier-type.json

* Update menu.json

* Update battle.json

* Update tutorial.json

* Update tutorial.json

* Update egg.json

* Update battle.json

* Update battle.json

* Update tutorial.json

* Update egg.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update modifier-type.json

* Update challenges.json

* Update src/locales/ko/modifier-type.json

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

* Update src/locales/ko/modifier-type.json

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

* Update src/locales/ja/battle.json

Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>

* Update src/locales/ja/menu.json

Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>

* Update src/locales/ja/modifier-type.json

Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>

* Update src/locales/ja/modifier-type.json

Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>

* Update src/locales/ja/modifier-type.json

Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>

* Update dialogue.json

* Update dialogue-misc.json

* Update dialogue-final-boss.json

* Update dialogue-double-battle.json

* Update ability-trigger.json

* Update achv.json

* Update arena-tag.json

* Update battle.json

* Update battler-tags.json

* Update command-ui-handler.json

* Update menu.json

* Update modifier-type.json

* Update modifier.json

* Update move-trigger.json

* Update pokemon-info-container.json

* Update pokemon-info.json

* Update splash-messages.json

* Update status-effect.json

* Update tutorial.json

* Update voucher.json

* Update weather.json

* Update ability-trigger.json

* Update src/locales/de/modifier-type.json

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

* Update src/locales/de/modifier-type.json

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

* Update modifier-type.json

* Update bgm-name.json

* Update bgm-name.json

* Update src/locales/it/menu.json

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

* types_ja.png update

* Apply suggestions from code review

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>
2024-09-08 13:57:17 +02:00
Mumble 4a98c36427
[Hotfix] Properly whitelisting fused Pokemon that happen to have Pokemon with alt. forms (#4104) 2024-09-08 02:58:24 -04:00
NightKev 55b89e82c7
[Hotfix] Remove extra Roark victory line, fix baton pass i18n in `achv.ts` (#4103) 2024-09-08 02:46:56 -04:00
James Diefenbach 7ab0bbbd94
[Hotfix] Fix cases where hatched Pokemon don't get an egg move (#4102)
Co-authored-by: James Diefenbach <z5421232@ad.unsw.edu.au>
2024-09-08 02:45:30 -04:00
innerthunder 8082e6dc58
[Hotfix] Fix harsh weather cancelling moves based on base type (#4097) 2024-09-08 02:29:49 -04:00
James Diefenbach 0bdb697077
[Hotfix] Show enemy item icons after egg summary (#4101)
Co-authored-by: James Diefenbach <z5421232@ad.unsw.edu.au>
2024-09-08 02:18:51 -04:00
flx-sta 2bd07cb84e
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>
2024-09-07 21:37:37 -07: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
damocleas a214110030
Voucher Event (#4094)
* Update modifier-type.ts

* Great tier vouch

* Update trainer-victory-phase.ts

* Update trainer-victory-phase.ts

* Update timed-event-manager.ts and loading-scene.ts (#1)

* Update timed-event-manager.ts and loading-scene.ts

* egg-update-zh-cn update

* Update language codes in loading-scene.ts and timed-event-manager.ts

* updated image

---------

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
2024-09-08 04:17:02 +01:00
Amani H. ffcedfd9a4
[Dev] Save Data Version Migration (#4080)
* Initial Draft

* Successfuly Migration with Vitamins and White Herb

* Apply Session Data Patches Earlier

* Remove Stray `console.log`
2024-09-08 02:40:45 +01:00
Opaque02 b36823af4a
Fixed small RNG misusage (#4092) 2024-09-08 02:33:33 +01:00
Amani H. 7288350d45
[Item/Balance] Overhaul Lapsing Modifiers (#4032)
* Refactor Lapsing Modifiers, Lerp Hue of Count

* Fix Unit Tests

* Add Documentation to `hslToHex` Function

* Change Descriptions for New Behavior

* Add Documentation to Lapsing Modifiers

* Add Unit Tests for Lures

* Update Unit Tests for X Items and Lures

* Update Boilerplate Error Message

* Update Boilerplate Docs
2024-09-06 22:54:54 -04:00
Adrian T. e6a574c48f
[P2 Bug] Revert to normal form when Pokémon is fainted (#4049)
* revert to normal forms when fainted

* Remove `.js` from import

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: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-09-06 12:17:08 -07:00
Chapybara-jp 33cb999774
[Localization] [JA] Translated bgm-name.json (#4066)
* Translated bgm-name.json

Song titles from Bulbapedia and https://w.atwiki.jp/gamemusicbest100/
Kept mainline game abbrevs., changed PMD to ポケダン for clarity
Added translations for the original songs

* Update bgm-name.json

* Update bgm-name.json

* Update bgm-name.json
2024-09-06 14:51:32 -04:00
Adrian T. acda34c2e4
[P2 Bug] Underwater and underground Pokemond do not take sand/hail damage (#4047)
* fix sandstorm/hail interaction with semi invulnerable state

* cant fly high enough to avoid sandstorm/hail damage
2024-09-06 14:15:15 -04:00
flx-sta d8304421cf
fix endless end dialogue (#4069)
It was only displaying `ending_endless` because the `PGM` prefix was still present
2024-09-06 17:23:19 +00:00
Adrian T. d58f035287
[Misc] Migrate REROLL_TARGET to SHOP_CURSOR_TARGET (#4016)
* migrate reroll target to shop cursor target

* delete key after migrating
2024-09-06 09:41:48 +00:00
innerthunder 7b97657756
[Bug] Fix Aura Break applying without Dark/Fairy Aura present (#4057)
* Fix Aura Break ignoring active Dark/Fairy Aura condition

* Add conditional post-summon message

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-09-06 07:59:22 +00:00
flx-sta f3bdaa12ca
[Bug][Refactor] fix username-finder issues + code & visual improvements (#4055)
* fix username-finder issues & refactor `login-form-ui-handler`

- reduce redundancy
- add hover effect for interactable game objects
- add error handler for "No save files found!"
- Make user finder errors support i18n

* add `disableInteractive` to mockContainer
2024-09-06 00:07:24 +00:00
Adrian T. 39f3572c1b
[Test] Add Dragon Cheer tests (#4013)
* add dragon cheer tests

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

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

* update tests

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-09-05 23:51:47 +00: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
Adrian T. deac3141a1
remove partial from tera blast (#4044) 2024-09-05 20:05:09 +00:00
innerthunder 6e26db27b8
Protection moves now fail when used last (#4045) 2024-09-05 19:07:04 +00:00
damocleas 6d312a2909
Update egg.ts Same-Species Egg Shiny Rate (#4052) 2024-09-05 18:50:28 +00:00
Chapybara-jp e2e5b2c349
[Localisation] [JA] Translated remaining JA text files (#3999)
* [Localisation] [JA] Begun translation on arena-flyout.json

* Added english names to bgm-name.json

* Translated common.json

* Added English dialogue-double-battle.json

To make translation easier

* Added English dialogue-final-boss.json

* Added english dialogue-misc.json

* Added English dialogue.json

* Translated fight-ui-handler.json

* Update filter-bar.json

Changed 飴 to アメ for consistency with its spelling in Pokemon GO

* Update game-stats-ui-handler.json

changed 孵化 to ふか

* Update growth.json

Added kanji

* Update menu-ui-handler.json

changed 孵化 to ふか

* Update modifier-type.json

Changed name of IV Scanner to match with other files, the rest of the item descriptions need to be changed to Kanji as well.

* Update modifier.json

* Changed move-trigger.json

Added kanji and new moves.

* Update party-ui-handler.json

Added kanji

* Update pokemon-info-container.json

Changed to Kanji

* Translated pokemon-summary.json

The metFragment formatting is taken from BW

* Update run-history.json

Corrected some misinterpretations.
Added correct original line of "Welcome to Hall of Fame!"

* Added english splash-messages.json

* Update move-trigger.json

* Update move-trigger.json

* Update move-trigger.json

* Update arena-flyout.json

* Update move-trigger.json

* Translated arena-flyout.json

* Update weather.json

* Update save-slot-select-ui-handler.json

changed wave to ラウンド

* Update game-stats-ui-handler.json

* Update challenges.json

* Update achv.json

Corrected some mistakes, misspelling

* Added some translations dialogue.json

Youngster translation done
Female rival dialogue done, needs check

* Update dialogue.json

* Update dialogue.json

* Update dialogue.json

* Update dialogue.json

* Update dialogue.json
2024-09-05 17:49:28 +00:00
Opaque02 01eb05469a
[QoL] Username finder (#4040)
* Added the ability to potentially get username from login screen

* Accidentally made dev login enforced :)

* Updated image
2024-09-05 14:00:19 +00:00
Lugiad c902369eed
[Localization] Restoring "Safeguard" entries in arena-flyout.json of all locales where it existed (#4026)
* Update arena-flyout.json

* Update arena-flyout.json

* Update arena-flyout.json

* Update arena-flyout.json

* Update arena-flyout.json

* Update arena-flyout.json

* Update arena-flyout.json

* Update arena-flyout.json
2024-09-05 12:39:10 +00:00
Leo Kim 1968680104
[Enhancement] add font size option per language on registration UI (#3849)
* add language setting for register form ui

* remove button fontsize option

* fix tests

* remove deprecated comments

* update request changes

* update requested changes from es

* update requested changes from walker

* Update src/locales/es/menu.json

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

---------

Co-authored-by: Asdar <asdargmng@gmail.com>
2024-09-05 09:52:48 +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
innerthunder 1434a3edaf
Fix random failure in Parental Bond tests (#4036)
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-09-05 05:31:32 +00:00
Opaque02 61ab52c295
[Balance] Changed escape calculation (#3973)
* Changed escape calculation as per Mega

* Adding tests

* Updates some tests

* Updated all tests for bosses

* Removed console log lines

* Added some clarifying comments

* Fixed docs

* comment add

* comment add

* Convert comments into tsdoc comments

Convert `integer`/`IntegerHolder` to `number`/`NumberHolder`

Clean up tests a bit

---------

Co-authored-by: damocleas <damocleas25@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-09-05 05:29:39 +00:00
NightKev 237aad2184
[Misc] Clean up the `Battle` class a bit (#3995)
* Use default values in the `Battle` class

Turn a couple of comments into tsdoc comments

Replace a `!!` with `?? false`

* Replace `integer` with `number`
2024-09-05 05:29:02 +00:00
innerthunder 31d3bec55e
[Test] Fix Rage Powder test failing randomly (#4038)
* Fix random failure in Rage Powder test

* Remove redundant override
2024-09-05 04:54:51 +00:00
Tempoanon 834255447d
Fix mbh not using user's nickname (#4033) 2024-09-05 04:02:45 +00:00
innerthunder f3ced7e814
[Bug] Fix inconsistencies with move type resolution for some ability triggers (#3988)
* Fix inconsistencies with ability triggers on variable-type moves

* Fix aura effects not accounting for the move user

* Fix Wonder Guard evaluating move type as if the defender used the move

* Some additional test coverage for move-type-changing effects
2024-09-05 00:49:01 +01:00
Mumble cebd449335
I have a brain made of cheese!!! (#4028)
Co-authored-by: frutescens <info@laptop>
2024-09-04 23:16:47 +00:00
NightKev a537113c8f
Re-add lost i18n strings (#4024) 2024-09-04 20:45:56 +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
innerthunder 207b3e1eb7
[Test] Add `forceEnemyMove` Game Manager util (#3678)
* Add `forceEnemyMove` test util

* fix ceaseless edge test

* Apply flx's suggestions

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

* Rewrite Follow Me test

* Reorganize new imports in game manager

* Rewrite Rage Powder + Spotlight tests

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-09-04 17:56:57 +00:00
MokaStitcher 11ac929a4d
fix getting the highest ivs for the iv scanner (#4022) 2024-09-04 17:00:31 +00:00
James Diefenbach e822c91a16
[Enhancement] Skip egg hatching and show summary (#3726)
* cherry picked commits / manual copy

* better dex tracking for summary after regular egg hatching

* ui changes

* updated egg hatch bg, added candy tracker, icon anims for new shiny or new form unlock

* added i18 line, reset overrides

* touchup

* code cleanup, documentation and slight refactor

* sprite display fix

* load interrupts, simple sfx and no summary for small egg amounts

* Garbage Collection + Eslint/Docs approved.

* time logging and optimisation

* skip redundant load

* more time logs and fix pre-load issues

* more detailed loading logs

* changed loading to be on demand from cursor nav

* fix missing variant icon fallback

* removing redundant time logs and code touchup

* code cleanup

* Comments so developer doesn't get bugged about garbage collecton

* remove logs n stuff

* lang settings touchup and final touchup plus uploading blank egg summary bg

* fix nits, js imports, extra docs, magic numbers changed

* extra docs and spacing nits

* Update Github

---------

Co-authored-by: James Diefenbach <z5421232@ad.unsw.edu.au>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
2024-09-04 16:59:25 +00:00
Lugiad 3704680029
Update dialogue.json (#4021) 2024-09-04 16:28:10 +00:00
MokaStitcher 1055386949
starter select defaults to shiny with highest variant again (#4001) 2024-09-04 08:58:39 +00:00
Adrian T. 200deef0ed
[P1 Bug][UI/UX] Address shop cursor target feedbacks (#4009)
* address shop cursor target feedbacks

* make rewards left-most

* fix tests breaking

* Update src/test/items/dire_hit.test.ts

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

* Update src/test/items/temp_stat_stage_booster.test.ts

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

* Update src/locales/ja/settings.json

Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>

* update default value

* stylistic change

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>
2024-09-04 01:07:56 +00:00
gitlocalize-app[bot] 4e3a24c247
[Localization] [ES] 5 files reviewed and finish. [Ready] (#3921)
* Translate party-ui-handler.json via GitLocalize

* Translate party-ui-handler.json via GitLocalize

* Translate arena-tag.json via GitLocalize

* Translate arena-tag.json via GitLocalize

* Translate battler-tags.json via GitLocalize

* Translate battler-tags.json via GitLocalize

* Translate arena-flyout.json via GitLocalize

* Translate game-mode.json via GitLocalize

* Update src/locales/es/arena-tag.json

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

* Update src/locales/es/battler-tags.json

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

* Update src/locales/es/battler-tags.json

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

* Update src/locales/es/arena-tag.json

---------

Co-authored-by: Asdar <asdargmng@gmail.com>
Co-authored-by: Rafa <rhijano@hotmail.com>
Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
2024-09-03 15:19:05 -07:00
Mumble 3242a35341
[Misc][UI] Default Cursor Positioning for Command / Fight / Party (#4008)
* Cursor Pos. should match mainline

* Fixed command mode behavior

---------

Co-authored-by: frutescens <info@laptop>
2024-09-03 15:13:29 -07:00
PigeonBar 3a6146935c
[Bug] Fix reloads causing RNG inconsistencies, Moody and Acupressure use seeded RNG now (#3952)
* [Bug] Fix reloads causing RNG inconsistencies

* Minor revisions

* Allow reload helper to directly access getSessionSaveData()

* Changed Moody and Acupressure to use seeded RNG

* Fix broken unit test
2024-09-03 09:14:45 -04:00
Jannik Tappert 232cd2c91a
[Localization] [DE] Added missing keys in DE (#3998)
* Add missing keys in DE

* Challenge description fix
2024-09-03 09:12:57 -04:00
Lugiad 940992a940
[Localization] [FR] Added missing keys in French (#4000)
* Update battle.json

* Update menu-ui-handler.json
2024-09-03 14:48:13 +02:00
innerthunder 38ae0a5d6d Merge remote-tracking branch 'upstream/main' into main-beta-merge 2024-09-03 03:21:54 -07:00
NightKev d004d905bd
[Test] Remove nature RNG from Beast Boost tests (#3994) 2024-09-03 01:59:48 -04:00
NightKev 97a02e7c34
[Test] Set boss Pokémon test timeout to 20 seconds instead of 2.5 seconds (#3992) 2024-09-03 00:59:51 -04:00
PigeonBar 587360c8da
[Bug] Fix eggs having exploitable RNG (#3913)
* [Bug] Fix eggs having exploitable RNG

* Fix Wind Rider test having random chance to fail

* Revert egg's ID back to its own unseeded generation

* Remove change from wind rider test

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
2024-09-02 22:18:18 -04:00
Mumble deb4e9dd24
[UI] Run history fixes and improvements (#3987)
* Challenge Rules Word Wrap

* Fixed Modifiers

* Fixed item count color.

* removed .js endings

---------

Co-authored-by: frutescens <info@laptop>
2024-09-02 22:14:09 -04: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