Commit Graph

5009 Commits

Author SHA1 Message Date
Fabi
37e6371eef
[Dev] Allow forcing all trainer variants in trainer override (#6391) 2025-09-16 10:48:19 -05:00
Madmadness65
e25db16326 [P3 Bug] Fix login screen not playing menu_open SFX properly
It did not properly specify that the SFX file was in the ui folder.
2025-09-16 02:45:30 -05:00
Sirz Benjie
0c921cdb4a
[Tests][Bug][Beta] Fix ditto bug and add unit tests (#6559)
* Fix ditto bug and add unit tests

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-09-15 23:26:57 -05:00
Sirz Benjie
85c38dfdbe
[Bug] Cookies being fetched improperly v2 2025-09-15 19:55:45 -05:00
Sirz Benjie
6ce59ecbd9
[Bug] Cookies being fetched improperly 2025-09-15 19:49:18 -05:00
Sirz Benjie
8013093513
[Bug] Secondary fusions with gender evo condition can now evolve (#6510) 2025-09-15 14:04:13 -05:00
NightKev
b7cee4b313 [Misc] Remove leftover temporary comments in pokemon.ts 2025-09-15 00:25:25 -07:00
NightKev
de94e738fb [Docs] Add blank space to prevent incorrect comment attachment
Biome will "attach" comments to imports if there is no space between
them when it sorts imports (this allows suppression comments to work)
2025-09-14 20:45:01 -07:00
Sirz Benjie
793dea0024
[Bug] [Docs] Fix @module tags (#6557)
Fix `@module` tags
2025-09-14 22:35:12 -05:00
Xavion3
25a2fb4266
[Balance] Tweak trainer moveset TM generation. (#6533)
* Lower TM weight in moveset generation.

* Implement a cap on amount of TMs based on wave.

* Extract ai moveset generation to its own file

* Minor doc cleanup

* Move magic numbers to balance file and export them

* Tweak stab move weight generation

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-09-14 21:44:58 -05:00
Madmadness65
24a0ca95f4
[Balance] Change Happiny evolution method, update Chansey happiness req
https://github.com/pagefaultgames/pokerogue/pull/6551

* [Balance] Change Happiny evolution method

Happiny now evolves into Chansey by using an Oval Stone during the Dawn or Day, instead of 160 friendship (Blissey's friendship requirement of 200 remains unchanged).
Also removed unnecessary comments from Gligar's and Sneasel's evolutions.

* Update Chansey -> Blissey 200 -> 180 Friendship Required (Base 140)

---------

Co-authored-by: damocleas <damocleas25@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-14 14:58:56 +00:00
Sirz Benjie
521b88eabe
[Bug] [Beta] Fix bug where boss segments are not actually broken (#6553)
Fix bug where boss segments are not actually broken
2025-09-13 18:36:21 -05:00
Sirz Benjie
3ed6a9a960
[Balance] Trainer boss Pokémon no longer gain a stat boost when a boss segment is broken #6552
Trainer boss Pokémon no longer gain a stat boost when a boss segment is broken
2025-09-13 16:21:24 -04:00
Sirz Benjie
e233f24526
[Deps] Update biome to 2.2.4 (#6550)
* Update biome and adjust rules

* Add noMisusedPromises

* Downgrade `noMisusedPromises` to info, enable noImportCycles
2025-09-13 20:13:21 +00:00
Bertie690
c217f47942
[Refactor] Added playTween utility function (#6545)
* Added `playTween` utility function

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

* Update comment wording for benjie

---------

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2025-09-13 18:36:38 +00:00
Bertie690
465f0c2ced
[Refactor] getPokemonById returns undefined instead of null
https://github.com/pagefaultgames/pokerogue/pull/6544

* [Refactor] Make `BattleScene.getPokemonById` return `undefined` instead of `null`

* fixed substitute unit test :(

* Update src/phases/obtain-status-effect-phase.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/phases/pokemon-phase.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update battle-scene.ts comment for dean

* Add todo comment

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-12 22:19:48 -07:00
Sirz Benjie
c7a2c666af
[Refactor] Remove isNullOrUndefined in favor of loose check against null (#6549)
* Remove `isNullOrUndefined` in favor of loose check against null

* Fix missing method call

* Remove isNullOrUndefined import
2025-09-12 14:53:27 -05:00
Wlowscha
559ca8610a
[Misc] Simplifying imports of UI files (#6542) 2025-09-11 00:30:17 -07:00
Fabi
e4a6a3de82
[Bug] Allow catch in limted catch during teleporter ME (#6531)
Allow catch in teleporter ME
2025-09-11 06:07:49 +00:00
Fabi
328cc0221e
[i18n] Camel case remaining keys (#6508)
* fix egg gacha keys

* fix battle keys

* fix game stats

* fix splash texts
2025-09-10 18:45:01 -05:00
Wlowscha
9a92f98f63
[Refactor] Move type definitions away from game-data.ts (#6487)
* Move type definitions away from game-data.ts

* Update src/@types/data-types.ts

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

* Renamed file to save-data.ts

* Fixed broken import

* Moved some ui files

* Run biome, fix broken import

* Fixed one more broken input
2025-09-10 14:09:33 -05:00
Sirz Benjie
d9d6163b07
[Bug] Make touch events prevent pointer events (#6528) 2025-09-10 13:59:21 -05:00
Fabi
ff6de568af
[UI/UX] Add language selection to login screen (#6302)
* add language selection

* Move language option up

* Move language list to seperate file

* fix circular dependency

* Move language selection to own icon

* run biome

* add icon

* add icon to legacy ui
2025-09-10 13:53:57 -05:00
Sirz Benjie
c09d43273a
[Docs] Remove stray import 2025-09-10 13:47:53 -05:00
Bertie690
496d9a10d7
[Test] Added matcher to check message contents; added tests for Splash, Celebrate, Laser Focus (#6299)
* Fixed laser focus test to not whiff instruct

* fix test checking last hit twice in row lul
2025-09-10 13:40:21 -05:00
Sirz Benjie
e75c8e5691
[Bug] [Ability] Fix stat boost message timing for quark drive / protosynthesis (#6529)
Make proto and quark drive stat boost happen after proc instead of at end
2025-09-10 13:37:00 -05:00
Sirz Benjie
c0b3b0c55e
[Docs] Fixup typedoc warnings (#6540)
* Replace `@return` with `@returns`

* Remove extends tags

* Remove `@overrides` tag

* Remove `@abstract` tags

* Remove `@overload` tags

* Remove `@description` tags

* Remove `@static` tags

* Remove `@private` tags

* Remove `@warning`

* Remove `@PokemonSpecies`

* Remove {} appearing after `@returns`

* Remove {} appearing after `@param`

* Bump typedoc version

* Remove ...args in `@param` and replace with args

* Cleanup docs in challenge.ts

* Adjust hyphens

* Remove parenthesis in `@see` tags

* Remove old `@see` references
2025-09-10 13:35:55 -05:00
Wlowscha
6f3f6026a8
[UI/UX][Refactor] Moved and renamed some ui files (#6538)
* Moved and renamed some ui files

* Renamed two handlers to helpers
2025-09-10 10:42:38 -05:00
Sirz Benjie
42a87cf228
[UI/UX] In settings, clamp volume cursor at boundary (#6504)
* feat(settings): clamp volume cursor at boundary

* Extract left/right logic to own method

Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>

---------

Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
2025-09-10 17:37:23 +02:00
Xavion3
5dcbedf364
Add blacklist of moves that can't be forced STAB. (#6491)
* Add blacklist of moves that can't be forced STAB.

* Add exploding moves to blacklist.

* Change blacklist from array to list.

* Sort blacklist and add steel beam

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-09-10 10:11:57 -05:00
Madmadness65
df223bfbc8
[Misc] [Bug] Remove summary_overlay_shiny from loading scene (#6532)
Remove `summary_overlay_shiny` from loading scene

This file was renamed and moved in PR #6433 so this loadImage is no longer needed here.
2025-09-09 18:26:23 -05:00
Fabi
b4cbbf1b8f
[Bug] remove node:console import (#6530) 2025-09-09 15:35:09 -07:00
Xavion3
acb1522138
[Balance] Allow enemy trainer pokemon to use relearn moves (#6515) 2025-09-08 20:06:12 +00:00
Bertie690
c0da686ba0
[Dev] Migrated to Biome 2.2.3, added more rules (#6259)
* Added more biome rules

* Fixes

* Added a few more rules

* Added global phaser to biome

* Fix tpyo

* Updated biome to 2.1.4; improved docs on linting/localization; added vcs support

Also added `.build` to gitignore cuz reasons

* Fixed tpyo

* dd

* Applied linter fixes

* Partially fixed some private property issues

* Upgraded to Biome 2.2.0; added `operatorLinebreak` and a few new rules

* Moved operator linebreaks before lines

* Applied kev's suggestions

* Update biome.jsonc

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

* added like all the rules and then some

* modify biome.jsonc

* apply biome formatting

* Reverted changes to balance folder

* fixed stuff

* Fixed biome stripping trailing globstars from everything

* made `noInvertedElse` an error rule

* Add & apply fixes for `useExplicitLengthCheck`, `useAtIndex` and `noNonNullAssertedOptionalChain`

* Bumped biome to 2.2.3

* Fixed a few syntax errors

* Removed trailing globstars since biome actually fixed their shit

* Final clean up

* foobarbaz

* Fixed remaining issues

* Fixed a few errors in SSUI

* fixed rounding issue

* Fixed test to not round funky

* Fixed biome false positive for vitest hooks

* Apply biome:all

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-09-08 10:35:18 -05:00
NightKev
d8fa0ff083 Merge branch 'beta' into hotfix-1.10.7 2025-09-07 18:21:37 -07:00
Sirz Benjie
43f8b78c35
[Bug] Fix sessions clearing the wrong slot on save (#6509)
* Store session id in session data to prevent somehow deleting wrong slot

* Only log session / system if beta or local; fix promise

* Fix serialization/deserialization when logging session/system data

* Force loadSaveSlot to set the logged in user's last session

* No longer add slotId to session data
2025-09-07 18:17:12 -07:00
Sirz Benjie
8fdd5043c3
[Bug] [Ability] Prevent message flyout spam for sturdy, damp, and a few other abilities (#6507)
* fix: prevent message spam for many abilities

* Update src/data/abilities/ability.ts
---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-07 18:39:52 -05:00
Wlowscha
e175bbfb28
[UI/UX] Use pointer events instead of touch events in TouchControl (#6506)
* Use pointer events instead of touch events in `TouchControl`

* Marked some touch-related tests as todo

* Changing test mocker to send pointer events

* Also updated the ui to change the position of touch controls

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-07 17:35:49 -05:00
Sirz Benjie
344e9463cc
[Bug] Fix memory leak in egg hatch (#6511)
Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com>
2025-09-07 17:05:25 -05:00
Wlowscha
d0f5b3f613
[Refactor][UI/UX] Reorganize UI files (#6503) 2025-09-07 13:05:40 -07:00
Bertie690
8b95361d61
[Dev] Added egg move parse script & script type checking (#6116)
* Added egg move parse utility script

* Update interactive.js

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

* Update interactive.js

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

* Update interactive.js

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

* Applied kev's reviews

* Removed `basePath` from tsconfig

the docs literally recommend against using it so yeah

* Fixed up configs so that script folder has its own file

* Reverted changes to egg move contents

* renamed boilerplate so biome doesn't lint it

* Fix `jsconfig.json` so that it doesn't typecheck all of `node_modules`

See https://github.com/microsoft/TypeScript/issues/50862#issuecomment-1565175938 for more info

* Update tsconfig.json

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

* Updated workflows and fixed issues

* Removed eslint from linting workflow

* Fixed type error in d.ts file to shut up linters

* Reverted test-filters.yml

* Update biome.jsonc

* Update decrypt-save.js comment

* Update interactive.js

* Apply Biome

* Fixed type errors for scripts

* Fixed biome from removing tsdoc linkcodes

* Update test/@types/vitest.d.ts

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-07 11:35:52 -07:00
NightKev
2cf23b7ea7 [Misc] Fix console log colors 2025-09-07 10:58:40 -07:00
Bertie690
9815c5eebf
[Test] Revamped MockConsoleLog with color support (#6218)
* Added mock console and fixed up many many things

* Cleaned up handling of colors and such

* Added minor comment

* Fix Focus Punch test

* Fix typo

* Remove redundant comment

* Update vitest.setup.ts

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

* Added color map inside new folder

* Made constants not object bc i was told to

* Update src/constants/colors.ts

* Removed all moves init check

* Removed import

* Fixed up some stuff + added aquamarine color to settings helper

* Added logging for test end

* Removed intentionally failing test

* Fixed console log to use inheritance to not override vitest's wrapping

* Added a custom Vitest reporter to not log the test name every 2 lines

* Moved coloration to a hook to prevent misplacing things

* Fixed import issue by copypasting vitest soure

* Removed intentionally failing test

look i need to check that `test:silent` works on github ok

* Added REUSE annotations to copied parts of source

* Fixed import issue

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-07 09:18:47 -05:00
HeeMyung Kim
444080bb78
[UI] Add cyclic navigation in settings menu for LEFT/RIGHT buttons (#6404)
* feat: add cyclic navigation to settings menu

* review > refactor: use Phaser.Math.Wrap instead the ternary operator
2025-09-06 18:16:43 -05:00
Lugiad
39760a8514
[UI/UX] [Localization] Battle & Party UI translation (#6482) 2025-09-06 02:08:33 -07:00
Anthony
ad61a28e88
[Bug] Moody Can't Lower Stats at +6 (#6481) 2025-09-06 06:46:13 +00:00
HeeMyung Kim
ddc04a7a87
[Bug] [UI/UX] Fix random button activation bug (#6464) 2025-09-06 06:40:38 +00:00
Xavion3
3765f843db
[Refactor] Remove randSeedWeightedItem utils function. (#6492)
Remove randSeedWeightedItem utils function.
2025-09-06 06:12:32 +00:00
Bertie690
d630c106e0
[Test] Improved typing on BattlerTagData and ArenaTagData; improved test matchers (#6338)
* Improved typing on `BattlerTagData` and `ArenaTagData`
* Added dragon cheer/focus energy tests
* Cleaned up descs
2025-09-05 21:50:37 -05:00
Bertie690
309e31e196
[Bug] Future Sight no longer crashes after catching the user (#6479) 2025-09-05 14:38:01 -04:00