Commit Graph

1103 Commits

Author SHA1 Message Date
Lugiad
72329f003c
[UI/UX] Indonesian text position adjustments (#6875)
* Hindi Status icon placeholder typo fix

* Indonesian Ui adjustment
2025-12-20 15:07:07 +01:00
Lugiad
a6554acfe3
[i18n] Indonesian & Hindi addition (#6850) 2025-12-18 18:57:37 -08:00
NightKev
e6de0fb95d
[UI/UX] Split login and register into separate menus (#6851)
* [UI/UX] Split login and register into separate menus

* Resize the container for the "Login" and "Register" buttons

* Make container width dynamic

Co-authored-by: Fabi <192151969+fabske0@users.noreply.github.com>

* Make logo position dynamic

* Apply suggestions

- Consolidate code in `LoginPhase`

- Use `truncateString` utility function in `form-modal-ui-handler.ts`

- Move login form to match location of register form

- Swap `x` values of username and download buttons

* Apply suggestions

---------

Co-authored-by: Fabi <192151969+fabske0@users.noreply.github.com>
2025-12-18 13:49:21 -08:00
Bertie690
f48ec4c51e
[Dev] Ensure i18n module is initialized immediately when imported (#6317)
* [Dev] Ensure `i18n` module is initialized immediately when imported

* Fixed missing await?

* Update src/main.ts

* Update init.ts

* Update src/main.ts

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

* Update src/plugins/i18n.ts

* Update trainer-config.ts

* ran biome & made `@module` comment

* Update src/plugins/i18n.ts

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

* Update src/plugins/i18n.ts

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

* Fixed import typo

* flubber

* Ran Biome

* foo

* Remove default re-export of `i18next`

* Update i18n.ts

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

* fixde import issues

* Move `i18n` initialization to `main.ts` from `init.ts`

* Remove some redundant & incorrect comments from `trainer-config.ts`

* Fix tests

* Apply Biome

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-12-17 18:39:30 -08:00
Bertie690
b2b8150856
[Dev] Add biome rules noProto and useFind (#6838) 2025-12-17 19:31:00 +00:00
NightKev
7456c11be1
[Refactor] Consolidate typings/ into @types/, and API types (#6823) 2025-12-10 00:31:41 -08:00
NightKev
3f5c37c881
[Balance] The cost of buying same-species eggs can be reduced (#6837)
* [Balance] The cost of buying same-species eggs can be reduced

After hatching a certain number of eggs for a starter,
the cost of buying same-species eggs
for that starter will be reduced (up to 50%)

* Add test to validate array lengths for egg costs
2025-12-09 20:00:20 -08:00
Fabi
15f668e1b5
[UI/UX] Truncate overlapping name in starter select (#6828)
* Add name truncation

* Update src/ui/handlers/starter-select-ui-handler.ts

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

* remove unnecessary length check

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-12-08 17:45:44 -08:00
Lugiad
d8e8dbf8c2
Merge pull request #6663 from Adri1/norwegian-bokmal
[i18n] Norwegian Bokmål initial commit
2025-12-04 19:48:49 +00:00
Fabi
8381fa16fd
[UI/UX] Fix confirm message overlap on run history import
https://github.com/pagefaultgames/pokerogue/pull/6794
2025-11-22 09:35:32 -08:00
Bertie690
d3088c1729
[Dev] Add more Biome rules (#6604)
* Added `noBannedTypes` as a biome rule

* Added `useShorthandAssign` rule

* Added `useConsistentArrayType`

* Update src/field/pokemon.ts

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

* Update src/data/pokeball.ts

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

* Apply Biome after merge

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-11-01 20:38:04 -07:00
Dean
b2089012c1
[Bug] Show base moves and ability in run info instead of transformed ones (#6702)
Show base moves and ability in run info

Co-authored-by: Fabi <192151969+fabske0@users.noreply.github.com>
2025-11-01 23:41:54 +00:00
Lugiad
bfbd71ddde
[UI/UX] [Localization] Texts position adjustments for Turkish (#6731)
* Adjustments for Turkish

* Remove now-unnecessary comment

Co-authored-by: Fabi <192151969+fabske0@users.noreply.github.com>

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Fabi <192151969+fabske0@users.noreply.github.com>
2025-10-31 16:48:30 -05:00
Wlowscha
d7cfb2087c
[Bug][UI/UX] Make ribbon option in dex selectable with classic wins
https://github.com/pagefaultgames/pokerogue/pull/6720
2025-10-31 03:21:26 +00:00
NightKev
9ea5a014a1
[Bug] Allow fainted Pokemon to be released post-battle in hardcore
https://github.com/pagefaultgames/pokerogue/pull/6723
2025-10-30 20:14:31 -07:00
Wlowscha
e5154850c6
[Bug][UI/UX] Display no heal and no shop ribbon if no support is unlocked (#6715)
* New condition to display ribbons

* Added TODO comment
2025-10-30 15:04:25 -04:00
Wlowscha
a55b2b18e8
[UI/UX][Beta] Adjustments to display of ribbons (#6709)
* Introduce custom ordering of ribbons

* Displaying classic ribbon for mons that have at least one classic win

---------

Co-authored-by: damocleas <damocleas25@gmail.com>
2025-10-29 18:27:03 -04:00
Fabi
bc79a2490b
[Beta] [Bug] Show correct username in title ui (#6710)
fix title username
2025-10-29 17:19:27 -04:00
Fabi
a2895de364
[UI/UX] Fix confirm options overlapping during ME (#6690)
* fix menu overlap

* fix confirm ui not reappearing after summary
2025-10-27 13:05:40 -04:00
Fabi
4acd39d703
[UI/UX][Beta] Show all ribbon descriptions (#6685)
fix ribbon description not showing
2025-10-23 17:51:25 -04:00
Lugiad
170e996358
[UX/UI] [i18n] - Display username on title screen (#6639)
* Display username on title screen

* Typo Correction

* Cleanup title-ui-handler.ts

* Update src/ui/handlers/title-ui-handler.ts

Co-authored-by: Fabi <192151969+fabske0@users.noreply.github.com>

* Update src/ui/handlers/title-ui-handler.ts

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: Fabi <192151969+fabske0@users.noreply.github.com>
2025-10-23 02:59:42 +00:00
Anthony
7d8ccfb745
[Bug] Stats that were reset from moves display properly as being reset
https://github.com/pagefaultgames/pokerogue/pull/6650

* Stats display properly after moves reset stats

* Update test/moves/clear-smog.test.ts

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

* Removed unnecessary test for Clear Smog

---------

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-10-22 23:25:14 +00:00
Fabi
bcc79a6118
[UI/UX] Add option to release Pokemon in shop phase (#6665)
* add `release` option to shop phase

* Fix test

* Don't show `release` option during switch
2025-10-17 22:52:25 -04:00
Fabi
e7404ecfe3
[UI/UX][Beta]Fix ribbon cycling (#6649)
fix ribbon cycling
2025-10-15 23:04:09 +00:00
Sirz Benjie
73e8c6c160
[UI/UX][Beta][Bug] Fix ribbons using wrong index when showMissingRibbons is off (#6648)
Fix ribbons using wrong index when showMissingRibbons is off
2025-10-10 12:38:06 -04:00
Wlowscha
06fe3c7b76
[UI/UX] Add option to see ribbons in Pokédex (#6596)
* Added various ribbon utils

* Added ribbon tray to pokédex page

* V button in Pokédex toggles IVs

* Introduced visibility toggle

* Added ribbons (and full ivs) to unlocks file

* For real this time

* Added descriptions to the ribbons

* Fixed bug of tray not opening with visibility option on

* Minor cleanup of ribbon tray

* Use unique ribbon icons

* Make achv use image instead of sprite

* Tweak size of ribbons

* Improve clarity on comment

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-10-07 23:29:19 -05:00
NightKev
b76ecf55fd
[Dev] Add isApp & build:app for AdmiralBilly's offline app (#6632)
- Consolidate `isBeta`/etc into `src/constants/app-constants.ts`

- Rename `isLocal` to `isDev`

- Replace `import.meta.env.DEV` with `isBeta || isDev`
2025-10-06 18:51:33 -07:00
Bertie690
b25c3b082a
[Misc] Updated documentation & typing for setPositionRelative function (#6629) 2025-10-06 12:39:04 -05:00
Sirz Benjie
e5e0835a96
[Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547)
* make IVs use Uint8Array

* Add many typed array helpers

* Move array utils to its own file

* Add suppression comment

* Adjust type of `getStats`

* Adjust test mocks to use typed arrays

* Adjust signatures of some phases to use ArrayLike<T>

* Adjust signature of src/ui/containers/stats-container#updateIvs

* Remove comment gap to try to satisfy typedoc

* Ensure ivs are always set

* fix: fun-and-games me to use typed array

* Add new tests for array utilities

* Update type of ivs in save-data.ts

* Update part-timer-encounter.test.ts

* Convert uses of StatusEffect[] to Uint8Array

* Update ssui to use uint8array for ivs

* Revert use of typed arrays

* Move `nil` to @types/common

* Make more arrays readonly

* fix: remnant change to immune effects

* Even more array improvements

* Apply kev's suggestions from code review

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

* address Bertie's comments from code review

* tests: remove undefined check for bigint array types

* fixup abilities.ts

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-10-06 12:21:58 -05:00
NightKev
f7fd72b08c
[Dev] Don't use "production" mode for beta server (#6616)
* [Dev] Don't use "production" mode for beta server

* Fix `build` command in `package.json`
2025-10-05 06:33:57 -07:00
Sirz Benjie
f4456f6c7c
[Dev] Improve typescript performance and version bump node and dependencies (#6627)
* Add caching for test matchers types to improve ts performance

* add skipLibCheck to tsconfig.json

* Bump package versions

* Move tm species map to its own file

* Turn on ts-nocheck in pokemon-level-moves

* Move initBiomes to own file

* Add types to methods in ME encounter phase utils

* Fix spacing

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-10-04 19:29:23 -05:00
Sirz Benjie
7e40bb24ec
[Bug][Balance] Make type boost items consider moves that have a variable type when rolling one for rewards (#6578)
* Make type boost items consider moves that have a variable, but static type

* fix: type boost item not spawning for moves without variable type

* make tera blast consider a tera-capable user's tera type

* Adjust tera blast's getTypesForItemSpawn method

* Address comments from code review

* docs: clarify `canTerastallize`
2025-09-29 13:00:18 -05:00
Sirz Benjie
ec4ddab8be
[Bug] [Refactor] [Move] Add selection prevention and move failures (#6276)
* Add failure conditions and move failures part 1

* Add second and third failure sequences

* Refactor mostly complete, need to recheck tests

* Adjust status checks to respect ignoreStatus useModes

* Adjust restriction for stuff cheeks

* Address bertie's review comments

* Add counterRedirectAttr to other counter-like moves

* Adjust some documentation for new methods

* Make substitute use the move tag

* Adjust counter attr to use array.find

* Adjust move condition check that occurs in the third failure check sequence

* Insert move failure check sequence part 4 into move phase

* Revert type adjustment to getBattlerIndex

* Make charging moves deduct pp on use instead of on release

* Fix first move condition not using 1 based starting wave

* Tweak charge move handling and protean timing

* Adjust fly tests to expect pp reduction properly

* Add missing attribute to counter

* Adjust revival blessing hardcore test to respect new return value of isUsable

* Adjust copycat test to account for how it actually works

* Play sleep animation and message

* Remove BYPASS_SLEEP battler tag in favor of boolean holder

* Finish unfinished docs

* Ensure move restrictions are only checked for players

* Adjust pollen puff condition, fix docs on `isOpponent`

* Fix failAgainstFinalBossCondition

* Fix dig test

* Adjust dive's test

* Fix missing break in applyConditions

* Fix getBattlerIndex for enemyPokemon

* Adjust type hint test to not rely on teleport

* Minor adjustments from code review

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

* Add tests for teleport

* Minor adjustments from code review

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

* PR review changes

Fix type hints test name

Update Dig/Dive test name

Separate TSDoc imports in `pokemon-utils.ts`

Add missing `@returns` in `move-phase.ts`

Fix comment typos

Separate TSDoc imports in `move-phase.ts`

Add return hints to `trySelectMove`

Minor formatting

Remove duplicate `.affectedByGravity()` on Telekinesis

Fix docs for `checkRestrictions`

Manually format method definition

Fix comment spacing

Fix variable naming

* Address kev's review comments

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

* Minor adjustments from code review

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

* Remove optional chaining

* fix: type for InferKeys

* chore: apply biome

* chore: fix merge conflicts from Biome update

* Remove latent isNullOrUndefined

* Drop readonly on timingModifier

* docs: Add class comment

* Address comments from code review

* Drop readonly from timingModifier

* Cleanup proc chance computation

* Move `cureStatus` into the Pokemon class

* Final touchups

---------

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-29 12:08:42 -05:00
Wlowscha
f8edaeb1ae
[Misc][UI/UX] See stats of other users in admin panel (#6579)
* Game stats ui handler takes save data as input

* Make admin panel functional for local testing

* Added button to show stats; mocking for local testing with current save data

* Adding pokédex to admin panel

* Many nice things

* Fixed typo

* Add backend support

* Fixed button width in admin panel

* Apply suggestions from code review

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-09-27 14:44:29 -07:00
Sirz Benjie
0578729799
[UI/UX] Show username now works with up to 7 local user accounts instead of 2 (#6571)
allow up to 7 usernames in panel before P02
2025-09-25 08:41:44 -05:00
Lugiad
cffbafe4bd
[i18n] Language codes adjustments (#6587) 2025-09-22 05:45:28 -07:00
Wlowscha
2fe99cc3bf
[Refactor] Refactor Starter and its handling (#6477)
* Reworked `Starter` interface with more explicit information

* Use Starter in ssui

* Fixed some bugs

* Passing starter.ivs to playerPokemon

* Using speciesIds

* Fixed getTestRunStarters

* Reverted some parameter changes

* Initialize starters in ssui

* Don't clear starters before starting run

* Fix to game manager

* Apply suggestions from code review

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

* Set ivs to 0 in part timer test

* Setting the right ivs

* Moved ssui to handlers folder

* Ran biome all

* Fixed broken imports

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-21 11:07:08 -07:00
Dean
d02980dd4e
[Move] Fully implement Healing wish (/Lunar Dance) and remove nextCommandPhaseQueue (#6027)
* Remove NCPQ

* Implement PendingHealTag

* Fix test

* Code review

* Use message directly instead of as key in tag

* Update tag for serialization

* Update test import

* Update src/data/arena-tag.ts

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

* Remove isNullOrUndefined uses

* Fix arena tag type(o)

* Fix pendinghealtag

* Fix hwish tests

* Arena tag denesting

---------

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-09-20 17:32:31 -05:00
Fabi
7d83a3a24a
[UI/UX] Show correct max duration in flyout (#6566)
* Fix terrain & weather max duration flyout

* show correct max duration for tags

* maka maxDuration optional in arenaEvent constructor

* Apply suggestions from code review

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

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-18 13:35:22 -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
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
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
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
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