Commit Graph

269 Commits

Author SHA1 Message Date
Wlowscha
b38f740dff
Merge branch 'beta' of https://github.com/pagefaultgames/pokerogue into new-modifier-rework 2025-09-11 09:44:26 +02:00
NightKev
a5f80ab490 [Misc] Delete useless test file 2025-09-11 00:32:11 -07:00
Wlowscha
559ca8610a
[Misc] Simplifying imports of UI files (#6542) 2025-09-11 00:30:17 -07:00
Wlowscha
9ab4decf9e
Changed various imports 2025-09-11 09:29:50 +02:00
Wlowscha
0f8ea02c85
Merge branch 'beta' of https://github.com/pagefaultgames/pokerogue into new-modifier-rework 2025-09-11 08:30:51 +02:00
Bertie690
76d163e666
[Test] Moved test setup code to its own folder (#6297)
* Made default boilerplate show off some test utils

* Moved all the setup files into their own folder

* fixed relative path bug

* Update i18n.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-10 14:13:48 -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
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
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
75914269d7
Run biome 2025-09-10 19:38:19 +02:00
Wlowscha
6818d22a67
Merge branch 'beta' of https://github.com/pagefaultgames/pokerogue into new-modifier-rework 2025-09-10 19:35:17 +02: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
Bertie690
e202cb63ac
[Dev] Remove useless noDoneCallback linting rule (#6520)
* [Dev] Remove useless `noDoneCallback` linting rule

* Removed disable comments
2025-09-08 10:53:59 -05: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
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
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
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
Wlowscha
6e52baebee
Updated names of held items which modify stats 2025-09-06 20:09:50 +02:00
Wlowscha
e365ed62ff
Merge branch 'beta' of https://github.com/pagefaultgames/pokerogue into new-modifier-rework 2025-09-06 09:31:34 +02:00
Anthony
ad61a28e88
[Bug] Moody Can't Lower Stats at +6 (#6481) 2025-09-06 06:46:13 +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
02bfaf9ad3
[Test] Added/cleaned up tests for Pastel/Sweet Veil (#6374)
* [Test] Added/cleaned up tests for Pastel/Sweet Veil

* Fixed extra import + tests

* Fixed type import

* Update move.ts

* reverted abstract constructor stuff
2025-09-05 21:42:44 -05:00
Bertie690
309e31e196
[Bug] Future Sight no longer crashes after catching the user (#6479) 2025-09-05 14:38:01 -04:00
Bertie690
d5e6670456
[Refactor] Remove null from PhaseManager.currentPhase signature
https://github.com/pagefaultgames/pokerogue/pull/6243

* Added `toBeAtPhase` + removed `null` from phase manager current phase signature

* Removed bangs from various calls to phase manager

* Update phase-manager.ts

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

* ran biome

* Fix missing bang

* Simplify TSDoc

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-05 09:28:35 -07:00
Wlowscha
f332093a77
Merge branch 'beta' of https://github.com/pagefaultgames/pokerogue into new-modifier-rework 2025-09-04 19:24:14 +02:00
Sirz Benjie
4a28773929
[Bug] [Move] Fix poltergeist crash when no remaining enemies (#6473)
* fix: poltergeist crash with no target

* fix: adjust move phase history
2025-09-03 02:44:43 +00:00
Fabi
4dc067daa2
[Bug] [UI/UX] Fix options during item transfer (#6425) 2025-08-29 23:52:39 +00:00
Wlowscha
e74c2fbaa7
Merge branch 'beta' of https://github.com/pagefaultgames/pokerogue into new-modifier-rework 2025-08-27 22:58:16 +02:00
Sirz Benjie
6745ce7839
Fix starterpref reset (#6430)
* Prevent an empty starterpreferences object from being saved

* Fix ssui nullish coalescing

* Update src/utils/data.ts

Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>

* Fix starter preferences clearing, add tests

---------

Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>
2025-08-26 12:11:16 -05:00
Wlowscha
63c1c34746
[Hotfix] Fix tyrogue evo (#6414)
* Fixed tyrogue evo condition

* Added test for tyrogue evolution

* Update src/data/balance/pokemon-evolutions.ts

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>

* Update src/data/balance/pokemon-evolutions.ts

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>

* Update src/data/balance/pokemon-evolutions.ts

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>

* Added missing typeof in suggestion

---------

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-08-26 06:57:11 +00:00
Bertie690
0f8b1f63b5
[Bug/Ability] Fixed bugs with Intimidate triggers after reload/initial switch (#6212)
* Added TODO test case + documentation for failing intim test

* Fixed comment

* Fixed intimidate bugs fr fr

* Update src/data/phase-priority-queue.ts

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

* Update src/data/phase-priority-queue.ts

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

* Cleanup remove phase logic

* Do not add unnecessary activateAbilityPhases for pokemon that do not have their passive enabled

* Remove leftover log messages

* Add TODO comment

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-08-24 14:09:16 -05:00
Sirz Benjie
049932c001
[Bug] Fix status effects overwriting each other (#6392)
* Ensure status effects from same source interaction cannot override each other

* Update test/status-effects/general-status-effect.test.ts

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-08-24 12:51:16 -05:00
Fabi
1b2c694084
[bug/i18n] Fix stealth rock message (#6377)
replace pokemonName with pokemonNameWithAffix
2025-08-23 17:26:12 -05:00
Sirz Benjie
a8b54eba6d
[Test] Mark failing test/ui/manage-item-button.test.ts as TODO (#6375)
* Ensure hotfix runs tests

* Unnest promise

* ensure workflows run when pushed to hotfix

* Mark test todo
2025-08-23 16:56:58 -05:00
Dean
d2eb3dba53
[Test] Fix leftovers test not running heal phase (#6370)
Fix leftovers test
2025-08-23 16:02:36 -05:00
Sirz Benjie
99bf639ea7
[Bug] [Move] Fix pollen puff (#6363)
* Ensure pollen puff does not heal enemy after damage

* Add test to ensure pollen puff does not heal enemy
2025-08-23 11:42:10 -05:00
Fabi
3b290ee9a2
[UI/UX][Bug] Prevent switch to discard mode while transferring item (#6358) 2025-08-23 10:05:48 -05:00
damocleas
254d34fd08
[Misc] [UX] Add Daily Run Achievement, Re-Arrange Achievements, Replace some Icon Sprites (#6292)
* wip achievement changes

* Adjust egg image sizes, re-export item atlas

* painful eggs

* Add egg to legacy UI, re-export item atlas

* run biome

* Update achievement.test.ts

* Fix achievement test file

* Fix tera stellar missing icon path

* Fix achievement test file

* egg s

* Optimize new images, re-export item atlas

* update pngs and locale

* add daily achv and other sorting

* Optimize ribbons, re-export item atlas

* Bump to version 1.11.0

* more changes, waiting on pngs

* Update package.json

* ribbon fixes

* images!

* Optimize images, re-export item atlas

* final fix

---------

Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-08-22 19:21:17 -04:00
damocleas
5ee547a39a
[Balance] [ME] Trash to Treasure Option 1 Adjustment (#6341)
* Update trash-to-treasure-encounter.ts

* Update trash-to-treasure-encounter.test.ts tests
2025-08-22 17:37:16 -04:00
NightKev
8904cfc37b
Revert #6307 "Remove duplicate animation json for ... variants" (#6332)
Revert "[Refactor][Sprite] Remove duplicate animation json for shinies, sprite-based variants (#6307)"

This reverts commit 7bdb62ed1d.
2025-08-21 22:38:38 -07:00
Wlowscha
c81440d466
Merge branch 'beta' of https://github.com/pagefaultgames/pokerogue into new-modifier-rework 2025-08-21 19:37:09 +02:00
Bertie690
0f94e97a2a
[Misc] Removed last vestiges of / 4096 from codebase (#6316) 2025-08-20 21:51:33 -04:00
Bertie690
c59a2013b9
[Move] Trick Room now reverses itself when added twice in a row (#6314) 2025-08-20 20:22:52 -05:00
Acelynn Zhang
f34be91891
[Ability] Embody Aspect now triggers on switch-in while Terastallized (#6294)
* Fix Embody Aspect triggers

* Use selectWithTera

* apply suggestions

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-08-20 20:10:54 -05:00
AJ Fontaine
7bdb62ed1d
[Refactor][Sprite] Remove duplicate animation json for shinies, sprite-based variants (#6307)
* Remove duplicate animation json

* Remove duplicate json for sprite-based variants

* Fix sprite test

* Fix name of variable

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-08-20 18:27:08 -05:00
Wlowscha
14a0a23abc
[Balance][Challenge] Block master ball catching final boss in challenges (#6273)
* Block catching bosses in nuzlockes

* Changes to conditions to restrict master ball use

* Implemented new can't catch messages

* Fixed some bugs which prevented correct usage of balls

* Special casing full fresh start

* fix text Update command-phase.ts

* Added tests for failing catches

* Using `mockI18next`

* Shorten a couple of variable declarations

* Fixed bug that allowed catching trainer pokemon in end; showing double battle failure only if other failure messages do not apply

* Fixed order of error messages

* Changed description of tests with "in end biome" instead of "paradox mon(s)"

* Not override nature after selection

* Update test/field/catching.test.ts

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

---------

Co-authored-by: damocleas <damocleas25@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-08-20 19:24:55 -04:00
Bertie690
6bdfb7eb31
[Test] Cleaned up shields down tests; added more tests (#6216)
* Cleaned up shields down tests; added more tests

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-08-20 08:57:46 -05:00
Bertie690
6c03181621
[Bug] Refactored status code, fixed Rest/Sleep Talk status checks (#5872)
* Reworked status code, fixed bugs and added Rest tests

* Fixed rest bug

* Fixed bugs, split up status code, re-added required Rest parameter

* Cleaned up comments and such

* Added edge case to rest about locales

* Maybe did stuff

* Split up `trySetStatus` fully; fixed rest turn order display to match mainline

* Reverted healing changes to move to other PR

* Fixed message code a bit

* Condensed all status immunity tests under 1 roof

* Fixed the tests

* Added pollen puff tests back again

* Fixed swallow test

* Reverted swallow test

fixing in other prs

* Fixed pollen puff

* Fixed cirrc dep isuse

* fixed stockpile to no longer fail on stack full

* Fixed rest thing...?

* readded swallow conds

* Fixed tests

* wip

* Fixed tests

* Added pokemon heal phase to the turn queue

* ddddd

* Fixed the tests

* Fixed corrosion test

* Ran linting

* Fixed infiltrator bug

* Fix pokemon.ts

* Update move.ts

* Update corrosion.test.ts

* Update pokemon.ts documentation

* Remove missed line in TSDocs

* Update pokemon.ts

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

* Update modifier.ts

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

* Update modifier.ts

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

* Update obtain-status-effect-phase.ts

* Fix merge issues and apply Biome

* Revert pokemon-heal-phase.ts

* ddddd

* Fixed test file syntax err

* Update toxic spikes status set text to be quiet

* ran biome

* ran boime

* Prevent rest failure message from displaying outside of move phase

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-08-20 08:45:09 -05:00