Commit Graph

6001 Commits

Author SHA1 Message Date
Sirz Benjie
4a719e48c7
[Bug]]Beta] Boss segments not fully clearing (#6609)
fix: boss segments with 1 hp remaining
2025-09-29 14:43:23 -05:00
Blitzy
5745213257
[Balance] Add Stored Power / Power Trip to STAB blacklist (#6607)
Update moveset-generation.ts
2025-09-29 15:04:26 -04:00
Sirz Benjie
18e4d8d1e8
[Bug][Mystery Encounter][Move] MEs with turn 0 moves no longer block sucker punch (#6606)
Add call to `resetTurnData` in mystery encounter cleanup phase
2025-09-29 13:36:42 -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
NightKev
6c8130db54 [Misc] Update comment in src/utils/pokemon-utils.ts 2025-09-28 22:06:58 -07:00
Sirz Benjie
3d69fc3b30
[AI][Beta][Bug] Ensure AI always spawns with 4 moves if it can (#6563)
* Fix minimum move count threshold and utilize baseWeights

* Mark a flaky test as TODO

* Add regression test to ensure pokemon generates with sufficient move counts
2025-09-28 22:57:01 -05:00
Dean
abf2df5147
[Bug] Fix CheckSwitchPhase on single -> double and reload (#6594) 2025-09-28 20:34:11 -05:00
Bertie690
985b0ea483
[Docs] Update README.md REUSE info to reduce redundant sentences (#6599)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-09-28 19:52:08 -05:00
Bertie690
322f18387d
[Dev] Added ability to pass in test type to create-test script from CLI (#6601) 2025-09-27 23:40:56 -05:00
Sirz Benjie
cfd81db6ee
Update .gitmodules to use https by default 2025-09-27 22:19:37 -05:00
Sirz Benjie
5aa4262071
Update .gitmodules to use https by default 2025-09-27 22:18:14 -05:00
Sirz Benjie
bd75523fcd
Update .gitmodules to use https by default 2025-09-27 22:16:20 -05:00
NightKev
49e9976328
Revert "[Refactor] Add TIME_OF_DAY_OVERRIDE & refactor arena tint code"
https://github.com/pagefaultgames/pokerogue/pull/6597

Revert "[Refactor] Add `TIME_OF_DAY_OVERRIDE` & refactor arena tint code"

This reverts commit 4349ee82b9.
2025-09-27 14:55:59 -07: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
Bertie690
4349ee82b9
[Refactor] Add TIME_OF_DAY_OVERRIDE & refactor arena tint code
https://github.com/pagefaultgames/pokerogue/pull/6554

* Removed `ARENA_TINT_OVERRIDE` + minor cleanup of arena tint code

* Added `TIME_OF_DAY_OVERRIDE` to replace tint override

* Fixed visual bug with time of day override

* Fixed the frag stuff and blah blah blah

* Update sprite-types.ts
2025-09-27 14:41:56 -07:00
Sirz Benjie
09707e62aa
[Sprite] bump assets 2025-09-27 11:30:23 -05:00
Sirz Benjie
ba5d00ae31
Update link to logo in REAMDE.md 2025-09-27 11:06:24 -05:00
Sirz Benjie
c695df777c
[Refactor][Dev] Move public to its own submodule (#6590)
* Remove public folder to prepare for submodule

* Add submodule and update licensing

* Stop serving non-asset files during build

* Update pull request template

* Update CODEOWNERS

* Add locales submodule

* Update pull request template regarding locales

* remove post-checkout lefthook in favor of git config

* chore: add license info to new script

* Update gh pages workflow

* Apply kev's suggestions from code review

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

* update assets
2025-09-27 11:01:12 -05:00
Wlowscha
62109bdaf9
[Challenge][Bug] Restrict starters with gender-based evolutions in challenges (#6564)
* Added gender restrictions

* No male Ralts in mono fairy challenge
2025-09-25 08:48:47 -05: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
Dean
e5cc11dee7
[Bug] Fix CheckSwitchPhase not appearing on new wave (#6591) 2025-09-25 08:18:23 -05:00
Sirz Benjie
6766940fa1
[Misc] Make the repo REUSE compliant (#6474)
* Add license information

* Add reuse lint workflow

* Add snippets for spdx

* fix: minor wording adjustments and typo fixes

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

* chore: add FileContributor attributions for Bertie

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

* begin licensing some audio assets

* Add pokemon reborn sound affect attribution

* Annotate Leavannite's section

* Add more licensing info

* Add license info to license files ._.

* Move ps1 files out of public

* Add license for animation jsons

* Add license for bat scripts in public

* Update licensing in scripts

* Fix typo in license ref

* Fix AGPL-3.0-or-later

* Add license info to typedoc.config.js

* Add MIT license for snippets

* chore: update license info for files in scripts

* chore: update license info

* chore: update license info

* chore: update license info

* Remove licenses used only by public before linting with reuse

* Add license info to new files added by docker PR

* chore: apply biome

* fix: add back linting workflow lost during merge

* Add attribution based on Hanniel's information

* Add attribution based on Officer Porkchop and Green Ninja's information

* add attribution to unicorn_power for reshiram/zekrom/kyurem epic variant

* Fixup minor typo

* Adjust sprite test to not think REUSE.toml is a sprite json

* Add missing continue-on-error to workflow

* fix: address kev's comments from code review

* docs: minor touchups

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-09-23 08:49:03 -05:00
Wlowscha
86f2963a47
[Test][UI/UX] Add save file with full, sanitized unlocks (#6514)
* Added save file with full, sanitized unlocks

* Added unlocks (achievements and game modes)
2025-09-23 08:36:10 -05:00
Fabi
84aa8601fb
[Bug] Fix capped rare candy friendship gain (#6565)
* correctly cap rare candy friendship gain

* use correct var for achv
2025-09-23 08:14:22 -05:00
Sirz Benjie
8d5ba221d8
[Refactor] Refactor boss health segment calculation to improve clarity (#6574)
* Refactor boss health bar

* Apply Kev's suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-22 20:08:39 -05:00
Lugiad
cffbafe4bd
[i18n] Language codes adjustments (#6587) 2025-09-22 05:45:28 -07:00
Dean
1c9843618c
[Misc] Blacklist more dynamic phases (#6585) 2025-09-21 12:05:13 -07:00
Sirz Benjie
d3edfb25a1
[Bug][Ability] Queenly Majesty flyout during move select (#6569) 2025-09-21 19:04:57 +00: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
Lugiad
cf5e7fd981
[UI/UX] Optimize text PNGs (#6584) 2025-09-21 06:55:54 -07:00
NightKev
be61996044 [Docs] Fix/update some comments and spacing 2025-09-21 00:22:53 -07:00
NightKev
9f851591cb [Dev] Update pnpm 2025-09-21 00:21:27 -07:00
Dean
25416ebf47
[UI] Avoid prematurely updating HP bar when applying damage (#6582)
Avoid prematurely updating HP bar when applying damage
2025-09-20 22:24:50 -05:00
Dean
87e6095a00
[Misc/Feature] Add dynamic turn order (#6036)
* Add new priority queues

* Add dynamic queue manager

* Add timing modifier and fix post speed ordering

* Make `phaseQueue` private

* Fix `gameManager.setTurnOrder`

* Update `findPhase` to also check dynamic queues

* Modify existing phase manager methods to check dynamic queues

* Fix move order persisting through tests

* Fix magic coat/bounce

* Use append for magic coat/bounce

* Remove `getSpeedOrder` from `TurnStartPhase`, fix references to `getCommandOrder` in tests

* Fix round queuing last instead of next

* Add quick draw application

* Add quick claw activation

* Fix turn order tracking

* Add move header queue to fix ordering

* Fix abilities activating immediately on summon

* Fix `postsummonphases` being shuffled (need to handle speed ties differently here)

* Update speed order function

* Add `StaticSwitchSummonPhase`

* Fix magic coat/bounce error from conflict resolution

* Remove conditional queue

* Fix dancer and baton pass tests

* Automatically queue consecutive Pokémon phases as dynamic

* Move turn end phases queuing back to `TurnStartPhase`

* Fix `LearnMovePhase`

* Remove `PrependSplice`

* Move DQM to phase manager

* Fix various phases being pushed instead of unshifted

* Remove `StaticSwitchSummonPhase`

* Ensure the top queue is always at length - 1

* Fix encounter `PostSummonPhase`s and Revival Blessing

* Fix move headers

* Remove implicit ordering from DQM

* Fix `PostSummonPhase`s in encounters running too early

* Fix `tryRemovePhase` usages

* Add `MovePhase` after `MoveEndPhase` automatically

* Implement an `inSpeedOrder` function

* Merge fixes

* Fix encounter rewards

* Defer `FaintPhase`s where splice was used previously

* Separate speed order utils to avoid circular imports

* Temporarily disable lunar dance test

* Simplify deferral

* Remove move priority modifier

* Fix TS errors in code files

* Fix ts errors in tests

* Fix more test files

* Fix postsummon + checkswitch ability activations

* Fix `removeAll`

* Reposition `positionalTagPhase`

* Re-add `startCurrentPhase`

* Avoid overwriting `currentPhase` after `turnStart`

* Delete `switchSummonPhasePriorityQueue`

* Update `phase-manager.ts`

* Remove uses of `isNullOrUndefined`

* Rename deferral methods

* Update docs and use `getPlayerField(true)` in turn start phase

* Use `.getEnemyField(true)`

* Update docs for post summon phase priority queue (psppq)

* Update speed order utils

* Remove null from `nextPhase`

* Update move phase timing modifier docs

* Remove mention of phases from base priority queue class

* Remove and replace `applyInSpeedOrder`

* Don't sort weather effect phases

* Order priority queues before removing

- Add some `readonly` and `public` modifiers

- Remove unused `queuedPhases` field from `MoveEffectPhase`

* Fix linting in `phase-manager.ts`

* Remove unnecessary turn order modification in Rage Fist test

---------

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-20 17:49:40 -05: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
Bertie690
1691951c87
[Test] Added Map key matcher; enforced strong typing on matchers (#6561)
* Added `toHaveKey` matcher + fixed imports

* Broke up the test matchers into multiple smaller interfaces

* Added restricted typing on matchers

Now we can't call `expect(game).toHaveFullHp()`!!!!!

* Updated comment

* Renamed `toEqualArrayUnsorted` into `toEqualUnsorted`

* Moved comment at top of file

* Fix `@module` doc comment

* Remove extra space

* Fix typo

* Fixed key ssue in matchers

* Update to-have-key.ts

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

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

* Fixed missing braces inside comment

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-20 17:24:27 -05:00
Sirz Benjie
207808f37d
[Docs] Cleanup docs in pokemon.ts (#6543)
* [Docs] Cleanup docs in pokemon.ts

* Apply 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: Fabi <192151969+fabske0@users.noreply.github.com>

* chore: apply biome

* revert changes to docstrings that will conflict
2025-09-20 17:15:57 -05:00
Dean
405b1d389d
[Bug] Apply Supreme Overlord only once on summon (#6575)
* Implement supreme overlord as a battler tag

* Make ability a conditionalattr

* Add tag to map

* Update test

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

* Add edgeCase marker

* Extend from AbilityBattlerTag

* Run biome

---------

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-09-19 23:08:02 -05:00
Sirz Benjie
16a903b975
[Bug][Ability] Remove flyout for rivalry (#6577)
Remove flyout for rivalry
2025-09-19 20:47:35 -07:00
Sirz Benjie
773f5b23f2
[Deps] Bump typedoc version (#6576) 2025-09-19 17:23:50 -07: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
Madmadness65
0e87391b20
[Misc] Update biome pools in init functions (#6572)
Added new biome entries for Type: Null, Silvally, Poipole, Naganadel, Kubfu, Urshifu, Scientist, and Swimmer to their respective init functions, and reran `outputPools`.
2025-09-18 14:13:52 -05:00
Bertie690
3d9e493e5f
[Test] Updated more uses of game.scene.getEnemyField and game.scene.getPlayerField to use updated test utils (#6524) 2025-09-18 09:36:08 -05:00
Sirz Benjie
da766f364c
[Tests] Cleanup getCookie and add many unit tests (#6562)
Cleanup `getCookie` and add many unit tests
2025-09-18 12:52:15 +00:00
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