Commit Graph

5451 Commits

Author SHA1 Message Date
Sirz Benjie
e1e7287919
Improve canUse computation 2025-07-27 22:24:04 -06:00
Sirz Benjie
adb5900497
Fix improperly named computeMoveId method 2025-07-27 22:24:04 -06:00
Sirz Benjie
9218d35938
Add overload for handle command 2025-07-27 22:24:03 -06:00
Sirz Benjie
22d2b4a436
Minor touchups 2025-07-27 22:24:03 -06:00
Sirz Benjie
958eb00566
Breakup commandPhase#start
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-07-27 22:24:02 -06:00
Sirz Benjie
22b9a19ba6
Breakup run and pokemon commands 2025-07-27 22:24:01 -06:00
Sirz Benjie
0935d817e9
breakup fight and ball commands into their own methods 2025-07-27 22:24:01 -06:00
NightKev
462b423cb8
[Dev] Change target to ES2023 in tsconfig.json (#6160) 2025-07-28 00:20:02 -04:00
Bertie690
157b662f9e
[Bug] Fix camel case bug in strings.ts (#6161) 2025-07-27 20:17:46 -07:00
NightKev
3434078329 [Docs] Add @module modifier tag to tsdoc.json 2025-07-27 18:03:34 -07:00
Sirz Benjie
c0e755c3c3
[Refactor] Prevent serialization of full species in pokemon summon data
https://github.com/pagefaultgames/pokerogue/pull/6145

* Prevent serialization of entire species form in pokemon summon data

* Apply suggestions from code review

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

* Apply Kev's suggestions from code review

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

---------

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-07-27 18:01:44 -07:00
Bertie690
19730f9cf0
[Misc] Moved + cleaned up string manipulation functions (#6112)
* Added string utility package to replace util functions

* Changed string manipulation functions fully over to `change-case`

* Fixed missing comma in package.json

trailing commas when :(

* fixed lockfile

* Hopefully re-added all the string utils

* fixed package json

* Fixed remaining cases of regex + code dupliation

* Fixed more bugs and errors

* Moved around functions and hopefully fixed the regex issues

* Minor renaming

* Fixed incorrect casing on setting strings

pascal snake case 💀

* ran biome
2025-07-27 13:59:03 -07:00
Bertie690
29d9bb6e7b
[Dev] Turned on checkJs in TSConfig; fixed script type errors (#6115) 2025-07-27 20:42:57 +00:00
NightKev
7cb2c560ab [Misc] Fix import in vitest.d.ts 2025-07-27 13:32:47 -07:00
Bertie690
f3854abc16
[Test] Added custom equality matchers (#6157)
* Added rudimentary test matchers for `toEqualArrayUnsorted` and `toHaveTypes`

Might port the rest at a later date

* Actually run the effing setup matchers file + fixed ls lint to not be angy

* added dev dep

* Update .ls-lint.yml

* Update .ls-lint.yml

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
2025-07-27 20:16:04 +00:00
Sirz Benjie
1b8082a177
[Refactor] Refactor UI text ts (#5946)
* Add destroy method to pokemon-sprite-sparkle-handler

* Move TextStyle to enums, convert into const object

* Cleanup text.ts file

* Add necessary explicit types for TextStyle let vars

* Fix locales submodule commit

* Fix merge issue

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-07-27 17:46:56 +00:00
Sirz Benjie
ed8858e07d
[Bug][Beta] Make bounce delay use fixed int (#6156)
Make bounce delay use fixed int
2025-07-26 21:58:06 -05:00
Sirz Benjie
2f1cf2fc13
[Beta] [Bug] Fix shiny display issues (#6154)
Fix shininess check
2025-07-27 02:35:39 +00:00
damocleas
a117ff9bc8 [i18n] Update Locales 2025-07-26 22:31:55 -04:00
NightKev
30a6f47081 [Dev] Add dist/ to ls-lint ignore list 2025-07-26 19:23:18 -07:00
SmhMyHead
08d7216424
[UI/UX] Added "Hide Username" Setting (#6105)
* [UI/UX] Added "Hide Username" Setting

* Mask tid with asterisk instead of hiding completely

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-07-26 22:34:21 +00:00
Sirz Benjie
0ef1a34030
[Refactor][Bug] Illusion no longer overwrites data of original Pokemon
https://github.com/pagefaultgames/pokerogue/pull/6140
2025-07-26 16:07:16 -06:00
Sirz Benjie
4f259e2c2f
[Misc] Fix import in decrypt-save.js (#6149) 2025-07-25 22:30:58 -07:00
Bertie690
bb46ba9f60
[Dev] Added typedoc deployments for Beta (#6147) 2025-07-25 21:58:15 -07:00
damocleas
556d588d67
[UI/UX] Replace 'Neutral' in the Arena Flyout with 'Field' (#6139)
Update arena-flyout.ts for Field > Neutral
2025-07-25 21:20:48 -04:00
Acelynn Zhang
2e3a7d47e0
[Bug] Fix Thrash continuing on caught Pokemon (#6144)
Fix Thrash continuing on caught Pokemon
2025-07-25 23:55:13 +00:00
Bertie690
ab394db9cf
[Refactor] Minor cleanup of initExpKeys (#6127) 2025-07-25 18:39:25 -05:00
NightKev
7b7edbb474
[Test] MoveHelper#changeMoveset disables moveset overrides (#5915)
Also fix Assist tests and add `expect` for max moveset length
2025-07-25 16:22:52 -07:00
Sirz Benjie
ffa3d1cfe3
[UI/UX] [Bug] Fix ModifierSelectPhase animation delay (#6121)
* Rework promise handling to ensure no races

* Add delay to ensure pokeball opening animation can be seen

* Remove leftover debug statements.

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

* Add tween bouncing pokeball to tweens that must complete for promise to resolve

* Fix typo in tsdoc

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

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-07-25 20:36:21 +00:00
Acelynn Zhang
fc128a2f4c
[Bug] Fix when variable move power is called (#6126)
* Apply variable power attribute before type boost

* Update test/abilities/normal-move-type-change.test.ts

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

* Minor test improvements

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-07-24 23:16:23 -07:00
Madmadness65
99545cf3c7
[Misc] Sinistea and Poltchageist line alt forms now available (#4989)
* Sinistea and Poltchageist line alt forms now available

* Unmark Poltchageist line as unobtainable, fix sprite key of alt forms

* Correct forms not being marked as starter selectable

* Reduce wild chance for Antique/Masterpiece forms

Instead of being 1/2 chance to get the Antique or Masterpiece forms, it is now only a 1/16 chance to get them.

---------

Co-authored-by: damocleas <damocleas25@gmail.com>
2025-07-25 01:45:09 +00:00
Bertie690
6ad11015f7
[Dev] Remove sanitizeOverrides, consolidate initialization code into 1 file
https://github.com/pagefaultgames/pokerogue/pull/6134

* Removed `sanitizeOverrides`

* Moved initialization code to its own file

* Hopefully fixed test contamination

* Actually listened to people now

* fixed the thingy

* Run stub setup on init because

* Update testFileInitialization.ts

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

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-07-25 01:23:13 +00:00
Acelynn Zhang
6211fbd471
[Bug] Unblock priority spread under Psychic Terrain (#6136)
Unblock priority spread under Psychic Terrain

Co-authored-by: Acelynn Zhang <acelynnzhang@Acelynns-MacBook-Pro.local>
2025-07-25 01:05:14 +00:00
Bertie690
3940abbeaf
[Dev] test:silent now passes --silent='passed-only' to Vitest (#6131)
* [Dev] test:silent now passes --silent='passed-only' to Vitest

* Update test shard to actually use `test-silent`

* Removed obselete `project` flag
2025-07-24 17:56:11 -07:00
Sirz Benjie
51d4c33de0
[Misc] Standardize-file-names (#6137)
* Standardize filenames to kebab-case

Co-authored-by: pymilkmaiden <cassiopeiamahler56@gmail.com>

* Move script outside of public folder

* Move update_exp_sprites to scripts

* Add ls-lint to lint file and directory names

* Update lefthook.yml to skip merge / rebase on all pre-commit commands

---------

Co-authored-by: pymilkmaiden <cassiopeiamahler56@gmail.com>
2025-07-24 16:38:31 -04:00
Lugiad
58876a2086
[UI/UX] [Localization] Apply single-column Game Stats to more languages (#6135)
Apply sigle-column Game Stats to more languages
2025-07-24 11:48:52 -04:00
Sirz Benjie
ef843debee
[UI/UX] Allow adjustable column count in stats-ui-handler
https://github.com/pagefaultgames/pokerogue/pull/6087

* Make column count modular

Co-authored by: ShinigamiHolo <128856544+ShinigamiHolo@users.noreply.github.com>

* Make game stats ui handler use phaser method chaining

* Adjust max cursor calculation

* Make arrowUp start invisible

* Add implementations for setFlip methods in MockSprite

* Misc cleanup

* Address kev's review comments

* Address kev's review comments

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

* improve clarity of doc comment

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

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-07-23 23:06:17 -04:00
Lugiad
adee68a6d5
[UI/UX] Optimized Pokémon PNGs (#6130)
Optimized Pokémon PNGs
2025-07-23 11:16:09 -07:00
Sirz Benjie
b1e1a383fb
[Bug] Appropriately load delayed attack when target index was player
https://github.com/pagefaultgames/pokerogue/pull/6128
2025-07-22 16:10:43 -07:00
Matheus Alves
b74849d3e2 Minor compile fix 2025-07-22 23:11:13 +01:00
Matheus Alves
f5b44036e5 Lint fix
Signed-off-by: Matheus Alves <matheus.r.noya.alves@tecnico.ulisboa.pt>
Co-authored-by: Inês Simões <ines.p.simoes@tecnico.ulisboa.pt>
2025-07-22 23:04:42 +01:00
Matheus Alves
8594614e64 Rebasing and conflict resolution
Signed-off-by: Matheus Alves <matheus.r.noya.alves@tecnico.ulisboa.pt>
Co-authored-by: Inês Simões <ines.p.simoes@tecnico.ulisboa.pt>
2025-07-22 22:47:11 +01:00
Matheus Alves
428c175cb5 Replace fallback name logic: use first active challenge instead
of game mode

Previously used game mode as the fallback name, updated to use the
first active challenge instead (e.g. Monogen or Mono Type), which
better reflects the run's theme.
Signed-off-by: Matheus Alves <matheus.r.noya.alves@tecnico.ulisboa.pt>
Co-authored-by: Inês Simões <ines.p.simoes@tecnico.ulisboa.pt>
2025-07-22 22:27:55 +01:00
Matheus Alves
116daa4baa Implemented Default Name Logic
Altered logic in save-slot-select-ui-handler.ts to
support default naming of runs based on the run
game mode with decideFallback function.

In game-data.ts, to prevent inconsistent naming,
added check for unfilled input, ignoring empty
rename requests.

Signed-off-by: Matheus Alves matheus.r.noya.alves@tecnico.ulisboa.pt
Co-authored-by: Inês Simões ines.p.simoes@tecnico.ulisboa.pt
2025-07-22 22:27:53 +01:00
Inês Simões
b25b8bde6a Fixed minor rebase alterations.
Signed-off-by: Matheus Alves matheus.r.noya.alves@tecnico.ulisboa.pt
Co-authored-by: Inês Simões ines.p.simoes@tecnico.ulisboa.pt
2025-07-22 22:26:46 +01:00
Matheus Alves
8dc3591c9e Minor Sanitization for aesthetics
Deleting the input when closing the overlay for
aesthetics purpose

Signed-off-by: Matheus Alves <matheus.r.noya.alves@tecnico.ulisboa.pt>
Co-authored-by: Inês Simões <ines.p.simoes@tecnico.ulisboa.pt>
2025-07-22 22:26:46 +01:00
Matheus Alves
e5cd77016f Fixed formating and best practices issues:
Rewrote renameSession to be more inline with other
API call funtions, removed debugging comments and
whitespaces.

Signed-off-by: Matheus Alves <matheus.r.noya.alves@tecnico.ulisboa.pt>
Co-authored-by: Inês Simões <ines.p.simoes@tecnico.ulisboa.pt>
2025-07-22 22:26:46 +01:00
Matheus Alves
034de5d307 Implement Rename Input Design and Tests for Name Run Feat
Created a test to verify Name Run Feature behaviour in the
backend (rename_run.test.ts), checking possible errors and
 expected behaviours.

Created a UiHandler RenameRunFormUiHandler
(rename-run-ui-handler.ts), creating a frontend input
overlay for the Name Run Feature.

Signed-off-by: Matheus Alves <matheus.r.noya.alves@tecnico.ulisboa.pt>
Co-authored-by: Inês Simões <ines.p.simoes@tecnico.ulisboa.pt>
2025-07-22 22:26:36 +01:00
Matheus Alves
75cb8b22b9 Implement Name Run Feat
Modified load session ui component, adding a submenu when selecting a 3
slot. This menu has 4 options:
Load Game -> Behaves as before, allowing the player to continue
progress from the last saved state in the slot.

Rename Run -> Overlays a rename form, allowing the player to type a
name for the run, checking for string validity, with the option to
cancel or confirm (Rename).

Delete Run -> Prompts user confirmation to delete save data, removing
the current save slot from the users save data.

Cancel -> Hides menu overlay.

Modified game data to implement a function to accept and store
runNameText to the users data.

Modified run info ui component, to display the chosen name when
viewing run information.

Example: When loading the game, the user can choose the Load Game
menu option, then select a save slot, prompting the menu, then choose
"Rename Run" and type the name "Monotype Water Run" then confirm,
thus being able to better organize their save files.

Signed-off-by: Matheus Alves <matheus.r.noya.alves@tecnico.ulisboa.pt>
Co-authored-by: Inês Simões <ines.p.simoes@tecnico.ulisboa.pt>
2025-07-22 22:25:38 +01:00
Sirz Benjie
069e8a47d6
[Bug][Refactor] Fix loading arena tags (#6110)
* Improve type safety; add missing loadTag overrides to wish and neutralizing gas

* More automatic type safety for arena tags

* Fixup wording of lead comment in arena-tag.ts

* Apply kev's suggestions from code review

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

* Allow abstract constructors for arena methods

* Address dean's comments from code review

* Add missing newline after interface definition

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

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Format with biome

* Update tsdoc of ConditionalProtectTag

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

* Apply kev's suggestions from code review

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

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-07-22 11:26:27 -07:00